/[gentoo-x86]/eclass/flag-o-matic.eclass
Gentoo

Diff of /eclass/flag-o-matic.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.15 Revision 1.16
1# Copyright 1999-2003 Gentoo Technologies, Inc. 1# Copyright 1999-2003 Gentoo Technologies, Inc.
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.15 2003/04/06 23:35:41 method Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.16 2003/04/19 18:20:56 joker Exp $
4# 4#
5# Author Bart Verwilst <verwilst@gentoo.org> 5# Author Bart Verwilst <verwilst@gentoo.org>
6 6
7ECLASS=flag-o-matic 7ECLASS=flag-o-matic
8INHERITED="$INHERITED $ECLASS" 8INHERITED="$INHERITED $ECLASS"
26# good options. 26# good options.
27# 27#
28#### get-flag <flag> #### 28#### get-flag <flag> ####
29# Find and echo the value for a particular flag 29# Find and echo the value for a particular flag
30# 30#
31#### replace-sparc64-flags ####
32# Sets mcpu to v8 and uses the original value
33# as mtune if none specified.
34#
35
31 36
32ALLOWED_FLAGS="-O -mcpu -march -mtune -fstack-protector -pipe -g" 37ALLOWED_FLAGS="-O -mcpu -march -mtune -fstack-protector -pipe -g"
33 38
34 39
35filter-flags () { 40filter-flags () {
116 echo "${f/-${findflag}=}" 121 echo "${f/-${findflag}=}"
117 return 122 return
118 fi 123 fi
119 done 124 done
120} 125}
126
127replace-sparc64-flags () {
128
129 local SPARC64_CPUS="ultrasparc v9"
130
131 if [ "${CFLAGS/mtune}" != "${CFLAGS}" ]
132 then
133 for x in ${SPARC64_CPUS}
134 do
135 CFLAGS="${CFLAGS/-mcpu=${x}/-mcpu=v8}"
136 done
137 else
138 for x in ${SPARC64_CPUS}
139 do
140 CFLAGS="${CFLAGS/-mcpu=${x}/-mcpu=v8 -mtune=${x}}"
141 done
142 fi
143
144 if [ "${CXXFLAGS/mtune}" != "${CXXFLAGS}" ]
145 then
146 for x in ${SPARC64_CPUS}
147 do
148 CXXFLAGS="${CXXFLAGS/-mcpu=${x}/-mcpu=v8}"
149 done
150 else
151 for x in ${SPARC64_CPUS}
152 do
153 CXXFLAGS="${CXXFLAGS/-mcpu=${x}/-mcpu=v8 -mtune=${x}}"
154 done
155 fi
156
157}

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.20