diff options
author | 2006-01-10 01:00:29 +0000 | |
---|---|---|
committer | 2006-01-10 01:00:29 +0000 | |
commit | 154aacd1487644cc42e17ab9bda3dceff4bbc8de (patch) | |
tree | 336f96e810e3cb2301cee72e197de323ac1ed81c /eclass | |
parent | Fix LDFLAGS support. (diff) | |
download | gentoo-2-154aacd1487644cc42e17ab9bda3dceff4bbc8de.tar.gz gentoo-2-154aacd1487644cc42e17ab9bda3dceff4bbc8de.tar.bz2 gentoo-2-154aacd1487644cc42e17ab9bda3dceff4bbc8de.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`" ] && |