diff options
author | Ulrich Müller <ulm@gentoo.org> | 2023-03-23 17:39:51 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2023-03-26 13:33:46 +0200 |
commit | 668d261019750d8e8bfb4bc802cd864f3029ff1e (patch) | |
tree | 8b785b4a35b0d70b297bebdb7ec1355d28300609 /eclass/multilib.eclass | |
parent | mozlinguas-v2.eclass: Quote argument of ":" command (diff) | |
download | gentoo-668d261019750d8e8bfb4bc802cd864f3029ff1e.tar.gz gentoo-668d261019750d8e8bfb4bc802cd864f3029ff1e.tar.bz2 gentoo-668d261019750d8e8bfb4bc802cd864f3029ff1e.zip |
multilib.eclass: Quote argument of ":" command
This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223
Signed-off-by: Ulrich Müller <ulm@gentoo.org>
Diffstat (limited to 'eclass/multilib.eclass')
-rw-r--r-- | eclass/multilib.eclass | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/eclass/multilib.eclass b/eclass/multilib.eclass index e3c0d78a6e43..7769cb7c7c89 100644 --- a/eclass/multilib.eclass +++ b/eclass/multilib.eclass @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: multilib.eclass @@ -288,8 +288,8 @@ multilib_env() { # - https://bugs.gentoo.org/675954 # - https://gcc.gnu.org/PR90077 # - https://github.com/gentoo/musl/issues/245 - : ${MULTILIB_ABIS=default} - : ${DEFAULT_ABI=default} + : "${MULTILIB_ABIS=default}" + : "${DEFAULT_ABI=default}" export MULTILIB_ABIS DEFAULT_ABI return fi @@ -311,8 +311,8 @@ multilib_env() { export CTARGET_arm64=${CHOST_arm64} export LIBDIR_arm64="lib64" - : ${MULTILIB_ABIS=arm64} - : ${DEFAULT_ABI=arm64} + : "${MULTILIB_ABIS=arm64}" + : "${DEFAULT_ABI=arm64}" ;; x86_64*) export CFLAGS_x86=${CFLAGS_x86--m32} @@ -337,12 +337,12 @@ multilib_env() { case ${CTARGET} in *-gnux32) - : ${MULTILIB_ABIS=x32 amd64 x86} - : ${DEFAULT_ABI=x32} + : "${MULTILIB_ABIS=x32 amd64 x86}" + : "${DEFAULT_ABI=x32}" ;; *) - : ${MULTILIB_ABIS=amd64 x86} - : ${DEFAULT_ABI=amd64} + : "${MULTILIB_ABIS=amd64 x86}" + : "${DEFAULT_ABI=amd64}" ;; esac ;; @@ -352,8 +352,8 @@ multilib_env() { export CTARGET_lp64d=${CTARGET} export LIBDIR_lp64d=${LIBDIR_lp64d-lib64} - : ${MULTILIB_ABIS=lp64d} - : ${DEFAULT_ABI=lp64d} + : "${MULTILIB_ABIS=lp64d}" + : "${DEFAULT_ABI=lp64d}" ;; mips64*|mipsisa64*) export CFLAGS_o32=${CFLAGS_o32--mabi=32} @@ -372,8 +372,8 @@ multilib_env() { export CTARGET_n64=${CHOST_n64} export LIBDIR_n64="lib64" - : ${MULTILIB_ABIS=n64 n32 o32} - : ${DEFAULT_ABI=n32} + : "${MULTILIB_ABIS=n64 n32 o32}" + : "${DEFAULT_ABI=n32}" ;; powerpc64*) export CFLAGS_ppc=${CFLAGS_ppc--m32} @@ -386,12 +386,12 @@ multilib_env() { export CTARGET_ppc64=${CHOST_ppc64} export LIBDIR_ppc64="lib64" - : ${MULTILIB_ABIS=ppc64 ppc} - : ${DEFAULT_ABI=ppc64} + : "${MULTILIB_ABIS=ppc64 ppc}" + : "${DEFAULT_ABI=ppc64}" ;; riscv64*) - : ${MULTILIB_ABIS=lp64d lp64 ilp32d ilp32} - : ${DEFAULT_ABI=lp64d} + : "${MULTILIB_ABIS=lp64d lp64 ilp32d ilp32}" + : "${DEFAULT_ABI=lp64d}" # the default abi is set to the 1-level libdir default @@ -422,8 +422,8 @@ multilib_env() { export LIBDIR_ilp32=${LIBDIR_ilp32-lib32/ilp32} ;; riscv32*) - : ${MULTILIB_ABIS=ilp32d ilp32} - : ${DEFAULT_ABI=ilp32d} + : "${MULTILIB_ABIS=ilp32d ilp32}" + : "${DEFAULT_ABI=ilp32d}" # the default abi is set to the 1-level libdir default @@ -454,8 +454,8 @@ multilib_env() { export CTARGET_s390x=${CHOST_s390x} export LIBDIR_s390x="lib64" - : ${MULTILIB_ABIS=s390x s390} - : ${DEFAULT_ABI=s390x} + : "${MULTILIB_ABIS=s390x s390}" + : "${DEFAULT_ABI=s390x}" ;; sparc64*) export CFLAGS_sparc32=${CFLAGS_sparc32--m32} @@ -468,12 +468,12 @@ multilib_env() { export CTARGET_sparc64=${CHOST_sparc64} export LIBDIR_sparc64="lib64" - : ${MULTILIB_ABIS=sparc64 sparc32} - : ${DEFAULT_ABI=sparc64} + : "${MULTILIB_ABIS=sparc64 sparc32}" + : "${DEFAULT_ABI=sparc64}" ;; *) - : ${MULTILIB_ABIS=default} - : ${DEFAULT_ABI=default} + : "${MULTILIB_ABIS=default}" + : "${DEFAULT_ABI=default}" ;; esac |