summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile.inc2
-rwxr-xr-xutil/genbuild_h/genbuild_h.sh9
2 files changed, 9 insertions, 2 deletions
diff --git a/Makefile.inc b/Makefile.inc
index e5603388dd..3c3088d5ff 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -497,7 +497,7 @@ build_h_exports := BUILD_TIMELESS KERNELVERSION COREBOOT_EXTRA_VERSION
# Report new `build.ht` as dependency if `build.h` differs.
build_h_check := \
export $(foreach exp,$(build_h_exports),$(exp)="$($(exp))"); \
- util/genbuild_h/genbuild_h.sh >$(build_h)t 2>/dev/null; \
+ util/genbuild_h/genbuild_h.sh .xcompile >$(build_h)t 2>/dev/null; \
cmp -s $(build_h)t $(build_h) >/dev/null 2>&1 || echo $(build_h)t
$(build_h): $$(shell $$(build_h_check))
diff --git a/util/genbuild_h/genbuild_h.sh b/util/genbuild_h/genbuild_h.sh
index c264b74635..8da68ba445 100755
--- a/util/genbuild_h/genbuild_h.sh
+++ b/util/genbuild_h/genbuild_h.sh
@@ -22,6 +22,13 @@ export LANG=C
export LC_ALL=C
export TZ=UTC0
+XCOMPILE=$1
+
+if [ -z "$XCOMPILE" ] || [ "$1" = "--help" ]; then
+ echo "usage: $0 <xcompile>" >&2
+ exit 1
+fi
+
# $1: format string
get_git_head_data() {
LANG= git log --no-show-signature -1 --format="format:$1" 2>/dev/null || \
@@ -53,7 +60,7 @@ esac
}
IASL=util/crossgcc/xgcc/bin/iasl
-eval $(grep ^IASL:= .xcompile 2>/dev/null | sed s,:=,=,)
+eval $(grep ^IASL:= "$XCOMPILE" 2>/dev/null | sed s,:=,=,)
#Print out the information that goes into build.h
printf "/* build system definitions (autogenerated) */\n"