From owner-freebsd-arch Sun Mar 4 17:58:38 2001 Delivered-To: freebsd-arch@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-158.dsl.lsan03.pacbell.net [63.207.60.158]) by hub.freebsd.org (Postfix) with ESMTP id D9DE837B719 for ; Sun, 4 Mar 2001 17:58:30 -0800 (PST) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 56A1266B09; Sun, 4 Mar 2001 17:58:30 -0800 (PST) Date: Sun, 4 Mar 2001 17:58:29 -0800 From: Kris Kennaway To: arch@FreeBSD.org Subject: Using CPUTYPE in COPTFLAGS Message-ID: <20010304175829.A45353@mollari.cthul.hu> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="2oS5YaxWCcQjTEyO" Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG --2oS5YaxWCcQjTEyO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Okay, here's the next step in the CPUTYPE integration: adding it to COPTFLAGS automatically. I also updated the default COPTFLAGS value to "-O -pipe" from "-O" to match the documentation and because it's just better. I would have liked to get this in to 4.3, but that's probably not going to happen because the changes need public airing first. Comments welcome. Kris Index: etc/defaults/make.conf =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/ncvs/src/etc/defaults/make.conf,v retrieving revision 1.148 diff -u -r1.148 make.conf --- etc/defaults/make.conf 2001/03/04 03:14:27 1.148 +++ etc/defaults/make.conf 2001/03/05 01:28:09 @@ -29,6 +29,7 @@ # #CPUTYPE=3Di686 #NO_CPU_CFLAGS=3D true # Don't add -march=3D to CFLAGS automatically +#NO_CPU_COPTFLAGS=3Dtrue # Don't add -march=3D to COPTFLAGS automatic= ally # # CFLAGS controls the compiler settings used when compiling C code. # Note that optimization settings above -O (-O2, ...) are not recommended Index: share/mk/bsd.cpu.mk =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/ncvs/src/share/mk/bsd.cpu.mk,v retrieving revision 1.2 diff -u -r1.2 bsd.cpu.mk --- share/mk/bsd.cpu.mk 2001/02/27 11:21:47 1.2 +++ share/mk/bsd.cpu.mk 2001/03/05 01:50:44 @@ -28,46 +28,52 @@ # after /etc/make.conf so it can react to the local value of CPUTYPE # defined therein. =20 -.if !defined(NO_CPU_CFLAGS) +.if !defined(NO_CPU_CFLAGS) || !defined(NO_CPU_COPTFLAGS) . if ${MACHINE_ARCH} =3D=3D "i386" . if ${CPUTYPE} =3D=3D "k7" -CFLAGS +=3D -march=3Dk6 # gcc doesn't support athlon yet, but it will +_CFLAGS =3D -march=3Dk6 # gcc doesn't support athlon yet, but it will . elif ${CPUTYPE} =3D=3D "k6-2" -CFLAGS +=3D -march=3Dk6 +_CFLAGS =3D -march=3Dk6 . elif ${CPUTYPE} =3D=3D "k6" -CFLAGS +=3D -march=3Dk6 +_CFLAGS =3D -march=3Dk6 . elif ${CPUTYPE} =3D=3D "k5" -CFLAGS +=3D -march=3Dpentium +_CFLAGS =3D -march=3Dpentium . elif ${CPUTYPE} =3D=3D "p4" -CFLAGS +=3D -march=3Dpentiumpro +_CFLAGS =3D -march=3Dpentiumpro . elif ${CPUTYPE} =3D=3D "p3" -CFLAGS +=3D -march=3Dpentiumpro +_CFLAGS =3D -march=3Dpentiumpro . elif ${CPUTYPE} =3D=3D "p2" -CFLAGS +=3D -march=3Dpentiumpro +_CFLAGS =3D -march=3Dpentiumpro . elif ${CPUTYPE} =3D=3D "i686" -CFLAGS +=3D -march=3Dpentiumpro +_CFLAGS =3D -march=3Dpentiumpro . elif ${CPUTYPE} =3D=3D "i586/mmx" -CFLAGS +=3D -march=3Dpentium +_CFLAGS =3D -march=3Dpentium . elif ${CPUTYPE} =3D=3D "i586" -CFLAGS +=3D -march=3Dpentium +_CFLAGS =3D -march=3Dpentium . elif ${CPUTYPE} =3D=3D "i486" -CFLAGS +=3D -m486 +_CFLAGS =3D -m486 . endif . elif ${MACHINE_ARCH} =3D=3D "alpha" . if ${CPUTYPE} =3D=3D "ev6" -CFLAGS +=3D -mcpu=3Dev6 +_CFLAGS =3D -mcpu=3Dev6 . elif ${CPUTYPE} =3D=3D "pca56" -CFLAGS +=3D -mcpu=3Dpca56 +_CFLAGS =3D -mcpu=3Dpca56 . elif ${CPUTYPE} =3D=3D "ev56" -CFLAGS +=3D -mcpu=3Dev56 +_CFLAGS =3D -mcpu=3Dev56 . elif ${CPUTYPE} =3D=3D "ev5" -CFLAGS +=3D -mcpu=3Dev5 +_CFLAGS =3D -mcpu=3Dev5 . elif ${CPUTYPE} =3D=3D "ev45" -CFLAGS +=3D -mcpu=3Dev4 # No -mcpu=3Dev45 for gcc +_CFLAGS =3D -mcpu=3Dev4 # No -mcpu=3Dev45 for gcc . elif ${CPUTYPE} =3D=3D "ev4" -CFLAGS +=3D -mcpu=3Dev4 +_CFLAGS =3D -mcpu=3Dev4 . endif . endif +.endif + +# NB: COPTFLAGS is handled in /usr/src/sys/conf/Makefile. + +.if !defined(NO_CPU_CFLAGS) +CFLAGS +=3D ${_CFLAGS} .endif =20 # Set up the list of CPU features based on the CPU type. This is an Index: sys/conf/Makefile.alpha =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/ncvs/src/sys/conf/Makefile.alpha,v retrieving revision 1.92 diff -u -r1.92 Makefile.alpha --- sys/conf/Makefile.alpha 2001/02/25 07:51:18 1.92 +++ sys/conf/Makefile.alpha 2001/03/05 01:54:56 @@ -37,7 +37,10 @@ SIZE?=3D size OBJCOPY?=3D objcopy =20 -COPTFLAGS?=3D-O +COPTFLAGS?=3D-O -pipe +.if !defined(NO_CPU_COPTFLAGS) +COPTFLAGS+=3D ${_CFLAGS} +.endif INCLUDES=3D -nostdinc -I- ${INCLMAGIC} -I. -I$S -I$S/dev # This hack is to allow kernel compiles to succeed on machines w/out srcdi= st .if exists($S/../include) Index: sys/conf/Makefile.i386 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/ncvs/src/sys/conf/Makefile.i386,v retrieving revision 1.225 diff -u -r1.225 Makefile.i386 --- sys/conf/Makefile.i386 2001/02/25 07:51:19 1.225 +++ sys/conf/Makefile.i386 2001/03/05 01:54:45 @@ -37,7 +37,10 @@ SIZE?=3D size OBJCOPY?=3D objcopy =20 -COPTFLAGS?=3D-O +COPTFLAGS?=3D-O -pipe +.if !defined(NO_CPU_COPTFLAGS) +COPTFLAGS+=3D ${_CFLAGS} +.endif INCLUDES=3D -nostdinc -I- ${INCLMAGIC} -I. -I$S -I$S/dev # This hack is to allow kernel compiles to succeed on machines w/out srcdi= st .if exists($S/../include) Index: sys/conf/Makefile.ia64 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/ncvs/src/sys/conf/Makefile.ia64,v retrieving revision 1.14 diff -u -r1.14 Makefile.ia64 --- sys/conf/Makefile.ia64 2001/02/12 05:55:33 1.14 +++ sys/conf/Makefile.ia64 2001/03/05 01:55:18 @@ -47,7 +47,10 @@ SIZE?=3D size OBJCOPY?=3D objcopy =20 -COPTFLAGS?=3D-O +COPTFLAGS?=3D-O -pipe +.if !defined(NO_CPU_COPTFLAGS) +COPTFLAGS+=3D ${_CFLAGS} +.endif INCLUDES=3D -nostdinc -I- ${INCLMAGIC} -I. -I$S -I$S/dev # This hack is to allow kernel compiles to succeed on machines w/out srcdi= st .if exists($S/../include) Index: sys/conf/Makefile.pc98 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /mnt/ncvs/src/sys/conf/Makefile.pc98,v retrieving revision 1.124 diff -u -r1.124 Makefile.pc98 --- sys/conf/Makefile.pc98 2001/02/25 07:51:19 1.124 +++ sys/conf/Makefile.pc98 2001/03/05 01:55:08 @@ -39,7 +39,10 @@ SIZE?=3D size OBJCOPY?=3D objcopy =20 -COPTFLAGS?=3D-O +COPTFLAGS?=3D-O -pipe +.if !defined(NO_CPU_COPTFLAGS) +COPTFLAGS+=3D ${_CFLAGS} +.endif INCLUDES=3D -nostdinc -I- ${INCLMAGIC} -I. -I$S -I$S/dev # This hack is to allow kernel compiles to succeed on machines w/out srcdi= st .if exists($S/../include) --2oS5YaxWCcQjTEyO Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.4 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE6ovLFWry0BWjoQKURAna0AKC8tcLSHcrJDXQiT5H+VfqEO76BIQCfd7at ZsAaOwuDB9iB1pxXdghLPns= =ZNT7 -----END PGP SIGNATURE----- --2oS5YaxWCcQjTEyO-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message