From 04fd7f781206a152f560d75000a47a7d5929021b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20M=2E=20Basto?= Date: Sun, 7 Jun 2015 18:26:55 +0100 Subject: [PATCH] Added patch to make it build on AArch64. --- dont-play-with-cflags-on-aarch64.patch | 14 ++++++++++++++ x264.spec | 11 +++++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 dont-play-with-cflags-on-aarch64.patch diff --git a/dont-play-with-cflags-on-aarch64.patch b/dont-play-with-cflags-on-aarch64.patch new file mode 100644 index 0000000..ee0894e --- /dev/null +++ b/dont-play-with-cflags-on-aarch64.patch @@ -0,0 +1,14 @@ +Index: x264-0.142-20141221-6a301b6/configure +=================================================================== +--- x264-0.142-20141221-6a301b6.orig/configure ++++ x264-0.142-20141221-6a301b6/configure +@@ -788,9 +788,6 @@ if [ $asm = auto -a $ARCH = ARM ] ; then + fi + + if [ $asm = auto -a $ARCH = AARCH64 ] ; then +- # set flags so neon is built by default +- echo $CFLAGS | grep -Eq '(-mcpu|-march|-mfpu|-arch)' || CFLAGS="$CFLAGS -arch arm64 -mfpu=neon" +- + if cc_check '' '' '__asm__("cmeq v0.8h, v0.8h, #0");' ; then define HAVE_NEON + ASFLAGS="$ASFLAGS -c" + else diff --git a/x264.spec b/x264.spec index dfd71d9..7cf43a0 100644 --- a/x264.spec +++ b/x264.spec @@ -25,7 +25,7 @@ Summary: H264/AVC video streams encoder Name: x264 Version: 0.%{api} -Release: 11%{?gver}%{?_with_bootstrap:_bootstrap}%{?dist} +Release: 12%{?gver}%{?_with_bootstrap:_bootstrap}%{?dist} License: GPLv2+ Group: System Environment/Libraries URL: http://developers.videolan.org/x264.html @@ -37,6 +37,9 @@ BuildRequires: perl-Digest-MD5 Patch0: x264-nover.patch Patch10: x264-gpac.patch +# NEON is not optional in AArch64 cpus so no need to play with cflags +Patch11: dont-play-with-cflags-on-aarch64.patch + %{!?_without_gpac:BuildRequires: gpac-devel-static zlib-devel openssl-devel libpng-devel libjpeg-devel} %{!?_without_libavformat:BuildRequires: ffmpeg-devel} %{?_with_ffmpegsource:BuildRequires: ffmpegsource-devel} @@ -91,6 +94,7 @@ This package contains the development files. pushd %{name}-0.%{api}-%{snapshot} %patch0 -p1 -b .nover %patch10 -p1 -b .gpac +%patch11 -p1 popd variants="generic generic10" @@ -190,8 +194,11 @@ touch -r generic/version.h %{buildroot}%{_includedir}/x264.h %{buildroot}%{_incl %{_libdir}/libx26410b.so %changelog +* Mon Jun 01 2015 Marcin Juszkiewicz - 0.142-12.20141221git6a301b6 +- Added patch to make it build on AArch64. + * Mon Dec 22 2014 Sérgio Basto - 0.142-11.20141221git6a301b6 -- Update to x264-0.142 to git 6a301b6 +- Update x264-0.142 to git 6a301b6 * Sun Oct 19 2014 Sérgio Basto - 0.142-10.20140826git021c0dc - Rebuilt for FFmpeg 2.4.3