Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build

Tom Lane <tgl@sss.pgh.pa.us>

From: Tom Lane <tgl@sss.pgh.pa.us>
To: YunQiang Su <wzssyqa@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Date: 2019-06-17T15:29:49Z
Lists: pgsql-bugs

Attachments

I wrote:
> Sure, the trick would be to not override a (default or specified)
> architecture setting that's higher than mips2.  I was imagining
> using AC_EGREP_CPP() to see if __mips expands to exactly 1.  But
> on reflection, probably a better idea is to just see if asm with
> ll/sc/sync compiles, and add -march=mips2 if not.

Concretely, here's a patch that does it like that.  I've verified
that this builds on my netbsd/gxemul installation.

			regards, tom lane

Commits

  1. Fix spinlock assembly code for MIPS so it works on MIPS r6.