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>
Mon, 27 Jan 2025 12:17:46 +0000 (13:17 +0100)
Bug: https://github.com/ocaml/ocaml/issues/9800

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

configure.ac

index 4d94dc6c128350b12c080611640c1644f7fd3ca4..af1ea7b31ee69f270d0ac2e4aa2e73486bb0593c 100644 (file)
@@ -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"],