From 0c3b7e42616f1f6084cfeb0d443cbff0b2c424a9 Mon Sep 17 00:00:00 2001 From: Jiri Olsa Date: Tue, 27 Sep 2016 16:18:46 +0200 Subject: 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 Requested-by: Andi Kleen Requested-and-Tested-by: Arnaldo Carvalho de Melo Cc: Madhavan Srinivasan Cc: Peter Zijlstra Cc: Sukadev Bhattiprolu Cc: linuxppc-dev@lists.ozlabs.org Link: http://lkml.kernel.org/r/20160927141846.GA6589@krava Signed-off-by: Arnaldo Carvalho de Melo --- tools/build/Build.include | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tools/build/Build.include') diff --git a/tools/build/Build.include b/tools/build/Build.include index 4d000bc..0248938 100644 --- a/tools/build/Build.include +++ b/tools/build/Build.include @@ -90,3 +90,8 @@ if_changed = $(if $(strip $(any-prereq) $(arg-check)), \ # - per object C flags # - BUILD_STR macro to allow '-D"$(variable)"' constructs c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CFLAGS) -D"BUILD_STR(s)=\#s" $(CFLAGS_$(basetarget).o) $(CFLAGS_$(obj)) + +### +## HOSTCC C flags + +host_c_flags = -Wp,-MD,$(depfile),-MT,$@ $(CHOSTFLAGS) -D"BUILD_STR(s)=\#s" $(CHOSTFLAGS_$(basetarget).o) $(CHOSTFLAGS_$(obj)) -- cgit v1.1