[OE-core] [PATCH] Make static lib builds (DISABLE_STATIC) configurable from local.conf

Khem Raj raj.khem at gmail.com
Fri May 6 04:43:17 UTC 2016


> On May 5, 2016, at 9:38 PM, ryan woodsmall <rwoodsmall at gmail.com> wrote:
> 
> The idea is to build an as-close-to-stock-as-possible Poky (or another) distro, but include support for static linking natively in the installed OS.

In this case, you will call it poky but it will be far from poky. So its better to either define your own distro config based on poky, it also helps you when you ask
questions on mailing list. If you say I am using poky and make such changes you will miss to inform and people will not be able to reproduce your
issues.

> Some of the bits I build/ship, including standalone static cross and native toolchains, target Poky as the stable reference source OS. The poky-tiny definition with musl exists, but doesn't quite cover what I need, and some externals are built outside of bitbake, the SDK and packaging system, so static compilation limits required libraries and gives me some confidence that I'll run on Poky.

I think poky-tiny policy to let  use static libs can be considered and I would encourage you to submit patch for poky tiny to let do that.

> 
> It's not a big deal at all to do a custom Poky-based distro so I can head down that path, but thought this might be useful. The default remains sane, setting "--disable-static", but provides a knob to turn if the old feature is needed. Apologies if I missed the point here!
> 
> On Thu, May 5, 2016 at 11:09 PM, Khem Raj <raj.khem at gmail.com <mailto:raj.khem at gmail.com>> wrote:
> 
> On May 5, 2016 8:59 PM, "ryan woodsmall" <rwoodsmall at gmail.com <mailto:rwoodsmall at gmail.com>> wrote:
> >
> > Static libraries are mostly usable in very small embedded systems.
> > The addiiton of musl-libc support allows very small "single binary" systems,
> > and static linking allows no shared lib deps on these types of builds.
> >
> > Signed-off-by: ryan woodsmall <rwoodsmall at gmail.com <mailto:rwoodsmall at gmail.com>>
> > ---
> >  meta/conf/distro/include/no-static-libs.inc | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git a/meta/conf/distro/include/no-static-libs.inc b/meta/conf/distro/include/no-static-libs.inc
> > index 13a7918..83472d5 100644
> > --- a/meta/conf/distro/include/no-static-libs.inc
> > +++ b/meta/conf/distro/include/no-static-libs.inc
> > @@ -1,4 +1,4 @@
> > -DISABLE_STATIC = " --disable-static"
> > +DISABLE_STATIC ?= " --disable-static"
> >
> 
> I think this defeats the essense of this inc file. Not including this file in your distro as a policy is what you want
> 
> >  # qemu aborts on unrecognised option
> >  DISABLE_STATIC_pn-qemu = ""
> > @@ -32,4 +32,4 @@ DISABLE_STATIC_pn-libusb1-native = ""
> >
> >  EXTRA_OECONF_append = "${DISABLE_STATIC}"
> >
> > -EXTRA_OECMAKE_append_pn-libical = "-DSHARED_ONLY=True"
> > +EXTRA_OECMAKE_append_pn-libical ?= "-DSHARED_ONLY=True"
> > --
> > 2.6.4
> >
> > --
> > _______________________________________________
> > Openembedded-core mailing list
> > Openembedded-core at lists.openembedded.org <mailto:Openembedded-core at lists.openembedded.org>
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core <http://lists.openembedded.org/mailman/listinfo/openembedded-core>
> 
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core at lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160505/d01e2ffc/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20160505/d01e2ffc/attachment-0002.sig>


More information about the Openembedded-core mailing list