forked from immortalwrt/immortalwrt
-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> [ refresh patches ] Signed-off-by: Christian Marangi <[email protected]>
- Loading branch information
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
47 changes: 47 additions & 0 deletions
47
package/kernel/mac80211/patches/build/004-fix-kconf-compiling.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |