New toolchain comitted

Stefan Sperling stsp at stsp.in-berlin.de
Sun Aug 13 23:02:05 CEST 2006


Hello,

I have just comitted a new toolchain for DSLinux.
You can find it at the top level of the dslinux source
tree in the new 'toolchain' directory.

I've created this toolchain for the following reasons:

	* DevkitARM is harder to build than the new toolchain.
	  The toolchain can be built non-interactively simply
	  by running 'make' in the toolchain directory.
	  See the README file for more information.

	* We are already deviating a lot from main line devkitARM.
	  The current devkitARM version doesn't even build DSLinux.
	
	* DevkitARM's buildscripts are inconvenient to use if you
	  want to patch and extend the toolchain. The new toolchain
	  uses a single Makefile to build everything. If the build
	  fails, the build can be resumed after the error has been
	  fixed without hassle. The shell script used to build
	  devkitARM lacks this feature.
	
	* The new toolchain uses uCLibc for the C library instead
	  of newlib which devkitARM uses. It also builds against
	  our Linux kernel headers.

	* Somehow it was difficult to get devkitARM compiled on
	  non-i386 machines. I hope this toolchain will compile
	  and run on any platform we want it to.

	* The new toolchain contains every tool that is vital for
	  our build process (including genromfs and ndstool).
	  DevkitARM installed a lot of binaries we never used.

	* I wanted to see if I can pull it off :)
	
I've sucessfully compiled a running DSLinux build for GBAMP with
this toolchain. We should test it further before making it
the default toolchain.

Amadeus' 8bit write patches for gcc are not included yet,
but I will add them soon.

Also, I will not provide binaries for the toolchain at this stage.
People who want to use it are encouraged to build it themselves.
I hope this will shake out a few potential bugs.

So if you have some time or a very fast machine, please try to
build the toolchain and report any issues. Especially if you are
on a non-i386 platform! I already have a compile running on an
old sparc64 machine running Linux and it seems to go fine so far.
(Takes a while on that box :-/)

To use the new toolchain, you have to modify the following file
in the dslinux source tree:

	vendors/config/armnommu/config.arch

Find the line that says:

	CROSS_COMPILE = arm-elf-

and change it to:

	CROSS_COMPILE = arm-linux-elf-

I did not rename the toolchain target on purpose. I had to
do this because it was needed to get libstdc++ to compile.

There is currently one error during the build that I know about.
The error occurs somewhere during the second stage of the gcc/g++
build.  It will tell you that CFLAGS have been changed (the
-fpermissive flag was added) and that you should remove
the config.cache file. If you encounter this, just remove the
file and run make again. I already know (in theory) how to fix
this error, so it will probably be fixed in CVS soon.

Another issue is that the toolchain is currently quite big when
installed, about 140MB. DevkitARM is only about 50MB. The largest
part seem to be C++ headers and probably documentation.

To solve this bloat issue for distribution I plan to add a Makefile
target that creates a distribution archive and prunes files that
are not neccessary. Any help is appreciated.

So, if you want to try this toolchain, please do.
Good luck! :)
-- 
stefan
http://stsp.in-berlin.de                                 PGP Key: 0xF59D25F0



More information about the dslinux-devel mailing list