[openwrt/openwrt] kernel: Make KERNEL_MAKEOPTS recursively expanded
LEDE Commits
lede-commits at lists.infradead.org
Wed Dec 21 15:48:24 PST 2022
hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/709351bf328f7173cecc0c065c46151ae45804bd
commit 709351bf328f7173cecc0c065c46151ae45804bd
Author: Hauke Mehrtens <hmehrtens at maxlinear.com>
AuthorDate: Wed Dec 14 16:29:16 2022 +0100
kernel: Make KERNEL_MAKEOPTS recursively expanded
KERNEL_MAKEOPTS will get expanded when it is used and not when it is
defined in the kernel.mk file now. This fixes problems finding dependent
kernel modules when it is used by a kernel module package.
Without this change the build of packages which depend on other out of
tree modules failed when they used KERNEL_MAKE because some symbols could
not be found. This happened because KERNEL_MAKE_FLAGS which contains a
"if $(__package_mk)" was evaluated where KERNEL_MAKEOPTS was defined
and not when the KERNEL_MAKE was used. For packages which included
kernel.mk before package.mk we saw this problem. One workaround
was to use the correct include order and the other one was to not
use KERNEL_MAKE_FLAGS, but copy its content.
Signed-off-by: Hauke Mehrtens <hmehrtens at maxlinear.com>
(cherry picked from commit 06ad3adeecc27859313e60c173c435d45ac2b345)
---
include/kernel.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/kernel.mk b/include/kernel.mk
index 070d1bca75..d61e0c2677 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -126,7 +126,7 @@ ifeq ($(call qstrip,$(CONFIG_EXTERNAL_KERNEL_TREE))$(call qstrip,$(CONFIG_KERNEL
KERNELRELEASE=$(LINUX_VERSION)
endif
-KERNEL_MAKEOPTS := -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS)
+KERNEL_MAKEOPTS = -C $(LINUX_DIR) $(KERNEL_MAKE_FLAGS)
ifdef CONFIG_USE_SPARSE
KERNEL_MAKEOPTS += C=1 CHECK=$(STAGING_DIR_HOST)/bin/sparse
More information about the lede-commits
mailing list