diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-01-10 01:00:29 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-01-10 01:00:29 +0000 |
commit | 8c28e4825e7c582b5de8db2b0653de9a7024b168 (patch) | |
tree | 4c6687d4320e492f6e4e87d1fb0e0a40f90a9494 /eclass | |
parent | Fix LDFLAGS support. (diff) | |
download | historical-8c28e4825e7c582b5de8db2b0653de9a7024b168.tar.gz historical-8c28e4825e7c582b5de8db2b0653de9a7024b168.tar.bz2 historical-8c28e4825e7c582b5de8db2b0653de9a7024b168.zip |
add a raw-ldflags so people can pass $LDFLAGS straight to `ld`
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 56f53eb5ce3e..ad502beea1e1 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.101 2006/01/01 01:14:59 swegener Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.102 2006/01/10 01:00:29 vapier Exp $ # need access to emktemp() @@ -530,6 +530,17 @@ filter-ldflags() { return 0 } +# Turn C style ldflags (-Wl,-foo) into straight ldflags +raw-ldflags() { + local x input="$@" + [[ -z ${input} ]] && input=${LDFLAGS} + set -- + for x in ${input} ; do + set -- "$@" ${x#-Wl,} + done + echo "$@" +} + fstack-flags() { if gcc-specs-ssp; then [ -z "`is-flag -fno-stack-protector`" ] && |