From: Bruno Haible Date: Sat, 24 Aug 2024 11:50:42 +0000 (+0200) Subject: Fix libtool wrapper programs in 32-bit mode on FreeBSD/powerpc64. X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e82be5771a27436f1d324615fd307fbe59905a0a;p=thirdparty%2Flibtool.git 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. --- diff --git a/m4/libtool.m4 b/m4/libtool.m4 index edd9b3cfc..bb0ae820a 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 . + 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