[Buildroot] [PATCH 1/1] Makefile: delete debug libs when debug is not enabled

Thomas Petazzoni thomas.petazzoni at bootlin.com
Tue Jul 14 08:13:40 UTC 2020


On Mon, 13 Jul 2020 22:25:54 -0400
Danomi Manchego <danomimanchego123 at 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


More information about the buildroot mailing list