[haiku-development] Re: Cross-building Haiku, does output (generated) directory need to be under source tree path?

  • From: Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 20 Apr 2017 07:22:14 +0200

On Thu, Apr 20, 2017 at 05:12:01AM +0000, Thomas Mueller wrote:

The example I gave in this latest post (above) did not use clang!

configure script, using gcc or clang (or other C/C++ compiler?) builds the 
cross-tools but does not build Haiku in this step.

That latter part is done by jam with the generated Jamfile and BuildConfig.

Is it correct that --cross-tools-prefix would use already-built cross-tools, 
therefore making --use-clang irrelevant?

But --use-clang could be used to build cross-tools.  Question if if building 
the cross-tools would go through, and if so, whether those cross-tools would 
be capable of successfully building Haiku.

You are still misunderstanding what --use-clang does.

Your setup is like this:

1) Use clang to compile haiku-gcc
2) Use haiku-gcc to build Haiku

What --use-clang is meant to do:
1) Do not build haiku-gcc at all
2) Use clang to build Haiku

You do not want to use --use-clang, even if your host compiler is clang.
--use-clang is experimental, no one has worked on it in the last two
years, and it is extremely likely to be broken. Haiku itself is built
with a specific version of gcc, which our configure script will take
care of compiling. The configure script will use whatever host compiler
is available, clang or gcc, and does not need any specific command line
switches to decide which one to pick.

-- 
Adrien.

Other related posts: