diff options
author | maho <maho@FreeBSD.org> | 2005-07-04 12:59:27 +0800 |
---|---|---|
committer | maho <maho@FreeBSD.org> | 2005-07-04 12:59:27 +0800 |
commit | 697b48d614a8938f5f86573e4639a975ec163629 (patch) | |
tree | 01a0f33d8233d9f58bc33fce52064eac5bdc79c8 /math/scalapack | |
parent | 53c13ca1e27d1ae5d64d7dcbf4eb5442916c6d68 (diff) | |
download | freebsd-ports-gnome-697b48d614a8938f5f86573e4639a975ec163629.tar.gz freebsd-ports-gnome-697b48d614a8938f5f86573e4639a975ec163629.tar.zst freebsd-ports-gnome-697b48d614a8938f5f86573e4639a975ec163629.zip |
Re-organize optimization flags so that runs much more faster
Diffstat (limited to 'math/scalapack')
-rw-r--r-- | math/scalapack/Makefile | 16 |
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> |