* [PATCH] pulseaudio: define -mfloat-abi=softfp for CC on armv5 @ 2020-12-29 2:36 Yu, Mingli 2020-12-29 3:29 ` [OE-core] " Andre McCurdy 0 siblings, 1 reply; 10+ messages in thread From: Yu, Mingli @ 2020-12-29 2:36 UTC (permalink / raw) To: openembedded-core From: Mingli Yu <mingli.yu@windriver.com> After pulseaudio upgrades from 13.0 to 14.0, it also switches from autotools to meson and there's no option for disabling Neon optimizations with meson. And the build system adds -mfpu=neon at the end of the compiler command line which overrids any earlier -mfpu options and result below build failure: | /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0-r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" | 31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" | ^~~~~ | ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function 'pa_mix_ch2_s16ne_neon': | ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type name 'int32x4_t'; did you mean 'int32_t'? | 38 | int32x4_t sum0, sum1; Define -mfloat-abi=softfp for CC on armv5 to fix the above issue. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 + 1 file changed, 1 insertion(+) diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index e40b8c1c40..44a6a3055e 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -123,6 +123,7 @@ PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," export TARGET_PFPU = "${TARGET_FPU}" +export CC_append_armv5 = " -mfloat-abi=softfp" set_cfg_value () { sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" -- 2.26.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] pulseaudio: define -mfloat-abi=softfp for CC on armv5 2020-12-29 2:36 [PATCH] pulseaudio: define -mfloat-abi=softfp for CC on armv5 Yu, Mingli @ 2020-12-29 3:29 ` Andre McCurdy 2020-12-29 3:35 ` Yu, Mingli 2021-01-05 3:37 ` [PATCH v2] " Yu, Mingli 0 siblings, 2 replies; 10+ messages in thread From: Andre McCurdy @ 2020-12-29 3:29 UTC (permalink / raw) To: Yu, Mingli; +Cc: OE Core mailing list On Mon, Dec 28, 2020 at 6:36 PM Yu, Mingli <mingli.yu@windriver.com> wrote: > > From: Mingli Yu <mingli.yu@windriver.com> > > After pulseaudio upgrades from 13.0 to 14.0, it also switches from autotools > to meson and there's no option for disabling Neon optimizations with meson. > And the build system adds -mfpu=neon at the end of the compiler command line > which overrids any earlier -mfpu options and result below build failure: > > | /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0-r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" > | 31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" > | ^~~~~ > | ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function 'pa_mix_ch2_s16ne_neon': > | ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type name 'int32x4_t'; did you mean 'int32_t'? > | 38 | int32x4_t sum0, sum1; > > Define -mfloat-abi=softfp for CC on armv5 to fix the above issue. Doesn't look right. That forces the whole package to be compiled with floating point instructions, which will break targets which need soft float. > Signed-off-by: Mingli Yu <mingli.yu@windriver.com> > --- > meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > index e40b8c1c40..44a6a3055e 100644 > --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > @@ -123,6 +123,7 @@ PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," > PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," > > export TARGET_PFPU = "${TARGET_FPU}" > +export CC_append_armv5 = " -mfloat-abi=softfp" Aside from the fact that the change itself looks wrong, what is export with a conditional append supposed to do? Export unconditionally (and so have a side effect for targets other than armv5)? Export only if the conditional append took effect? Since most people have no idea, it's better to keep export and the conditional append separate. > set_cfg_value () { > sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" > -- > 2.26.2 > > > > ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH] pulseaudio: define -mfloat-abi=softfp for CC on armv5 2020-12-29 3:29 ` [OE-core] " Andre McCurdy @ 2020-12-29 3:35 ` Yu, Mingli 2021-01-05 3:37 ` [PATCH v2] " Yu, Mingli 1 sibling, 0 replies; 10+ messages in thread From: Yu, Mingli @ 2020-12-29 3:35 UTC (permalink / raw) To: Andre McCurdy; +Cc: OE Core mailing list [-- Attachment #1: Type: text/plain, Size: 2893 bytes --] Hi Andre, The override for CC is just for armv5 and it shouldn't affect other BSPS. Thanks, ________________________________ From: Andre McCurdy <armccurdy@gmail.com> Sent: Tuesday, December 29, 2020 11:29 To: Yu, Mingli <Mingli.Yu@windriver.com> Cc: OE Core mailing list <openembedded-core@lists.openembedded.org> Subject: Re: [OE-core] [PATCH] pulseaudio: define -mfloat-abi=softfp for CC on armv5 On Mon, Dec 28, 2020 at 6:36 PM Yu, Mingli <mingli.yu@windriver.com> wrote: > > From: Mingli Yu <mingli.yu@windriver.com> > > After pulseaudio upgrades from 13.0 to 14.0, it also switches from autotools > to meson and there's no option for disabling Neon optimizations with meson. > And the build system adds -mfpu=neon at the end of the compiler command line > which overrids any earlier -mfpu options and result below build failure: > > | /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0-r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" > | 31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" > | ^~~~~ > | ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function 'pa_mix_ch2_s16ne_neon': > | ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type name 'int32x4_t'; did you mean 'int32_t'? > | 38 | int32x4_t sum0, sum1; > > Define -mfloat-abi=softfp for CC on armv5 to fix the above issue. Doesn't look right. That forces the whole package to be compiled with floating point instructions, which will break targets which need soft float. > Signed-off-by: Mingli Yu <mingli.yu@windriver.com> > --- > meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > index e40b8c1c40..44a6a3055e 100644 > --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > @@ -123,6 +123,7 @@ PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," > PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," > > export TARGET_PFPU = "${TARGET_FPU}" > +export CC_append_armv5 = " -mfloat-abi=softfp" Aside from the fact that the change itself looks wrong, what is export with a conditional append supposed to do? Export unconditionally (and so have a side effect for targets other than armv5)? Export only if the conditional append took effect? Since most people have no idea, it's better to keep export and the conditional append separate. > set_cfg_value () { > sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" > -- > 2.26.2 > > > > [-- Attachment #2: Type: text/html, Size: 4719 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v2] pulseaudio: define -mfloat-abi=softfp for CC on armv5 2020-12-29 3:29 ` [OE-core] " Andre McCurdy 2020-12-29 3:35 ` Yu, Mingli @ 2021-01-05 3:37 ` Yu, Mingli 2021-01-05 12:37 ` [OE-core] " Richard Purdie 1 sibling, 1 reply; 10+ messages in thread From: Yu, Mingli @ 2021-01-05 3:37 UTC (permalink / raw) To: openembedded-core, armccurdy, tanuk From: Mingli Yu <mingli.yu@windriver.com> After pulseaudio upgrades from 13.0 to 14.0, it also switches from autotools to meson. In autotools, there is --disable-neon-opt option for disabling NEON optimizations, but there is no counterpart in meson. And the meson build system adds -mfpu=neon at the end of the compiler command line which overrids any earlier -mfpu options and result below build failure on armv5: | /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0-r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" | 31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" | ^~~~~ | ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function 'pa_mix_ch2_s16ne_neon': | ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type name 'int32x4_t'; did you mean 'int32_t'? | 38 | int32x4_t sum0, sum1; Define -mfloat-abi=softfp for CC on armv5 to fix the above issue. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index e40b8c1c40..761e4f74dc 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -123,6 +123,11 @@ PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," export TARGET_PFPU = "${TARGET_FPU}" +# workaround build failure on qemuarmv5 as the neon optimizations is +# enabled by default and no option to disable neon with meson build +# system +CC_append_armv5 = " -mfloat-abi=softfp" +export CC set_cfg_value () { sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" -- 2.26.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH v2] pulseaudio: define -mfloat-abi=softfp for CC on armv5 2021-01-05 3:37 ` [PATCH v2] " Yu, Mingli @ 2021-01-05 12:37 ` Richard Purdie 2021-01-05 19:04 ` Tanu Kaskinen 0 siblings, 1 reply; 10+ messages in thread From: Richard Purdie @ 2021-01-05 12:37 UTC (permalink / raw) To: Yu, Mingli, openembedded-core, armccurdy, Tanu Kaskinen On Tue, 2021-01-05 at 11:37 +0800, Yu, Mingli wrote: From: Mingli Yu <mingli.yu@windriver.com> After pulseaudio upgrades from 13.0 to 14.0, it also switches from autotools to meson. In autotools, there is --disable-neon-opt option for disabling NEON optimizations, but there is no counterpart in meson. And the meson build system adds -mfpu=neon at the end of the compiler command line which overrids any earlier -mfpu options and result below build failure on armv5: > /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0- > r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs- > linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON > intrinsics not available with the soft-float ABI. Please use - > mfloat-abi=softfp or -mfloat-abi=hard" > 31 | #error "NEON intrinsics not available with the soft-float ABI. > Please use -mfloat-abi=softfp or -mfloat-abi=hard" | ^~~~~ > ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function > 'pa_mix_ch2_s16ne_neon': > ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type > name 'int32x4_t'; did you mean 'int32_t'? > 38 | int32x4_t sum0, sum1; Define -mfloat-abi=softfp for CC on armv5 to fix the above issue. Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc index e40b8c1c40..761e4f74dc 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc @@ -123,6 +123,11 @@ PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," export TARGET_PFPU = "${TARGET_FPU}" +# workaround build failure on qemuarmv5 as the neon optimizations is +# enabled by default and no option to disable neon with meson build +# system +CC_append_armv5 = " -mfloat-abi=softfp" +export CC set_cfg_value () { sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" I really don't want to add things like this to the recipe, I think it will interfere with other parts of the compilation. In many ways I'd prefer an option added to meson. Do we know what upstream are thinking in relation to this? Cheers, Richard ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH v2] pulseaudio: define -mfloat-abi=softfp for CC on armv5 2021-01-05 12:37 ` [OE-core] " Richard Purdie @ 2021-01-05 19:04 ` Tanu Kaskinen 2021-01-06 2:58 ` Yu, Mingli 2021-01-06 21:23 ` Richard Purdie 0 siblings, 2 replies; 10+ messages in thread From: Tanu Kaskinen @ 2021-01-05 19:04 UTC (permalink / raw) To: Richard Purdie, Yu, Mingli, openembedded-core, armccurdy On Tue, 2021-01-05 at 12:37 +0000, Richard Purdie wrote: > On Tue, 2021-01-05 at 11:37 +0800, Yu, Mingli wrote: > From: Mingli Yu <mingli.yu@windriver.com> > > After pulseaudio upgrades from 13.0 to 14.0, it also switches from > autotools > to meson. In autotools, there is --disable-neon-opt option for > disabling NEON > optimizations, but there is no counterpart in meson. > > And the meson build system adds -mfpu=neon at the end of the compiler > command > line which overrids any earlier -mfpu options and result below build > failure > on armv5: > > > /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0- > > r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs- > > linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON > > intrinsics not available with the soft-float ABI. Please use - > > mfloat-abi=softfp or -mfloat-abi=hard" > > 31 | #error "NEON intrinsics not available with the soft-float ABI. > > Please use -mfloat-abi=softfp or -mfloat-abi=hard" > | ^~~~~ > > ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function > > 'pa_mix_ch2_s16ne_neon': > > ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type > > name 'int32x4_t'; did you mean 'int32_t'? > > 38 | int32x4_t sum0, sum1; > > Define -mfloat-abi=softfp for CC on armv5 to fix the above issue. > > Signed-off-by: Mingli Yu <mingli.yu@windriver.com> > --- > meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > index e40b8c1c40..761e4f74dc 100644 > --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > @@ -123,6 +123,11 @@ PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," > PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," > > export TARGET_PFPU = "${TARGET_FPU}" > +# workaround build failure on qemuarmv5 as the neon optimizations is > +# enabled by default and no option to disable neon with meson build > +# system > +CC_append_armv5 = " -mfloat-abi=softfp" > +export CC > > set_cfg_value () { > sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" > > I really don't want to add things like this to the recipe, I think it > will interfere with other parts of the compilation. In many ways I'd > prefer an option added to meson. Do we know what upstream are thinking > in relation to this? I think Meson should be fixed, but it may be necessary to add a build option to PulseAudio to disable the neon code while waiting for Meson to get fixed. I now filed a bug for Meson: https://github.com/mesonbuild/meson/issues/8156 and another for PulseAudio: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1088 so at least the relevant projects know about the issue now. I may work on fixing these myself if nobody else does, but I don't expect that to happen quickly. -- Tanu ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH v2] pulseaudio: define -mfloat-abi=softfp for CC on armv5 2021-01-05 19:04 ` Tanu Kaskinen @ 2021-01-06 2:58 ` Yu, Mingli 2021-01-06 21:23 ` Richard Purdie 1 sibling, 0 replies; 10+ messages in thread From: Yu, Mingli @ 2021-01-06 2:58 UTC (permalink / raw) To: Tanu Kaskinen, Richard Purdie, openembedded-core, armccurdy [-- Attachment #1: Type: text/plain, Size: 3921 bytes --] Hi RP, The pulseaudio upstream doesn't support the option to disable neon with meson per the the latest release note https://www.freedesktop.org/wiki/Software/PulseAudio/Notes/14.0/ and also thanks Tanu to report the issue to upstream as https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1088 . Will update the solution if there is any update. Thanks, <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1088> ________________________________ From: Tanu Kaskinen <tanuk@iki.fi> Sent: Wednesday, January 6, 2021 03:04 To: Richard Purdie <richard.purdie@linuxfoundation.org>; Yu, Mingli <Mingli.Yu@windriver.com>; openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org>; armccurdy@gmail.com <armccurdy@gmail.com> Subject: Re: [OE-core] [PATCH v2] pulseaudio: define -mfloat-abi=softfp for CC on armv5 On Tue, 2021-01-05 at 12:37 +0000, Richard Purdie wrote: > On Tue, 2021-01-05 at 11:37 +0800, Yu, Mingli wrote: > From: Mingli Yu <mingli.yu@windriver.com> > > After pulseaudio upgrades from 13.0 to 14.0, it also switches from > autotools > to meson. In autotools, there is --disable-neon-opt option for > disabling NEON > optimizations, but there is no counterpart in meson. > > And the meson build system adds -mfpu=neon at the end of the compiler > command > line which overrids any earlier -mfpu options and result below build > failure > on armv5: > > > /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0- > > r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs- > > linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON > > intrinsics not available with the soft-float ABI. Please use - > > mfloat-abi=softfp or -mfloat-abi=hard" > > 31 | #error "NEON intrinsics not available with the soft-float ABI. > > Please use -mfloat-abi=softfp or -mfloat-abi=hard" > | ^~~~~ > > ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function > > 'pa_mix_ch2_s16ne_neon': > > ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type > > name 'int32x4_t'; did you mean 'int32_t'? > > 38 | int32x4_t sum0, sum1; > > Define -mfloat-abi=softfp for CC on armv5 to fix the above issue. > > Signed-off-by: Mingli Yu <mingli.yu@windriver.com> > --- > meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > index e40b8c1c40..761e4f74dc 100644 > --- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc > @@ -123,6 +123,11 @@ PACKAGECONFIG[ipv6] = "-Dipv6=true,-Dipv6=false," > PACKAGECONFIG[manpages] = "-Dman=true,-Dman=false," > > export TARGET_PFPU = "${TARGET_FPU}" > +# workaround build failure on qemuarmv5 as the neon optimizations is > +# enabled by default and no option to disable neon with meson build > +# system > +CC_append_armv5 = " -mfloat-abi=softfp" > +export CC > > set_cfg_value () { > sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" > > I really don't want to add things like this to the recipe, I think it > will interfere with other parts of the compilation. In many ways I'd > prefer an option added to meson. Do we know what upstream are thinking > in relation to this? I think Meson should be fixed, but it may be necessary to add a build option to PulseAudio to disable the neon code while waiting for Meson to get fixed. I now filed a bug for Meson: https://github.com/mesonbuild/meson/issues/8156 and another for PulseAudio: https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1088 so at least the relevant projects know about the issue now. I may work on fixing these myself if nobody else does, but I don't expect that to happen quickly. -- Tanu [-- Attachment #2: Type: text/html, Size: 6932 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH v2] pulseaudio: define -mfloat-abi=softfp for CC on armv5 2021-01-05 19:04 ` Tanu Kaskinen 2021-01-06 2:58 ` Yu, Mingli @ 2021-01-06 21:23 ` Richard Purdie 2021-07-02 8:09 ` [PATCH v3] pulseaudio: check if NEON code can be compiled on arm Yu, Mingli 1 sibling, 1 reply; 10+ messages in thread From: Richard Purdie @ 2021-01-06 21:23 UTC (permalink / raw) To: Tanu Kaskinen, Yu, Mingli, openembedded-core, armccurdy On Tue, 2021-01-05 at 21:04 +0200, Tanu Kaskinen wrote: > On Tue, 2021-01-05 at 12:37 +0000, Richard Purdie wrote: > > sed -i -e "s/\(; *\)\?$2 =.*/$2 = $3/" "$1" > > > > I really don't want to add things like this to the recipe, I think it > > will interfere with other parts of the compilation. In many ways I'd > > prefer an option added to meson. Do we know what upstream are thinking > > in relation to this? > > I think Meson should be fixed, but it may be necessary to add a build > option to PulseAudio to disable the neon code while waiting for Meson > to get fixed. > > I now filed a bug for Meson: > https://github.com/mesonbuild/meson/issues/8156 > > and another for PulseAudio: > https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/issues/1088 > > so at least the relevant projects know about the issue now. I may work > on fixing these myself if nobody else does, but I don't expect that to > happen quickly. Thanks for that, it does seem to be getting a little attention so hopefully a solution will emerge! Cheers, Richard ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3] pulseaudio: check if NEON code can be compiled on arm 2021-01-06 21:23 ` Richard Purdie @ 2021-07-02 8:09 ` Yu, Mingli 2021-07-02 10:20 ` [OE-core] " Andrea Adami 0 siblings, 1 reply; 10+ messages in thread From: Yu, Mingli @ 2021-07-02 8:09 UTC (permalink / raw) To: openembedded-core, richard.purdie, tanuk, armccurdy From: Mingli Yu <mingli.yu@windriver.com> Backport a patch to check if NEON code can be compiled on arm to fix below issue: | /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0-r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" | 31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" | ^~~~~ | ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function 'pa_mix_ch2_s16ne_neon': | ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type name 'int32x4_t'; did you mean 'int32_t'? | 38 | int32x4_t sum0, sum1; Signed-off-by: Mingli Yu <mingli.yu@windriver.com> --- ...check-if-NEON-code-can-be-compiled-o.patch | 71 +++++++++++++++++++ .../pulseaudio/pulseaudio_14.2.bb | 1 + 2 files changed, 72 insertions(+) create mode 100644 meta/recipes-multimedia/pulseaudio/pulseaudio/0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch new file mode 100644 index 0000000000..5d9370fb16 --- /dev/null +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch @@ -0,0 +1,71 @@ +From 09f846fbdeb19193e778ce51baa77bd03c38372e Mon Sep 17 00:00:00 2001 +From: garrison <garrison@qemu15.qemu-network> +Date: Fri, 4 Jun 2021 22:13:02 +0000 +Subject: [PATCH] build-sys: meson: check if NEON code can be compiled on arm + +When Meson SIMD module returns HAVE_NEON=1 on arm host, do extra compile check +to verify compiler can actually handle NEON code. + +Related Meson issue #6361 https://github.com/mesonbuild/meson/issues/6361 + +Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/574> + +Upstream-Status: Backport[https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/6d2a49a6a1eacc2096d0d9473a074421c181ab56] + +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> +--- + src/pulsecore/meson.build | 41 +++++++++++++++++++++++++++++---------- + 1 file changed, 31 insertions(+), 10 deletions(-) + +diff --git a/src/pulsecore/meson.build b/src/pulsecore/meson.build +index 99a702e..d0b7990 100644 +--- a/src/pulsecore/meson.build ++++ b/src/pulsecore/meson.build +@@ -172,16 +172,37 @@ endif + + # FIXME: SIMD support (ORC) + simd = import('unstable-simd') +-libpulsecore_simd = simd.check('libpulsecore_simd', +- mmx : ['remap_mmx.c', 'svolume_mmx.c'], +- sse : ['remap_sse.c', 'sconv_sse.c', 'svolume_sse.c'], +- neon : ['remap_neon.c', 'sconv_neon.c', 'mix_neon.c'], +- c_args : [pa_c_args], +- include_directories : [configinc, topinc], +- implicit_include_directories : false, +- compiler : cc) +-libpulsecore_simd_lib = libpulsecore_simd[0] +-cdata.merge_from(libpulsecore_simd[1]) ++simd_variants = [ ++ { 'mmx' : ['remap_mmx.c', 'svolume_mmx.c'] }, ++ { 'sse' : ['remap_sse.c', 'sconv_sse.c', 'svolume_sse.c'] }, ++ { 'neon' : ['remap_neon.c', 'sconv_neon.c', 'mix_neon.c'] }, ++] ++ ++libpulsecore_simd_lib = [] ++ ++foreach simd_kwargs : simd_variants ++ ++ if host_machine.cpu_family() == 'arm' and 'neon' in simd_kwargs ++ if not cc.compiles(''' ++ #include <arm_neon.h> ++ int main() { ++ return sizeof(uint8x8_t) + sizeof(int32x4_t) + sizeof(float32x4_t); ++ } ++ ''', name : 'neon code') ++ continue ++ endif ++ endif ++ ++ libpulsecore_simd = simd.check('libpulsecore_simd', ++ kwargs : simd_kwargs, ++ c_args : [pa_c_args], ++ include_directories : [configinc, topinc], ++ implicit_include_directories : false, ++ compiler : cc) ++ ++ libpulsecore_simd_lib += libpulsecore_simd[0] ++ cdata.merge_from(libpulsecore_simd[1]) ++endforeach + + # FIXME: Implement Windows support + #'mutex-win32.c', diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_14.2.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_14.2.bb index 9b8338a665..a7ea8caccb 100644 --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_14.2.bb +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_14.2.bb @@ -7,6 +7,7 @@ SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ file://0001-meson-Check-for-__get_cpuid.patch \ file://volatiles.04_pulse \ file://0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch \ + file://0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch \ " SRC_URI[md5sum] = "1efc916251910f1e9d4df7810e3e69f8" SRC_URI[sha256sum] = "75d3f7742c1ae449049a4c88900e454b8b350ecaa8c544f3488a2562a9ff66f1" -- 2.29.2 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [OE-core] [PATCH v3] pulseaudio: check if NEON code can be compiled on arm 2021-07-02 8:09 ` [PATCH v3] pulseaudio: check if NEON code can be compiled on arm Yu, Mingli @ 2021-07-02 10:20 ` Andrea Adami 0 siblings, 0 replies; 10+ messages in thread From: Andrea Adami @ 2021-07-02 10:20 UTC (permalink / raw) To: Yu, Mingli Cc: Patches and discussions about the oe-core layer, Richard Purdie, tanuk, Andre McCurdy On Fri, Jul 2, 2021 at 10:11 AM Yu, Mingli <mingli.yu@windriver.com> wrote: > > From: Mingli Yu <mingli.yu@windriver.com> > > Backport a patch to check if NEON code can be compiled on arm to > fix below issue: > | /prj/tmp-glibc/work/armv5e-wrs-linux-gnueabi/pulseaudio/14.0-r0/recipe-sysroot-native/usr/lib/arm-wrs-linux-gnueabi/gcc/arm-wrs-linux-gnueabi/10.2.0/include/arm_neon.h:31:2: error: #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" > | 31 | #error "NEON intrinsics not available with the soft-float ABI. Please use -mfloat-abi=softfp or -mfloat-abi=hard" > | ^~~~~ > | ../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function 'pa_mix_ch2_s16ne_neon': > | ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type name 'int32x4_t'; did you mean 'int32_t'? > | 38 | int32x4_t sum0, sum1; > > Signed-off-by: Mingli Yu <mingli.yu@windriver.com> > --- > ...check-if-NEON-code-can-be-compiled-o.patch | 71 +++++++++++++++++++ > .../pulseaudio/pulseaudio_14.2.bb | 1 + > 2 files changed, 72 insertions(+) > create mode 100644 meta/recipes-multimedia/pulseaudio/pulseaudio/0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch > > diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch > new file mode 100644 > index 0000000000..5d9370fb16 > --- /dev/null > +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio/0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch > @@ -0,0 +1,71 @@ > +From 09f846fbdeb19193e778ce51baa77bd03c38372e Mon Sep 17 00:00:00 2001 > +From: garrison <garrison@qemu15.qemu-network> > +Date: Fri, 4 Jun 2021 22:13:02 +0000 > +Subject: [PATCH] build-sys: meson: check if NEON code can be compiled on arm > + > +When Meson SIMD module returns HAVE_NEON=1 on arm host, do extra compile check > +to verify compiler can actually handle NEON code. > + > +Related Meson issue #6361 https://github.com/mesonbuild/meson/issues/6361 > + > +Part-of: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/574> > + > +Upstream-Status: Backport[https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/commit/6d2a49a6a1eacc2096d0d9473a074421c181ab56] > + > +Signed-off-by: Mingli Yu <mingli.yu@windriver.com> > +--- > + src/pulsecore/meson.build | 41 +++++++++++++++++++++++++++++---------- > + 1 file changed, 31 insertions(+), 10 deletions(-) > + > +diff --git a/src/pulsecore/meson.build b/src/pulsecore/meson.build > +index 99a702e..d0b7990 100644 > +--- a/src/pulsecore/meson.build > ++++ b/src/pulsecore/meson.build > +@@ -172,16 +172,37 @@ endif > + > + # FIXME: SIMD support (ORC) > + simd = import('unstable-simd') > +-libpulsecore_simd = simd.check('libpulsecore_simd', > +- mmx : ['remap_mmx.c', 'svolume_mmx.c'], > +- sse : ['remap_sse.c', 'sconv_sse.c', 'svolume_sse.c'], > +- neon : ['remap_neon.c', 'sconv_neon.c', 'mix_neon.c'], > +- c_args : [pa_c_args], > +- include_directories : [configinc, topinc], > +- implicit_include_directories : false, > +- compiler : cc) > +-libpulsecore_simd_lib = libpulsecore_simd[0] > +-cdata.merge_from(libpulsecore_simd[1]) > ++simd_variants = [ > ++ { 'mmx' : ['remap_mmx.c', 'svolume_mmx.c'] }, > ++ { 'sse' : ['remap_sse.c', 'sconv_sse.c', 'svolume_sse.c'] }, > ++ { 'neon' : ['remap_neon.c', 'sconv_neon.c', 'mix_neon.c'] }, > ++] > ++ > ++libpulsecore_simd_lib = [] > ++ > ++foreach simd_kwargs : simd_variants > ++ > ++ if host_machine.cpu_family() == 'arm' and 'neon' in simd_kwargs > ++ if not cc.compiles(''' > ++ #include <arm_neon.h> > ++ int main() { > ++ return sizeof(uint8x8_t) + sizeof(int32x4_t) + sizeof(float32x4_t); > ++ } > ++ ''', name : 'neon code') > ++ continue > ++ endif > ++ endif > ++ > ++ libpulsecore_simd = simd.check('libpulsecore_simd', > ++ kwargs : simd_kwargs, > ++ c_args : [pa_c_args], > ++ include_directories : [configinc, topinc], > ++ implicit_include_directories : false, > ++ compiler : cc) > ++ > ++ libpulsecore_simd_lib += libpulsecore_simd[0] > ++ cdata.merge_from(libpulsecore_simd[1]) > ++endforeach > + > + # FIXME: Implement Windows support > + #'mutex-win32.c', > diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio_14.2.bb b/meta/recipes-multimedia/pulseaudio/pulseaudio_14.2.bb > index 9b8338a665..a7ea8caccb 100644 > --- a/meta/recipes-multimedia/pulseaudio/pulseaudio_14.2.bb > +++ b/meta/recipes-multimedia/pulseaudio/pulseaudio_14.2.bb > @@ -7,6 +7,7 @@ SRC_URI = "http://freedesktop.org/software/pulseaudio/releases/${BP}.tar.xz \ > file://0001-meson-Check-for-__get_cpuid.patch \ > file://volatiles.04_pulse \ > file://0001-doxygen-meson.build-remove-dependency-on-doxygen-bin.patch \ > + file://0001-build-sys-meson-check-if-NEON-code-can-be-compiled-o.patch \ > " > SRC_URI[md5sum] = "1efc916251910f1e9d4df7810e3e69f8" > SRC_URI[sha256sum] = "75d3f7742c1ae449049a4c88900e454b8b350ecaa8c544f3488a2562a9ff66f1" > -- > 2.29.2 > > > > Successfully built pulseaudio for armv4 / collie. Thanks. Tested-by: Andrea Adami <andrea.adami@gmail.com> ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2021-07-02 10:20 UTC | newest] Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2020-12-29 2:36 [PATCH] pulseaudio: define -mfloat-abi=softfp for CC on armv5 Yu, Mingli 2020-12-29 3:29 ` [OE-core] " Andre McCurdy 2020-12-29 3:35 ` Yu, Mingli 2021-01-05 3:37 ` [PATCH v2] " Yu, Mingli 2021-01-05 12:37 ` [OE-core] " Richard Purdie 2021-01-05 19:04 ` Tanu Kaskinen 2021-01-06 2:58 ` Yu, Mingli 2021-01-06 21:23 ` Richard Purdie 2021-07-02 8:09 ` [PATCH v3] pulseaudio: check if NEON code can be compiled on arm Yu, Mingli 2021-07-02 10:20 ` [OE-core] " Andrea Adami
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.