FreeBSD Bugzilla – Attachment 188579 Details for
Bug 224107
multimedia/libvpx: broken on armv*, add an armv6-linux-gcc target
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch
multimedia_libvpx.diff (text/plain), 5.92 KB, created by
Mikael Urankar
on 2017-12-06 09:56:54 UTC
(
hide
)
Description:
patch
Filename:
MIME Type:
Creator:
Mikael Urankar
Created:
2017-12-06 09:56:54 UTC
Size:
5.92 KB
patch
obsolete
>Index: Makefile >=================================================================== >--- Makefile (revision 455581) >+++ Makefile (working copy) >@@ -31,6 +31,7 @@ > # Only explicitly list ARCHs with SIMD optimizations > CONFIGURE_ARGS_aarch64= --target=arm64-linux-gcc > CONFIGURE_ARGS_amd64= --target=x86_64-linux-gcc >+CONFIGURE_ARGS_armv6= --target=armv6-linux-gcc > CONFIGURE_ARGS_armv7= --target=armv7-linux-gcc > CONFIGURE_ARGS_i386= --target=x86-linux-gcc > CONFIGURE_ARGS+=${CONFIGURE_ARGS_${ARCH}} \ >@@ -42,15 +43,10 @@ > --enable-vp9 > MAKE_ARGS+= verbose=yes > ASFLAGS+= ${ASFLAGS_${ARCH}} >+ASFLAGS_armv6= -meabi=5 > ASFLAGS_armv7= -meabi=5 > ALL_TARGET= # empty > >-# armv7 is actually armv6 target before FreeBSD 12.0 >-.if ${CFLAGS:M-march=armv7*} >-CONFIGURE_ARGS+= ${CONFIGURE_ARGS_armv7} >-ASFLAGS+= ${ASFLAGS_armv7} >-.endif >- > OPTIONS_DEFINE= DEBUG MULTIRES POSTPROC RTCPU SHARED SIZE_LIMIT TEST THREADS > OPTIONS_DEFAULT=MULTIRES POSTPROC RTCPU SHARED SIZE_LIMIT THREADS > OPTIONS_EXCLUDE_aarch64=RTCPU >Index: files/patch-build_make_configure.sh >=================================================================== >--- files/patch-build_make_configure.sh (nonexistent) >+++ files/patch-build_make_configure.sh (working copy) >@@ -0,0 +1,17 @@ >+--- build/make/configure.sh.orig 2017-12-05 12:21:54 UTC >++++ build/make/configure.sh >+@@ -680,6 +680,14 @@ process_common_toolchain() { >+ aarch64*) >+ tgt_isa=arm64 >+ ;; >++ armv6*-gnueabihf) >++ tgt_isa=armv6 >++ float_abi=hard >++ ;; >++ armv6*-gnueabi) >++ tgt_isa=armv6 >++ float_abi=softfp >++ ;; >+ armv7*-hardfloat* | armv7*-gnueabihf | arm-*-gnueabihf) >+ tgt_isa=armv7 >+ float_abi=hard > >Property changes on: files/patch-build_make_configure.sh >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-configure >=================================================================== >--- files/patch-configure (nonexistent) >+++ files/patch-configure (working copy) >@@ -0,0 +1,10 @@ >+--- configure.orig 2017-12-05 11:21:00.447522000 +0100 >++++ configure 2017-12-05 11:20:52.815463000 +0100 >+@@ -101,6 +101,7 @@ EOF >+ all_platforms="${all_platforms} arm64-android-gcc" >+ all_platforms="${all_platforms} arm64-darwin-gcc" >+ all_platforms="${all_platforms} arm64-linux-gcc" >++all_platforms="${all_platforms} armv6-linux-gcc" #armv6 >+ all_platforms="${all_platforms} armv7-android-gcc" #neon Cortex-A8 >+ all_platforms="${all_platforms} armv7-darwin-gcc" #neon Cortex-A8 >+ all_platforms="${all_platforms} armv7-linux-rvct" #neon Cortex-A8 > >Property changes on: files/patch-configure >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-patch-vpx__ports_arm__cpudetect.c >=================================================================== >--- files/patch-patch-vpx__ports_arm__cpudetect.c (nonexistent) >+++ files/patch-patch-vpx__ports_arm__cpudetect.c (working copy) >@@ -0,0 +1,59 @@ >+--- vpx_ports/arm_cpudetect.c.orig 2017-01-12 21:27:27 UTC >++++ vpx_ports/arm_cpudetect.c >+@@ -147,6 +147,56 @@ int arm_cpu_caps(void) { >+ } >+ return flags & mask; >+ } >++#elif defined(__FreeBSD__) >++ >++#include <sys/param.h> >++#include <sys/sysctl.h> >++#include <elf.h> >++#include <errno.h> >++#include <unistd.h> >++ >++static unsigned long getauxval(unsigned long type) { >++ Elf_Auxinfo auxv[AT_COUNT]; >++ size_t len = sizeof(auxv); >++ int mib[] = { >++ CTL_KERN, >++ KERN_PROC, >++ KERN_PROC_AUXV, >++ getpid(), >++ }; >++ >++ if (sysctl(mib, nitems(mib), auxv, &len, NULL, 0) != -1) { >++ for (size_t i = 0; i < nitems(auxv); i++) >++ if ((unsigned long)auxv[i].a_type == type) >++ return auxv[i].a_un.a_val; >++ >++ errno = ENOENT; >++ } >++ return 0; >++} >++ >++#ifndef AT_HWCAP >++#define AT_HWCAP 25 /* 16 on Linux */ >++#endif >++ >++#ifndef HWCAP_NEON >++#define HWCAP_NEON (1 << 12) >++#endif >++ >++int arm_cpu_caps(void) { >++ int flags; >++ int mask; >++ unsigned long hwcaps; >++ if (!arm_cpu_env_flags(&flags)) { >++ return flags; >++ } >++ mask = arm_cpu_env_mask(); >++ hwcaps = getauxval(AT_HWCAP); >++#if HAVE_NEON || HAVE_NEON_ASM >++ if (hwcaps & HWCAP_NEON) flags |= HAS_NEON; >++#endif >++ return flags & mask; >++} >+ #else /* end __linux__ */ >+ #error \ >+ "--enable-runtime-cpu-detect selected, but no CPU detection method " \ > >Property changes on: files/patch-patch-vpx__ports_arm__cpudetect.c >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property >Index: files/patch-vpx__ports_arm.h >=================================================================== >--- files/patch-vpx__ports_arm.h (nonexistent) >+++ files/patch-vpx__ports_arm.h (working copy) >@@ -0,0 +1,10 @@ >+--- vpx_ports/arm.h.orig 2017-12-05 14:10:15 UTC >++++ vpx_ports/arm.h >+@@ -24,6 +24,7 @@ extern "C" { >+ /*ARMv7 optional NEON instructions.*/ >+ #define HAS_NEON 0x04 >+ >++static unsigned long getauxval(unsigned long type); >+ int arm_cpu_caps(void); >+ >+ // Earlier gcc compilers have issues with some neon intrinsics > >Property changes on: files/patch-vpx__ports_arm.h >___________________________________________________________________ >Added: fbsd:nokeywords >## -0,0 +1 ## >+yes >\ No newline at end of property >Added: svn:eol-style >## -0,0 +1 ## >+native >\ No newline at end of property >Added: svn:mime-type >## -0,0 +1 ## >+text/plain >\ No newline at end of property
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 224107
:
188541
| 188579