jjb: extend 'libdir = lib64' to yocto
[lttng-ci.git] / scripts / lttng-tools / build.sh
index 577b835bc55261bd7284434491399fb92f66255d..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"
@@ -280,8 +283,8 @@ cygwin|cygwin64|msys32|msys64)
 esac
 
 # The missing-field-initializers warning code is very dumb in GCC 4.8 on
-# SLES12, disable it even if it's available.
-if [[ $platform = sles12sp5* ]]; then
+# SLES12 / EL7, disable it even if it's available.
+if [[ $platform = sles12sp5* ]] || [[  $platform = el7* ]]; then
     CFLAGS="$CFLAGS -Wno-missing-field-initializers"
     CXXFLAGS="$CXXFLAGS -Wno-missing-field-initializers"
 fi
@@ -373,6 +376,11 @@ debug-rcu)
 
 *)
     echo "Standard configuration"
+
+    # Something is broken in docbook-xml on yocto
+    if [[ "$platform" = yocto* ]]; then
+        CONF_OPTS+=("--disable-man-pages")
+    fi
     ;;
 esac
 
This page took 0.029341 seconds and 4 git commands to generate.