diff options
| author | Jean-Philippe Brucker <[email protected]> | 2020-11-10 17:43:05 +0100 |
|---|---|---|
| committer | Andrii Nakryiko <[email protected]> | 2020-11-11 12:18:22 -0800 |
| commit | c8a950d0d3b926a02c7b2e713850d38217cec3d1 (patch) | |
| tree | 92ccac74b4a9b1bd882a570f2a867908d2e66b50 /tools/scripts/Makefile.include | |
| parent | 7112d127984bd7b0c8ded7973b358829f16735f5 (diff) | |
tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
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]
Diffstat (limited to 'tools/scripts/Makefile.include')
| -rw-r--r-- | tools/scripts/Makefile.include | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/scripts/Makefile.include b/tools/scripts/Makefile.include index a7974638561c..1358e89cdf7d 100644 --- a/tools/scripts/Makefile.include +++ b/tools/scripts/Makefile.include @@ -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 |