[Top][All Lists]

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

Re: automake: compiling assembly files is *broken* in 1.5 (fwd)

From: Alexandre Duret-Lutz
Subject: Re: automake: compiling assembly files is *broken* in 1.5 (fwd)
Date: 03 Nov 2001 18:36:32 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.1

>>> "C" == C Scott Ananian <address@hidden> writes:


 C> AS=$(CC)?!?  Tell me you are joking.

I'm not :)  It's even documented

Assembly Support

   Automake includes some support for assembly code.

   The variable `AS' holds the name of the compiler used to build
assembly code.  This compiler must work a bit like a C compiler; in
particular it must accept `-c' and `-o'.  The value of `ASFLAGS' is
passed to the compilation.

   You are required to set `AS' and `ASFLAGS' via `'.  The
autoconf macro `AM_PROG_AS' will do this for you.  Unless they are
already set, it simply sets `AS' to the C compiler and `ASFLAGS' to the
C compiler flags.


     Use this macro when you have assembly code in your project.  This
     will choose the assembler for you (by default the C compiler), and
     will set `ASFLAGS' if required.

 C> AS='as' or 'arm-unknown-linuxelf-as' in the makefiles in question, because
 C> I support compilation and often do it.

Sorry to insist, but since you probably also have CC=gcc or
CC=arm-unknown-linuxelf-gcc, is setting AS=$(CC) an issue?

 >> From the 'make' info page:
 C> Assembling and preprocessing assembler programs
 C> `N.o' is made automatically from `N.s' by running the assembler,
 C> `as'.  The precise command is `$(AS) $(ASFLAGS)'.

 C> Setting AS=$(CC) is just Wrong.  

I see your point: it's wrong w.r.t. the implicit rules defined in your
implementation of Make.  But an Automake makefile you should not
rely on these implicit rules (because its not portable), it uses
its own rules.

Actually, I think that the reason why AS=$(CC) is so that Automake
can handle *.s and *.S as the same language and let $(CC) decides
whether the file needs being preprocessed or not.

 C> You've found your bug.  Please fix it.  --s
Alexandre Duret-Lutz

reply via email to

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