rpms/liboil/devel liboil-0.3.13-better-altivec-detect.patch, 1.1, 1.2
Bastien Nocera (hadess)
fedora-extras-commits at redhat.com
Tue Mar 11 14:59:44 UTC 2008
Author: hadess
Update of /cvs/pkgs/rpms/liboil/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv5800
Modified Files:
liboil-0.3.13-better-altivec-detect.patch
Log Message:
Updated patch that should actually compile
liboil-0.3.13-better-altivec-detect.patch:
Index: liboil-0.3.13-better-altivec-detect.patch
===================================================================
RCS file: /cvs/pkgs/rpms/liboil/devel/liboil-0.3.13-better-altivec-detect.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- liboil-0.3.13-better-altivec-detect.patch 11 Mar 2008 14:35:30 -0000 1.1
+++ liboil-0.3.13-better-altivec-detect.patch 11 Mar 2008 14:59:39 -0000 1.2
@@ -4,8 +4,8 @@
retrieving revision 1.1
diff -u -p -u -p -r1.1 liboilcpu-powerpc.c
--- liboil/liboilcpu-powerpc.c 14 Nov 2007 09:30:20 -0000 1.1
-+++ liboil/liboilcpu-powerpc.c 11 Mar 2008 14:29:22 -0000
-@@ -44,6 +44,15 @@
++++ liboil/liboilcpu-powerpc.c 11 Mar 2008 14:55:19 -0000
+@@ -44,6 +44,21 @@
//#include <sys/time.h>
//#include <time.h>
@@ -16,12 +16,18 @@
+#include <fcntl.h>
+#include <unistd.h>
+#include <stdio.h>
++
++#ifndef PPC_FEATURE_HAS_ALTIVEC
++/* From linux-2.6/include/asm-powerpc/cputable.h */
++#define PPC_FEATURE_HAS_ALTIVEC 0x10000000
++#endif
++
+#endif
+
#if defined(__FreeBSD__)
#include <sys/types.h>
#include <sys/sysctl.h>
-@@ -67,7 +76,7 @@ test_altivec (void * ignored)
+@@ -67,7 +82,7 @@ test_altivec (void * ignored)
}
#if defined(__FreeBSD__)
@@ -30,7 +36,7 @@
oil_check_altivec_sysctl (void)
{
int ret, av;
-@@ -81,6 +90,58 @@ oil_check_altivec_sysctl (void)
+@@ -81,6 +96,61 @@ oil_check_altivec_sysctl (void)
}
#endif
@@ -46,8 +52,9 @@
+ pid_t pid;
+ int fd, i;
+
++ /* Flags already set */
+ if (available != -1) {
-+ return available;
++ return;
+ }
+
+ pid = getpid();
@@ -82,14 +89,16 @@
+
+out:
+ available = new_avail;
-+ return available;
++ if (available) {
++ oil_cpu_flags |= OIL_IMPL_FLAG_ALTIVEC;
++ }
+}
+#endif
+
void
oil_check_altivec_fault (void)
{
-@@ -97,6 +158,8 @@ oil_cpu_detect_arch(void)
+@@ -97,6 +167,8 @@ oil_cpu_detect_arch(void)
{
#if defined(__FreeBSD__)
oil_check_altivec_sysctl();
@@ -98,7 +107,7 @@
#else
oil_check_altivec_fault();
#endif
-@@ -104,5 +167,3 @@ oil_cpu_detect_arch(void)
+@@ -104,5 +176,3 @@ oil_cpu_detect_arch(void)
_oil_profile_stamp = oil_profile_stamp_tb;
}
More information about the fedora-extras-commits
mailing list