summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2016-09-20 13:09:29 +0200
committerNico Huber <nico.h@gmx.de>2016-09-21 22:10:30 +0200
commit66c2c1a2d4eed1aa4d3aad70b8790db5a4536beb (patch)
treed943c296167d147a22bbf2e2a2f88141758fa0df
parent04a1f6a3bce5d73ad7c43bced4683c0faffc368b (diff)
buildgcc: Build gnat by default if host compiler seems compatible
Change-Id: I2a13e188ddb0b7d64d3c0ec979a1a493bf160afc Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: https://review.coreboot.org/16678 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com>
-rwxr-xr-xutil/crossgcc/buildgcc15
1 files changed, 13 insertions, 2 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 74a6261764..4883754078 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -26,7 +26,8 @@ CROSSGCC_COMMIT=$( git describe )
PACKAGE=GCC
TARGETDIR=$(pwd)/xgcc
TARGETARCH=i386-elf
-LANGUAGES=c
+DEFAULT_LANGUAGES=c
+LANGUAGES=
DESTDIR=
SAVETEMPS=0
SKIPPYTHON=1
@@ -455,7 +456,7 @@ myhelp()
printf " [-p|--platform <platform>] target platform to build cross compiler for\n"
printf " (defaults to $TARGETARCH)\n"
printf " [-l|--languages <languages>] comma separated list of target languages\n"
- printf " (defaults to $LANGUAGES)\n"
+ printf " (defaults to $DEFAULT_LANGUAGES)\n"
printf "GDB specific options:\n"
printf " [-p|--platform <platform>] target platform to build cross compiler for\n"
printf " (defaults to $TARGETARCH)\n"
@@ -918,6 +919,16 @@ elif [ $UNAME = "NetBSD" ]; then
OPTIONS="ABI=32"
fi
fi
+if [ -z "${LANGUAGES}" ]; then
+ if hostcc_has_gnat1 && \
+ [ "$(hostcc_version)" = "$(buildcc_version)" -o "${BOOTSTRAP}" = "1" ];
+ then
+ printf "\nFound compatible Ada compiler, enabling Ada support by default.\n\n"
+ LANGUAGES="ada,${DEFAULT_LANGUAGES}"
+ else
+ LANGUAGES="${DEFAULT_LANGUAGES}"
+ fi
+fi
fi # GCC
export HOSTCFLAGS="-Os"