From 0afc5cd0453f545c23c83746818fdf3f906fee3a Mon Sep 17 00:00:00 2001 From: abs Date: Mon, 24 Dec 2001 13:25:47 +0000 Subject: Updated cpuflags to 0.15: Determine the appropriate flags for the Alpha 433a I now have. (Insert appropriate grumble about there being no sysctl way to tell the cputype on an Alpha) --- devel/cpuflags/Makefile | 4 ++-- devel/cpuflags/files/cpuflags.1 | 4 +++- devel/cpuflags/files/cpuflags.NetBSD | 41 ++++++++++++++++++++++-------------- devel/cpuflags/files/cpuflags.mk | 9 +++++--- 4 files changed, 36 insertions(+), 22 deletions(-) (limited to 'devel/cpuflags') diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile index e7c875f928e..4f63719828e 100644 --- a/devel/cpuflags/Makefile +++ b/devel/cpuflags/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.14 2001/12/03 23:33:01 abs Exp $ +# $NetBSD: Makefile,v 1.15 2001/12/24 13:25:47 abs Exp $ # -DISTNAME= cpuflags-0.13 +DISTNAME= cpuflags-0.15 CATEGORIES= sysutils MASTER_SITES= # empty DISTFILES= # empty diff --git a/devel/cpuflags/files/cpuflags.1 b/devel/cpuflags/files/cpuflags.1 index 1052653390b..61bf0cab9b7 100644 --- a/devel/cpuflags/files/cpuflags.1 +++ b/devel/cpuflags/files/cpuflags.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: cpuflags.1,v 1.4 2001/12/03 19:03:21 wiz Exp $ +.\" $NetBSD: cpuflags.1,v 1.5 2001/12/24 13:25:47 abs Exp $ .Dd May 31, 2001 .Dt CPUFLAGS 1 .Os @@ -26,6 +26,8 @@ variables. The first two are explicitly added to MAKE_ENV. The output of cpuflags .It CPU_DIR CPU_FLAGS with spaces stripped (eg: for use in PACKAGES) +.It LOWER_CPU_DIR +As CPU_FLAGS but all in lower case .It CFLAGS Has CPU_FLAGS appended .It CXXFLAGS diff --git a/devel/cpuflags/files/cpuflags.NetBSD b/devel/cpuflags/files/cpuflags.NetBSD index d9588f40088..6b004019005 100755 --- a/devel/cpuflags/files/cpuflags.NetBSD +++ b/devel/cpuflags/files/cpuflags.NetBSD @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: cpuflags.NetBSD,v 1.14 2001/12/03 23:33:01 abs Exp $ +# $NetBSD: cpuflags.NetBSD,v 1.15 2001/12/24 13:25:47 abs Exp $ if [ -x /sbin/sysctl ] ;then SYSCTL=/sbin/sysctl @@ -54,9 +54,17 @@ case $hw_model in fi esac ;; # - # vax / unknown + # alpha / vax / unknown *) case $hw_machine in + alpha) + # cpu0 at mainbus0: ID 0 (primary), 21164A-0 (unknown ... + if egrep -q '^cpu0.*21164A' /var/run/dmesg.boot 2>/dev/null \ + ; then + FLAGS="-mcpu=21164a" + fi + # Need to confirm how other CPUs probe + ;; # No VAX specific gcc flags :( vax) ;; # No VAX specific gcc flags :( *) @@ -69,21 +77,22 @@ esac if [ -n "$FLAGS" ]; then gcc_ver=`gcc -v 2>&1 | awk '/gcc version/ {sub("egcs-","");print $3}'` FLAGS=`awk -v "flags=$FLAGS" -v "gcc_ver=$gcc_ver" ' - {if (gcc_ver < $1){map["-m"$2] = "-m"$3}} - END{if (map[flags]) {print map[flags]}else {print flags}} + {if (gcc_ver < $1){map[$2] = ""$3}} + END{if (flags in map) {print map[flags]}else {print flags}} ' <