From 7b3e935df8f1fe1a4966f5abd06c0cfb76f540d7 Mon Sep 17 00:00:00 2001 From: Zi Lin Date: Tue, 22 Mar 2022 13:35:09 +0000 Subject: 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 --- coreconf/Linux.mk | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'coreconf') 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. -- cgit v1.2.1