From: Torok Edwin Date: Wed, 15 Jul 2015 13:33:23 +0000 (+0300) Subject: Use CCLINKFLAGS for linking all executables and shared libraries X-Git-Tag: archive/raspbian/4.02.3-10+rpi1~5 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=a000b03c95e4204e303c64d24fa93002074cf5a7;p=ocaml.git Use CCLINKFLAGS for linking all executables and shared libraries 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: <2015-07-15> Gbp-Pq: Name 0013-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch --- diff --git a/configure b/configure index c37a2e52..b58a86dc 100755 --- a/configure +++ b/configure @@ -768,6 +768,8 @@ if test $with_sharedlibs = "yes"; then shared_libraries_supported=true;; esac fi +mksharedlib="$mksharedlib $CCLINKFLAGS" +mkexe="$mkexe $CCLINKFLAGS" if test -z "$mkmaindll"; then mkmaindll=$mksharedlib diff --git a/tools/Makefile.shared b/tools/Makefile.shared index 0b90cd32..2d5546e2 100644 --- a/tools/Makefile.shared +++ b/tools/Makefile.shared @@ -287,7 +287,7 @@ endif objinfo_helper$(EXE): objinfo_helper.c ../config/s.h $(BYTECC) $(CCOUT)objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \ - objinfo_helper.c $(LIBBFD_LINK) + objinfo_helper.c $(LIBBFD_LINK) $(CCLINKFLAGS) OBJINFO=../compilerlibs/ocamlcommon.cma \ ../compilerlibs/ocamlbytecomp.cma \