diff options
author | Jiri Olsa <jolsa@redhat.com> | 2016-09-27 16:18:46 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2016-10-03 16:39:09 +0200 |
commit | 0c3b7e42616f1f6084cfeb0d443cbff0b2c424a9 (patch) | |
tree | 097ca8b3055dcc3e7a935413dc78eb32b1934cec /tools/build/Makefile | |
parent | perf tools: Experiment with cppcheck (diff) | |
download | linux-0c3b7e42616f1f6084cfeb0d443cbff0b2c424a9.tar.xz linux-0c3b7e42616f1f6084cfeb0d443cbff0b2c424a9.zip |
tools build: Add support for host programs format
In some cases, like for fixdep and shortly for jevents, we need to build a tool
to run on the host that will be used in building a tool, such as perf, that is
being cross compiled, so do like the kernel and provide HOSTCC, HOSTLD and HOSTAR
to do that.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Requested-by: Andi Kleen <andi@firstfloor.org>
Requested-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Madhavan Srinivasan <maddy@linux.vnet.ibm.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>
Cc: linuxppc-dev@lists.ozlabs.org
Link: http://lkml.kernel.org/r/20160927141846.GA6589@krava
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/build/Makefile')
-rw-r--r-- | tools/build/Makefile | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/build/Makefile b/tools/build/Makefile index 0d5a0e3a8fa9..653faee2a055 100644 --- a/tools/build/Makefile +++ b/tools/build/Makefile @@ -14,6 +14,12 @@ 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) Q = else |