On Wed, Mar 25, 2020 at 9:47 AM Khem Raj <raj.k...@gmail.com> wrote:
>
> On Wed, Mar 25, 2020 at 5:53 AM Bruce Ashfield <bruce.ashfi...@gmail.com> 
> wrote:
> >
> > On Wed, Mar 25, 2020 at 1:42 AM Khem Raj <raj.k...@gmail.com> wrote:
> > >
> > > openvswitch binaries can shed some size with lto
> > >
> > > --- 
> > > a/packages/rdk-linux-gnueabi/openvswitch/openvswitch-ovsdb/files-in-package.txt
> > > +++ 
> > > b/packages/rdk-linux-gnueabi/openvswitch/openvswitch-ovsdb/files-in-package.txt
> > > @@ -1,7 +1,7 @@
> > > drwxr-xr-x root       root             3488 ./usr
> > > drwxr-xr-x root       root             3488 ./usr/bin
> > > --rwxr-xr-x root       root           378984 ./usr/bin/ovsdb-client
> > > --rwxr-xr-x root       root           353628 ./usr/bin/ovsdb-tool
> > > --rwxr-xr-x root       root          1411216 ./usr/bin/ovs-vsctl
> > > +-rwxr-xr-x root       root           203356 ./usr/bin/ovsdb-client
> > > +-rwxr-xr-x root       root           233172 ./usr/bin/ovsdb-tool
> > > +-rwxr-xr-x root       root           287012 ./usr/bin/ovs-vsctl
> > > drwxr-xr-x root       root             3488 ./usr/sbin
> > > --rwxr-xr-x root       root           379404 ./usr/sbin/ovsdb-server
> > > +-rwxr-xr-x root       root           287672 ./usr/sbin/ovsdb-server
> > >
> > > Signed-off-by: Khem Raj <raj.k...@gmail.com>
> > > Cc: Bruce Ashfield <bruce.ashfi...@gmail.com>
> > > ---
> > >  recipes-networking/openvswitch/openvswitch_git.bb | 3 +++
> > >  1 file changed, 3 insertions(+)
> > >
> > > diff --git a/recipes-networking/openvswitch/openvswitch_git.bb 
> > > b/recipes-networking/openvswitch/openvswitch_git.bb
> > > index 07258be..bd74f49 100644
> > > --- a/recipes-networking/openvswitch/openvswitch_git.bb
> > > +++ b/recipes-networking/openvswitch/openvswitch_git.bb
> > > @@ -37,6 +37,9 @@ LIC_FILES_CHKSUM = 
> > > "file://LICENSE;md5=1ce5d23a6429dff345518758f13aaeab"
> > >
> > >  DPDK_INSTALL_DIR ?= "/opt/dpdk"
> > >
> > > +CFLAGS += "-flto"
> > > +LDFLAGS += "-flto"
> >
> > Shouldn't this be something that is configurable ? I know that I want
> > it to be. i.e. isn't there some sort of distro feature that we can use
> > to enable or disable this by default ?
> >
>
> yes distro feature is coming I will  turn this into DISTRO feature too
> but in this case benefits are regardless

.... but nothing is bug free, there are documented cases of LTO
causing issues. So until we get a distro knob to turn this off an on,
what about something like ?

CFLAGS_LTO ?= "-flto"
LDFLAGS_LTO ?= "-flto"

CFLAGS += "${CFLAGS_LTO}"
LDFLAGS += "${LDFLAGS_LTO}"

So if we run into issues, we can easily bappend the LTO flags to nothing.

Bruce

>
> > Bruce
> >
> > > +
> > >  PACKAGECONFIG ?= "libcap-ng"
> > >  PACKAGECONFIG[dpdk] = 
> > > "--with-dpdk=${STAGING_DIR_TARGET}${DPDK_INSTALL_DIR}/share/${TARGET_ARCH}-native-linuxapp-gcc,,dpdk,dpdk"
> > >  PACKAGECONFIG[libcap-ng] = 
> > > "--enable-libcapng,--disable-libcapng,libcap-ng,"
> > > --
> > > 2.26.0
> > >
> >
> >
> > --
> > - Thou shalt not follow the NULL pointer, for chaos and madness await
> > thee at its end
> > - "Use the force Harry" - Gandalf, Star Trek II



-- 
- Thou shalt not follow the NULL pointer, for chaos and madness await
thee at its end
- "Use the force Harry" - Gandalf, Star Trek II
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#5235): 
https://lists.yoctoproject.org/g/meta-virtualization/message/5235
Mute This Topic: https://lists.yoctoproject.org/mt/72539664/21656
Group Owner: meta-virtualization+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to