Openembedded Core Discussions
 help / color / mirror / Atom feed
* [OE-core][PATCH] gcsections: apply section removal also in C++, not only in C
@ 2023-06-29 12:28 Peter Marko
  2023-06-29 13:32 ` Alexandre Belloni
  0 siblings, 1 reply; 2+ messages in thread
From: Peter Marko @ 2023-06-29 12:28 UTC (permalink / raw)
  To: openembedded-core; +Cc: Peter Marko

From: Peter Marko <peter.marko@siemens.com>

Currently only CFLAGS contains sections optimizations.
This is used during C compilation.
C++ compilation uses CXXFLAGS instead.

I did not introduce CXXFLAGS_SECTION_REMOVAL because the options
are identical in C and C++, while adding it would add whole lot
of additional useless lines of code to maintain.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
 meta-poky/conf/distro/include/gcsections.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta-poky/conf/distro/include/gcsections.inc b/meta-poky/conf/distro/include/gcsections.inc
index a1f8651ae9..0e7bd2efff 100644
--- a/meta-poky/conf/distro/include/gcsections.inc
+++ b/meta-poky/conf/distro/include/gcsections.inc
@@ -27,8 +27,10 @@ LDFLAGS_SECTION_REMOVAL:pn-nativesdk-mingw-w64-winpthreads = ""
 
 # set default for target
 CFLAGS:append:class-target = " ${CFLAGS_SECTION_REMOVAL}"
+CXXFLAGS:append:class-target = " ${CFLAGS_SECTION_REMOVAL}"
 LDFLAGS:append:class-target = " ${LDFLAGS_SECTION_REMOVAL}"
 
 # set default for nativesdk
 CFLAGS:append:class-nativesdk = " ${CFLAGS_SECTION_REMOVAL}"
+CXXFLAGS:append:class-nativesdk = " ${CFLAGS_SECTION_REMOVAL}"
 LDFLAGS:append:class-nativesdk = " ${LDFLAGS_SECTION_REMOVAL}"
-- 
2.30.2



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

end of thread, other threads:[~2023-06-29 13:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-06-29 12:28 [OE-core][PATCH] gcsections: apply section removal also in C++, not only in C Peter Marko
2023-06-29 13:32 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox