You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by mi...@apache.org on 2020/04/23 23:00:08 UTC

[tomcat-native] branch master updated: Fix linking against OpenSSL in non-standard locations on FreeBSD

This is an automated email from the ASF dual-hosted git repository.

michaelo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-native.git


The following commit(s) were added to refs/heads/master by this push:
     new 692dd48  Fix linking against OpenSSL in non-standard locations on FreeBSD
692dd48 is described below

commit 692dd48da587ebead9f03f1a00bc3a7a17108b19
Author: Michael Osipov <mi...@apache.org>
AuthorDate: Fri Apr 24 00:52:12 2020 +0200

    Fix linking against OpenSSL in non-standard locations on FreeBSD
    
    When libtcnative is configured with OpenSSL from a non-standard location the
    linker fails to find libssl/libcrypto because the run path is not embedded
    into the executable. Use the same approach as on GNU/Linux by passing '-rpath'
    followed by the path to the linker.
---
 native/build/tcnative.m4          | 2 +-
 xdocs/miscellaneous/changelog.xml | 4 ++++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/native/build/tcnative.m4 b/native/build/tcnative.m4
index 3047371..b99fe93 100644
--- a/native/build/tcnative.m4
+++ b/native/build/tcnative.m4
@@ -220,7 +220,7 @@ case "$use_openssl" in
                 ssllibdir=lib/hpux32
                 TCN_OPENSSL_LIBS="-L$use_openssl/$ssllibdir -Wl,+b: -lssl -lcrypto"
                 ;;
-            *linux*)
+            *linux*|*freebsd*)
                 TCN_OPENSSL_LIBS="-L$use_openssl/$ssllibdir -Wl,-rpath,$use_openssl/$ssllibdir -lssl -lcrypto"
                 ;;
             *)
diff --git a/xdocs/miscellaneous/changelog.xml b/xdocs/miscellaneous/changelog.xml
index a04005a..74c964f 100644
--- a/xdocs/miscellaneous/changelog.xml
+++ b/xdocs/miscellaneous/changelog.xml
@@ -64,6 +64,10 @@ This will have been <?xml version="1.0" encoding="UTF-8"?>
     <add>
       Introduce tcn_get_thread_id(void) to reduce code duplication. (michaelo)
     </add>
+    <fix>
+      Fix linking against OpenSSL in non-standard locations on FreeBSD.
+      (michaelo)
+    </fix>
   </changelog>
 </section>
 <section name="Changes in 1.2.23">


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org