You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ic...@apache.org on 2022/02/14 16:52:26 UTC

svn commit: r1898077 - in /httpd/httpd/branches/2.4.x: ./ modules/tls/config2.m4

Author: icing
Date: Mon Feb 14 16:52:26 2022
New Revision: 1898077

URL: http://svn.apache.org/viewvc?rev=1898077&view=rev
Log:
Merge of r1896278 from trunk:

  *) 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]



Modified:
    httpd/httpd/branches/2.4.x/   (props changed)
    httpd/httpd/branches/2.4.x/modules/tls/config2.m4

Propchange: httpd/httpd/branches/2.4.x/
------------------------------------------------------------------------------
  Merged /httpd/httpd/trunk:r1896278

Modified: httpd/httpd/branches/2.4.x/modules/tls/config2.m4
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.4.x/modules/tls/config2.m4?rev=1898077&r1=1898076&r2=1898077&view=diff
==============================================================================
--- httpd/httpd/branches/2.4.x/modules/tls/config2.m4 (original)
+++ httpd/httpd/branches/2.4.x/modules/tls/config2.m4 Mon Feb 14 16:52:26 2022
@@ -144,6 +144,19 @@ is usually linked shared and requires lo
                 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])