eliminating CFLAGS

Andy Dougherty doughera at lafayette.edu
Wed Feb 10 00:15:56 UTC 2010

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		doughera at lafayette.edu

More information about the parrot-dev mailing list