summaryrefslogtreecommitdiff
path: root/devel
diff options
context:
space:
mode:
authorabs <abs@pkgsrc.org>2016-01-28 19:11:30 +0000
committerabs <abs@pkgsrc.org>2016-01-28 19:11:30 +0000
commitbf09e1eef4e21f6bb3ec63cf58c736945915a550 (patch)
tree5ed827ba4fa791e742d6c7d275b897aae2fad672 /devel
parent1875e37a1ad193708d5a49e25f7202e91116f9e8 (diff)
downloadpkgsrc-bf09e1eef4e21f6bb3ec63cf58c736945915a550.tar.gz
Update cpuflags to 1.43
Handle '(' & ')' in cpuctl output Note that for modern gcc -march=native may be a better alternative
Diffstat (limited to 'devel')
-rw-r--r--devel/cpuflags/DESCR8
-rw-r--r--devel/cpuflags/Makefile5
-rwxr-xr-xdevel/cpuflags/files/subr_NetBSD6
3 files changed, 12 insertions, 7 deletions
diff --git a/devel/cpuflags/DESCR b/devel/cpuflags/DESCR
index bd9da12fa8c..d3d07fbeb2f 100644
--- a/devel/cpuflags/DESCR
+++ b/devel/cpuflags/DESCR
@@ -1,2 +1,6 @@
-cpuflags returns the appropriate gcc flags to optimise compilation for the
-current CPU.
+cpuflags returns the appropriate gcc flags to optimise compilation
+for the current CPU.
+
+With modern gcc it is probably best to just set -march=native for
+at least x86, but cpuflags may still be useful for older and less
+usual architectures
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile
index c19bb05bb5c..059094fed12 100644
--- a/devel/cpuflags/Makefile
+++ b/devel/cpuflags/Makefile
@@ -1,12 +1,13 @@
-# $NetBSD: Makefile,v 1.152 2015/01/04 04:48:10 dholland Exp $
+# $NetBSD: Makefile,v 1.153 2016/01/28 19:11:30 abs Exp $
-DISTNAME= cpuflags-1.42
+DISTNAME= cpuflags-1.43
CATEGORIES= devel sysutils
MASTER_SITES= # empty
DISTFILES= # empty
MAINTAINER= abs@NetBSD.org
COMMENT= Determine compiler flags to best target current cpu
+LICENSE= 2-clause-bsd
# each OS needs explicit support (files/subr_*)
ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-* SunOS-*-* FreeBSD-*-* Darwin-*-*
diff --git a/devel/cpuflags/files/subr_NetBSD b/devel/cpuflags/files/subr_NetBSD
index 6beb4d9d15c..11b5c2863cf 100755
--- a/devel/cpuflags/files/subr_NetBSD
+++ b/devel/cpuflags/files/subr_NetBSD
@@ -1,4 +1,4 @@
-# $NetBSD: subr_NetBSD,v 1.12 2010/12/05 11:19:39 abs Exp $
+# $NetBSD: subr_NetBSD,v 1.13 2016/01/28 19:11:30 abs Exp $
AWK=awk
SED=sed
@@ -44,9 +44,10 @@ extract_x86_cpu_vars()
# cpu_name="NAME" taken from the first cpu0: line
# cpu_brand="BRAND" the CPU branding string
echo "$cpu_details" | $AWK '
+ { gsub("[()]","") }
{ if (/cpu0:/ && !n) { sub("cpu0: ",""); n=1; print "cpu_name=\""$0"\"" } }
/cpu0: ".*"/ { sub("[^\"]*", ""); print "cpu_brand="$0 }
- /cpu0: features/ {
+ /cpu0: features\d?/ {
sub(".*<","");
sub(">.*","");
gsub("[^,A-Z0-9]","_");
@@ -57,7 +58,6 @@ extract_x86_cpu_vars()
/cpu0: family/ {
for (i = 2; i < NF; i = i + 2) {
f=$(i+1);
- sub(/^0/, "", f);
print "cpu_"$i"="f
}
}