Subject: Re: compat_netbsd32 problems
To: Raymond Meyer <raymond.meyer@rambler.ru>
From: Eduardo Horvath <eeh@NetBSD.org>
List: port-sparc64
Date: 04/16/2007 17:14:13
On Mon, 16 Apr 2007, Raymond Meyer wrote:

> Hi, I've got 32-bit sparc sets extracted into /emul/netbsd32. I'm trying to
> use /emul/netbsd32/usr/bin/gcc to compile 32-bit packages. I've come across the
> following problem:
> 
> ultra10# /emul/netbsd32/usr/bin/gcc -Wl,-R/no/such/dir test.c; echo $?
> ld: /no/such/dir: No such file: No such file or directory
> 1
> 
> but:
> 
> ultra10# /usr/bin/gcc -Wl,-R/no/such/dir test.c; echo $?
> 0
> 
> Many software packages pass linker options to gcc via -Wl compiler flag. It
> fails to compile because it complains about directories that don't exist. Any
> idea how to fix this?
> 
> ultra10# uname -a
> NetBSD ultra10 4.99.16 NetBSD 4.99.16 (GENERIC) #0: Tue Apr 10 07:44:12 BST 2007  root@ultra10:/opt/obj.sparc64/sys/arch/sparc64/compile/GENERIC sparc64


I never managed to get that to work.  I think what probably shoul be done 
is rather than use /emul/netbsd32/usr/bin/gcc, get /usr/bin/gcc to DTRT 
when given the -m32 flag to bring in the correct header files and link
against libraries in /emul/netbsd32/...

What I ended up having to do to compile 32 bit systems was to have a
full 32-bit SPARC partition for /emul an boot that with a 32-bit kernel.

Eduardo