<html>
  <head>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Hi, <br>
    </p>
    <p>I try to x-compile gstreamer for an embedded arm (32) device,
      roughly (using the monorepo instead) following this tutorial:</p>
    <p><a class="moz-txt-link-freetext" href="https://www.collabora.com/news-and-blog/blog/2020/05/15/cross-compiling-with-gst-build-and-gstreamer/">https://www.collabora.com/news-and-blog/blog/2020/05/15/cross-compiling-with-gst-build-and-gstreamer/</a></p>
    <p>For some reason it chokes on compiling <font face="monospace"><b>libavutil_arm_float_dsp_neon.S</b></font>.
      <br>
    </p>
    <p><font face="monospace">[5/2396] Compiling C object
        subprojects/FFmpeg/libavutil-static.a.p/libavutil_arm_float_dsp_neon.S.o<br>
        FAILED:
        subprojects/FFmpeg/libavutil-static.a.p/libavutil_arm_float_dsp_neon.S.o
        <br>
        arm-linux-gnueabihf-gcc
        -Isubprojects/FFmpeg/libavutil-static.a.p -Isubprojects/FFmpeg
        -I../subprojects/FFmpeg -fdiagnostics-color=always
        -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=c99 -O2 -g
        -D_ISOC99_SOURCE -D_GNU_SOURCE -D_LARGEFILE_SOURCE -DPIC
        -Wno-parentheses -Wno-pointer-sign -Wno-switch
        -Wno-format-truncation -Wno-deprecated-declarations
        -Wno-unused-function -Wno-maybe-uninitialized
        -Wno-discarded-qualifiers -Wno-unused-variable
        -Wno-bool-operation -Wno-incompatible-pointer-types -Wno-address
        -D_POSIX_C_SOURCE=200112 -D_XOPEN_SOURCE=600 -mthumb -fPIC
        -pthread -DHAVE_AV_CONFIG_H -DBUILDING_avutil -MD -MQ
        subprojects/FFmpeg/libavutil-static.a.p/libavutil_arm_float_dsp_neon.S.o
        -MF
subprojects/FFmpeg/libavutil-static.a.p/libavutil_arm_float_dsp_neon.S.o.d
        -o subprojects/FFmpeg/libavutil-static.a.p/<b>libavutil_arm_float_dsp_neon.S</b>.o
        -c ../subprojects/FFmpeg/libavutil/arm/float_dsp_neon.S<br>
        ../subprojects/FFmpeg/libavutil/arm/float_dsp_neon.S: Assembler
        messages:<br>
        ../subprojects/FFmpeg/libavutil/arm/float_dsp_neon.S:29: Error:
        selected FPU does not support instruction -- `vmul.f32 q8,q0,q2'<br>
        ../subprojects/FFmpeg/libavutil/arm/float_dsp_neon.S:30: Error:
        selected FPU does not support instruction -- `vmul.f32 q9,q1,q3'<br>
      </font>... many more like this<br>
    </p>
    <p>So apparently the compiler assumes a CPU without neon. If I add
      the appropriate compiler flags manually to the above command it
      compiles the file fine. The question is, how do I tell meson which
      features my cpu has, so the correct compiler flags are passed
      within the build?</p>
    <p>My guess is that I'm missing out on some banality<br>
    </p>
    <p>CPU:</p>
    <p><font face="monospace">processor       : 0<br>
        model name      : ARMv7 Processor rev 10 (v7l)<br>
        BogoMIPS        : 6.00<br>
        Features        : half thumb fastmult vfp edsp thumbee neon
        vfpv3 tls vfpd32<br>
        CPU implementer : 0x41<br>
        CPU architecture: 7<br>
        CPU variant     : 0x2<br>
        CPU part        : 0xc09<br>
        CPU revision    : 10<br>
        <br>
        processor       : 1<br>
        model name      : ARMv7 Processor rev 10 (v7l)<br>
        BogoMIPS        : 6.00<br>
        Features        : half thumb fastmult vfp edsp thumbee neon
        vfpv3 tls vfpd32<br>
        CPU implementer : 0x41<br>
        CPU architecture: 7<br>
        CPU variant     : 0x2<br>
        CPU part        : 0xc09<br>
        CPU revision    : 10<br>
        <br>
        Hardware        : Freescale i.MX6 Quad/DualLite (Device Tree)<br>
        Revision        : 0000<br>
        Serial          : 0000000000000000<br>
      </font><br>
    </p>
    <p>My cross compile file is:</p>
    <p><font face="monospace">[build_machine]<br>
        system = 'linux'<br>
        cpu_family = 'x86_64'<br>
        cpu = 'x86_64'<br>
        endian = 'little'<br>
        <br>
        [binaries]<br>
        c = ['arm-linux-gnueabihf-gcc']<br>
        cpp = ['arm-linux-gnueabihf-g++']<br>
        ar = ['arm-linux-gnueabihf-ar']<br>
        pkgconfig = 'pkg-config'<br>
        strip = ['arm-linux-gnueabihf-strip']<br>
        cmake = ['false']<br>
        #pkgconfig = ['arm-linux-gnueabihf-pkg-config']<br>
        <br>
        [host_machine]<br>
        system = 'linux'<br>
        cpu_family = 'arm'<br>
        cpu = 'arm'<br>
        endian = 'little'<br>
        <br>
        [properties]<br>
        c_args = []<br>
        cpp_args = []<br>
        objc_args = []<br>
        objcpp_args = []<br>
        c_link_args = ['-L/sysroot/lib', '-Wl,-rpath-link=/sysroot/lib']<br>
        cpp_link_args = ['-L/sysroot/lib',
        '-Wl,-rpath-link=/sysroot/lib']<br>
        objc_link_args = ['-L/sysroot/lib',
        '-Wl,-rpath-link=/sysroot/lib']<br>
        objcpp_link_args = ['-L/sysroot/lib',
        '-Wl,-rpath-link=/sysroot/lib']<br>
        pkg_config_libdir =
        ['/sysroot/lib/pkgconfig:/sysroot/usr/share/pkgconfig']<br>
        sys_root = '/sysroot/'</font><br>
    </p>
    <p>Thanks</p>
    <p>Holger</p>
    <p><br>
    </p>
  </body>
</html>