summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2015-11-28 19:54:23 +0100
committerJustin Lecher <jlec@gentoo.org>2015-11-28 19:57:47 +0100
commit64d981bfd079735598dd81c0c56d2b534b3f482c (patch)
treee3c8fae66b2e0469d1ac6c2ac2e478118df232b6 /eclass/fortran-2.eclass
parentfortran-2.eclass: Fix whitespaces (diff)
downloadgentoo-64d981bfd079735598dd81c0c56d2b534b3f482c.tar.gz
gentoo-64d981bfd079735598dd81c0c56d2b534b3f482c.tar.bz2
gentoo-64d981bfd079735598dd81c0c56d2b534b3f482c.zip
fortran-2.eclass: fortran_int64_abi_fflags() add
fortran_int64_abi_fflags help you querry for the necessary compiler flags to enable 64bit int support Signed-off-by: Justin Lecher <jlec@gentoo.org>
Diffstat (limited to 'eclass/fortran-2.eclass')
-rw-r--r--eclass/fortran-2.eclass16
1 files changed, 16 insertions, 0 deletions
diff --git a/eclass/fortran-2.eclass b/eclass/fortran-2.eclass
index ac89bf1ecc7..6f3c4b283d5 100644
--- a/eclass/fortran-2.eclass
+++ b/eclass/fortran-2.eclass
@@ -77,6 +77,22 @@ for _f_use in ${FORTRAN_NEEDED}; do
esac
done
+# @FUNCTION: fortran_int64_abi_fflags
+# @DESCRIPTION: Return the Fortran compiler flag to enable 64 bit integers for
+# array indices
+# @CODE
+fortran_int64_abi_fflags() {
+ debug-print-function ${FUNCNAME} "${@}"
+ _FC=$(tc-getFC)
+ if [[ ${_FC} == *gfortran* ]]; then
+ echo "-fdefault-integer-8"
+ elif [[ ${_FC} == ifort ]]; then
+ echo "-integer-size 64"
+ else
+ die "Compiler flag for 64bit interger for ${_FC} unknown"
+ fi
+}
+
# @FUNCTION: _fortran_write_testsuite
# @INTERNAL
# @DESCRIPTION: