Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap bootstrap: Fix default target arch on SunOS.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/bd405b141e1e
branches:  trunk
changeset: 433101:bd405b141e1e
user:      jperkin <jperkin%pkgsrc.org@localhost>
date:      Sat May 30 21:36:15 2020 +0000

description:
bootstrap: Fix default target arch on SunOS.

Use the kernel architecture via isainfo -k to base our default on, as uname
will always return the same result regardless.  Ensures we default to 64-bit
pkgsrc on amd64, as well as adding support for sparcv9.

diffstat:

 bootstrap/bootstrap |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (31 lines):

diff -r 26fd691ed141 -r bd405b141e1e bootstrap/bootstrap
--- a/bootstrap/bootstrap       Sat May 30 21:07:11 2020 +0000
+++ b/bootstrap/bootstrap       Sat May 30 21:36:15 2020 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.280 2020/05/25 07:32:59 jperkin Exp $
+# $NetBSD: bootstrap,v 1.281 2020/05/30 21:36:15 jperkin Exp $
 #
 # Copyright (c) 2001-2011 Alistair Crooks <agc%NetBSD.org@localhost>
 # All rights reserved.
@@ -869,7 +869,7 @@
        idprog="/usr/xpg4/bin/id"
        groupsprog="${idprog} -gn"
        whoamiprog="${idprog} -un"
-       machine_arch=`uname -p | sed -e 's/i86pc/i386/'`
+       machine_arch=`isainfo -k`
        check_compiler=yes
        check_ssp=yes
        ;;
@@ -915,7 +915,9 @@
 powerpc64/32)  abi=32  machine_arch=powerpc    ;;
 powerpc64/*)   abi=64  machine_arch=powerpc64  ;;
 powerpc64le/*) abi=64  machine_arch=powerpc64le;;
-# "sparc" can support 64-bit, e.g. SunOS, defaults to 32-bit.
+# sparc/sparcv9 support 32-bit/64-bit, default to native.
+sparcv9/32)    abi=32  machine_arch=sparc      ;;
+sparcv9/*)     abi=64  machine_arch=sparc64    ;;
 sparc/64)      abi=64  machine_arch=sparc64    ;;
 sparc/*)       abi=32  machine_arch=sparc      ;;
 # x86_64 supports 32-bit/64-bit, defaults to 64-bit.



Home | Main Index | Thread Index | Old Index