On 1/9/26 01:14, Daniel P. Berrangé wrote:
Historically it was required to ask for libatomic explicitly with -latomic, but with GCC >= 16 apps will get linked to libatomic whether they ask for it or not.This invalidates QEMU's check for atomic op support for int128 which explicitly does NOT want to use the libatomic impl. As a result with GCC >= 16, QEMU is now getting linked to libatomic and is activating CONFIG_ATOMIC128. This in turn exposes a bug in GCC's libatomic.a static buld which is incompatible with the use of -static-pie leading to build failures like: /usr/bin/ld: /usr/lib/gcc/x86_64-redhat-linux/16/libatomic.a(cas_16_.o): relocation R_X86_64_32 against hidden symbol `libat_compare_exchange_16_i1' can not be used when making a PIE object /usr/bin/ld: failed to set dynamic section sizes: bad value collect2: error: ld returned 1 exit status The newly introduced -fno-link-libatomic flag can be used to disable the new automatic linking of libatomic. Setting this in qemu_isa_flags early on ensures that the check for CONFIG_ATOMIC128 still works correctly. Signed-off-by: Daniel P. Berrangé <[email protected]>
Reviewed-by: Richard Henderson <[email protected]> And queued. r~
