/[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.45 Revision 1.46
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.45 2004/04/09 22:21:35 tseng Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.46 2004/04/10 17:15:37 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"
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 # strip -fPIC regardless if you've gotten this far
343 strip-flags -fPIC -fpic -fPIE -fpie -pie
344 if [ "`is-flag -yet_exec`" != "true" ]; then 342 if [ "`is-flag -yet_exec`" != "true" ]; then
345 # If our compile support -yet_exec, append it now
346 [ -z "`gcc -yet_exec -S -o /dev/null -xc /dev/null 2>&1`" ] \
347 && ( debug-print ">>> appending flags -yet_exec" ; \ 343 debug-print ">>> appending flags -yet_exec"
348 append-flags -yet_exec ; append-ldflags -yet_exec ) 344 export CFLAGS="${CFLAGS} `test_flag -yet_exec`"
349 fi 345 fi
350 fi 346 fi
351} 347}
352 348
353fstack-flags() { 349fstack-flags() {
354 has_ssp 350 has_ssp
355 if [ $? == 0 ] ; then 351 if [ $? == 0 ] ; then
356 # strip -fstack-protector regardless if you've gotten this far
357 strip-flags -fstack-protector -fstack-protector-all
358 if [ "`is-flag -yno_propolice`" != "true" ]; then 352 if [ "`is-flag -yno_propolice`" != "true" ]; then
359 # If our compile support -yno_propolice, append it now
360 [ -z "`gcc -yno_propolice -S -o /dev/null -xc /dev/null 2>&1`" ] \
361 && ( debug-print ">>> appending flags -yno_propolice" ; \ 353 debug-print ">>> appending flags -fno-stack-protector"
362 append-flags -yno_propolice ; append-ldflags -yno_propolice ) 354 export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`"
363 fi 355 fi
364 fi 356 fi
365} 357}

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

  ViewVC Help
Powered by ViewVC 1.1.20