aboutsummaryrefslogtreecommitdiff
path: root/games/mvdsv
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2016-01-21 15:47:48 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2016-01-21 15:47:48 +0000
commit18f6d6aa9ee1425325a6d2c8a334438cb2d60725 (patch)
treed061e4d883d42d7c3045bccd4d5bc0d9a815e34d /games/mvdsv
parentfdabbbfcb3722052f03866e0839311bcf254094f (diff)
downloadports-18f6d6aa9ee1425325a6d2c8a334438cb2d60725.tar.gz
ports-18f6d6aa9ee1425325a6d2c8a334438cb2d60725.zip
Don't build with `-ffast-math -funroll-loops' flags by default: contemporary
compilers should be smart enough to generate good code of of the box without potentially unsafe fast-math, and remove standard `-O2 -fno-strict-aliasing' options from the "optimized flags".
Notes
Notes: svn path=/head/; revision=406864
Diffstat (limited to 'games/mvdsv')
-rw-r--r--games/mvdsv/Makefile2
-rw-r--r--games/mvdsv/files/patch-build_make_Makefile.BSD17
-rw-r--r--games/mvdsv/files/patch-tools_qwdtools_source_Makefile.BSD17
3 files changed, 28 insertions, 8 deletions
diff --git a/games/mvdsv/Makefile b/games/mvdsv/Makefile
index bc5eeb64f285..77dc2425abcc 100644
--- a/games/mvdsv/Makefile
+++ b/games/mvdsv/Makefile
@@ -21,6 +21,7 @@ MAKE_ARGS= UNAME=${OPSYS}
PLIST_FILES= bin/${PORTNAME}
+OPTIONS_DEFINE= OPTIMIZED_CFLAGS
OPTIONS_DEFINE_i386= ASM
OPTIONS_DEFINE_amd64= ASM
OPTIONS_DEFAULT_i386= ASM
@@ -35,6 +36,7 @@ KQUEUE_DESC= Kqueue support
KQUEUE_MAKE_ARGS_OFF= -DNOKQUEUE
ASM_MAKE_ARGS_OFF= -DWITHOUT_X86_ASM
+OPTIMIZED_CFLAGS_MAKE_ARGS= -DWITH_OPTIMIZED_CFLAGS
post-patch:
@${REINPLACE_CMD} -e 's,^inline ,,' ${WRKSRC}/src/sv_sys_unix.c
diff --git a/games/mvdsv/files/patch-build_make_Makefile.BSD b/games/mvdsv/files/patch-build_make_Makefile.BSD
index 8abf5b0aad1b..4c83de5ec99b 100644
--- a/games/mvdsv/files/patch-build_make_Makefile.BSD
+++ b/games/mvdsv/files/patch-build_make_Makefile.BSD
@@ -1,6 +1,6 @@
--- build/make/Makefile.BSD.orig 2011-10-06 07:24:17 UTC
+++ build/make/Makefile.BSD
-@@ -17,7 +17,7 @@ SV_DIR = ../../src
+@@ -17,17 +17,15 @@ SV_DIR = ../../src
# for gcc its like: make mvdsv FORCE32BITFLAGS=-m32
# configure script add FORCE32BITFLAGS=-m32
@@ -9,7 +9,18 @@
.if !defined(NOKQUEUE) && (${UNAME} == "FreeBSD" || ${UNAME} == "DragonFly")
DO_CFLAGS += -DKQUEUE
-@@ -94,7 +94,7 @@ SV_OBJS = \
+ .endif
+
+-WITH_OPTIMIZED_CFLAGS = YES
+-
+ USE_ASM=-Did386
+ .if defined(WITH_OPTIMIZED_CFLAGS)
+-DO_CFLAGS += -O2 -fno-strict-aliasing -ffast-math -funroll-loops
++DO_CFLAGS += -ffast-math -funroll-loops
+ . if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM)
+ ASM=${USE_ASM}
+ DO_CFLAGS += ${ASM}
+@@ -94,7 +92,7 @@ SV_OBJS = \
${SV_DIR}/pcre/get.o \
${SV_DIR}/pcre/pcre.o
@@ -18,7 +29,7 @@
SV_ASM_OBJS = \
${SV_DIR}/bothtoolsa.o \
${SV_DIR}/math.o
-@@ -105,10 +105,10 @@ SV_ASM_OBJS = \
+@@ -105,10 +103,10 @@ SV_ASM_OBJS = \
#############################################################################
.c.o:
diff --git a/games/mvdsv/files/patch-tools_qwdtools_source_Makefile.BSD b/games/mvdsv/files/patch-tools_qwdtools_source_Makefile.BSD
index a2a3cacdabf3..fd21fadbaee4 100644
--- a/games/mvdsv/files/patch-tools_qwdtools_source_Makefile.BSD
+++ b/games/mvdsv/files/patch-tools_qwdtools_source_Makefile.BSD
@@ -1,6 +1,6 @@
--- tools/qwdtools/source/Makefile.BSD.orig 2011-10-06 07:24:17 UTC
+++ tools/qwdtools/source/Makefile.BSD
-@@ -12,18 +12,14 @@
+@@ -12,24 +12,18 @@
#
MAINDIR = ../../..
@@ -17,11 +17,18 @@
-.if !defined(NOKQUEUE) && (${UNAME} == "FreeBSD" || ${UNAME} == "DragonFly")
-DO_CFLAGS += -DKQUEUE
-.endif
+-
+-WITH_OPTIMIZED_CFLAGS = YES
+DO_CFLAGS = ${CFLAGS} -Wall -pipe -pthread -funsigned-char -DUSE_PR2 ${FORCE32BITFLAGS}
- WITH_OPTIMIZED_CFLAGS = YES
-
-@@ -60,7 +56,7 @@ QWDTOOLS_OBJS = \
+ USE_ASM=-Did386
+ .if defined(WITH_OPTIMIZED_CFLAGS)
+-DO_CFLAGS += -O2 -fno-strict-aliasing -ffast-math -funroll-loops
++DO_CFLAGS += -ffast-math -funroll-loops
+ . if ${MACHINE_ARCH} == "i386" && !defined(WITHOUT_X86_ASM)
+ ASM=${USE_ASM}
+ DO_CFLAGS += ${ASM}
+@@ -60,7 +54,7 @@ QWDTOOLS_OBJS = \
${QWDTOOLS_DIR}/sync.o \
${QWDTOOLS_DIR}/tools.o
@@ -30,7 +37,7 @@
QWDTOOLS_ASM_OBJS = \
${SV_DIR}/bothtoolsa.o
.endif
-@@ -70,10 +66,10 @@ QWDTOOLS_ASM_OBJS = \
+@@ -70,10 +64,10 @@ QWDTOOLS_ASM_OBJS = \
#############################################################################
.c.o: