summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorSam James <sam@gentoo.org>2023-07-21 23:20:54 +0100
committerSam James <sam@gentoo.org>2023-07-22 00:23:11 +0100
commit86dc6e703e32c1e7ae8d74c12669775fca23690e (patch)
tree689b69f75b290cd00b89b42b99f454b4acdf9835 /eclass
parentnet-libs/libproxy: Stabilize 0.5.3 ppc, #910513 (diff)
downloadgentoo-86dc6e703e32c1e7ae8d74c12669775fca23690e.tar.gz
gentoo-86dc6e703e32c1e7ae8d74c12669775fca23690e.tar.bz2
gentoo-86dc6e703e32c1e7ae8d74c12669775fca23690e.zip
toolchain-funcs.eclass: formatting tweaks
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r--eclass/toolchain-funcs.eclass24
1 files changed, 13 insertions, 11 deletions
diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass
index acd71eae82e5..2f5ed29e875d 100644
--- a/eclass/toolchain-funcs.eclass
+++ b/eclass/toolchain-funcs.eclass
@@ -338,7 +338,7 @@ tc-is-static-only() {
tc-stack-grows-down() {
# List the few that grow up.
case ${ARCH} in
- hppa|metag) return 1 ;;
+ hppa|metag) return 1 ;;
esac
# Assume all others grow down.
@@ -535,7 +535,7 @@ tc-ld-force-bfd() {
# Set up LD to point directly to bfd if it's available.
# We need to extract the first word in case there are flags appended
- # to its value (like multilib). #545218
+ # to its value (like multilib), bug #545218.
local ld=$(tc-getLD "$@")
local bfd_ld="${ld%% *}.bfd"
local path_ld=$(type -P "${bfd_ld}" 2>/dev/null)
@@ -560,6 +560,7 @@ tc-ld-force-bfd() {
fallback="false"
fi
fi
+
if [[ ${fallback} == "true" ]] ; then
# <=gcc-4.7 and <=clang-3.4 require some coercion.
# Only works if bfd exists.
@@ -647,6 +648,7 @@ tc-has-tls() {
return *i ? j : *i;
}
EOF
+
local flags
case $1 in
-s) flags="-S";;
@@ -654,6 +656,7 @@ tc-has-tls() {
-l) ;;
-*) die "Usage: tc-has-tls [-c|-l] [toolchain prefix]";;
esac
+
: "${flags:=-fPIC -shared -Wl,-z,defs}"
[[ $1 == -* ]] && shift
$(tc-getCC "$@") ${flags} "${base}.c" -o "${base}" >&/dev/null
@@ -731,7 +734,7 @@ tc-ninja_magic_to_arch() {
# since our usage of tc-arch is largely concerned with
# normalizing inputs for testing ${CTARGET}, let's filter
# other cross targets (mingw and such) into the unknown.
- *) echo unknown;;
+ *) echo unknown;;
esac
}
# @FUNCTION: tc-arch-kernel
@@ -781,7 +784,7 @@ tc-endian() {
sh*) echo little;;
sparc*) echo big;;
x86_64*) echo little;;
- *) echo wtf;;
+ *) echo wtf;;
esac
}
@@ -1058,18 +1061,17 @@ gen_usr_ldscript() {
tc-is-static-only && return
- # We only care about stuffing / for the native ABI. #479448
+ # We only care about stuffing / for the native ABI, bug #479448
if [[ $(type -t multilib_is_native_abi) == "function" ]] ; then
multilib_is_native_abi || return 0
fi
- # Eventually we'd like to get rid of this func completely #417451
+ # Eventually we'd like to get rid of this func completely, bug #417451
case ${CTARGET:-${CHOST}} in
- *-darwin*) ;;
- *-android*) return 0 ;;
- *linux*)
- use prefix && return 0 ;;
- *) return 0 ;;
+ *-darwin*) ;;
+ *-android*) return 0 ;;
+ *linux*) use prefix && return 0 ;;
+ *) return 0 ;;
esac
# Just make sure it exists