Date: Tue, 23 Jul 2002 20:41:06 -0700 (PDT) From: Jesse Gross <jesse_gross@yahoo.com> To: john_m_cooper@yahoo.com Cc: stable@freebsd.org Subject: Re: USE_GCC=3.1 & CPUTYPE Message-ID: <20020724034106.7104.qmail@web14105.mail.yahoo.com> In-Reply-To: <1027461176.528.3.camel@johncoop.borgsdemons.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Here is what I have come up with. This will use the newer CPU targets if GCC 3.1 is being used either by a port or in make.conf. Otherwise if the stock compiler is being used the old targets are used. It will not break compatibility in anyway that I know of. I realize that it is prefered for new stuff to go in -current, but this is not applicable due to the fact that -current uses GCC 3.1 as the stock compiler. Since this is a patch to -stable, I would appreciate if people would beat on it some and tell me about it. As far as the Ada stuff goes, is there a specific port that causes problems or something else I can look at? Jesse Gross Index: bsd.cpu.mk =================================================================== RCS file: /home/ncvs/src/share/mk/bsd.cpu.mk,v retrieving revision 1.2.2.5 diff -u -3 -p -r1.2.2.5 bsd.cpu.mk --- bsd.cpu.mk 2002/07/19 08:09:32 1.2.2.5 +++ bsd.cpu.mk 2002/07/24 03:32:45 @@ -28,28 +28,66 @@ CPUTYPE = k7 .if !defined(NO_CPU_CFLAGS) || !defined(NO_CPU_COPTFLAGS) . if ${MACHINE_ARCH} == "i386" -. if ${CPUTYPE} == "k7" -_CPUCFLAGS = -march=k6 # gcc doesn't support athlon yet, but it will -. elif ${CPUTYPE} == "k6-2" +. if ${CC}==gcc31 && ${CXX}==g++31 # If GCC 3.1 is being used, new CPU targets can be used +. if ${CPUTYPE} == "athlon-xp" +_CPUCFLAGS = -march=athlon-xp +. elif ${CPUTYPE} == "athlon-mp" +_CPUCFLAGS = -march=athlon-mp +. elif ${CPUTYPE} == "athlon-4" +_CPUCFLAGS = -march=athlon-4 +. elif ${CPUTYPE} == "k7" +_CPUCFLAGS = -march=athlon +. elif ${CPUTYPE} == "k6-2" +_CPUCFLAGS = -march=k6-2 +. elif ${CPUTYPE} == "k6" _CPUCFLAGS = -march=k6 -. elif ${CPUTYPE} == "k6" +. elif ${CPUTYPE} == "k5" +_CPUCFLAGS = -march=pentium +. elif ${CPUTYPE} == "p4" +_CPUCFLAGS = -march=pentium4 +. elif ${CPUTYPE} == "p3" +_CPUCFLAGS = -march=pentium3 +. elif ${CPUTYPE} == "p2" +_CPUCFLAGS = -march=pentium2 +. elif ${CPUTYPE} == "i686" +_CPUCFLAGS = -march=pentiumpro +. elif ${CPUTYPE} == "i586/mmx" +_CPUCFLAGS = -march=pentium-mmx +. elif ${CPUTYPE} == "i586" +_CPUCFLAGS = -march=pentium +. elif ${CPUTYPE} == "i486" +_CPUCFLAGS = -march=i486 +. endif +. else +. if ${CPUTYPE} == "athlon-xp" +_CPUCFLAGS = -march=k6 +. elif ${CPUTYPE} == "athlon-mp" +_CPUCFLAGS = -march=k6 +. elif ${CPUTYPE} == "athlon-4" +_CPUCFLAGS = -march=k6 +. elif ${CPUTYPE} == "k7" +_CPUCFLAGS = -march=k6 +. elif ${CPUTYPE} == "k6-2" +_CPUCFLAGS = -march=k6 +. elif ${CPUTYPE} == "k6" _CPUCFLAGS = -march=k6 -. elif ${CPUTYPE} == "k5" +. elif ${CPUTYPE} == "k5" _CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "p4" +. elif ${CPUTYPE} == "p4" _CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "p3" +. elif ${CPUTYPE} == "p3" _CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "p2" +. elif ${CPUTYPE} == "p2" _CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "i686" +. elif ${CPUTYPE} == "i686" _CPUCFLAGS = -march=pentiumpro -. elif ${CPUTYPE} == "i586/mmx" +. elif ${CPUTYPE} == "i586/mmx" _CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "i586" +. elif ${CPUTYPE} == "i586" _CPUCFLAGS = -march=pentium -. elif ${CPUTYPE} == "i486" +. elif ${CPUTYPE} == "i486" _CPUCFLAGS = -march=i486 +. endif . endif . elif ${MACHINE_ARCH} == "alpha" . if ${CPUTYPE} == "ev6" Index: make.conf =================================================================== RCS file: /home/ncvs/src/etc/defaults/Attic/make.conf,v retrieving revision 1.97.2.70 diff -u -3 -p -r1.97.2.70 make.conf --- make.conf 2002/07/18 13:34:52 1.97.2.70 +++ make.conf 2002/07/24 03:35:51 @@ -22,7 +22,7 @@ # NO_CPU_CFLAGS variable below. # Currently the following CPU types are recognized: # Intel x86 architecture: -# (AMD CPUs) k7 k6-2 k6 k5 +# (AMD CPUs) athlon-xp athlon-mp athlon-4 k7 k6-2 k6 k5 # (Intel CPUs) p4 p3 p2 i686 i586/mmx i586 i486 i386 # Alpha/AXP architecture: ev6 pca56 ev56 ev5 ev45 ev4 # __________________________________________________ Do You Yahoo!? Yahoo! Health - Feel better, live better http://health.yahoo.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020724034106.7104.qmail>