From 5a7b8168bc727dff69d334991c3e1cff3158e76d Mon Sep 17 00:00:00 2001 From: Fabian Deutsch Date: Fri, 25 Apr 2014 10:00:21 +0200 Subject: [PATCH] Add patch to make headers usable on ARM Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=1027199 Signed-off-by: Fabian Deutsch --- arm-nosse2.patch | 27 +++++++++++++++++++++++++++ opencl-headers.spec | 22 ++++++++++++++++------ 2 files changed, 43 insertions(+), 6 deletions(-) create mode 100644 arm-nosse2.patch diff --git a/arm-nosse2.patch b/arm-nosse2.patch new file mode 100644 index 0000000..38dc0cd --- /dev/null +++ b/arm-nosse2.patch @@ -0,0 +1,27 @@ +--- cl.hpp.orig 2014-04-25 09:53:03.029286394 +0200 ++++ cl.hpp 2014-04-25 09:55:06.330122827 +0200 +@@ -212,8 +212,11 @@ + #if defined(linux) || defined(__APPLE__) || defined(__MACOSX) + #include + ++#ifdef __SSE2__ + #include + #include ++#endif // __SSE2__ ++ + #endif // linux + + #include +@@ -1035,7 +1038,12 @@ + #endif // !_WIN32 + } + ++#ifdef __SSE2__ + inline void fence() { _mm_mfence(); } ++#else ++ inline void fence() {} ++#endif ++ + }; // namespace detail + + diff --git a/opencl-headers.spec b/opencl-headers.spec index 5cbe2b3..ca5a98c 100644 --- a/opencl-headers.spec +++ b/opencl-headers.spec @@ -1,10 +1,11 @@ -Summary: Khronos OpenCL development headers -Name: opencl-headers -Version: 1.2 -Release: 3%{?dist} -License: MIT -URL: http://www.khronos.org/registry/cl/ +Summary: Khronos OpenCL development headers +Name: opencl-headers +Version: 1.2 +Release: 4%{?dist} +License: MIT +URL: http://www.khronos.org/registry/cl/ BuildArch: noarch + Source0: http://www.khronos.org/registry/cl/api/1.2/opencl.h Source1: http://www.khronos.org/registry/cl/api/1.2/cl_platform.h Source2: http://www.khronos.org/registry/cl/api/1.2/cl.h @@ -16,13 +17,19 @@ Source7: http://www.khronos.org/registry/cl/api/1.2/cl_gl.h Source8: http://www.khronos.org/registry/cl/api/1.2/cl_gl_ext.h Source9: http://www.khronos.org/registry/cl/api/1.2/cl.hpp +Patch0: arm-nosse2.patch + + %description Khronos OpenCL development headers + %prep +%patch0 -b .arm-nosse2 %build + %install mkdir -p $RPM_BUILD_ROOT%{_includedir}/CL/ cp \ @@ -52,6 +59,9 @@ cp \ %{_includedir}/CL/cl.hpp %changelog +* Fri Apr 25 2014 Fabian Deutsch - 1.2-4 +- Add patch for cl.hpp to be usable on arm rhbz#1027199 + * Sat Aug 03 2013 Fedora Release Engineering - 1.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild