Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 1 Aug 2002 15:33:56 -0400
From:      Mikhail Teterin <mi+mx@aldan.algebra.com>
To:        John Baldwin <jhb@FreeBSD.org>
Cc:        arch@FreeBSD.org
Subject:   Re: march/mcpu in bsd.cpu.mk
Message-ID:  <200208011533.56864.mi%2Bmx@aldan.algebra.com>
In-Reply-To: <XFMail.20020801131910.jhb@FreeBSD.org>
References:  <XFMail.20020801131910.jhb@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thursday 01 August 2002 01:19 pm, John Baldwin wrote:
= On 01-Aug-2002 Mikhail Teterin wrote:
= > Index: bsd.cpu.mk
= > ===================================================================
= > RCS file: /home/ncvs/src/share/mk/bsd.cpu.mk,v
= > retrieving revision 1.15
= > diff -U2 -r1.15 bsd.cpu.mk
= > --- bsd.cpu.mk        2002/07/31 03:56:03     1.15
= > +++ bsd.cpu.mk        2002/08/01 15:09:35
= > @@ -11,5 +11,5 @@
= >  # may tune support for more advanced processors.
= >
= > -.if !defined(CPUTYPE) || ${CPUTYPE} == ""
= > +.if (!defined(CPUTYPE) || ${CPUTYPE} == "") && ${CFLAGS:M-cpu=*} == ""
=
= This doesn't work on non-i386 and assumes too much about what the
= contents on _CPU_CFLAGS will be on other archs even if you did fix it
= to work with the settings we currently use now.

I think, it is fairly easy to make it support all things _CPU_CFLAGS may
try to contain in the future. Whatever is being added to the _CPU_CFLAGS
(mmx, sse) can first be checked for.

= You have no way of knowing that the user is using some other option
= that doesn't match that pattern that conflicts with _CPU_CFLAGS.

At least, this would cover the most blatant cases...

= CPUTYPE is optional, and part of CPUTYPE are the NO_CPU_CFLAGS and
= NO_CPU_COPTFLAGS variables which are very clearly documented right
= beside CPUTYPE in /usr/share/examples/etc/make.conf as I have already
= pointed out to you.

You have. And I responded to you, that /usr/share/examples/etc/make.conf
is fairly obscure, and that this flags are not (yet?) in make.conf(5)
and appeared long after the CFLAGS, which, on my machine, for example,
contained -march=pentiumpro for _years_.

Also, the comments in examples/etc/make.conf, that you refer to, can be
taken to imply, that setting NO_CPU_CFLAGS will pessimize the OpenSSL
compilation... And even if the documentation is fixed, it will take a
while to propagate into the minds.

I'm not saying we should dump this flags completely. My point is, we
should be a little more careful and check for one more error condition
-- it is so easy... Such a simple principle -- before adding something,
check if it is not already there!

	-mi


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?200208011533.56864.mi%2Bmx>