1
0
Fork 0

Marc Frajola:

Here is one patch that to make FlightGear run without floating point
exceptions on FreeBSD.  Apparently, if we do not ignore floating point
exceptions per this patch, there is some occasional condition where the
nvidia driver is involved in delivering spurious floating point exceptions
to the fgfs process, causing it to core-dump occasionally without the patch.

With only this patch, FlightGear will compile and run properly on
FreeBSD 6.X as long as the nvidia accelerated driver is installed,
modulo proper switches to the SimGear and FlightGear configure script
executions.

Again, kudos to your team for the great work on the big release
push; it is super to see things come together like this!
This commit is contained in:
curt 2006-03-28 21:18:32 +00:00
parent d33c748485
commit 6d17cb8002

View file

@ -28,6 +28,8 @@
#if defined(__linux__) && defined(__i386__) #if defined(__linux__) && defined(__i386__)
# include <fpu_control.h> # include <fpu_control.h>
# include <signal.h> # include <signal.h>
#elif defined(__FreeBSD__)
# include <signal.h>
#endif #endif
#include <errno.h> #include <errno.h>
@ -147,9 +149,12 @@ int main ( int argc, char **argv ) {
_bootstrap_OSInit = 0; _bootstrap_OSInit = 0;
// Enable floating-point exceptions for Linux/x86
#if defined(__linux__) && defined(__i386__) #if defined(__linux__) && defined(__i386__)
// Enable floating-point exceptions for Linux/x86
initFPE(); initFPE();
#elif defined(__FreeBSD__)
// Ignore floating-point exceptions on FreeBSD
signal(SIGFPE, SIG_IGN);
#endif #endif
#if defined(sgi) #if defined(sgi)