Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Jun 2003 23:45:22 -0700
From:      David Schultz <das@FreeBSD.ORG>
To:        Marcel Moolenaar <marcel@xcllnt.net>
Cc:        arch@FreeBSD.ORG
Subject:   Re: Per-source CFLAGS
Message-ID:  <20030622064521.GA61030@HAL9000.homeunix.com>
In-Reply-To: <20030622045529.GA80446@dhcp01.pn.xcllnt.net>
References:  <20030622005124.GA59673@HAL9000.homeunix.com> <20030622045529.GA80446@dhcp01.pn.xcllnt.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030622064521.GA61030>