commit: 86dc6e703e32c1e7ae8d74c12669775fca23690e Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Fri Jul 21 22:20:54 2023 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Fri Jul 21 23:23:11 2023 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=86dc6e70
toolchain-funcs.eclass: formatting tweaks Signed-off-by: Sam James <sam <AT> gentoo.org> eclass/toolchain-funcs.eclass | 24 +++++++++++++----------- 1 file 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