Skip to content

Commit cfa4eb2

Browse files
committed
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 rustls/rustls-ffi#133 [Christophe Jaillet] git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1898077 13f79535-47bb-0310-9956-ffa450edef68
1 parent 1512e21 commit cfa4eb2

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

modules/tls/config2.m4

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,19 @@ is usually linked shared and requires loading. ], $tls_objs, , most, [
144144
MOD_TLS_LINK_LIBS="-lrustls"
145145
;;
146146
esac
147+
148+
# Some rustls versions need an extra -lm when linked
149+
# See https://github.com/rustls/rustls-ffi/issues/133
150+
rustls_version=`rustc --version`
151+
case "$rustls_version" in
152+
*1.55*) need_lm="yes" ;;
153+
*1.56*) need_lm="yes" ;;
154+
*1.57*) need_lm="yes" ;;
155+
esac
156+
if test "$need_lm" = "yes" ; then
157+
MOD_TLS_LINK_LIBS="$MOD_TLS_LINK_LIBS -lm"
158+
fi
159+
147160
# The only symbol which needs to be exported is the module
148161
# structure, so ask libtool to hide everything else:
149162
APR_ADDTO(MOD_TLS_LDADD, [$MOD_TLS_LINK_LIBS -export-symbols-regex tls_module])

0 commit comments

Comments
 (0)