summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorJonathan Gray <jsg@jsg.id.au>2013-05-05 11:56:24 +1000
committerTim Angus <tim@ngus.net>2013-05-31 23:10:47 +0100
commit4f729277f7466a70898ba8fa92e67fbdc0be86b5 (patch)
treee971282efb71653439848d7b813ccd7c70aaaa3e /Makefile
parentafe29c3761945c9e851669430c9d2bca8d6feb92 (diff)
sync the OpenBSD cflags with Linux
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile40
1 files changed, 39 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 5107ed28..679ffe64 100644
--- a/Makefile
+++ b/Makefile
@@ -684,9 +684,47 @@ else # ifeq freebsd
ifeq ($(PLATFORM),openbsd)
BASE_CFLAGS = -Wall -fno-strict-aliasing -Wimplicit -Wstrict-prototypes \
- -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
+ -pipe -DUSE_ICON -DMAP_ANONYMOUS=MAP_ANON
CLIENT_CFLAGS += $(SDL_CFLAGS)
+ OPTIMIZEVM = -O3 -funroll-loops -fomit-frame-pointer
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+
+ ifeq ($(ARCH),x86_64)
+ OPTIMIZEVM = -O3 -fomit-frame-pointer -funroll-loops \
+ -falign-loops=2 -falign-jumps=2 -falign-functions=2 \
+ -fstrength-reduce
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+ HAVE_VM_COMPILED = true
+ else
+ ifeq ($(ARCH),x86)
+ OPTIMIZEVM = -O3 -march=i586 -fomit-frame-pointer \
+ -funroll-loops -falign-loops=2 -falign-jumps=2 \
+ -falign-functions=2 -fstrength-reduce
+ OPTIMIZE = $(OPTIMIZEVM) -ffast-math
+ HAVE_VM_COMPILED=true
+ else
+ ifeq ($(ARCH),ppc)
+ BASE_CFLAGS += -maltivec
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),ppc64)
+ BASE_CFLAGS += -maltivec
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),sparc64)
+ OPTIMIZE += -mtune=ultrasparc3 -mv8plus
+ OPTIMIZEVM += -mtune=ultrasparc3 -mv8plus
+ HAVE_VM_COMPILED=true
+ endif
+ ifeq ($(ARCH),alpha)
+ # According to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=410555
+ # -ffast-math will cause the client to die with SIGFPE on Alpha
+ OPTIMIZE = $(OPTIMIZEVM)
+ endif
+ endif
+ endif
+
ifeq ($(USE_CURL),1)
CLIENT_CFLAGS += $(CURL_CFLAGS)
USE_CURL_DLOPEN=0