On Thu, Mar 26, 2020 at 8:26 AM Stefan Ghinea <[email protected]> wrote: > > From: Catalin Enache <[email protected]> > > 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 <[email protected]> > Signed-off-by: Stefan Ghinea <[email protected]> > --- > 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)}"
This is OK and safe to merge but note that it's now regarded as the "old style" fix for this problem. The newer approach is to tweak the asm code to save the frame pointer before making the syscall and restore it afterwards. e.g. https://github.com/strace/strace/commit/0c75ebaad09d6d3f2395dfe6160904af883dd0d9 If pulseaudio can be fixed in the same way then that's probably a better approach. > # *.desktop rules wont be generated during configure and build will fail > # if using --disable-nls > USE_NLS = "yes" > -- > 2.17.1
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#136764): https://lists.openembedded.org/g/openembedded-core/message/136764 Mute This Topic: https://lists.openembedded.org/mt/72566057/21656 Group Owner: [email protected] Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
