Subject: Re: link trouble on hp700
To: matthew green <>
From: Jochen Kunz <>
List: tech-toolchain
Date: 12/27/2003 18:51:59
On Sun, 28 Dec 2003 02:27:56 +1100
matthew green <> wrote:

> the -lgcc comes _before_ the -L$DESTDIR/usr/lib doesn't it?  that
> seems like the error to me...
Maybe this is false too, but changing the order of -L doesn't help.

Replacing "`/.../hppa--netbsd-gcc -print-libgcc-file-name`" with "-lgcc"
makes it work. The "-print-libgcc-file-name" comes from ${LDADD} and
this is set in:=20
./arch/hppa/`$(CC) -print-libgcc-file-name`=20
hppa is the only arch that sets LDADD. (libgcc.a millicode is needed by
hppa ld.elf_so.)

The current hppa--netbsd-gcc prints out only the basename of libgcc.a.
It seems older versions of gcc printed a full path to libgcc.a and
linking works when the full path is returned by gcc.=20

So what would be the correct solution for this problem?
In ./arch/hppa/
LDADD=3D${DESTDIR}${LIBDIR}/`$(CC) -print-libgcc-file-name`