This allows packagers to set additional linker flags for executables and shared
libraries created by OCaml, and for the OCaml tools themselves.
OCaml code can be linked with various C stubs and C libraries that would
benefit from using hardening link flags, such as -Wl,-z,relro.
Origin: other
Bug-Debian: https://bugs.debian.org/702349
Forwarded: no
Last-Update: <2019-07-22>
Gbp-Pq: Name 0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch
natdynlinkopts="-Wl,-E"
shared_libraries_supported=true])])
+mksharedlib="$mksharedlib $CCLINKFLAGS"
+mkexe="$mkexe $CCLINKFLAGS"
+
AS_IF([test -z "$mkmaindll"], [mkmaindll=$mksharedlib])
# Configure native dynlink
objinfo_helper$(EXE): objinfo_helper.c $(ROOTDIR)/runtime/caml/s.h
$(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime $(OUTPUTEXE)$@ \
- $(DEF_SYMBOL_PREFIX) $(LIBBFD_INCLUDE) $< $(LIBBFD_LINK)
+ $(DEF_SYMBOL_PREFIX) $(LIBBFD_INCLUDE) $< $(LIBBFD_LINK) $(CCLINKFLAGS)
OBJINFO=$(ROOTDIR)/compilerlibs/ocamlcommon.cma \
$(ROOTDIR)/compilerlibs/ocamlbytecomp.cma \