pkg(gcc-10.2.0): Adds Fortran support for GCC (#236)

This commit is contained in:
Victor Frazao 2021-04-27 19:02:17 -04:00 committed by GitHub
parent 959830c652
commit 65cbefa94e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 13 additions and 1 deletions

View File

@ -17,7 +17,7 @@ tar xzf gcc.tar.gz --strip-components=1
cd ../obj cd ../obj
# === autoconf based === # === 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 -j$(nproc)
make install -j$(nproc) make install -j$(nproc)

View File

@ -16,6 +16,10 @@ case "${PISTON_LANGUAGE}" in
rename 's/.code$/\.d/' "$@" # Add .d extension rename 's/.code$/\.d/' "$@" # Add .d extension
gdc *.d gdc *.d
;; ;;
fortran)
rename 's/.code$/\.f90/' "$@" # Add .f90 extension
gfortran *.f90
;;
*) *)
echo "How did you get here? (${PISTON_LANGUAGE})" echo "How did you get here? (${PISTON_LANGUAGE})"
exit 1 exit 1

View File

@ -2,3 +2,4 @@
# Put 'export' statements here for environment variables # Put 'export' statements here for environment variables
export PATH=$PWD/bin:$PATH export PATH=$PWD/bin:$PATH
export LD_LIBRARY_PATH="$PWD/lib:$PWD/lib64" # Need this to properly link Fortran

View File

@ -13,6 +13,10 @@
{ {
"language": "d", "language": "d",
"aliases": ["gdc"] "aliases": ["gdc"]
},
{
"language": "fortran",
"aliases": ["fortran", "f90"]
} }
] ]
} }

3
packages/gcc/10.2.0/test.f90 vendored Normal file
View File

@ -0,0 +1,3 @@
program test
print "(a)", 'OK'
end program test