[packages/libcmrt] - fix building on x32 - rel 3

baggins baggins at pld-linux.org
Fri Dec 16 20:58:43 CET 2016


commit f02195bc73903d4523bb3903326cedd6e48655fd
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Dec 16 20:58:32 2016 +0100

    - fix building on x32
    - rel 3

 libcmrt.spec |  4 +++-
 x32.patch    | 15 +++++++++++++++
 2 files changed, 18 insertions(+), 1 deletion(-)
---
diff --git a/libcmrt.spec b/libcmrt.spec
index 8b66619..6cb0330 100644
--- a/libcmrt.spec
+++ b/libcmrt.spec
@@ -6,11 +6,12 @@ Summary:	C for Media Runtime - media GPU kernel manager for Intel GPUs
 Summary(pl.UTF-8):	C for Media Runtime - zarządca jąder GPU dla układów Intela
 Name:		libcmrt
 Version:	1.0.5
-Release:	2
+Release:	3
 License:	MIT
 Group:		Libraries
 Source0:	https://github.com/01org/cmrt/archive/%{version}.tar.gz
 # Source0-md5:	9a1afc0c0b24f4bac6c629aa5a57e41e
+Patch0:		x32.patch
 URL:		https://github.com/01org/cmrt
 BuildRequires:	libdrm-devel >= 2.4.23
 BuildRequires:	libstdc++-devel
@@ -82,6 +83,7 @@ Statyczna biblioteka CMRT.
 
 %prep
 %setup -q -n cmrt-%{version}
+%patch0 -p1
 
 %build
 %{__libtoolize}
diff --git a/x32.patch b/x32.patch
new file mode 100644
index 0000000..7e09153
--- /dev/null
+++ b/x32.patch
@@ -0,0 +1,15 @@
+--- cmrt-1.0.5/src/cm_mem.h.orig	2015-09-10 01:13:13.000000000 +0200
++++ cmrt-1.0.5/src/cm_mem.h	2016-12-16 20:57:05.769476573 +0100
+@@ -182,8 +182,11 @@
+ #ifndef NO_EXCEPTION_HANDLING
+ 	__try {
+ #endif
+-
++#ifdef __ILP32__
++		if (0) {
++#else
+ 		if (sizeof(void *) == 4) {
++#endif
+ 			unsigned int local_eax, local_ebx, local_ecx, local_edx;
+ 			__asm__ __volatile__("pushl %%ebx      \n\t" "cpuid  \n\t" "movl %%ebx, %1   \n\t" "popl %%ebx \n\t"	/* restore the old %ebx */
+ 					     :"=a"(local_eax), "=r"(local_ebx),
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libcmrt.git/commitdiff/f02195bc73903d4523bb3903326cedd6e48655fd



More information about the pld-cvs-commit mailing list