]> Git Repo - linux.git/commitdiff
tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
authorJean-Philippe Brucker <[email protected]>
Tue, 10 Nov 2020 16:43:05 +0000 (17:43 +0100)
committerAndrii Nakryiko <[email protected]>
Wed, 11 Nov 2020 20:18:22 +0000 (12:18 -0800)
Several Makefiles in tools/ need to define the host toolchain variables.
Move their definition to tools/scripts/Makefile.include

Signed-off-by: Jean-Philippe Brucker <[email protected]>
Signed-off-by: Andrii Nakryiko <[email protected]>
Acked-by: Jiri Olsa <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
tools/bpf/resolve_btfids/Makefile
tools/build/Makefile
tools/objtool/Makefile
tools/perf/Makefile.perf
tools/power/acpi/Makefile.config
tools/scripts/Makefile.include

index 66cb92136de4adf30b8963f68fad28406635c6a9..bf656432ad736fede7bc2e42c5edbd95dfb8fa46 100644 (file)
@@ -18,15 +18,6 @@ else
 endif
 
 # always use the host compiler
-ifneq ($(LLVM),)
-HOSTAR  ?= llvm-ar
-HOSTCC  ?= clang
-HOSTLD  ?= ld.lld
-else
-HOSTAR  ?= ar
-HOSTCC  ?= gcc
-HOSTLD  ?= ld
-endif
 AR       = $(HOSTAR)
 CC       = $(HOSTCC)
 LD       = $(HOSTLD)
index 722f1700d96a8bce36bb459db981700e87946f7c..bae48e6fa9952accdb6b61596020d74371e2f42c 100644 (file)
@@ -15,10 +15,6 @@ endef
 $(call allow-override,CC,$(CROSS_COMPILE)gcc)
 $(call allow-override,LD,$(CROSS_COMPILE)ld)
 
-HOSTCC ?= gcc
-HOSTLD ?= ld
-HOSTAR ?= ar
-
 export HOSTCC HOSTLD HOSTAR
 
 ifeq ($(V),1)
index 4ea9a833dde7aa8ce18a37beb444533caec8a41f..5cdb19036d7f71a1128a3e2333a483074c68e2eb 100644 (file)
@@ -3,15 +3,6 @@ include ../scripts/Makefile.include
 include ../scripts/Makefile.arch
 
 # always use the host compiler
-ifneq ($(LLVM),)
-HOSTAR ?= llvm-ar
-HOSTCC ?= clang
-HOSTLD ?= ld.lld
-else
-HOSTAR ?= ar
-HOSTCC ?= gcc
-HOSTLD ?= ld
-endif
 AR      = $(HOSTAR)
 CC      = $(HOSTCC)
 LD      = $(HOSTLD)
index 7ce3f2e8b9c74b70978f6a28cef0bff8b22554e5..62f3deb1d3a8b7bcbef40d58ba01b10673a2c8a9 100644 (file)
@@ -175,10 +175,6 @@ endef
 
 LD += $(EXTRA_LDFLAGS)
 
-HOSTCC  ?= gcc
-HOSTLD  ?= ld
-HOSTAR  ?= ar
-
 PKG_CONFIG = $(CROSS_COMPILE)pkg-config
 LLVM_CONFIG ?= llvm-config
 
index 54a2857c2510aeec691a03f3fde21c43c6d0b913..331f6d30f47261864a7c5654a1efcc2df7db5490 100644 (file)
@@ -54,7 +54,6 @@ INSTALL_SCRIPT = ${INSTALL_PROGRAM}
 CROSS = #/usr/i386-linux-uclibc/usr/bin/i386-uclibc-
 CROSS_COMPILE ?= $(CROSS)
 LD = $(CC)
-HOSTCC = gcc
 
 # check if compiler option is supported
 cc-supports = ${shell if $(CC) ${1} -S -o /dev/null -x c /dev/null > /dev/null 2>&1; then echo "$(1)"; fi;}
index a7974638561cabf960e66b9ab0458852608fdc85..1358e89cdf7d698951235b2b6ee61d098a74aee4 100644 (file)
@@ -59,6 +59,16 @@ $(call allow-override,LD,$(CROSS_COMPILE)ld)
 $(call allow-override,CXX,$(CROSS_COMPILE)g++)
 $(call allow-override,STRIP,$(CROSS_COMPILE)strip)
 
+ifneq ($(LLVM),)
+HOSTAR  ?= llvm-ar
+HOSTCC  ?= clang
+HOSTLD  ?= ld.lld
+else
+HOSTAR  ?= ar
+HOSTCC  ?= gcc
+HOSTLD  ?= ld
+endif
+
 ifeq ($(CC_NO_CLANG), 1)
 EXTRA_WARNINGS += -Wstrict-aliasing=3
 endif
This page took 0.070042 seconds and 4 git commands to generate.