diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2014-06-14 05:14:55 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2014-06-14 05:14:55 +0000 |
commit | 5e274ef94cbdf5b79ef196310aea007484f08764 (patch) | |
tree | 4a33526651135c05702d1cada23c71f1be14033d /eclass/flag-o-matic.eclass | |
parent | Version bump. (diff) | |
download | gentoo-2-5e274ef94cbdf5b79ef196310aea007484f08764.tar.gz gentoo-2-5e274ef94cbdf5b79ef196310aea007484f08764.tar.bz2 gentoo-2-5e274ef94cbdf5b79ef196310aea007484f08764.zip |
If you an empty argument to append-libs, you end up with a dangling -l without a library. Catch this in QA. Caught infra with a broken ncurses in net-dialup/xc with append-libs "$($(tc-getPKG_CONFIG) --libs ncurses)"
Diffstat (limited to 'eclass/flag-o-matic.eclass')
-rw-r--r-- | eclass/flag-o-matic.eclass | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/eclass/flag-o-matic.eclass b/eclass/flag-o-matic.eclass index 40115de14d50..6687789c4a13 100644 --- a/eclass/flag-o-matic.eclass +++ b/eclass/flag-o-matic.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2014 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.197 2014/02/02 22:26:13 tommy Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/flag-o-matic.eclass,v 1.198 2014/06/14 05:14:55 robbat2 Exp $ # @ECLASS: flag-o-matic.eclass # @MAINTAINER: @@ -611,6 +611,10 @@ append-libs() { [[ $# -eq 0 ]] && return 0 local flag for flag in "$@"; do + if [[ -z "${flag// }" ]]; then + eqawarn "Appending an empty argument to LIBS is invalid! Skipping." + continue + fi case $flag in -[lL]*) export LIBS="${LIBS} ${flag}" |