From 24e27bec9a6df1511a504cf04cd9578a23e74657 Mon Sep 17 00:00:00 2001 From: Kevin Darbyshire-Bryant Date: Tue, 21 Jun 2022 14:15:40 +0100 Subject: kernel: filter -no-plt from KCFLAGS Compiler option -no-plt will break kernel builds on some architectures eg. (x86) Filter this option from the recently introduced handling of KCFLAGS vs EXTRA_OPTIMISATION Fixes: 1d42af720c6b ("kernel: use KCFLAGS for passing EXTRA_OPTIMIZATION flags") Suggested-by: Felix Fietkau Signed-off-by: Kevin Darbyshire-Bryant --- include/kernel.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/kernel.mk b/include/kernel.mk index d99dd0a534..001718d89d 100644 --- a/include/kernel.mk +++ b/include/kernel.mk @@ -101,7 +101,7 @@ endif KERNEL_MAKE = $(MAKE) $(KERNEL_MAKEOPTS) KERNEL_MAKE_FLAGS = \ - KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION)) $(call qstrip,$(CONFIG_KERNEL_CFLAGS))" \ + KCFLAGS="$(call iremap,$(BUILD_DIR),$(notdir $(BUILD_DIR))) $(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION))) $(call qstrip,$(CONFIG_KERNEL_CFLAGS))" \ HOSTCFLAGS="$(HOST_CFLAGS) -Wall -Wmissing-prototypes -Wstrict-prototypes" \ CROSS_COMPILE="$(KERNEL_CROSS)" \ ARCH="$(LINUX_KARCH)" \ -- cgit v1.2.3