config-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH] Fix the version part of netbsd triplet.


From: 宋冬生 - Cauchy Song
Subject: [PATCH] Fix the version part of netbsd triplet.
Date: Tue, 23 Jun 2015 15:46:35 +0800

From: 宋冬生 <address@hidden>

For the NetBSD formal release, we get full versioned triplet, like
x86_64-unknown-netbsd6.1.4, the security/critical release part should
be trimmed.

e.g. x86_64-unknown-netbsd6.1.4 -> x86_64-unknown-netbsd6.1

For the NetBSD patch or BETA/RC release, things got even worse, we
got an extra '.' in the end of triplet. e.g.

        6.1.5_PATCH     -> x86_64-unknown-netbsd6.1.5.
        7.0_BETA        -> x86_64-unknown-netbsd7.0.
        7.0_RC1         -> x86_64-unknown-netbsd7.0.

This patch only use major release and minor release in the netbsd
triplet. e.g.
        6.1.4, 6.1.5_PATCH      -> 6.1
        7.0_BETA, 7.0_RC1, 7.0  -> 7.0

Signed-off-by: 宋冬生 <address@hidden>
---
 config.guess                | 2 +-
 testsuite/config-guess.data | 5 +++++
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/config.guess b/config.guess
index f7eb141..313ba59 100755
--- a/config.guess
+++ b/config.guess
@@ -221,7 +221,7 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
                release='-gnu'
                ;;
            *)
-               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+               release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'|cut -f '1 2' 
-d.`
                ;;
        esac
        # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
diff --git a/testsuite/config-guess.data b/testsuite/config-guess.data
index 538a7ef..49fb8ac 100644
--- a/testsuite/config-guess.data
+++ b/testsuite/config-guess.data
@@ -75,3 +75,8 @@ x86_64        2.0.0(0.271/5/3)        MSYS_NT-6.1     ignored 
ignored x86_64-pc-msys
 x86_64 2.6.32  Linux   ignored ignored x86_64-unknown-linux-gnu
 x86_64 2.6.32  VMkernel        ignored ignored x86_64-unknown-esx
 xtensa 2.6.15  Linux   ignored ignored xtensa-unknown-linux-gnu
+amd64   6.1.4   NetBSD  ignored x86_64  x86_64-unknown-netbsd6.1
+amd64   6.1.5_PATCH NetBSD  ignored x86_64  x86_64-unknown-netbsd6.1
+amd64   7.0_BETA NetBSD  ignored x86_64  x86_64-unknown-netbsd7.0
+amd64   7.0_RC1 NetBSD  ignored x86_64  x86_64-unknown-netbsd7.0
+amd64   7.0 NetBSD  ignored x86_64  x86_64-unknown-netbsd7.0
-- 
2.3.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]