From 9ff4029db9b1053b44e4fc487243017a099a49c5 Mon Sep 17 00:00:00 2001 From: Raul E Rangel Date: Wed, 28 Aug 2019 11:33:27 -0600 Subject: util/abuild: Have abuild generate the .xcompile if it doesn't exist Previously if .xcompile was missing, abuild would silently ignore the error. With https://review.coreboot.org/c/coreboot/+/34241 we now check the return code so abuild started failing. We should generate the .xcompile if it doesn't exist. The Makefile will handle that so we include it as the first Makefile. We then need to override the default target so we don't use the one from the Makefile. BUG=b:112267918 TEST=ran abuild and made sure it generated a .xcompile in the root. Change-Id: I79ded36d47b0219d0b126adff80a57be1c2bdf07 Signed-off-by: Raul E Rangel Reviewed-on: https://review.coreboot.org/c/coreboot/+/35137 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- util/abuild/abuild | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'util/abuild') diff --git a/util/abuild/abuild b/util/abuild/abuild index 4a62cfa045..23b22aaa9b 100755 --- a/util/abuild/abuild +++ b/util/abuild/abuild @@ -471,13 +471,14 @@ function build_config required_arches=$(grep -E "^CONFIG_ARCH_(BOOTBLOCK|R.MSTAGE|VERSTAGE)" "$TARGET/${BUILD_NAME}/config.build" | \ sed "s,^CONFIG_ARCH_[^_]*_\([^=]*\)=.*$,\1," |sort -u |tr 'A-Z\n\r' 'a-z ') - missing_arches="$($MAKE --no-print-directory -f - \ - REQUIRED_ARCHES="$required_arches" <<'EOF' + missing_arches="$($MAKE --no-print-directory -f Makefile -f - \ + REQUIRED_ARCHES="$required_arches" obj="${build_dir}" <<'EOF' include .xcompile .PHONY: missing_arches missing_arches: $(if $(XCOMPILE_COMPLETE),,$(error .xcompile is invalid.)) @echo $(foreach arch,$(REQUIRED_ARCHES),$(if $(filter $(arch),$(SUBARCH_SUPPORTED)),,$(arch))) +.DEFAULT_GOAL := missing_arches EOF )" # shellcheck disable=SC2181 -- cgit v1.2.3