tools build: Make fixdep a hostprog
authorJiri Olsa <jolsa@redhat.com>
Tue, 27 Sep 2016 14:18:46 +0000 (16:18 +0200)
committerArnaldo Carvalho de Melo <acme@redhat.com>
Mon, 3 Oct 2016 14:40:35 +0000 (11:40 -0300)
It is used in the build process, so stop suppressing its build in tools
cross builds.

Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Andi Kleen <andi@firstfloor.org>
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
[ Use HOSTCC on the $(OUTPUT)fixdep target, it was using the x-compiler
  to link fixdep-in.o, that was correctly built with HOSTCC and thus failing ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
tools/build/Build
tools/build/Makefile
tools/build/Makefile.include

index 63a6c34c0c88567cbee47e2431d96e18e395c62e..76d1a49609734205447f8f00b06143658ca7b7d1 100644 (file)
@@ -1 +1,3 @@
+hostprogs := fixdep
+
 fixdep-y := fixdep.o
index 653faee2a0556a515a42eabeb0be9b9009267d31..8332959fbca4fb5b9a6c4f89b5ef479133ca9b43 100644 (file)
@@ -42,7 +42,7 @@ $(OUTPUT)fixdep-in.o: FORCE
        $(Q)$(MAKE) $(build)=fixdep
 
 $(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o
-       $(QUIET_LINK)$(CC) $(LDFLAGS) -o $@ $<
+       $(QUIET_LINK)$(HOSTCC) $(LDFLAGS) -o $@ $<
 
 FORCE:
 
index be630bed66d2af1407eeaaca5089290bbf989392..ad22e4e7bc593960dcd2eab055b1658227b7bf56 100644 (file)
@@ -1,10 +1,6 @@
 build := -f $(srctree)/tools/build/Makefile.build dir=. obj
 
-ifdef CROSS_COMPILE
-fixdep:
-else
 fixdep:
        $(Q)$(MAKE) -C $(srctree)/tools/build CFLAGS= LDFLAGS= $(OUTPUT)fixdep
-endif
 
 .PHONY: fixdep