Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Yu, Mingli" <mingli.yu@windriver.com>
To: openembedded-core@lists.openembedded.org, armccurdy@gmail.com,
	tanuk@iki.fi
Subject: [PATCH v2] pulseaudio: define -mfloat-abi=softfp for CC on armv5
Date: Tue,  5 Jan 2021 11:37:19 +0800	[thread overview]
Message-ID: <20210105033719.809-1-mingli.yu@windriver.com> (raw)
In-Reply-To: <CAJ86T=VZtAHf2cP==VnVK1mM4XEY+DaJqyokmzPfCzGT0UvwAQ@mail.gmail.com>

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


  parent reply	other threads:[~2021-01-05  3:37 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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   ` Yu, Mingli [this message]
2021-01-05 12:37     ` [OE-core] [PATCH v2] " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210105033719.809-1-mingli.yu@windriver.com \
    --to=mingli.yu@windriver.com \
    --cc=armccurdy@gmail.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=tanuk@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox