Gentoo Logo
Gentoo Spaceship




Note: Due to technical difficulties, the Archives are currently not up to date. GMANE provides an alternative service for most mailing lists.
c.f. bug 424647
List Archive: gentoo-dev
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Headers:
To: gentoo-dev@g.o
From: ChIIph <chiiph@...>
Subject: Changes to flag-o-matic's _filter-var
Date: Wed, 24 Feb 2010 17:27:21 -0300
Hello everyone,

Here are some minor changes I'd like to propose to flag-o-matic's
_filter-var() to work properly with LDFLAGS.
Without this, things like "-Wl,-O1,--as-needed" won't be affected by any
kind of filter since there are no spaces to separate each flag.

I don't know of any better way to do this, but here's a patch that works
just fine.

Regards,
Tomas
--- /usr/portage/eclass/flag-o-matic.eclass.old	2010-02-17 16:36:55.000000000 -0300
+++ /usr/portage/eclass/flag-o-matic.eclass	2010-02-24 17:16:30.000000000 -0300
@@ -96,14 +96,20 @@
 	VAR=$1
 	shift
 	eval VAL=\${${VAR}}
-	for f in ${VAL}; do
-		for x in "$@"; do
+	for f in ${VAL//,/ }; do
+		for x in ${@//,/ }; do
 			# Note this should work with globs like -O*
 			[[ ${f} == ${x} ]] && continue 2
 		done
 		eval new\[\${\#new\[@]}]=\${f}
 	done
+
 	eval export ${VAR}=\${new\[*]}
+	
+	if [[ "${VAR}" == "LDFLAGS" ]]; then
+		eval VAL=\${${VAR}}
+		eval export ${VAR}=${VAL// /,}
+	fi
 }
 
 # @FUNCTION: filter-flags
Attachment:
signature.asc (OpenPGP digital signature)
Replies:
Re: Changes to flag-o-matic's _filter-var
-- Mike Frysinger
Re: Changes to flag-o-matic's _filter-var
-- Duncan
Navigation:
Lists: gentoo-dev: < Prev By Thread Next > < Prev By Date Next >
Previous by thread:
Proposed change to savedconfig.eclass
Next by thread:
Re: Changes to flag-o-matic's _filter-var
Previous by date:
Re: Changes to make_desktop_entry in eutils.eclass
Next by date:
Re: Changes to make_desktop_entry in eutils.eclass


Updated Jun 29, 2012

Summary: Archive of the gentoo-dev mailing list.

Donate to support our development efforts.

Copyright 2001-2013 Gentoo Foundation, Inc. Questions, Comments? Contact us.