extra/libvpx: fix arm build

This commit is contained in:
Kevin Mihelich 2013-12-07 21:39:15 +00:00
parent 8d2d140adb
commit bbde00e341
2 changed files with 70 additions and 2 deletions

View file

@ -2,6 +2,7 @@
# Maintainer: Ionut Biru <ibiru@archlinux.org>
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
# - patch to fix building
# - disable neon
pkgname=libvpx
@ -14,11 +15,14 @@ license=('BSD')
depends=('glibc')
makedepends=('yasm')
makedepends=('yasm' 'git')
source=($pkgname::git+http://code.google.com/p/webm.libvpx#tag=v$pkgver)
md5sums=('SKIP')
source=($pkgname::git+http://code.google.com/p/webm.libvpx#tag=v$pkgver
fix-armhf-link.patch)
md5sums=('SKIP'
'018b866555f34c366c397797b2663994')
build() {
cd $pkgname
patch -p1 -i ../fix-armhf-link.patch
./configure --prefix=/usr \
--enable-vp8 \
--enable-vp9 \

View file

@ -0,0 +1,64 @@
diff -urN a/build/make/configure.sh b/build/make/configure.sh
--- a/build/make/configure.sh 2013-12-07 14:22:52.597542382 -0700
+++ b/build/make/configure.sh 2013-12-07 14:26:51.541053756 -0700
@@ -601,10 +601,14 @@
# detect tgt_isa
case "$gcctarget" in
+ armv6*-gnueabihf)
+ tgt_isa=armv6
+ float_abi=hard
+ ;;
armv6*)
tgt_isa=armv6
;;
- armv7*-hardfloat*)
+ armv7*-gnueabihf)
tgt_isa=armv7
float_abi=hard
;;
@@ -614,6 +618,7 @@
;;
armv5te*)
tgt_isa=armv5te
+ float_abi=soft
;;
*x86_64*|*amd64*)
tgt_isa=x86_64
@@ -799,7 +804,6 @@
case ${tgt_cc} in
gcc)
- CROSS=${CROSS:-arm-none-linux-gnueabi-}
link_with_cc=gcc
setup_gnu_toolchain
arch_int=${tgt_isa##armv}
@@ -807,13 +811,6 @@
check_add_asflags --defsym ARCHITECTURE=${arch_int}
tune_cflags="-mtune="
if [ ${tgt_isa} = "armv7" ]; then
- if [ -z "${float_abi}" ]; then
- check_cpp <<EOF && float_abi=hard || float_abi=softfp
-#ifndef __ARM_PCS_VFP
-#error "not hardfp"
-#endif
-EOF
- fi
check_add_cflags -march=armv7-a -mfloat-abi=${float_abi}
check_add_asflags -march=armv7-a -mfloat-abi=${float_abi}
@@ -823,12 +820,9 @@
check_add_asflags -mfpu=neon
fi
- if [ -z "${tune_cpu}" ]; then
- tune_cpu=cortex-a8
- fi
else
- check_add_cflags -march=${tgt_isa}
- check_add_asflags -march=${tgt_isa}
+ check_add_cflags -march=${tgt_isa} -mfloat-abi=${float_abi}
+ check_add_asflags -march=${tgt_isa} -mfloat-abi=${float_abi}
fi
enabled debug && add_asflags -g