Date: Sat, 8 Apr 2006 19:06:22 GMT From: "Pedro F. Giffuni" <giffunip@asme.org> To: freebsd-gnats-submit@FreeBSD.org Subject: ports/95521: math/blas : add optimized flags option Message-ID: <200604081906.k38J6MmV068835@www.freebsd.org> Resent-Message-ID: <200604081910.k38JADNA019646@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 95521 >Category: ports >Synopsis: math/blas : add optimized flags option >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Apr 08 19:10:13 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Pedro F. Giffuni >Release: 6.0-release amd64 >Organization: >Environment: FreeBSD etoile.cable.net.co 6.0-RELEASE FreeBSD 6.0-RELEASE #12: Sat Feb 11 13:45:47 COT 2006 root@etoile.cable.net.co:/usr/src/sys/amd64/compile/DIMENSION amd64 >Description: Modern compilers know tricks, and in blas' case it's a good idea to have the option to try them. That said, running the lapack tests didn't show major performance differences. >How-To-Repeat: >Fix: diff -ruN blas.orig/Makefile blas/Makefile --- blas.orig/Makefile Fri Apr 7 12:17:22 2006 +++ blas/Makefile Sat Apr 8 12:06:45 2006 @@ -17,10 +17,15 @@ MAINTAINER= ports@FreeBSD.org COMMENT= Basic Linear Algebra, level 1, 2, and 3 +.if defined(WITH_OPTIMIZED_FLAGS) +FFLAGS+= -O3 -ffast-math -funroll-loops +.endif + INSTALLS_SHLIB= yes NO_WRKSUBDIR= yes -pre-build: - ${CP} ${FILESDIR}/makefile.lib ${WRKSRC}/Makefile +do-configure: + @${INSTALL_DATA} ${FILESDIR}/makefile.lib ${WRKSRC}/Makefile + @${REINPLACE_CMD} -e 's+@FFLAGS@+${FFLAGS}+g' ${WRKSRC}/Makefile .include <bsd.port.mk> diff -ruN blas.orig/files/makefile.lib blas/files/makefile.lib --- blas.orig/files/makefile.lib Fri Apr 7 12:17:22 2006 +++ blas/files/makefile.lib Sat Apr 8 12:01:53 2006 @@ -1,6 +1,8 @@ # @(#)Makefile 5.7 (Berkeley) 6/27/91 +FFLAGS= @FFLAGS@ + LIBDIR= ${PREFIX}/lib -NOPROFILE= no +NO_PROFILE= no SHLIB_MAJOR= 1 >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200604081906.k38J6MmV068835>