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 C05D2159C9B for ; Sat, 10 Aug 2024 14:06:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id E90CAE2A2B; Sat, 10 Aug 2024 14:06:12 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.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 CD01CE2A2B for ; Sat, 10 Aug 2024 14:06:12 +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)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 103CC33FEF1 for ; Sat, 10 Aug 2024 14:06:12 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A0090E6F for ; Sat, 10 Aug 2024 14:06:10 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1723298767.c7f5ca73ddfab78834c5bf240cb544e07a6d61ab.grobian@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: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: c7f5ca73ddfab78834c5bf240cb544e07a6d61ab X-VCS-Branch: master Date: Sat, 10 Aug 2024 14:06:10 +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: c18eb31c-fef5-49c5-85e9-168fc4bd815a X-Archives-Hash: f7fdca085ec2e46a4619d07ce7d2bb76 commit: c7f5ca73ddfab78834c5bf240cb544e07a6d61ab Author: Fabian Groffen gentoo org> AuthorDate: Sat Aug 10 14:02:39 2024 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Sat Aug 10 14:06:07 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7f5ca73 eclass/toolchain-funcs: add support for Prefix targets - support Darwin - support arm64 (Apple Silicon) Darwin - skip gen_usr_ldscript on Prefix targets Signed-off-by: Fabian Groffen gentoo.org> eclass/toolchain-funcs.eclass | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass index 9f0953c079e3..50eb310b4bf1 100644 --- a/eclass/toolchain-funcs.eclass +++ b/eclass/toolchain-funcs.eclass @@ -251,7 +251,7 @@ tc-detect-is-softfloat() { case ${CTARGET:-${CHOST}} in # Avoid autodetection for bare-metal targets. bug #666896 - *-newlib|*-elf|*-eabi) + *-newlib|*-elf|*-eabi|arm64-apple-darwin*) return 1 ;; # arm-unknown-linux-gnueabi is ambiguous. We used to treat it as @@ -295,6 +295,8 @@ tc-tuple-is-softfloat() { # bare-metal targets have their defaults. bug #666896 *-newlib|*-elf|*-eabi) echo "no" ;; + arm64-apple-darwin*) + echo "no" ;; arm*) echo "yes" ;; *) @@ -626,7 +628,14 @@ tc-has-tls() { -*) die "Usage: tc-has-tls [-c|-l] [toolchain prefix]";; esac - : "${flags:=-fPIC -shared -Wl,-z,defs}" + case "${CHOST}" in + *-darwin*) + # bug #612370 + : ${flags:=-dynamiclib} + ;; + *) + : ${flags:=-fPIC -shared -Wl,-z,defs} + esac [[ $1 == -* ]] && shift $(tc-getCC "$@") ${flags} "${base}.c" -o "${base}" >&/dev/null local ret=$? @@ -645,6 +654,7 @@ tc-ninja_magic_to_arch() { [[ -z ${host} ]] && host=${CTARGET:-${CHOST}} case ${host} in + arm64*) echo arm64;; aarch64*) echo arm64;; alpha*) echo alpha;; arc*) echo arc;; @@ -1032,6 +1042,7 @@ gen_usr_ldscript() { [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/ tc-is-static-only && return + use prefix && return # We only care about stuffing / for the native ABI, bug #479448 if [[ $(type -t multilib_is_native_abi) == "function" ]] ; then