configure: Use -march=native for x86 architecture only.
Exclude -march=native parameter from build command for other architectures since it causes a compilation error in ARM. Change-Id: Ida22ea4b3afba9759102d2e2203fc9e6e312c3ba Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com> Signed-off-by: Evgenii Kochetov <evgeniik@mellanox.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469390 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
916f3d1471
commit
131c9aad05
9
configure
vendored
9
configure
vendored
@ -371,11 +371,16 @@ $rootdir/scripts/detect_cc.sh --cc="$CC" --cxx="$CXX" --lto="${CONFIG[LTO]}" --l
|
||||
CC=$(cat $rootdir/mk/cc.mk | grep "DEFAULT_CC=" | cut -d "=" -f 2)
|
||||
CC_TYPE=$(cat $rootdir/mk/cc.mk | grep "CC_TYPE=" | cut -d "=" -f 2)
|
||||
|
||||
BUILD_CMD=($CC -o /dev/null -x c $CPPFLAGS $CFLAGS $LDFLAGS -march=native)
|
||||
arch=$($CC -dumpmachine)
|
||||
|
||||
if [[ $arch == x86_64* ]]; then
|
||||
BUILD_CMD=($CC -o /dev/null -x c $CPPFLAGS $CFLAGS $LDFLAGS -march=native)
|
||||
else
|
||||
BUILD_CMD=($CC -o /dev/null -x c $CPPFLAGS $CFLAGS $LDFLAGS)
|
||||
fi
|
||||
|
||||
# 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
|
||||
|
Loading…
Reference in New Issue
Block a user