Bug kodi build on raspbian/armv6l ignores specified compiler arch/cpu for xbmc.bin
#1
I'm building kodi/head
Code:
    git log | head
        commit f78c550a321b1ac42ce30d77aebe60420dab2eee
        Merge: a2dcf3d c40edff
        Author: popcornmix <[email protected]>
        Date:   Tue Sep 9 13:25:55 2014 +0100

            Merge pull request #5240 from popcornmix/generalreset
            
            [omxplayer] Don't flush queued data on general reset

        commit a2dcf3d26bb137f2874393bde89a6c7de0612d79
with an arch=armv6 compiler
Code:
    gcc -v
        Using built-in specs.
        COLLECT_GCC=gcc
        COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.9/lto-wrapper
        Target: arm-linux-gnueabihf
        Configured with: ../src/configure -v --with-pkgversion='Raspbian 4.9.1-12' --with-bugurl=file:///usr/share/doc/gcc-4.9/README.Bugs --enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.9 --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.9 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --disable-libquadmath --enable-plugin --with-system-zlib --disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf/jre --enable-java-home --with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.9-armhf --with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.9-armhf --with-arch-directory=arm --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc --enable-multiarch --disable-sjlj-exceptions --with-arch=armv6 --with-fpu=vfp --with-float=hard --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
        Thread model: posix
        gcc version 4.9.1 (Raspbian 4.9.1-12)
for Rpi
Code:
    ./configure --with-platform=raspberry-pi ...
the build completes
Code:
    make
        ...
        make[1]: Leaving directory '/usr/local/src/xbmc/xbmc/cores/paplayer'
        /usr/bin/ccache /usr/bin/g++-4.9 -O3 -pipe -D_FORTIFY_SOURCE=2 -fmessage-length=0 -fstack-protector -march=armv6zk  -mfpu=vfp  -mfloat-abi=hard -mtune=arm1176jzf-s -mcpu=arm1176jzf-s -Wno-psabi -Wa,-mno-warn-deprecated -Wno-deprecated-declarations -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -O3 -pipe -D_FORTIFY_SOURCE=2 -fmessage-length=0 -fstack-protector -march=armv6zk  -mfpu=vfp  -mfloat-abi=hard -mtune=arm1176jzf-s -mcpu=arm1176jzf-s -Wno-psabi -Wa,-mno-warn-deprecated -Wno-deprecated-declarations -Wl,--dynamic-linker=/lib/ld-linux-armhf.so.3 -fPIC -DPIC -D_REENTRANT -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -L/usr/local/lib -L/usr/local/lib -o xbmc.bin
        ...
        -----------------------
        XBMC built successfully
        -----------------------
with
Code:
    file ./xbmc.bin
        xbmc.bin: ELF 32-bit LSB executable, ARM, EABI5 version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=98acf7f72d4fefc9942a338e3414bfc1f5cd0dcb, not stripped

    ./xbmc.bin -v
        XBMC Media Center 14.0-ALPHA4 Git:2014-09-10-f78c550-dirty
        Copyright (C) 2005-2013 Team XBMC - http://xbmc.org
checking readelf output for arch on one of the built libs
Code:
    readelf -A ./system/players/dvdplayer/libdvdnav-arm.so
        Attribute Section: aeabi
        File Attributes
          Tag_CPU_name: "ARM1176JZF-S"
          Tag_CPU_arch: v6KZ
          Tag_ARM_ISA_use: Yes
          Tag_THUMB_ISA_use: Thumb-1
          Tag_FP_arch: VFPv2
          Tag_ABI_PCS_wchar_t: 4
          Tag_ABI_FP_denormal: Needed
          Tag_ABI_FP_exceptions: Needed
          Tag_ABI_FP_number_model: IEEE 754
          Tag_ABI_align_needed: 8-byte
          Tag_ABI_align_preserved: 8-byte, except leaf SP
          Tag_ABI_enum_size: int
          Tag_ABI_HardFP_use: SP and DP
          Tag_ABI_VFP_args: VFP registers
          Tag_CPU_unaligned_access: v6
          Tag_Virtualization_use: TrustZone
looks as intended: CPU == ARM1176JZF-S & ARCH == v6KZ

but, checking the xbmc.bin itself, returns, instead CPU == 7-A & ARCH == v7,
Code:
    readelf -A ./xbmc.bin
        Attribute Section: aeabi
        File Attributes
          Tag_CPU_name: "7-A"
          Tag_CPU_arch: v7
          Tag_CPU_arch_profile: Application
          Tag_ARM_ISA_use: Yes
          Tag_THUMB_ISA_use: Thumb-2
          Tag_FP_arch: VFPv3
          Tag_Advanced_SIMD_arch: NEONv1
          Tag_ABI_PCS_wchar_t: 4
          Tag_ABI_FP_rounding: Needed
          Tag_ABI_FP_denormal: Needed
          Tag_ABI_FP_exceptions: Needed
          Tag_ABI_FP_number_model: IEEE 754
          Tag_ABI_align_needed: 8-byte
          Tag_ABI_enum_size: int
          Tag_ABI_HardFP_use: SP and DP
          Tag_ABI_VFP_args: VFP registers
          Tag_CPU_unaligned_access: v6
          Tag_Virtualization_use: TrustZone
Note in the latter case,
Code:
          Tag_Advanced_SIMD_arch: NEONv1
looks like it's built for neon.

but, the case in ./configure for
Code:
    --with-platform=raspberry-pi \
sets
Code:
    case $use_platform in
      raspberry-pi)
         target_platform=target_raspberry_pi
         use_neon=no
         use_arch="arm"
         use_cpu=arm1176jzf-s
         use_hardcoded_tables="yes"
         use_alsa="no"
         ARCH="arm"
which, iiuc, should be armv6 & no neon.

it appears that the platform case is being ignored or mistakenly reset/changed, building parts with the correct/intended arch, but the main bin with the wrong arch.

Is this config, or code?
Reply
#2
its the way you build.
--with-platform=raspberry-pi is only supported and properly working when building with unified depends. read tools/depends/README
Reply

Logout Mark Read Team Forum Stats Members Help
kodi build on raspbian/armv6l ignores specified compiler arch/cpu for xbmc.bin0