Skip to content

unix: fix the coverage build on arm64 - #11330

Merged
tannewt merged 2 commits into
adafruit:mainfrom
4RH1T3CT0R7:fix/unix-port-arm64-build
Sep 9, 2026
Merged

unix: fix the coverage build on arm64#11330
tannewt merged 2 commits into
adafruit:mainfrom
4RH1T3CT0R7:fix/unix-port-arm64-build

Conversation

@4RH1T3CT0R7

Copy link
Copy Markdown

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

4RH1T3CT0R7 and others added 2 commits September 8, 2026 22:28
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.

@tannewt tannewt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@tannewt
tannewt merged commit de15916 into adafruit:main Sep 9, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Compiling Unix Port on Apple Silicon (arm64)

3 participants