The test_cppbind issue appears to be caused by using a plain char
(unsigned on affected platforms) to hold -1: it can be triggered on
amd64 by the -funsigned-char compiler flag, and is there fixed by the
attached patch.
I can't reproduce the binobj bug, but enabling -fno-strict-aliasing may
fix it, as it uses a lot of casts that are undefined without it (mostly
for endianness reversal, which fits with the error only appearing on
big-endian machines).
diff -up flightgear_source/simgear-2.10.0/simgear/nasal/data.h_orig flightgear_source/simgear-2.10.0/simgear/nasal/data.h
--- flightgear_source/simgear-2.10.0/simgear/nasal/data.h_orig 2013-09-09 22:40:33.107742921 +0100
+++ flightgear_source/simgear-2.10.0/simgear/nasal/data.h 2013-09-09 22:06:43.595678127 +0100
@@ -96,7 +96,7 @@ struct naObj {
#define MAX_STR_EMBLEN 15
struct naStr {
GC_HEADER;
- char emblen; /* [0-15], or -1 to indicate "not embedded" */
+ signed char emblen; /* [0-15], or -1 to indicate "not embedded" */
unsigned int hashcode;
union {
unsigned char buf[16];
diff -up debian/rules_orig debian/rules
--- debian/rules_orig 2013-09-12 23:01:10.938897982 +0100
+++ debian/rules 2013-09-12 23:00:56.358898413 +0100
@@ -6,8 +6,8 @@
#http://wiki.debian.org/Hardening#Notes_for_packages_using_CMake
CPPFLAGS:=$(shell dpkg-buildflags --get CPPFLAGS)
-CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS)
-CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS)
+CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) $(CPPFLAGS) -fno-strict-aliasing
+CXXFLAGS:=$(shell dpkg-buildflags --get CXXFLAGS) $(CPPFLAGS) -fno-strict-aliasing
LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS)
CMAKE_FLAGS = \