Blame SOURCES/nss-util-dso-ldflags.patch
|
|
8bd67f |
diff --git a/coreconf/Linux.mk b/coreconf/Linux.mk
|
|
|
8bd67f |
--- a/coreconf/Linux.mk
|
|
|
8bd67f |
+++ b/coreconf/Linux.mk
|
|
|
8bd67f |
@@ -135,17 +135,17 @@ ifeq ($(KERNEL),Linux)
|
|
|
8bd67f |
endif
|
|
|
8bd67f |
OS_LIBS = $(OS_PTHREAD) -ldl -lc
|
|
|
8bd67f |
|
|
|
8bd67f |
ifdef USE_PTHREADS
|
|
|
8bd67f |
DEFINES += -D_REENTRANT
|
|
|
8bd67f |
endif
|
|
|
8bd67f |
|
|
|
8bd67f |
DSO_CFLAGS = -fPIC
|
|
|
8bd67f |
-DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections
|
|
|
8bd67f |
+DSO_LDOPTS = -shared $(ARCHFLAG) -Wl,--gc-sections $(DSO_LDFLAGS)
|
|
|
8bd67f |
# The linker on Red Hat Linux 7.2 and RHEL 2.1 (GNU ld version 2.11.90.0.8)
|
|
|
8bd67f |
# incorrectly reports undefined references in the libraries we link with, so
|
|
|
8bd67f |
# we don't use -z defs there.
|
|
|
8bd67f |
# Also, -z defs conflicts with Address Sanitizer, which emits relocations
|
|
|
8bd67f |
# against the libsanitizer runtime built into the main executable.
|
|
|
8bd67f |
ZDEFS_FLAG = -Wl,-z,defs
|
|
|
8bd67f |
DSO_LDOPTS += $(if $(findstring 2.11.90.0.8,$(shell ld -v)),,$(ZDEFS_FLAG))
|
|
|
8bd67f |
LDFLAGS += $(ARCHFLAG) -z noexecstack
|