Re: [dev] How about ?

From: Anselm R Garbe <>
Date: Sun, 1 Aug 2010 19:15:53 +0100

On 1 August 2010 08:30, pancake <> wrote:
> Cant this be done with a wraper shellscript ? Messing with gnu ld is like a
> near death experience.

Indeed, it can be done using some shell scripts but it'll be quite
slow. My initial efforts were gold related, though that's written in
C++ which is a bit annoying.

> Using r2libs can also be possible.. But would be more complex than a few loc
> shellscript.
> That's what libtool does ( between many other silly things) which we dont
> need, and certainly i would prefer to be cmpiler agnostic and be able to use
> tcc or llvm.

Afaik gold is compiler agnostic as long as ELF is involved.

> Inthe other side u can do this by specifying --enable-static and
> --dudable-shared in any prj using autofools (webkit, X11 ..)
> I dont get the point with the 'tee like'

With tee-like I mean that the static libraries are created in a
different place for later linking lookups, but also to support the
normal behavior in order that vanilla builds run through smoothly,
since they usually check for's to carry on.

A simplified example, imagine:

  ld -o foo.o bar.o baz.o

The tee-like behavior would result in and some archive
in /different/place/lib/libsomething.a

If an executable is involed:

  ld -o something /lib/crt0.o

we perform a static link and ignore all .so's involved and look for
/different/place/lib/libsomething.a instead.

With this in place we should get quite far with building most
dependencies and executables.

Received on Sun Aug 01 2010 - 20:15:53 CEST

This archive was generated by hypermail 2.2.0 : Sun Aug 01 2010 - 20:24:02 CEST