From owner-freebsd-arch Thu Aug 1 12:33:38 2002 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 965F837B40A; Thu, 1 Aug 2002 12:33:35 -0700 (PDT) Received: from corbulon.video-collage.com (corbulon.video-collage.com [64.35.99.179]) by mx1.FreeBSD.org (Postfix) with ESMTP id 87D2B43E4A; Thu, 1 Aug 2002 12:33:34 -0700 (PDT) (envelope-from mi+mx@aldan.algebra.com) Received: from misha.murex.com (250-217.customer.cloud9.net [168.100.250.217]) by corbulon.video-collage.com (8.12.2/8.12.2) with ESMTP id g71JXUHV086534 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=FAIL); Thu, 1 Aug 2002 15:33:32 -0400 (EDT) (envelope-from mi+mx@aldan.algebra.com) X-Authentication-Warning: corbulon.video-collage.com: Host 250-217.customer.cloud9.net [168.100.250.217] claimed to be misha.murex.com Content-Type: text/plain; charset="windows-1251" From: Mikhail Teterin Organization: Virtual Estates, Inc. To: John Baldwin Subject: Re: march/mcpu in bsd.cpu.mk Date: Thu, 1 Aug 2002 15:33:56 -0400 User-Agent: KMail/1.4.2 Cc: arch@FreeBSD.org References: In-Reply-To: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200208011533.56864.mi+mx@aldan.algebra.com> X-Scanned-By: MIMEDefang 2.15 (www dot roaringpenguin dot com slash mimedefang) Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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