* [Buildroot] [PATCH 1/1] Makefile: delete debug libs when debug is not enabled
@ 2020-07-14 2:25 Danomi Manchego
2020-07-14 8:13 ` Thomas Petazzoni
2020-07-21 20:50 ` Peter Korsgaard
0 siblings, 2 replies; 3+ messages in thread
From: Danomi Manchego @ 2020-07-14 2:25 UTC (permalink / raw)
To: buildroot
Some toolchains, like the Linaro gcc7 toolchains, now install libstdc++ debug
library symbols to /lib/debug, which can be as large as the library itself.
This commit removes the extra debug content if debugging is not enabled.
Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
---
Makefile | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Makefile b/Makefile
index 04c29b1..3a81385 100644
--- a/Makefile
+++ b/Makefile
@@ -765,6 +765,9 @@ endif
rm -rf $(TARGET_DIR)/usr/doc $(TARGET_DIR)/usr/share/doc
rm -rf $(TARGET_DIR)/usr/share/gtk-doc
rmdir $(TARGET_DIR)/usr/share 2>/dev/null || true
+ifneq ($(BR2_ENABLE_DEBUG),y)
+ rm -rf $(TARGET_DIR)/lib/debug $(TARGET_DIR)/usr/lib/debug
+endif
$(STRIP_FIND_CMD) | xargs -0 $(STRIPCMD) 2>/dev/null || true
$(STRIP_FIND_SPECIAL_LIBS_CMD) | xargs -0 -r $(STRIPCMD) $(STRIP_STRIP_DEBUG) 2>/dev/null || true
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] Makefile: delete debug libs when debug is not enabled
2020-07-14 2:25 [Buildroot] [PATCH 1/1] Makefile: delete debug libs when debug is not enabled Danomi Manchego
@ 2020-07-14 8:13 ` Thomas Petazzoni
2020-07-21 20:50 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Petazzoni @ 2020-07-14 8:13 UTC (permalink / raw)
To: buildroot
On Mon, 13 Jul 2020 22:25:54 -0400
Danomi Manchego <danomimanchego123@gmail.com> wrote:
> +ifneq ($(BR2_ENABLE_DEBUG),y)
> + rm -rf $(TARGET_DIR)/lib/debug $(TARGET_DIR)/usr/lib/debug
> +endif
The thing is that BR2_ENABLE_DEBUG=y doesn't mean you want debugging
symbols on the target, it means you want debugging symbols in staging.
So, I adjusted this to:
+ifneq ($(BR2_ENABLE_DEBUG):$(BR2_STRIP_strip),y:)
+ rm -rf $(TARGET_DIR)/lib/debug $(TARGET_DIR)/usr/lib/debug
+endif
As BR2_ENABLE_DEBUG=y + BR2_STRIP_strip disabled is the best indication
we have (I believe) to say "I want debugging symbols on the target".
Applied with that change. Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH 1/1] Makefile: delete debug libs when debug is not enabled
2020-07-14 2:25 [Buildroot] [PATCH 1/1] Makefile: delete debug libs when debug is not enabled Danomi Manchego
2020-07-14 8:13 ` Thomas Petazzoni
@ 2020-07-21 20:50 ` Peter Korsgaard
1 sibling, 0 replies; 3+ messages in thread
From: Peter Korsgaard @ 2020-07-21 20:50 UTC (permalink / raw)
To: buildroot
>>>>> "Danomi" == Danomi Manchego <danomimanchego123@gmail.com> writes:
> Some toolchains, like the Linaro gcc7 toolchains, now install libstdc++ debug
> library symbols to /lib/debug, which can be as large as the library itself.
> This commit removes the extra debug content if debugging is not enabled.
> Signed-off-by: Danomi Manchego <danomimanchego123@gmail.com>
Committed to 2020.02.x and 2020.05.x, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-21 20:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-14 2:25 [Buildroot] [PATCH 1/1] Makefile: delete debug libs when debug is not enabled Danomi Manchego
2020-07-14 8:13 ` Thomas Petazzoni
2020-07-21 20:50 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox