Commit c510bd88 authored by Ben Walker's avatar Ben Walker Committed by Jim Harris
Browse files

build: Disable ISA-L if the target build architecture is not x86



It doesn't matter what the system itself is - it matters what the
compiler is targeting.

Change-Id: Ifb901f137a828725c3064aca2c1142d6214eec14
Signed-off-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463015


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 73439e6f
Loading
Loading
Loading
Loading
+7 −5
Original line number Diff line number Diff line
@@ -349,12 +349,14 @@ CC_TYPE=$(cat mk/cc.mk | grep "CC_TYPE=" | cut -d "=" -f 2)

BUILD_CMD="$CC -o /dev/null -x c $CPPFLAGS $CFLAGS $LDFLAGS"

# Detect architecture and force no isal if non x86 archtecture
arch=$(uname -m)
# Detect architecture and force no ISA-L if non-x86 archtecture
if [[ "${CONFIG[ISAL]}" = "y" ]]; then
	arch=$($CC -dumpmachine)
	if [[ $arch != x86_64* ]]; then
	echo "Notice: ISAL auto-disabled due to CPU incompatiblity."
		echo "Notice: ISA-L disabled due to CPU incompatiblity."
		CONFIG[ISAL]=n
	fi
fi

if [[ "${CONFIG[ISAL]}" = "n" ]] && [[ "${CONFIG[REDUCE]}" = "y" ]]; then
		echo "ERROR Conflicting options: --with-reduce is not compatible with --without-isal."