From: Bruno Haible Date: Sat, 24 Aug 2024 13:52:05 +0000 (+0200) Subject: build: Fix shared library support in 32-bit mode on FreeBSD/powerpc64. X-Git-Tag: v0.23~152 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=535cd354e4b23821e3e9064a5e821c8d3a77432f;p=thirdparty%2Fgettext.git build: Fix shared library support in 32-bit mode on FreeBSD/powerpc64. Patch from . * m4/libtool.m4: On FreeBSD, fix shlibpath_var. --- diff --git a/m4/libtool.m4 b/m4/libtool.m4 index ea4d35963..c0340e021 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -2699,7 +2699,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