diff --git a/common/build-style/cmake.sh b/common/build-style/cmake.sh index e1f9f18dffb..136312ed7b4 100644 --- a/common/build-style/cmake.sh +++ b/common/build-style/cmake.sh @@ -58,12 +58,7 @@ _EOF fi cmake_args+=" -DCMAKE_INSTALL_PREFIX=/usr" cmake_args+=" -DCMAKE_BUILD_TYPE=Release" - - if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then - cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib32" - else - cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib" - fi + cmake_args+=" -DCMAKE_INSTALL_LIBDIR=lib${XBPS_TARGET_WORDSIZE}" if [[ $build_helper = *"qemu"* ]]; then echo "SET(CMAKE_CROSSCOMPILING_EMULATOR /usr/bin/qemu-${XBPS_TARGET_QEMU_MACHINE}-static)" \ diff --git a/common/build-style/meson.sh b/common/build-style/meson.sh index 9b92279148c..6eb2dc530da 100644 --- a/common/build-style/meson.sh +++ b/common/build-style/meson.sh @@ -94,7 +94,7 @@ do_configure() { ${meson_cmd} \ --prefix=/usr \ - --libdir=/usr/lib \ + --libdir=/usr/lib${XBPS_TARGET_WORDSIZE} \ --libexecdir=/usr/libexec \ --bindir=/usr/bin \ --sbindir=/usr/bin \ diff --git a/common/build-style/waf.sh b/common/build-style/waf.sh index 88e908247a7..e943765f9b1 100644 --- a/common/build-style/waf.sh +++ b/common/build-style/waf.sh @@ -4,7 +4,8 @@ do_configure() { : ${configure_script:=waf} - PYTHON=/usr/bin/python2 python2 ${configure_script} configure --prefix=/usr --libdir=/usr/lib ${configure_args} + PYTHON=/usr/bin/python2 python2 ${configure_script} configure \ + --prefix=/usr --libdir=/usr/lib${XBPS_TARGET_WORDSIZE} ${configure_args} } do_build() { diff --git a/common/build-style/waf3.sh b/common/build-style/waf3.sh index 0941214e969..54fd221172b 100644 --- a/common/build-style/waf3.sh +++ b/common/build-style/waf3.sh @@ -12,7 +12,8 @@ do_configure() { fi PYTHON=/usr/bin/python3 python3 ${configure_script} configure \ - --prefix=/usr --libdir=/usr/lib ${configure_args} ${cross_args} + --prefix=/usr --libdir=/usr/lib${XBPS_TARGET_WORDSIZE} \ + ${configure_args} ${cross_args} } do_build() { diff --git a/common/environment/configure/gnu-configure-args.sh b/common/environment/configure/gnu-configure-args.sh index 44f5d7e0468..1c5f51b35cc 100644 --- a/common/environment/configure/gnu-configure-args.sh +++ b/common/environment/configure/gnu-configure-args.sh @@ -10,11 +10,10 @@ export configure_args="--prefix=/usr --sysconfdir=/etc --sbindir=/usr/bin --bind . ${XBPS_COMMONDIR}/build-profiles/${XBPS_MACHINE}.sh export configure_args+=" --host=$XBPS_TRIPLET --build=$XBPS_TRIPLET" -if [ "$XBPS_TARGET_MACHINE" = "i686" ]; then - # on x86 use /usr/lib32 as libdir, but just as fake directory, - # because /usr/lib32 is a symlink to /usr/lib in void. - export configure_args+=" --libdir=/usr/lib32" -fi +# Always use wordsize-specific libdir even though the real path is lib +# This is to make sure 32-bit and 64-bit libs can coexist when looking +# up things (the opposite-libdir is always symlinked as libNN) +export configure_args+=" --libdir=/usr/lib${XBPS_TARGET_WORDSIZE}" _AUTOCONFCACHEDIR=${XBPS_COMMONDIR}/environment/configure/autoconf_cache