diff --git a/CMakeLists.txt b/CMakeLists.txt index 9ad991bef..f802c40a8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -332,9 +332,6 @@ if(PNG_HARDWARE_OPTIMIZATIONS) message(FATAL_ERROR "PNG_RISCV_RVV must be one of [${PNG_RISCV_RVV_POSSIBLE_VALUES}]") elseif(NOT PNG_RISCV_RVV STREQUAL "off") - set(_SAVED_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS}) - set(CMAKE_REQUIRED_FLAGS "-march=rv64gv1p0") - check_c_source_compiles(" #include #include @@ -349,8 +346,6 @@ if(PNG_HARDWARE_OPTIMIZATIONS) return (int)__riscv_vfmv_f_s_f32m1_f32(val); }" COMPILER_SUPPORTS_RVV) - set(CMAKE_REQUIRED_FLAGS ${_SAVED_CMAKE_REQUIRED_FLAGS}) - if(NOT COMPILER_SUPPORTS_RVV) message(FATAL_ERROR "Compiler does not support RISC-V Vector extension or its unable to detect it") endif() diff --git a/configure.ac b/configure.ac index 9f4ed5a43..ac963ff62 100644 --- a/configure.ac +++ b/configure.ac @@ -715,8 +715,6 @@ then compiler_support_riscv_rvv=no AC_MSG_CHECKING(whether to use RISC-V RVV intrinsics) - save_CFLAGS=$CFLAGS - CFLAGS="$CFLAGS -march=rv64gv1p0" AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ #include #include @@ -737,7 +735,6 @@ int main() { else AC_MSG_WARN([Compiler does not support riscv rvv.]) fi - CFLAGS=$save_CFLAGS fi # Add RISC-V-specific files to all builds where $host_cpu is riscv ('riscv64')