Skip to content

Commit

Permalink
* Juggled CFLAGS a bit so that -fno-strict-aliasing is always on
Browse files Browse the repository at this point in the history
  • Loading branch information
timangus committed Nov 3, 2005
1 parent 2f33fe1 commit 2e3a08e
Showing 1 changed file with 15 additions and 17 deletions.
32 changes: 15 additions & 17 deletions code/unix/Makefile
Expand Up @@ -111,7 +111,7 @@ ifeq ($(PLATFORM),linux)
endif
endif

BASE_CFLAGS = -pipe -Wall -Wimplicit -Wstrict-prototypes
BASE_CFLAGS = -pipe -Wall -fno-strict-aliasing

ifeq ($(strip $(USE_SDL)),true)
BASE_CFLAGS += -DUSE_SDL_VIDEO=1 -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags)
Expand All @@ -120,20 +120,19 @@ ifeq ($(PLATFORM),linux)
GL_CFLAGS = -I/usr/X11R6/include
endif

OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer \
-fno-strict-aliasing
OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer

ifeq ($(ARCH),x86_64)
OPTIMIZE = -O3 -fomit-frame-pointer -ffast-math -falign-loops=2 \
-falign-jumps=2 -falign-functions=2 -fstrength-reduce \
-fno-strict-aliasing
OPTIMIZE = -O3 -fomit-frame-pointer -ffast-math -funroll-loops \
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-fstrength-reduce
# experimental x86_64 jit compiler! you need as
#HAVE_VM_COMPILED = true
else
ifeq ($(ARCH),i386)
OPTIMIZE = -O3 -march=i686 -fomit-frame-pointer -ffast-math \
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-fno-strict-aliasing -fstrength-reduce
-funroll-loops -falign-loops=2 -falign-jumps=2 \
-falign-functions=2 -fstrength-reduce
HAVE_VM_COMPILED=true
else
ifeq ($(ARCH),ppc)
Expand Down Expand Up @@ -211,15 +210,15 @@ ifeq ($(PLATFORM),mingw32)
ARCH=x86
endif

BASE_CFLAGS = -pipe -Wall -Wimplicit -Wstrict-prototypes
BASE_CFLAGS = -pipe -Wall -fno-strict-aliasing

DX_CFLAGS = -I$(DXSDK_DIR)/Include

GL_CFLAGS =
MINGW_CFLAGS = -DDONT_TYPEDEF_INT32

OPTIMIZE = -O3 -march=i686 -fomit-frame-pointer -ffast-math -falign-loops=2 \
-falign-jumps=2 -falign-functions=2 -fno-strict-aliasing -fstrength-reduce
-funroll-loops -falign-jumps=2 -falign-functions=2 -fstrength-reduce

DEBUG_CFLAGS=$(BASE_CFLAGS) -g -O0

Expand Down Expand Up @@ -272,7 +271,7 @@ ifeq ($(PLATFORM),freebsd)
endif #alpha test


BASE_CFLAGS = -pipe -Wall
BASE_CFLAGS = -pipe -Wall -fno-strict-aliasing

GL_CFLAGS = -I/usr/X11R6/include

Expand All @@ -289,7 +288,7 @@ ifeq ($(PLATFORM),freebsd)
RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O3 -mtune=pentiumpro \
-march=pentium -fomit-frame-pointer -pipe -ffast-math \
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-fno-strict-aliasing -fstrength-reduce
-funroll-loops -fstrength-reduce
else
BASE_CFLAGS += -DNO_VM_COMPILED
endif
Expand Down Expand Up @@ -381,7 +380,7 @@ ifeq ($(PLATFORM),SunOS)
endif


BASE_CFLAGS = -pipe -Wall -Wimplicit -Wstrict-prototypes
BASE_CFLAGS = -pipe -Wall -fno-strict-aliasing

ifeq ($(strip $(USE_SDL)),true)
BASE_CFLAGS += -DUSE_SDL_SOUND=1 $(shell sdl-config --cflags)
Expand All @@ -390,19 +389,18 @@ ifeq ($(PLATFORM),SunOS)
GL_CFLAGS = -I/usr/openwin/include
endif

OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer \
-fno-strict-aliasing
OPTIMIZE = -O3 -ffast-math -funroll-loops -fomit-frame-pointer
BASE_CFLAGS += -DNO_VM_COMPILED

ifeq ($(ARCH),sparc)
OPTIMIZE = -O3 -fomit-frame-pointer -ffast-math -falign-loops=2 \
-falign-jumps=2 -falign-functions=2 -fstrength-reduce \
-fno-strict-aliasing
-funroll-loops
else
ifeq ($(ARCH),i386)
OPTIMIZE = -O3 -march=i686 -fomit-frame-pointer -ffast-math \
-falign-loops=2 -falign-jumps=2 -falign-functions=2 \
-fno-strict-aliasing -fstrength-reduce
-funroll-loops -fstrength-reduce
endif
endif

Expand Down

0 comments on commit 2e3a08e

Please sign in to comment.