From 30b604429604dbded12fd4d2a52666b8020527c6 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Wed, 15 May 2013 11:01:04 +0000 Subject: Add fortran to the list of languages built It's surprisingly difficult to build gfortran separately, it will always have to rebuild C and supporting tools. Symlinks for the different fortran dialects are provided, though it's possible to build with just gfortran, and maybe gcc, some makefiles use the alternative names. Providing the symlinks reduces friction with upstream. --- gcc.morph | 5 +++-- gcc.morph.yaml | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/gcc.morph b/gcc.morph index 50307b40eb..dddcdca01f 100644 --- a/gcc.morph +++ b/gcc.morph @@ -3,13 +3,14 @@ "kind": "chunk", "configure-commands": [ "mkdir o", - "cd o && \\\n../configure \\\n $(../morph-arch-config) \\\n --prefix=\"$PREFIX\" \\\n `# [1]` --libdir=$PREFIX/lib \\\n --disable-nls \\\n --enable-languages=c,c++ --enable-shared --enable-threads=posix \\\n `# [2]` --disable-multilib \\\n `# [3]` --disable-libgomp --without-cloog --without-ppl \\\n `# [4]` --enable-__cxa_atexit \\\n `# [5]` --with-mpfr-include=\"$(pwd)/../mpfr/src\" \\\n --with-mpfr-lib=\"$(pwd)/mpfr/src/.libs\" \\\n `# [6]` --with-system-zlib\n" + "cd o && \\\n../configure \\\n $(../morph-arch-config) \\\n --prefix=\"$PREFIX\" \\\n `# [1]` --libdir=$PREFIX/lib \\\n --disable-nls \\\n --enable-languages=c,c++,fortran \\\n --enable-shared --enable-threads=posix \\\n `# [2]` --disable-multilib \\\n `# [3]` --disable-libgomp --without-cloog --without-ppl \\\n `# [4]` --enable-__cxa_atexit \\\n `# [5]` --with-mpfr-include=\"$(pwd)/../mpfr/src\" \\\n --with-mpfr-lib=\"$(pwd)/mpfr/src/.libs\" \\\n `# [6]` --with-system-zlib\n" ], "build-commands": [ "cd o && make" ], "install-commands": [ "cd o && make DESTDIR=\"$DESTDIR\" install", - "ln -s gcc \"$DESTDIR/$PREFIX/bin/cc\"" + "ln -s gcc \"$DESTDIR/$PREFIX/bin/cc\"", + "for fortran_alias in f77 f90 f95; do\n ln -s gfortran \"$DESTDIR/$PREFIX/bin/$fortran_alias\"\ndone\n" ] } diff --git a/gcc.morph.yaml b/gcc.morph.yaml index 93036a19af..498a60bb55 100644 --- a/gcc.morph.yaml +++ b/gcc.morph.yaml @@ -21,7 +21,8 @@ configure-commands: --prefix="$PREFIX" \ `# [1]` --libdir=$PREFIX/lib \ --disable-nls \ - --enable-languages=c,c++ --enable-shared --enable-threads=posix \ + --enable-languages=c,c++,fortran \ + --enable-shared --enable-threads=posix \ `# [2]` --disable-multilib \ `# [3]` --disable-libgomp --without-cloog --without-ppl \ `# [4]` --enable-__cxa_atexit \ @@ -35,3 +36,7 @@ build-commands: install-commands: - cd o && make DESTDIR="$DESTDIR" install - ln -s gcc "$DESTDIR/$PREFIX/bin/cc" + - > + for fortran_alias in f77 f90 f95; do + ln -s gfortran "$DESTDIR/$PREFIX/bin/$fortran_alias" + done -- cgit v1.2.1