poky-tiny: enable section removal
PATCH v2 1/1 poky-tiny: enable section removal
Use GCC sections flags so that unused sections can be garbage collected at link time.
--- meta-poky/conf/distro/poky-tiny.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)
meta-poky/conf/distro/poky-tiny.conf +22 -0
@@ -122,3 +122,25 @@ PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny" # Disable python usage in opkg-utils since it won't build with tiny config PACKAGECONFIG_remove_pn-opkg-utils = "python" + +# set default for all targets +CFLAGS_append += "-ffunction-sections -fdata-sections" +LDFLAGS_append += "-Wl,--gc-sections" + +# gc-sections requires either an entry or an undefined symbol +CFLAGS_remove_pn-glibc += "-ffunction-sections -fdata-sections" +LDFLAGS_remove_pn-glibc += "-Wl,--gc-sections" + +# perl won't cross compile with sections +CFLAGS_remove_pn-perl += "-ffunction-sections -fdata-sections" +LDFLAGS_remove_pn-perl += "-Wl,--gc-sections" + +# libdevmapper won't compile with sections +# CFLAGS_remove_pn-libdevmapper += "-ffunction-sections -fdata-sections" +# LDFLAGS_remove_pn-libdevmapper += "-Wl,--gc-sections" + +# Unknown float word ordering. You need to manually preset +CFLAGS_remove_pn-cairo += "-ffunction-sections -fdata-sections" +LDFLAGS_remove_pn-cairo += "-Wl,--gc-sections" + +
Signature · 1 line
2.17.1
Quoted 13 lines · Sinan Kaya
Use GCC sections flags so that unused sections can be garbage collected at link time.
Signed-off-by Sinan Kaya <[email protected]>--- meta-poky/conf/distro/poky-tiny.conf | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+)meta-poky/conf/distro/poky-tiny.conf +0
-0
meta-poky/conf/distro/poky-tiny.conf PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny" · line 128
Quoted 7 lines
meta-poky/conf/distro/poky-tiny.conf +4
-0@@ -122,3 +122,25 @@ PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny" # Disable python usage in opkg-utils since it won't build with tiny config PACKAGECONFIG_remove_pn-opkg-utils = "python" + +# set default for all targets +CFLAGS_append += "-ffunction-sections -fdata-sections" +LDFLAGS_append += "-Wl,--gc-sections"
lets not use += here with _append, and add a leading whitespace after first quote
meta-poky/conf/distro/poky-tiny.conf PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny" · line 132
Quoted 4 lines
meta-poky/conf/distro/poky-tiny.conf +4
-0+ +# gc-sections requires either an entry or an undefined symbol +CFLAGS_remove_pn-glibc += "-ffunction-sections -fdata-sections" +LDFLAGS_remove_pn-glibc += "-Wl,--gc-sections"
remove += here just = is enough with _remove
meta-poky/conf/distro/poky-tiny.conf PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny" · line 137
Quoted 5 lines
meta-poky/conf/distro/poky-tiny.conf +5
-0+ +# perl won't cross compile with sections +CFLAGS_remove_pn-perl += "-ffunction-sections -fdata-sections" +LDFLAGS_remove_pn-perl += "-Wl,--gc-sections" +
same above
meta-poky/conf/distro/poky-tiny.conf PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny" · line 140
Quoted 3 lines
meta-poky/conf/distro/poky-tiny.conf +3
-0+# libdevmapper won't compile with sections +# CFLAGS_remove_pn-libdevmapper += "-ffunction-sections -fdata-sections" +# LDFLAGS_remove_pn-libdevmapper += "-Wl,--gc-sections"
same here
meta-poky/conf/distro/poky-tiny.conf PNBLACKLIST[core-image-weston] = "not buildable with poky-tiny" · line 144
Quoted 4 lines
meta-poky/conf/distro/poky-tiny.conf +4
-0+ +# Unknown float word ordering. You need to manually preset +CFLAGS_remove_pn-cairo += "-ffunction-sections -fdata-sections" +LDFLAGS_remove_pn-cairo += "-Wl,--gc-sections"
same here
Quoted 7 lines
meta-poky/conf/distro/poky-tiny.conf +2
-0+ +