From b8e7b56cb461c5b952b1ecbc9d39ac5cd0d7c538 Mon Sep 17 00:00:00 2001 From: bicatali Date: Mon, 6 Feb 2006 23:56:14 +0000 Subject: mkl-8.0.1.006.ebuild: improved cpu detection git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@95 32389bae-6d03-0410-99cf-db05cde120eb --- sci-libs/mkl/Manifest | 2 +- sci-libs/mkl/mkl-8.0.1.006.ebuild | 17 ++++++++++++----- 2 files changed, 13 insertions(+), 6 deletions(-) (limited to 'sci-libs/mkl') diff --git a/sci-libs/mkl/Manifest b/sci-libs/mkl/Manifest index 289b86d77..8c6f7a1f6 100644 --- a/sci-libs/mkl/Manifest +++ b/sci-libs/mkl/Manifest @@ -9,4 +9,4 @@ MD5 73b9deafc1ec5bb4398751c6875c911b files/f77-MKL.lapack 474 MD5 12308b5448e67e8b264abf7539a97539 files/f77-threaded-MKL.blas 484 MD5 c6dbd399b994048332e3bc58e4d449f6 files/f77-threaded-MKL.lapack 518 MD5 729a826a74e62fe48daf668e3dccefb4 metadata.xml 603 -MD5 5170318c31dc0398589547bf447e5900 mkl-8.0.1.006.ebuild 5781 +MD5 f38445162e380dfbaf86a019f73af186 mkl-8.0.1.006.ebuild 6060 diff --git a/sci-libs/mkl/mkl-8.0.1.006.ebuild b/sci-libs/mkl/mkl-8.0.1.006.ebuild index 6b7371cc5..78e218f8a 100644 --- a/sci-libs/mkl/mkl-8.0.1.006.ebuild +++ b/sci-libs/mkl/mkl-8.0.1.006.ebuild @@ -2,7 +2,7 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -inherit fortran rpm +inherit fortran rpm flag-o-matic MYPV=${PV/.006/} DESCRIPTION="Intel(R) Math Kernel Library: linear algebra, fft, random number generators." @@ -110,8 +110,9 @@ src_compile() { amd64) IARCH="em64t" IKERN="em64t" - # need to work out cpu detection ICPU="def" + (is-flag '-march=k8' || + is-flag '-march=nocona' ) && ICPU="p4n" ;; ia64) IARCH="64" @@ -121,13 +122,18 @@ src_compile() { x86) IARCH="32" IKERN="ia32" - # need to work out cpu detection ICPU="def" + # could work out better cpu detection. now works for gcc-3.4 and icc + ( is-flag '-march=pentium3' || \ + is-flag '-march=pentiumiii') && ICPU="p3" + ( is-flag '-march=pentium4' || \ + is-flag '-msse2') && ICPU="p4" + is-flag '-msse3' && ICPU="p4e" ;; esac ILIBDIR=${INSTDIR}/lib/${IARCH} - use ${ARCH} || rm -rf ${S}/${ILIBDIR} - + einfo "IARCH=$IARCH IKERN=$IKERN ICPU=$ICPU" + if use fortran95; then local fc=${FORTRANC} if [ "${FORTRANC}" = "ifc" ]; then @@ -184,6 +190,7 @@ src_install () { # All install stuff below needs work using nasty libtool # --------------------------------------------------- + insopts -m0755 gcc -fPIC -shared -L${S}/${ILIBDIR} -lmkl -lmkl_${ICPU} \ -o libmkl_blas.so -- cgit v1.2.3-65-gdbad