On 01/28/2011 07:49 AM, Ian Lance Taylor wrote:
Ralf Corsepius<ralf.corsep...@rtems.org>  writes:

On 01/27/2011 07:15 PM, Joel Sherrill wrote:

What is the preferred combination of
--enable-newlib and --with-newlib settings
to build with newlib in the gcc source tree
but not build it and use the installed copy
for the Ada and Go builds?
Theoretically, none at all, because building against an installed
newlib should be equivalent to "standard cross-building".
But Joel has newlib in his source tree, so won't it get built by
default?  That's what he wants to avoid.


I realize my answer as too brief.

What I had in mind was a 2 step bootstrap:
1)  An initial built run, aiming at building newlib:
- configure and build gcc+newlib one-tree style (--with-newlib --enable-language=c);
- Install the generated newlib, do not install the gcc related parts.

2) A second build run only aiming at building gcc:
- Remove the build tree.
- Remove newlib from the source tree
- reconfigure gcc without any newlib specific option and build again.

step 2) then would be an ordinary cross-compile.

Actually, unless the set of multilibs changes (and changes to gcc are moderate), step 1) is only necessary once and can be replaced with standalone building newlib.

Then this all would collapse to a traditional incremental gcc+libc building scheme.

 (I say this without having tested it.)
It's been a while since I tried this. It once used to work.


Ralf

Reply via email to