Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build
От | YunQiang Su |
---|---|
Тема | Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build |
Дата | |
Msg-id | CAKcpw6W8Y56cxKJna6EsA+j2ZQ1p6DeXwMJFOOjb=baPigbV+Q@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #15844: MIPS: remove .set mips2 in s_lock.h to fix r6 build
|
Список | pgsql-bugs |
Tom Lane <tgl@sss.pgh.pa.us> 于2019年6月16日周日 上午11:32写道: > > 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 The default of wheezy and jessie is MIPS II. https://metadata.ftp-master.debian.org/changelogs//main/g/gcc-4.8/gcc-4.8_4.8.4-1_changelog Debian use MIPS II as default since gcc 4.5, (may be Squeeze) > experimentation that NetBSD as of 7.0.2 doesn't default to assuming I have no idea about NetBSD. Can you run gcc -v on it? > 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 > If you'd like to do like this: #if __mips_isa_rev > 0 is enough. > (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 -- YunQiang Su
В списке pgsql-bugs по дате отправления: