diff options
author | abs <abs> | 2005-04-29 12:56:05 +0000 |
---|---|---|
committer | abs <abs> | 2005-04-29 12:56:05 +0000 |
commit | 09eff19472dd4301183f199e067b9eba19836a10 (patch) | |
tree | ce11f0464cd5ad252663eb5536a8b514e9efc92c /devel | |
parent | e5161f8f493c090e21eb35a7011a05a835b6a847 (diff) | |
download | pkgsrc-09eff19472dd4301183f199e067b9eba19836a10.tar.gz |
Update cpuflags to 0.86:
Add Linux 'Pentium III (Katmai)' - from Toni Viemero
Remove some outdated gcc references from manpage
Clarify the mk examples are BSD makefile specific
Add a basic Makefile for out-of-pkgsrc usage
Diffstat (limited to 'devel')
-rw-r--r-- | devel/cpuflags/Makefile | 20 | ||||
-rw-r--r-- | devel/cpuflags/files/Makefile | 22 | ||||
-rw-r--r-- | devel/cpuflags/files/cpuflags.1 | 19 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.Linux | 3 |
4 files changed, 33 insertions, 31 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile index c0b1a2fe306..eeb47c39fa6 100644 --- a/devel/cpuflags/Makefile +++ b/devel/cpuflags/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.88 2005/04/27 10:55:21 abs Exp $ +# $NetBSD: Makefile,v 1.89 2005/04/29 12:56:05 abs Exp $ # -DISTNAME= cpuflags-0.85 +DISTNAME= cpuflags-0.86 CATEGORIES= sysutils MASTER_SITES= # empty DISTFILES= # empty @@ -11,24 +11,12 @@ COMMENT= Determine compiler flags to best target current cpu ONLY_FOR_PLATFORM= NetBSD-*-* Linux-*-* SunOS-*-* -EXTRACT_ONLY= # empty USE_LANGUAGES= # empty NO_CHECKSUM= yes NO_CONFIGURE= yes -FILES_SUBST+= PREFIX="${PREFIX}" - -do-build: +do-extract: ${MKDIR} ${WRKSRC} -.for FILE in cpuflags.1 cpuflags.mk - ${SED} -e 's|@PREFIX@|${PREFIX}|g' ${FILESDIR}/${FILE} \ - > ${WRKSRC}/${FILE} -.endfor - -do-install: - ${INSTALL_SCRIPT} ${FILESDIR}/cpuflags.${OPSYS} ${PREFIX}/bin/cpuflags - ${INSTALL_DATA} ${FILESDIR}/optimize_gcc.mk ${PREFIX}/share/mk/optimize_gcc.mk - ${INSTALL_DATA} ${WRKSRC}/cpuflags.mk ${PREFIX}/share/mk/cpuflags.mk - ${INSTALL_MAN} ${WRKSRC}/cpuflags.1 ${PREFIX}/man/man1/cpuflags.1 + ${CP} ${FILESDIR}/Makefile ${FILESDIR}/*.* ${WRKSRC} .include "../../mk/bsd.pkg.mk" diff --git a/devel/cpuflags/files/Makefile b/devel/cpuflags/files/Makefile new file mode 100644 index 00000000000..974465de0ef --- /dev/null +++ b/devel/cpuflags/files/Makefile @@ -0,0 +1,22 @@ +# $Id: Makefile,v 1.1 2005/04/29 12:56:05 abs Exp $ + +PREFIX?=/usr/local +OPSYS?=`uname` + +MANDIR?=${PREFIX}/man/man1 +MKDIR?=${PREFIX}/share/mk +BINDIR?=${PREFIX}/bin + +all: + sed -e 's|@PREFIX@|${PREFIX}|g' cpuflags.1 > cpuflags.1.out + sed -e 's|@PREFIX@|${PREFIX}|g' cpuflags.mk > cpuflags.mk.out + +clean: + rm -f *.out + +install: + mkdir -p ${BINDIR} ${MANDIR} ${MKDIR} + install cpuflags.${OPSYS} ${BINDIR}/cpuflags + install cpuflags.1.out ${MANDIR}/cpuflags.1 + install optimize_gcc.mk ${MKDIR}/optimize_gcc.mk + install cpuflags.mk.out ${MKDIR}/cpuflags.mk diff --git a/devel/cpuflags/files/cpuflags.1 b/devel/cpuflags/files/cpuflags.1 index 8e1def93edb..d2fc80591e3 100644 --- a/devel/cpuflags/files/cpuflags.1 +++ b/devel/cpuflags/files/cpuflags.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: cpuflags.1,v 1.14 2004/03/17 00:40:24 wiz Exp $ +.\" $NetBSD: cpuflags.1,v 1.15 2005/04/29 12:56:05 abs Exp $ .Dd May 31, 2001 .Dt CPUFLAGS 1 .Os @@ -10,7 +10,7 @@ .Op cc_pathname .Sh DESCRIPTION .Nm -queries the current cpu type and gcc version, then outputs appropriate +detemines the current cpu type and gcc version, then outputs appropriate compiler options to best target code for that cpu. If no options exist to target the current cpu then nothing is output. .Pp @@ -22,7 +22,7 @@ is not specified it defaults to the first .Pa cc found in the path. .Sh ENVIRONMENT -The makefile fragment +The BSD makefile fragment .Pa @PREFIX@/share/mk/cpuflags.mk will set the following .Xr make 1 @@ -59,20 +59,10 @@ kernel or userland by adding the following to .sinclude "@PREFIX@/share/mk/cpuflags.mk" .Ed .Pp -Those desiring further optimisation can install the lang/gcc3 package, and -add the following to -.Pa /etc/mk.conf -instead: -.Bd -literal -offset indent - .sinclude "@PREFIX@/share/examples/gcc/mk.conf" - .sinclude "@PREFIX@/share/mk/cpuflags.mk" -.Ed -.Pp To experiment with optimisations that can break generated code there is optimize_gcc.mk. This is unsupported, but for full effect add the following to .Pa /etc/mk.conf : .Bd -literal -offset indent - .sinclude "@PREFIX@/share/examples/gcc/mk.conf" .sinclude "@PREFIX@/share/mk/cpuflags.mk" .sinclude "@PREFIX@/share/mk/optimize_gcc.mk" .Ed @@ -87,7 +77,8 @@ CFLAGS+=-pipe .Nm still needs to learn about more cpu types - updates welcomed to -.Aq abs@NetBSD.org . +.Aq abs@NetBSD.org . Also the Makefile fragments and examples are BSD make +specific - gmake examples welcomed. .Pp Currently .Nm diff --git a/devel/cpuflags/files/cpuflags.Linux b/devel/cpuflags/files/cpuflags.Linux index 723436d6541..f9fdf8fe860 100755 --- a/devel/cpuflags/files/cpuflags.Linux +++ b/devel/cpuflags/files/cpuflags.Linux @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: cpuflags.Linux,v 1.14 2005/04/27 10:55:21 abs Exp $ +# $NetBSD: cpuflags.Linux,v 1.15 2005/04/29 12:56:05 abs Exp $ PATH=/sbin:/usr/sbin:/bin:/usr/bin:$PATH AWK=awk @@ -32,6 +32,7 @@ case $hw_machine_arch in "AMD Duron(TM)") FLAGS='-march=athlon' ;; "AMD Athlon(tm) XP "*) FLAGS='-march=athlon-xp' ;; "Celeron (Coppermine)") FLAGS='-march=pentium3' ;; + "Pentium III (Katmai)") FLAGS='-march=pentium3' ;; "Pentium III (Coppermine)") FLAGS='-march=pentium3' ;; "Intel(R) Pentium(R) III Mobile CPU"*) FLAGS='-march=pentium3m' ;; "Intel(R) Pentium(R) M processor"*) FLAGS='-march=pentium3m' ;; |