aboutsummaryrefslogtreecommitdiff
path: root/math/scalapack
diff options
context:
space:
mode:
authorMaho Nakata <maho@FreeBSD.org>2005-07-04 04:59:27 +0000
committerMaho Nakata <maho@FreeBSD.org>2005-07-04 04:59:27 +0000
commit4746a2a816049e63af763d3d549e2836e8eb29d4 (patch)
tree8c8a1d9d09f8eb374afff651655f6a7dd8305d41 /math/scalapack
parent314c3abb8697d639d49954eade9465f687e9c95e (diff)
downloadports-4746a2a816049e63af763d3d549e2836e8eb29d4.tar.gz
ports-4746a2a816049e63af763d3d549e2836e8eb29d4.zip
Re-organize optimization flags so that runs much more faster
Notes
Notes: svn path=/head/; revision=138437
Diffstat (limited to 'math/scalapack')
-rw-r--r--math/scalapack/Makefile16
1 files changed, 15 insertions, 1 deletions
diff --git a/math/scalapack/Makefile b/math/scalapack/Makefile
index af509c033aa2..6197e6986659 100644
--- a/math/scalapack/Makefile
+++ b/math/scalapack/Makefile
@@ -41,6 +41,20 @@ PKGMESSAGE= ${WRKDIR}/pkg-message
.include "files/manpages"
+.include <bsd.port.pre.mk>
+
+.if defined(WITH_OPTIMIZED_FLAGS)
+.if ${ARCH} == "amd64"
+FFLAGS+= -pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time
+CFLAGS+= -pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time
+.else if ${ARCH} == "i386"
+FFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -mcpu=i686 -march=i686 -mfancy-math-387 -mpreferred-stack-boundary=3
+CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -mcpu=i686 -march=i686 -mfancy-math-387 -mpreferred-stack-boundary=3
+.else
+FFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -Wno-multichar
+CFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -Wno-multichar
+.endif
+.endif
post-patch:
${REINPLACE_CMD} -e 's,@WRKSRC@,${WRKSRC},g ; s,@PREFIX@,${PREFIX},g ; s,@CC@,${CC},g ; s,@CFLAGS@,${CFLAGS},g ; s,@F77@,${F77},g ; s,@FFLAGS@,${FFLAGS},g ; s,@F77EXTRAFLAGS@,${F77EXTRAFLAGS},g ; s,^ARCH *.= ar,ARCMD = ar,' ${WRKSRC}/SLmake.inc
.for mkf in ${ARCH2FIX}
@@ -86,4 +100,4 @@ post-install:
> ${PKGMESSAGE}
@${CAT} ${PKGMESSAGE}
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>