On Thu, Jan 14, 2021 at 04:08:20PM -0800, H.J. Lu wrote: I think best would be to revert the i386-options.c change until this is all fixed, keeping the trunk broken too long is undesirable.
Second, I didn't mean to talk specifically about libatomic, but about all the 3 configure.tgt changes. And while for the i486 and cmpxchg16b cases you now use a functional test, for the i686 test you still use macros, and I don't e.g. see how __SSE__ is relevant, one could have in CFLAGS -march=skylake-avx512 -mno-sse and it wouldn't be considered an i686. Now that I look at it, I think what you should be looking at is whether the compiler with the ${CC} ${CFLAGS} predefines: __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 - if not, then -march=i486 needs to be added, __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 for 32-bit code resp. __GCC_HAVE_SYNC_COMPARE_AND_SWAP_16 for 64-bit code, then maybe try_ifunc=no (but it needs verification that the code will in the end always use cmpxchg8b or cmpxchg16b rather than never). Jakub