From 6f6a0abab94af8ed716a2a96d218633ff289b3ff Mon Sep 17 00:00:00 2001 From: sdong Date: Tue, 9 Jan 2018 14:07:36 -0800 Subject: [PATCH] Remove GCC parameter "-march=native" for ARM Summary: Most popular versions of GCC can't identify platform on ARM if "-march=native" is specified. Remove it to unblock most people. Test Plan: Build in most of ARM and x86 --- build_tools/build_detect_platform | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index 123c1ed86ae..02dc4963270 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -481,6 +481,9 @@ if test -z "$PORTABLE"; then COMMON_FLAGS="$COMMON_FLAGS -mcpu=$POWER -mtune=$POWER " elif test -n "`echo $TARGET_ARCHITECTURE | grep ^s390x`"; then COMMON_FLAGS="$COMMON_FLAGS -march=z10 " + elif test -n "`echo $TARGET_ARCHITECTURE | grep ^arm`"; then + # TODO: Handle this with approprite options. + COMMON_FLAGS="$COMMON_FLAGS" elif [ "$TARGET_OS" != AIX ] && [ "$TARGET_OS" != SunOS ]; then COMMON_FLAGS="$COMMON_FLAGS -march=native " elif test "$USE_SSE"; then