Subject: Re: libgcc3 Makefile (2)
To: None <current-users@netbsd.org>
From: Nick Hudson <skrll@netbsd.org>
List: current-users
Date: 03/08/2004 14:49:12
On Sunday 07 March 2004 11:06, Martin Husemann wrote:
> 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

Right.

> 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).

Did you try any of

$ grep -l "^G_LIB1ASMFUNCS=[^$]" arch/*.mk
arch/hppa.mk
arch/m68000.mk
arch/sh3eb.mk
arch/sh3el.mk
arch/sh5el.mk

I changed .if !empty(LIB1ASMFUNCS) to .if !empty(G_LIB1ASMFUNCS) as it will 
work for old makes and is generally more correct.

Nick