Subject: Re: GNU binutils 2.9.1 (was gcc-2.95.2 gcj) (fwd)
To: None <netbsd-users@netbsd.org>
From: Anders Dinsen <anders@dinsen.net>
List: netbsd-users
Date: 01/03/2000 22:24:18
On Sun, 2 Jan 2000, Frederick Bruckman wrote:
> On Sat, 1 Jan 2000, Anders Dinsen wrote:
> 
> > On Thu, 30 Dec 1999, Frederick Bruckman wrote:
> > > On Thu, 30 Dec 1999, Anders Dinsen wrote:
> > > You might try the cross/binutils package. That will get you gnu ld,
> > > at least.
> > 
> > Ok, I got GNU ld now in /usr/pkg/cross/libexec/binutils/ld, but I cannot
> > use it to link my programs just so (I tried recompiling gcc in the hope
> > [...]
> 
> LD='.../ld --format=a.out-i386-netbsd' ...

Thanks for that!

I have come a bit further, but I still have problems - it seems that there
are problems with the library search path. I have to add -L/usr/lib to get
it to work.

Now, it just complains about lots of duplicate method definitions and a
few other problems. A problem may be that the libgcj and gcc are built
using /usr/bin/ld, because I cannot compile a simple c program with my ld:

% gcc -o hello_world hello_world.c
/usr/lib/crt0.o(.text+0x95): undefined reference to `__DYNAMIC'
/usr/lib/crt0.o(.text+0xa4): undefined reference to `__DYNAMIC'
collect2: ld returned 1 exit status

This is the command line that invokes ld in this case:

/usr/pkg/cross/libexec/binutils/ld --format=a.out-i386-netbsd -L/usr/lib
-e start -dc -dp -o hello_world /usr/lib/crt0.o
-L/usr/local/lib/gcc-lib/i386-unknown-netbsd1.4.1/2.95.1 -L/usr/local/lib
/var/tmp/ccgAxgdX.o -lgcc -lc -lgcc

I want to be able to compile a C-program with this ld and recompile gcj
(and possibly all of gcc) before I proceed with gcj now.

> Oh, and netbsd-help is supposed to be for help installing NetBSD. Best
> to follow up on netbsd-users.

Sorry! Done.

Anders (who originally wanted to simply *install* gcj, but ended up trying
to port it...)

-- 
Anders Dinsen
anders@dinsen.net
http://www.dinsen.net/anders/