/[gentoo-alt]/trunk/prefix/eclass/gnat.eclass
Gentoo

Contents of /trunk/prefix/eclass/gnat.eclass

Parent Directory Parent Directory | Revision Log Revision Log


Revision 982 - (show annotations) (download)
Thu Feb 2 04:20:17 2006 UTC (13 years, 2 months ago) by kito
File size: 1735 byte(s)
Initial eclass import from gentoo-x86
1 # Copyright 1999-2004 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/eclass/gnat.eclass,v 1.11 2005/12/15 12:06:30 george Exp $
4 #
5 # Author: David Holm <dholm@gentoo.org>
6 #
7 # This eclass contains some common settings for gnat based ada stuff
8 # It also strips some flags to bring C[XX]FLAGS in cpmpliance with gcc-2.8.1
9
10
11 inherit flag-o-matic
12
13 EXPORT_FUNCTIONS pkg_setup
14
15 DEPEND="dev-lang/gnat"
16
17 DESCRIPTION="Based on the ${ECLASS} eclass"
18
19 gnat_filter_flags() {
20 # We should probably check which GNAT is installed and
21 # filter flags accordingly. This version is overly protective.
22
23 filter-mfpmath sse 387
24
25 filter-flags -mmmx -msse -mfpmath -frename-registers \
26 -fprefetch-loop-arrays -falign-functions=4 -falign-jumps=4 \
27 -falign-loops=4 -msse2 -frerun-loop-opt -maltivec -mabi=altivec \
28 -fsigned-char -fno-strict-aliasing -pipe
29 }
30
31 gnat_pkg_setup() {
32 export ADAC=${ADAC:-gnatgcc}
33 export ADAMAKE=${ADAMAKE:-gnatmake}
34 export ADABIND=${ADABIND:-gnatbind}
35
36 gnat_filter_flags
37
38 export ADACFLAGS=${ADACFLAGS:-${CFLAGS}}
39 export ADACFLAGS=${ADACFLAGS//pentium-mmx/i586}
40 export ADACFLAGS=${ADACFLAGS//pentium[234]/i686}
41 export ADACFLAGS=${ADACFLAGS//k6-[23]/k6}
42 export ADACFLAGS=${ADACFLAGS//athlon-tbird/i686}
43 export ADACFLAGS=${ADACFLAGS//athlon-4/i686}
44 export ADACFLAGS=${ADACFLAGS//athlon-[xm]p/i686}
45 #the following two break the oncoming amd64 support
46 #will completely remove when gnat-3.44 is unmasked
47 # export ADACFLAGS=${ADACFLAGS//athlon64/i686}
48 # export ADACFLAGS=${ADACFLAGS//athlon/i686}
49 export ADACFLAGS=${ADACFLAGS//-Os/-O2}
50
51 export ADAMAKEFLAGS=${ADAMAKEFLAGS:-"-cargs ${ADACFLAGS} -margs"}
52 export ADABINDFLAGS=${ADABINDFLAGS:-""}
53 }

  ViewVC Help
Powered by ViewVC 1.1.20