Skip to contentSkip to conversation

uclibc: build uclibc unstripped by default

PATCH New Alexey Brodkin 3 participants 3 messages Oct 12, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uclibc: build uclibc unstripped by default

uClibc could be build stripped (implemented as link-time option in uClibc). This could be useful for those who build root fs manually.

In Buildroot there's it's own strip stage wich strips most of shared libs in "target" folder (well except kernel modules known to not work properly being stripped and libpthread required to be non-stripped for correct debugging with gdb of multi-threaded apps).

So there're few problems with current implementation:
1. uClibc is being stripped 2 times (first on its build stage, second on global Buildroot strip stage)
2. uClibc libs in "staging" folder are also always stripped except if "no strip" (BR2_STRIP_none) is explicitly is selected in Buildroot config. That makes it possible to remote debug uClibc libs on target only if target rootfs was not stripped (which might not be possible due to huge libs like Qt)

This patch disables embedded strip in uClibc (still users may modify uClibc config and explicitly set "DOSTRIP=yes" if really needed).

Interesting that DOSTRIP was not only selected in uClibc config but also was force set with Buildroot on uClibc configuration step with UCLIBC_STRIP_CONFIG.

Cc Vicente Olivert Riera <[email protected]>
Cc Peter Korsgaard <[email protected]>
Cc Gustavo Zacarias <[email protected]>
Cc Thomas De Schampheleire <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Waldemar Brodkorb <[email protected]>
---
 package/uclibc/uClibc-0.9.31.config   |  2 +-
 package/uclibc/uClibc-0.9.33.config   |  2 +-
 package/uclibc/uClibc-snapshot.config |  2 +-
 package/uclibc/uclibc.mk              | 11 -----------
 4 files changed, 3 insertions(+), 14 deletions(-)
package/uclibc/uClibc-0.9.31.config +1 -1
index e990178..b23ba73 100644
@@ -228,7 +228,7 @@ CROSS_COMPILER_PREFIX=""
 UCLIBC_EXTRA_CFLAGS=""
 # DODEBUG is not set
 # DODEBUG_PT is not set
-DOSTRIP=y
+# DOSTRIP is not set
 # DOASSERTS is not set
 # SUPPORT_LD_DEBUG is not set
 # SUPPORT_LD_DEBUG_EARLY is not set
package/uclibc/uClibc-0.9.33.config +1 -1
index eb39df6..0fbce19 100644
@@ -266,7 +266,7 @@ CROSS_COMPILER_PREFIX=""
 UCLIBC_EXTRA_CFLAGS=""
 # DODEBUG is not set
 # DODEBUG_PT is not set
-DOSTRIP=y
+# DOSTRIP is not set
 # DOASSERTS is not set
 # SUPPORT_LD_DEBUG is not set
 # SUPPORT_LD_DEBUG_EARLY is not set
package/uclibc/uClibc-snapshot.config +1 -1
index 4856287..11dde03 100644
@@ -271,7 +271,7 @@ CROSS_COMPILER_PREFIX=""
 UCLIBC_EXTRA_CFLAGS=""
 # DODEBUG is not set
 # DODEBUG_PT is not set
-DOSTRIP=y
+# DOSTRIP is not set
 # DOASSERTS is not set
 # SUPPORT_LD_DEBUG is not set
 # SUPPORT_LD_DEBUG_EARLY is not set
package/uclibc/uclibc.mk +0 -11
index ffd1d89..4e09b31 100644
@@ -395,16 +395,6 @@ UCLIBC_WCHAR_CONFIG = $(call KCONFIG_DISABLE_OPT,UCLIBC_HAS_WCHAR,$(@D)/.config)
 endif
 
 #
-# strip
-#
-
-ifeq ($(BR2_STRIP_none),y)
-UCLIBC_STRIP_CONFIG = $(call KCONFIG_DISABLE_OPT,DOSTRIP,$(@D)/.config)
-else
-UCLIBC_STRIP_CONFIG = $(call KCONFIG_ENABLE_OPT,DOSTRIP,$(@D)/.config)
-endif
-
-#
 # Commands
 #
 
@@ -444,7 +434,6 @@ define UCLIBC_KCONFIG_FIXUP_CMDS
 	$(UCLIBC_THREAD_DEBUG_CONFIG)
 	$(UCLIBC_LOCALE_CONFIG)
 	$(UCLIBC_WCHAR_CONFIG)
-	$(UCLIBC_STRIP_CONFIG)
 endef
 
 ifeq ($(BR2_UCLIBC_INSTALL_TEST_SUITE),y)
Signature · 1 line
1.9.3
#1 lore raw

PATCH 1/1 uclibc: build uclibc unstripped by default

Dear Alexey Brodkin,

Quoted 17 lines · Alexey Brodkin

uClibc could be build stripped (implemented as link-time option in uClibc). This could be useful for those who build root fs manually.

In Buildroot there's it's own strip stage wich strips most of shared libs in "target" folder (well except kernel modules known to not work properly being stripped and libpthread required to be non-stripped for correct debugging with gdb of multi-threaded apps).

So there're few problems with current implementation:
1. uClibc is being stripped 2 times (first on its build stage, second on global Buildroot strip stage)
2. uClibc libs in "staging" folder are also always stripped except if "no strip" (BR2_STRIP_none) is explicitly is selected in Buildroot config. That makes it possible to remote debug uClibc libs on target only if target rootfs was not stripped (which might not be possible due to huge libs like Qt)

Quoted 7 lines

This patch disables embedded strip in uClibc (still users may modify uClibc config and explicitly set "DOSTRIP=yes" if really needed).

Interesting that DOSTRIP was not only selected in uClibc config but also was force set with Buildroot on uClibc configuration step with UCLIBC_STRIP_CONFIG.

Thanks, it's good to see this fixed.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 uclibc: build uclibc unstripped by default

In reply to Alexey Brodkin
Quoted 25 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Alexey" == Alexey Brodkin <[email protected]> writes:

uClibc could be build stripped (implemented as link-time option in uClibc). This could be useful for those who build root fs manually.

In Buildroot there's it's own strip stage wich strips most of shared libs in "target" folder (well except kernel modules known to not work properly being stripped and libpthread required to be non-stripped for correct debugging with gdb of multi-threaded apps).

So there're few problems with current implementation:
1. uClibc is being stripped 2 times (first on its build stage, second on global Buildroot strip stage)
2. uClibc libs in "staging" folder are also always stripped except if "no strip" (BR2_STRIP_none) is explicitly is selected in Buildroot config. That makes it possible to remote debug uClibc libs on target only if target rootfs was not stripped (which might not be possible due to huge libs like Qt)

This patch disables embedded strip in uClibc (still users may modify uClibc config and explicitly set "DOSTRIP=yes" if really needed).

Interesting that DOSTRIP was not only selected in uClibc config but also was force set with Buildroot on uClibc configuration step with UCLIBC_STRIP_CONFIG.

Quoted 8 lines
Cc Vicente Olivert Riera <[email protected]>
Cc Peter Korsgaard <[email protected]>
Cc Gustavo Zacarias <[email protected]>
Cc Thomas De Schampheleire <[email protected]>
Cc Thomas Petazzoni <[email protected]>
Cc Waldemar Brodkorb <[email protected]>

Committed, thanks.

Signature · 2 lines
Venlig hilsen,
Peter Korsgaard