Skip to content

fix: some cases where the correct stdint.h header file may not be found#87

Merged
gmarull merged 1 commit intopebble-dev:mainfrom
HalfSweet:main
Mar 17, 2025
Merged

fix: some cases where the correct stdint.h header file may not be found#87
gmarull merged 1 commit intopebble-dev:mainfrom
HalfSweet:main

Conversation

@HalfSweet
Copy link

In some environments, the parse_file function in the tools/generate_native_sdk/parse_c_decl.py script does not add the -ffreestanding parameter to the call to gcc, which results in the wrong header file being used by gcc

@gmarull
Copy link
Collaborator

gmarull commented Mar 17, 2025

can you adjust commit like "tools/generate_native_sdk: add missing -ffreestanding", and explain details in the commit message?

Thanks! I guess this will allow to compile using e.g. brew arm gcc

@HalfSweet
Copy link
Author

Sure, how do you feel now

In some environments, the parse_file function in the
tools/generate_native_sdk/parse_c_decl.py script
does not add the -ffreestanding parameter to the
gcc call, which causes the __STDC_HOSTED__
macro to be incorrectly set to 1.
If we add -ffreestanding, then this compiler
predefined macro will be set to 0

Signed-off-by: HaoranJiang <halfsweet@halfsweet.cn>
@Hexxeh
Copy link
Collaborator

Hexxeh commented Mar 17, 2025

Does this actually fix the build with brew ARM GCC? Last time I started trying to get it to build with that I ran into more problems than just this.

@gmarull gmarull merged commit 82ae671 into pebble-dev:main Mar 17, 2025
6 checks passed
@gmarull
Copy link
Collaborator

gmarull commented Mar 17, 2025

Does this actually fix the build with brew ARM GCC? Last time I started trying to get it to build with that I ran into more problems than just this.

hmm doesn't look like, we miss some libc headers like assert.h, sys/types.h...

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.

3 participants