Date: Sun, 15 Feb 2015 19:32:05 +0000
   From: Taylor R Campbell <riastr...@netbsd.org>

   So I have also attached a collection of test data for NetBSD and a
   little script to run it: `./nbsd.sh < nbsd.data' (provided
   config.guess is patched to say `sysctl' instead of `/sbin/sysctl').

Whoops, didn't mean to include that change to config.guess in the main
patch.  Let's try again without that.
>From 92f051f6bac06814ea9c89ae247c203dbf6eecf4 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastr...@netbsd.org>
Date: Sun, 15 Feb 2015 19:18:26 +0000
Subject: [PATCH] Recognize NetBSD ARM EABI platforms.

---
 config.guess              | 21 ++++++++++++++++++---
 config.sub                |  2 +-
 testsuite/config-sub.data | 24 ++++++++++++++++++++++++
 3 files changed, 43 insertions(+), 4 deletions(-)

diff --git a/config.guess b/config.guess
index dbfb978..a18aa87 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
@@ -176,12 +176,20 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
            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

_______________________________________________
config-patches mailing list
config-patches@gnu.org
https://lists.gnu.org/mailman/listinfo/config-patches

Reply via email to