Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build
От | Tom Lane |
---|---|
Тема | Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build |
Дата | |
Msg-id | 23287.1560655935@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build (YunQiang Su <wzssyqa@gmail.com>) |
Ответы |
Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build
|
Список | pgsql-bugs |
YunQiang Su <wzssyqa@gmail.com> writes: > Tom Lane <tgl@sss.pgh.pa.us> 于2019年6月14日周五 上午3:53写道: >> After further digging around, I'm liking the alternative of just >> removing the ".set mips2" lines. MIPS-I has been obsolete since 1989, >> and the MIPS-II instruction set has a lot of other substantial advantages >> over MIPS-I besides having LL/SC, so it's pretty hard to believe that >> anyone is still using toolchains that default to assuming MIPS-I >> instruction set. > You are right. I have no idea anyone is using MIPS I. After further looking, it seems that isn't going to fly. I found from the Debian release notes that they dropped MIPS-I support as of Stretch, which means removing ".set mips2" would break both of our live MIPS buildfarm machines (which run wheezy and jessie). I also found by experimentation that NetBSD as of 7.0.2 doesn't default to assuming MIPS2 either. (I didn't try anything newer, but a scan through the port-mips mailing list found no suggestion that they've changed the default since then.) So even though the hardware in use nowadays might be fine with this, the toolchains are still behind the times. So we'll have to go with the #if solution, I think. But I dislike hardwiring "#if __mips_isa_rev >= 6" into s_lock.h. I'd suggest modeling this hack on our rather-ancient hacks for similar problems with PPC: put something like this into pg_config_manual.h #if __mips_isa_rev >= 6 #define FORCE_MIPS2_ARCHITECTURE #endif (with a suitable comment) and then make s_lock.h do #ifdef FORCE_MIPS2_ARCHITECTURE " .set mips2 \n" #endif That'll make it a lot easier for people to tweak the condition if they need to. regards, tom lane
В списке pgsql-bugs по дате отправления: