From 06c8060aae18457c3ad7166565b250ec370e37e9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20P=C3=B6chtrager?= Date: Wed, 1 Oct 2014 19:53:41 +0200 Subject: [PATCH] rudimentary fortran support --- README.md | 4 +++- build_gcc.sh | 14 +++++++++++--- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7fc0d02..cef7123 100755 --- a/README.md +++ b/README.md @@ -40,7 +40,9 @@ That's it. See usage examples below. ##### Building GCC: ##### -If you want to build GCC as well, then you can do this by running `./build_gcc.sh`. +If you want to build GCC as well, then you can do this by running: +`[GCC_VERSION=4.9.1] [ENABLE_FORTRAN=1] ./build_gcc.sh`. + But before you do this, make sure you have got the GCC build depedencies installed on your system. On debian like systems you can run: diff --git a/build_gcc.sh b/build_gcc.sh index bc4450b..8358f10 100755 --- a/build_gcc.sh +++ b/build_gcc.sh @@ -12,8 +12,10 @@ source tools/tools.sh # GCC version to build # (<4.7 will not work properly with libc++) -GCC_VERSION=4.9.1 -#GCC_VERSION=4.9-20140416 # snapshot +if [ -z "$GCC_VERSION" ]; then + GCC_VERSION=4.9.1 + #GCC_VERSION=5-20140928 # snapshot +fi # GCC mirror GCC_MIRROR="ftp://ftp.fu-berlin.de/unix/languages/gcc" @@ -70,11 +72,17 @@ if [ "$PLATFORM" != "Darwin" ]; then EXTRACONFFLAGS+="--with-as=$OSXCROSS_TARGET_DIR/bin/x86_64-apple-$OSXCROSS_TARGET-as " fi +LANGS="c,c++,objc,obj-c++" + +if [ -n "$ENABLE_FORTRAN" ]; then + LANGS+=",fortran" +fi + ../configure \ --target=x86_64-apple-$OSXCROSS_TARGET \ --with-sysroot=$OSXCROSS_SDK \ --disable-nls \ - --enable-languages=c,c++,objc,obj-c++ \ + --enable-languages=$LANGS \ --without-headers \ --enable-multilib \ --with-multilib-list=m32,m64 \