fix-msa-support-for-mips.patch 974 B

12345678910111213141516171819202122232425
  1. diff --git a/CMakeLists.txt b/CMakeLists.txt
  2. index 6c1d632..a2a0d0d 100644
  3. --- a/CMakeLists.txt
  4. +++ b/CMakeLists.txt
  5. @@ -158,8 +158,8 @@ endif()
  6. # set definitions and sources for MIPS
  7. if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
  8. CMAKE_SYSTEM_PROCESSOR MATCHES "mips64el*")
  9. - set(PNG_MIPS_MSA_POSSIBLE_VALUES on off)
  10. - set(PNG_MIPS_MSA "on" CACHE STRING "Enable MIPS_MSA optimizations:
  11. + set(PNG_MIPS_MSA_POSSIBLE_VALUES on off check)
  12. + set(PNG_MIPS_MSA "check" CACHE STRING "Enable MIPS_MSA optimizations:
  13. off: disable the optimizations")
  14. set_property(CACHE PNG_MIPS_MSA PROPERTY STRINGS
  15. ${PNG_MIPS_MSA_POSSIBLE_VALUES})
  16. @@ -173,6 +173,8 @@ if(CMAKE_SYSTEM_PROCESSOR MATCHES "mipsel*" OR
  17. mips/filter_msa_intrinsics.c)
  18. if(${PNG_MIPS_MSA} STREQUAL "on")
  19. add_definitions(-DPNG_MIPS_MSA_OPT=2)
  20. + else()
  21. + add_definitions(-DPNG_MIPS_MSA_CHECK_SUPPORTED)
  22. endif()
  23. else()
  24. add_definitions(-DPNG_MIPS_MSA_OPT=0)