[haiku-development] Re: GCC4 build

  • From: Rene Gollent <anevilyak@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Tue, 20 Jan 2009 15:01:29 -0600

On Tue, Jan 20, 2009 at 2:57 PM, Rene Gollent <anevilyak@xxxxxxxxx> wrote:
> They can, the specifics were mentioned in a reply to the svn commit
> which enabled that feature, I can try to dig that up for you in a bit.

To be exact, it was r25536:

"Log:
Support for adding libraries compiled with the alternative gcc (2 vs.
4). One has to have a (fully configured) "generated" directory for the
alternative gcc and specify it using the new option
"--alternative-gcc-output-dir" when configuring the main build.
Additionally the build variable HAIKU_ADD_ALTERNATIVE_GCC_LIBS has to be
set to "1".

If that has been done, when building the image a sub-jam is invoked that
generates the alternative libs and zips them. The main-jam unzips them
into the correct directory in the image. Note that the JAM build
variable has to be set when using a jam executable not invoked by "jam".

Tested with gcc 2 NetPositive, Pe, and FireFox under gcc 4 Haiku, and
with a few of the standard gcc 4 Haiku apps under gcc 2 Haiku. Seems to
work fine so far.
"

And further clarification from the ensuing discussion:

"You have to run configure in that directory first. E.g. setting up output
directories for gcc 2 and gcc 4 builds could look like that:

 cd /path/to/haiku/sources
 mkdir generated-gcc2 generated-gcc4
 cd generated-gcc2
 ../configure --build-cross-tools ... --alternative-gcc-output-dir
../generated-gcc4
 cd ../generated-gcc4
 ../configure --build-cross-tools-gcc4 ... --alternative-gcc-output-dir
../generated-gcc2

"configure" creates a Jamfile in the output directory, and one usually runs
jam there. When building an image with the alternative libraries the
Jamfile in the other output directory is required, since a sub-jam is
invoked there. Note that before this revision no Jamfile was created in
"generated" when running "configure" in the source directory. That is
you'll have to re-configure this directory, if you want to use it as
--alternative-gcc-output-dir for another directory (use
--cross-tools-prefix to avoid rebuilding the cross tools)."

HTH,

Rene

Other related posts: