package/uclibc: disable LTO unconditionally

Recent commit b7a00b39bc (package/glibc: force -fno-lto) only catered
for glibc, but all C libraries, like uClibc-NG, are impacted, for very
similar reasons.

Disable LTO unconditionally for uClibc-NG too.

Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
Cc: Norbert Lange <nolange79@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
Yann E. MORIN 2022-01-10 10:10:35 +01:00 committed by Thomas Petazzoni
parent bcbd1ed224
commit 54bd9691c8

View File

@ -362,10 +362,18 @@ endif
# Commands
#
UCLIBC_EXTRA_CFLAGS = $(TARGET_ABI)
# uClibc-ng does not build with LTO, so explicitly disable it
# when using a compiler that may have support for LTO
ifeq ($(BR2_TOOLCHAIN_GCC_AT_LEAST_4_7),y)
UCLIBC_EXTRA_CFLAGS += -fno-lto
endif
UCLIBC_MAKE_FLAGS = \
ARCH="$(UCLIBC_TARGET_ARCH)" \
CROSS_COMPILE="$(TARGET_CROSS)" \
UCLIBC_EXTRA_CFLAGS="$(TARGET_ABI)" \
UCLIBC_EXTRA_CFLAGS="$(UCLIBC_EXTRA_CFLAGS)" \
HOSTCC="$(HOSTCC)"
define UCLIBC_KCONFIG_FIXUP_CMDS