Patrick Georgi has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43144 )
Change subject: util/xcompile: Look for the host compiler in XGCCPATH, too (and first) ......................................................................
util/xcompile: Look for the host compiler in XGCCPATH, too (and first)
If there's a host compiler in XGCCPATH, it's likely the same relatively-current version we use for coreboot, and it's a well-known quantity, so let's prefer that over alternatives by default.
Change-Id: If50341df169a476899b5a5ffd4c4fb6d21c3f4ac Signed-off-by: Patrick Georgi pgeorgi@google.com --- M util/xcompile/xcompile 1 file changed, 3 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/43144/1
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 6629546..388f878 100755 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -56,7 +56,9 @@ IASL=iasl fi
-if program_exists gcc; then +if program_exists "${XGCCPATH}/gcc"; then + HOSTCC="${XGCCPATH}/gcc" +elif program_exists gcc; then HOSTCC=gcc elif program_exists cc; then HOSTCC=cc
Hello build bot (Jenkins), Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43144
to look at the new patch set (#3).
Change subject: util/xcompile: Look for the host compiler in XGCCPATH, too (and first) ......................................................................
util/xcompile: Look for the host compiler in XGCCPATH, too (and first)
If there's a host compiler in XGCCPATH, it's likely the same relatively-current version we use for coreboot, and it's a well-known quantity, so let's prefer that over alternatives by default.
In addition, look for the C++ host compiler as well.
Change-Id: If50341df169a476899b5a5ffd4c4fb6d21c3f4ac Signed-off-by: Patrick Georgi pgeorgi@google.com --- M util/xcompile/xcompile 1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/43144/3
Hello build bot (Jenkins), Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43144
to look at the new patch set (#4).
Change subject: util/xcompile: Look for the host compiler in XGCCPATH, too (and first) ......................................................................
util/xcompile: Look for the host compiler in XGCCPATH, too (and first)
If there's a host compiler in XGCCPATH, it's likely the same relatively-current version we use for coreboot, and it's a well-known quantity, so let's prefer that over alternatives by default.
In addition, look for the C++ host compiler as well.
Change-Id: If50341df169a476899b5a5ffd4c4fb6d21c3f4ac Signed-off-by: Patrick Georgi pgeorgi@google.com --- M util/xcompile/xcompile 1 file changed, 14 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/43144/4
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43144 )
Change subject: util/xcompile: Look for the host compiler in XGCCPATH, too (and first) ......................................................................
Patch Set 5:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43144/5/util/xcompile/xcompile File util/xcompile/xcompile:
https://review.coreboot.org/c/coreboot/+/43144/5/util/xcompile/xcompile@76 PS5, Line 76: die "no host C++ compiler found" Do we always need one?
Hello build bot (Jenkins), Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43144
to look at the new patch set (#6).
Change subject: util/xcompile: Look for the host compiler in XGCCPATH, too (and first) ......................................................................
util/xcompile: Look for the host compiler in XGCCPATH, too (and first)
If there's a host compiler in XGCCPATH, it's likely the same relatively-current version we use for coreboot, and it's a well-known quantity, so let's prefer that over alternatives by default.
In addition, look for the C++ host compiler as well.
Change-Id: If50341df169a476899b5a5ffd4c4fb6d21c3f4ac Signed-off-by: Patrick Georgi pgeorgi@google.com --- M util/xcompile/xcompile 1 file changed, 18 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/44/43144/6
Patrick Georgi has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43144 )
Change subject: util/xcompile: Look for the host compiler in XGCCPATH, too (and first) ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/43144/5/util/xcompile/xcompile File util/xcompile/xcompile:
https://review.coreboot.org/c/coreboot/+/43144/5/util/xcompile/xcompile@76 PS5, Line 76: die "no host C++ compiler found"
Do we always need one?
We needed it in the past for cbfstool's lzma (until Stefan ripped the c++ code out in CB:3010), so I guess that's where the always-present HOSTCXX in our build system came from.
Right now it's only needed for kconfig's Qt frontend. Given that limited remaining scope, I made HOSTCXX optional (but failing at runtime if it's used with no c++ compiler to be found.)
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43144 )
Change subject: util/xcompile: Look for the host compiler in XGCCPATH, too (and first) ......................................................................
Patch Set 6: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/43144 )
Change subject: util/xcompile: Look for the host compiler in XGCCPATH, too (and first) ......................................................................
util/xcompile: Look for the host compiler in XGCCPATH, too (and first)
If there's a host compiler in XGCCPATH, it's likely the same relatively-current version we use for coreboot, and it's a well-known quantity, so let's prefer that over alternatives by default.
In addition, look for the C++ host compiler as well.
Change-Id: If50341df169a476899b5a5ffd4c4fb6d21c3f4ac Signed-off-by: Patrick Georgi pgeorgi@google.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/43144 Reviewed-by: Nico Huber nico.h@gmx.de Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M util/xcompile/xcompile 1 file changed, 18 insertions(+), 1 deletion(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/util/xcompile/xcompile b/util/xcompile/xcompile index 6629546..c237423 100755 --- a/util/xcompile/xcompile +++ b/util/xcompile/xcompile @@ -56,7 +56,9 @@ IASL=iasl fi
-if program_exists gcc; then +if program_exists "${XGCCPATH}/gcc"; then + HOSTCC="${XGCCPATH}/gcc" +elif program_exists gcc; then HOSTCC=gcc elif program_exists cc; then HOSTCC=cc @@ -64,6 +66,20 @@ die "no host compiler found" fi
+# Look for a C++ compiler (for kconfig's qconf), but don't fail if there is +# none, just set the compiler to false(1) which will break early enough if +# used while being less confusing than errors about "g not found" when +# "$HOSTCXX -g" evaluates to "-g" and make drops the leading dash. +if program_exists "${XGCCPATH}/g++"; then + HOSTCXX="${XGCCPATH}/g++" +elif program_exists g++; then + HOSTCXX=g++ +elif program_exists c++; then + HOSTCXX=c++ +else + HOSTCXX=false +fi + # try to find the core count using various methods CORES="$(getconf _NPROCESSORS_ONLN 2>/dev/null)" if [ -z "$CORES" ]; then @@ -87,6 +103,7 @@ XGCCPATH:=${XGCCPATH} IASL:=${IASL} HOSTCC?=${HOSTCC} +HOSTCXX?=${HOSTCXX} CPUS?=${CORES}
EOF