[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Gcc 3.3.6 v 4.0.1



On Sat, 21 Feb 2009, Vincent Rivière wrote:

We are currently in an infernal spiral: with our current native gcc, we can't compile a better gcc, so we're stuck :-(
An external compiler is necessary to unlock the situation.

	It might be useful to look at how NetBSD handled this -
	since the source tree has to be able to build for about 60
	different machine types across a dozen or so architectures,
	and they've had to migrate from gcc 2.95 to 3.x and onto
	4.x, in each case with potential transition issues.

	The solution was for crossbuilding to be the default.

	Assuming you are starting with a C compiler and basic posix
	tools it first builds a cross compiling version of just
	gcc and the tools needed to build the tree (binutils, make,
	sed, tsort, etc), then uses them to build a target version
	of the entire tree.

	So the procedure to build a NetBSD/atari distribution is
	the same whether you are on NetBSD/atari, i386, linux or
	cygwin.

	(If you're on an m68k platform already then you can shortcut
	the cross compiler building stage, but that is not the
	default)

	The idea is providing you have a compiler good enough to
	build gcc and a few tools, you can build the latest version
	- any more complicated code in the kernel is only built by
	the cross compiler, which is always the 'right' version.

	Anyway, not suggesting that this is the 'right' way of
	doing it, just that some of the ideas may be worth
	transferring.