diff options
-rw-r--r-- | math/blacs/Makefile | 13 | ||||
-rw-r--r-- | math/scalapack/Makefile | 16 | ||||
-rw-r--r-- | math/sdpara/Makefile | 16 |
3 files changed, 38 insertions, 7 deletions
diff --git a/math/blacs/Makefile b/math/blacs/Makefile index 85faf40c6c75..8524912102bc 100644 --- a/math/blacs/Makefile +++ b/math/blacs/Makefile @@ -41,6 +41,19 @@ F77EXTRAFLAGS= -w -fno-globals -fugly-complex USE_REINPLACE= yes DEBUG_LEVEL= 0 +.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 + pre-patch: (${CP} ${WRKSRC}/BMAKES/Bmake.MPI-LINUX ${WRKSRC}/Bmake.inc) post-patch: 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> diff --git a/math/sdpara/Makefile b/math/sdpara/Makefile index 268e6b0fa828..98a63f654fd4 100644 --- a/math/sdpara/Makefile +++ b/math/sdpara/Makefile @@ -35,12 +35,16 @@ PLIST_SUB+= PORTVERSION="${PORTVERSION}" .include <bsd.port.pre.mk> .if defined(WITH_OPTIMIZED_FLAGS) -FFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -CXXFLAGS+= -O3 -ffast-math -finline-functions -fomit-frame-pointer -funroll-loops -fexpensive-optimizations -malign-double -Wno-multichar -.if (${ARCH} == "i386") -FFLAGS+= -mfancy-math-387 -mpreferred-stack-boundary=3 -CXXFLAGS+= -mfancy-math-387 -mpreferred-stack-boundary=3 -.endif # i386 +.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: |