On Sat, 9 Feb 2013 19:51:44 +0100
Ian Kumlien <po...@vapor.com> wrote:

> On Sat, Feb 09, 2013 at 08:57:42PM +0300, Sergei Trofimovich wrote:
> > On Sat,  9 Feb 2013 00:19:29 +0100
> > Ian Kumlien <po...@demius.net> wrote:
> > 
> > > Sometimes, when you least expect it, a static binary is what you need to
> > > rescue your data... Or just get a good enough handle on things to make
> > > it work again ;)
> > > 
> > > "make static" is a gift to you, dear user with filesystem problems!
> > 
> > What's wrong with conventional LDFLAGS=-static make?
> 
> That doesn't work for me, does it actually work for you?
> 
> I'd say it wouldn't without adding LDFLAGS so that the compiler gets it
> for all object compilations.

-static is link-only flag.
Mostly yes, it works.
    LDFLAGS="-static -pthread" make

make all binaries static.

It needs
 sys-apps/util-linux
 sys-libs/e2fsprogs-libs
 sys-fs/e2fsprogs
 sys-libs/zlib
to be built with USE=static-libs .

    $ ldd btrfs
        not a dynamic executable
    $ ldd mkfs.btrfs 
        not a dynamic executable

None of built binaries is dynamic.

-- 

  Sergei

Attachment: signature.asc
Description: PGP signature

Reply via email to