[PATCH 88/94] multilib.eclass: convert musl check to case statement

Sam James <[email protected]>
Newsgroups gmane.linux.gentoo.devel
Message-ID <b0764b5e78024de7239f3edb73c2abba920d7139.1774994373.git.sam@gentoo.org>
In preparation for another check, for Hurd.

Signed-off-by: Sam James <[email protected]>
---
 eclass/multilib.eclass | 26 +++++++++++++++-----------
 1 file changed, 15 insertions(+), 11 deletions(-)

diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass
index 5d9e8498aefa8..15c44e03a0c92 100644
--- a/eclass/multilib.eclass
+++ b/eclass/multilib.eclass
@@ -1,4 +1,4 @@
-# Copyright 1999-2025 Gentoo Authors
+# Copyright 1999-2026 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 # @ECLASS: multilib.eclass
@@ -278,16 +278,20 @@ multilib_env() {
 	local CTARGET=${1:-${CTARGET}}
 	local cpu=${CTARGET%%*-}
 
-	if [[ ${CTARGET} = *-musl* ]]; then
-		# musl has no multilib support and can run only in 'lib':
-		# - https://bugs.gentoo.org/675954
-		# - https://gcc.gnu.org/PR90077
-		# - https://github.com/gentoo/musl/issues/245
-		: "${MULTILIB_ABIS=default}"
-		: "${DEFAULT_ABI=default}"
-		export MULTILIB_ABIS DEFAULT_ABI
-		return
-	fi
+	case ${CTARGET} in
+		*-musl*)
+			# musl has no multilib support and can run only in 'lib':
+			# - https://bugs.gentoo.org/675954
+			# - https://gcc.gnu.org/PR90077
+			# - https://github.com/gentoo/musl/issues/245
+			: "${MULTILIB_ABIS=default}"
+			: "${DEFAULT_ABI=default}"
+			export MULTILIB_ABIS DEFAULT_ABI
+			return
+			;;
+		*)
+			;;
+	esac
 
 	case ${cpu} in
 		aarch64*)
-- 
2.53.0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.