audioutils/lame: Add CMake vector sources. - #3666
Merged
Merged
Conversation
Add the SSE2 and AVX2 vector implementation files to the CMake libmp3lame target for x86 simulator hosts. LAME's enabled runtime dispatch paths call these functions, so omitting them leaves sim:alsa with unresolved symbols at link time. Non-x86 simulator hosts continue to use LAME's scalar implementation. Assisted-by: Zed:GPT-5.6 Terra Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
This was referenced Jul 26, 2026
acassis
approved these changes
Jul 26, 2026
cederom
approved these changes
Jul 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix the CMake build of the bundled LAME encoder for x86 simulator hosts.
LAME's generated configuration enables SSE2 and AVX2 runtime-dispatch paths when the host compiler supports their per-function target attributes. The CMake
libmp3lametarget omitted the corresponding vector translation units, which leftsim:alsawith unresolved symbols at link time. This change adds the complete vector source group only forCONFIG_HOST_X86andCONFIG_HOST_X86_64; non-x86 simulator hosts retain LAME's scalar implementation.Companion NuttX PR: apache/nuttx#19541. It supplies the bundled codec header include paths required to compile
sim_offload.c.Impact
sim:alsabuilds on x86 hosts when LAME enables its vector dispatch.sim:alsaCMake fix.Testing
Verified locally with the companion NuttX branch.
sim:alsa, CMake/Ninja,CONFIG_SIM_M32=y.Before this change, after resolving the missing codec headers, the final link failed with unresolved LAME vector symbols:
After this change:
completed successfully and produced
nuttx.tgz.Additional verification:
Both completed successfully.
No hardware runtime test applies to this host simulator build.
PR verification self-check
Signed-off-by, andAssisted-bytrailer.cmake-formatandgit diff --check.