mirror of
https://github.com/torvalds/linux.git
synced 2024-11-11 06:31:49 +00:00
6b3db6f9b9
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>
50 lines
988 B
Makefile
50 lines
988 B
Makefile
ifeq ($(srctree),)
|
|
srctree := $(patsubst %/,%,$(dir $(shell pwd)))
|
|
srctree := $(patsubst %/,%,$(dir $(srctree)))
|
|
endif
|
|
|
|
include $(srctree)/tools//scripts/Makefile.include
|
|
|
|
define allow-override
|
|
$(if $(or $(findstring environment,$(origin $(1))),\
|
|
$(findstring command line,$(origin $(1)))),,\
|
|
$(eval $(1) = $(2)))
|
|
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
|
|
Q = @
|
|
endif
|
|
|
|
export Q srctree CC LD
|
|
|
|
MAKEFLAGS := --no-print-directory
|
|
build := -f $(srctree)/tools/build/Makefile.build dir=. obj
|
|
|
|
all: $(OUTPUT)fixdep
|
|
|
|
clean:
|
|
$(call QUIET_CLEAN, fixdep)
|
|
$(Q)find . -name '*.o' -delete -o -name '\.*.cmd' -delete -o -name '\.*.d' -delete
|
|
$(Q)rm -f fixdep
|
|
|
|
$(OUTPUT)fixdep-in.o: FORCE
|
|
$(Q)$(MAKE) $(build)=fixdep
|
|
|
|
$(OUTPUT)fixdep: $(OUTPUT)fixdep-in.o
|
|
$(QUIET_LINK)$(HOSTCC) $(LDFLAGS) -o $@ $<
|
|
|
|
FORCE:
|
|
|
|
.PHONY: FORCE
|