summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorabs <abs>2002-06-21 11:35:16 +0000
committerabs <abs>2002-06-21 11:35:16 +0000
commit3583e461d64d9bfdc18e8433686af982909953b0 (patch)
tree4e325374da6361dc08f246a5000f8682c6bdc32f /devel
parent2840a59c2a132b9d7e987d5e89fa6da9e537eb23 (diff)
downloadpkgsrc-3583e461d64d9bfdc18e8433686af982909953b0.tar.gz
Updated cpuflags to 0.23
Initial version of SunOS (Solaris)
Diffstat (limited to 'devel')
-rw-r--r--devel/cpuflags/Makefile6
-rwxr-xr-xdevel/cpuflags/files/cpuflags.SunOS43
2 files changed, 46 insertions, 3 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile
index 586f4fe5552..fb510d746f6 100644
--- a/devel/cpuflags/Makefile
+++ b/devel/cpuflags/Makefile
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.22 2002/04/11 11:14:31 abs Exp $
+# $NetBSD: Makefile,v 1.23 2002/06/21 11:35:16 abs Exp $
#
-DISTNAME= cpuflags-0.22
+DISTNAME= cpuflags-0.23
CATEGORIES= sysutils
MASTER_SITES= # empty
DISTFILES= # empty
@@ -9,7 +9,7 @@ DISTFILES= # empty
MAINTAINER= abs@netbsd.org
COMMENT= Determine compiler flags to best target current cpu
-ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-*
+ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-* SunOS-*-*
EXTRACT_ONLY= # empty
WRKSRC= ${WRKDIR}
diff --git a/devel/cpuflags/files/cpuflags.SunOS b/devel/cpuflags/files/cpuflags.SunOS
new file mode 100755
index 00000000000..cf2596957b8
--- /dev/null
+++ b/devel/cpuflags/files/cpuflags.SunOS
@@ -0,0 +1,43 @@
+#!/bin/sh
+# $NetBSD: cpuflags.SunOS,v 1.1 2002/06/21 11:35:16 abs Exp $
+
+arch=`/usr/bin/uname -m`
+
+case $arch in
+ sun4c | sun4 ) FLAGS='-mcpu=cypress' ;;
+ sun4m ) FLAGS='-mcpu=supersparc' ;;
+ sun4u ) FLAGS='-mcpu=v9' ;;
+esac
+
+if [ -z "$FLAGS" -a -z "$NONE" ] ; then
+ echo 'Unknown machine - please send details to abs@netbsd.org' >&2
+ echo " arch : '$arch'" >&2
+fi
+
+# Fixup flags for old gcc
+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[$2] = ""$3}}
+ END{if (flags in map) {print map[flags]}else {print flags}}
+ ' <<EOD
+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
+
+echo $FLAGS
+
+exit 0