Skip to content

Commit

Permalink
Disable -march=native for testervecabi
Browse files Browse the repository at this point in the history
It fails when compiling on a host CPU with AVX512f
  • Loading branch information
luhenry committed Nov 4, 2023
1 parent cf70c65 commit ff972b6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
5 changes: 0 additions & 5 deletions Configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ set(CLANG_FLAGS_ENABLE_VXE2 "-march=z15;-mzvector")
set(CLANG_FLAGS_ENABLE_VXE2NOFMA "-march=z15;-mzvector")

set(FLAGS_OTHERS "")
set(FLAGS_ARCH_NATIVE "")

# All variables storing compiler flags should be prefixed with FLAGS_
if(CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang)")
Expand All @@ -178,10 +177,6 @@ if(CMAKE_C_COMPILER_ID MATCHES "(GNU|Clang)")
string(CONCAT FLAGS_STRICTMATH ${FLAGS_STRICTMATH} " -msse2 -mfpmath=sse")
string(CONCAT FLAGS_FASTMATH ${FLAGS_FASTMATH} " -msse2 -mfpmath=sse")
endif()

if (SLEEF_ARCH_X86)
set(FLAGS_ARCH_NATIVE "-march=native")
endif()

# Without the options below, gcc generates calls to libm
string(CONCAT FLAGS_OTHERS "-fno-math-errno -fno-trapping-math")
Expand Down
1 change: 0 additions & 1 deletion src/libm-tester/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,6 @@ if(ENABLE_GNUABI AND COMPILER_SUPPORTS_OMP_SIMD AND NOT SLEEF_TARGET_PROCESSOR M
add_executable(testervecabi testervecabi.c)
target_compile_definitions(testervecabi PRIVATE ${COMMON_TARGET_DEFINITIONS})
target_compile_options(testervecabi PRIVATE ${OpenMP_C_FLAGS})
target_compile_options(testervecabi PRIVATE ${FLAGS_ARCH_NATIVE})
target_link_libraries(testervecabi ${TARGET_LIBSLEEF} ${OpenMP_C_FLAGS})
set_target_properties(testervecabi PROPERTIES C_STANDARD 99)
add_test(NAME testervecabi COMMAND testervecabi
Expand Down

0 comments on commit ff972b6

Please sign in to comment.