Date: Sun, 24 Jul 2005 20:35:40 -0300 From: "Alejandro Pulver" <alejandro@varnet.biz> To: "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org> Subject: ports/84024: [MAINTAINER UPDATE] games/exmars: change optimized cflags option to on by default Message-ID: <1122248140.0@phobos.mars.bsd> Resent-Message-ID: <200507242340.j6ONeI4l098908@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 84024 >Category: ports >Synopsis: [MAINTAINER UPDATE] games/exmars: change optimized cflags option to on by default >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Sun Jul 24 23:40:18 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Alejandro Pulver >Release: FreeBSD 5.4-RELEASE i386 >Organization: >Environment: >Description: * Change option OPTIMIZED_CFLAGS to ON. * Adjust optimizations for all architectures. * Use optimizations if GCC >= 3.X (OSVERSION >= 500035). >How-To-Repeat: >Fix: --- exmars.diff begins here --- diff -urN exmars.old/Makefile exmars/Makefile --- exmars.old/Makefile Thu Jul 21 18:10:14 2005 +++ exmars/Makefile Sun Jul 24 20:29:43 2005 @@ -1,5 +1,5 @@ # New ports collection makefile for: exmars -# Date created: 16 Jul 2005 +# Date created: 24 Jul 2005 # Whom: Alejandro Pulver <alejandro@varnet.biz> # # $FreeBSD: ports/games/exmars/Makefile,v 1.1 2005/07/18 21:12:39 pav Exp $ @@ -14,10 +14,11 @@ 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 @@ .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 @@ # 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> diff -urN exmars.old/pkg-descr exmars/pkg-descr --- exmars.old/pkg-descr Thu Jul 21 18:10:14 2005 +++ exmars/pkg-descr Fri Jul 22 12:40:40 2005 @@ -15,8 +15,8 @@ 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. - -Author: Martin Ankerl +* Ruby interface: finally a really fast mars can be used in a high level + programming language. (see test.rb for an example usage) WWW: http://martinus.geekisp.com/rublog.cgi/Projects/CoreWar/exMARS --- exmars.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1122248140.0>