Re: mips32 + gcc9 -- still broken

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Mon, 5 Oct 2020 08:47:10 +0200
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


Received on Mon Oct 05 2020 - 04:47:13 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:25 UTC