Skip to content

Commit

Permalink
disable -fassociative-math (within -funsafe-math-optimizations)
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed May 30, 2019
1 parent a10b1af commit 01e6148
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions cmake/px4_add_common_flags.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,16 @@ function(px4_add_common_flags)
-fdata-sections
-ffunction-sections
-fomit-frame-pointer
-funsafe-math-optimizations

#-funsafe-math-optimizations # Enables -fno-signed-zeros, -fno-trapping-math, -fassociative-math and -freciprocal-math
-fno-signed-zeros # Allow optimizations for floating-point arithmetic that ignore the signedness of zero
-fno-trapping-math # Compile code assuming that floating-point operations cannot generate user-visible traps
#-fassociative-math # Allow re-association of operands in series of floating-point operations
-freciprocal-math # Allow the reciprocal of a value to be used instead of dividing by the value if this enables optimizations

-fno-math-errno # Do not set errno after calling math functions that are executed with a single instruction, e.g., sqrt

-fno-strict-aliasing
-fno-math-errno

# visibility
-fvisibility=hidden
Expand Down

0 comments on commit 01e6148

Please sign in to comment.