From owner-freebsd-arch@FreeBSD.ORG Sat Jun 21 23:45:29 2003 Return-Path: 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 0F64937B401 for ; Sat, 21 Jun 2003 23:45:29 -0700 (PDT) Received: from HAL9000.homeunix.com (ip114.bella-vista.sfo.interquest.net [66.199.86.114]) by mx1.FreeBSD.org (Postfix) with ESMTP id A0F2243FB1 for ; Sat, 21 Jun 2003 23:45:27 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.9) with ESMTP id h5M6jMJa061263; Sat, 21 Jun 2003 23:45:23 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.9/Submit) id h5M6jMM3061262; Sat, 21 Jun 2003 23:45:22 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 21 Jun 2003 23:45:22 -0700 From: David Schultz To: Marcel Moolenaar Message-ID: <20030622064521.GA61030@HAL9000.homeunix.com> Mail-Followup-To: Marcel Moolenaar , arch@freebsd.org References: <20030622005124.GA59673@HAL9000.homeunix.com> <20030622045529.GA80446@dhcp01.pn.xcllnt.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030622045529.GA80446@dhcp01.pn.xcllnt.net> cc: arch@FreeBSD.ORG Subject: Re: Per-source CFLAGS X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 22 Jun 2003 06:45:29 -0000 On Sat, Jun 21, 2003, Marcel Moolenaar wrote: > On Sat, Jun 21, 2003 at 05:51:24PM -0700, David Schultz wrote: > > The following patch adds support for per-file CFLAGS, which gets > > appended to the command line after the global CFLAGS. > > Per file compilation options are in direct conflict with make > invocator control, by way of it being a makefile writer knob. > Put differently: it's a feature for developers, not builders. > We already see the problem with that when we define CFLAGS on > the make command line, rather than in the environment. I'm > not opposed to per-file options, but it seems to push the > need to split make invocator knobs from makefile writer knobs. > Until we have such seperation, I request that per-file options > be made conditional so that make invocators still have control > without being powerless. I expect that this feature would not be used except in very special cases, and I would be opposed to gratuitous use of it. In fact, most of these cases are so special that the relevant file probably won't even work without the extra option. For example, Peter mentioned a while ago that vfprintf.c was causing an ICE unless -O was turned off. Since these things are only used selectively, it only makes sense to disable them selectively. For instance, if we set it on two files to temporarily work around a gcc bug, and on another file because it's vendor code that we don't want to see warnings for, a big knob that says ``Turn off all the special cases'' wouldn't make much sense. However, if what you're looking for is the ability to say GDTOA_WARNS=YES in your make.conf, that can certainly be done on a case by case basis. Would this satisfy your concerns? I realize it isn't perfect, but I'm not prepared to rewrite the entire build infrastructure over an issue (gdtoa warnings) that I don't really want to deal with. I already tried getting the vendor to conform to GNU's preferred style, and I already tried convincing people that gdtoa doesn't really have to be vendor code, but to no avail.