/[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.92 Revision 1.93
1# Copyright 1999-2005 Gentoo Foundation 1# Copyright 1999-2005 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.92 2005/08/01 10:50:55 kevquinn Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.93 2005/09/27 01:06:47 vapier Exp $
4 4
5 5
6# need access to emktemp() 6# need access to emktemp()
7inherit eutils toolchain-funcs multilib 7inherit eutils toolchain-funcs multilib
8 8
147 147
148 return 0 148 return 0
149} 149}
150 150
151filter-lfs-flags() { 151filter-lfs-flags() {
152 [[ -n $@ ]] && die "filter-lfs-flags takes no arguments"
152 filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 153 filter-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
153} 154}
154 155
155append-lfs-flags() { 156append-lfs-flags() {
157 [[ -n $@ ]] && die "append-lfs-flags takes no arguments"
156 append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE 158 append-flags -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
157} 159}
158 160
159append-flags() { 161append-flags() {
160 [[ -z $* ]] && return 0 162 [[ -z $* ]] && return 0
164 -n "`is-flag -fno-stack-protector-all`" ] && fstack-flags 166 -n "`is-flag -fno-stack-protector-all`" ] && fstack-flags
165 return 0 167 return 0
166} 168}
167 169
168replace-flags() { 170replace-flags() {
171 [[ $# != 2 ]] \
172 && echo && eerror "Usage: replace-flags <old flag> <new flag>" \
173 && die "replace-flags takes 2 arguments, not $#"
174
169 local f fset 175 local f fset
170 declare -a new_CFLAGS new_CXXFLAGS 176 declare -a new_CFLAGS new_CXXFLAGS
171 177
172 for fset in CFLAGS CXXFLAGS; do 178 for fset in CFLAGS CXXFLAGS; do
173 # Looping over the flags instead of using a global 179 # Looping over the flags instead of using a global

Legend:
Removed from v.1.92  
changed lines
  Added in v.1.93

  ViewVC Help
Powered by ViewVC 1.1.20