Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] pulseaudio: fix for ARM thumb + frame pointers compilation error
@ 2020-03-26 15:26 Stefan Ghinea
  2020-03-26 17:23 ` [OE-core] " Andre McCurdy
                   ` (3 more replies)
  0 siblings, 4 replies; 12+ messages in thread
From: Stefan Ghinea @ 2020-03-26 15:26 UTC (permalink / raw)
  To: openembedded-core

From: Catalin Enache <catalin.enache@windriver.com>

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>
---
 meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 8 ++++++++
 1 file changed, 8 insertions(+)

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"
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-07-18  4:09 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-03-26 15:26 [PATCH] pulseaudio: fix for ARM thumb + frame pointers compilation error Stefan Ghinea
2020-03-26 17:23 ` [OE-core] " Andre McCurdy
2020-03-26 19:16 ` Adrian Bunk
2020-03-26 19:53   ` Andre McCurdy
2020-03-26 20:26     ` Adrian Bunk
2020-03-26 21:23       ` Andre McCurdy
2020-03-27 18:56         ` Adrian Bunk
2020-07-17 10:09         ` Tanu Kaskinen
2020-07-17 19:19           ` Andre McCurdy
2020-07-18  4:09             ` Tanu Kaskinen
2020-03-30 16:29 ` Tanu Kaskinen
     [not found] ` <160121D94406B75D.27565@lists.openembedded.org>
2020-03-30 16:52   ` Tanu Kaskinen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox