All of lore.kernel.org
 help / color / mirror / Atom feed
From: Richard Genoud <richard.genoud@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected
Date: Mon, 26 Jan 2015 18:00:48 +0100	[thread overview]
Message-ID: <CACQ1gAiDQySdHAt3xy82+fwVmJLqfRrCbR=NHDR9roHbhdSFVw@mail.gmail.com> (raw)
In-Reply-To: <20150126122141.437dd519@free-electrons.com>

2015-01-26 12:21 GMT+01:00 Thomas Petazzoni
<thomas.petazzoni@free-electrons.com>:
> Dear Richard Genoud,
>
> On Mon, 26 Jan 2015 10:34:34 +0100, Richard Genoud wrote:
>
>> > I agree that it would be cleaner, but the reason the explicit QT_SHARED
>> > stuff was added was afaik a lot of systems only needed Qt in a single
>> > application / that application only used a subset of the Qt
>> > functionality, so having a static libQt while everything else was shared
>> > was quite a big win in size / startup time.
>>
>> yes, that's exactly my case. I've got one single Qt application, and Qt
>> is quite huge, so making it static saves a lot of space.
>> I didn't trying to compile with BR2_STATIC_LIBS=y, but I guess that my
>> rootfs will be much bigger.
>
> Probably. Unfortunately with kconfig, we cannot easily add one option
> for debug symbols, static/dynamic linking to each package. It would add
> gazillions of options.
>
> One possibility would be to have one global string option that you
> could fill in with a space-separated list of packages that you want to
> be built statically, even if the rest of the system is built
> dynamically.
Indeed, a generic solution like that would be great.
The solution is not straight-forward though. (but as I'm not a
buildroot-internals guru, I may be missing something)
What I see is that the option
BR2_LIST_OF_STATIC_PACKAGES="qwt qt busybox"
Will define :
QWT_FORCE_STATIC=y
QT_FORCE_STATIC=y
BUSYBOX_FORCE_STATIC=y

And the BR2_STATIC_LIB=y will define pkg-name_FORCE_STATIC=y for all packages

And then, in every single package file we'll have to change:
s/\<BR2_STATIC_LIB\>/pkg-name_FORCE_STATIC/g

but I'm really not sure this is the best way.

regards,
Richard.

  reply	other threads:[~2015-01-26 17:00 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-20 10:17 [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected Richard Genoud
2015-01-20 10:17 ` [Buildroot] [PATCH 2/2] qwt: add license information Richard Genoud
2015-01-20 16:47   ` Thomas Petazzoni
2015-01-20 16:45 ` [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected Thomas Petazzoni
2015-01-23 16:00   ` Richard Genoud
2015-01-23 16:06     ` Yann E. MORIN
2015-01-23 16:19       ` Richard Genoud
2015-01-25 22:20   ` Peter Korsgaard
2015-01-26  9:34     ` Richard Genoud
2015-01-26  9:54       ` Peter Korsgaard
2015-01-26 10:16         ` Richard Genoud
2015-01-26 11:21       ` Thomas Petazzoni
2015-01-26 17:00         ` Richard Genoud [this message]
2015-01-26 17:11           ` Thomas Petazzoni
2015-01-27 20:42     ` Arnout Vandecappelle
2015-01-27 20:55       ` Peter Korsgaard
2015-01-28  9:35         ` Richard Genoud

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='CACQ1gAiDQySdHAt3xy82+fwVmJLqfRrCbR=NHDR9roHbhdSFVw@mail.gmail.com' \
    --to=richard.genoud@gmail.com \
    --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.