mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
48 lines
1.1 KiB
Diff
48 lines
1.1 KiB
Diff
|
--- 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:
|