* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected @ 2015-01-20 10:17 Richard Genoud 2015-01-20 10:17 ` [Buildroot] [PATCH 2/2] qwt: add license information Richard Genoud 2015-01-20 16:45 ` [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected Thomas Petazzoni 0 siblings, 2 replies; 17+ messages in thread From: Richard Genoud @ 2015-01-20 10:17 UTC (permalink / raw) To: buildroot If Qt is compile as a static library, there's no point compiling qwt as a shared library, otherwise, we will have a huge qwt lib and a huge Qt application. Signed-off-by: Richard Genoud <richard.genoud@gmail.com> --- package/qwt/qwt.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk index a92d6b4b1540..d783314f7e40 100644 --- a/package/qwt/qwt.mk +++ b/package/qwt/qwt.mk @@ -32,6 +32,12 @@ else QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/\# QWT_CONFIG += QwtOpenGL/' endif +ifeq ($(BR2_PACKAGE_QT_SHARED),y) + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/' +else + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/\# QWT_CONFIG += QwtDll/' +endif + define QWT_CONFIGURE_CMDS $(SED) $(QWT_CONFIG) $(@D)/qwtconfig.pri (cd $(@D); $(TARGET_MAKE_ENV) $(QT_QMAKE)) -- 2.0.0 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 2/2] qwt: add license information 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 ` 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 1 sibling, 1 reply; 17+ messages in thread From: Richard Genoud @ 2015-01-20 10:17 UTC (permalink / raw) To: buildroot Signed-off-by: Richard Genoud <richard.genoud@gmail.com> --- package/qwt/qwt.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk index d783314f7e40..b843618aa6fe 100644 --- a/package/qwt/qwt.mk +++ b/package/qwt/qwt.mk @@ -10,6 +10,9 @@ QWT_SITE = http://downloads.sourceforge.net/project/qwt/qwt/$(QWT_VERSION) QWT_INSTALL_STAGING = YES QWT_DEPENDENCIES = qt +QWT_LICENSE = LGPLv2.1 with exceptions +QWT_LICENSE_FILES = COPYING + QWT_CONFIG = 's%QWT_INSTALL_PREFIX.*/usr/local/.*%QWT_INSTALL_PREFIX = /usr%' QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDesigner.*$$/\# QWT_CONFIG += QwtDesigner/' QWT_CONFIG += -e 's%/features%/mkspecs/features%' -- 2.0.0 ^ permalink raw reply related [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 2/2] qwt: add license information 2015-01-20 10:17 ` [Buildroot] [PATCH 2/2] qwt: add license information Richard Genoud @ 2015-01-20 16:47 ` Thomas Petazzoni 0 siblings, 0 replies; 17+ messages in thread From: Thomas Petazzoni @ 2015-01-20 16:47 UTC (permalink / raw) To: buildroot Dear Richard Genoud, On Tue, 20 Jan 2015 11:17:29 +0100, Richard Genoud wrote: > Signed-off-by: Richard Genoud <richard.genoud@gmail.com> > --- > package/qwt/qwt.mk | 3 +++ > 1 file changed, 3 insertions(+) Applied, thanks. Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 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:45 ` Thomas Petazzoni 2015-01-23 16:00 ` Richard Genoud 2015-01-25 22:20 ` Peter Korsgaard 1 sibling, 2 replies; 17+ messages in thread From: Thomas Petazzoni @ 2015-01-20 16:45 UTC (permalink / raw) To: buildroot Dear Richard Genoud, On Tue, 20 Jan 2015 11:17:28 +0100, Richard Genoud wrote: > If Qt is compile as a static library, there's no point compiling qwt as > a shared library, otherwise, we will have a huge qwt lib and a huge Qt > application. > > Signed-off-by: Richard Genoud <richard.genoud@gmail.com> > --- > package/qwt/qwt.mk | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk > index a92d6b4b1540..d783314f7e40 100644 > --- a/package/qwt/qwt.mk > +++ b/package/qwt/qwt.mk > @@ -32,6 +32,12 @@ else > QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/\# QWT_CONFIG += QwtOpenGL/' > endif > > +ifeq ($(BR2_PACKAGE_QT_SHARED),y) > + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/' > +else > + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/\# QWT_CONFIG += QwtDll/' > +endif I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use BR2_STATIC_LIBS here instead. Moreover, we're using Qwt 6.1.0, and this version is in fact compatible with both Qt >= 4.4 and Qt >= 5.0, so it should be adapted to this, and not use a qt4 specific Config.in option. Can you work on this and resend an updated version? Thanks, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 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-25 22:20 ` Peter Korsgaard 1 sibling, 1 reply; 17+ messages in thread From: Richard Genoud @ 2015-01-23 16:00 UTC (permalink / raw) To: buildroot 2015-01-20 17:45 GMT+01:00 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>: > Dear Richard Genoud, > > On Tue, 20 Jan 2015 11:17:28 +0100, Richard Genoud wrote: >> If Qt is compile as a static library, there's no point compiling qwt as >> a shared library, otherwise, we will have a huge qwt lib and a huge Qt >> application. >> >> Signed-off-by: Richard Genoud <richard.genoud@gmail.com> >> --- >> package/qwt/qwt.mk | 6 ++++++ >> 1 file changed, 6 insertions(+) >> >> diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk >> index a92d6b4b1540..d783314f7e40 100644 >> --- a/package/qwt/qwt.mk >> +++ b/package/qwt/qwt.mk >> @@ -32,6 +32,12 @@ else >> QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/\# QWT_CONFIG += QwtOpenGL/' >> endif >> >> +ifeq ($(BR2_PACKAGE_QT_SHARED),y) >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/' >> +else >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/\# QWT_CONFIG += QwtDll/' >> +endif > > I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use > BR2_STATIC_LIBS here instead. you mean BR2_PREFER_STATIC_LIB, right ? > Moreover, we're using Qwt 6.1.0, and this version is in fact compatible > with both Qt >= 4.4 and Qt >= 5.0, so it should be adapted to this, and > not use a qt4 specific Config.in option. Ok, I'll check that this works with both Qts. I may have misunderstood your 1st remark, but are you planning to deprecate BR2_PACKAGE_QT_SHARED ? otherwise, I could do something like: ifeq($(sort $(BR2_PREFER_STATIC_LIB) $(BR2_PACKAGE_QT_STATIC)),y) [ compile static qwt ] else [ compile shared qwt ] endif what do you think ? regards, Richard ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-23 16:00 ` Richard Genoud @ 2015-01-23 16:06 ` Yann E. MORIN 2015-01-23 16:19 ` Richard Genoud 0 siblings, 1 reply; 17+ messages in thread From: Yann E. MORIN @ 2015-01-23 16:06 UTC (permalink / raw) To: buildroot Richard, All, On 2015-01-23 17:00 +0100, Richard Genoud spake thusly: > 2015-01-20 17:45 GMT+01:00 Thomas Petazzoni > <thomas.petazzoni@free-electrons.com>: > > Dear Richard Genoud, > > > > On Tue, 20 Jan 2015 11:17:28 +0100, Richard Genoud wrote: > >> If Qt is compile as a static library, there's no point compiling qwt as > >> a shared library, otherwise, we will have a huge qwt lib and a huge Qt > >> application. > >> > >> Signed-off-by: Richard Genoud <richard.genoud@gmail.com> > >> --- > >> package/qwt/qwt.mk | 6 ++++++ > >> 1 file changed, 6 insertions(+) > >> > >> diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk > >> index a92d6b4b1540..d783314f7e40 100644 > >> --- a/package/qwt/qwt.mk > >> +++ b/package/qwt/qwt.mk > >> @@ -32,6 +32,12 @@ else > >> QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/\# QWT_CONFIG += QwtOpenGL/' > >> endif > >> > >> +ifeq ($(BR2_PACKAGE_QT_SHARED),y) > >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/' > >> +else > >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/\# QWT_CONFIG += QwtDll/' > >> +endif > > > > I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use > > BR2_STATIC_LIBS here instead. > you mean BR2_PREFER_STATIC_LIB, right ? No, the option has been renamed in the tree, see: http://git.buildroot.org/buildroot/commit/?id=665e13c85e1fd216499cdd335a88a4d1c20f175f Please, use the master branch when hacking, you'll avoid surprises later! ;-) Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-23 16:06 ` Yann E. MORIN @ 2015-01-23 16:19 ` Richard Genoud 0 siblings, 0 replies; 17+ messages in thread From: Richard Genoud @ 2015-01-23 16:19 UTC (permalink / raw) To: buildroot 2015-01-23 17:06 GMT+01:00 Yann E. MORIN <yann.morin.1998@free.fr>: > Richard, All, > > On 2015-01-23 17:00 +0100, Richard Genoud spake thusly: >> 2015-01-20 17:45 GMT+01:00 Thomas Petazzoni >> <thomas.petazzoni@free-electrons.com>: >> > Dear Richard Genoud, >> > >> > On Tue, 20 Jan 2015 11:17:28 +0100, Richard Genoud wrote: >> >> If Qt is compile as a static library, there's no point compiling qwt as >> >> a shared library, otherwise, we will have a huge qwt lib and a huge Qt >> >> application. >> >> >> >> Signed-off-by: Richard Genoud <richard.genoud@gmail.com> >> >> --- >> >> package/qwt/qwt.mk | 6 ++++++ >> >> 1 file changed, 6 insertions(+) >> >> >> >> diff --git a/package/qwt/qwt.mk b/package/qwt/qwt.mk >> >> index a92d6b4b1540..d783314f7e40 100644 >> >> --- a/package/qwt/qwt.mk >> >> +++ b/package/qwt/qwt.mk >> >> @@ -32,6 +32,12 @@ else >> >> QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtOpenGL.*$$/\# QWT_CONFIG += QwtOpenGL/' >> >> endif >> >> >> >> +ifeq ($(BR2_PACKAGE_QT_SHARED),y) >> >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/' >> >> +else >> >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/\# QWT_CONFIG += QwtDll/' >> >> +endif >> > >> > I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use >> > BR2_STATIC_LIBS here instead. >> you mean BR2_PREFER_STATIC_LIB, right ? > > No, the option has been renamed in the tree, see: > http://git.buildroot.org/buildroot/commit/?id=665e13c85e1fd216499cdd335a88a4d1c20f175f > > Please, use the master branch when hacking, you'll avoid surprises > later! ;-) yep ! Thanks for the heads up ! regards, Richard. ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 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-25 22:20 ` Peter Korsgaard 2015-01-26 9:34 ` Richard Genoud 2015-01-27 20:42 ` Arnout Vandecappelle 1 sibling, 2 replies; 17+ messages in thread From: Peter Korsgaard @ 2015-01-25 22:20 UTC (permalink / raw) To: buildroot >>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > Dear Richard Genoud, > On Tue, 20 Jan 2015 11:17:28 +0100, Richard Genoud wrote: >> If Qt is compile as a static library, there's no point compiling qwt as >> a shared library, otherwise, we will have a huge qwt lib and a huge Qt >> application. >> >> Signed-off-by: Richard Genoud <richard.genoud@gmail.com> >> >> +ifeq ($(BR2_PACKAGE_QT_SHARED),y) >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/' >> +else >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/\# QWT_CONFIG += QwtDll/' >> +endif > I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use > BR2_STATIC_LIBS here instead. 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. It does complicate LGPL compliance and I don't know if the disk space concerns are as big these days though. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-25 22:20 ` Peter Korsgaard @ 2015-01-26 9:34 ` Richard Genoud 2015-01-26 9:54 ` Peter Korsgaard 2015-01-26 11:21 ` Thomas Petazzoni 2015-01-27 20:42 ` Arnout Vandecappelle 1 sibling, 2 replies; 17+ messages in thread From: Richard Genoud @ 2015-01-26 9:34 UTC (permalink / raw) To: buildroot On 25/01/2015 23:20, Peter Korsgaard wrote: >>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > > > Dear Richard Genoud, > > On Tue, 20 Jan 2015 11:17:28 +0100, Richard Genoud wrote: > >> If Qt is compile as a static library, there's no point compiling qwt as > >> a shared library, otherwise, we will have a huge qwt lib and a huge Qt > >> application. > >> > >> Signed-off-by: Richard Genoud <richard.genoud@gmail.com> >>> > >> +ifeq ($(BR2_PACKAGE_QT_SHARED),y) > >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/QWT_CONFIG += QwtDll/' > >> +else > >> + QWT_CONFIG += -e 's/^.*QWT_CONFIG.*QwtDll.*$$/\# QWT_CONFIG += QwtDll/' > >> +endif > > > I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use > > BR2_STATIC_LIBS here instead. > > 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. > It does complicate LGPL compliance and I don't know if the disk space > concerns are as big these days though. > Hum... I didn't think about the static vs dynamic LGPL compliance. I'll have to check that. And for disk space concern, I must admit that I haven't got much space ( 60Mio for the rootfs, and the Qt application takes 10Mio regards, Richard ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 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 1 sibling, 1 reply; 17+ messages in thread From: Peter Korsgaard @ 2015-01-26 9:54 UTC (permalink / raw) To: buildroot >>>>> "Richard" == Richard Genoud <richard.genoud@gmail.com> writes: Hi, >> 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. Indeed. I guess this is (still) quite common. >> It does complicate LGPL compliance and I don't know if the disk space >> concerns are as big these days though. >> > Hum... I didn't think about the static vs dynamic LGPL compliance. I'll > have to check that. I'm not a lawyer, but as I understand it - Because of the LGPLs relinking requirements you basically have to provide the object files of your application. > And for disk space concern, I must admit that I haven't got much space ( > 60Mio for the rootfs, and the Qt application takes 10Mio Heh, I've been involved with projects using Qt in <10MB ;) -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-26 9:54 ` Peter Korsgaard @ 2015-01-26 10:16 ` Richard Genoud 0 siblings, 0 replies; 17+ messages in thread From: Richard Genoud @ 2015-01-26 10:16 UTC (permalink / raw) To: buildroot 2015-01-26 10:54 GMT+01:00 Peter Korsgaard <peter@korsgaard.com>: >>>>>> "Richard" == Richard Genoud <richard.genoud@gmail.com> writes: > > Hi, > >>> 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. > > Indeed. I guess this is (still) quite common. > > > >> It does complicate LGPL compliance and I don't know if the disk space > >> concerns are as big these days though. > >> > > Hum... I didn't think about the static vs dynamic LGPL compliance. I'll > > have to check that. > > I'm not a lawyer, but as I understand it - Because of the LGPLs > relinking requirements you basically have to provide the object files of > your application. That's what I also understood. And it makes perfect sense ! > > And for disk space concern, I must admit that I haven't got much space ( > > 60Mio for the rootfs, and the Qt application takes 10Mio > > Heh, I've been involved with projects using Qt in <10MB ;) :) Well, I guess that I may have some possible optimization to do ! ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-26 9:34 ` Richard Genoud 2015-01-26 9:54 ` Peter Korsgaard @ 2015-01-26 11:21 ` Thomas Petazzoni 2015-01-26 17:00 ` Richard Genoud 1 sibling, 1 reply; 17+ messages in thread From: Thomas Petazzoni @ 2015-01-26 11:21 UTC (permalink / raw) To: buildroot 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. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-26 11:21 ` Thomas Petazzoni @ 2015-01-26 17:00 ` Richard Genoud 2015-01-26 17:11 ` Thomas Petazzoni 0 siblings, 1 reply; 17+ messages in thread From: Richard Genoud @ 2015-01-26 17:00 UTC (permalink / raw) To: buildroot 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. ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-26 17:00 ` Richard Genoud @ 2015-01-26 17:11 ` Thomas Petazzoni 0 siblings, 0 replies; 17+ messages in thread From: Thomas Petazzoni @ 2015-01-26 17:11 UTC (permalink / raw) To: buildroot Dear Richard Genoud, On Mon, 26 Jan 2015 18:00:48 +0100, Richard Genoud wrote: > > 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 Yes, kind of. All this should be done in the generic-package infrastructure. Something like this in the inner-package function ifneq ($(filter $(1),$(call qstrip,$(BR2_LIST_OF_STATIC_PACKAGES))),) $(2)_FORCE_STATIC = YES endif ifeq ($(BR2_STATIC_LIB),y) $(2)_FORCE_STATIC = YES endif > And then, in every single package file we'll have to change: > s/\<BR2_STATIC_LIB\>/pkg-name_FORCE_STATIC/g Indeed. > but I'm really not sure this is the best way. I don't really see a better way of doing this. Best regards, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-25 22:20 ` Peter Korsgaard 2015-01-26 9:34 ` Richard Genoud @ 2015-01-27 20:42 ` Arnout Vandecappelle 2015-01-27 20:55 ` Peter Korsgaard 1 sibling, 1 reply; 17+ messages in thread From: Arnout Vandecappelle @ 2015-01-27 20:42 UTC (permalink / raw) To: buildroot On 25/01/15 23:20, Peter Korsgaard wrote: >>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: [snip] > > I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use > > BR2_STATIC_LIBS here instead. > > 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. But can't you just build with BR2_SHARED_STATIC_LIBS and link your application with --static? That's what BR2_SHARED_STATIC_LIBS was meant for, right? Regards, Arnout > > It does complicate LGPL compliance and I don't know if the disk space > concerns are as big these days though. > -- 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: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-27 20:42 ` Arnout Vandecappelle @ 2015-01-27 20:55 ` Peter Korsgaard 2015-01-28 9:35 ` Richard Genoud 0 siblings, 1 reply; 17+ messages in thread From: Peter Korsgaard @ 2015-01-27 20:55 UTC (permalink / raw) To: buildroot >>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: > On 25/01/15 23:20, Peter Korsgaard wrote: >>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > [snip] >> > I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use >> > BR2_STATIC_LIBS here instead. >> >> 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. > But can't you just build with BR2_SHARED_STATIC_LIBS and link your application > with --static? That's what BR2_SHARED_STATIC_LIBS was meant for, right? More or less, yes. It's not optimal if the application use other libraries you want to link dynamically and you need a post-build script to get rid of the .so files in the rootfs, but it is fairly close. -- Bye, Peter Korsgaard ^ permalink raw reply [flat|nested] 17+ messages in thread
* [Buildroot] [PATCH 1/2] qwt: compile as a static lib if QT_SHARED is not selected 2015-01-27 20:55 ` Peter Korsgaard @ 2015-01-28 9:35 ` Richard Genoud 0 siblings, 0 replies; 17+ messages in thread From: Richard Genoud @ 2015-01-28 9:35 UTC (permalink / raw) To: buildroot 2015-01-27 21:55 GMT+01:00 Peter Korsgaard <peter@korsgaard.com>: >>>>>> "Arnout" == Arnout Vandecappelle <arnout@mind.be> writes: > > > On 25/01/15 23:20, Peter Korsgaard wrote: > >>>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes: > > [snip] > >> > I think we should get rid of BR2_PACKAGE_QT_SHARED completely, and use > >> > BR2_STATIC_LIBS here instead. > >> > >> 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. > > > But can't you just build with BR2_SHARED_STATIC_LIBS and link your application > > with --static? That's what BR2_SHARED_STATIC_LIBS was meant for, right? > > More or less, yes. It's not optimal if the application use other > libraries you want to link dynamically and you need a post-build script > to get rid of the .so files in the rootfs, but it is fairly close. Indeed. As you said, the rootfs has to be cleaned in postbuild, but that should work. ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2015-01-28 9:35 UTC | newest] Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 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
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.