bug-automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CPPASCOMPILE doesn't use $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)


From: Ralf Corsepius
Subject: Re: CPPASCOMPILE doesn't use $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
Date: Sat, 14 Oct 2006 11:54:31 +0200

On Sat, 2006-10-14 at 09:18 +0200, Ralf Wildenhues wrote:
> [ Cc: automake-patches ]
> 
> * Ralf Corsepius wrote on Thu, Oct 12, 2006 at 06:36:12AM CEST:
> > On Wed, 2006-10-11 at 22:02 +0200, Thomas Schwinge wrote:
> > > On Wed, Oct 11, 2006 at 10:12:33AM +0200, Ralf Corsepius wrote:
> > > > with automake-cvs/HEAD, and using *.S, CPPASCOMPILE doesn't apply
> > > > $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) to its compilation rules.
> 
> > > > IMO, though this would introduce an inconsistency to *.s
> > > > (non-preprocessed asm sources) this probably would help users to be
> > > > facing inconsistencies between *.S and *.c/*.cc/*.f etc. languages
> > > > (which use $(DEFS) etc.).
> 
> Two small notes: that would be *.F not *.f, the latter is not
> preprocessed. 
My last encounter with Fortran dates back many years ;)

> > Processing *.S's is much more portable. They can assume the compiler to
> > reliably accept CPPFLAGS. Hence the new "CPPASCOMPILE" instead of
> > "CCASCOMPILE". Them using CCAS and CCAS_FLAGS internally, is a relic of
> > the past, because most users of the old CCAS rules actually were
> > applying them on "*.S"'s and were using GCC. In many cases these users
> > were manually appending "$(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)"
> > somewhere to their code.
> > 
> > These users  will see duplicated CPPFLAGS during compilation of *.S's
> > with automake-CVS - I.e. an incompatibility.
> 
> Yep, and that's pretty much the question about the patch below, if you
> ask me.  WDYT?  IMHO it may just be better to break compatibility now,
> iff it's planned to do that at some point anyway, now that 1.10 already
> honors CPPFLAGS and such which 1.9.6 didn't.
ACK.

Of cause, I would find "$(DEFS) etc." useful, otherwise I had not
proposed it. Duplicates also probably do not cause much harm, so ... 
I am all for it.

> I don't know what kind of testsuite addition would go well with this.
> Just that -I and -D are understood by CCAS?
Hmm, probably -  CCAS defaults to CC, i.e. such a test would not really
test much new when using GCC. 

On the other hand, it would probably cause several testsuite failures
when not using GCC, because it's not clear (at least to me) how many
compilers actually understand *.S. AFAICT, this so far had not been an
issue, because the old CCAS-rules had rarely been used and if at all,
then with GCC (The old CCAS-rules require highly toolchain-specific
treatment in configure-scripts if being used w/o GCC).

Ralf







reply via email to

[Prev in Thread] Current Thread [Next in Thread]