.SUFFIXES hosed by switch to automake 1.9.x
Ralf Corsepius
ralf.corsepius@rtems.org
Wed Apr 18 15:04:00 GMT 2007
On Wed, 2007-04-18 at 15:34 +0100, Joern Rennecke wrote:
> On Wed, Apr 18, 2007 at 03:59:47PM +0200, Ralf Corsepius wrote:
> > Add *.S to *_SOURCES.
>
> crt0.o is not part of lib_a, it is a stand-alone binary file that is
> linked specifically by ld.
Yeah, I missed this.
> If I add to sys/arc/Makefile.am:
>
> crt0_SOURCES = crt0.S
Of cause this doesn't work.
> I get an error message:
>
> Makefile.am:13: variable `crt0_SOURCES' is defined but no program or
> Makefile.am:13: library has `crt0' as canonic name (possible typo)
>
> Well, crt0 is neither a library nor a program.
I know.
It's a startup file.
> > Unlike previous automakes (which didn't handle them), newer automakes
> > know to handle them.
>
> More like 'unlike previous automakes, which rather erred on the safe side
> to include an unneeded rule, newer automakes think they know how to handle
> them better and make a mess of it'.
Pardon, now you're not fair. What you are trying to achieve is something
completely different. automake now know how to handle *.S's that are
supposes to be added to an automake primary (*_PROGRAMS, *_LIBRARIES).
automake doesn't support compiling to *.o from any kind of source
language.
> I rather have the .S.o rule added automatically all the time than
> have to add it by hand in dozens of .am files.
> As it turns out, the .SUFFIXES rule alone is not enough, as then
> the multilib flags are missing.
In rtems Makefile.am's I am using this construct:
project_libdir = $(libdir)
EXTRA_DIST = crt0.S
crt0.$(OBJEXT): crt0.S
$(CPPASCOMPILE) -o $@ -c $<
project_lib_DATA = crt0.$(OBJEXT)
More information about the Newlib
mailing list