Skip to contentSkip to conversation

libnss: workaround for microblaze ld bug

PATCH New Waldemar Brodkorb 2 participants 2 messages Feb 18, 2017 – Feb 19, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libnss: workaround for microblaze ld bug

Add a workaround for a microblaze specific ld bug to avoid segfault.

Fixes:
http://autobuild.buildroot.net/results/638a65453879777a0d5bdb29231034cd261b41c0

---
 package/libnss/libnss.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/libnss/libnss.mk +10 -0
index 4a40b0a..5683ffc 100644
@@ -13,6 +13,16 @@ LIBNSS_DEPENDENCIES = libnspr sqlite zlib
 LIBNSS_LICENSE = MPLv2.0
 LIBNSS_LICENSE_FILES = nss/COPYING
 
+# --gc-sections triggers binutils ld segfault
+# https://sourceware.org/bugzilla/show_bug.cgi?id=21180
+ifeq ($(BR2_microblaze),y)
+define LIBNSS_PRECONFIGURE
+	sed -i 's:-Wl,--gc-sections::g' $(@D)/nss/coreconf/Linux.mk
+endef
+
+LIBNSS_PRE_CONFIGURE_HOOKS += LIBNSS_PRECONFIGURE
+endif
+
 LIBNSS_BUILD_VARS = \
 	MOZILLA_CLIENT=1 \
 	NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \
Signature · 1 line
2.1.4
#1 lore raw

PATCH 1/1 libnss: workaround for microblaze ld bug

Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Waldemar" == Waldemar Brodkorb <[email protected]> writes:

Add a workaround for a microblaze specific ld bug to avoid segfault.

Fixes:
http://autobuild.buildroot.net/results/638a65453879777a0d5bdb29231034cd261b41c0

---
 package/libnss/libnss.mk | 10 ++++++++++
 1 file changed, 10 insertions(+)
package/libnss/libnss.mk +0 -0
index 4a40b0a..5683ffc 100644
@@ -13,6 +13,16 @@ LIBNSS_DEPENDENCIES = libnspr sqlite zlib
 LIBNSS_LICENSE = MPLv2.0

package/libnss/libnss.mk LIBNSS_DEPENDENCIES = libnspr sqlite zlib · line 23

Quoted 10 lines
package/libnss/libnss.mk +8 -0
 LIBNSS_LICENSE_FILES = nss/COPYING
 
+# --gc-sections triggers binutils ld segfault
+# https://sourceware.org/bugzilla/show_bug.cgi?id=21180
+ifeq ($(BR2_microblaze),y)
+define LIBNSS_PRECONFIGURE
+	sed -i 's:-Wl,--gc-sections::g' $(@D)/nss/coreconf/Linux.mk
+endef
+
+LIBNSS_PRE_CONFIGURE_HOOKS += LIBNSS_PRECONFIGURE

Renamed to LIBNSS_DROP_GC_SECTIONS and committed, thanks!

Signature · 1 line
Bye, Peter Korsgaard