Improve conditional SSE and SSE2 compilation

This commit is contained in:
Wim Taymans 2014-05-23 17:12:26 +02:00
parent bd30938a89
commit 0dfec1089a
3 changed files with 71 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From bde72c7bebaa9d10cd49ae5542d361bda7aa7bd0 Mon Sep 17 00:00:00 2001
From: Antoine Jacoutot <ajacoutot@gnome.org>
Date: Mon, 20 Jan 2014 15:44:09 +0100
Subject: [PATCH 1/2] audioresample: Fix build on x86 if emmintrin.h is
available but can't be used
On i386, EMMINTRIN is defined but not usable without SSE so check for
__SSE__ and __SSE2__ as well.
https://bugzilla.gnome.org/show_bug.cgi?id=670690
---
gst/audioresample/resample.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c
index 98d006c..481fa01 100644
--- a/gst/audioresample/resample.c
+++ b/gst/audioresample/resample.c
@@ -77,13 +77,13 @@
#define EXPORT G_GNUC_INTERNAL
#ifdef _USE_SSE
-#ifndef HAVE_XMMINTRIN_H
+#if !defined(__SSE__) || !defined(HAVE_XMMINTRIN_H)
#undef _USE_SSE
#endif
#endif
#ifdef _USE_SSE2
-#ifndef HAVE_EMMINTRIN_H
+#if !defined(__SSE2__) || !defined(HAVE_XMMINTRIN_H)
#undef _USE_SSE2
#endif
#endif
--
1.9.0

View File

@ -0,0 +1,26 @@
From e9746600b409db9a5c63dc7a22b21f80c8c5328c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= <sebastian@centricular.com>
Date: Mon, 20 Jan 2014 16:11:04 +0100
Subject: [PATCH 2/2] audioresample: It's HAVE_EMMINTRIN_H, not
HAVE_XMMINTRIN_H for SSE2
---
gst/audioresample/resample.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gst/audioresample/resample.c b/gst/audioresample/resample.c
index 481fa01..4410bdd 100644
--- a/gst/audioresample/resample.c
+++ b/gst/audioresample/resample.c
@@ -83,7 +83,7 @@
#endif
#ifdef _USE_SSE2
-#if !defined(__SSE2__) || !defined(HAVE_XMMINTRIN_H)
+#if !defined(__SSE2__) || !defined(HAVE_EMMINTRIN_H)
#undef _USE_SSE2
#endif
#endif
--
1.9.0

View File

@ -2,13 +2,15 @@
Name: gstreamer1-plugins-base Name: gstreamer1-plugins-base
Version: 1.2.4 Version: 1.2.4
Release: 1%{?dist} Release: 2%{?dist}
Summary: GStreamer streaming media framework base plugins Summary: GStreamer streaming media framework base plugins
License: LGPLv2+ License: LGPLv2+
URL: http://gstreamer.freedesktop.org/ URL: http://gstreamer.freedesktop.org/
Source0: http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-%{version}.tar.xz Source0: http://gstreamer.freedesktop.org/src/gst-plugins-base/gst-plugins-base-%{version}.tar.xz
Patch0: 0001-missing-plugins-Remove-the-mpegaudioversion-field.patch Patch0: 0001-missing-plugins-Remove-the-mpegaudioversion-field.patch
Patch1: 0001-audioresample-Fix-build-on-x86-if-emmintrin.h-is-ava.patch
Patch2: 0002-audioresample-It-s-HAVE_EMMINTRIN_H-not-HAVE_XMMINTR.patch
BuildRequires: gstreamer1-devel >= %{version} BuildRequires: gstreamer1-devel >= %{version}
BuildRequires: gobject-introspection-devel >= 1.31.1 BuildRequires: gobject-introspection-devel >= 1.31.1
@ -87,6 +89,8 @@ for the GStreamer Base Plugins library.
%prep %prep
%setup -q -n gst-plugins-base-%{version} %setup -q -n gst-plugins-base-%{version}
%patch0 -p1 %patch0 -p1
%patch1 -p1
%patch2 -p1
%build %build
@ -350,6 +354,9 @@ chrpath --delete $RPM_BUILD_ROOT%{_bindir}/gst-discoverer-1.0
%changelog %changelog
* Fri May 23 2014 Wim Taymans <wtaymans@redhat.com> - 1.2.4-2
- Improve conditional SSE and SSE2 compilation
* Sun Apr 20 2014 Brian Pepple <bpepple@fedoraproject.org> - 1.2.4-1 * Sun Apr 20 2014 Brian Pepple <bpepple@fedoraproject.org> - 1.2.4-1
- Update to 1.2.4. - Update to 1.2.4.