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

ryan woodsmall rwoodsmall at gmail.com
Fri May 6 04:38:26 UTC 2016


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. 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.

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> wrote:

>
> On May 5, 2016 8:59 PM, "ryan woodsmall" <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>
> > ---
> >  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
> > 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/1b972e94/attachment-0002.html>


More information about the Openembedded-core mailing list