From: Ian Kumlien <pomac@vapor.com>
To: Sergei Trofimovich <slyich@gmail.com>
Cc: linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] Btrfs-progs: add static compile target
Date: Sat, 9 Feb 2013 23:21:08 +0100 [thread overview]
Message-ID: <20130209222108.GS15780@pomac.netswarm.net> (raw)
In-Reply-To: <20130209224851.4560edf9@sf>
On Sat, Feb 09, 2013 at 10:48:51PM +0300, Sergei Trofimovich wrote:
> On Sat, 9 Feb 2013 19:51:44 +0100
> Ian Kumlien <pomac@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 <pomac@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
next prev parent reply other threads:[~2013-02-09 22:21 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-08 23:19 [PATCH] Btrfs-progs: add static compile target Ian Kumlien
2013-02-09 17:57 ` Sergei Trofimovich
2013-02-09 18:51 ` Ian Kumlien
2013-02-09 19:48 ` Sergei Trofimovich
2013-02-09 22:21 ` Ian Kumlien [this message]
2013-02-12 13:55 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130209222108.GS15780@pomac.netswarm.net \
--to=pomac@vapor.com \
--cc=linux-btrfs@vger.kernel.org \
--cc=slyich@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox