File: 0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch

package info (click to toggle)
ocaml 5.3.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 43,124 kB
  • sloc: ml: 355,439; ansic: 51,636; sh: 25,098; asm: 5,413; makefile: 3,673; python: 919; javascript: 273; awk: 253; perl: 59; fortran: 21; cs: 9
file content (30 lines) | stat: -rw-r--r-- 842 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
From: Stephane Glondu <steph@glondu.net>
Date: Wed, 29 Jul 2020 16:22:39 +0200
Subject: Disable DT_TEXTREL warnings on Linux i386

Bug: https://github.com/ocaml/ocaml/issues/9800
---
 configure.ac | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/configure.ac b/configure.ac
index 4d94dc6..af1ea7b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1608,6 +1608,16 @@ AS_CASE([$arch],
       # Alpine and other musl-based Linux distributions
       [common_cflags="-no-pie $common_cflags"])])
 
+# Disable DT_TEXTREL warnings on Linux i386
+# See https://github.com/ocaml/ocaml/issues/9800
+
+AS_CASE([$host],
+  [i?86-*-linux-*],
+    [common_cflags="-Wl,-z,notext $common_cflags"
+    mksharedlib="$mksharedlib -Wl,-z,notext"
+    mkmaindll="$mkmaindll -Wl,-z,notext"],
+  [])
+
 # Assembler
 
 AS_IF([test -n "$target_alias"],