summaryrefslogtreecommitdiff
path: root/coreconf
diff options
context:
space:
mode:
authorZi Lin <lziest@chromium.org>2022-03-22 13:35:09 +0000
committerZi Lin <lziest@chromium.org>2022-03-22 13:35:09 +0000
commit7b3e935df8f1fe1a4966f5abd06c0cfb76f540d7 (patch)
tree6f782d460a33afd88aba5105da51703d969815ef /coreconf
parentde2a802dce37db11c7e0b26acb5f2491370e0fe8 (diff)
downloadnss-hg-7b3e935df8f1fe1a4966f5abd06c0cfb76f540d7.tar.gz
Bug 1758741 - Allow ld path to be set as environment variable. r=mt
Submitted on behalf of Zi Lin, the author of the patch. Differential Revision: https://phabricator.services.mozilla.com/D141119
Diffstat (limited to 'coreconf')
-rw-r--r--coreconf/Linux.mk5
1 files changed, 3 insertions, 2 deletions
diff --git a/coreconf/Linux.mk b/coreconf/Linux.mk
index d5dfb6fbc..dcb432415 100644
--- a/coreconf/Linux.mk
+++ b/coreconf/Linux.mk
@@ -6,6 +6,7 @@
CC ?= gcc
CCC ?= g++
RANLIB ?= ranlib
+LD ?= ld
include $(CORE_DEPTH)/coreconf/UNIX.mk
@@ -157,8 +158,8 @@ DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections
# 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))
-LDFLAGS += $(ARCHFLAG) -z noexecstack
+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
# library directories.