]> code.ossystems Code Review - openembedded-core.git/commit
musl: use a more specific fix for ARM thumb + frame pointers
authorAndre McCurdy <armccurdy@gmail.com>
Mon, 9 Oct 2017 16:00:35 +0000 (09:00 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Oct 2017 22:52:03 +0000 (23:52 +0100)
commitd7580cd7792982fd9e98086e4edc490635e9adca
tree0d3581c86ef7bdc0aa59e66bcb58e23a63827442
parent71236e56cdc46b2e08fb5e06b06ea857a140288c
musl: use a more specific fix for ARM thumb + frame pointers

When compiling for Thumb or Thumb2, frame pointers _must_ be disabled
since the Thumb frame pointer in r7 clashes with musl's use of inline
asm to make syscalls (where r7 is used for the syscall NR).

In most cases, frame pointers will be disabled automatically due to
the optimisation level, but appending an explicit -fomit-frame-pointer
to CFLAGS handles cases where optimisation is set to -O0 or frame
pointers have been enabled by -fno-omit-frame-pointer earlier in
CFLAGS, etc.

Note that this limitation applies both to gcc and clang, the only
difference between the two being that where gcc aborts with an error
about reusing r7, clang apparently silently generates broken code:

  https://bugs.llvm.org/show_bug.cgi?id=34165

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/recipes-core/musl/musl_git.bb