Bug 16359 - mpg123 recipe uses wrong --with-cpu in EXTRA_OECONF on aarch64
Summary: mpg123 recipe uses wrong --with-cpu in EXTRA_OECONF on aarch64
Status: RESOLVED FIXED
Alias: None
Product: OE-Core
Classification: Build System, Metadata & Runtime
Component: multimedia (show other bugs)
Version: 6.1
Hardware: ARM Multiple
: Medium normal
Target Milestone: 6.1
Assignee: Ivan Nestlerode
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2026-07-15 20:06 UTC by Ivan Nestlerode
Modified: 2026-08-20 13:02 UTC (History)
5 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: Don't know


Attachments
patch to fix lack of NEON usage on aarch64 in mpg123 recipe (1.43 KB, patch)
2026-07-15 20:15 UTC, Ivan Nestlerode
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Nestlerode 2026-07-15 20:06:11 UTC
On aarch64 the mpg123 recipe should use this option in EXTRA_OECONF:
--with-cpu=neon64

but today it does not do so. Today, it does not pass any --with-cpu option at all in EXTRA_CONF on aarch64. This is probably due to confusion about TUNE_FEATURES and when it contains "neon". Even though the aarch64 CPU supports the NEON instructions, the Yocto aarch64 configurations do not set "neon" in TUNE_FEATURES. Recipes with configure steps that involve NEON basically have to special case aarch64 due to this. The libpng recipe had a very similar problem that was eventually fixed in commit 12e68d5824849fa20f0e3fe8fc1921da111bb6fb.

The fix is a one-line change to the mpg123 recipe to look for aarch64 in TUNE_FEATURES to possibly set --with-cpu=neon64. I will attach the patch after this bug is opened.
Comment 1 Ivan Nestlerode 2026-07-15 20:15:27 UTC
Created attachment 5234 [details]
patch to fix lack of NEON usage on aarch64 in mpg123 recipe
Comment 2 Ross Burton 2026-07-16 14:39:25 UTC
We don't take patches via the bugzilla, would you be able to post it to the mailing list?

https://docs.yoctoproject.org/contributor-guide/submit-changes.html

I don't think the new logic needs to be nested, instead just have an extra check:

${@bb.utils.contains('TUNE_FEATURES', 'neon', '--with-cpu=neon', '', d)} \
${@bb.utils.contains('TUNE_FEATURES', 'aarch64', '--with-cpu=neon64', '', d)} \

That said I'm also wondering if aarch64 should just add neon to the tune features, because it _does_ have it.
Comment 3 Randy MacLeod 2026-07-16 14:46:09 UTC
Ivan putting in needinfo and assigning to you.
Comment 4 Ross Burton 2026-07-16 14:58:46 UTC
Also looking at the configure script there are two relevant options:

neon64           Use code optimized for AArch64 NEON SIMD engine
aarch64          Pack neon64 and generic[[_dither]] decoders, for 64bit ARM processors

Also a bit annoying that mpg123 makes this an option considering aarch64 mandates neon...
Comment 5 Ivan Nestlerode 2026-07-16 15:44:53 UTC
> That said I'm also wondering if aarch64 should just add neon to the tune features,
> because it _does_ have it.

I think that some people were opposed to doing this during the initial creation of aarch64 machine definitions:
https://www.mail-archive.com/openembedded-core@lists.openembedded.org/msg78377.html

Maybe what is needed is a more comprehensive recipe audit in openembedded-core and/or meta-openembedded for recipes that look for "neon" in TUNE_FEATURES to see if they correctly account for aarch64 or not. It is certainly a bit of a foot gun here for recipes that require custom configure options to turn on hand-written NEON assembly.

I will dust off my b4 setup and email this patch to the mailing list (or a modified version thereof from the feedback here).

Thanks.
Comment 6 Ivan Nestlerode 2026-07-23 15:19:35 UTC
I sent the patch to the mailing list:
https://lists.openembedded.org/g/openembedded-core/message/241576