UPSTREAM: buildgcc: Warn when building GCC with a different major version
GCC build instruction recommend to bootstrap a native compiler first. Not sure, when that is really necessary. A major version change seems reasonable. BUG=None BRANCH=None TEST=None Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/16675 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Change-Id: I80a9ec25739b7d33a1d1c7b4b2140d19d89a99ae Reviewed-on: https://chromium-review.googlesource.com/388327 Commit-Ready: Furquan Shaikh <furquan@chromium.org> Tested-by: Furquan Shaikh <furquan@chromium.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
This commit is contained in:
parent
5a8c005d2b
commit
e7ce8848ce
1 changed files with 13 additions and 1 deletions
|
|
@ -225,6 +225,16 @@ hostcc_version() {
|
|||
printf "%d.%d" "$(hostcc_major)" "$(hostcc_minor)"
|
||||
}
|
||||
|
||||
check_cc() {
|
||||
if is_package_enabled "GCC"; then
|
||||
if [ "$(hostcc_major)" != "$(buildcc_major)" -a "${BOOTSTRAP}" != "1" ]; then
|
||||
printf "\n${red}warning: Building GCC $(buildcc_version) with a different major "
|
||||
printf "version ($(hostcc_version)).\n"
|
||||
printf " Bootstrapping (-b) is recommended.${NC}\n\n"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
check_sum() {
|
||||
test -z "$CHECKSUM" || \
|
||||
test "$(cat sum/$1.cksum 2>/dev/null | sed -e 's@.*\([0-9a-f]\{40,\}\).*@\1@')" = \
|
||||
|
|
@ -836,6 +846,9 @@ searchtool bzip2 "bzip2," > /dev/null
|
|||
|
||||
check_for_library "-lz" "zlib (zlib1g-dev or zlib-devel)"
|
||||
|
||||
CC=cc
|
||||
check_cc
|
||||
|
||||
if [ "$HALT_FOR_TOOLS" -ne 0 ]; then
|
||||
exit 1
|
||||
fi
|
||||
|
|
@ -848,7 +861,6 @@ fi
|
|||
|
||||
# Set up host compiler and flags needed for various OSes
|
||||
|
||||
CC=cc
|
||||
if is_package_enabled "GCC"; then
|
||||
if [ $UNAME = "Darwin" ]; then
|
||||
#GCC_OPTIONS="$GCC_OPTIONS --enable-threads=posix"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue