These changes allow the linux_app.cmake macros to correctly build binaries and shared objects. The preconditions for using this toolchain with the sfpro is that the Intrinsyc instructions for setting up the cross-compilation environment and the DSPAL/SLPI dev env have been completed.
Note: by removing the search path to sdsprpc.so (${HEXAGON_SDK_ROOT}/${SDKLIB}/common/remote/ship/UbuntuARM_${RELEASE}), we allow the linker to find the correct sdsprpc.so (correct in the sense that it is a soft-float abi). Without this change, the following error about VFP register arguments occurs:
/home/dspal/Qualcomm/cross_compiler/sysroots/x86_64-oesdk-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.3/real-ld: error: \
/home/dspal/Qualcomm/Hexagon_SDK/3.1/libs/common/remote/ship/UbuntuARM_Debug/libsdsprpc.so uses VFP register arguments, output does not
The linker is complaining that the compiler being used (from the Intrinsyc cross-compiler toolchain) does not have a hard-float abi, but the sdsprpc.so in the Hexagon SDK does [1]. This is verified using readelf -A libsdsprpc.so:
where APPS_COMPILER tends to be passed in as Qualcomm/ARM_Tools/gcc-4.9-2014.11/bin/arm-linux-gnueabihf-gcc, which has a hard-float abi [2].
[1]: This is likely related to the fact that Snapdragon 820 has a Kyro CPU, based on ARMv8-A (64 bit), but for some reason the yocto linux shipped is 32-bit.
[2]: Maybe this is actually itself a problem? Why do we have both soft-float and hard-float abi compilers? Why is the shipped OS 32-bit?
These changes allow the
linux_app.cmake
macros to correctly build binaries and shared objects. The preconditions for using this toolchain with the sfpro is that the Intrinsyc instructions for setting up the cross-compilation environment and the DSPAL/SLPI dev env have been completed.Note: by removing the search path to
sdsprpc.so
(${HEXAGON_SDK_ROOT}/${SDKLIB}/common/remote/ship/UbuntuARM_${RELEASE}
), we allow the linker to find the correctsdsprpc.so
(correct in the sense that it is a soft-float abi). Without this change, the following error aboutVFP register arguments
occurs:The linker is complaining that the compiler being used (from the Intrinsyc cross-compiler toolchain) does not have a hard-float abi, but the
sdsprpc.so
in the Hexagon SDK does [1]. This is verified usingreadelf -A libsdsprpc.so
:However, when we check the lib in the target sysroot:
That line is not present because a soft-float abi is being used.
It seems that using the
qurt_bundle
CMake macro does not expose this problem because of theadd_custom_target
stanza:where
APPS_COMPILER
tends to be passed in asQualcomm/ARM_Tools/gcc-4.9-2014.11/bin/arm-linux-gnueabihf-gcc
, which has a hard-float abi [2].[1]: This is likely related to the fact that Snapdragon 820 has a Kyro CPU, based on ARMv8-A (64 bit), but for some reason the yocto linux shipped is 32-bit. [2]: Maybe this is actually itself a problem? Why do we have both soft-float and hard-float abi compilers? Why is the shipped OS 32-bit?