summaryrefslogtreecommitdiffstats
path: root/util/crossgcc
diff options
context:
space:
mode:
authorNico Huber <nico.huber@secunet.com>2015-09-08 12:38:57 +0200
committerNico Huber <nico.h@gmx.de>2015-09-10 09:17:08 +0000
commit135ca51314a437cbb50bafb8ed24b48b2d7c5127 (patch)
tree7121688f6a41ad03ec69cdd5cc4b4f30797db2dc /util/crossgcc
parentbb313bf2219da1c483b2205f301b95db06eac760 (diff)
downloadcoreboot-135ca51314a437cbb50bafb8ed24b48b2d7c5127.tar.gz
coreboot-135ca51314a437cbb50bafb8ed24b48b2d7c5127.tar.bz2
coreboot-135ca51314a437cbb50bafb8ed24b48b2d7c5127.zip
crossgcc: Preparations for building Ada frontend
As with most other languages, a pre-installed Ada toolchain is needed to build gcc's Ada frontend. To support building with older host tool- chains, the patch `gcc-5.2.0_gnat.patch` disables warnings for unknown pragmas. Building has been tested with host gcc-4.9 and hopefully works with newer versions, too. For convenience, the gnattools (e.g. gnatmake etc.) will be build if 'ada' is specified as a target language. Change-Id: Ia78c29d1aba2943de5238421a324cfff8eb08875 Signed-off-by: Nico Huber <nico.huber@secunet.com> Reviewed-on: http://review.coreboot.org/11590 Tested-by: build bot (Jenkins) Reviewed-by: Patrick Georgi <pgeorgi@google.com> Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'util/crossgcc')
-rwxr-xr-xutil/crossgcc/buildgcc5
-rw-r--r--util/crossgcc/patches/gcc-5.2.0_gnat.patch11
2 files changed, 16 insertions, 0 deletions
diff --git a/util/crossgcc/buildgcc b/util/crossgcc/buildgcc
index 049ace40b39b..4bd89a26b658 100755
--- a/util/crossgcc/buildgcc
+++ b/util/crossgcc/buildgcc
@@ -425,6 +425,11 @@ build_GCC() {
--with-pkgversion="coreboot toolchain v$CROSSGCC_VERSION $CROSSGCC_DATE" \
|| touch .failed
$MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" all-gcc || touch .failed
+
+ if [ "$(echo ${LANGUAGES} | grep -c '\<ada\>')" -gt 0 ]; then
+ $MAKE $JOBS CFLAGS_FOR_BUILD="$HOSTCFLAGS" -Cgcc/ cross-gnattools || touch .failed
+ fi
+
$MAKE install-gcc DESTDIR=$DESTDIR || touch .failed
if [ "$(echo $TARGETARCH | grep -c -- -mingw32)" -eq 0 ]; then
diff --git a/util/crossgcc/patches/gcc-5.2.0_gnat.patch b/util/crossgcc/patches/gcc-5.2.0_gnat.patch
new file mode 100644
index 000000000000..1e0a5bbbfffd
--- /dev/null
+++ b/util/crossgcc/patches/gcc-5.2.0_gnat.patch
@@ -0,0 +1,11 @@
+--- gcc-5.2.0/gcc/ada/gcc-interface/Make-lang.in.bak 2015-08-24 16:23:25.004493665 +0200
++++ gcc-5.2.0/gcc/ada/gcc-interface/Make-lang.in 2015-08-24 17:53:52.496636113 +0200
+@@ -45,7 +45,7 @@
+
+
+ # Extra flags to pass to recursive makes.
+-COMMON_ADAFLAGS= -gnatpg
++COMMON_ADAFLAGS= -gnatpg -gnatwG
+ ifeq ($(TREECHECKING),)
+ CHECKING_ADAFLAGS=
+ else