Skip to content

Commit

Permalink
Decrease the amount of math optimisation flags
Browse files Browse the repository at this point in the history
Found one thing that breaks with fast-math on GCC (breadboard texture), who knows what else may be broken. Only use a subset that should be completely safe to use.
  • Loading branch information
rollerozxa committed Jun 24, 2024
1 parent d8be41f commit 2014973
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ endif()

add_definitions(-DTMS_BACKEND_${TMS_FORMFACTOR} -DTMS_BACKEND_${TMS_BACKEND})

set(COMMON_FLAGS "-ffast-math")
// Use a safe subset of fast math flags
set(COMMON_FLAGS "-fno-math-errno -fno-trapping-math -fno-signed-zeros")

set(COMMON_FLAGS_DEBUG "${COMMON_FLAGS} -O0 -ggdb -DDEBUG=1")
set(COMMON_FLAGS_RELEASE "${COMMON_FLAGS} -DNDEBUG=1 -fomit-frame-pointer")
Expand Down

0 comments on commit 2014973

Please sign in to comment.