jjb: extend 'libdir = lib64' to yocto
authorMichael Jeanson <mjeanson@efficios.com>
Mon, 20 Mar 2023 20:50:49 +0000 (16:50 -0400)
committerMichael Jeanson <mjeanson@efficios.com>
Mon, 20 Mar 2023 20:50:53 +0000 (16:50 -0400)
Change-Id: I386a67682ec48e46f37416feef914f4df7e3ef32
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
scripts/babeltrace/build.sh
scripts/liburcu/build.sh
scripts/lttng-tools/build.sh
scripts/lttng-ust/build.sh

index ddb9162a4a351840444f33a551b2c9463eb1bcfa..5756c8ea3bd07814f41d1c2866746a72337d89d4 100755 (executable)
@@ -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
index 390a7e9cd74ebbaa52b8266e9490a7d2fd9cfa97..8c875432c0e9eaae06798ef594e8d1c3725866be 100755 (executable)
@@ -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
index 42b4ee39fe2ad63e847fb60994d3a98b20a9f214..1f64168c6018bb84745e4268e75980965a1b613a 100755 (executable)
@@ -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"
index 7ce27392a3574fa99838fcb49693563ecf779512..65c405c5e1093d167232ccf460378cc68d5913cc 100755 (executable)
@@ -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"
This page took 0.025981 seconds and 4 git commands to generate.