From: Michael Jeanson Date: Mon, 20 Mar 2023 20:50:49 +0000 (-0400) Subject: jjb: extend 'libdir = lib64' to yocto X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=85322e5d1bd2d93741cb51c0e26728a71f0e3a01;p=lttng-ci.git jjb: extend 'libdir = lib64' to yocto Change-Id: I386a67682ec48e46f37416feef914f4df7e3ef32 Signed-off-by: Michael Jeanson --- diff --git a/scripts/babeltrace/build.sh b/scripts/babeltrace/build.sh index ddb9162..5756c8e 100755 --- a/scripts/babeltrace/build.sh +++ b/scripts/babeltrace/build.sh @@ -109,10 +109,13 @@ LIBDIR="lib" # RHEL and SLES both use lib64 but don't bother shipping a default autoconf # site config that matches this. -if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then - LIBDIR_ARCH="${LIBDIR}64" -else - LIBDIR_ARCH="$LIBDIR" +if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then + # Detect the userspace bitness in a distro agnostic way + if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then + LIBDIR_ARCH="${LIBDIR}64" + else + LIBDIR_ARCH="$LIBDIR" + fi fi # Create tmp directory diff --git a/scripts/liburcu/build.sh b/scripts/liburcu/build.sh index 390a7e9..8c87543 100755 --- a/scripts/liburcu/build.sh +++ b/scripts/liburcu/build.sh @@ -101,10 +101,13 @@ LIBDIR="lib" # RHEL and SLES both use lib64 but don't bother shipping a default autoconf # site config that matches this. -if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then - LIBDIR_ARCH="${LIBDIR}64" -else - LIBDIR_ARCH="$LIBDIR" +if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then + # Detect the userspace bitness in a distro agnostic way + if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then + LIBDIR_ARCH="${LIBDIR}64" + else + LIBDIR_ARCH="$LIBDIR" + fi fi # Create tmp directory diff --git a/scripts/lttng-tools/build.sh b/scripts/lttng-tools/build.sh index 42b4ee3..1f64168 100755 --- a/scripts/lttng-tools/build.sh +++ b/scripts/lttng-tools/build.sh @@ -118,10 +118,13 @@ LIBDIR="lib" # RHEL and SLES both use lib64 but don't bother shipping a default autoconf # site config that matches this. -if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then - LIBDIR_ARCH="${LIBDIR}64" -else - LIBDIR_ARCH="$LIBDIR" +if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then + # Detect the userspace bitness in a distro agnostic way + if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then + LIBDIR_ARCH="${LIBDIR}64" + else + LIBDIR_ARCH="$LIBDIR" + fi fi DEPS_INC="$WORKSPACE/deps/build/include" diff --git a/scripts/lttng-ust/build.sh b/scripts/lttng-ust/build.sh index 7ce2739..65c405c 100755 --- a/scripts/lttng-ust/build.sh +++ b/scripts/lttng-ust/build.sh @@ -101,10 +101,13 @@ LIBDIR="lib" # RHEL and SLES both use lib64 but don't bother shipping a default autoconf # site config that matches this. -if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release ) && ( "$(uname -m)" == "x86_64" ) ]]; then - LIBDIR_ARCH="${LIBDIR}64" -else - LIBDIR_ARCH="$LIBDIR" +if [[ ( -f /etc/redhat-release || -f /etc/SuSE-release || -f /etc/yocto-release ) ]]; then + # Detect the userspace bitness in a distro agnostic way + if file -L /bin/bash | grep '64-bit' >/dev/null 2>&1; then + LIBDIR_ARCH="${LIBDIR}64" + else + LIBDIR_ARCH="$LIBDIR" + fi fi DEPS_INC="$WORKSPACE/deps/build/include"