Date: 23 Jul 2002 21:14:34 -0700 From: John Merryweather Cooper <john_m_cooper@yahoo.com> To: Jesse Gross <jesse_gross@yahoo.com> Cc: stable@freebsd.org Subject: Re: USE_GCC=3.1 & CPUTYPE Message-ID: <1027484075.890.12.camel@johncoop.borgsdemons.com> In-Reply-To: <20020724034106.7104.qmail@web14105.mail.yahoo.com> References: <20020724034106.7104.qmail@web14105.mail.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Well, ALL the Ada ports cause problems if CFLAGS gets set to an -march
that adagcc can't handle. For a good test case for you, try out
devel/gvd. If -march ends up having a gcc 2.95x or later CPU argument,
it's guaranteed to choke. :) The GNAT port itself has been hacked to
ignore CFLAGS, but this denies the Ada compiler the use of -march in
it's libraries and code.
jmc
On Tue, 2002-07-23 at 20:41, Jesse Gross wrote:
> 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
--
_
| |V| / ' || MacroHard -- \
\_| | | \_, || the perfection of form over |
----------------------------------|| substance, marketing over |
Web: http://www.borgsdemons.com || performance, and greed over |
AIM: johnmcooper || design . . . |
=====================================================================/
Public Key: http://www.borgsdemons.com/Personal/pgpkey.asc |
=====================================================================\
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?1027484075.890.12.camel>
