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

On 2010-04-23 at 19:51:46 [+0200], Matt Madia <mattmadia@xxxxxxxxx> wrote:
> On Fri, Apr 23, 2010 at 17:24, Ingo Weinhold <ingo_weinhold@xxxxxx> wrote:
> >> Would it be worthwhile (for me) to manually add
> >> AddSymlinkToHaikuHybridImage statements to the gcc agnostic packages?
> >
> > If you mean symlinks for libraries in the gccX subdirs, those would indeed
> > be desirable. I guess it wouldn't be too complicated to just mark the
> > optional package/archive (via a rule or optional parameter) and let
> > build_haiku_image do the actual symlinking for the included libraries.
> 
> Basically, i know how to take the information to be entered in
> build/jam/OptionalPackages of "this archive is gcc agnostic, create
> symlinks for the hybrid" all the way to build_haiku_image,  but i'm
> not sure of a clean way of detecting the shared libraries inside
> "${sPrefix}$extractDir/$extractedSubDir/" ... like should i use the
> find command?  I'd rather not make the assumption that the archive
> extracts to boot.

Yep, I would start with a "find $extractDir/$extractedSubDir/", grep for 
*.so, and pipe that through sed to replace the directory with 
$targetExtractedDir. That should yield the volume root relative paths of all 
libraries in the archive. Then for each library test whether the directory is 
relevant (system/lib, common/lib, home/config/lib), check whether something 
in the gccX subdirectory is in the way, and create the symlink.

> also, what happens in the case of <application dir>/lib/*.so ?

Those can be ignored. For %A/ relative directories the runtime loader only 
looks in the specified directory, not in gccX subdirectories.

Anyway, feel free to just add AddSymlinkToHaikuHybridImage invocations in 
OptionalPackages. If there's only a few of them, a generic solution might be 
unnecessarily complicated. Your decision. :-)

CU, Ingo

Other related posts: