summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Barbato <lu_zero@gentoo.org>2005-11-12 03:12:15 +0000
committerLuca Barbato <lu_zero@gentoo.org>2005-11-12 03:12:15 +0000
commit0735bf60f300f3e96bbf09f37ab298c17e7fcf8a (patch)
treeecc850607321bf6091ea0d20467c31fa59d0d55d /sci-libs
parentSmall optimization. (diff)
downloadgentoo-2-0735bf60f300f3e96bbf09f37ab298c17e7fcf8a.tar.gz
gentoo-2-0735bf60f300f3e96bbf09f37ab298c17e7fcf8a.tar.bz2
gentoo-2-0735bf60f300f3e96bbf09f37ab298c17e7fcf8a.zip
altivec fix
(Portage version: 2.0.53_rc6)
Diffstat (limited to 'sci-libs')
-rw-r--r--sci-libs/fftw/ChangeLog6
-rw-r--r--sci-libs/fftw/fftw-3.0.1-r2.ebuild5
-rw-r--r--sci-libs/fftw/files/fftw-3.0.1-altivec.patch85
3 files changed, 94 insertions, 2 deletions
diff --git a/sci-libs/fftw/ChangeLog b/sci-libs/fftw/ChangeLog
index 171249d5eca9..adf3f15be7dc 100644
--- a/sci-libs/fftw/ChangeLog
+++ b/sci-libs/fftw/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sci-libs/fftw
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.24 2005/08/26 00:11:51 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.25 2005/11/12 03:12:15 lu_zero Exp $
+
+ 12 Nov 2005; Luca Barbato <lu_zero@gentoo.org>
+ +files/fftw-3.0.1-altivec.patch, fftw-3.0.1-r2.ebuild:
+ Altivec support for gcc-fsf fixed
26 Aug 2005; Aron Griffis <agriffis@gentoo.org> fftw-3.0.1-r2.ebuild:
stable on ia64
diff --git a/sci-libs/fftw/fftw-3.0.1-r2.ebuild b/sci-libs/fftw/fftw-3.0.1-r2.ebuild
index 3b5de25737c8..b79dcf933e5d 100644
--- a/sci-libs/fftw/fftw-3.0.1-r2.ebuild
+++ b/sci-libs/fftw/fftw-3.0.1-r2.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.0.1-r2.ebuild,v 1.9 2005/08/26 00:11:51 agriffis Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.0.1-r2.ebuild,v 1.10 2005/11/12 03:12:15 lu_zero Exp $
inherit flag-o-matic eutils toolchain-funcs
@@ -19,6 +19,9 @@ src_unpack() {
unpack "${P}.tar.gz"
cd "${WORKDIR}/${P}"
epatch ${FILESDIR}/3-tmpfile.patch
+ epatch ${FILESDIR}/${P}-altivec.patch
+ autoreconf
+ libtoolize --copy --force
cd "${WORKDIR}"
use ppc-macos && epatch ${FILESDIR}/${PN}-ppc-macos.patch
mv ${P} ${P}-single
diff --git a/sci-libs/fftw/files/fftw-3.0.1-altivec.patch b/sci-libs/fftw/files/fftw-3.0.1-altivec.patch
new file mode 100644
index 000000000000..a71fea0c6aee
--- /dev/null
+++ b/sci-libs/fftw/files/fftw-3.0.1-altivec.patch
@@ -0,0 +1,85 @@
+diff -u simd.old/altivec.c simd/altivec.c
+--- simd.old/altivec.c 2005-11-12 00:28:14.000000000 +0100
++++ simd/altivec.c 2005-11-12 00:33:36.000000000 +0100
+@@ -26,15 +26,12 @@
+ #if HAVE_ALTIVEC
+
+ const vector unsigned int X(altivec_ld_selmsk) =
+- (vector unsigned int)VLIT(0, 0, 0xFFFFFFFF, 0xFFFFFFFF);
++ VLIT(0, 0, 0xFFFFFFFF, 0xFFFFFFFF);
+
+ const vector unsigned int X(altivec_flipri_perm) =
+- (vector unsigned int)VLIT(0x04050607, 0x00010203,
+- 0x0c0d0e0f, 0x08090a0b);
++ VLIT(0x04050607, 0x00010203, 0x0c0d0e0f, 0x08090a0b);
+
+-const vector float X(altivec_chsr_sgn) =
+- (vector float)VLIT(-1.0, 1.0, -1.0, 1.0);
+-const vector float X(altivec_chsr_msk) =
+- (vector float)VLIT(-0.0, 0.0, -0.0, 0.0);
++const vector float X(altivec_chsr_sgn) = VLIT(-1.0, 1.0, -1.0, 1.0);
++const vector float X(altivec_chsr_msk) = VLIT(-0.0, 0.0, -0.0, 0.0);
+
+ #endif
+diff -u simd.old/simd-altivec.h simd/simd-altivec.h
+--- simd.old/simd-altivec.h 2005-11-12 00:28:14.000000000 +0100
++++ simd/simd-altivec.h 2005-11-12 01:31:03.000000000 +0100
+@@ -96,8 +96,12 @@
+
+ #else /* !__VEC__ */
+
++#ifdef HAVE_ALTIVEC_H
++#include <altivec.h>
++#define VLIT(x0, x1, x2, x3) {x0, x1, x2, x3}
++#else
+ #define VLIT(x0, x1, x2, x3) (x0, x1, x2, x3)
+-
++#endif
+ #endif
+
+ typedef vector float V;
+--- configure.ac.old 2003-07-04 07:18:48.000000000 +0200
++++ configure.ac 2005-11-12 00:42:11.000000000 +0100
+@@ -167,7 +167,8 @@
+ ACX_CHECK_CC_FLAGS(-faltivec, faltivec,
+ SIMD_CFLAGS="-faltivec",
+ [ACX_CHECK_CC_FLAGS(-maltivec -mabi=altivec, maltivec,
+- SIMD_CFLAGS="-maltivec -mabi=altivec",
++ SIMD_CFLAGS="-maltivec -mabi=altivec";
++ AC_DEFINE(HAVE_ALTIVEC_H,1,[Define if gcc-fsf is in use]),
+ [AC_MSG_ERROR([Need a version of gcc with -maltivec])])])
+ fi
+ fi
+--- ../fftw-3.0.1-double/simd/simd-altivec.h 2005-11-12 01:59:11.000000000 +0100
++++ simd/simd-altivec.h 2005-11-12 03:16:00.000000000 +0100
+@@ -105,12 +105,25 @@
+ #endif
+
+ typedef vector float V;
+-#define VADD(a, b) vec_add(a, b)
+-#define VSUB(a, b) vec_sub(a, b)
+-#define VFMA(a, b, c) vec_madd(a, b, c)
+-#define VFNMS(a, b, c) vec_nmsub(a, b, c)
++static inline V VADD(V a,V b)
++{
++ return vec_add(a, b);
++}
++static inline V VSUB(V a, V b)
++{
++ return vec_sub(a, b);
++}
++static inline V VFMA(V a, V b, V c)
++{
++ return vec_madd(a, b, c);
++}
++static inline V VFNMS(V a, V b, V c)
++{
++ return vec_nmsub(a, b, c);
++}
++
+ #define LDK(x) x
+-#define DVK(var, val) const V var = (vector float)VLIT(val, val, val, val)
++#define DVK(var, val) const V var = VLIT(val, val, val, val)
+
+ static inline V VMUL(V a, V b)
+ {