diff --git a/packages/gcc/10.2.0/build.sh b/packages/gcc/10.2.0/build.sh index 0f4be80..0ed183a 100755 --- a/packages/gcc/10.2.0/build.sh +++ b/packages/gcc/10.2.0/build.sh @@ -17,7 +17,7 @@ tar xzf gcc.tar.gz --strip-components=1 cd ../obj # === autoconf based === -../build/configure --prefix "$PREFIX" --enable-languages=c,c++,d --disable-multilib --disable-bootstrap +../build/configure --prefix "$PREFIX" --enable-languages=c,c++,d,fortran --disable-multilib --disable-bootstrap make -j$(nproc) make install -j$(nproc) diff --git a/packages/gcc/10.2.0/compile b/packages/gcc/10.2.0/compile index b381537..a77ba35 100644 --- a/packages/gcc/10.2.0/compile +++ b/packages/gcc/10.2.0/compile @@ -16,6 +16,10 @@ case "${PISTON_LANGUAGE}" in rename 's/.code$/\.d/' "$@" # Add .d extension gdc *.d ;; + fortran) + rename 's/.code$/\.f90/' "$@" # Add .f90 extension + gfortran *.f90 + ;; *) echo "How did you get here? (${PISTON_LANGUAGE})" exit 1 diff --git a/packages/gcc/10.2.0/environment b/packages/gcc/10.2.0/environment index 780b668..a0b5a11 100644 --- a/packages/gcc/10.2.0/environment +++ b/packages/gcc/10.2.0/environment @@ -2,3 +2,4 @@ # Put 'export' statements here for environment variables export PATH=$PWD/bin:$PATH +export LD_LIBRARY_PATH="$PWD/lib:$PWD/lib64" # Need this to properly link Fortran diff --git a/packages/gcc/10.2.0/metadata.json b/packages/gcc/10.2.0/metadata.json index 800e652..f969bf5 100644 --- a/packages/gcc/10.2.0/metadata.json +++ b/packages/gcc/10.2.0/metadata.json @@ -13,6 +13,10 @@ { "language": "d", "aliases": ["gdc"] + }, + { + "language": "fortran", + "aliases": ["fortran", "f90"] } ] } diff --git a/packages/gcc/10.2.0/test.f90 b/packages/gcc/10.2.0/test.f90 new file mode 100644 index 0000000..99fc062 --- /dev/null +++ b/packages/gcc/10.2.0/test.f90 @@ -0,0 +1,3 @@ +program test + print "(a)", 'OK' +end program test