summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTravis Tilley <lv@gentoo.org>2004-11-08 00:23:11 +0000
committerTravis Tilley <lv@gentoo.org>2004-11-08 00:23:11 +0000
commit955c9f3f6707cdda95b84f21a884c0ee665c687b (patch)
tree7db5774bca184d2fc6b0c1c22892f5cf544e72b1 /eclass/toolchain.eclass
parentf77 -> fortran f77 in all profiles (diff)
downloadgentoo-2-955c9f3f6707cdda95b84f21a884c0ee665c687b.tar.gz
gentoo-2-955c9f3f6707cdda95b84f21a884c0ee665c687b.tar.bz2
gentoo-2-955c9f3f6707cdda95b84f21a884c0ee665c687b.zip
changed fortran support to be enabled by the fortran USE flag. this way we can enable f77, f95, or fortran as a gcc lang depending on what the gcc version supports.
Diffstat (limited to 'eclass/toolchain.eclass')
-rw-r--r--eclass/toolchain.eclass23
1 files changed, 18 insertions, 5 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 0997c8cc727f..92f58681869e 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.43 2004/11/07 21:20:34 lv Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/toolchain.eclass,v 1.44 2004/11/08 00:23:11 lv Exp $
#
# This eclass should contain general toolchain-related functions that are
# expected to not change, or change much.
@@ -17,7 +17,7 @@ if [ "${ETYPE}" == "gcc-library" ] ; then
IUSE="nls build uclibc"
SLOT="${CTARGET}-${SO_VERSION_SLOT:-5}"
else
- IUSE="static nls bootstrap build multilib gcj gtk f77 nocxx objc hardened uclibc n32 n64"
+ IUSE="static nls bootstrap build multilib gcj gtk fortran nocxx objc hardened uclibc n32 n64"
if [ -n "${HTB_VER}" ] ; then
IUSE="${IUSE} boundschecking"
fi
@@ -841,9 +841,22 @@ gcc-compiler-configure() {
if ! use build ; then
GCC_LANG="c"
use !nocxx && GCC_LANG="${GCC_LANG},c++"
- use f77 && gcc-lang-supported f77 && GCC_LANG="${GCC_LANG},f77"
- #use f95 && gcc-lang-supported f95 && GCC_LANG="${GCC_LANG},f95"
- #use treelang && gcc-lang-supported treelang && GCC_LANG="${GCC_LANG},treelang"
+
+ # fortran support just got sillier! the lang value can be f77 for
+ # fortran77, f95 for fortran95, or just plain old fortran for the
+ # currently supported standard depending on gcc version.
+ if use fortran ; then
+ if gcc-lang-supported f95 ; then
+ GCC_LANG="${GCC_LANG},f95"
+ elif gcc-lang-supported f77 ; then
+ GCC_LANG="${GCC_LANG},f77"
+ elif gcc-lang-supported fortran ; then
+ GCC_LANG="${GCC_LANG},fortran"
+ else
+ die "GCC doesnt support fortran"
+ fi
+ fi
+
use objc && gcc-lang-supported objc && GCC_LANG="${GCC_LANG},objc"
use gcj && gcc-lang-supported java && GCC_LANG="${GCC_LANG},java"
# We do NOT want 'ADA support' in here!