blob: 091f11f8ee79dea4983e5807d9bcd6b8aca604f0 [file] [log] [blame]
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 --git a/coreconf/Linux.mk b/coreconf/Linux.mk
index d5dfb6fbc..c7bb74eca 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,7 +158,7 @@ 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))
+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
--
2.35.1.616.g0bdcbb4464-goog