Accepting request 87914 from home:joeyli:branches:multimedia:libs
support build libvpx on armv7hl architecture OBS-URL: https://build.opensuse.org/request/show/87914 OBS-URL: https://build.opensuse.org/package/show/multimedia:libs/libvpx?expand=0&rev=32
This commit is contained in:
parent
18efa8a48b
commit
253a9891a2
29
libvpx-configure-add-armv7-tgt-isa.patch
Normal file
29
libvpx-configure-add-armv7-tgt-isa.patch
Normal file
@ -0,0 +1,29 @@
|
||||
Index: libvpx-v0.9.7-p1/build/make/configure.sh
|
||||
===================================================================
|
||||
--- libvpx-v0.9.7-p1.orig/build/make/configure.sh
|
||||
+++ libvpx-v0.9.7-p1/build/make/configure.sh
|
||||
@@ -656,6 +656,8 @@ process_common_toolchain() {
|
||||
CROSS=${CROSS:-arm-iwmmxt-linux-gnueabi-}
|
||||
elif enabled symbian; then
|
||||
CROSS=${CROSS:-arm-none-symbianelf-}
|
||||
+ elif [[ "$(uname -m)" == $tgt_isa* ]]; then
|
||||
+ CROSS=${CROSS:-}
|
||||
else
|
||||
CROSS=${CROSS:-arm-none-linux-gnueabi-}
|
||||
fi
|
||||
@@ -670,8 +672,13 @@ process_common_toolchain() {
|
||||
check_add_asflags -mcpu=${tgt_isa}
|
||||
elif enabled armv7
|
||||
then
|
||||
- check_add_cflags -march=armv7-a -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-ftree-vectorize
|
||||
- check_add_asflags -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-march=armv7-a
|
||||
+ if [[ "$(uname -m)" == $tgt_isa* ]]; then
|
||||
+ check_add_cflags -mfpu=neon
|
||||
+ check_add_asflags -mfpu=neon
|
||||
+ else
|
||||
+ check_add_cflags -march=armv7-a -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-ftree-vectorize
|
||||
+ check_add_asflags -mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-march=armv7-a
|
||||
+ fi
|
||||
else
|
||||
check_add_cflags -march=${tgt_isa}
|
||||
check_add_asflags -march=${tgt_isa}
|
@ -1,3 +1,12 @@
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 15 01:47:32 UTC 2011 - jlee@suse.com
|
||||
|
||||
- support build libvpx on armv7hl architecture
|
||||
* add libvpx-configure-add-armv7-tgt-isa.patch
|
||||
* add armv7-linux-gcc target and enable runtime cpu detect when
|
||||
configure. It both support ARMv7 cpu with or without NEON.
|
||||
e.g. NVIDIA Tegra 2
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Aug 24 10:11:27 UTC 2011 - adrian@suse.de
|
||||
|
||||
|
14
libvpx.spec
14
libvpx.spec
@ -28,6 +28,7 @@ Group: Productivity/Multimedia/Other
|
||||
Source0: http://webm.googlecode.com/files/%{name}-v%{version}%{patchlevel}.tar.bz2
|
||||
# PATCH-FIX-UPSTREAM libvpx-define-config_pic.patch dimstar@opensuse.org -- For older compilers, CONFIG_PIC need to be defined.
|
||||
Patch0: libvpx-define-config_pic.patch
|
||||
Patch1: libvpx-configure-add-armv7-tgt-isa.patch
|
||||
BuildRequires: yasm
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
@ -56,7 +57,6 @@ The WebM file structure is based on the Matroska container.
|
||||
|
||||
%package -n %{name}0
|
||||
|
||||
|
||||
License: BSD3c
|
||||
Summary: VP8 codec library
|
||||
Group: System/Libraries
|
||||
@ -88,17 +88,27 @@ The WebM file structure is based on the Matroska container.
|
||||
%prep
|
||||
%setup -q -n %name-v%version%patchlevel
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
cd build
|
||||
export CFLAGS="%{optflags}"
|
||||
# It is only an emulation of autotools configure; the macro does not work
|
||||
|
||||
# libvpx default enable NEON support on ARMv7, unfortunately some ARMv7
|
||||
# CPU doesn't have NEON, e.g. NVIDIA Tegra 2.
|
||||
# So, we still set -mfpu=neon when build libvpx rpm, but also enable
|
||||
# runtime-cpu-detect for runtime detect NEON.
|
||||
../configure \
|
||||
--prefix=%{_prefix} \
|
||||
--libdir=%{_libdir} \
|
||||
--enable-debug \
|
||||
--enable-shared \
|
||||
--enable-pic
|
||||
%ifarch armv7hl
|
||||
--target=armv7-linux-gcc \
|
||||
--enable-runtime-cpu-detect \
|
||||
%endif
|
||||
--enable-pic
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
|
Loading…
x
Reference in New Issue
Block a user