diff options
author | Fabian Groffen <grobian@gentoo.org> | 2024-08-10 16:02:39 +0200 |
---|---|---|
committer | Fabian Groffen <grobian@gentoo.org> | 2024-08-10 16:06:07 +0200 |
commit | c7f5ca73ddfab78834c5bf240cb544e07a6d61ab (patch) | |
tree | 5f16ddf702516d68bb0340b2b5dc91164b7741ef /eclass | |
parent | app-crypt/eid-mw: drop 5.1.18 (diff) | |
download | gentoo-c7f5ca73ddfab78834c5bf240cb544e07a6d61ab.tar.gz gentoo-c7f5ca73ddfab78834c5bf240cb544e07a6d61ab.tar.bz2 gentoo-c7f5ca73ddfab78834c5bf240cb544e07a6d61ab.zip |
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 <grobian@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/toolchain-funcs.eclass | 15 |
1 files 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 |