Disable DT_TEXTREL warnings on Linux i386
authorStephane Glondu <steph@glondu.net>
Wed, 29 Jul 2020 14:22:39 +0000 (16:22 +0200)
committerStéphane Glondu <glondu@debian.org>
Thu, 25 Nov 2021 14:45:31 +0000 (15:45 +0100)
Bug: https://github.com/ocaml/ocaml/issues/9800

Gbp-Pq: Name 0006-Disable-DT_TEXTREL-warnings-on-Linux-i386.patch

configure.ac

index 069fe960777fdcc479c37b15ce3391ec18c6c11c..ab1e1888b323d7f691dfcde72725e6650d3fd40e 100644 (file)
@@ -1018,6 +1018,16 @@ AS_CASE([$arch],
        [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 "$host_alias"], [toolpref="${host_alias}-"], [toolpref=""])