fix x86 sse2 runtime detection
tried and failed doing the same for arm neon support
This commit is contained in:
parent
28695292b7
commit
9556fffdef
@ -1,12 +0,0 @@
|
|||||||
diff -up webrtc-audio-processing-0.2/configure.ac.no_sse2_x86 webrtc-audio-processing-0.2/configure.ac
|
|
||||||
--- webrtc-audio-processing-0.2/configure.ac.no_sse2_x86 2015-11-04 01:49:34.000000000 -0600
|
|
||||||
+++ webrtc-audio-processing-0.2/configure.ac 2016-05-13 11:55:30.199168174 -0500
|
|
||||||
@@ -56,7 +56,7 @@ AS_CASE(["${host}"],
|
|
||||||
AC_SUBST(PLATFORM_CFLAGS)
|
|
||||||
|
|
||||||
AS_CASE(["${host_cpu}"],
|
|
||||||
- [i?86|x86_64],
|
|
||||||
+ [x86_64],
|
|
||||||
[
|
|
||||||
HAVE_X86=1
|
|
||||||
],
|
|
@ -1,12 +0,0 @@
|
|||||||
diff -up webrtc-audio-processing-0.2/configure.no_sse2_x86 webrtc-audio-processing-0.2/configure
|
|
||||||
--- webrtc-audio-processing-0.2/configure.no_sse2_x86 2015-11-04 01:50:11.000000000 -0600
|
|
||||||
+++ webrtc-audio-processing-0.2/configure 2016-05-13 11:55:38.964203868 -0500
|
|
||||||
@@ -16104,7 +16104,7 @@ esac
|
|
||||||
|
|
||||||
|
|
||||||
case "${host_cpu}" in #(
|
|
||||||
- i?86|x86_64) :
|
|
||||||
+ x86_64) :
|
|
||||||
|
|
||||||
HAVE_X86=1
|
|
||||||
;; #(
|
|
15
webrtc-audio-processing-0.2-x86_msse2.patch
Normal file
15
webrtc-audio-processing-0.2-x86_msse2.patch
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
diff -up webrtc-audio-processing-0.2/configure.ac.x86_sse2 webrtc-audio-processing-0.2/configure.ac
|
||||||
|
--- webrtc-audio-processing-0.2/configure.ac.x86_sse2 2015-11-04 01:49:34.000000000 -0600
|
||||||
|
+++ webrtc-audio-processing-0.2/configure.ac 2016-05-16 12:27:16.640796437 -0500
|
||||||
|
@@ -56,6 +56,11 @@ AS_CASE(["${host}"],
|
||||||
|
AC_SUBST(PLATFORM_CFLAGS)
|
||||||
|
|
||||||
|
AS_CASE(["${host_cpu}"],
|
||||||
|
+ [i?86],
|
||||||
|
+ [
|
||||||
|
+ HAVE_X86=1
|
||||||
|
+ ARCH_CFLAGS="-msse2"
|
||||||
|
+ ],
|
||||||
|
[i?86|x86_64],
|
||||||
|
[
|
||||||
|
HAVE_X86=1
|
12
webrtc-audio-processing-0.2-x86_sse2_runtime_detection.patch
Normal file
12
webrtc-audio-processing-0.2-x86_sse2_runtime_detection.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up webrtc-audio-processing-0.2/webrtc/common_audio/fir_filter.cc.x86_sse2 webrtc-audio-processing-0.2/webrtc/common_audio/fir_filter.cc
|
||||||
|
--- webrtc-audio-processing-0.2/webrtc/common_audio/fir_filter.cc.x86_sse2 2015-11-19 06:41:44.000000000 -0600
|
||||||
|
+++ webrtc-audio-processing-0.2/webrtc/common_audio/fir_filter.cc 2016-05-16 12:31:21.558877588 -0500
|
||||||
|
@@ -45,7 +45,7 @@ FIRFilter* FIRFilter::Create(const float
|
||||||
|
FIRFilter* filter = NULL;
|
||||||
|
// If we know the minimum architecture at compile time, avoid CPU detection.
|
||||||
|
#if defined(WEBRTC_ARCH_X86_FAMILY)
|
||||||
|
-#if defined(__SSE2__)
|
||||||
|
+#if 0 //defined(__SSE2__)
|
||||||
|
filter =
|
||||||
|
new FIRFilterSSE2(coefficients, coefficients_length, max_input_length);
|
||||||
|
#else
|
@ -1,8 +1,4 @@
|
|||||||
|
|
||||||
%ifarch %{arm}
|
|
||||||
%global neon --enable-neon=no
|
|
||||||
%endif
|
|
||||||
|
|
||||||
Name: webrtc-audio-processing
|
Name: webrtc-audio-processing
|
||||||
Version: 0.2
|
Version: 0.2
|
||||||
Release: 2%{?dist}
|
Release: 2%{?dist}
|
||||||
@ -12,12 +8,9 @@ License: BSD
|
|||||||
URL: http://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/
|
URL: http://www.freedesktop.org/software/pulseaudio/webrtc-audio-processing/
|
||||||
Source0: http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/%{name}-%{version}.tar.xz
|
Source0: http://freedesktop.org/software/pulseaudio/webrtc-audio-processing/%{name}-%{version}.tar.xz
|
||||||
Patch0: webrtc-fix-typedefs-on-other-arches.patch
|
Patch0: webrtc-fix-typedefs-on-other-arches.patch
|
||||||
# can't use sse2 on %%ix86 in fedora
|
Patch1: webrtc-audio-processing-0.2-no_undefined.patch
|
||||||
Patch1: webrtc-audio-processing-0.2-no_sse2_x86.patch
|
Patch2: webrtc-audio-processing-0.2-x86_msse2.patch
|
||||||
# match for patch1 when autoreconf'ing (unused, so far)
|
Patch3: webrtc-audio-processing-0.2-x86_sse2_runtime_detection.patch
|
||||||
Patch10: webrtc-audio-processing-0.2-no_sse2_x86-ac.patch
|
|
||||||
|
|
||||||
Patch2: webrtc-audio-processing-0.2-no_undefined.patch
|
|
||||||
|
|
||||||
BuildRequires: automake libtool
|
BuildRequires: automake libtool
|
||||||
|
|
||||||
@ -37,15 +30,27 @@ files for developing applications that use %{name}.
|
|||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
%patch0 -p1 -b .typedef
|
%patch0 -p1 -b .typedef
|
||||||
%patch1 -p1 -b .no_sse2_x86
|
%patch1 -p1 -b .no_undefined
|
||||||
%patch10 -p1 -b .no_sse2_x86_ac
|
%patch2 -p1 -b .x86_msse2
|
||||||
%patch2 -p1 -b .no_undefined
|
%ifarch %{ix86}
|
||||||
|
%patch3 -p1 -b .x86_sse2_runtime_detection
|
||||||
|
%endif
|
||||||
|
|
||||||
# for patch10/patch2
|
# for patch1/patch2
|
||||||
autoreconf -fi
|
autoreconf -fi
|
||||||
|
|
||||||
|
|
||||||
%build
|
%build
|
||||||
|
|
||||||
|
%ifarch %{arm}
|
||||||
|
# disable neon support
|
||||||
|
# can't unconditionally enable neon, and --enable-neon=runtime is broken (WebRtc_GetCPUFeaturesARM is unimplemented)
|
||||||
|
%global neon --enable-neon=no
|
||||||
|
## hack to ensure -mfpu=neon flag appears last when using --enable-neon=yes|runtime
|
||||||
|
#export CFLAGS="%{optflags} -mfpu=neon"
|
||||||
|
#export CXXFLAGS="%{optflags} -mfpu=neon"
|
||||||
|
%endif
|
||||||
|
|
||||||
%configure \
|
%configure \
|
||||||
%{?neon} \
|
%{?neon} \
|
||||||
--disable-silent-rules \
|
--disable-silent-rules \
|
||||||
@ -76,6 +81,7 @@ rm -fv %{buildroot}%{_libdir}/lib*.la
|
|||||||
%changelog
|
%changelog
|
||||||
* Mon May 16 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-2
|
* Mon May 16 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-2
|
||||||
- link w/ --no-undefined
|
- link w/ --no-undefined
|
||||||
|
- fix x86 sse2 runtime detection
|
||||||
|
|
||||||
* Thu May 12 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-1
|
* Thu May 12 2016 Rex Dieter <rdieter@fedoraproject.org> - 0.2-1
|
||||||
- webrtc-audio-processing-0.2 (#1335536)
|
- webrtc-audio-processing-0.2 (#1335536)
|
||||||
|
Loading…
Reference in New Issue
Block a user