summaryrefslogtreecommitdiff
blob: 3d6d773f2fa84f44f0f847ac4bb0e4bc88f04b4f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/eclass/gnat.eclass,v 1.3 2003/09/18 15:09:14 dholm Exp $
#
# Author: David Holm <dholm@telia.com>
#
# 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

ECLASS=gnat

inherit flag-o-matic

INHERITED="$INHERITED $ECLASS"

newdepend dev-lang/gnat

DESCRIPTION="Based on the ${ECLASS} eclass"

#
# Settings for gnat-3.15p:
#

ADAC=${ADAC:-gnatgcc}
ADAMAKE=${ADAMAKE:-gnatmake}
ADABIND=${ADABIND:-gnatbind}

filter-flags "-mmmx -msse -mfpmath=sse -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