Skip to contentSkip to conversation

toolchain/uClibc: properly honor DEBUG and STRIP options

PATCH New Gustavo Zacarias 2 participants 2 messages Jun 21, 2013 – Jun 27, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 toolchain/uClibc: properly honor DEBUG and STRIP options

The default uClibc configurations strip the resulting binaries/libraries and don't add debug symbols which is a problem when wanting to debug issues.
Bind the buildroot BR2_STRIP_* option to uClibc .config DO_STRIP and BR2_ENABLE_DEBUG to uClibc DO_DEBUG.

---
 toolchain/uClibc/uclibc.mk | 12 ++++++++++++
 1 file changed, 12 insertions(+)
toolchain/uClibc/uclibc.mk +12 -0
index da1830f..2036dab 100644
@@ -287,6 +287,18 @@ endif
 	$(SED) '/LINUXTHREADS_OLD/d' $(UCLIBC_DIR)/.oldconfig
 	$(SED) '/PTHREADS_DEBUG_SUPPORT/d' $(UCLIBC_DIR)/.oldconfig
 	$(SED) '/UCLIBC_HAS_THREADS_NATIVE/d' $(UCLIBC_DIR)/.oldconfig
+	$(SED) '/DODEBUG /d' $(UCLIBC_DIR)/.oldconfig
+	$(SED) '/DOSTRIP/d' $(UCLIBC_DIR)/.oldconfig
+ifeq ($(BR2_STRIP_none),y)
+	echo "# DOSTRIP is not set" >> $(UCLIBC_DIR)/.oldconfig
+else
+	echo "DOSTRIP=y" >> $(UCLIBC_DIR)/.oldconfig
+endif
+ifeq ($(BR2_ENABLE_DEBUG),y)
+	echo "DODEBUG=y" >> $(UCLIBC_DIR)/.oldconfig
+else
+	echo "# DODEBUG is not set" >> $(UCLIBC_DIR)/.oldconfig
+endif
 ifeq ($(BR2_PTHREADS_NONE),y)
 	echo "# UCLIBC_HAS_THREADS is not set" >> $(UCLIBC_DIR)/.oldconfig
 else
Signature · 1 line
1.8.1.5
#1 lore raw

PATCH 1/1 toolchain/uClibc: properly honor DEBUG and STRIP options

Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Gustavo" == Gustavo Zacarias <[email protected]> writes:

Gustavo> The default uClibc configurations strip the resulting Gustavo> binaries/libraries and don't add debug symbols which is a Gustavo> problem when wanting to debug issues. Bind the buildroot Gustavo> BR2_STRIP_* option to uClibc .config DO_STRIP and Gustavo> BR2_ENABLE_DEBUG to uClibc DO_DEBUG.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard