eliminating CFLAGS

Will Coleda will at coleda.com
Wed Feb 10 16:12:16 UTC 2010


On Wed, Feb 10, 2010 at 9:47 AM, Andy Dougherty <doughera at lafayette.edu> wrote:
> On Wed, 10 Feb 2010, Will Coleda wrote:
>
>> On Tue, Feb 9, 2010 at 7:15 PM, Andy Dougherty <doughera at lafayette.edu> wrote:
>
>> > For example, there's no easy way to say something like
>> >
>> >    For compiling src/gc/system.c on amd64 on certain flavors of Linux
>> >    with gcc 4.3.x, optimizations -O[012] are fine, but -O3 and higher
>> >    won't work.
>> >
>
>> Whoops. We're overengineering some of this.
>
> I don't think so.  That example is very real and almost precisely the
> current state of affairs.  There are many other examples in the perl 5
> tree.
>
>> If we want to change a warnings flag, we just need to tack it on the
>> end of the command line, the second -Wno-foo will override the default
>> -Wfoo.
>
> Yes, that works for gcc.  I don't know about other compilers, but since we
> don't really support warnings on other compilers anyway, that's good
> enough for now.
>
>> We can use the existing makefile generation step to conditionally add
>> the -Wno-foo, using the #IF and #UNLESS directives already present.
>
> Yes, but they are too blunt a tool for the task above.  They are all we
> have, so that's what we do now, but they are still inadequate.  They don't
> fail, but they are suboptimal.  That's all I'm saying.
>
> Your plan preserves the status quo, which is ok, but if you can think of a
> way to generalize it, I think it would be beneficial.  That's all I was
> trying to say.
>
> --
>    Andy Dougherty              doughera at lafayette.edu


Once we get to the point where we are autogenerating the dependencies,
I think adding this level of complexity will be much easier. I
envision a makedepend step at some point that lets you get some
flexibility when you run it, but then renders it out so that ongoing
configs and builds don't have to run any of that logic.

I'm definitely interested in properly handling more compiler's warnings.

-- 
Will "Coke" Coleda


More information about the parrot-dev mailing list