From cc6359c1130d75d11039d63d5d3813d0c4d76dec Mon Sep 17 00:00:00 2001 From: Scott W Taylor Date: Mon, 12 Apr 2004 02:33:29 +0000 Subject: support cflags -nopie --- eclass/flag-o-matic.eclass | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'eclass') 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 @@ -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 } -- cgit v1.2.3-65-gdbad