diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-12-31 19:18:32 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-12-31 19:18:32 +0000 |
commit | 1135d15defeefd80644c025c2189e8f759b6b794 (patch) | |
tree | 8334da6cb6543019f72a4fe8a5968d3ba650baa4 /media-tv | |
parent | Version bump #496594 by Ulenrich. (diff) | |
download | gentoo-2-1135d15defeefd80644c025c2189e8f759b6b794.tar.gz gentoo-2-1135d15defeefd80644c025c2189e8f759b6b794.tar.bz2 gentoo-2-1135d15defeefd80644c025c2189e8f759b6b794.zip |
Add patch from upstream for building on cpus w/out sse2 #475266 by Jose Quinteiro.
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'media-tv')
-rw-r--r-- | media-tv/xbmc/ChangeLog | 7 | ||||
-rw-r--r-- | media-tv/xbmc/files/xbmc-12.3-no-sse2.patch | 185 | ||||
-rw-r--r-- | media-tv/xbmc/xbmc-12.3.ebuild | 3 |
3 files changed, 193 insertions, 2 deletions
diff --git a/media-tv/xbmc/ChangeLog b/media-tv/xbmc/ChangeLog index f6ddfc1f0dff..88f9dfaa7a74 100644 --- a/media-tv/xbmc/ChangeLog +++ b/media-tv/xbmc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for media-tv/xbmc # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.199 2013/12/31 00:31:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/ChangeLog,v 1.200 2013/12/31 19:18:32 vapier Exp $ + + 31 Dec 2013; Mike Frysinger <vapier@gentoo.org> + +files/xbmc-12.3-no-sse2.patch, xbmc-12.3.ebuild: + Add patch from upstream for building on cpus w/out sse2 #475266 by Jose + Quinteiro. *xbmc-12.3 (31 Dec 2013) diff --git a/media-tv/xbmc/files/xbmc-12.3-no-sse2.patch b/media-tv/xbmc/files/xbmc-12.3-no-sse2.patch new file mode 100644 index 000000000000..a0f787c03864 --- /dev/null +++ b/media-tv/xbmc/files/xbmc-12.3-no-sse2.patch @@ -0,0 +1,185 @@ +https://bugs.gentoo.org/475266 + +From 07ccc514dc688f0dd53f603d206894023e65ab20 Mon Sep 17 00:00:00 2001 +From: Jose Quinteiro <gentoo@quinteiro.org> +Date: Sat, 27 Apr 2013 11:29:51 -0700 +Subject: [PATCH] Detect SSE2 support + +Compilation on an older 32-bit Athlon XP chip fails with the error +"./Utils/AEUtil.h:50:12: error: '__m128i' does not name a type" +This is because the __m128i type is only available on SSE2 platforms. +Modify the preprocessor logic to detect SSE and SSE2 support separately. + +The "emmintrin.h" header should only be included on SSE2 platforms as +well. +--- + xbmc/cores/AudioEngine/Utils/AEConvert.cpp | 25 ++++++++++--------------- + xbmc/cores/AudioEngine/Utils/AEUtil.cpp | 4 ++-- + xbmc/cores/AudioEngine/Utils/AEUtil.h | 9 ++++++++- + 3 files changed, 20 insertions(+), 18 deletions(-) + +diff --git a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp +index 0b0b646..7cfde5e 100644 +--- a/xbmc/cores/AudioEngine/Utils/AEConvert.cpp ++++ b/xbmc/cores/AudioEngine/Utils/AEConvert.cpp +@@ -33,11 +33,6 @@ + #include <math.h> + #include <string.h> + +-#ifdef __SSE__ +-#include <xmmintrin.h> +-#include <emmintrin.h> +-#endif +- + #ifdef __ARM_NEON__ + #include <arm_neon.h> + #endif +@@ -517,7 +512,7 @@ unsigned int CAEConvert::Float_S8(float *data, const unsigned int samples, uint8 + unsigned int CAEConvert::Float_S16LE(float *data, const unsigned int samples, uint8_t *dest) + { + int16_t *dst = (int16_t*)dest; +- #ifdef __SSE__ ++ #ifdef __SSE2__ + + unsigned int count = samples; + unsigned int unaligned = (0x10 - ((uintptr_t)data & 0xF)) >> 2; +@@ -623,7 +618,7 @@ unsigned int CAEConvert::Float_S16LE(float *data, const unsigned int samples, ui + /* cleanup */ + _mm_empty(); + +- #else /* no SSE */ ++ #else /* no SSE2 */ + + uint32_t i = 0; + uint32_t even = samples & ~0x3; +@@ -651,7 +646,7 @@ unsigned int CAEConvert::Float_S16LE(float *data, const unsigned int samples, ui + unsigned int CAEConvert::Float_S16BE(float *data, const unsigned int samples, uint8_t *dest) + { + int16_t *dst = (int16_t*)dest; +- #ifdef __SSE__ ++ #ifdef __SSE2__ + + unsigned int count = samples; + unsigned int unaligned = (0x10 - ((uintptr_t)data & 0xF)) >> 2; +@@ -757,7 +752,7 @@ unsigned int CAEConvert::Float_S16BE(float *data, const unsigned int samples, ui + /* cleanup */ + _mm_empty(); + +- #else /* no SSE */ ++ #else /* no SSE2 */ + + uint32_t i = 0; + uint32_t even = samples & ~0x3; +@@ -785,7 +780,7 @@ unsigned int CAEConvert::Float_S16BE(float *data, const unsigned int samples, ui + unsigned int CAEConvert::Float_S24NE4(float *data, const unsigned int samples, uint8_t *dest) + { + int32_t *dst = (int32_t*)dest; +- #ifdef __SSE__ ++ #ifdef __SSE2__ + + const __m128 mul = _mm_set_ps1((float)INT24_MAX+.5f); + unsigned int count = samples; +@@ -835,7 +830,7 @@ unsigned int CAEConvert::Float_S24NE4(float *data, const unsigned int samples, u + } + } + _mm_empty(); +- #else /* no SSE */ ++ #else /* no SSE2 */ + for (uint32_t i = 0; i < samples; ++i) + *dst++ = (safeRound(*data++ * ((float)INT24_MAX+.5f)) & 0xFFFFFF) << 8; + #endif +@@ -929,7 +924,7 @@ unsigned int CAEConvert::Float_S24NE3(float *data, const unsigned int samples, u + unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, uint8_t *dest) + { + int32_t *dst = (int32_t*)dest; +- #ifdef __SSE__ ++ #ifdef __SSE2__ + const __m128 mul = _mm_set_ps1(MUL32); + unsigned int count = samples; + +@@ -989,7 +984,7 @@ unsigned int CAEConvert::Float_S32LE(float *data, const unsigned int samples, ui + _mm_empty(); + #else + +- /* no SIMD */ ++ /* no SSE2 */ + for (uint32_t i = 0; i < samples; ++i, ++data, ++dst) + { + dst[0] = safeRound(data[0] * MUL32); +@@ -1038,7 +1033,7 @@ unsigned int CAEConvert::Float_S32LE_Neon(float *data, const unsigned int sample + unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, uint8_t *dest) + { + int32_t *dst = (int32_t*)dest; +- #ifdef __SSE__ ++ #ifdef __SSE2__ + const __m128 mul = _mm_set_ps1(MUL32); + unsigned int count = samples; + +@@ -1097,7 +1092,7 @@ unsigned int CAEConvert::Float_S32BE(float *data, const unsigned int samples, ui + } + _mm_empty(); + #else +- /* no SIMD */ ++ /* no SSE2 */ + for (uint32_t i = 0; i < samples; ++i, ++data, ++dst) + { + dst[0] = safeRound(data[0] * MUL32); +diff --git a/xbmc/cores/AudioEngine/Utils/AEUtil.cpp b/xbmc/cores/AudioEngine/Utils/AEUtil.cpp +index 6de84dc..2b6e0cd 100644 +--- a/xbmc/cores/AudioEngine/Utils/AEUtil.cpp ++++ b/xbmc/cores/AudioEngine/Utils/AEUtil.cpp +@@ -30,7 +30,7 @@ using namespace std; + + /* declare the rng seed and initialize it */ + unsigned int CAEUtil::m_seed = (unsigned int)(CurrentHostCounter() / 1000.0f); +-#ifdef __SSE__ ++#ifdef __SSE2__ + /* declare the SSE seed and initialize it */ + MEMALIGN(16, __m128i CAEUtil::m_sseSeed) = _mm_set_epi32(CAEUtil::m_seed, CAEUtil::m_seed+1, CAEUtil::m_seed, CAEUtil::m_seed+1); + #endif +@@ -386,7 +386,7 @@ float CAEUtil::FloatRand1(const float min, const float max) + + void CAEUtil::FloatRand4(const float min, const float max, float result[4], __m128 *sseresult/* = NULL */) + { +- #ifdef __SSE__ ++ #ifdef __SSE2__ + /* + this method may be called from other SSE code, we need + to calculate the delta & factor using SSE as the FPU +diff --git a/xbmc/cores/AudioEngine/Utils/AEUtil.h b/xbmc/cores/AudioEngine/Utils/AEUtil.h +index 48cbc3b..6fdb7f2 100644 +--- a/xbmc/cores/AudioEngine/Utils/AEUtil.h ++++ b/xbmc/cores/AudioEngine/Utils/AEUtil.h +@@ -27,6 +27,9 @@ + #ifdef TARGET_WINDOWS + #if _M_IX86_FP>0 && !defined(__SSE__) + #define __SSE__ ++#if _M_IX86_FP>1 && !defined(__SSE2__) ++#define __SSE2__ ++#endif + #endif + #endif + +@@ -36,6 +39,10 @@ + #define __m128 void + #endif + ++#ifdef __SSE2__ ++#include <emmintrin.h> ++#endif ++ + #ifdef __GNUC__ + #define MEMALIGN(b, x) x __attribute__((aligned(b))) + #else +@@ -63,7 +70,7 @@ class CAEUtil + { + private: + static unsigned int m_seed; +- #ifdef __SSE__ ++ #ifdef __SSE2__ + static __m128i m_sseSeed; + #endif + +-- +1.8.4.3 + diff --git a/media-tv/xbmc/xbmc-12.3.ebuild b/media-tv/xbmc/xbmc-12.3.ebuild index 0bdb5ec70d1d..a486acffa4dc 100644 --- a/media-tv/xbmc/xbmc-12.3.ebuild +++ b/media-tv/xbmc/xbmc-12.3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2013 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-12.3.ebuild,v 1.1 2013/12/31 00:31:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/media-tv/xbmc/xbmc-12.3.ebuild,v 1.2 2013/12/31 19:18:32 vapier Exp $ EAPI="5" @@ -150,6 +150,7 @@ src_unpack() { src_prepare() { epatch "${FILESDIR}"/${PN}-12.1-nomythtv.patch epatch "${FILESDIR}"/${PN}-9999-no-arm-flags.patch #400617 + epatch "${FILESDIR}"/${PN}-12.3-no-sse2.patch #475266 # Backported fixes EPATCH_MULTI_MSG="Applying patches backported from master..." \ EPATCH_SUFFIX="patch" \ |