summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorDavid Holm <dholm@gentoo.org>2005-02-23 17:26:40 +0000
committerDavid Holm <dholm@gentoo.org>2005-02-23 17:26:40 +0000
commit8fd5a5b955dd4f81d80837acc4975ad17c1ca50a (patch)
treebd00ae342e5c57a6575b6e974c75313cf2139bbc /eclass
parentAdd comment. (diff)
downloadgentoo-2-8fd5a5b955dd4f81d80837acc4975ad17c1ca50a.tar.gz
gentoo-2-8fd5a5b955dd4f81d80837acc4975ad17c1ca50a.tar.bz2
gentoo-2-8fd5a5b955dd4f81d80837acc4975ad17c1ca50a.zip
Fixed under duress, enforced by vapier ;)
Diffstat (limited to 'eclass')
-rw-r--r--eclass/gnat.eclass64
1 files changed, 34 insertions, 30 deletions
diff --git a/eclass/gnat.eclass b/eclass/gnat.eclass
index 897ffac8f682..b5463c286671 100644
--- a/eclass/gnat.eclass
+++ b/eclass/gnat.eclass
@@ -1,8 +1,8 @@
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/gnat.eclass,v 1.6 2004/06/25 00:39:48 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/gnat.eclass,v 1.7 2005/02/23 17:26:40 dholm Exp $
#
-# Author: David Holm <dholm@telia.com>
+# Author: David Holm <dholm@gentoo.org>
#
# This eclass contains some common settings for gnat based ada stuff
# It also strips some flags to bring C[XX]FLAGS in cpmpliance with gcc-2.8.1
@@ -17,31 +17,35 @@ DEPEND="dev-lang/gnat"
DESCRIPTION="Based on the ${ECLASS} eclass"
-#
-# Settings for gnat-3.15p:
-#
-
-ADAC=${ADAC:-gnatgcc}
-ADAMAKE=${ADAMAKE:-gnatmake}
-ADABIND=${ADABIND:-gnatbind}
-
-filter-mfpmath "sse 387"
-
-filter-flags "-mmmx -msse -mfpmath -frename-registers \
- -fprefetch-loop-arrays -falign-functions=4 -falign-jumps=4 -falign-loops=4 \
- -msse2 -frerun-loop-opt -maltivec -mabi=altivec -pipe"
-
-ADACFLAGS=${ADACFLAGS:-${CFLAGS}}
-ADACFLAGS=${ADACFLAGS//pentium-mmx/i586}
-ADACFLAGS=${ADACFLAGS//pentium[234]/i686}
-ADACFLAGS=${ADACFLAGS//k6-[23]/k6}
-ADACFLAGS=${ADACFLAGS//athlon-tbird/i686}
-ADACFLAGS=${ADACFLAGS//athlon-4/i686}
-ADACFLAGS=${ADACFLAGS//athlon-[xm]p/i686}
-ADACFLAGS=${ADACFLAGS//athlon/i686}
-ADACFLAGS=${ADACFLAGS//-Os/-O2}
-
-ADAMAKEFLAGS=${ADAMAKEFLAGS:-"-cargs ${ADACFLAGS} -margs"}
-ADABINDFLAGS=${ADABINDFLAGS:-""}
-
-export ADAC ADACFLAGS ADAMAKE ADAMAKEFLAGS ADABIND ADABINDFLAGS
+gnat_filter_flags() {
+ # We should probably check which GNAT is installed and
+ # filter flags accordingly. This version is overly protective.
+
+ filter-mfpmath sse 387
+
+ filter-flags -mmmx -msse -mfpmath -frename-registers \
+ -fprefetch-loop-arrays -falign-functions=4 -falign-jumps=4 \
+ -falign-loops=4 -msse2 -frerun-loop-opt -maltivec -mabi=altivec \
+ -fsigned-char -fno-strict-aliasing -pipe
+}
+
+pkg_setup() {
+ export ADAC=${ADAC:-gnatgcc}
+ export ADAMAKE=${ADAMAKE:-gnatmake}
+ export ADABIND=${ADABIND:-gnatbind}
+
+ gnat_filter_flags
+
+ export ADACFLAGS=${ADACFLAGS:-${CFLAGS}}
+ export ADACFLAGS=${ADACFLAGS//pentium-mmx/i586}
+ export ADACFLAGS=${ADACFLAGS//pentium[234]/i686}
+ export ADACFLAGS=${ADACFLAGS//k6-[23]/k6}
+ export ADACFLAGS=${ADACFLAGS//athlon-tbird/i686}
+ export ADACFLAGS=${ADACFLAGS//athlon-4/i686}
+ export ADACFLAGS=${ADACFLAGS//athlon-[xm]p/i686}
+ export ADACFLAGS=${ADACFLAGS//athlon/i686}
+ export ADACFLAGS=${ADACFLAGS//-Os/-O2}
+
+ export ADAMAKEFLAGS=${ADAMAKEFLAGS:-"-cargs ${ADACFLAGS} -margs"}
+ export ADABINDFLAGS=${ADABINDFLAGS:-""}
+}