diff options
Diffstat (limited to 'meta/recipes-core/musl/musl_git.bb')
-rw-r--r-- | meta/recipes-core/musl/musl_git.bb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/meta/recipes-core/musl/musl_git.bb b/meta/recipes-core/musl/musl_git.bb index 8b6a2e3454..bd7573e0f3 100644 --- a/meta/recipes-core/musl/musl_git.bb +++ b/meta/recipes-core/musl/musl_git.bb @@ -28,7 +28,13 @@ export CROSS_COMPILE="${TARGET_PREFIX}" LDFLAGS += "-Wl,-soname,libc.so" -ARM_INSTRUCTION_SET_toolchain-clang = "arm" +# 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 append an explicit +# -fomit-frame-pointer to handle cases where optimisation is set to -O0 or frame +# pointers have been enabled by -fno-omit-frame-pointer earlier in CFLAGS, etc. +CFLAGS_append_arm = " ${@bb.utils.contains('TUNE_CCARGS', '-mthumb', '-fomit-frame-pointer', '', d)}" CONFIGUREOPTS = " \ --prefix=${prefix} \ |