From: Zeyu Dong Date: Sat, 30 Sep 2023 00:54:59 +0000 (-0400) Subject: mac80211: compile kconf with host gcc X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=4b0b90d3fab5a973e410fd2ee812df856f1eba3b;p=openwrt%2Fstaging%2Fnbd.git mac80211: compile kconf with host gcc Fix the building issue setting CC to KERNEL_CC in kernel.mk. The kernel backports by default uses CC to compile kconf. A new patch is added to mac80211 to compile kconf with host gcc. Signed-off-by: Zeyu Dong [ refresh patches ] Signed-off-by: Christian Marangi --- diff --git a/package/kernel/mac80211/patches/build/004-fix-kconf-compiling.patch b/package/kernel/mac80211/patches/build/004-fix-kconf-compiling.patch new file mode 100644 index 0000000000..8bae8367f7 --- /dev/null +++ b/package/kernel/mac80211/patches/build/004-fix-kconf-compiling.patch @@ -0,0 +1,47 @@ +--- a/Makefile.real ++++ b/Makefile.real +@@ -6,6 +6,18 @@ else + export BACKPORTS_GIT_TRACKER_DEF= + endif + ++ifneq ($(LLVM),) ++ifneq ($(filter %/,$(LLVM)),) ++LLVM_PREFIX := $(LLVM) ++else ifneq ($(filter -%,$(LLVM)),) ++LLVM_SUFFIX := $(LLVM) ++endif ++ ++HOSTCC = $(LLVM_PREFIX)clang$(LLVM_SUFFIX) ++else ++HOSTCC = gcc ++endif ++ + # disable built-in rules for this file + .SUFFIXES: + +@@ -24,21 +36,21 @@ listnewconfig oldaskconfig oldconfig \ + silentoldconfig olddefconfig oldnoconfig \ + allnoconfig allyesconfig allmodconfig \ + alldefconfig randconfig: +- @$(MAKE) -C kconf conf ++ @$(MAKE) -C kconf CC=$(HOSTCC) conf + @./kconf/conf --$@ Kconfig + + .PHONY: usedefconfig + usedefconfig: +- @$(MAKE) -C kconf conf ++ @$(MAKE) -C kconf CC=$(HOSTCC) conf + @./kconf/conf --defconfig=defconfig Kconfig + + .PHONY: savedefconfig + savedefconfig: +- @$(MAKE) -C kconf conf ++ @$(MAKE) -C kconf CC=$(HOSTCC) conf + @./kconf/conf --savedefconfig=defconfig Kconfig + + defconfig-%:: +- @$(MAKE) -C kconf conf ++ @$(MAKE) -C kconf CC=$(HOSTCC) conf + @./kconf/conf --defconfig=defconfigs/$(@:defconfig-%=%) Kconfig + + .config: