From owner-freebsd-arch@FreeBSD.ORG Sun Jun 22 03:02:53 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 9E92E37B401 for ; Sun, 22 Jun 2003 03:02:53 -0700 (PDT) Received: from ns1.xcllnt.net (209-128-86-226.BAYAREA.NET [209.128.86.226]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9D6AA43F93 for ; Sun, 22 Jun 2003 03:02:52 -0700 (PDT) (envelope-from marcel@xcllnt.net) Received: from dhcp01.pn.xcllnt.net (dhcp01.pn.xcllnt.net [192.168.4.201]) by ns1.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5MA2qDZ089791 for ; Sun, 22 Jun 2003 03:02:52 -0700 (PDT) (envelope-from marcel@piii.pn.xcllnt.net) Received: from dhcp01.pn.xcllnt.net (localhost [127.0.0.1]) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9) with ESMTP id h5MA2pSx082898 for ; Sun, 22 Jun 2003 03:02:51 -0700 (PDT) (envelope-from marcel@dhcp01.pn.xcllnt.net) Received: (from marcel@localhost) by dhcp01.pn.xcllnt.net (8.12.9/8.12.9/Submit) id h5MA2om4082897 for arch@freebsd.org; Sun, 22 Jun 2003 03:02:50 -0700 (PDT) (envelope-from marcel) Date: Sun, 22 Jun 2003 03:02:49 -0700 From: Marcel Moolenaar To: arch@freebsd.org Message-ID: <20030622100249.GA82703@dhcp01.pn.xcllnt.net> References: <20030622005124.GA59673@HAL9000.homeunix.com> <20030622045529.GA80446@dhcp01.pn.xcllnt.net> <20030622064521.GA61030@HAL9000.homeunix.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030622064521.GA61030@HAL9000.homeunix.com> User-Agent: Mutt/1.5.4i 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 10:02:53 -0000 On Sat, Jun 21, 2003 at 11:45:22PM -0700, David Schultz wrote: > > > > 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. My expectations are less rose-coloured :-) > 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. A #pragma around the function is normally a good way to avoid file-scoped pessimisation. > 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. It's exactly what I not want. It's control without power. Think what a build invocator has to figure out if he wants an uniform build and there are hundreds of makefiles; all possibly containing specialized compiler options on a per-file basis. > Would this satisfy your concerns? Not really, but don't worry about it. As I said, I'm not apposed to the feature. There are legit cases where it's useful. If it's causing us problems, we'll just deal with it then and there. It's just that I've already been there, and I'm not in a hurry to go back :-) -- Marcel Moolenaar USPA: A-39004 marcel@xcllnt.net