Subject: Re: libgcc3 Makefile (2)
To: None <grifo3000@interfree.it>
From: Martin Husemann <martin@duskware.de>
List: current-users
Date: 03/07/2004 12:06:04
On Sun, Mar 07, 2004 at 11:41:00AM +0100, Martin Husemann wrote:
> Yeah, that looks like a typo, as well as these two:
> 
> libgcc/Makefile:		${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}
> libgcc_s/Makefile:		${G_LIB2ADD:T:S/.asm/.S/} ${LIB1ASMFUNCS}

Actuall, no - it is supposed to pick up a definition of G_LIB1ASMFUNCS from
the arch/*.mk files for ${MACHINE_ARCH}. This then should (if not empty)
be propagated to LIB1ASMFUNS by src/gnu/lib/libgcc3/libgcc/Makefile.inc:

.if !empty(G_LIB1ASMFUNCS)
LIB1ASMFUNCS=   ${G_LIB1ASMFUNCS:=.S}
.endif

I have no idea, why it does not work (but it does not seem to work for me
too - I always end up with empty LIB1ASMFUNCS, no matter for what arch I
try).

If LIB1ASMFUNCS would be non empty, the part you quoted from Makefile.inc:

.if !empty(LIB1ASMFUNCS)
${LIB1ASMFUNCS}: ${.CURDIR}/Makefile
        ${_MKTARGET_CREATE}
        printf '#define L${.PREFIX}\n#include <${G_LIB1ASMSRC}>\n' >${.TARGET}
.endif

would create wrappers to compile the arch specific asm functions. So here it
should not matter if we test for empty ${LIB1ASMFUNCS} or ${G_LIB1ASMFUNCS}.

Martin