[Bug 224107] multimedia/libvpx: broken on armv*, add an armv6-linux-gcc target

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Tue Dec 5 10:57:20 UTC 2017


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224107

            Bug ID: 224107
           Summary: multimedia/libvpx: broken on armv*, add an
                    armv6-linux-gcc target
           Product: Ports & Packages
           Version: Latest
          Hardware: arm
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: Individual Port(s)
          Assignee: jbeich at FreeBSD.org
          Reporter: mikael.urankar at gmail.com
                CC: freebsd-arm at FreeBSD.org
             Flags: maintainer-feedback?(jbeich at FreeBSD.org)
                CC: freebsd-arm at FreeBSD.org
          Assignee: jbeich at FreeBSD.org

Created attachment 188541
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=188541&action=edit
patch

* the following condition is not correct, we can specify -mcpu=cortex-a7 to
build for armv7:
if ${CFLAGS:M-march=armv7*}

 * I would like to add an armv6-linux-gcc target so we can benefit the
arm_cpudetect feature on armv6

 * 2 problems (an error and a warning) in patch-vpx__ports_arm__cpudetect.c:

When we have the sys/auxv.h header we miss the getauxval function (sys/auxv.h
doesn't provide it)

#if __has_include(<sys/auxv.h>)
#include <sys/auxv.h>
#else
snip
int arm_cpu_caps(void) {
snip
hwcaps = getauxval(AT_HWCAP);
snip

so the build fails:
vpx_ports/arm_cpudetect.c.o: In function `arm_cpu_caps':
vpx_ports/arm_cpudetect.c:(.text+0x50): undefined reference to `getauxval'


the 2nd problem is that we don't provide the prototype for getauxval:

cc  -O -pipe  -fno-strict-aliasing -march=armv6 -DNDEBUG -O3 -fPIC
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64 -Wall -Wdeclaration-after-statement
-Wdisabled-optimization -W
float-conversion -Wpointer-arith -Wtype-limits -Wcast-qual -Wvla
-Wimplicit-function-declaration -Wuninitialized -Wunused -Wextra -Wundef
-Wshorten-64-to-32 -I. -I"/usr/ports/multimedia/libvpx/work/libvpx-1.6.1
" -c -o vpx_ports/arm_cpudetect.c.o vpx_ports/arm_cpudetect.c                   
vpx_ports/arm_cpudetect.c:198:12: warning: implicit declaration of function
'getauxval' is invalid in C99 [-Wimplicit-function-declaration]                 
  hwcaps = getauxval(AT_HWCAP);


The attached patch addresses the first 2 points, I don't know the code well
enough to fix the others problems.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list