From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id BF12215800A for ; Fri, 21 Jul 2023 23:49:15 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 019D2E0936; Fri, 21 Jul 2023 23:49:15 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id DDBB2E0936 for ; Fri, 21 Jul 2023 23:49:14 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id F3B68335C39 for ; Fri, 21 Jul 2023 23:49:13 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3CD70B74 for ; Fri, 21 Jul 2023 23:49:12 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1689981791.86dc6e703e32c1e7ae8d74c12669775fca23690e.sam@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/toolchain-funcs.eclass X-VCS-Directories: eclass/ X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 86dc6e703e32c1e7ae8d74c12669775fca23690e X-VCS-Branch: master Date: Fri, 21 Jul 2023 23:49:12 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 466d1be9-66a3-48ff-839b-70639a2b0258 X-Archives-Hash: 04e4e9eec86f42f38e8e7d57f926c888 commit: 86dc6e703e32c1e7ae8d74c12669775fca23690e Author: Sam James gentoo org> AuthorDate: Fri Jul 21 22:20:54 2023 +0000 Commit: Sam James gentoo 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 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