Christian Schmitt wrote:

> After that genapts segfaulted during EGKK processing and right until now I
> have still not much of a clue what exactly is going on. I thought it was a
> problem with compiling TG against SG and not SG-CS (all from GIT). That
> showed to be wrong. Next guess was overoptimization (-O2 and -march), yet
> unsetting this and recompiling did not solve it either.

After recompiling simgear and terragear multiple times with different cflags 
i guess I found out what is the problem: the use of sse/sse2 instructions by 
gcc. Here is a diff output of the internal GCC options between a non-working 
config and a working one:

 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_4 1
 #define __DBL_DENORM_MIN__ 4.9406564584124654e-324
 #define __GCC_HAVE_SYNC_COMPARE_AND_SWAP_8 1
-#define __FLT_EVAL_METHOD__ 0
+#define __FLT_EVAL_METHOD__ 2
 #define __unix__ 1
 #define __DBL_MIN_10_EXP__ (-307)
 #define __FINITE_MATH_ONLY__ 0
@@ -51,7 +51,6 @@
 #define __DEC32_MIN__ 1E-95DF
 #define __DBL_MAX_EXP__ 1024
 #define __DEC128_EPSILON__ 1E-33DL
-#define __SSE2_MATH__ 1
 #define __LONG_LONG_MAX__ 9223372036854775807LL
 #define __SIZEOF_SIZE_T__ 4
 #define __SIZEOF_WINT_T__ 4
@@ -73,7 +72,6 @@
 #define __ELF__ 1
 #define __FLT_RADIX__ 2
 #define __LDBL_EPSILON__ 1.08420217248550443401e-19L
-#define __SSE_MATH__ 1
 #define __SIZEOF_PTRDIFF_T__ 4
 #define __DEC32_SUBNORMAL_MIN__ 0.000001E-95DF
 #define __FLT_HAS_QUIET_NAN__ 1

I encountered this problem on an Atom-based machine and an AMD Phenom 
machine. So, yes, I should probably change my cflags in this case. But given 
many distros that will ship this as binary package (compiled with SSE 
instructions enabled), the better way would be to fix it in the code.

Chris

------------------------------------------------------------------------------
Benefiting from Server Virtualization: Beyond Initial Workload 
Consolidation -- Increasing the use of server virtualization is a top
priority.Virtualization can reduce costs, simplify management, and improve 
application availability and disaster protection. Learn more about boosting 
the value of server virtualization. http://p.sf.net/sfu/vmware-sfdev2dev
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to