/[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.188 Revision 1.189
1# Copyright 1999-2013 Gentoo Foundation 1# Copyright 1999-2013 Gentoo Foundation
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.188 2013/09/05 05:28:01 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.189 2013/09/30 06:39:56 vapier Exp $
4 4
5# @ECLASS: flag-o-matic.eclass 5# @ECLASS: flag-o-matic.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# toolchain@gentoo.org 7# toolchain@gentoo.org
8# @BLURB: common functions to manipulate and query toolchain flags 8# @BLURB: common functions to manipulate and query toolchain flags
142# @USAGE: <flags> 142# @USAGE: <flags>
143# @DESCRIPTION: 143# @DESCRIPTION:
144# Add extra <flags> to the current CPPFLAGS. 144# Add extra <flags> to the current CPPFLAGS.
145append-cppflags() { 145append-cppflags() {
146 [[ $# -eq 0 ]] && return 0 146 [[ $# -eq 0 ]] && return 0
147 export CPPFLAGS="${CPPFLAGS} $*" 147 export CPPFLAGS+=" $*"
148 return 0 148 return 0
149} 149}
150 150
151# @FUNCTION: append-cflags 151# @FUNCTION: append-cflags
152# @USAGE: <flags> 152# @USAGE: <flags>
153# @DESCRIPTION: 153# @DESCRIPTION:
154# Add extra <flags> to the current CFLAGS. 154# Add extra <flags> to the current CFLAGS. If a flag might not be supported
155# with different compilers (or versions), then use test-flags-CC like so:
156# @CODE
157# append-cflags $(test-flags-CC -funky-flag)
158# @CODE
155append-cflags() { 159append-cflags() {
156 [[ $# -eq 0 ]] && return 0 160 [[ $# -eq 0 ]] && return 0
157 export CFLAGS=$(test-flags-CC ${CFLAGS} "$@") 161 # Do not do automatic flag testing ourselves. #417047
162 export CFLAGS+=" $*"
158 return 0 163 return 0
159} 164}
160 165
161# @FUNCTION: append-cxxflags 166# @FUNCTION: append-cxxflags
162# @USAGE: <flags> 167# @USAGE: <flags>
163# @DESCRIPTION: 168# @DESCRIPTION:
164# Add extra <flags> to the current CXXFLAGS. 169# Add extra <flags> to the current CXXFLAGS. If a flag might not be supported
170# with different compilers (or versions), then use test-flags-CXX like so:
171# @CODE
172# append-cxxflags $(test-flags-CXX -funky-flag)
173# @CODE
165append-cxxflags() { 174append-cxxflags() {
166 [[ $# -eq 0 ]] && return 0 175 [[ $# -eq 0 ]] && return 0
167 export CXXFLAGS=$(test-flags-CXX ${CXXFLAGS} "$@") 176 # Do not do automatic flag testing ourselves. #417047
177 export CXXFLAGS+=" $*"
168 return 0 178 return 0
169} 179}
170 180
171# @FUNCTION: append-fflags 181# @FUNCTION: append-fflags
172# @USAGE: <flags> 182# @USAGE: <flags>
173# @DESCRIPTION: 183# @DESCRIPTION:
174# Add extra <flags> to the current {F,FC}FLAGS. 184# Add extra <flags> to the current {F,FC}FLAGS. If a flag might not be supported
185# with different compilers (or versions), then use test-flags-F77 like so:
186# @CODE
187# append-fflags $(test-flags-F77 -funky-flag)
188# @CODE
175append-fflags() { 189append-fflags() {
176 [[ $# -eq 0 ]] && return 0 190 [[ $# -eq 0 ]] && return 0
177 export FFLAGS=$(test-flags-F77 ${FFLAGS} "$@") 191 # Do not do automatic flag testing ourselves. #417047
178 export FCFLAGS=$(test-flags-FC ${FCFLAGS} "$@") 192 export FFLAGS+=" $*"
193 export FCFLAGS+=" $*"
179 return 0 194 return 0
180} 195}
181 196
182# @FUNCTION: append-lfs-flags 197# @FUNCTION: append-lfs-flags
183# @DESCRIPTION: 198# @DESCRIPTION:

Legend:
Removed from v.1.188  
changed lines
  Added in v.1.189

  ViewVC Help
Powered by ViewVC 1.1.20