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>
Sat, 19 Aug 2023 03:15:41 +0000 (05:15 +0200)
Bug: https://github.com/ocaml/ocaml/issues/9800

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

configure.ac

index ac8a080af96171630cd9ff1210e3b6eefd576864..9ac019f756cd036e448d5e1b5c535f1bb87ab2e4 100644 (file)
@@ -1183,6 +1183,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 "$target_alias"],