Subject: Re: Crossbuilding on i386 current
To: Sverre Froyen <sverre@viewmark.com>
From: Ian Dall <ian@beware.dropbear.id.au>
List: port-pc532
Date: 10/25/2003 23:38:55
Sverre Froyen <sverre@viewmark.com> writes:

> Hi,
> 
> After the recent compiler changes, I decided to see if I could get a 
> cross-compilation environment working on an i386 host running current.
> 
> To build the pc532 tools, I tried the command (in /usr/src):
> 
> ./build.sh -V TOOLCHAIN_MISSING=no -V HAVE_GCC3=yes -m pc532 -T 
> ./tooldir.i386 tools
> 
> The build completes without errors and produces the following ns32k 
> tools:
> 
> ns32k--netbsd-addr2line      ns32k--netbsd-gcov
> ns32k--netbsd-ar             ns32k--netbsd-lint
> ns32k--netbsd-c++            ns32k--netbsd-mdsetimage
> ns32k--netbsd-c++filt        ns32k--netbsd-nm
> ns32k--netbsd-cpp            ns32k--netbsd-objcopy
> ns32k--netbsd-dbsym          ns32k--netbsd-objdump
> ns32k--netbsd-g++            ns32k--netbsd-ranlib
> ns32k--netbsd-g77            ns32k--netbsd-readelf
> ns32k--netbsd-gcc            ns32k--netbsd-size
> ns32k--netbsd-gcc-3.3.2-nb1  ns32k--netbsd-strings
> ns32k--netbsd-gccbug         ns32k--netbsd-strip
> 
> As you can see, the ns32k assembler and linker are missing!  How do I 
> convince the build system to create those (and convince gcc to use 
> them)?

Ah. You have hit on the big problem. In the current binutils (ie from
the FSF) there is a working gas and ld FOR STATIC BINARIES ONLY. The
only gas and ld which support dynamic libraries are the old ones
(which don't work for cross compiling). I have been able to build an
entire NetBSD tree with static linking using the FSF binutils, but I
don't think this is of much practical interest to anyone. I have been
planning to do an ELF port of binutils for the ns32k, but can't seem
to find any time.

Ian