summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorCatalin Enache <catalin.enache@windriver.com>2020-03-26 17:26:29 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-29 20:03:30 +0100
commitb199a9dbc3440d7c4fad8d8baeea931a6b7381c1 (patch)
treee7ea14ecbc7a6e0d24b64c841f1f862d5807f9ac /meta/recipes-multimedia
parent732a9c83e946580607af3478cdc765d6541e3f64 (diff)
downloadopenembedded-core-contrib-b199a9dbc3440d7c4fad8d8baeea931a6b7381c1.tar.gz
pulseaudio: fix for ARM thumb + frame pointers compilation error
When compiling for Thumb or Thumb2, frame pointers _must_ be disabled since the Thumb frame pointer in r7 clashes with pulseaudio'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. References: https://www.openwall.com/lists/musl/2017/10/09/2 Signed-off-by: Catalin Enache <catalin.enache@windriver.com> Signed-off-by: Stefan Ghinea <stefan.ghinea@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc8
1 files changed, 8 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 4e32b27087..c7f3e67022 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -63,6 +63,14 @@ DEPENDS += "speexdsp libxml-parser-perl-native libcap"
inherit autotools bash-completion pkgconfig useradd gettext perlnative systemd manpages gsettings
+# When compiling for Thumb or Thumb2, frame pointers _must_ be disabled since the
+# Thumb frame pointer in r7 clashes with pulseaudio'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)}"
+
# *.desktop rules wont be generated during configure and build will fail
# if using --disable-nls
USE_NLS = "yes"