All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] libintl static linking issues - yet another spin
Date: Mon, 3 Apr 2017 14:45:12 +0200	[thread overview]
Message-ID: <c5d92f69-e151-293b-3b77-3b2b061d0e50@mind.be> (raw)
In-Reply-To: <20170403141147.0376b102@free-electrons.com>



On 03-04-17 14:11, Thomas Petazzoni wrote:
> Hello,
> 
> On Mon, 3 Apr 2017 13:25:11 +0200, Arnout Vandecappelle wrote:
> 
>>  Would the libintl from uClibc make it easier to do static linking, i.e. is it
>> in libc or in a separate libintl library?
> 
> It is in libc I believe, since uClibc now has everything in libc. So it
> does make things a *lot* easier for static linking.

 And I guess musl also has it in a single libc? Yeah, I don't see a libintl
there so I guess it's bundled.

 If we do enable the stubs in uClibc, and a packages links with -lintl, then in
fact the full gettext will be used and the stubs are not even linked in
(statically or dynamically), correct? In that case, we could indeed enable the
stubs in uClibc. As a result, in static linking, any package that links with
gettext but forgets an explicit -lintl will use the stubs instead of the full
implementation. So the package still works, but without translations.

 So that would be an option. We should then still accept patches that add
appropriate -lintl even though it's not a build failure, but we don't have to
fix build failures due to -lintl if nobody complains about it. It's a kind of
pragmatical, imperfect solution.


 As a side note, pretty much independent of this issue: I wonder if our
BR2_NEEDS_GETTEXT_IF_LOCALE approach really is the right thing to do. It
basically says: if a package is able to use translations, we force translations
(by enabling gettext). Wouldn't it be much more appropriate to remove all those
selects from Config.in, and instead just add to _DEPENDENCIES:
$(if $(BR2_PACKAGE_GETTEXT),gettext) ? That allows the user to choose whether or
not they want translations.


 Regards,
 Arnout

-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
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:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF

  parent reply	other threads:[~2017-04-03 12:45 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-26 21:53 [Buildroot] Patchwork cleanup, 10 patches to look at Thomas Petazzoni
2017-03-27 12:35 ` Arnout Vandecappelle
2017-03-27 13:43   ` Andrey Smirnov
2017-03-28 20:25   ` Thomas Petazzoni
2017-04-03 10:42     ` [Buildroot] libintl static linking issues - yet another spin Arnout Vandecappelle
2017-04-03 11:01       ` Thomas Petazzoni
2017-04-03 11:25         ` Arnout Vandecappelle
2017-04-03 12:11           ` Thomas Petazzoni
2017-04-03 12:30             ` Waldemar Brodkorb
2017-04-03 12:45             ` Arnout Vandecappelle [this message]
2017-04-03 13:02               ` Thomas Petazzoni
2017-04-03 14:12                 ` Arnout Vandecappelle
2017-04-01 16:52 ` [Buildroot] Patchwork cleanup, 10 patches to look at Thomas Petazzoni
2017-04-02  3:04   ` Carlos Santos

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=c5d92f69-e151-293b-3b77-3b2b061d0e50@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.