Skip to content

Commit

Permalink
[LINUX] Add compiler flags to fix floating point precision error (Har…
Browse files Browse the repository at this point in the history
…bourMasters#399)

These flags are known to fix one known issue exclusive to Linux: the Volvagia boss battle sequence. The softlock that occurs points towards a possible floating point precision error, possibly tied to the camera/Volvagia movement. This does not occur for the Windows build. It's possible that there are more issues that gets fixed by these flags. These flags will ensure that the compiler follows the IEEE 754 standard, which so happens to be the same behaviour that Windows uses. For more details, read this informative stackoverflow post: https://stackoverflow.com/a/16395650
  • Loading branch information
GreenSwede authored May 29, 2022
1 parent aaa1faf commit 90a33e9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions soh/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ WARN := \
-funsigned-char \
-m32 -mhard-float -fno-stack-protector -fno-common -fno-zero-initialized-in-bss -fno-strict-aliasing -fno-inline-functions -fno-inline-small-functions -fno-toplevel-reorder -ffreestanding -fwrapv \

CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -fpermissive -no-pie -nostdlib -march=i386
CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -no-pie -nostdlib -march=i386
CXXFLAGS := $(WARN) -std=c++20 -D_GNU_SOURCE -fpermissive -no-pie -nostdlib -march=i386 -msse2 -mfpmath=sse
CFLAGS := $(WARN) -std=c99 -D_GNU_SOURCE -no-pie -nostdlib -march=i386 -msse2 -mfpmath=sse
LDFLAGS := -m32
CPPFLAGS := -MMD

Expand Down

0 comments on commit 90a33e9

Please sign in to comment.