>From 46afec7f708db17a93290598d9dc0773f53a215d Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Sun, 15 Feb 2015 19:18:26 +0000 Subject: [PATCH] Recognize NetBSD ARM EABI platforms. --- config.guess | 25 ++++++++++++++++++++----- config.sub | 2 +- testsuite/config-sub.data | 24 ++++++++++++++++++++++++ 3 files changed, 45 insertions(+), 6 deletions(-) diff --git a/config.guess b/config.guess index dbfb978..c6be4d0 100755 --- a/config.guess +++ b/config.guess @@ -2,7 +2,7 @@ # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. -timestamp='2015-01-01' +timestamp='2015-02-15' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -168,20 +168,28 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" - UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ - /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + UNAME_MACHINE_ARCH=`($sysctl 2>/dev/null || \ + $sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; + earmv*eb) + sed='s,^e\(armv[0-9]\).*$,\1,' + machine=`echo ${UNAME_MACHINE_ARCH} | sed -e "$sed"`eb-unknown + ;; + earmv*) + sed='s,^e\(armv[0-9]\).*$,\1,' + machine=`echo ${UNAME_MACHINE_ARCH} | sed -e "$sed"`-unknown + ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in - arm*|i386|m68k|ns32k|sh3*|sparc|vax) + arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ @@ -197,6 +205,13 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in os=netbsd ;; esac + # Determine ABI tags. + case "${UNAME_MACHINE_ARCH}" in + earm*) + sed='s/^earmv[0-9]/-eabi/;s/eb$//' + abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$sed"` + ;; + esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need @@ -213,7 +228,7 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. - echo "${machine}-${os}${release}" + echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` diff --git a/config.sub b/config.sub index 6d2e94c..20ac69f 100755 --- a/config.sub +++ b/config.sub @@ -117,7 +117,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ - knetbsd*-gnu* | netbsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os diff --git a/testsuite/config-sub.data b/testsuite/config-sub.data index 5831954..43bfd8e 100644 --- a/testsuite/config-sub.data +++ b/testsuite/config-sub.data @@ -11,6 +11,7 @@ amd64-kfreebsd5.4-gnu x86_64-pc-kfreebsd5.4-gnu amd64-unknown-freebsd5.2 x86_64-unknown-freebsd5.2 arceb-linux arceb-unknown-linux-gnu arc-linux arc-unknown-linux-gnu +arm--netbsdelf arm--netbsdelf arm-cegcc arm-unknown-cegcc arm-coff arm-unknown-coff arm-elf arm-unknown-elf @@ -18,9 +19,32 @@ arm-linux-androideabi arm-unknown-linux-androideabi arm-mingw32ce arm-unknown-mingw32ce arm-riscos arm-unknown-riscos arm-tirtos arm-unknown-tirtos +arm-unknown-netbsdelf7.0 arm-unknown-netbsdelf7.0 arm-unknown-riscos arm-unknown-riscos +armeb--netbsdelf armeb--netbsdelf +armeb-unknown-netbsdelf7.0 armeb-unknown-netbsdelf7.0 +armv6--netbsdelf-eabi armv6--netbsdelf-eabi +armv6--netbsdelf-eabihf armv6--netbsdelf-eabihf armv6-linux-gnu armv6-unknown-linux-gnu +armv6-unknown-netbsdelf7.0 armv6-unknown-netbsdelf7.0 +armv6-unknown-netbsdelf7.0-eabi armv6-unknown-netbsdelf7.0-eabi +armv6-unknown-netbsdelf7.0-eabihf armv6-unknown-netbsdelf7.0-eabihf +armv6eb--netbsdelf-eabi armv6eb--netbsdelf-eabi +armv6eb--netbsdelf-eabihf armv6eb--netbsdelf-eabihf +armv6eb-unknown-netbsdelf7.0 armv6eb-unknown-netbsdelf7.0 +armv6eb-unknown-netbsdelf7.0-eabi armv6eb-unknown-netbsdelf7.0-eabi +armv6eb-unknown-netbsdelf7.0-eabihf armv6eb-unknown-netbsdelf7.0-eabihf +armv7--netbsdelf-eabi armv7--netbsdelf-eabi +armv7--netbsdelf-eabihf armv7--netbsdelf-eabihf +armv7-unknown-netbsdelf7.0 armv7-unknown-netbsdelf7.0 +armv7-unknown-netbsdelf7.0-eabi armv7-unknown-netbsdelf7.0-eabi +armv7-unknown-netbsdelf7.0-eabihf armv7-unknown-netbsdelf7.0-eabihf armv7a-linux-gnueabi armv7a-unknown-linux-gnueabi +armv7eb--netbsdelf-eabi armv7eb--netbsdelf-eabi +armv7eb--netbsdelf-eabihf armv7eb--netbsdelf-eabihf +armv7eb-unknown-netbsdelf7.0 armv7eb-unknown-netbsdelf7.0 +armv7eb-unknown-netbsdelf7.0-eabi armv7eb-unknown-netbsdelf7.0-eabi +armv7eb-unknown-netbsdelf7.0-eabihf armv7eb-unknown-netbsdelf7.0-eabihf armv8b-linux-gnueabi armv8b-unknown-linux-gnueabi aros i386-pc-aros avr32 avr32-unknown-none -- 1.8.3.1