]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge of r1896278 from trunk:
authorStefan Eissing <icing@apache.org>
Mon, 14 Feb 2022 16:52:26 +0000 (16:52 +0000)
committerStefan Eissing <icing@apache.org>
Mon, 14 Feb 2022 16:52:26 +0000 (16:52 +0000)
  *) mod_tls: Fix a linkage issue with rustls when compiled
     with rust 1.55, 1.56 or 1.57. This prevents the loading
     of the module because of an undefined symbol: fmaf
     See https://github.com/rustls/rustls-ffi/issues/133
     [Christophe Jaillet]

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898077 13f79535-47bb-0310-9956-ffa450edef68

modules/tls/config2.m4

index 4750b6aadccb8148e134ca0f69f66bc112bba533..af97178866be602bf1db358bb77f673ec5825143 100644 (file)
@@ -144,6 +144,19 @@ is usually linked shared and requires loading. ], $tls_objs, , most, [
                 MOD_TLS_LINK_LIBS="-lrustls"
                 ;;
            esac
+
+           # Some rustls versions need an extra -lm when linked
+           # See https://github.com/rustls/rustls-ffi/issues/133
+           rustls_version=`rustc --version`
+           case "$rustls_version" in
+              *1.55*) need_lm="yes" ;;
+              *1.56*) need_lm="yes" ;;
+              *1.57*) need_lm="yes" ;;
+           esac
+           if test "$need_lm" = "yes" ; then
+                MOD_TLS_LINK_LIBS="$MOD_TLS_LINK_LIBS -lm"
+           fi
+
            # The only symbol which needs to be exported is the module
            # structure, so ask libtool to hide everything else:
            APR_ADDTO(MOD_TLS_LDADD, [$MOD_TLS_LINK_LIBS -export-symbols-regex tls_module])