mips32 + gcc9 -- still broken

Dimitry Andric dim at FreeBSD.org
Mon Oct 5 06:47:13 UTC 2020


Sorry, i hadn't picked up on this thread at all. What is the concrete patch you are proposing? Is is in Phabricator somewhere?

(Note that when building with gcc, we should really just automatically add -latomic, to get rid of these errors.)

-Dimitry

> On 5 Oct 2020, at 05:40, Adrian Chadd <adrian at FreeBSD.org> wrote:
> 
> ping!
> 
> I've got the world building on gcc + mips32 just patching cxx_contention_t to be 32 bits, but it looks like an ABI change.
> 
> Would the better thing be to just make it 32 bits on FreeBSD + MIPS for now? I don't think anyone is going to mind that changing at this point.
> 
> 
> 
> -adrian
> 
> 
> On Sat, 3 Oct 2020 at 13:35, Adrian Chadd <adrian at freebsd.org> wrote:
> 
> 
> On Mon, 21 Sep 2020 at 00:43, Alexander Richardson <arichardson at freebsd.org> wrote:
> 
> On Mon, 21 Sep 2020, 07:38 Adrian Chadd, <adrian at freebsd.org> wrote:
> So, the big list of unknown symbols was my fault! Whoops.
> 
> i've gotten further using gcc-6.4 by fixing some of the warnings/issues
> that have crept up.
> 
> Here's a review for one of them:
> 
> https://reviews.freebsd.org/D26504
> 
> However, now I've hit:
> 
> /usr/local/bin/mips-unknown-freebsd13.0-ld:
> /usr/home/adrian/work/freebsd/head-embedded/obj/mips_ap/usr/home/adrian/work/freebsd/head-embedded/src/mips.mips/tmp/usr/lib/libc++.so.1:
> undefined reference to `__atomic_fetch_sub_8'
> /usr/local/bin/mips-unknown-freebsd13.0-ld:
> /usr/home/adrian/work/freebsd/head-embedded/obj/mips_ap/usr/home/adrian/work/freebsd/head-embedded/src/mips.mips/tmp/usr/lib/libc++.so.1:
> undefined reference to `__atomic_load_8'
> /usr/local/bin/mips-unknown-freebsd13.0-ld:
> /usr/home/adrian/work/freebsd/head-embedded/obj/mips_ap/usr/home/adrian/work/freebsd/head-embedded/src/mips.mips/tmp/usr/lib/libc++.so.1:
> undefined reference to `__atomic_fetch_add_8'
> 
> .. looks like we need some 64 bit atomics now in mips32 for libc++ / devd
> 
> Those are now provided by compiler-rt when using clang. With GCC you'll have to link libatomic. I had a quick look at the code in libc++ that uses the 64-bit atomics a few weeks ago and I believe it's the futex fallback code. The best solution would probably be to port it to use umtx but for MIPS32 it might be fine to use a 32 bit atomic instead.
> 
> It compiled fine with a 32 bit atomic. Why's it 64 bit for everything but Linux?
> 
> Can we make it a 32 bit atomic for all FreeBSD platforms? Are there ABI concerns?
> 
> 
> 
> -adrian
> 
> 
> Alex

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20201005/e34309b9/attachment.sig>


More information about the freebsd-current mailing list