File: 0004-Use-CCLINKFLAGS-for-linking-all-executables-and-shar.patch

package info (click to toggle)
ocaml 5.3.0-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 43,068 kB
  • sloc: ml: 355,432; ansic: 51,636; sh: 25,098; asm: 5,413; makefile: 3,669; python: 919; javascript: 273; awk: 253; perl: 59; fortran: 21; cs: 9
file content (32 lines) | stat: -rw-r--r-- 1,014 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
From: Torok Edwin <edwin@etorok.net>
Date: Wed, 15 Jul 2015 16:33:23 +0300
Subject: 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: <2021-12-21>
---
 configure.ac | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/configure.ac b/configure.ac
index 64e6d7e..4d94dc6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1353,6 +1353,10 @@ AS_CASE([$host],
     [oc_ldflags="$oc_ldflags -Wl,-z,nobtcfi"
      natdynlinkopts="$natdynlinkopts -Wl,-z,nobtcfi"])
 
+# Use CCLINKFLAGS for linking all executables and shared libraries
+
+mksharedlib="$mksharedlib $CCLINKFLAGS"
+mkexe="$mkexe $CCLINKFLAGS"
 
 # Configure native dynlink