Subject: Re: link trouble on hp700
To: None <jkunz@unixag-kl.fh-kl.de, mrg@eterna.com.au>
From: Izumi Tsutsui <tsutsui@ceres.dti.ne.jp>
List: tech-toolchain
Date: 12/28/2003 01:41:28
In article <21566.1072538876@splode.eterna.com.au>
mrg@eterna.com.au wrote:

>    So ld is called with the correct -L but it ignores it?!
> 
> the -lgcc comes _before_ the -L$DESTDIR/usr/lib doesn't it?  that seems
> like the error to me...

Now hppa has in-tree toolchain, so the following patch is enough:
---
Index: Makefile.inc
===================================================================
RCS file: /cvsroot/src/libexec/ld.elf_so/arch/hppa/Makefile.inc,v
retrieving revision 1.2
diff -u -r1.2 Makefile.inc
--- Makefile.inc	24 Sep 2002 12:12:08 -0000	1.2
+++ Makefile.inc	27 Dec 2003 16:37:45 -0000
@@ -14,4 +14,4 @@
 LDFLAGS+= --script ${.CURDIR}/arch/hppa/ld.so.script
 
 # XXX fredette - the libgcc millicode is needed here:
-LDADD=`$(CC) -print-libgcc-file-name`
+LDADD=-lgcc_pic

---

But it's better to put millicode (from libkern?) to libc
than using libgcc?
---
Izumi Tsutsui
tsutsui@ceres.dti.ne.jp