All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] poky-tiny: Enable size optimization by default
@ 2020-10-29 17:39 Alejandro Hernandez Samaniego
  2020-10-30  4:52 ` [poky] " Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Hernandez Samaniego @ 2020-10-29 17:39 UTC (permalink / raw)
  To: poky; +Cc: Alejandro Enedino Hernandez Samaniego

Compiler size optimization reduces the size of the root
filesystem by 15%, since poky-tiny is meant to be used
on size constrained devices, enable it by default

Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
---
 meta-poky/conf/distro/poky-tiny.conf | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
index 57826037f0..9a043b1ef5 100644
--- a/meta-poky/conf/distro/poky-tiny.conf
+++ b/meta-poky/conf/distro/poky-tiny.conf
@@ -32,6 +32,9 @@ require conf/distro/poky.conf
 DISTRO = "poky-tiny"
 DISTROOVERRIDES = "poky:poky-tiny"
 TCLIBC = "musl"
+
+FULL_OPTIMIZATION="-Os -pipe ${DEBUG_FLAGS}"
+
 # FIXME: consider adding a new "tiny" feature
 #DISTRO_FEATURES_append = " tiny"
 
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [poky] [PATCH] poky-tiny: Enable size optimization by default
  2020-10-29 17:39 [PATCH] poky-tiny: Enable size optimization by default Alejandro Hernandez Samaniego
@ 2020-10-30  4:52 ` Khem Raj
  2020-10-30  6:28   ` Mikko Rapeli
  0 siblings, 1 reply; 4+ messages in thread
From: Khem Raj @ 2020-10-30  4:52 UTC (permalink / raw)
  To: Alejandro Hernandez Samaniego; +Cc: poky, Alejandro Enedino Hernandez Samaniego

On Thu, Oct 29, 2020 at 10:39 AM Alejandro Hernandez Samaniego
<alejandro@enedino.org> wrote:
>
> Compiler size optimization reduces the size of the root
> filesystem by 15%, since poky-tiny is meant to be used
> on size constrained devices, enable it by default
>
> Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
> ---
>  meta-poky/conf/distro/poky-tiny.conf | 3 +++
>  1 file changed, 3 insertions(+)
>
> diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
> index 57826037f0..9a043b1ef5 100644
> --- a/meta-poky/conf/distro/poky-tiny.conf
> +++ b/meta-poky/conf/distro/poky-tiny.conf
> @@ -32,6 +32,9 @@ require conf/distro/poky.conf
>  DISTRO = "poky-tiny"
>  DISTROOVERRIDES = "poky:poky-tiny"
>  TCLIBC = "musl"
> +
> +FULL_OPTIMIZATION="-Os -pipe ${DEBUG_FLAGS}"
> +

this looks good. Thanks for doing this.

>  # FIXME: consider adding a new "tiny" feature
>  #DISTRO_FEATURES_append = " tiny"
>
> --
> 2.25.1
>
>
> 
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [poky] [PATCH] poky-tiny: Enable size optimization by default
  2020-10-30  4:52 ` [poky] " Khem Raj
@ 2020-10-30  6:28   ` Mikko Rapeli
  2020-10-30 14:36     ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Mikko Rapeli @ 2020-10-30  6:28 UTC (permalink / raw)
  To: raj.khem; +Cc: alejandro, poky, alhe

On Thu, Oct 29, 2020 at 09:52:02PM -0700, Khem Raj wrote:
> On Thu, Oct 29, 2020 at 10:39 AM Alejandro Hernandez Samaniego
> <alejandro@enedino.org> wrote:
> >
> > Compiler size optimization reduces the size of the root
> > filesystem by 15%, since poky-tiny is meant to be used
> > on size constrained devices, enable it by default
> >
> > Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
> > ---
> >  meta-poky/conf/distro/poky-tiny.conf | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
> > index 57826037f0..9a043b1ef5 100644
> > --- a/meta-poky/conf/distro/poky-tiny.conf
> > +++ b/meta-poky/conf/distro/poky-tiny.conf
> > @@ -32,6 +32,9 @@ require conf/distro/poky.conf
> >  DISTRO = "poky-tiny"
> >  DISTROOVERRIDES = "poky:poky-tiny"
> >  TCLIBC = "musl"
> > +
> > +FULL_OPTIMIZATION="-Os -pipe ${DEBUG_FLAGS}"
> > +
> 
> this looks good. Thanks for doing this.

Agreed! Unfortunately many, many recipes do add O2 or even O3 in
their own build scripts so the effect of this global Os setting
is not as good as it could be.

When I played with size optimization, I build the system first with
normal O2, then with Os and reviewed every single recipe where binary
package sizes did not change according to buildhistory.

Cheers,

-Mikko

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [poky] [PATCH] poky-tiny: Enable size optimization by default
  2020-10-30  6:28   ` Mikko Rapeli
@ 2020-10-30 14:36     ` Khem Raj
  0 siblings, 0 replies; 4+ messages in thread
From: Khem Raj @ 2020-10-30 14:36 UTC (permalink / raw)
  To: Mikko Rapeli
  Cc: Alejandro Enedino Hernandez Samaniego, poky,
	Alejandro Hernandez Samaniego

On Thu, Oct 29, 2020 at 11:28 PM <Mikko.Rapeli@bmw.de> wrote:
>
> On Thu, Oct 29, 2020 at 09:52:02PM -0700, Khem Raj wrote:
> > On Thu, Oct 29, 2020 at 10:39 AM Alejandro Hernandez Samaniego
> > <alejandro@enedino.org> wrote:
> > >
> > > Compiler size optimization reduces the size of the root
> > > filesystem by 15%, since poky-tiny is meant to be used
> > > on size constrained devices, enable it by default
> > >
> > > Signed-off-by: Alejandro Enedino Hernandez Samaniego <alhe@linux.microsoft.com>
> > > ---
> > >  meta-poky/conf/distro/poky-tiny.conf | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
> > > index 57826037f0..9a043b1ef5 100644
> > > --- a/meta-poky/conf/distro/poky-tiny.conf
> > > +++ b/meta-poky/conf/distro/poky-tiny.conf
> > > @@ -32,6 +32,9 @@ require conf/distro/poky.conf
> > >  DISTRO = "poky-tiny"
> > >  DISTROOVERRIDES = "poky:poky-tiny"
> > >  TCLIBC = "musl"
> > > +
> > > +FULL_OPTIMIZATION="-Os -pipe ${DEBUG_FLAGS}"
> > > +
> >
> > this looks good. Thanks for doing this.
>
> Agreed! Unfortunately many, many recipes do add O2 or even O3 in
> their own build scripts so the effect of this global Os setting
> is not as good as it could be.
>
> When I played with size optimization, I build the system first with
> normal O2, then with Os and reviewed every single recipe where binary
> package sizes did not change according to buildhistory.
>

yes its a common problem and perhaps should be patched and upstreamed
into those packages.

> Cheers,
>
> -Mikko

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-10-30 14:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-29 17:39 [PATCH] poky-tiny: Enable size optimization by default Alejandro Hernandez Samaniego
2020-10-30  4:52 ` [poky] " Khem Raj
2020-10-30  6:28   ` Mikko Rapeli
2020-10-30 14:36     ` Khem Raj

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.