This repository has been archived by the owner on Dec 20, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
manually set desired compiler defaults for target gcc on armhf
The way that Yocto works when compiling is to build "default" compilers for the target architecture, then to apply the "tunes" (FPU settings, SIMD extensions, etc) by replacing $CC with a very long invocation that includes all of the stuff you set up in your machine/architecture recipes. Unfortunately this means that if you ask Yocto to build a compiler for you, and then take it outside of the Yocto build environment, the compiler doesn't inherently default to any of the same tunes which were used at the time of building the platform/SDK. On ARM this is particularly bad because it means the Flatpak SDK has effectively been building binaries with a different ABI to the platform, including soft rather than hard float, no VFP, no thumb, etc. This has caused build failures as pretty much everyone (whether armel or armhf) assumes VFP is available, and is very likely to cause app crashes at runtime in apps that use floating point due to not preserving the right registers in the calling convention. For our ARM v7 platform, manually set the configure options for gcc so that the selected/intended ABI/tunes are set for the compiler inside the SDK, rather than only at the time we compile the SDK itself. (This is an instance of https://bugzilla.yoctoproject.org/show_bug.cgi?id=139 upstream in Yocto - also known as "nobody who uses Yocto uses the compiler inside the image".) #8
- Loading branch information