pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/bootstrap set MACHINE_ARCH correctly on AIX.



details:   https://anonhg.NetBSD.org/pkgsrc/rev/28bb7556b1b8
branches:  trunk
changeset: 489255:28bb7556b1b8
user:      grant <grant%pkgsrc.org@localhost>
date:      Sat Feb 19 04:07:31 2005 +0000

description:
set MACHINE_ARCH correctly on AIX.

diffstat:

 bootstrap/bootstrap |  13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diffs (36 lines):

diff -r 3efcd3c66880 -r 28bb7556b1b8 bootstrap/bootstrap
--- a/bootstrap/bootstrap       Sat Feb 19 03:52:24 2005 +0000
+++ b/bootstrap/bootstrap       Sat Feb 19 04:07:31 2005 +0000
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: bootstrap,v 1.30 2005/02/15 08:48:34 grant Exp $
+# $NetBSD: bootstrap,v 1.31 2005/02/19 04:07:31 grant Exp $
 #
 #
 # Copyright (c) 2001-2002 Alistair G. Crooks.  All rights reserved.
@@ -103,6 +103,16 @@
        esac
 }
 
+get_machine_arch_aix()
+{
+       _cpuid=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+       if /usr/sbin/lsattr -El $_cpuid | grep ' POWER' >/dev/null 2>&1; then
+               echo rs6000
+       else
+               echo powerpc
+       fi
+}
+
 check_prog()
 {
        _var="$1"; _name="$2"
@@ -306,6 +316,7 @@
        need_sed=yes
        need_fixed_strip=yes
        set_opsys=no
+       machine_arch=`get_machine_arch_aix`
        ;;
 Interix)
        is_root () {



Home | Main Index | Thread Index | Old Index