Skip to content
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

musl: Disable warnings in all compilations. #20921

Merged
merged 1 commit into from
Aug 6, 2024

Conversation

alexrp
Copy link
Member

@alexrp alexrp commented Aug 3, 2024

This is what upstream's configure does: https://git.musl-libc.org/cgit/musl/tree/configure#n537

Previously, we only disabled warnings in some musl compilations, with rcrt1.o notably being one for which we didn't. This resulted in a warning in dlstart.c which is included in rcrt1.c. So let's just be consistent and disable warnings for all musl code.

Closes #13385.

This is what upstream's configure does.

Previously, we only disabled warnings in some musl compilations, with `rcrt1.o`
notably being one for which we didn't. This resulted in a warning in `dlstart.c`
which is included in `rcrt1.c`. So let's just be consistent and disable warnings
for all musl code.

Closes ziglang#13385.
@markus-oberhumer
Copy link
Contributor

I'd just want to note that after adding -w musl configure then re-enables a number of warnings it wants to activate. Not sure if you want to copy that, though.

@alexrp
Copy link
Member Author

alexrp commented Aug 4, 2024

Probably not; the experience will always be bad for users because there's nothing they can actually do about warnings in musl code. And matching upstream musl's warning flags just means we're surfacing the same warnings that upstream will learn of and fix in due time anyway, so it's not clear to me that we gain anything by doing so.

@markus-oberhumer
Copy link
Contributor

Indeed, fair enough.

@andrewrk andrewrk merged commit e9b5377 into ziglang:master Aug 6, 2024
10 checks passed
@alexrp alexrp deleted the musl-warnings branch August 6, 2024 23:08
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.

-Wdeprecated-non-prototype warning in musl's dlstart.c with zig cc main.c -target aarch64-linux-musl
3 participants