[openwrt/openwrt] kernel: filter -no-plt from KCFLAGS
LEDE Commits
lede-commits at lists.infradead.org
Tue Jun 21 08:41:37 PDT 2022
ldir pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/24e27bec9a6df1511a504cf04cd9578a23e74657
commit 24e27bec9a6df1511a504cf04cd9578a23e74657
Author: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
AuthorDate: Tue Jun 21 14:15:40 2022 +0100
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 <nbd at nbd.name>
Signed-off-by: Kevin Darbyshire-Bryant <ldir at darbyshire-bryant.me.uk>
---
include/kernel.mk | 2 +-
rules.mk | 1 -
2 files changed, 1 insertion(+), 2 deletions(-)
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)" \
diff --git a/rules.mk b/rules.mk
index 8d4f619211..8a4254e638 100644
--- a/rules.mk
+++ b/rules.mk
@@ -62,7 +62,6 @@ ARCH_PACKAGES:=$(call qstrip,$(CONFIG_TARGET_ARCH_PACKAGES))
BOARD:=$(call qstrip,$(CONFIG_TARGET_BOARD))
SUBTARGET:=$(call qstrip,$(CONFIG_TARGET_SUBTARGET))
TARGET_OPTIMIZATION:=$(call qstrip,$(CONFIG_TARGET_OPTIMIZATION))
-export EXTRA_OPTIMIZATION:=$(filter-out -fno-plt,$(call qstrip,$(CONFIG_EXTRA_OPTIMIZATION)))
TARGET_SUFFIX=$(call qstrip,$(CONFIG_TARGET_SUFFIX))
BUILD_SUFFIX:=$(call qstrip,$(CONFIG_BUILD_SUFFIX))
SUBDIR:=$(patsubst $(TOPDIR)/%,%,${CURDIR})
More information about the lede-commits
mailing list