From c246c9c6e25210c0a62656aa800515da5048bc3e Mon Sep 17 00:00:00 2001 From: mikael Date: Thu, 14 Oct 2021 14:37:37 -0700 Subject: [PATCH] Remove -Wshorten-64-to-32 FreeBSD on aarch64 as it breaks compilation. (#9010) Summary: Pull Request resolved: https://github.com/facebook/rocksdb/pull/9010 Reviewed By: pdillinger Differential Revision: D31613434 Pulled By: ajkr fbshipit-source-id: 305a84fa715d0121fa65abaea3d32bad41233957 --- build_tools/build_detect_platform | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 <