mirror of
https://github.com/ipxe/ipxe
synced 2026-07-06 15:51:30 +03:00
[linux] Disable implicit linking against libatomic
GCC 16 attempts to link against -latomic_asneeded by default, and expects that this library will be provided by the installed build toolchain alongside libgcc. The Fedora cross-gcc packages do not include libatomic, which causes the build to fail. We do not require any functions provided by libatomic. Work around the missing packaged files in Fedora by disabling gcc's implicit linking via the -fno-link-libatomic build option. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -42,6 +42,13 @@ ifneq ($(NO_WERROR),1)
|
||||
LINUX_CFLAGS += -Werror
|
||||
endif
|
||||
|
||||
# Check for implicit libatomic
|
||||
#
|
||||
LIBATOMIC_TEST = $(CC) $(LINUX_CFLAGS) -x c /dev/null -nostartfiles \
|
||||
-fno-link-libatomic -o /dev/null >/dev/null 2>&1
|
||||
LIBATOMIC_FLAGS := $(shell $(LIBATOMIC_TEST) && $(ECHO) '-fno-link-libatomic')
|
||||
LINUX_CFLAGS += $(LIBATOMIC_FLAGS)
|
||||
|
||||
# Check for libslirp
|
||||
#
|
||||
LIBSLIRP_TEST = $(CC) $(LINUX_CFLAGS) -x c /dev/null -nostartfiles \
|
||||
|
||||
Reference in New Issue
Block a user