Skip to content

Commit

Permalink
Bug 1758741 - Allow ld path to be set as environment variable. r=mt
Browse files Browse the repository at this point in the history
Submitted on behalf of Zi Lin, the author of the patch.

Differential Revision: https://phabricator.services.mozilla.com/D141119
  • Loading branch information
Zi Lin committed Mar 22, 2022
1 parent 0c248ad commit 6c8c452
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions coreconf/Linux.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
CC ?= gcc
CCC ?= g++
RANLIB ?= ranlib
LD ?= ld

include $(CORE_DEPTH)/coreconf/UNIX.mk

Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 6c8c452

Please sign in to comment.