From fceb1afd5dda45cf180f22877a6ab0e51d1b3dac Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sat, 18 Feb 2017 22:40:02 +0100 Subject: [PATCH] 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 [Peter: rename to LIBNSS_DROP_GC_SECTIONS for clarity] Signed-off-by: Waldemar Brodkorb Signed-off-by: Peter Korsgaard --- package/libnss/libnss.mk | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/package/libnss/libnss.mk b/package/libnss/libnss.mk index 4a40b0a8d7..76532e8117 100644 --- a/package/libnss/libnss.mk +++ b/package/libnss/libnss.mk @@ -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_DROP_GC_SECTIONS + sed -i 's:-Wl,--gc-sections::g' $(@D)/nss/coreconf/Linux.mk +endef + +LIBNSS_PRE_CONFIGURE_HOOKS += LIBNSS_DROP_GC_SECTIONS +endif + LIBNSS_BUILD_VARS = \ MOZILLA_CLIENT=1 \ NSPR_INCLUDE_DIR=$(STAGING_DIR)/usr/include/nspr \ -- 2.30.2