[compiler-rt] r234579 - [sanitizer][MIPS] Fix warnings on MIPS

Alexey Samsonov vonosmas at gmail.com
Sat Apr 11 09:58:24 PDT 2015


On Fri, Apr 10, 2015 at 2:45 AM, Dmitry Vyukov <dvyukov at google.com> wrote:

> Author: dvyukov
> Date: Fri Apr 10 04:45:22 2015
> New Revision: 234579
>
> URL: http://llvm.org/viewvc/llvm-project?rev=234579&view=rev
> Log:
> [sanitizer][MIPS] Fix warnings on MIPS
> Fixed:
> - stack frame size warning.
> - msse3 flag unused warning.
> - GoTsanRuntimeCheck dependency warning reported by cmake.
>
> Change by Sagar Thakur
> Reviewed in http://reviews.llvm.org/D8963
>
>
> Modified:
>     compiler-rt/trunk/CMakeLists.txt
>     compiler-rt/trunk/cmake/config-ix.cmake
>     compiler-rt/trunk/test/tsan/CMakeLists.txt
>
> Modified: compiler-rt/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/CMakeLists.txt?rev=234579&r1=234578&r2=234579&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/CMakeLists.txt (original)
> +++ compiler-rt/trunk/CMakeLists.txt Fri Apr 10 04:45:22 2015
> @@ -238,12 +238,13 @@ if(NOT COMPILER_RT_DEBUG AND NOT MSVC)
>  endif()
>
>  # Determine if we should restrict stack frame sizes.
> -# Stack frames on PowerPC and in debug biuld can be much larger than
> +# Stack frames on PowerPC and Mips and in debug biuld can be much larger
> than
>  # anticipated.
>  # FIXME: Fix all sanitizers and add -Wframe-larger-than to
>  # SANITIZER_COMMON_FLAGS
>  if(COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG AND NOT COMPILER_RT_DEBUG
> -   AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC")
> +   AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "PowerPC"
> +   AND NOT ${LLVM_NATIVE_ARCH} STREQUAL "Mips")
>    set(SANITIZER_LIMIT_FRAME_SIZE TRUE)
>  else()
>    set(SANITIZER_LIMIT_FRAME_SIZE FALSE)
>
> Modified: compiler-rt/trunk/cmake/config-ix.cmake
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/cmake/config-ix.cmake?rev=234579&r1=234578&r2=234579&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/cmake/config-ix.cmake (original)
> +++ compiler-rt/trunk/cmake/config-ix.cmake Fri Apr 10 04:45:22 2015
> @@ -308,3 +308,10 @@ else()
>    set(COMPILER_RT_HAS_UBSAN FALSE)
>  endif()
>
> +# -msse3 flag is not valid for Mips therefore clang gives a warning
> +# message with -msse3. But check_c_compiler_flags() checks only for
> +# compiler error messages. Therefore COMPILER_RT_HAS_MSSE3_FLAG turns out
> to be
> +# true on Mips. So we make it false here.
> +if("${LLVM_NATIVE_ARCH}" STREQUAL "Mips")
> +  set(COMPILER_RT_HAS_MSSE3_FLAG FALSE)
> +endif()
>

^^
This is incorrect. Consider passing "-Werror -msse3" to
check_cxx_compiler_flag() invocation.
We already do that for some warnings flags.


>
> Modified: compiler-rt/trunk/test/tsan/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/CMakeLists.txt?rev=234579&r1=234578&r2=234579&view=diff
>
> ==============================================================================
> --- compiler-rt/trunk/test/tsan/CMakeLists.txt (original)
> +++ compiler-rt/trunk/test/tsan/CMakeLists.txt Fri Apr 10 04:45:22 2015
> @@ -1,5 +1,7 @@
>  set(TSAN_TEST_DEPS ${SANITIZER_COMMON_LIT_TEST_DEPS})
> -list(APPEND TSAN_TEST_DEPS GotsanRuntimeCheck)
> +if(NOT ${LLVM_NATIVE_ARCH} STREQUAL "Mips")
> +  list(APPEND TSAN_TEST_DEPS GotsanRuntimeCheck)
> +endif()
>  if(NOT COMPILER_RT_STANDALONE_BUILD)
>    list(APPEND TSAN_TEST_DEPS tsan)
>  endif()
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>



-- 
Alexey Samsonov
vonosmas at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150411/c4fe7990/attachment.html>


More information about the llvm-commits mailing list