Message ID | 1462507108-17945-1-git-send-email-rwoodsmall@gmail.com |
---|---|
State | New |
Headers | show |
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" # 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"
On May 5, 2016 8:59 PM, "ryan woodsmall" <rwoodsmall@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@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@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core
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@gmail.com> wrote: > > On May 5, 2016 8:59 PM, "ryan woodsmall" <rwoodsmall@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@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@lists.openembedded.org > > http://lists.openembedded.org/mailman/listinfo/openembedded-core >
> On May 5, 2016, at 9:38 PM, ryan woodsmall <rwoodsmall@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@gmail.com <mailto:raj.khem@gmail.com>> wrote: > > On May 5, 2016 8:59 PM, "ryan woodsmall" <rwoodsmall@gmail.com <mailto:rwoodsmall@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@gmail.com <mailto:rwoodsmall@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@lists.openembedded.org <mailto:Openembedded-core@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@lists.openembedded.org > http://lists.openembedded.org/mailman/listinfo/openembedded-core
On 6 May 2016 at 05:38, ryan woodsmall <rwoodsmall@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. Some of the bits I build/ship, including standalone static cross and > native toolchains, target Poky as the stable reference source OS Don't consider Poky to be a superior distro over others, or even the default nodistro, as it's not. It's simply a vehicle for our QA process and is a pretty minimal set of changes over the oe-core nodistro. Ross
ACK, thanks guys. Rolling a distro is the better thing to do in the long run, so that's the direction I'll head. On 5/6/16, Burton, Ross <ross.burton@intel.com> wrote: > On 6 May 2016 at 05:38, ryan woodsmall <rwoodsmall@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. Some of the bits I build/ship, including standalone static cross and >> native toolchains, target Poky as the stable reference source OS > > > Don't consider Poky to be a superior distro over others, or even the > default nodistro, as it's not. It's simply a vehicle for our QA process > and is a pretty minimal set of changes over the oe-core nodistro. > > Ross >
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@gmail.com> --- meta/conf/distro/include/no-static-libs.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)