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

  • From: "Thomas Mueller" <mueller6723@xxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 20 Apr 2017 05:12:01 +0000

from Jessica Hamilton in response to my previous post:

Would I use --cross-tools-prefix twice if I want to build for x86_gcc2 and 
x86 hybrid?

Would something like this be appropriate?

--cross-tools-prefix /home/nbarlene/nb32generated/cross-tools-x86 
--cross-tools-prefix /home/nbarlene/nb32generated/cross-tools-x86_gcc2

This example is from an older attempt, where configure built the tools, 9 
August 2015.

Even if I need to rebuild this, I would move (mv) nb32generated to another 
directory (maybe nb32generated-20150809) to keep at least for reference.

This used gcc 4.9.2 .

FreeBSD, beginning with v9.0, does not install gcc (latest version 4.2.1) 
to the base system by default, uses llvm clang to build the system and most 
ports.

But various versions of gcc are in FreeBSD ports, including gcc5-aux and 
gcc6-aux.  These latter two include (Dragonlace) Ada.

Using clang as the host compiler doesn't matter.

Cross tools can be built with gcc or clang, to generate a gcc
cross-compiler toolchain for building Haiku.

./configure --use-clang builds Haiku with clang, *not* the gcc
cross-compiler. And this is completely unsupported.

Therefore, using --use-clang with either of --build-cross-tools or
--cross-tools-prefix makes no sense, as it's not needed in this case.
 
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.

NetBSD is also trying to get llvm clang working but is at a much less advanced 
stage than with FreeBSD.  See
http://releng.netbsd.org/cgi-bin/builds.cgi ;
under HEAD-llvm.

Tom


Other related posts: