summaryrefslogtreecommitdiff
path: root/coreconf/Linux.mk
diff options
context:
space:
mode:
Diffstat (limited to 'coreconf/Linux.mk')
-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.