summaryrefslogtreecommitdiff
path: root/payloads
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@chromium.org>2017-01-25 14:21:12 +0100
committerPatrick Georgi <pgeorgi@google.com>2017-01-25 17:58:48 +0100
commitb144a34c6031ef988d32946129920672d29d38a9 (patch)
tree6da88b660f154dd14b9375dc83cf929c31190dd5 /payloads
parent84361b1d37238ea03c4dd41ba54d6a74d52bd5c4 (diff)
downloadcoreboot-b144a34c6031ef988d32946129920672d29d38a9.tar.xz
libpayload: fix build
When .xcompile doesn't already exist, building libpayload fails because the CC variable (et al) remain empty since .xcompile is only included after the variables coming from there are evaluated. Change-Id: I73f1cbced95afcff15839604fea5fd05d81bc3d3 Signed-off-by: Patrick Georgi <pgeorgi@chromium.org> Reviewed-on: https://review.coreboot.org/18228 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'payloads')
-rw-r--r--payloads/libpayload/Makefile28
1 files changed, 14 insertions, 14 deletions
diff --git a/payloads/libpayload/Makefile b/payloads/libpayload/Makefile
index 34df485f30..429bf05021 100644
--- a/payloads/libpayload/Makefile
+++ b/payloads/libpayload/Makefile
@@ -107,18 +107,6 @@ ARCH-$(CONFIG_LP_ARCH_ARM64) := arm64
ARCH-$(CONFIG_LP_ARCH_X86) := x86_32
ARCH-$(CONFIG_LP_ARCH_MIPS) := mips
-CC := $(CC_$(ARCH-y))
-AS := $(AS_$(ARCH-y))
-LD := $(LD_$(ARCH-y))
-NM := $(NM_$(ARCH-y))
-OBJCOPY := $(OBJCOPY_$(ARCH-y))
-OBJDUMP := $(OBJDUMP_$(ARCH-y))
-READELF := $(READELF_$(ARCH-y))
-STRIP := $(STRIP_$(ARCH-y))
-AR := $(AR_$(ARCH-y))
-
-CFLAGS += $(CFLAGS_$(ARCH-y))
-
# Three cases where we don't need fully populated $(obj) lists:
# 1. when no .config exists
# 2. when make config (in any flavour) is run
@@ -149,6 +137,18 @@ $(if $(wildcard .xcompile)$(NOCOMPILE),,$(eval $(shell $(top)/../../util/xcompil
-include .xcompile
+CC := $(CC_$(ARCH-y))
+AS := $(AS_$(ARCH-y))
+LD := $(LD_$(ARCH-y))
+NM := $(NM_$(ARCH-y))
+OBJCOPY := $(OBJCOPY_$(ARCH-y))
+OBJDUMP := $(OBJDUMP_$(ARCH-y))
+READELF := $(READELF_$(ARCH-y))
+STRIP := $(STRIP_$(ARCH-y))
+AR := $(AR_$(ARCH-y))
+
+CFLAGS += $(CFLAGS_$(ARCH-y))
+
ifneq ($(INNER_SCANBUILD),y)
ifeq ($(CONFIG_LP_COMPILER_LLVM_CLANG),y)
CC:=clang -m32
@@ -304,12 +304,12 @@ clean-for-update: doxygen-clean clean-for-update-target
clean: clean-for-update clean-target
rm -f .ccwrap junit_config junit_config.old
+ rm -rf $(obj)
clean-cscope:
rm -f cscope.out
-distclean: clean-cscope
- rm -rf $(obj)
+distclean: clean-cscope clean
rm -f .config .config.old ..config.tmp .kconfig.d .tmpconfig* .ccwrap .xcompile junit.xml
.PHONY: $(PHONY) clean clean-cscope cscope distclean doxygen doxy