summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2019-06-23 09:45:11 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2019-06-23 09:53:42 +0100
commit82b182fb344a841fccb2b599fc4ea0d5c4ab254f (patch)
treeebfa26b9e975d0154402e8189b1e7015b49d6ca2 /eclass/tests
parentsys-fs/zfs-kmod: drop 0.8.0-r1 (diff)
downloadgentoo-82b182fb344a841fccb2b599fc4ea0d5c4ab254f.tar.gz
gentoo-82b182fb344a841fccb2b599fc4ea0d5c4ab254f.tar.bz2
gentoo-82b182fb344a841fccb2b599fc4ea0d5c4ab254f.zip
flag-o-matic.eclass: filter out '-B/foo' and '-B /foo' equally
In bug #687198 Julian noticed that strip-unsupported-flags() filters out '-B' but not '/foo' in CFLAGS='-B /foo' and causes breakage. This change still does not allow -B flag but at least filters out both '-B' and it's parameter. Reported-by: Julian Cléaud Bug: https://bugs.gentoo.org/687198 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'eclass/tests')
-rwxr-xr-xeclass/tests/flag-o-matic.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/eclass/tests/flag-o-matic.sh b/eclass/tests/flag-o-matic.sh
index 97cd71d710a2..691b052c3d43 100755
--- a/eclass/tests/flag-o-matic.sh
+++ b/eclass/tests/flag-o-matic.sh
@@ -58,6 +58,22 @@ strip-unsupported-flags
[[ ${CFLAGS} == "--param l1-cache-size=32" ]] && [[ ${CXXFLAGS} == "-z=2" ]] && [[ ${LDFLAGS} == "" ]]
ftend
+CFLAGS="-O2 -B/foo -O1"
+CXXFLAGS="-O2 -B/foo -O1"
+LDFLAGS="-O2 -B/foo -O1"
+tbegin "strip-unsupported-flags for '-B/foo'"
+strip-unsupported-flags
+[[ ${CFLAGS} == "-O2 -O1" ]] && [[ ${CXXFLAGS} == "-O2 -O1" ]] && [[ ${LDFLAGS} == "" ]]
+ftend
+
+CFLAGS="-O2 -B /foo -O1"
+CXXFLAGS="-O2 -B /foo -O1"
+LDFLAGS="-O2 -B /foo -O1"
+tbegin "strip-unsupported-flags for '-B /foo'"
+strip-unsupported-flags
+[[ ${CFLAGS} == "-O2 -O1" ]] && [[ ${CXXFLAGS} == "-O2 -O1" ]] && [[ ${LDFLAGS} == "" ]]
+ftend
+
for var in $(all-flag-vars) ; do
eval ${var}=\"-filter -filter-glob -foo-${var%FLAGS}\"
done