From: Christophe Jaillet Date: Wed, 22 Dec 2021 14:28:00 +0000 (+0000) Subject: Try to workaround a linkage issue with rustls. X-Git-Tag: 2.5.0-alpha2-ci-test-only~619 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c03054ed8addbe4b6de5e876c905453f18f9749;p=thirdparty%2Fapache%2Fhttpd.git Try to workaround a linkage issue with rustls. 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 --- diff --git a/modules/tls/config2.m4 b/modules/tls/config2.m4 index 4750b6aadcc..af97178866b 100644 --- a/modules/tls/config2.m4 +++ b/modules/tls/config2.m4 @@ -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])