On Tue, Feb 9, 2010 at 7:15 PM, Andy Dougherty <[email protected]> wrote: > On Tue, 9 Feb 2010, Will Coleda wrote: > >> Ok. I've started down this path in the rm_cflags branch - it already >> has removed the perl script; I'd appreciate some tests on something >> other than gcc/gmake. I broke out the 2 files that added flags and >> those are done, and dropped several cases from CFLAGS where the >> warnings that were prevented don't occur any more. > > >> All that's left is to add the mechanism for manipulating @flag@ at >> interpolation time. Syntax suggestions welcome (for a little while, >> anyway. =-) >> >> @cc_warnings:s/-Wno-unused/unused/@ >> >> is my current thought - we only need a way to specify a change, since >> that syntax covers addition/removal also. > > At a quick glance, that looks ok. It does suffer from the same problem as > the current mechanism: It's sometimes difficult to conditionally apply. > 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. > > That's a limitation of the current system too, but it could be useful to > implement. While you're poking at the CFLAGS anyway, it's something to > bear in mind, in case a natural implementation suggests itself. > > -- > Andy Dougherty [email protected] >
Whoops. We're overengineering some of this. 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. We can use the existing makefile generation step to conditionally add the -Wno-foo, using the #IF and #UNLESS directives already present. That just leaves the optimization as something to specify separately. If we need to get that specific about some of the files optimization levels, we can add a new config step to specify the particulars per-file. The existing rules in CFLAGS are probably doable without jumping through that hoop, though. -- Will "Coke" Coleda _______________________________________________ http://lists.parrot.org/mailman/listinfo/parrot-dev
