]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Try to workaround a linkage issue with rustls.
authorChristophe Jaillet <jailletc36@apache.org>
Wed, 22 Dec 2021 14:28:00 +0000 (14:28 +0000)
committerChristophe Jaillet <jailletc36@apache.org>
Wed, 22 Dec 2021 14:28:00 +0000 (14:28 +0000)
See https://github.com/rustls/rustls-ffi/issues/133 for discussion about it.
Only 1.55, 1.56 and 1.57 should be affected.

Tested with 1.56.1 on Linux pop-os 5.15.5

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1896278 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])