From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 03695158041 for ; Sun, 24 Mar 2024 14:05:48 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2CC86E2A10; Sun, 24 Mar 2024 14:05:47 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 04B94E2A10 for ; Sun, 24 Mar 2024 14:05:47 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1175A33C1C1 for ; Sun, 24 Mar 2024 14:05:46 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A0CC0B91 for ; Sun, 24 Mar 2024 14:05:44 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1711289131.f64da62e50ad607de3a95b6a1d0d2ed8ba8bd268.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: f64da62e50ad607de3a95b6a1d0d2ed8ba8bd268 X-VCS-Branch: master Date: Sun, 24 Mar 2024 14:05:44 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 41038097-82a9-4b28-a783-3512ffae4cb4 X-Archives-Hash: 8e7329692b10225f420d51c762a0fd96 commit: f64da62e50ad607de3a95b6a1d0d2ed8ba8bd268 Author: Sam James gentoo org> AuthorDate: Sun Mar 24 14:05:00 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Mar 24 14:05:31 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f64da62e 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 gentoo.org> eclass/toolchain.eclass | 4 ++-- 1 file 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