diff mbox series

gcc: remove .gnu_debuglink from SDK toolchain binaries

Message ID 20250825165026.681972-1-Deepesh.Varatharajan@windriver.com
State New
Headers show
Series gcc: remove .gnu_debuglink from SDK toolchain binaries | expand

Commit Message

Varatharajan, Deepesh Aug. 25, 2025, 4:50 p.m. UTC
From: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>

SDK toolchain binaries (nativesdk and cross-canadian gcc) currently
contain a .gnu_debuglink section pointing to separate debug symbols.
These symbols are not required in SDK builds, as SDK users do not
need production debug information on the target, only the compiler
and headers for development.

Including .gnu_debuglink increases disk usage for distributed SDKs
without providing any benefit for SDK consumers and so removed.

Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
---
 meta/recipes-devtools/gcc/gcc-common.inc | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index 8d95698743..3793aff0a1 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -144,3 +144,8 @@  remove_sysroot_paths_from_checksum_options () {
 cleanup_installed_include_fixed () {
 	find ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/include-fixed -type f -not -name "README" -not -name limits.h -not -name syslimits.h | xargs rm -f
 }
+
+# Disable splitting debug symbols into separate -dbg packages for SDK-related gcc builds
+# (covers both nativesdk gcc and cross-canadian gcc)
+INHIBIT_PACKAGE_DEBUG_SPLIT:class-nativesdk = "1"
+INHIBIT_PACKAGE_DEBUG_SPLIT:class-cross-canadian = "1"