From f53dbfaa8c20cd789afc7e54ff004d068095223c Mon Sep 17 00:00:00 2001 From: Stefan Reinauer Date: Thu, 9 Jul 2015 00:26:49 +0200 Subject: libpayload: Use top level xcompile Instead of having a second copy that already within 2-3 days becamer quite outdated, use the same xcompile copy for coreboot and libpayload, as we do with Kconfig already. This requires a simple change to the top level xcompile to understand both CONFIG_COMPILER_GCC and CONFIG_LP_COMPILER_GCC (only one of them will occur at the same time) libpayload's .xcompile target was moved later so that it can make use of $(top) Change-Id: I44001067f551cd0776dd303cbaeaa40eb3d5c1db Signed-off-by: Stefan Reinauer Reviewed-on: http://review.coreboot.org/10863 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi --- payloads/libpayload/Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'payloads/libpayload/Makefile') diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile index 2b9bbcbe17..f3544d413a 100644 --- a/payloads/libpayload/Makefile +++ b/payloads/libpayload/Makefile @@ -34,20 +34,6 @@ ifeq ($(INNER_SCANBUILD),y) CC_real:=$(CC) endif -# in addition to the dependency below, create the file if it doesn't exist -# to silence stupid warnings about a file that would be generated anyway. -$(if $(wildcard .xcompile),,$(eval $(shell util/xcompile/xcompile $(XGCCPATH) > .xcompile))) - -.xcompile: util/xcompile/xcompile - $< $(XGCCPATH) > $@.tmp - \mv -f $@.tmp $@ 2> /dev/null - -ifeq ($(INNER_SCANBUILD),y) -CC:=$(CC_real) -HOSTCC:=$(CC_real) --hostcc -HOSTCXX:=$(CC_real) --hostcxx -endif - export top := $(CURDIR) export src := src export srck := $(abspath $(top)/../../util/kconfig) @@ -95,6 +81,20 @@ DOXYGEN_OUTPUT_DIR := doxygen all: real-all +# in addition to the dependency below, create the file if it doesn't exist +# to silence stupid warnings about a file that would be generated anyway. +$(if $(wildcard .xcompile),,$(eval $(shell $(top)/../../util/xcompile/xcompile $(XGCCPATH) > .xcompile))) + +.xcompile: $(top)/../../util/xcompile/xcompile + $< $(XGCCPATH) > $@.tmp + \mv -f $@.tmp $@ 2> /dev/null + +ifeq ($(INNER_SCANBUILD),y) +CC:=$(CC_real) +HOSTCC:=$(CC_real) --hostcc +HOSTCXX:=$(CC_real) --hostcxx +endif + # This include must come _before_ the pattern rules below! # Order _does_ matter for pattern rules. include $(srck)/Makefile -- cgit v1.2.3