diff --git a/build_tools/build_detect_platform b/build_tools/build_detect_platform index 1d5138dbf..c88ad1d55 100755 --- a/build_tools/build_detect_platform +++ b/build_tools/build_detect_platform @@ -606,8 +606,8 @@ EOF fi # TODO(tec): Fix -Wshorten-64-to-32 errors on FreeBSD and enable the warning. -# -Wshorten-64-to-32 breaks compilation on FreeBSD i386 -if ! [ "$TARGET_OS" = FreeBSD -a "$TARGET_ARCHITECTURE" = i386 ]; then +# -Wshorten-64-to-32 breaks compilation on FreeBSD aarch64 and i386 +if ! { [ "$TARGET_OS" = FreeBSD ] && [ "$TARGET_ARCHITECTURE" = arm64 -o "$TARGET_ARCHITECTURE" = i386 ]; }; then # Test whether -Wshorten-64-to-32 is available $CXX $PLATFORM_CXXFLAGS -x c++ - -o /dev/null -Wshorten-64-to-32 2>/dev/null <