* [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* Re: [OE-core][PATCH] gcsections: apply section removal also in C++, not only in C
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
0 siblings, 0 replies; 2+ messages in thread
From: Alexandre Belloni @ 2023-06-29 13:32 UTC (permalink / raw)
To: peter.marko; +Cc: openembedded-core
Hello Peter,
I have collected it but this patch should have gone to the poky mailing
list as this is for meta-yocto.
On 29/06/2023 14:28:08+0200, Peter Marko via lists.openembedded.org wrote:
> 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
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#183621): https://lists.openembedded.org/g/openembedded-core/message/183621
> Mute This Topic: https://lists.openembedded.org/mt/99849581/3617179
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alexandre.belloni@bootlin.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [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