eclass/toolchain-funcs: Sync with Gentoo

It's from Gentoo commit cab79611b07c9ebb795c6f65562ef72ba77550b1.
This commit is contained in:
Flatcar Buildbot 2023-06-19 07:15:01 +00:00
parent 621ace0a84
commit bb47e62c08

View File

@ -683,16 +683,7 @@ tc-ninja_magic_to_arch() {
frv*) echo frv;; frv*) echo frv;;
hexagon*) echo hexagon;; hexagon*) echo hexagon;;
hppa*) ninj parisc hppa;; hppa*) ninj parisc hppa;;
i?86*) i?86*) echo x86;;
# Starting with linux-2.6.24, the 'x86_64' and 'i386'
# trees have been unified into 'x86'.
# FreeBSD still uses i386
if [[ ${type} == "kern" && ${host} == *freebsd* ]] ; then
echo i386
else
echo x86
fi
;;
ia64*) echo ia64;; ia64*) echo ia64;;
loongarch*) ninj loongarch loong;; loongarch*) ninj loongarch loong;;
m68*) echo m68k;; m68*) echo m68k;;
@ -726,7 +717,6 @@ tc-ninja_magic_to_arch() {
;; ;;
tile*) echo tile;; tile*) echo tile;;
vax*) echo vax;; vax*) echo vax;;
x86_64*freebsd*) echo amd64;;
x86_64*) x86_64*)
# Starting with linux-2.6.24, the 'x86_64' and 'i386' # Starting with linux-2.6.24, the 'x86_64' and 'i386'
# trees have been unified into 'x86'. # trees have been unified into 'x86'.
@ -1077,7 +1067,7 @@ gen_usr_ldscript() {
case ${CTARGET:-${CHOST}} in case ${CTARGET:-${CHOST}} in
*-darwin*) ;; *-darwin*) ;;
*-android*) return 0 ;; *-android*) return 0 ;;
*linux*|*-freebsd*|*-openbsd*|*-netbsd*) *linux*)
use prefix && return 0 ;; use prefix && return 0 ;;
*) return 0 ;; *) return 0 ;;
esac esac