unix: fix the coverage build on arm64 - #11330
Merged
Merged
Conversation
Clang rejects the forward typedefs the bindings headers share with shared-module under C99, so use -std=gnu11 like every other port. Return the MP3 RMS level as mp_float_t so it no longer promotes to double, and define MP3DEC_GENERIC so lib/mp3 accepts aarch64, as espressif already does.
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.
The unix port still compiles as C99, and clang rejects a pattern the rest of the tree relies on: eight types that a bindings header forward-declares and the matching shared-module header typedefs again. That is valid C11, and gcc stays quiet, so it went unnoticed. Two more errors follow: the MP3 RMS level comes back as a float where mp_float_t is a double, and lib/mp3 has no case for aarch64 in its platform check.
So -std=gnu11, which every other port already uses, mp_float_t for the RMS level as suggested in the issue, and MP3DEC_GENERIC the way espressif sets it. gcc 13 and clang 18 both build clean on x86-64 Linux and the tests pass. I could not try arm64 itself.
Fixes #11039