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\[\${\#ne...@]}]=\${f} done + eval export ${VAR}=\${new\[*]} + + if [[ "${VAR}" == "LDFLAGS" ]]; then + eval VAL=\${${VAR}} + eval export ${VAR}=${VAL// /,} + fi } # @FUNCTION: filter-flags
signature.asc
Description: OpenPGP digital signature