[haiku-development] Re: How to build Haiku R1/Alpha 1

  • From: "Michael Lotz" <mmlr@xxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 15 Sep 2009 23:13:50

> On Tue, Sep 15, 2009 at 1:12 PM, Caitlin Shaw <rogueeve@xxxxxxxxxxxxx
> > wrote:
> > I'm sorry I have no help for your specific question, but I can tell 
> > you
> > that if you build Haiku from within Haiku instead of cross-
> > compiling,
> > compilation goes ridiculously smooth. For me it was basically as 
> > simple
> > as pulling down the SVN and running "jam"; pretty soon I had a new 
> > hdd
> > image ready to go.
> 
> If I'm not mistaken, it is currently not possible (or at least, not
> easy) to build a hybrid Haiku image from within Haiku itself, 
> limiting
> one to doing this via cross-compile (since it basically requires two
> different crosscompiler toolchains to accomplish it).
> 
> I'm sure there will be some manipulation of the build system in the
> future to allow this, however ;)

It's actually most easy in the alpha, since it comes with both 
toolchains already (or you can install the other GCC from the optional 
package if you don't already have it).

Navigate to Haiku checkout:

cd <haiku trunk>

Create output directories for both:

mkdir generated.gcc2
mkdir generated.gcc4

Configure GCC4 side by supplying the cross tools prefix (note that the 
cross tools prefix includes the ending slash, so don't omit it, the 
second line is all in one line):

cd ../generated.gcc4
../configure --alternative-gcc-output-dir ../generated.gcc2 --cross-
tools-prefix /boot/develop/abi/x86/gcc4/tools/current/bin/

Configure GCC2 side:

cd ../generated.gcc2
../configure --alternative-gcc-output-dir ../generated.gcc4

Build hybrid:

jam haiku-image

If you build in generated.gcc2 you'll build a GCC2/4 hybrid, if you 
build in generated.gcc4 you'll build a GCC4/2 hybrid. It's as easy as 
that really. If your default GCC is GCC4 instead of GCC2 you just supply 
the corresponding cross tools prefix on the other directory. In fact 
you can also provide it explicitly for both directories then it 
wouldn't matter which one is currently set as default.

Regards
Michael

Other related posts: