Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] Static build changes
Date: Thu, 12 Jan 2012 12:08:57 +0100	[thread overview]
Message-ID: <201201121208.57520.arnout@mind.be> (raw)
In-Reply-To: <F9C551623D2CBB4C9488801D14F864C60F039F@ex-mb1.corp.adtran.com>

On Wednesday 11 January 2012 17:23:16 ANDY KENNEDY wrote:
> So, to that end, I guess I should scrap this patch, then
> attempt a new on for this later.  The problem is, I don't
> have time to revisit this right now (big push for a Q1/Q2
> release).  If I get a "round toit", perhaps I'll be able to
> attempt such a patch later next month.

 Let this be an invitation for other volunteers to pick up the patch!

> >  GNU autoconf will give a warning about unsupported options.  One
> > of the
> > global options is actually unsupported for most platforms:
> > --disable-gtk-doc.
> > 
> >  If some package has a custom configure script that errors out, it
> > should override $(PKG)_CONFIGURE_CMDS.
> 
> Okay, so, I've exposed an error in the ncurses.mk file.
> For me to make ncurses "work" the way I want it to, I have
> to patch the file in this manner.  Do I have to correct
> _all_ errors with any given Makefile when patching towards a
> specific goal in order to satisfy the hive?  If that is the
> case, I then have the question of Who decides what is
> correct and what is broken for any given patch that I may need
> to create?

 No, you misunderstood me: I didn't mean that you should override
$(PKG)_CONFIGURE_CMDS; I meant it as general advise for packagers.

 I you patch an existing package, like you do, it is nice if you can
fix some brokenness, but it is not required.

 In the case of ncurses, the simplest is to remove the redundant configure
options from ncurses.mk.

 In the case of htop, if the default solution doesn't work for whatever
reason, then adding something specific is fine of course.  [I quickly
tried it and just adding -static to LDFLAGS isn't sufficient for htop.]


> > > So, the original design I had done was to add top-level config
> > option
> > > under PREFER_STATIC as BUILD_ONLY_STATIC.  I guessed that this
> > would not
> > > be well received by the hive.  Perhaps that would have been a
> > better
> > > thing to do.  PREFER_STATIC seems to be misleading (based upon my
> > > expectations) given that if you _PREFER_ to use static libraries,
> > then
> > > shouldn't the system ONLY USE static libraries and never install
> > the
> > > shared objects?  I mean, if I ask my contractor to use screws to
> > build
> > > something, and he uses nails, that isn't what I asked for.  But
> > again,
> > > perhaps I have the wrong expectations for PREFER_STATIC.
> > 
> >  I guess this is because some packages don't know how to build
> > static
> > libraries, or how to link with them.  Such packages would have to
> > depend
> > on !BUILD_ONLY_STATIC.  But I think that it is a lot of work to
> > maintain
> > that option, with little benefit.
> 
> Eh, I had about 30 lines of text to discuss, "little benefit", but
> deleted those.  Got wrapped around the axel on that one.  It isn't
> little to me, be essential.  I'll look (later, probably two months)
> at putting this back in and putting the params in the top level
> make files.  We'll discuss again then.  For now, I'll continue to
> use my patch.  I concede and withdraw the patch.

 If there is a BUILD_ONLY_STATIC option that really makes sure that
no dynamic libraries can be used, then the benefit is clear.  But I'm
afraid that there is a big risk that some programs are accidentally
linked dynamically after all, and that you create a rootfs that doesn't
work.  In that case, the benefit compared to PREFER_STATIC is pretty
small IMO.


 Regards,
 Arnout


-- 
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2012-01-12 11:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-12-20 16:11 [Buildroot] [PATCH] Static build changes ANDY KENNEDY
2012-01-09  7:12 ` Arnout Vandecappelle
2012-01-09 20:45   ` ANDY KENNEDY
2012-01-11  7:01     ` Arnout Vandecappelle
2012-01-11 16:23       ` ANDY KENNEDY
2012-01-12 11:08         ` Arnout Vandecappelle [this message]
2012-01-09  8:04 ` Thomas Petazzoni
2012-01-09 17:17   ` Michael S. Zick

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=201201121208.57520.arnout@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@busybox.net \
    /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