mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
o cleanups
o faster build time; 4h45m19.23s for my Pentium M 1.6G. now static libs are build via knob, timing torerance patch is applied via knob. Submitted by: many
This commit is contained in:
parent
270cf8d38c
commit
28171a1dc8
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=155972
@ -19,7 +19,7 @@ DISTNAME= ${PORTNAME}${PORTVERSION}
|
||||
MAINTAINER= maho@FreeBSD.org
|
||||
COMMENT= Automatically Tuned Linear Algebra Software (ATLAS)
|
||||
|
||||
NO_PACKAGE= Optimizes for the local machine, so a package is not generally useful. Set FORCE_PACKAGE to override
|
||||
NO_PACKAGE= "Optimizes for the local machine, so a package is not generally useful. Set FORCE_PACKAGE to override"
|
||||
|
||||
USE_BZIP2= yes
|
||||
WRKSRC= ${WRKDIR}/ATLAS
|
||||
@ -34,7 +34,7 @@ USE_GCC=3.4
|
||||
|
||||
# only affects for lapack sub project
|
||||
.if defined(WITH_OPTIMIZED_FLAGS)
|
||||
FFLAGS+=-pipe -O3 -ffast-math
|
||||
FFLAGS+=-pipe -O3 -ffast-math -funroll-all-loops -fpeel-loops -ftracer -funswitch-loops -funit-at-a-time
|
||||
.endif
|
||||
|
||||
post-patch:
|
||||
@ -44,8 +44,15 @@ post-patch:
|
||||
@${REINPLACE_CMD} -e 's+%%PTHREAD_CFLAGS%%+${PTHREAD_CFLAGS}+g' \
|
||||
-e 's+%%PTHREAD_LIBS%%+${PTHREAD_LIBS}+g' \
|
||||
${WRKSRC}/config.c
|
||||
.if defined(PORTS_ARCH)
|
||||
@${REINPLACE_CMD} -e 's+%%PORTS_ARCH%%+${PORTS_ARCH}+g' \
|
||||
-e 's+%%HAVE_ARCH%%+1+g' ${WRKSRC}/config.c
|
||||
.else
|
||||
@${REINPLACE_CMD} -e 's+%%PORTS_ARCH%%+0+g' \
|
||||
-e 's+%%HAVE_ARCH%%+0+g' ${WRKSRC}/config.c
|
||||
.endif
|
||||
.if (${MACHINE_ARCH} == "alpha")
|
||||
@(cd ${WRKSRC}; ${PATCH} < ${FILESDIR}/alpha-patch)
|
||||
EXTRA_PATCHES+= ${FILESDIR}/alpha-patch
|
||||
.endif
|
||||
|
||||
.if ${MACHINE_ARCH} == "sparc64"
|
||||
@ -57,12 +64,57 @@ PICFLAG?= -fpic
|
||||
ANSWER_i386?= ${PRINTF} "\n\n\n\n\n\n\n\n\n\n"
|
||||
ANSWER_ia64?= ${PRINTF} "\n\n\n2\n\n\n\n\nf77\n-O2 -static\n\n"
|
||||
|
||||
.if defined(PACKAGE_BUILDING) && (${MACHINE_ARCH} == "i386")
|
||||
PORTS_ARCH=IntP5
|
||||
.endif
|
||||
|
||||
.if !defined(ANSWER_${ARCH})
|
||||
ANSWER= ${ANSWER_i386}
|
||||
.else
|
||||
ANSWER= ${ANSWER_${ARCH}}
|
||||
.endif
|
||||
|
||||
.if defined(TIMING_TOLERANCE)
|
||||
EXTRA_PATCHES+= ${FILESDIR}/timing_tolerance-patch
|
||||
.endif
|
||||
|
||||
.if defined(WITH_STATICLIB)
|
||||
PLIST_SUB= WITH_STATICLIB=""
|
||||
.else
|
||||
PLIST_SUB= WITH_STATICLIB="@comment "
|
||||
.endif
|
||||
|
||||
pre-configure:
|
||||
@${ECHO_MSG} "Warning:"
|
||||
@${ECHO_MSG} "Building this port can take long time"
|
||||
@${ECHO_MSG} "for slow computers (over 1 day)."
|
||||
@${ECHO_MSG} "And sometimes stop building for Athlon."
|
||||
@${ECHO_MSG} "In this case please retype make or rebuild whole atlas."
|
||||
@${ECHO_MSG}
|
||||
.if !defined(PORTS_ARCH)
|
||||
@${ECHO_MSG} "Warning:"
|
||||
@${ECHO_MSG} "If your arch is not correctly detected, you can specify"
|
||||
@${ECHO_MSG} "by yourself."
|
||||
@${ECHO_MSG} "for example : make PORTS_ARCH=P5Int"
|
||||
@${ECHO_MSG} "Available architectures for x86 are:"
|
||||
@${ECHO_MSG} "IntP5, IntP5MMX, IntPPRO, IntPII, IntPIII, IntP4, IntP4E"
|
||||
@${ECHO_MSG} "IntP4E64, TMEff, AmdAthlon,AmdHammer32, AmdHammer64"
|
||||
@${ECHO_MSG}
|
||||
.endif
|
||||
.if !defined(TIMING_TOLERANCE)
|
||||
@${ECHO_MSG} "If your install dies with unable to get timings in tolerance"
|
||||
@${ECHO_MSG} "First please refer http://math-atlas.sourceforge.net/errata.html#tol"
|
||||
@${ECHO_MSG} "and you can build with"
|
||||
@${ECHO_MSG} "make clean; make -DTIMING_TOLERANCE"
|
||||
@${ECHO_MSG} "if your build still dies, you can type make again, (and again...)"
|
||||
@${ECHO_MSG}
|
||||
.endif
|
||||
.if !defined(WITH_STATICLIB)
|
||||
@${ECHO_MSG} "You can build static libraries with"
|
||||
@${ECHO_MSG} "make -DWITH_STATICLIB"
|
||||
@${ECHO_MSG}
|
||||
.endif
|
||||
|
||||
do-configure:
|
||||
@(cd ${WRKSRC}; ${MAKE_ENV} ${MAKE} xconfig && \
|
||||
${ANSWER} | ./xconfig -N 1 -c ${CC} -f ${FC} -m ${CC} -g ${CC} -x ${CC} -a NON_THREADED && \
|
||||
@ -75,13 +127,6 @@ do-configure:
|
||||
ATLAS_LIBS1=libalapack libatlas libcblas libf77blas libtstatlas
|
||||
ATLAS_LIBS2=libptcblas libptf77blas
|
||||
|
||||
pre-build:
|
||||
@${ECHO_MSG} "Warning:"
|
||||
@${ECHO_MSG} "Building this port can take long time"
|
||||
@${ECHO_MSG} "for slow computers (over 1 day)."
|
||||
@${ECHO_MSG} "And sometimes stop building for Athlon."
|
||||
@${ECHO_MSG} "In this case please retype make or rebuild whole atlas."
|
||||
|
||||
do-build:
|
||||
# make lapack
|
||||
.if ! exists(${WRKDIR}/lapack/Makefile)
|
||||
@ -94,11 +139,15 @@ do-build:
|
||||
@${CP} ${PORTSDIR}/math/lapack/pkg-descr ${WRKDIR}/lapack
|
||||
@cd ${WRKDIR}/lapack ; ${MAKE} "FFLAGS=${FFLAGS}" FC="${FC}" build WRKDIRPREFIX=""
|
||||
.endif
|
||||
@(cd ${WRKSRC}; ${MAKE} ${.MAKEFLAGS} "ARCH=NON_THREADED" install arch=NON_THREADED)
|
||||
@(cd ${WRKSRC}; ${MAKE} ${.MAKEFLAGS} "ARCH=NON_THREADED_PIC" install arch=NON_THREADED_PIC)
|
||||
@(cd ${WRKSRC}; ${MAKE} ${.MAKEFLAGS} "ARCH=THREADED" install arch=THREADED)
|
||||
@(cd ${WRKSRC}; ${MAKE} ${.MAKEFLAGS} "ARCH=THREADED_PIC" install arch=THREADED_PIC)
|
||||
.if defined(WITH_STATICLIB)
|
||||
@(cd ${WRKSRC}; ${MAKE} ${.MAKEFLAGS} "ARCH=NON_THREADED" install arch=NON_THREADED)
|
||||
@(cd ${WRKSRC}; ${MAKE} ${.MAKEFLAGS} "ARCH=THREADED" install arch=THREADED)
|
||||
.endif
|
||||
|
||||
post-build:
|
||||
.if defined(WITH_STATICLIB)
|
||||
# make atlas enhanced lapack (static ver)
|
||||
(cd ${WRKSRC}; ${MKDIR} tmp1 ; \
|
||||
${CP} ${WRKDIR}/lapack/work/LAPACK/SRC/liblapack.a tmp1 ;\
|
||||
@ -115,6 +164,7 @@ post-build:
|
||||
ar x ../lib/THREADED/liblapack.a ;\
|
||||
ar r ../lib/THREADED/libalapack.a *.o ;\
|
||||
ranlib ../lib/THREADED/libalapack.a )
|
||||
.endif
|
||||
# make atlas enhanced lapack (shared ver)
|
||||
( cd ${WRKSRC}; ${MKDIR} tmp3 ;\
|
||||
${TAR} --exclude "*.f" --exclude "*.po" --exclude "*.o" -cf - -C ${WRKDIR}/lapack/work/LAPACK/SRC . | ${TAR} xf - -C tmp3 ;\
|
||||
@ -156,17 +206,23 @@ post-build:
|
||||
|
||||
do-install:
|
||||
.for i in ${ATLAS_LIBS1}
|
||||
.if defined(WITH_STATICLIB)
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/NON_THREADED/${i}.a ${PREFIX}/lib
|
||||
.endif
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/NON_THREADED_PIC/${i}.so.1 ${PREFIX}/lib
|
||||
@${LN} -sf ${i}.so.1 ${PREFIX}/lib/${i}.so
|
||||
.endfor
|
||||
.for i in ${ATLAS_LIBS1}
|
||||
.if defined(WITH_STATICLIB)
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/THREADED/${i}.a ${PREFIX}/lib/${i}_r.a
|
||||
.endif
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/THREADED_PIC/${i}_r.so.1 ${PREFIX}/lib/${i}_r.so.1
|
||||
@${LN} -sf ${i}_r.so.1 ${PREFIX}/lib/${i}_r.so
|
||||
.endfor
|
||||
.for i in ${ATLAS_LIBS2}
|
||||
.if defined(WITH_STATICLIB)
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/THREADED/${i}.a ${PREFIX}/lib
|
||||
.endif
|
||||
@${INSTALL_DATA} ${WRKSRC}/lib/THREADED_PIC/${i}.so.1 ${PREFIX}/lib
|
||||
@${LN} -sf ${i}.so.1 ${PREFIX}/lib/${i}.so
|
||||
.endfor
|
||||
|
@ -2,40 +2,40 @@ include/cblas.h
|
||||
include/clapack.h
|
||||
include/blas.h
|
||||
include/lapack.h
|
||||
lib/libalapack.a
|
||||
%%WITH_STATICLIB%%lib/libalapack.a
|
||||
lib/libalapack.so.1
|
||||
lib/libalapack.so
|
||||
lib/libalapack_r.a
|
||||
%%WITH_STATICLIB%%lib/libalapack_r.a
|
||||
lib/libalapack_r.so.1
|
||||
lib/libalapack_r.so
|
||||
lib/libatlas.a
|
||||
%%WITH_STATICLIB%%lib/libatlas.a
|
||||
lib/libatlas.so.1
|
||||
lib/libatlas.so
|
||||
lib/libatlas_r.a
|
||||
%%WITH_STATICLIB%%lib/libatlas_r.a
|
||||
lib/libatlas_r.so.1
|
||||
lib/libatlas_r.so
|
||||
lib/libcblas.a
|
||||
%%WITH_STATICLIB%%lib/libcblas.a
|
||||
lib/libcblas.so.1
|
||||
lib/libcblas.so
|
||||
lib/libcblas_r.a
|
||||
%%WITH_STATICLIB%%lib/libcblas_r.a
|
||||
lib/libcblas_r.so.1
|
||||
lib/libcblas_r.so
|
||||
lib/libf77blas.a
|
||||
%%WITH_STATICLIB%%lib/libf77blas.a
|
||||
lib/libf77blas.so.1
|
||||
lib/libf77blas.so
|
||||
lib/libf77blas_r.a
|
||||
%%WITH_STATICLIB%%lib/libf77blas_r.a
|
||||
lib/libf77blas_r.so.1
|
||||
lib/libf77blas_r.so
|
||||
lib/libptcblas.a
|
||||
%%WITH_STATICLIB%%lib/libptcblas.a
|
||||
lib/libptcblas.so.1
|
||||
lib/libptcblas.so
|
||||
lib/libptf77blas.a
|
||||
%%WITH_STATICLIB%%lib/libptf77blas.a
|
||||
lib/libptf77blas.so.1
|
||||
lib/libptf77blas.so
|
||||
lib/libtstatlas.a
|
||||
%%WITH_STATICLIB%%lib/libtstatlas.a
|
||||
lib/libtstatlas.so.1
|
||||
lib/libtstatlas.so
|
||||
lib/libtstatlas_r.a
|
||||
%%WITH_STATICLIB%%lib/libtstatlas_r.a
|
||||
lib/libtstatlas_r.so.1
|
||||
lib/libtstatlas_r.so
|
||||
%%PORTDOCS%%share/doc/atlas/AtlasCredits.txt
|
||||
|
Loading…
Reference in New Issue
Block a user