Re: mips32 + gcc9 -- still broken

From: Adrian Chadd <adrian_at_freebsd.org>
Date: Sat, 3 Oct 2020 13:35:47 -0700
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 Sat Oct 03 2020 - 18:36:03 UTC

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