libtool-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]


From: Ileana Dumitrescu
Date: Tue, 27 Aug 2024 10:18:39 -0400 (EDT)

branch: master
commit 552d1db3fbeb15d259f1accb296efa980f2d088f
Author: Bruno Haible <bruno@clisp.org>
AuthorDate: Sat Aug 24 13:50:42 2024 +0200

    Fix libtool wrapper programs in 32-bit mode on FreeBSD/powerpc64.
    
    * m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER): On FreeBSD/powerpc64, in 32-bit 
mode,
    set shlibpath_var to LD_32_LIBRARY_PATH instead of LD_LIBRARY_PATH.
---
 m4/libtool.m4 | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index edd9b3cf..bb0ae820 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -2727,7 +2727,21 @@ freebsd* | dragonfly* | midnightbsd*)
       need_version=yes
       ;;
   esac
-  shlibpath_var=LD_LIBRARY_PATH
+  case $host_cpu in
+    powerpc64)
+      # On FreeBSD bi-arch platforms, a different variable is used for 32-bit
+      # binaries.  See <https://man.freebsd.org/cgi/man.cgi?query=ld.so>.
+      AC_COMPILE_IFELSE(
+        [AC_LANG_SOURCE(
+           [[int test_pointer_size[sizeof (void *) - 5];
+           ]])],
+        [shlibpath_var=LD_LIBRARY_PATH],
+        [shlibpath_var=LD_32_LIBRARY_PATH])
+      ;;
+    *)
+      shlibpath_var=LD_LIBRARY_PATH
+      ;;
+  esac
   case $host_os in
   freebsd2.*)
     shlibpath_overrides_runpath=yes



reply via email to

[Prev in Thread] Current Thread [Next in Thread]