summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2024-03-24 14:05:00 +0000
committerSam James <sam@gentoo.org>2024-03-24 14:05:31 +0000
commitf64da62e50ad607de3a95b6a1d0d2ed8ba8bd268 (patch)
tree96eee9636cca46f03c137f17ef84f70438db4979 /eclass
parentdev-php/adodb: drop empty IUSE assignments (diff)
downloadgentoo-f64da62e50ad607de3a95b6a1d0d2ed8ba8bd268.tar.gz
gentoo-f64da62e50ad607de3a95b6a1d0d2ed8ba8bd268.tar.bz2
gentoo-f64da62e50ad607de3a95b6a1d0d2ed8ba8bd268.zip
toolchain.eclass: improve hybrid check
Thanks to stikonas for debugging on IRC. Bug: https://bugs.gentoo.org/904426 Bug: https://bugs.gentoo.org/908523 Bug: https://bugs.gentoo.org/915389 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain.eclass4
1 files changed, 2 insertions, 2 deletions
diff --git a/eclass/toolchain.eclass b/eclass/toolchain.eclass
index 03e6a5d987d1..01fbd62dc12c 100644
--- a/eclass/toolchain.eclass
+++ b/eclass/toolchain.eclass
@@ -1616,11 +1616,11 @@ gcc_do_filter_flags() {
[[ -z ${x} || ${x} -gt 64 ]] && break
l1_cache_size=$(taskset --cpu-list ${x} $(tc-getCC) -Q --help=params -O2 -march=native \
| awk '{ if ($1 ~ /^.*param.*l1-cache-size/) print $2; }' || die)
- [[ -n ${l1_cache_size} && ${l1_cache_size} =~ "^[0-9]+$" ]] || break
+ [[ -n ${l1_cache_size} && ${l1_cache_size} =~ ^[0-9]+$ ]] || break
l1_cache_sizes[${l1_cache_size}]=1
done
# If any of them are different, just pick the first one.
- if [[ ${#l1_cache_sizes} -gt 1 ]] ; then
+ if [[ ${#l1_cache_sizes[@]} -gt 1 ]] ; then
append-flags --param=l1-cache-size=${l1_cache_size}
fi
fi