diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2013-12-27 21:27:38 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2013-12-27 21:27:38 +0000 |
commit | 768777e63bcebcf9203075c4da5e2fbad40269ae (patch) | |
tree | bc2f05e6dc866d964dea80db0382bb04ac57441d /eclass/flag-o-matic.eclass | |
parent | Remove old sandbox mask for *-sources as those ebuilds are no longer present ... (diff) | |
download | gentoo-2-768777e63bcebcf9203075c4da5e2fbad40269ae.tar.gz gentoo-2-768777e63bcebcf9203075c4da5e2fbad40269ae.tar.bz2 gentoo-2-768777e63bcebcf9203075c4da5e2fbad40269ae.zip |
There are usages in the tree of "append-libs $(pkg-config ...)"; if pkg-config returns something other than a library, append-libs can end up inserting -l-L/usr/lib64 or other weirdness. We need to check for these and warn about them.
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 0339f932e47a..7a44adf652b6 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2013 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.192 2013/11/02 03:20:37 dirtyepic Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.193 2013/12/27 21:27:38 robbat2 Exp $ # @ECLASS: flag-o-matic.eclass # @MAINTAINER: @@ -605,7 +605,12 @@ append-libs() { local flag for flag in "$@"; do [[ ${flag} == -l* ]] && flag=${flag#-l} - export LIBS="${LIBS} -l${flag}" + if [[ ${flag} == -* ]]; then + eqawarn "Appending non-library to LIBS (${flag}); Other linker flags should be passed via LDFLAGS" + export LIBS="${LIBS} ${flag}" + else + export LIBS="${LIBS} -l${flag}" + fi done return 0 |