public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Ulrich Müller" <ulm@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: "Ulrich Müller" <ulm@gentoo.org>
Subject: [gentoo-dev] [PATCH 50/61] toolchain-funcs.eclass: Quote argument of ":" command
Date: Fri, 24 Mar 2023 12:17:46 +0100	[thread overview]
Message-ID: <20230324111757.18433-50-ulm@gentoo.org> (raw)
In-Reply-To: <20230324111757.18433-1-ulm@gentoo.org>

This avoids globbing, see: https://www.shellcheck.net/wiki/SC2223

Signed-off-by: Ulrich Müller <ulm@gentoo.org>
---
 eclass/toolchain-funcs.eclass | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 805a3b0dfe61..63db0cfa5e0e 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -355,16 +355,16 @@ tc-export_build_env() {
 		# Some build envs will initialize vars like:
 		# : ${BUILD_LDFLAGS:-${LDFLAGS}}
 		# So make sure all variables are non-empty. #526734
-		: ${BUILD_CFLAGS:=-O1 -pipe}
-		: ${BUILD_CXXFLAGS:=-O1 -pipe}
-		: ${BUILD_CPPFLAGS:= }
-		: ${BUILD_LDFLAGS:= }
+		: "${BUILD_CFLAGS:=-O1 -pipe}"
+		: "${BUILD_CXXFLAGS:=-O1 -pipe}"
+		: "${BUILD_CPPFLAGS:= }"
+		: "${BUILD_LDFLAGS:= }"
 	else
 		# https://bugs.gentoo.org/654424
-		: ${BUILD_CFLAGS:=${CFLAGS}}
-		: ${BUILD_CXXFLAGS:=${CXXFLAGS}}
-		: ${BUILD_CPPFLAGS:=${CPPFLAGS}}
-		: ${BUILD_LDFLAGS:=${LDFLAGS}}
+		: "${BUILD_CFLAGS:=${CFLAGS}}"
+		: "${BUILD_CXXFLAGS:=${CXXFLAGS}}"
+		: "${BUILD_CPPFLAGS:=${CPPFLAGS}}"
+		: "${BUILD_LDFLAGS:=${LDFLAGS}}"
 	fi
 	export BUILD_{C,CXX,CPP,LD}FLAGS
 
@@ -654,7 +654,7 @@ tc-has-tls() {
 		-l) ;;
 		-*) die "Usage: tc-has-tls [-c|-l] [toolchain prefix]";;
 	esac
-	: ${flags:=-fPIC -shared -Wl,-z,defs}
+	: "${flags:=-fPIC -shared -Wl,-z,defs}"
 	[[ $1 == -* ]] && shift
 	$(tc-getCC "$@") ${flags} "${base}.c" -o "${base}" >&/dev/null
 	local ret=$?
-- 
2.40.0



  parent reply	other threads:[~2023-03-24 11:32 UTC|newest]

Thread overview: 61+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-24 11:16 [gentoo-dev] [PATCH 01/61] acct-group.eclass: Quote argument of ":" command Ulrich Müller
2023-03-24 11:16 ` [gentoo-dev] [PATCH 02/61] acct-user.eclass: " Ulrich Müller
2023-03-24 11:16 ` [gentoo-dev] [PATCH 03/61] autotools.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 04/61] bzr.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 05/61] cargo.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 06/61] cdrom.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 07/61] cmake-multilib.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 08/61] cmake.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 09/61] cuda.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 10/61] cvs.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 11/61] docs.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 12/61] dune.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 13/61] ecm.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 14/61] elisp-common.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 15/61] fortran-2.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 16/61] git-r3.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 17/61] gnome.org.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 18/61] gnome2-utils.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 19/61] golang-vcs.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 20/61] gstreamer-meson.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 21/61] haskell-cabal.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 22/61] java-pkg-simple.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 23/61] kde.org.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 24/61] kernel-2.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 25/61] libretro-core.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 26/61] linux-info.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 27/61] linux-mod.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 28/61] mate-desktop.org.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 29/61] mate.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 30/61] mercurial.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 31/61] meson.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 32/61] mozextension.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 33/61] mozlinguas-v2.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 34/61] multilib.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 35/61] ninja-utils.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 36/61] office-ext-r1.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 37/61] opam.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 38/61] php-ext-source-r3.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 39/61] php-pear-r2.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 40/61] plasma-mobile.kde.org.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 41/61] pypi.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 42/61] qt5-build.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 43/61] qt6-build.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 44/61] readme.gentoo-r1.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 45/61] ruby-ng-gnome2.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 46/61] rust-toolchain.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 47/61] selinux-policy-2.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 48/61] ssl-cert.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 49/61] stardict.eclass: " Ulrich Müller
2023-03-24 11:17 ` Ulrich Müller [this message]
2023-03-24 11:17 ` [gentoo-dev] [PATCH 51/61] toolchain.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 52/61] unpacker.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 53/61] vala.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 54/61] verify-sig.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 55/61] vim-plugin.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 56/61] vim-spell.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 57/61] virtualx.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 58/61] waf-utils.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 59/61] xdg-utils.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 60/61] xemacs-packages.eclass: " Ulrich Müller
2023-03-24 11:17 ` [gentoo-dev] [PATCH 61/61] xorg-3.eclass: " Ulrich Müller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230324111757.18433-50-ulm@gentoo.org \
    --to=ulm@gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox