diff options
author | abs <abs> | 2001-12-24 13:25:47 +0000 |
---|---|---|
committer | abs <abs> | 2001-12-24 13:25:47 +0000 |
commit | 0afc5cd0453f545c23c83746818fdf3f906fee3a (patch) | |
tree | d66357181a157d1767a52e168834d53c9d2aa9c0 /devel/cpuflags | |
parent | 58273648fc6ac14478cdbbbd5fa4ec1c7fb966b1 (diff) | |
download | pkgsrc-0afc5cd0453f545c23c83746818fdf3f906fee3a.tar.gz |
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)
Diffstat (limited to 'devel/cpuflags')
-rw-r--r-- | devel/cpuflags/Makefile | 4 | ||||
-rw-r--r-- | devel/cpuflags/files/cpuflags.1 | 4 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.NetBSD | 41 | ||||
-rw-r--r-- | devel/cpuflags/files/cpuflags.mk | 9 |
4 files changed, 36 insertions, 22 deletions
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}} ' <<EOD -2.90 arch=i386 no-486 -2.90 arch=i486 486 -2.90 arch=pentium 486 -2.90 arch=pentiumpro 486 -2.90 cpu=supersparc supersparc -2.90 cpu=sparclite sparclite -2.90 cpu=cypress cypress -2.90 cpu=v9 v8 -2.90 cpu=arm610 6 -2.90 cpu=strongarm110 6 -2.90 cpu=arm710 6 -2.95 arch=k6 arch=pentium +2.90 -mcpu=21164a +2.90 -march=i386 -mno-486 +2.90 -march=i486 -m486 +2.90 -march=pentium -m486 +2.90 -march=pentiumpro -m486 +2.90 -mcpu=supersparc -msupersparc +2.90 -mcpu=sparclite -msparclite +2.90 -mcpu=cypress -mcypress +2.90 -mcpu=v9 -mv8 +2.90 -mcpu=arm610 -m6 +2.90 -mcpu=strongarm110 -m6 +2.90 -mcpu=arm710 -m6 +2.95 -march=k6 -march=pentium EOD ` fi diff --git a/devel/cpuflags/files/cpuflags.mk b/devel/cpuflags/files/cpuflags.mk index 21fbc1c59ee..d332b4a0edb 100644 --- a/devel/cpuflags/files/cpuflags.mk +++ b/devel/cpuflags/files/cpuflags.mk @@ -1,20 +1,23 @@ -# $Id: cpuflags.mk,v 1.1 2001/06/29 11:24:51 abs Exp $ +# $Id: cpuflags.mk,v 1.2 2001/12/24 13:25:47 abs Exp $ # Makefile include fragment to simplify use of cpuflags in pkgsrc # abs@netbsd.org - freely distributable, no warrenties, stick no bills. # Try to optimise based on CPU # Does not affect Imakefiles, and any package that overrides CFLAGS/CXXFLAGS -# Sets four variables: +# Sets five variables: # # CPU_FLAGS The output of cpuflags -# CPU_DIR CPU_FLAGS with spaces stripped (eg: for use in PACKAGES) # CFLAGS Has CPU_FLAGS appended # CXXFLAGS Has CPU_FLAGS appended # +# CPU_DIR CPU_FLAGS with spaces stripped (eg: for use in PACKAGES) +# LOWER_CPU_DIR As CPU_FLAGS but all lower case +# .if ! defined(CPU_FLAGS) CPU_FLAGS!=/usr/pkg/bin/cpuflags CPU_DIR!=echo ${CPU_FLAGS} | sed 's/ //' +LOWER_CPU_DIR!=echo ${CPU_DIR} | tr A-Z a-z MAKE_ENV+=CPU_FLAGS=${CPU_FLAGS} CPU_DIR=${CPU_DIR} CFLAGS+=${CPU_FLAGS} CXXFLAGS+=${CPU_FLAGS} |