[haiku-commits] Re: r35746 - haiku/trunk/build/jam

  • From: Ingo Weinhold <ingo_weinhold@xxxxxx>
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Fri, 26 Mar 2010 14:09:24 +0100

On 2010-03-26 at 08:26:40 [+0100], Matt Madia <mattmadia@xxxxxxxxx> wrote:
> I don't think this fixed the symlinks on gcc4hybrids
> {{{
> /Haiku1> ls system/lib/libs*.so
> system/lib/libscreensaver.so  system/lib/libstdc++.so  
> system/lib/libsupc++.so
> 
> /Haiku1> ls system/lib/gcc2/libs*.so
> system/lib/gcc2/libscreensaver.so  system/lib/gcc2/libsocket.so
> system/lib/gcc2/libstdc++.r4.so
> 
> /Haiku1> ls -l develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-090629/lib/*.so
> <snip> develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-090629/lib/libstdc++.so
> -> /system/lib/gcc2/libstdc++.so
> <snip> develop/abi/x86/gcc4/tools/gcc-4.3.3-haiku-090629/lib/libsupc++.so
> -> /system/lib/gcc2/libsupc++.so
> }}}
> 
> 
> Should I just go ahead and commit this or re-open #5518?

If it tests OK, please commit it. I would pull the new "if" block out of 
the parent one, though.

I guess I should eventually write some documentation for the build system. 
Just a few words on how the hybrid image is built: The build for the main 
compiler works almost the same as for a non-hybrid build. Additionally 
archive downloads for the enabled optional package that exist only for the 
alternative compiler also happen there (usually via "if 
$(HAIKU_GCC_VERSION[1]) == ... || $(isHybridBuild) { 
InstallOptionalHaikuImagePackage ..."). Pretty much everything else (with a 
few exceptions) -- i.e. additional files and symlinks for the hybrid part 
-- happens in the build for the alternative part. The main build invokes a 
sub-jam in the alternative "generated" directory, building an archive named 
alternative_system_libs.zip which contains all the alternative stuff and 
which is later unzipped to the final image.

The rule AddSymlinkToHaikuHybridImage is a convenience rule which invokes 
AddSymlinkToHaikuImage and AddSymlinkToAlternativeGCCArchive (with somewhat 
manipulable arguments). AddSymlinkToHaikuImage has an effect only in the 
main build (adding a symlink to the image), 
AddSymlinkToAlternativeGCCArchive only in the alternative build (adding a 
symlink to the alternative_system_libs.zip). I.e. on a hybrid image two 
symlinks will be generated, on a non-hybrid only one.

In this case we get two pairs of symlinks with identical names and 
different targets. The ones in alternative_system_libs.zip win, since they 
are unzipped after the first ones have been created.

CU, Ingo

Other related posts: