All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] poky-tiny: enable section removal
@ 2020-11-09 22:38 Sinan Kaya
  2020-11-10 10:11 ` [poky] " Paul Barker
  2020-11-10 21:35 ` Richard Purdie
  0 siblings, 2 replies; 5+ messages in thread
From: Sinan Kaya @ 2020-11-09 22:38 UTC (permalink / raw)
  To: poky; +Cc: Sinan Kaya

Use GCC sections flags so that unused sections can be garbage
collected at link time.

Signed-off-by: Sinan Kaya <okaya@kernel.org>
---
 meta-poky/conf/distro/poky-tiny.conf | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/meta-poky/conf/distro/poky-tiny.conf b/meta-poky/conf/distro/poky-tiny.conf
index c6d4b88f83d..1e37394875d 100644
--- a/meta-poky/conf/distro/poky-tiny.conf
+++ b/meta-poky/conf/distro/poky-tiny.conf
@@ -122,3 +122,21 @@ 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"
+
+# Unknown float word ordering. You need to manually preset
+CFLAGS_remove_pn-cairo = "-ffunction-sections -fdata-sections"
+LDFLAGS_remove_pn-cairo = "-Wl,--gc-sections"
+
+
-- 
2.17.1


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

end of thread, other threads:[~2020-11-10 22:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-09 22:38 [PATCH v3] poky-tiny: enable section removal Sinan Kaya
2020-11-10 10:11 ` [poky] " Paul Barker
2020-11-10 17:55   ` Sinan Kaya
2020-11-10 21:35 ` Richard Purdie
2020-11-10 22:51   ` Sinan Kaya

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.