diff mbox series

[v2,2/2] mac80211: compile kconf with host gcc

Message ID 20230930012648.1466406-1-dzy201415@gmail.com
State Accepted
Delegated to: Ansuel Smith
Headers show
Series None | expand

Commit Message

Zeyu Dong Sept. 30, 2023, 1:26 a.m. UTC
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 <dzy201415@gmail.com>
---
This updated patch removes the index lines, and uses ab style as
original and new files.
---
 .../build/004-fix-kconf-compiling.patch       | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644 package/kernel/mac80211/patches/build/004-fix-kconf-compiling.patch

Comments

Christian Marangi Oct. 2, 2023, 5:51 p.m. UTC | #1
On Fri, Sep 29, 2023 at 09:26:48PM -0400, Zeyu Dong wrote:
> 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 <dzy201415@gmail.com>

Can you run this under packages/mac80211/refresh ?
Zeyu Dong Oct. 2, 2023, 9:21 p.m. UTC | #2
On Mon, Oct 2, 2023 at 1:52 PM Christian Marangi <ansuelsmth@gmail.com> wrote:
>
> On Fri, Sep 29, 2023 at 09:26:48PM -0400, Zeyu Dong wrote:
> > 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 <dzy201415@gmail.com>
>
> Can you run this under packages/mac80211/refresh ?
Thanks for your reminder. This should be the correct way to format a
patch. Here is the patch after I run `make package/mac80211/refresh`.
Looks like it remains unchanged as V2.
---
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 <dzy201415@gmail.com>
---
 .../build/004-fix-kconf-compiling.patch       | 37 +++++++++++++++++++
 1 file changed, 37 insertions(+)
 create mode 100644
package/kernel/mac80211/patches/build/004-fix-kconf-compiling.patch
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..b1036b5310
--- /dev/null
+++ b/package/kernel/mac80211/patches/build/004-fix-kconf-compiling.patch
@@ -0,0 +1,37 @@
+--- a/Makefile.real
++++ b/Makefile.real
+@@ -6,6 +6,8 @@ else
+ export BACKPORTS_GIT_TRACKER_DEF=
+ endif
+
++HOSTCC=gcc
++
+ # disable built-in rules for this file
+ .SUFFIXES:
+
+@@ -24,21 +26,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:
--
2.25.1
diff mbox series

Patch

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..b1036b5310
--- /dev/null
+++ b/package/kernel/mac80211/patches/build/004-fix-kconf-compiling.patch
@@ -0,0 +1,37 @@ 
+--- a/Makefile.real
++++ b/Makefile.real
+@@ -6,6 +6,8 @@ else
+ export BACKPORTS_GIT_TRACKER_DEF=
+ endif
+ 
++HOSTCC=gcc
++
+ # disable built-in rules for this file
+ .SUFFIXES:
+ 
+@@ -24,21 +26,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: