diff options
author | Mike Frysinger <vapier@gentoo.org> | 2005-10-13 05:33:34 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2005-10-13 05:33:34 +0000 |
commit | 16d27bdffe3833317c0b60b34bc06f42566326d5 (patch) | |
tree | c46036856e40f607e04396c36cad376fecca1aa4 /eclass | |
parent | Fixes from PaX team to address executable stacks and PIC bugs. (diff) | |
download | gentoo-2-16d27bdffe3833317c0b60b34bc06f42566326d5.tar.gz gentoo-2-16d27bdffe3833317c0b60b34bc06f42566326d5.tar.bz2 gentoo-2-16d27bdffe3833317c0b60b34bc06f42566326d5.zip |
need to declare x as a local var in strip-unsupported-flags so we dont pollute callers env ... also touchup syntax there and in has_m32
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 2807a90fff7f..719f0e0c4686 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.94 2005/10/09 22:28:35 flameeyes Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.95 2005/10/13 05:33:34 vapier Exp $ # need access to emktemp() @@ -312,17 +312,17 @@ test_version_info() { } strip-unsupported-flags() { - local NEW_CFLAGS NEW_CXXFLAGS + local x NEW_CFLAGS NEW_CXXFLAGS for x in ${CFLAGS} ; do - NEW_CFLAGS="${NEW_CFLAGS} `test_flag ${x}`" + NEW_CFLAGS="${NEW_CFLAGS} $(test_flag ${x})" done for x in ${CXXFLAGS} ; do - NEW_CXXFLAGS="${NEW_CXXFLAGS} `test_flag ${x}`" + NEW_CXXFLAGS="${NEW_CXXFLAGS} $(test_flag ${x})" done - export CFLAGS="${NEW_CFLAGS}" - export CXXFLAGS="${NEW_CXXFLAGS}" + export CFLAGS=${NEW_CFLAGS} + export CXXFLAGS=${NEW_CXXFLAGS} } get-flag() { @@ -414,12 +414,12 @@ has_m32() { [ "$(tc-arch)" = "amd64" ] && has_multilib_profile && return 0 - local temp="$(emktemp)" - echo "int main() { return(0); }" > ${temp}.c + local temp=$(emktemp) + echo "int main() { return(0); }" > "${temp}".c MY_CC=$(tc-getCC) - ${MY_CC/ .*/} -m32 -o "$(emktemp)" ${temp}.c > /dev/null 2>&1 + ${MY_CC/ .*/} -m32 -o "$(emktemp)" "${temp}".c > /dev/null 2>&1 local ret=$? - rm -f ${temp}.c + rm -f "${temp}".c [ "$ret" != "1" ] && return 0 return 1 } |