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: Ben Walker <benjamin.walker@intel.com>
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463015
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
Ben Walker 2019-07-23 10:59:35 -07:00 committed by Jim Harris
parent 73439e6f46
commit c510bd8830

12
configure vendored
View File

@ -349,11 +349,13 @@ 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)
if [[ $arch != x86_64* ]]; then
echo "Notice: ISAL auto-disabled due to CPU incompatiblity."
CONFIG[ISAL]=n
# 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: ISA-L disabled due to CPU incompatiblity."
CONFIG[ISAL]=n
fi
fi
if [[ "${CONFIG[ISAL]}" = "n" ]] && [[ "${CONFIG[REDUCE]}" = "y" ]]; then