On Sat, Feb 09, 2013 at 10:48:51PM +0300, Sergei Trofimovich wrote:
> 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.

Yes, my point is it's not simply "LDFLAGS=-static", do you see any real
harm in having a static tagrget?

Something that tries to make sure that it's actually built correctly?

(Your approach relies on not likning any old objects since make doesn't
honor CFLAGS/LDFLAGS as dependencies.)
> -- 
> 
>   Sergei


--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to