/[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.46 Revision 1.47
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.46 2004/04/10 17:15:37 swtaylor Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.47 2004/04/12 02:33:29 swtaylor 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"
230 export CXXFLAGS="${NEW_CXXFLAGS}" 230 export CXXFLAGS="${NEW_CXXFLAGS}"
231 return 0 231 return 0
232} 232}
233 233
234test_flag() { 234test_flag() {
235 if gcc -S -xc "$@" -o /dev/null /dev/null >/dev/null 2>&1; then 235 if [ -z "`gcc -S -xc "$@" -o /dev/null /dev/null 2>&1`" ]; then
236 echo "$@" 236 echo "$@"
237 return 0 237 return 0
238 fi 238 fi
239 return 1 239 return 1
240} 240}
337} 337}
338 338
339etexec-flags() { 339etexec-flags() {
340 has_pie || has_pic 340 has_pie || has_pic
341 if [ $? == 0 ] ; then 341 if [ $? == 0 ] ; then
342 if [ "`is-flag -yet_exec`" != "true" ]; then 342 [ -z "`is-flag -yet_exec`" ] &&
343 debug-print ">>> appending flags -yet_exec"
344 export CFLAGS="${CFLAGS} `test_flag -yet_exec`" 343 export CFLAGS="${CFLAGS} `test_flag -yet_exec`"
345 fi 344 [ -z "`is-flag -nopie`" ] &&
345 export CFLAGS="${CFLAGS} `test_flag -nopie`"
346 fi 346 fi
347} 347}
348 348
349fstack-flags() { 349fstack-flags() {
350 has_ssp 350 has_ssp
351 if [ $? == 0 ] ; then 351 if [ $? == 0 ] ; then
352 if [ "`is-flag -yno_propolice`" != "true" ]; then 352 [ -z "`is-flag -yno_propolice`" ] &&
353 debug-print ">>> appending flags -fno-stack-protector"
354 export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`" 353 export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`"
355 fi 354 fi
356 fi
357} 355}

Legend:
Removed from v.1.46  
changed lines
  Added in v.1.47

  ViewVC Help
Powered by ViewVC 1.1.20