diff options
author | abs <abs@pkgsrc.org> | 2003-06-06 15:26:48 +0000 |
---|---|---|
committer | abs <abs@pkgsrc.org> | 2003-06-06 15:26:48 +0000 |
commit | d7e0193c6b46b8d0b9ac82fdc45b031f495ff5b0 (patch) | |
tree | fc10b8cdcfc518dea7f8e956b410f74af481634f /devel | |
parent | 10388433ef88712d1baaedc04060714db52851a0 (diff) | |
download | pkgsrc-d7e0193c6b46b8d0b9ac82fdc45b031f495ff5b0.tar.gz |
Update cpuflags to 0.45:
- Detect fpuless mac68k boxes and add -msoft-float
- Check ${USETOOLS} to avoid setting gcc3 flags when compiling NetBSD
userland with built in tools, but with gcc3 installed
- Default to -O3 again for all except perl5 and perl58 under gcc3
Diffstat (limited to 'devel')
-rw-r--r-- | devel/cpuflags/Makefile | 4 | ||||
-rwxr-xr-x | devel/cpuflags/files/cpuflags.NetBSD | 9 | ||||
-rw-r--r-- | devel/cpuflags/files/cpuflags.mk | 7 | ||||
-rw-r--r-- | devel/cpuflags/files/optimize_gcc.mk | 21 |
4 files changed, 28 insertions, 13 deletions
diff --git a/devel/cpuflags/Makefile b/devel/cpuflags/Makefile index 244a1d98f68..46343612c4c 100644 --- a/devel/cpuflags/Makefile +++ b/devel/cpuflags/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.46 2003/06/03 20:41:15 salo Exp $ +# $NetBSD: Makefile,v 1.47 2003/06/06 15:26:48 abs Exp $ # -DISTNAME= cpuflags-0.44 +DISTNAME= cpuflags-0.45 CATEGORIES= sysutils MASTER_SITES= # empty DISTFILES= # empty diff --git a/devel/cpuflags/files/cpuflags.NetBSD b/devel/cpuflags/files/cpuflags.NetBSD index 46cf41a7949..bbe5cfe2d26 100755 --- a/devel/cpuflags/files/cpuflags.NetBSD +++ b/devel/cpuflags/files/cpuflags.NetBSD @@ -1,5 +1,5 @@ #!/bin/sh -# $NetBSD: cpuflags.NetBSD,v 1.38 2003/06/03 20:45:25 salo Exp $ +# $NetBSD: cpuflags.NetBSD,v 1.39 2003/06/06 15:26:49 abs Exp $ if [ -x /sbin/sysctl ] ;then SYSCTL=/sbin/sysctl @@ -77,7 +77,12 @@ case $hw_machine_arch in *\(68030*) FLAGS='-m68030' ;; # Mac LC III *\(68040*) FLAGS='-m68040' ;; # Untested *\(68060*) FLAGS='-m68060' ;; # Upgr amiga 3000 - esac ;; + esac + case "`egrep '^fpu0 ' /var/run/dmesg.boot`" in + *\(emulator\)*) FLAGS="$FLAGS -msoft-float" ;; + *\(no\ math\ support\)*) FLAGS="$FLAGS -msoft-float" ;; + esac + ;; mipseb|mipsel) # cpu0 at mainbus0: QED R4600 Orion CPU (0x2020) Rev. 2.0 with ... diff --git a/devel/cpuflags/files/cpuflags.mk b/devel/cpuflags/files/cpuflags.mk index 41963cbbd1c..08cdea26a09 100644 --- a/devel/cpuflags/files/cpuflags.mk +++ b/devel/cpuflags/files/cpuflags.mk @@ -1,4 +1,4 @@ -# $Id: cpuflags.mk,v 1.8 2003/05/29 11:45:50 abs Exp $ +# $Id: cpuflags.mk,v 1.9 2003/06/06 15:26:50 abs Exp $ # Makefile include fragment to simplify use of cpuflags in pkgsrc # abs@netbsd.org - freely distributable, no warrenties, stick no bills. @@ -14,7 +14,12 @@ .ifndef CPU_FLAGS +.if defined(BSD_PKG_MK) || ${USETOOLS:Uyes} == "no" CPU_FLAGS!=/usr/pkg/bin/cpuflags ${CC} +.else +CPU_FLAGS!=/usr/pkg/bin/cpuflags +.endif + CPU_DIR!=echo ${CPU_FLAGS} | sed 's/ //' MAKEFLAGS+=CPU_FLAGS=${CPU_FLAGS} CPU_DIR="${CPU_DIR}" # For sub makes diff --git a/devel/cpuflags/files/optimize_gcc.mk b/devel/cpuflags/files/optimize_gcc.mk index 572e86ce76f..e4cf27dd44a 100644 --- a/devel/cpuflags/files/optimize_gcc.mk +++ b/devel/cpuflags/files/optimize_gcc.mk @@ -1,4 +1,4 @@ -# $Id: optimize_gcc.mk,v 1.1 2003/05/29 11:45:50 abs Exp $ +# $Id: optimize_gcc.mk,v 1.2 2003/06/06 15:26:50 abs Exp $ # This file is 'experimental' - which is doublespeak for unspeakably # ugly, and probably quite broken by design. @@ -8,13 +8,10 @@ # compile some code, and even generate curdled binaries. It is completely # unsupported. Any questions should be directed to <abs@netbsd.org>. -.if (${MACHINE} == sparc64) -COPT_FLAGS= -.elif defined(USE_GCC3) -# With at least -march=k6-2, gcc 3.3 breaks with -frename-registers (in -O3) -COPT_FLAGS=-O2 -finline-functions -.else +.if defined(USE_GCC3) || (${MACHINE} != sparc64) COPT_FLAGS=-O3 +.else +COPT_FLAGS= .endif .ifdef BSD_PKG_MK # Try to catch various package opts @@ -28,23 +25,29 @@ PKGBASE=${.CURDIR:C:.*/::} .endif .endif -COPT_FLAGS+=-ffast-math +COPT_FLAGS+=-ffast-math -fomit-frame-pointer PKG_EXCLUDE_OMIT_FRAME_POINTER=lua4 .if defined(USE_GCC3) PKG_EXCLUDE_OMIT_FRAME_POINTER+=mozilla phoenix qt3-libs kdeedu3 +PKG_EXCLUDE_O3+=perl5 perl58 .endif .if empty(PKG_EXCLUDE_OMIT_FRAME_POINTER:M${PKGBASE}) COPT_FLAGS+=-fomit-frame-pointer .endif +.if !empty(PKG_EXCLUDE_O3:M${PKGBASE}) +COPT_FLAGS:= ${COPT_FLAGS:S/-O3//} +.endif + CFLAGS+=${COPT_FLAGS} CXXFLAGS+=${COPT_FLAGS} MAKE_FLAGS+=CCOPTIONS="${COPT_FLAGS}" # Override CCOPTIONS for imake .else # Assume in base system, only COPTS +.if ${USETOOLS:Uyes} == "no" COPT_FLAGS+=-fomit-frame-pointer # Include ${DEFCOPTS} and set ?= to allow overriding in kernel builds .if !defined(COPTS) @@ -52,6 +55,8 @@ COPTS=${DEFCOPTS} ${COPT_FLAGS} .else COPTS+=${COPT_FLAGS} .endif +.endif + .if defined(USE_GCC3) DEFWARNINGS=no .endif |