From: Sam James <sam@gentoo.org>
To: gentoo-dev@lists.gentoo.org
Cc: toolchain@gentoo.org, Sam James <sam@gentoo.org>
Subject: [gentoo-dev] [PATCH 4/5] toolchain-funcs.eclass: style tweaks
Date: Mon, 30 Jan 2023 01:47:07 +0000 [thread overview]
Message-ID: <20230130014708.2898311-4-sam@gentoo.org> (raw)
In-Reply-To: <20230130014708.2898311-1-sam@gentoo.org>
Signed-off-by: Sam James <sam@gentoo.org>
---
eclass/toolchain-funcs.eclass | 26 +++++++++++++-------------
1 file changed, 13 insertions(+), 13 deletions(-)
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index 840111f6cc30d..9bb660e4f71f3 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -422,19 +422,19 @@ tc-env_build() {
# src_configure() {
# ECONF_SOURCE=${S}
# if tc-is-cross-compiler ; then
-# mkdir "${WORKDIR}"/${CBUILD}
-# pushd "${WORKDIR}"/${CBUILD} >/dev/null
+# mkdir "${WORKDIR}"/${CBUILD} || die
+# pushd "${WORKDIR}"/${CBUILD} >/dev/null || die
# econf_build --disable-some-unused-stuff
-# popd >/dev/null
+# popd >/dev/null || die
# fi
# ... normal build paths ...
# }
# src_compile() {
# if tc-is-cross-compiler ; then
-# pushd "${WORKDIR}"/${CBUILD} >/dev/null
+# pushd "${WORKDIR}"/${CBUILD} >/dev/null || die
# emake one-or-two-build-tools
-# ln/mv build-tools to normal build paths in ${S}/
-# popd >/dev/null
+# ln/mv build-tools to normal build paths in ${S}/ || die
+# popd >/dev/null || die
# fi
# ... normal build paths ...
# }
@@ -676,7 +676,7 @@ tc-has-tls() {
# Parse information from CBUILD/CHOST/CTARGET rather than
# use external variables from the profile.
tc-ninja_magic_to_arch() {
-ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
+ ninj() { [[ ${type} == "kern" ]] && echo $1 || echo $2 ; }
local type=$1
local host=$2
@@ -815,8 +815,8 @@ tc-get-compiler-type() {
case ${res} in
*HAVE_PATHCC*) echo pathcc;;
*HAVE_CLANG*) echo clang;;
- *HAVE_GCC*) echo gcc;;
- *) echo unknown;;
+ *HAVE_GCC*) echo gcc;;
+ *) echo unknown;;
esac
}
@@ -834,11 +834,11 @@ tc-is-clang() {
# Internal func. The first argument is the version info to expand.
# Query the preprocessor to improve compatibility across different
-# compilers rather than maintaining a --version flag matrix. #335943
+# compilers rather than maintaining a --version flag matrix, bug #335943.
_gcc_fullversion() {
local ver="$1"; shift
set -- $($(tc-getCPP "$@") -E -P - <<<"__GNUC__ __GNUC_MINOR__ __GNUC_PATCHLEVEL__")
- eval echo "$ver"
+ eval echo "${ver}"
}
# @FUNCTION: gcc-fullversion
@@ -871,7 +871,7 @@ gcc-micro-version() {
_clang_fullversion() {
local ver="$1"; shift
set -- $($(tc-getCPP "$@") -E -P - <<<"__clang_major__ __clang_minor__ __clang_patchlevel__")
- eval echo "$ver"
+ eval echo "${ver}"
}
# @FUNCTION: clang-fullversion
@@ -1098,7 +1098,7 @@ gen_usr_ldscript() {
# is referenced ... makes multilib saner
local flags=( ${CFLAGS} ${LDFLAGS} -Wl,--verbose )
if $(tc-getLD) --version | grep -q 'GNU gold' ; then
- # If they're using gold, manually invoke the old bfd. #487696
+ # If they're using gold, manually invoke the old bfd, bug #487696
local d="${T}/bfd-linker"
mkdir -p "${d}"
ln -sf $(type -P ${CHOST}-ld.bfd) "${d}"/ld
--
2.39.1
next prev parent reply other threads:[~2023-01-30 1:48 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-30 1:47 [gentoo-dev] [PATCH 1/5] toolchain-funcs.eclass: add tc-enables-fortify-source for FORTIFY_SOURCE Sam James
2023-01-30 1:47 ` [gentoo-dev] [PATCH 2/5] toolchain-funcs.eclass: add tc-enables-cxx-assertions Sam James
2023-01-30 1:47 ` [gentoo-dev] [PATCH 3/5] toolchain-funcs.eclass: include CXXFLAGS in various tc-enables-* checks Sam James
2023-01-30 1:47 ` Sam James [this message]
2023-01-30 1:47 ` [gentoo-dev] [PATCH 5/5] toolchain-funcs.eclass: consistently pass CPPFLAGS before C{,XX}FLAGS Sam James
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=20230130014708.2898311-4-sam@gentoo.org \
--to=sam@gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
--cc=toolchain@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