summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/nss/files/nss-3.68-ld-fix.patch')
-rw-r--r--dev-libs/nss/files/nss-3.68-ld-fix.patch29
1 files changed, 29 insertions, 0 deletions
diff --git a/dev-libs/nss/files/nss-3.68-ld-fix.patch b/dev-libs/nss/files/nss-3.68-ld-fix.patch
new file mode 100644
index 000000000000..ecdbdeebd4cf
--- /dev/null
+++ b/dev-libs/nss/files/nss-3.68-ld-fix.patch
@@ -0,0 +1,29 @@
+From 3cba2869869c8480605f7ffcc41d2e4bae1b31c8 Mon Sep 17 00:00:00 2001
+From: Zi Lin <lziest@google.com>
+Date: Wed, 9 Mar 2022 19:14:16 +0000
+Subject: [PATCH] Use $(LD) instead of 'ld' for cross-platform compilation
+
+---
+ coreconf/Linux.mk | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+diff -Naur a/coreconf/Linux.mk b/coreconf/Linux.mk
+--- a/coreconf/Linux.mk 2022-03-03 12:18:53.000000000 +0200
++++ b/coreconf/Linux.mk 2022-03-29 08:59:10.157349449 +0300
+@@ -6,6 +6,7 @@
+ CC ?= gcc
+ CCC ?= g++
+ RANLIB ?= ranlib
++LD ?= ld
+
+ include $(CORE_DEPTH)/coreconf/UNIX.mk
+
+@@ -157,7 +158,7 @@
+ # Also, -z defs conflicts with Address Sanitizer, which emits relocations
+ # against the libsanitizer runtime built into the main executable.
+ ZDEFS_FLAG = -Wl,-z,defs
+-DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
++DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell $(LD) -v)),,$(ZDEFS_FLAG))
+ LDFLAGS += $(ARCHFLAG) -z noexecstack
+
+ # On Maemo, we need to use the -rpath-link flag for even the standard system