[openbeos-build-team] Re: Detecting libgcc

  • From: "David Reid" <dreid@xxxxxxxxxxxx>
  • To: <openbeos-build-team@xxxxxxxxxxxxx>
  • Date: Wed, 26 Jun 2002 13:03:24 +0100

query -a libgcc.a will work nicely

How do we get that into jam though??

The how-to can be just that simple, but it needs to be somewhere so people
can read it :)

Probably also explain how to get Jam and maybe also give some guidance on
Bochs?

david

----- Original Message -----
From: "Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx>
To: "build team" <openbeos-build-team@xxxxxxxxxxxxx>
Sent: Wednesday, June 26, 2002 12:58 PM
Subject: [openbeos-build-team] Re: Detecting libgcc


>
> On Wed, 26 Jun 2002, David Reid wrote:
>
> > We really need to get this autodetected as it's causing a few comments
and
> > people to get annoyed...
>
> Is there an algorithm for this, or do you think of something simple like
> this:
>
> if $(OS) = BEOS
> {
>     LIBGCCBASEDIRS = /boot/develop/tools/gnupro/lib/gcc-lib ;
> }
> else if $(OS) = LINUX
> {
>     LIBGCCBASEDIRS = /usr/lib/gcc-lib /usr/local/lib/gcc-lib ;
> }
> # else...
>
> {
>     # actually it should be something like
>     #local libdirs = $(LIBGCCBASEDIRS)/$(OSTARGET)/$(GCCVERSION) ;
>     # but I have no idea how to determine OSTARGET and GCCVERSION
>     # (the latter is simple in theory: gcc -version, but can't be done
>     # inside a Jambase/Jamfile). We could supply these variables to the
>     # jam command though. Or we extend jam itself by a command invocation
>     # rule.
>
>     # work-around:
>     # target
>     local libdirs = [ GLOB $(LIBGCCBASEDIRS) : * ] ;
>     # gcc version
>     libdirs = [ GLOB $(libdirs) : * ] ;
>
>     # filter those containing a libgcc.a
>     local libs = [ GLOB $(libdirs) : libgcc.a ] ;
>     libdirs = $(libs:D) ;
>     # pick the first one?!
>     LIBGCCDIR = $(libdirs[1]) ;
> }
>
> # ... use $(LIBGCCDIR)...
>
>
> Note: this uses the GLOB rule, which is a Jam 2.4 feature.
>
> > We also need a how-to for the build ASAP...
>
> Err, currently it would only contain `type: cd openbeos; jam'. Or do I
> miss something? Portability stuff?
>
> CU, Ingo
>
>
>


Other related posts: