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.
Created attachment 5234 [details] patch to fix lack of NEON usage on aarch64 in mpg123 recipe
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.
Ivan putting in needinfo and assigning to you.
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...
> 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.
I sent the patch to the mailing list: https://lists.openembedded.org/g/openembedded-core/message/241576
Patch merged: https://git.openembedded.org/openembedded-core/commit/?id=cec486b0f4c1853a97570b71baf69d575c68abc1