aboutsummaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2017-07-10 11:48:34 +0200
committerPatrick Georgi <pgeorgi@google.com>2017-07-11 06:08:16 +0000
commit8f2cdad882ba8859f297826a851a7e08564104b4 (patch)
tree2e1d9152a3b26cd1f2f0a1726df2bad0d623e7e0 /util
parent5d09d48050db8cd25d49a52141cd8b956f36e6f7 (diff)
crossgcc: Prefer gnatgcc over gcc if available
For distros that package and version gnat independently from gcc (such as Ubuntu), try to build with gnatgcc first. This fixes the issue of gcc -print-prog-name=gnat1 failing because gcc is of a different version. Change-Id: Icec6d1fba8855e88ac91d47842dcb7f6b9d35461 Signed-off-by: Patrick Georgi <pgeorgi@google.com> Reviewed-on: https://review.coreboot.org/20517 Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Diffstat (limited to 'util')
-rwxr-xr-xutil/crossgcc/buildgcc4
1 files changed, 3 insertions, 1 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index d00941762d..0f4dd7a9a6 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -982,7 +982,9 @@ if [ -n "$CC" ]; then
HALT_FOR_TOOLS=1
fi
else
- if searchtool gcc "Free Software Foundation" nofail > /dev/null; then
+ if searchtool gnatgcc "Free Software Foundation" nofail > /dev/null; then
+ CC=gnatgcc
+ elif searchtool gcc "Free Software Foundation" nofail > /dev/null; then
CC=gcc
else
searchtool cc '^' nofail > /dev/null || please_install gcc