Date: Sun, 4 Mar 2001 18:09:11 -0800 From: Kris Kennaway <kris@obsecurity.org> To: Kris Kennaway <kris@obsecurity.org> Cc: arch@FreeBSD.org Subject: Re: Using CPUTYPE in COPTFLAGS Message-ID: <20010304180911.A45581@mollari.cthul.hu> In-Reply-To: <20010304175829.A45353@mollari.cthul.hu>; from kris@obsecurity.org on Sun, Mar 04, 2001 at 05:58:29PM -0800 References: <20010304175829.A45353@mollari.cthul.hu>
next in thread | previous in thread | raw e-mail | index | archive | help
--ibTvN161/egqYuK8 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable David O'Brien suggested s/_CFLAGS/CPUCFLAGS/. Updated patch attached. 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<cpu> to CFLAGS automatically +#NO_CPU_COPTFLAGS=3Dtrue # Don't add -march=3D<cpu> 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 +CPUCFLAGS =3D -march=3Dk6 # gcc doesn't support athlon yet, but it will . elif ${CPUTYPE} =3D=3D "k6-2" -CFLAGS +=3D -march=3Dk6 +CPUCFLAGS =3D -march=3Dk6 . elif ${CPUTYPE} =3D=3D "k6" -CFLAGS +=3D -march=3Dk6 +CPUCFLAGS =3D -march=3Dk6 . elif ${CPUTYPE} =3D=3D "k5" -CFLAGS +=3D -march=3Dpentium +CPUCFLAGS =3D -march=3Dpentium . elif ${CPUTYPE} =3D=3D "p4" -CFLAGS +=3D -march=3Dpentiumpro +CPUCFLAGS =3D -march=3Dpentiumpro . elif ${CPUTYPE} =3D=3D "p3" -CFLAGS +=3D -march=3Dpentiumpro +CPUCFLAGS =3D -march=3Dpentiumpro . elif ${CPUTYPE} =3D=3D "p2" -CFLAGS +=3D -march=3Dpentiumpro +CPUCFLAGS =3D -march=3Dpentiumpro . elif ${CPUTYPE} =3D=3D "i686" -CFLAGS +=3D -march=3Dpentiumpro +CPUCFLAGS =3D -march=3Dpentiumpro . elif ${CPUTYPE} =3D=3D "i586/mmx" -CFLAGS +=3D -march=3Dpentium +CPUCFLAGS =3D -march=3Dpentium . elif ${CPUTYPE} =3D=3D "i586" -CFLAGS +=3D -march=3Dpentium +CPUCFLAGS =3D -march=3Dpentium . elif ${CPUTYPE} =3D=3D "i486" -CFLAGS +=3D -m486 +CPUCFLAGS =3D -m486 . endif . elif ${MACHINE_ARCH} =3D=3D "alpha" . if ${CPUTYPE} =3D=3D "ev6" -CFLAGS +=3D -mcpu=3Dev6 +CPUCFLAGS =3D -mcpu=3Dev6 . elif ${CPUTYPE} =3D=3D "pca56" -CFLAGS +=3D -mcpu=3Dpca56 +CPUCFLAGS =3D -mcpu=3Dpca56 . elif ${CPUTYPE} =3D=3D "ev56" -CFLAGS +=3D -mcpu=3Dev56 +CPUCFLAGS =3D -mcpu=3Dev56 . elif ${CPUTYPE} =3D=3D "ev5" -CFLAGS +=3D -mcpu=3Dev5 +CPUCFLAGS =3D -mcpu=3Dev5 . elif ${CPUTYPE} =3D=3D "ev45" -CFLAGS +=3D -mcpu=3Dev4 # No -mcpu=3Dev45 for gcc +CPUCFLAGS =3D -mcpu=3Dev4 # No -mcpu=3Dev45 for gcc . elif ${CPUTYPE} =3D=3D "ev4" -CFLAGS +=3D -mcpu=3Dev4 +CPUCFLAGS =3D -mcpu=3Dev4 . endif . endif +.endif + +# NB: COPTFLAGS is handled in /usr/src/sys/conf/Makefile.<arch> + +.if !defined(NO_CPU_CFLAGS) +CFLAGS +=3D ${CPUCFLAGS} .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 ${CPUCFLAGS} +.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 ${CPUCFLAGS} +.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 ${CPUCFLAGS} +.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 ${CPUCFLAGS} +.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) --ibTvN161/egqYuK8 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 iD8DBQE6ovVGWry0BWjoQKURAinnAKDsvyjAe3Ou6jlhKU4Y5T109BTfywCeNpPT iFmeqb//nilOXlshdMnE36s= =O2dD -----END PGP SIGNATURE----- --ibTvN161/egqYuK8-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010304180911.A45581>