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>
Wed, 20 Sep 2023 07:59:40 +0000 (09:59 +0200)
Bug: https://github.com/ocaml/ocaml/issues/9800

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

configure.ac

index d27d47bce265e38d1c33f30fd9f1637a8e56ce65..48b438a357ed30caead7baa1a2ebec7f4b32cd57 100644 (file)
@@ -1199,6 +1199,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"],