mirror of
https://github.com/Telecominfraproject/wlan-ap.git
synced 2025-10-29 09:32:34 +00:00
mediatek-sdk: mac80211: fix kconf host tool compilation
Fix kconf Makefile to explicitly use gcc for host tools instead of allowing the cross compiler to leak in. This ensures the build tools are compiled with the host toolchain rather than the target toolchain. Signed-off-by: John Crispin <john@phrozen.org>
This commit is contained in:
@@ -1,13 +1,56 @@
|
||||
--- a/Makefile.real
|
||||
+++ b/Makefile.real
|
||||
@@ -13,7 +13,7 @@ export CONFIG_=CPTCFG_
|
||||
|
||||
.PHONY: menuconfig
|
||||
menuconfig:
|
||||
- @$(MAKE) -C kconf mconf
|
||||
+ @$(MAKE) -C kconf CC=gcc mconf
|
||||
@./kconf/mconf Kconfig
|
||||
|
||||
.PHONY: listnewconfig oldaskconfig oldconfig \
|
||||
@@ -24,21 +24,21 @@ listnewconfig oldaskconfig oldconfig \
|
||||
silentoldconfig olddefconfig oldnoconfig \
|
||||
allnoconfig allyesconfig allmodconfig \
|
||||
alldefconfig randconfig:
|
||||
- @$(MAKE) -C kconf conf
|
||||
+ @$(MAKE) -C kconf CC=gcc conf
|
||||
@./kconf/conf --$@ Kconfig
|
||||
|
||||
.PHONY: usedefconfig
|
||||
usedefconfig:
|
||||
- @$(MAKE) -C kconf conf
|
||||
+ @$(MAKE) -C kconf CC=gcc conf
|
||||
@./kconf/conf --defconfig=defconfig Kconfig
|
||||
|
||||
.PHONY: savedefconfig
|
||||
savedefconfig:
|
||||
- @$(MAKE) -C kconf conf
|
||||
+ @$(MAKE) -C kconf CC=gcc conf
|
||||
@./kconf/conf --savedefconfig=defconfig Kconfig
|
||||
|
||||
defconfig-%::
|
||||
- @$(MAKE) -C kconf conf
|
||||
+ @$(MAKE) -C kconf CC=gcc conf
|
||||
@./kconf/conf --defconfig=defconfigs/$(@:defconfig-%=%) Kconfig
|
||||
|
||||
.config:
|
||||
--- a/kconf/Makefile
|
||||
+++ b/kconf/Makefile
|
||||
@@ -1,9 +1,9 @@
|
||||
@@ -1,9 +1,15 @@
|
||||
-CFLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
|
||||
+CC=gcc
|
||||
+CFLAGS=-Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer -DKBUILD_NO_NLS
|
||||
|
||||
LXDIALOG := lxdialog/checklist.o lxdialog/inputbox.o lxdialog/menubox.o lxdialog/textbox.o lxdialog/util.o lxdialog/yesno.o
|
||||
|
||||
+%.o: %.c
|
||||
+ $(CC) $(CFLAGS) -c -o $@ $<
|
||||
+
|
||||
conf: conf.o zconf.tab.o
|
||||
-mconf_CFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ccflags) -DLOCALE
|
||||
+ $(CC) -o conf $^
|
||||
+
|
||||
+mconf_CFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ccflags)
|
||||
mconf_LDFLAGS := $(shell ./lxdialog/check-lxdialog.sh -ldflags $(CC))
|
||||
mconf: CFLAGS += $(mconf_CFLAGS)
|
||||
|
||||
Reference in New Issue
Block a user