On Sat, 26 Jul 2008, James Keenan via RT wrote:

> In the course of working on unit tests in the 'parallel' branch, I came
> across this inline comment in config/gen/makefiles.pm:
> 
>     # Why is this here?  I'd think this information belongs
>     # in the CFLAGS.in file. -- A.D.  March 12, 2004
>     if ( $conf->data->get('cpuarch') =~ /sun4|sparc64/ ) {
> 
>         # CFLAGS entries must be left-aligned.
>         print {$CFLAGS} <<"EOF";
> src/jit_cpu.c -{-Wcast-align}        # lots of noise!
> src/nci.c     -{-Wstrict-prototypes} # lots of noise!
> EOF
>     }
> 
> My guess is that this code is not found in the CFLAGS.in template file
> because it is platform-specific.  There is no platform- or OS-specific
> code in CFLAGS.in.

The comment was a thought about "what ought to be", not a statement about 
what is.  Just because there is no platform-specific code in CFLAGS.in 
today doesn't mean that there shouldn't be.  If there is a need to make 
any kind of adjustments to the CFLAGS file, I think that the logical place 
to make them is in CFLAGS.in.  Certainly that's where I would look first.

> So, is there any reason why we shouldn't delete the comment?

Yes.  The comment correctly points out an organizational weakness in the 
generation of configure files.  I'd say that's worthy of a brief comment 
of some sort, though, obviously, one could word it in many different ways.

That said, the first additional line (for src/jit_cpu.c) is no longer 
relevant, since JIT on the SPARC hasn't worked for years anyway.  I don't 
know if the second one is relevant any more, though I'd be surprised if it 
were truly a SPARC-specific issue.

So another reasonable possibility is to just delete that whole section of 
code and make no sparc-specific changes to CFLAGS.

-- 
    Andy Dougherty              [EMAIL PROTECTED]

Reply via email to