* Change option OPTIMIZED_CFLAGS to ON.
* Adjust optimizations for all architectures. * Use optimizations if GCC >= 3.X (OSVERSION >= 500035). * Note how to install Ruby interface. PR: ports/84024 Submitted by: Alejandro Pulver (maintainer)
This commit is contained in:
parent
7737418647
commit
fe34be1887
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=140043
@ -14,10 +14,11 @@ MAINTAINER= alejandro@varnet.biz
|
||||
COMMENT= Memory Array Redcode Simulator, just like exhaust and pMARS
|
||||
|
||||
USE_REINPLACE= yes
|
||||
REINPLACE_ARGS= -i ''
|
||||
|
||||
ALL_TARGET= ${PORTNAME}
|
||||
|
||||
OPTIONS= OPTIMIZED_CFLAGS "Enable compilation optimizations" off
|
||||
OPTIONS= OPTIMIZED_CFLAGS "Use optimized cflags (for FreeBSD >= 5.X)" on
|
||||
|
||||
do-install:
|
||||
# Program
|
||||
@ -30,6 +31,22 @@ do-install:
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
# Adjust optimization flags for all architectures
|
||||
.if ${ARCH} != "i386"
|
||||
BADCFLAGS+= -malign-double
|
||||
.endif
|
||||
|
||||
.if ${ARCH} != "amd64" && ${ARCH} != "ia64"
|
||||
BADCFLAGS+= -maccumulate-outgoing-args \
|
||||
-minline-all-stringops \
|
||||
-mno-align-stringops
|
||||
.endif
|
||||
|
||||
.if ${ARCH} == "alpha"
|
||||
BADCFLAGS+= -ffast-math \
|
||||
-fprefetch-loop-arrays
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
# Fix bench.sh
|
||||
@${REINPLACE_CMD} -e 's|pmars|pmars-server| ; \
|
||||
@ -38,8 +55,13 @@ post-patch:
|
||||
|
||||
# Enable/disable compilation optimizations
|
||||
@${REINPLACE_CMD} -e 's|\($${OPT}\)|${CFLAGS} \1|' ${WRKSRC}/${MAKEFILE}
|
||||
.if !defined(WITH_OPTIMIZED_CFLAGS)
|
||||
.if !defined(WITH_OPTIMIZED_CFLAGS) || ${OSVERSION} < 500035
|
||||
@${REINPLACE_CMD} -e 's|$${OPT}||' ${WRKSRC}/${MAKEFILE}
|
||||
.endif
|
||||
|
||||
# Adjust optimization flags for all architectures
|
||||
.for f in ${BADCFLAGS}
|
||||
@${REINPLACE_CMD} -e 's|${f}||g' ${WRKSRC}/${MAKEFILE}
|
||||
.endfor
|
||||
|
||||
.include <bsd.port.post.mk>
|
||||
|
@ -15,6 +15,7 @@ The resulting program has the following main features:
|
||||
options).
|
||||
* Rewritten the code in a more object oriented way, which allows different
|
||||
Mars at the same time in the same program, it should also be thread save.
|
||||
* To get Ruby interface you can install games/ruby-exmars port.
|
||||
|
||||
Author: Martin Ankerl
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user