[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CPPASCOMPILE doesn't use $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES)
From: |
Ralf Wildenhues |
Subject: |
Re: CPPASCOMPILE doesn't use $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) |
Date: |
Sat, 14 Oct 2006 09:18:20 +0200 |
User-agent: |
Mutt/1.5.13 (2006-08-11) |
[ 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. Also, for *.F it's wrong, because there are Fortran
compilers that do not understand -Dfoo but need instead something like
-Wp,-Dfoo (AIX is one, I think). I haven't gotten around to writing a
patch for this yet. But then again the whole preprocessed Fortran part
could use a lot better Autoconf support (and AC_PROG_FCC etc.), so let's
do that in one go. Anyway.
> 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.
I don't know what kind of testsuite addition would go well with this.
Just that -I and -D are understood by CCAS?
Cheers,
Ralf
2006-10-14 Ralf Wildenhues <address@hidden>
* automake.in: For preprocessed assembler, add `$(DEFS)
$(DEFAULT_INCLUDES) $(INCLUDES)' to the compile rule.
* doc/automake.texi (Assembly Support): Update.
* NEWS: Update.
Suggested by Thomas Schwinge and Ralf Corsepius.
Index: NEWS
===================================================================
RCS file: /cvs/automake/automake/NEWS,v
retrieving revision 1.315
diff -u -r1.315 NEWS
--- NEWS 5 Sep 2006 18:58:16 -0000 1.315
+++ NEWS 14 Oct 2006 07:15:18 -0000
@@ -1,5 +1,10 @@
New in 1.9c:
+* Languages changes:
+
+ - Preprocessed assembler (*.S) compilation now also honors
+ $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES).
+
* Miscellaneous changes:
- The script `install-sh' needs to have executable permissions for
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1632
diff -u -r1.1632 automake.in
--- automake.in 10 Oct 2006 21:34:11 -0000 1.1632
+++ automake.in 14 Oct 2006 07:15:21 -0000
@@ -835,6 +835,7 @@
'flags' => ['CCASFLAGS'],
# Users can set AM_CCASFLAGS to include DEFS, INCLUDES,
# or anything else required. They can also set CCAS.
+ # Or simply use Preprocessed Assembler.
'compile' => '$(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)',
'compiler' => 'CCASCOMPILE',
'compile_flag' => '-c',
@@ -850,10 +851,7 @@
'autodep' => 'CCAS',
'flags' => ['CCASFLAGS', 'CPPFLAGS'],
- # Users can set AM_CCASFLAGS to include DEFS, INCLUDES,
- # or anything else required beyond AM_CPPFLAGS. They
- # can also set CCAS.
- 'compile' => '$(CCAS) $(AM_CPPFLAGS) $(CPPFLAGS)
$(AM_CCASFLAGS) $(CCASFLAGS)',
+ 'compile' => '$(CCAS) $(DEFS) $(DEFAULT_INCLUDES)
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)',
'compiler' => 'CPPASCOMPILE',
'compile_flag' => '-c',
'extensions' => ['.S'],
Index: doc/automake.texi
===================================================================
RCS file: /cvs/automake/automake/doc/automake.texi,v
retrieving revision 1.150
diff -u -r1.150 automake.texi
--- doc/automake.texi 28 Aug 2006 16:04:24 -0000 1.150
+++ doc/automake.texi 14 Oct 2006 07:15:27 -0000
@@ -6147,7 +6147,8 @@
particular it must accept @option{-c} and @option{-o}. The values of
@code{CCASFLAGS} and @code{AM_CCASFLAGS} (or its per-target
definition) is passed to the compilation. For preprocessed files,
address@hidden and @code{AM_CPPFLAGS} are also used.
address@hidden, @code{DEFAULT_INCLUDES}, @code{INCLUDES}, @code{CPPFLAGS}
+and @code{AM_CPPFLAGS} are also used.
The autoconf macro @code{AM_PROG_AS} will define @code{CCAS} and
@code{CCASFLAGS} for you (unless they are already set, it simply sets