summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorNico Huber <nico.h@gmx.de>2016-12-04 02:45:58 +0100
committerNico Huber <nico.h@gmx.de>2016-12-06 23:56:38 +0100
commit26267a7a41312c3160604766d17f361dc80c2a52 (patch)
tree502e0751c70c2e6a19e82c14441c9f8e58262120 /util
parentaa89fb4618987e5c5034f2370381168853cc7308 (diff)
downloadcoreboot-26267a7a41312c3160604766d17f361dc80c2a52.tar.xz
buildgcc: Be less restrictive when trying to build GNAT
It turned out that newer GNAT versions can build our current (5.3.0) GNAT without bootstrapping. So adapt the version enforcement. Change-Id: Ie7189e8bcadeee56cf5c2172e8c0ae7cd534685a Signed-off-by: Nico Huber <nico.h@gmx.de> Reviewed-on: https://review.coreboot.org/17706 Tested-by: build bot (Jenkins) Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util')
-rwxr-xr-xutil/crossgcc/buildgcc13
1 files changed, 11 insertions, 2 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index d64b687dd9..97c38b8d95 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -211,6 +211,10 @@ buildcc_major() {
echo "${GCC_VERSION}" | cut -d. -f1
}
+buildcc_minor() {
+ echo "${GCC_VERSION}" | cut -d. -f2
+}
+
buildcc_version() {
echo "${GCC_VERSION}" | cut -d. -f1-2
}
@@ -237,9 +241,14 @@ ada_requested() {
check_gnat() {
if hostcc_has_gnat1; then
- if [ "$(hostcc_version)" != "$(buildcc_version)" -a "${BOOTSTRAP}" != "1" ]; then
+ if [ \( "$(hostcc_major)" -lt "$(buildcc_major)" -o \
+ \( "$(hostcc_major)" -eq "$(buildcc_major)" -a \
+ "$(hostcc_minor)" -lt "$(buildcc_minor)" \) \) \
+ -a \
+ "${BOOTSTRAP}" != "1" ]; \
+ then
printf "\n${RED}ERROR:${red} Building the Ada compiler (gnat $(buildcc_version)) "
- printf "with a different host compiler\n version ($(hostcc_version)) "
+ printf "with an older host compiler\n version ($(hostcc_version)) "
printf "requires bootstrapping (-b).${NC}\n\n"
HALT_FOR_TOOLS=1
fi