Skip to content

Pass flags to clang and fix POSIX non-compliance #123

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shenlebantongying
Copy link

@shenlebantongying shenlebantongying commented Jul 13, 2025

I was just looking into the source code and found this mini rabbit hole.

The code was detecting only gcc and the flags were not passed to clang.

However, surprisingly, those flags will be rejected with a mythical error message. It turns out the c99 executable as written in the standard only have a few flags. Apple, for whatever reason I don't want to know, ships a real c99 executable for macOS that would reject those extra flags.

So, stay with cc when using gcc/clang and pass identical flags to both of them.

Apple ships a real c99 as written in the standard.
Lots of flags don't work.
Just stay with cc instead.
@shenlebantongying shenlebantongying changed the title Pass flags to clang and fix POSIX none-compliance Pass flags to clang and fix POSIX non-compliance Jul 13, 2025
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