[PATCH v2] atomic: Reinstate HAVE_64B_ATOMICS configure check
Wilco Dijkstra
Wilco.Dijkstra@arm.com
Wed Dec 17 19:42:19 GMT 2025
Hi,
>> # When I get this to work, this is the right thing
>> ifeq ($(subdir),elf)
>> -CFLAGS-rtld.c += -mcpu=v8
>> +#CFLAGS-rtld.c += -mcpu=v8
>> #rtld-routines += dl-sysdepsparc
>> endif # elf
>>
>
>>> Hum, is this a leftover from development?
>>
>> This is an ancient hack from 1997 that doesn't work (it overrides -mcpu=leon3 which
>> then causes assertions). I could remove it all since it has no explanation as to why it
>> was needed then.
>
> Right, do you need it because otherwise possible 64-bit atomic usage
> trigger some assertation building against leon3?
__atomic_always_lockfree (4, 0) returns 0 with -mcpu=v8 (which seems like a bug in GCC,
but I've not investigated it in detail). In any case, compiling one C file with a different
(possibly incompatible) CPU setting just seems incorrect, and the comment indicates
it was just some hackery to get GLIBC to work for v8 (leon3 was 2005, so much later).
Cheers.
Wilco
More information about the Libc-alpha
mailing list