buildgcc: Relax GNAT version checks

Compiling the GNAT frontend of GCC seems to have stabilized since GCC
4.9.0. So build it by default if GNAT >= 4.9 is installed.

TEST=Bootstrapped all GCC versions from 4.9.0 to 6.2 and built the
     i386 cross toolchain with each.

Change-Id: I9d1127595dc6b9bcece9c5e5cc7e45f467744ab9
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/18777
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Philippe Mathieu-Daudé <philippe.mathieu.daude@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
This commit is contained in:
Nico Huber 2017-03-12 23:12:49 +01:00 committed by Patrick Georgi
parent cdf79e6a8d
commit d5829e9bdb
1 changed files with 7 additions and 7 deletions

View File

@ -241,14 +241,12 @@ ada_requested() {
check_gnat() { check_gnat() {
if hostcc_has_gnat1; then if hostcc_has_gnat1; then
if [ \( "$(hostcc_major)" -lt "$(buildcc_major)" -o \ if [ \( "$(hostcc_major)" -lt 4 -o \
\( "$(hostcc_major)" -eq "$(buildcc_major)" -a \ \( "$(hostcc_major)" -eq 4 -a "$(hostcc_minor)" -lt 9 \) \) -a \
"$(hostcc_minor)" -lt "$(buildcc_minor)" \) \) \ "${BOOTSTRAP}" != "1" ];
-a \
"${BOOTSTRAP}" != "1" ]; \
then then
printf "\n${RED}ERROR:${red} Building the Ada compiler (gnat $(buildcc_version)) " printf "\n${RED}ERROR:${red} Building the Ada compiler (gnat $(buildcc_version)) "
printf "with an older host compiler\n version ($(hostcc_version)) " printf "with a host compiler older\n than 4.9.x (yours $(hostcc_version)) "
printf "requires bootstrapping (-b).${NC}\n\n" printf "requires bootstrapping (-b).${NC}\n\n"
HALT_FOR_TOOLS=1 HALT_FOR_TOOLS=1
fi fi
@ -953,7 +951,9 @@ elif [ $UNAME = "NetBSD" ]; then
fi fi
if [ -z "${LANGUAGES}" ]; then if [ -z "${LANGUAGES}" ]; then
if hostcc_has_gnat1 && \ if hostcc_has_gnat1 && \
[ "$(hostcc_version)" = "$(buildcc_version)" -o "${BOOTSTRAP}" = "1" ]; [ "$(hostcc_major)" -ge 5 -o \
\( "$(hostcc_major)" -eq 4 -a "$(hostcc_minor)" -ge 9 \) -o \
"${BOOTSTRAP}" = "1" ];
then then
printf "\nFound compatible Ada compiler, enabling Ada support by default.\n\n" printf "\nFound compatible Ada compiler, enabling Ada support by default.\n\n"
LANGUAGES="ada,${DEFAULT_LANGUAGES}" LANGUAGES="ada,${DEFAULT_LANGUAGES}"