summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorScott W Taylor <swtaylor@gentoo.org>2004-04-12 02:33:29 +0000
committerScott W Taylor <swtaylor@gentoo.org>2004-04-12 02:33:29 +0000
commitcc6359c1130d75d11039d63d5d3813d0c4d76dec (patch)
treefa4df158ac5d61b26d7d6acf952e6cbb12e907c7 /eclass
parentxorg-x11 compatibility update. (Manifest recommit) (diff)
downloadgentoo-2-cc6359c1130d75d11039d63d5d3813d0c4d76dec.tar.gz
gentoo-2-cc6359c1130d75d11039d63d5d3813d0c4d76dec.tar.bz2
gentoo-2-cc6359c1130d75d11039d63d5d3813d0c4d76dec.zip
support cflags -nopie
Diffstat (limited to 'eclass')
-rw-r--r--eclass/flag-o-matic.eclass14
1 files changed, 6 insertions, 8 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass
index d0ee60e0f6b0..15ffd5c850a6 100644
--- a/eclass/flag-o-matic.eclass
+++ b/eclass/flag-o-matic.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2003 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.46 2004/04/10 17:15:37 swtaylor Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.47 2004/04/12 02:33:29 swtaylor Exp $
#
# Author Bart Verwilst <verwilst@gentoo.org>
@@ -232,7 +232,7 @@ strip-flags() {
}
test_flag() {
- if gcc -S -xc "$@" -o /dev/null /dev/null >/dev/null 2>&1; then
+ if [ -z "`gcc -S -xc "$@" -o /dev/null /dev/null 2>&1`" ]; then
echo "$@"
return 0
fi
@@ -339,19 +339,17 @@ filter-ldflags() {
etexec-flags() {
has_pie || has_pic
if [ $? == 0 ] ; then
- if [ "`is-flag -yet_exec`" != "true" ]; then
- debug-print ">>> appending flags -yet_exec"
+ [ -z "`is-flag -yet_exec`" ] &&
export CFLAGS="${CFLAGS} `test_flag -yet_exec`"
- fi
+ [ -z "`is-flag -nopie`" ] &&
+ export CFLAGS="${CFLAGS} `test_flag -nopie`"
fi
}
fstack-flags() {
has_ssp
if [ $? == 0 ] ; then
- if [ "`is-flag -yno_propolice`" != "true" ]; then
- debug-print ">>> appending flags -fno-stack-protector"
+ [ -z "`is-flag -yno_propolice`" ] &&
export CFLAGS="${CFLAGS} `test_flag -fno-stack-protector`"
- fi
fi
}