summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorDan Nicholson <dbn.lists@gmail.com>2007-11-01 06:01:53 -0700
committerDan Nicholson <dbn.lists@gmail.com>2007-11-01 06:03:31 -0700
commit01b18abf93c1999397563e75fe1bfbbe0e080ae9 (patch)
tree65e03b995e094bf8bbb4d0a5b5c2e405a4ae2d78 /configs
parentee793281b221415f794af6aadaa9764023612e0b (diff)
Add -fno-strict-aliasing workaround for all GCC targets
Use a GCC option to work around aliasing bugs. See commit 013dbcd for more details.
Diffstat (limited to 'configs')
-rw-r--r--configs/aix-gcc4
-rw-r--r--configs/beos4
-rw-r--r--configs/bluegene-osmesa4
-rw-r--r--configs/darwin4
-rw-r--r--configs/darwin-static4
-rw-r--r--configs/darwin-static-x86ppc4
-rw-r--r--configs/darwin-x86ppc4
-rw-r--r--configs/freebsd4
-rw-r--r--configs/freebsd-dri4
-rw-r--r--configs/hpux10-gcc4
-rw-r--r--configs/netbsd3
-rw-r--r--configs/openbsd4
-rw-r--r--configs/solaris-x86-gcc4
-rw-r--r--configs/solaris-x86-gcc-static4
-rw-r--r--configs/sunos4-gcc4
-rw-r--r--configs/sunos5-gcc4
-rw-r--r--configs/sunos5-v9-cc-g++3
-rw-r--r--configs/ultrix-gcc4
18 files changed, 70 insertions, 0 deletions
diff --git a/configs/aix-gcc b/configs/aix-gcc
index 81467082a7..3b964f351f 100644
--- a/configs/aix-gcc
+++ b/configs/aix-gcc
@@ -11,6 +11,10 @@ CXX = g++
CFLAGS = -O2 -DAIXV3
CXXFLAGS = -O2 -DAIXV3
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
MKLIB_OPTIONS = -arch aix-gcc
GL_LIB_DEPS = -lX11 -lXext -lm
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
diff --git a/configs/beos b/configs/beos
index f07973d0c7..9974b7b220 100644
--- a/configs/beos
+++ b/configs/beos
@@ -39,6 +39,10 @@ ifeq ($(CPU), x86)
CXXFLAGS = $(CFLAGS)
+ # Work around aliasing bugs - developers should comment this out
+ CFLAGS += -fno-strict-aliasing
+ CXXFLAGS += -fno-strict-aliasing
+
LDFLAGS += -Xlinker
ifdef DEBUG
diff --git a/configs/bluegene-osmesa b/configs/bluegene-osmesa
index 02c69e6c67..d22454fa2d 100644
--- a/configs/bluegene-osmesa
+++ b/configs/bluegene-osmesa
@@ -13,6 +13,10 @@ CXX = /bgl/BlueLight/ppcfloor/blrts-gnu/bin/powerpc-bgl-blrts-gnu-g++
CFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURCE
CXXFLAGS = -O3 -ansi -pedantic -fPIC -ffast-math -D_POSIX_SOURCE -D_POSIX_C_SOURCE=199309L -D_SVID_SOURCE -D_BSD_SOURC
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
MKLIB_OPTIONS = -static
OSMESA_LIB_NAME = libOSMesa.a
diff --git a/configs/darwin b/configs/darwin
index 7826ecc605..76f3f74d4e 100644
--- a/configs/darwin
+++ b/configs/darwin
@@ -10,6 +10,10 @@ CXX = cc
CFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
CXXFLAGS = -I/usr/X11R6/include -O3 -fPIC -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
# Library names (actual file names)
GL_LIB_NAME = libGL.dylib
GLU_LIB_NAME = libGLU.dylib
diff --git a/configs/darwin-static b/configs/darwin-static
index 3eb6581fb0..9893d159bd 100644
--- a/configs/darwin-static
+++ b/configs/darwin-static
@@ -9,6 +9,10 @@ CFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpen
CXXFLAGS = -I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
MKLIB_OPTIONS = -static
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/darwin-static-x86ppc b/configs/darwin-static-x86ppc
index 844a1d2ead..7e97474dfe 100644
--- a/configs/darwin-static-x86ppc
+++ b/configs/darwin-static-x86ppc
@@ -11,6 +11,10 @@ CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
-I/usr/X11R6/include -O3 -fno-common -ffast-math -funroll-loops -fexpensive-optimizations -no-cpp-precomp -dynamic -Ddarwin
MKLIB_OPTIONS = -static -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
# Library names (actual file names)
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
diff --git a/configs/darwin-x86ppc b/configs/darwin-x86ppc
index 13172327a7..c87b206f92 100644
--- a/configs/darwin-x86ppc
+++ b/configs/darwin-x86ppc
@@ -14,6 +14,10 @@ CXXFLAGS = -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
MKLIB_OPTIONS = -archopt "-isysroot /Developer/SDKs/MacOSX10.4u.sdk"
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
# Library names (actual file names)
GL_LIB_NAME = libGL.dylib
GLU_LIB_NAME = libGLU.dylib
diff --git a/configs/freebsd b/configs/freebsd
index 34440eb323..976ddd19e6 100644
--- a/configs/freebsd
+++ b/configs/freebsd
@@ -23,5 +23,9 @@ CXXFLAGS += $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) $(X11_INCLUDES)
GLUT_CFLAGS = -fexceptions
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
EXTRA_LIB_PATH = -L/usr/local/lib
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) $(EXTRA_LIB_PATH) -l$(GLUT_LIB) -l$(GLU_LIB) -l$(GL_LIB) -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/freebsd-dri b/configs/freebsd-dri
index 0f52b9149b..9d9215483d 100644
--- a/configs/freebsd-dri
+++ b/configs/freebsd-dri
@@ -22,6 +22,10 @@ CFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) -Wmissing-prototypes -std=c99 -
CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(DEFINES) -Wall -ansi -pedantic $(ASM_FLAGS) $(X11_INCLUDES)
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
ASM_SOURCES =
# Library/program dependencies
diff --git a/configs/hpux10-gcc b/configs/hpux10-gcc
index 10a9ad5cd5..be396f8549 100644
--- a/configs/hpux10-gcc
+++ b/configs/hpux10-gcc
@@ -12,5 +12,9 @@ CFLAGS = -ansi -O3 -D_HPUX_SOURCE -I/usr/include/X11R6 -I/usr/contrib/X11R6/incl
CXXFLAGS = -ansi -O3 -D_HPUX_SOURCE
GLUT_CFLAGS = -fexceptions
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/lib/X11R6 -L/usr/contrib/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
diff --git a/configs/netbsd b/configs/netbsd
index f5a61a8957..aec4569507 100644
--- a/configs/netbsd
+++ b/configs/netbsd
@@ -12,3 +12,6 @@ CXXFLAGS = -O2 -fPIC
GLUT_CFLAGS = -fexceptions
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/X11R6/lib -lXext -lXmu -lXi -lX11 -lm
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
diff --git a/configs/openbsd b/configs/openbsd
index 6ad6e2bd3d..bd19fa84d3 100644
--- a/configs/openbsd
+++ b/configs/openbsd
@@ -10,6 +10,10 @@ CXX = g++
CFLAGS = -O2 -fPIC -I/usr/X11R6/include -DUSE_XSHM -DHZ=100
CXXFLAGS = -O2 -fPIC -I/usr/X11R6/include -DHZ=100
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
GL_LIB_DEPS = -L/usr/X11R6/lib -lX11 -lXext -lm
OSMESA_LIB_DEPS = -lm
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB)
diff --git a/configs/solaris-x86-gcc b/configs/solaris-x86-gcc
index 5ec7237f99..616bfdfd77 100644
--- a/configs/solaris-x86-gcc
+++ b/configs/solaris-x86-gcc
@@ -11,6 +11,10 @@ CFLAGS = -O3 -march=i486 -fPIC -I/usr/openwin/include -DUSE_XSHM
CXXFLAGS = -O3 -march=i486 -fPIC
GLUT_CFLAGS = -fexceptions
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
diff --git a/configs/solaris-x86-gcc-static b/configs/solaris-x86-gcc-static
index be02735f02..4850284a59 100644
--- a/configs/solaris-x86-gcc-static
+++ b/configs/solaris-x86-gcc-static
@@ -12,6 +12,10 @@ CXXFLAGS = -O3 -march=i486 -fPIC
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
GL_LIB_DEPS = -L/usr/openwin/lib -lX11 -lXext -lm -lpthread
GLU_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GL_LIB) -lm
GLUT_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -l$(GLU_LIB) -l$(GL_LIB) -L/usr/openwin/lib -lX11 -lXmu -lXt -lXi -lm
diff --git a/configs/sunos4-gcc b/configs/sunos4-gcc
index 2022dd7e8e..0942291589 100644
--- a/configs/sunos4-gcc
+++ b/configs/sunos4-gcc
@@ -11,5 +11,9 @@ CFLAGS = -fPIC -O3 -I/usr/openwin/include -I/usr/include/X11R5 -I/usr/include/X1
CXXFLAGS = -fPIC -O3 -I/usr/openwin/include -DSUNOS4
GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
APP_LIB_DEPS = -L$(TOP)/$(LIB_DIR) -L/usr/openwin/lib -lX11 -lXext -lXmu -lXi -lm
diff --git a/configs/sunos5-gcc b/configs/sunos5-gcc
index 77b293c545..c5e443fc75 100644
--- a/configs/sunos5-gcc
+++ b/configs/sunos5-gcc
@@ -28,6 +28,10 @@ CXXFLAGS = $(WARN_FLAGS) $(OPT_FLAGS) $(PIC_FLAGS) $(ARCH_FLAGS) $(DEFINES) \
GLUT_CFLAGS = -fexceptions -DSOLARIS_2_4_BUG
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
# Library/program dependencies
EXTRA_LIB_PATH=-L/usr/openwin/lib
diff --git a/configs/sunos5-v9-cc-g++ b/configs/sunos5-v9-cc-g++
index 37b775cc08..8656251e3b 100644
--- a/configs/sunos5-v9-cc-g++
+++ b/configs/sunos5-v9-cc-g++
@@ -21,6 +21,9 @@ CXX_ARCH_FLAGS = -m64
CXXFLAGS = $(CXX_WARN_FLAGS) $(CXX_OPT_FLAGS) $(CXX_PIC_FLAGS) $(CXX_ARCH_FLAGS) $(DEFINES) \
-I/usr/openwin/include
+# Work around aliasing bugs - developers should comment this out
+CXXFLAGS += -fno-strict-aliasing
+
CFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DUSE_XSHM -DPTHREADS
#CXXFLAGS = -xarch=v9 -KPIC -O -I/usr/openwin/include -I/usr/dt/include -DPTHREADS
GLUT_CFLAGS = -DSOLARIS_2_4_BUG
diff --git a/configs/ultrix-gcc b/configs/ultrix-gcc
index 5c0f22d7ae..455b6932d3 100644
--- a/configs/ultrix-gcc
+++ b/configs/ultrix-gcc
@@ -12,6 +12,10 @@ CXXFLAGS = -pedantic -O2
GLUT_CFLAGS = -fexceptions
MKLIB_OPTIONS = -static
+# Work around aliasing bugs - developers should comment this out
+CFLAGS += -fno-strict-aliasing
+CXXFLAGS += -fno-strict-aliasing
+
GL_LIB_NAME = libGL.a
GLU_LIB_NAME = libGLU.a
GLUT_LIB_NAME = libglut.a