Subject: Adventures in crosscompile land
To: None <tech-toolchain@netbsd.org>
From: Frank van der Linden <fvdl@wasabisystems.com>
List: tech-toolchain
Date: 10/11/2001 12:09:23
On the devvp branch, I had to edit all device sources in the kernel.
To verify that everything at least compiled before trying to test
various architectures, I set up crosscompilers on my i386-current
system.

I tried to set them up by running gnu/dist/toolchain/configure with
the appropriate target. Here are some results:

	* m68k--netbsdelf: seems to work fine, except for 3 problems:
		* sys/dev/scsipi/ch.c will make gcc SEGV when compiling
		  with -O2 or -Os.
		* gas doesn't like sys/arch/m68k/fpsp/*. It spews errors
		  for out of range branches, but the branches look
		  just fine in the (preprocessed) assembly code.
		* atari locore.s gives:
 Error: parse error -- statement `move l a0@(0x42ec),%d0' ignored
		  I assume that's just a slight change of syntax.

	* alpha--netbsd: gcc gets internal errors for basically every other
	  file, with or without optimization. gas seems to work ok. I didn't
	  get to the link stages obviously..

	* arm--netbsdelf, powerpc--netbsd, mipsel--netbsd (both be and le)
	  seem to work fine. vax--netbsdelf also seems okay, but it also
	  has problems with sys/dev/scsipi/ch.c, like m68k (note that
	  I did not run any of these kernels yet, so I can't be sure if
	  there were possible bugs in the generated code)

	* I wasn't able to configure an sh crosscompiler, basically
	  every target I tried eventually led to:
configure: error: GAS does not know what format to use for target sh-unknown-net
bsdcoff

- Frank
-- 
Frank van der Linden                           fvdl@wasabisystems.com
======================================================================
Quality NetBSD CDs, Support & Service.   http://www.wasabisystems.com/