From c510bd88305c195a78b1cacb3e1a7cb35b672146 Mon Sep 17 00:00:00 2001 From: Ben Walker Date: Tue, 23 Jul 2019 10:59:35 -0700 Subject: [PATCH] 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 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/463015 Tested-by: SPDK CI Jenkins Reviewed-by: Tomasz Zawadzki Reviewed-by: Darek Stojaczyk Reviewed-by: Paul Luse Reviewed-by: Shuhei Matsumoto Reviewed-by: Jim Harris --- configure | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/configure b/configure index 135074ef9..2669cbbef 100755 --- a/configure +++ b/configure @@ -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