From 191f9f42110cdaa8aacd7bdf12ad3f624334eaff Mon Sep 17 00:00:00 2001
From: Richard Lowe <richlowe@richlowe.net>
Date: Thu, 19 Aug 2021 10:17:15 +0200
Subject: [PATCH] gcc: strip the DWARF (but not symbol tables) from the resulting binaries

---
 make-rules/gcc-component.mk |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/make-rules/gcc-component.mk b/make-rules/gcc-component.mk
index 50c6292..4dcb217 100644
--- a/make-rules/gcc-component.mk
+++ b/make-rules/gcc-component.mk
@@ -101,6 +101,8 @@
 COMMON_ENV=  LD_OPTIONS="-zignore -zcombreloc -i"
 COMMON_ENV+= LD_FOR_TARGET=/usr/bin/ld
 COMMON_ENV+= LD_FOR_HOST=/usr/bin/ld
+COMMON_ENV+= STRIP="/usr/bin/strip -x"
+COMMON_ENV+= STRIP_FOR_TARGET="/usr/bin/strip -x"
 COMMON_ENV+= LD=/usr/bin/ld
 
 CONFIGURE_ENV+= $(COMMON_ENV)
@@ -133,6 +135,9 @@
 # Set path to library install prefix
 CONFIGURE_OPTIONS+= LDFLAGS="-R$(CONFIGURE_PREFIX)/lib"
 
+# Strip the resulting binaries
+COMPONENT_INSTALL_TARGETS = install-strip
+
 COMPONENT_POST_INSTALL_ACTION = \
   $(RM) -r $(PROTO_DIR)$(CONFIGURE_PREFIX)/lib/gcc/$(GNU_TRIPLET)/$(COMPONENT_VERSION)/include-fixed
 

--
Gitblit v1.9.3