[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-core
Subject:    Re: [OE-core] [PATCH] pulseaudio: define -mfloat-abi=softfp for CC on armv5
From:       "Yu, Mingli" <mingli.yu () windriver ! com>
Date:       2020-12-29 3:35:56
Message-ID: CO1PR11MB5009495636B5D4DC4F1A576EF1D80 () CO1PR11MB5009 ! namprd11 ! prod ! outlook ! com
[Download RAW message or body]

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-nat \
> > ive/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 #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> Hi Andre,</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> The override for CC is just for <font size="2"><span \
style="font-size:11pt">armv5</span></font> and it shouldn't affect other BSPS.</div> \
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> <br>
</div>
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; \
color: rgb(0, 0, 0);"> Thanks,<br>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" \
style="font-size:11pt" color="#000000"><b>From:</b> Andre McCurdy \
&lt;armccurdy@gmail.com&gt;<br> <b>Sent:</b> Tuesday, December 29, 2020 11:29<br>
<b>To:</b> Yu, Mingli &lt;Mingli.Yu@windriver.com&gt;<br>
<b>Cc:</b> OE Core mailing list &lt;openembedded-core@lists.openembedded.org&gt;<br>
<b>Subject:</b> Re: [OE-core] [PATCH] pulseaudio: define -mfloat-abi=softfp for CC on \
armv5</font> <div>&nbsp;</div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:11pt;">
<div class="PlainText">On Mon, Dec 28, 2020 at 6:36 PM Yu, Mingli \
&lt;mingli.yu@windriver.com&gt; wrote:<br> &gt;<br>
&gt; From: Mingli Yu &lt;mingli.yu@windriver.com&gt;<br>
&gt;<br>
&gt; After pulseaudio upgrades from 13.0 to 14.0, it also switches from autotools<br>
&gt; to meson and there's no option for disabling Neon optimizations with meson.<br>
&gt; And the build system adds -mfpu=neon at the end of the compiler command line<br>
&gt; which overrids any earlier -mfpu options and result below build failure:<br>
&gt;<br>
&gt; | /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 &quot;NEON intrinsics not available with the soft-float ABI.&nbsp; \
                Please use
 -mfloat-abi=softfp or -mfloat-abi=hard&quot;<br>
&gt; |&nbsp; 31 | #error &quot;NEON intrinsics not available with the soft-float \
ABI.&nbsp; Please use -mfloat-abi=softfp or -mfloat-abi=hard&quot;<br> \
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; |&nbsp; ^~~~~<br> &gt; | \
../pulseaudio-14.0/src/pulsecore/mix_neon.c: In function 'pa_mix_ch2_s16ne_neon':<br> \
&gt; | ../pulseaudio-14.0/src/pulsecore/mix_neon.c:38:9: error: unknown type name \
'int32x4_t'; did you mean 'int32_t'?<br> &gt; |&nbsp;&nbsp; 38 \
|&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int32x4_t sum0, sum1;<br> &gt;<br>
&gt; Define -mfloat-abi=softfp for CC on armv5 to fix the above issue.<br>
<br>
Doesn't look right. That forces the whole package to be compiled with<br>
floating point instructions, which will break targets which need soft<br>
float.<br>
<br>
&gt; Signed-off-by: Mingli Yu &lt;mingli.yu@windriver.com&gt;<br>
&gt; ---<br>
&gt;&nbsp; meta/recipes-multimedia/pulseaudio/pulseaudio.inc | 1 +<br>
&gt;&nbsp; 1 file changed, 1 insertion(+)<br>
&gt;<br>
&gt; diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc \
b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br> &gt; index \
e40b8c1c40..44a6a3055e 100644<br> &gt; --- \
a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br> &gt; +++ \
b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc<br> &gt; @@ -123,6 +123,7 @@ \
PACKAGECONFIG[ipv6] = &quot;-Dipv6=true,-Dipv6=false,&quot;<br> &gt;&nbsp; \
PACKAGECONFIG[manpages] = &quot;-Dman=true,-Dman=false,&quot;<br> &gt;<br>
&gt;&nbsp; export TARGET_PFPU = &quot;${TARGET_FPU}&quot;<br>
&gt; +export CC_append_armv5 = &quot; -mfloat-abi=softfp&quot;<br>
<br>
Aside from the fact that the change itself looks wrong, what is export<br>
with a conditional append supposed to do? Export unconditionally (and<br>
so have a side effect for targets other than armv5)? Export only if<br>
the conditional append took effect? Since most people have no idea,<br>
it's better to keep export and the conditional append separate.<br>
<br>
&gt;&nbsp; set_cfg_value () {<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; sed -i -e &quot;s/\(; *\)\?$2 \
=.*/$2 = $3/&quot; &quot;$1&quot;<br> &gt; --<br>
&gt; 2.26.2<br>
&gt;<br>
&gt;<br>
&gt; <br>
&gt;<br>
</div>
</span></font></div>
</body>
</html>



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#146291): https://lists.openembedded.org/g/openembedded-core/message/146291
Mute This Topic: https://lists.openembedded.org/mt/79283711/4454766
Group Owner: openembedded-core+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [openembedded-core@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-


--BYjHKPsjjIjJgzT1m67W--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic