automake
[Top][All Lists]
Advanced

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

Re: automake/492: Compilation of assembler files with subdir-objects


From: Thomas Schwinge
Subject: Re: automake/492: Compilation of assembler files with subdir-objects
Date: Tue, 10 Oct 2006 16:15:55 +0200
User-agent: Mutt/1.5.6+20040907i

[Cced to <address@hidden> and <address@hidden> for further
discussion.  Which list is appropriate here?]


Hello!

On Sun, May 14, 2006 at 06:09:10AM +0200, Ralf Wildenhues wrote:
> http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=automake&pr=492

It's been some time, but this issue is still outstanding and I need to
get this functionality implemented.  However, I still didn't look up the
Automake interals to actually help resolve that issue properly.


We were talking about the issue why Automake doesn't emit proper rules
for compiling (pre processed) Assembler files (the .S ones) when using
`AM_INIT_AUTOMAKE([subdir-objects])'.

When using code file `libfoo_a_SOURCES = somewhere/a.S', Automake
currently assembles `somewhere/a.S' and puts `a.o' into the current
directory (as opposed to `somewhere/a.o'), but when creating `libfoo.a'
it wants to add `somewhere/a.o', which will then obviously fail.


> IIRC I've seen C and C++ compilers being mentioned as not supporting "-c
> -o", the last occurrence for C++ beside MSVC (which uses /OUT, and for
> which cccl exists) was this:
> http://lists.gnu.org/archive/html/libtool/2005-10/msg00063.html

On to another case: Automake currently also emits such code unter certain
circumstances:

configure.ac
#v+
AC_INIT([package], [1])
AM_INIT_AUTOMAKE([subdir-objects])
AM_PROG_AS
AC_PROG_RANLIB
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
#v-

Makefile.am
#v+
noinst_LIBRARIES = libfoo.a
libfoo_a_CCASFLAGS = -DFOO
libfoo_a_SOURCES = somewhere/a.S
#v-

autoreconf.

Makefile.in
#v+
[...]
.S.o:
        $(CCASCOMPILE) -c $<
[...]
#v-

(Without ``-o $@''.)  But just below that rule:

Makefile.in
#v+
[...]
somewhere/libfoo_a-a.o: somewhere/a.S
        $(CCAS) $(libfoo_a_CCASFLAGS) $(CCASFLAGS) -c -o somewhere/libfoo_a-a.o 
`test -f 'somewhere/a.S' || echo '$(srcdir)/'`somewhere/a.S
[...]
#v-

Automake decided to use ``-o ...'' even though it is a .S file.

One might be tempted to say that if nobody complained about that so far,
one would as well be fine with using ``-o ...'' with .S files evertime it
is needed.  (I don't suggest to actually do that without further
thinking, but it's a thought nevertheless.)


So far for now, more to come somewhen later.


Regards,
 Thomas

Attachment: signature.asc
Description: Digital signature


reply via email to

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