pmmp / PHP-Binaries

Compile scripts used to build PHP for PocketMine-MP on multiple platforms
117 stars 169 forks source link

Disable math optimisations provided by -ffast-math for SQLite3 #99

Closed dktapps closed 4 years ago

dktapps commented 4 years ago

SQLite3 usually chokes if -ffast-math is provided, but the build script goes out of its way to provide almost all of the flags that would be set if -ffast-math were provided, some of which break SQLite3 at runtime.

The most obvious solution would be to build SQLite3 without -ffast-math on its own, and then enable -ffast-math for everything else.

TheNewHEROBRINEX commented 4 years ago

In addition, the flag -ffinite-math-only causes an assertion in SQLite3 to fail at runtime if debugging is enabled.

dktapps commented 4 years ago

Versions of SQLite3 3.29 and above don't have this bug. PHP bundles 3.28, so now we build the latest version separately in the compile script. Fixed by 41d61c720131d3200715e34f05d128d0376b7952.