Skip to content

Update compiler flags for GCC13+ - #89

Merged
pingdynasty merged 3 commits into
masterfrom
feature/gcc15-update
Nov 15, 2026
Merged

pingdynasty merged 3 commits into
masterfrom
feature/gcc15-update

Conversation

@pingdynasty

Copy link
Copy Markdown
Collaborator

GCC 13 changed the definition of -ffreestanding. The compiler flags have been updated to be both backwards and forwards compatible. Tested against GCC12, GCC14 and GCC15. Note that recent GCC versions produce 1-3% larger binaries than GCC12.

…FUNCS=0

-ffreestanding forces __STDC_HOSTED__=0, which makes newer libstdc++
headers (<cmath>, <algorithm>) error out. _GLIBCXX_USE_STD_SPEC_FUNCS=0
stops <cmath> pulling in special functions that need
std::__throw_domain_error under -fno-exceptions.

Verified: GCC 12.3 output is byte-identical before/after for all
'make all' targets; all targets build with Arm GNU Toolchain 15.3.rel2.
@pingdynasty
pingdynasty merged commit 36eaf1c into master Nov 15, 2026
1 check 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.

1 participant