summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2020-07-06 16:35:56 +0200
committerPatrick Georgi <pgeorgi@google.com>2020-07-07 14:45:40 +0000
commitf2741aa632f900cccede42148671ac76165a7eea (patch)
tree6ba4669d89ea98c93e5043038449ffd3b68c63e1 /util
parentb087a940a27f00d2ae7434b2ccf9a876d5f3b046 (diff)
downloadcoreboot-f2741aa632f900cccede42148671ac76165a7eea.tar.xz
util/crossgcc: Always bootstrap for gcc < 4.9
Building cbfstool requires at least 4.9 due to optimizer bugs in gcc 3.x to 4.8.x, so let's not work around ancient compilers in our tree but ensure that users get a newer compiler. Closes: https://ticket.coreboot.org/issues/240 Change-Id: I4e0f80e2790514e6a1b5d5de1a373f365df1569c Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43143 Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/crossgcc/buildgcc38
1 files changed, 15 insertions, 23 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 17c89e82b2..dc59ce1ebc 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -1178,33 +1178,25 @@ if [ -z "${LANGUAGES}" ]; then
LANGUAGES="${DEFAULT_LANGUAGES}"
fi
fi
+if [ "$BOOTSTRAP" != 1 ] && \
+ { [ "$(hostcc_major)" -lt 4 ] || \
+ { [ "$(hostcc_major)" -eq 4 ] && \
+ [ "$(hostcc_minor)" -lt 9 ] ; } ; }
+then
+ printf "\n${red}WARNING${NC}\n"
+ printf "Building coreboot requires a host compiler newer than 4.9.x while\n"
+ printf "yours is $(hostcc_version).\n"
+ printf "Enabling bootstrapping to provide a sufficiently new compiler:\n"
+ printf "This will take significantly longer than a usual build.\n"
+ printf "Alternatively you can abort now and update your host compiler.\n"
+ timeout 15
+ BOOTSTRAP=1
+fi
if ada_requested; then
- if have_gnat; then
- if [ "$BOOTSTRAP" != 1 ] && \
- { [ "$(hostcc_major)" -lt 4 ] || \
- { [ "$(hostcc_major)" -eq 4 ] && \
- [ "$(hostcc_minor)" -lt 9 ] ; } ; }
- then
- printf "\n${red}WARNING${NC}\n"
- printf "Building the Ada compiler (GNAT $(buildcc_version)) with a host compiler older\n"
- printf "than 4.9.x (yours $(hostcc_version)) requires bootstrapping. This will take\n"
- printf "significantly longer than a usual build. You can abort and update\n"
- printf "your host GNAT or disable Ada support with BUILD_LANGUAGES=c (or\n"
- printf "\`-l c\` in case you invoke \`buildgcc\` directly).\n"
- timeout 15
- BOOTSTRAP=1
- fi
- else
+ if ! have_gnat; then
please_install gnat gcc-ada
exit 1
fi
-else
- if [ "$(hostcc_major)" -lt 4 ] && [ "$BOOTSTRAP" != 1 ]; then
- printf "\n${red}WARNING${NC}\n"
- printf "Building GCC $(buildcc_version) with a very old host compiler ($(hostcc_version)).\n"
- printf "Bootstrapping (-b) is recommended.\n"
- timeout 10
- fi
fi
fi # GCC