-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
.cargo/config.toml: set CFLAGS='-std=gnu17'
#7944
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
Conversation
4b6802e
to
e3c0e20
Compare
GNU testsuite comparison:
|
to make onig compile with GCC 15, which by default uses a newer C standard (C23)
e3c0e20
to
992e162
Compare
GNU testsuite comparison:
|
[target.x86_64-unknown-redox] | ||
linker = "x86_64-unknown-redox-gcc" | ||
|
||
[env] | ||
PROJECT_NAME_FOR_VERSION_STRING = "uutils coreutils" | ||
# TODO remove when there is an onig version > 6.4.0, https://github.com/rust-onig/rust-onig/issues/196 | ||
CFLAGS='-std=gnu17' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is going to be passed to all C code
it isn't a big deal but i still would like to mention it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean with "i still would like to see it"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I meant "mention" :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, ok :) If it's an issue, we could use onig
from github.
@cakebaker https://github.com/uutils/coreutils/actions/runs/15131823978/job/42534881943?pr=7931 it broke the build here warning: onig_sys@69.8.1: x86_64-linux-gnu-gcc: error: unrecognized command line option '-std=gnu17' |
with "unrecognized command line option '-std=gnu17'"
with "unrecognized command line option '-std=gnu17'"
with "unrecognized command line option '-std=gnu17'"
This PR sets
CFLAGS='-std=gnu17'
in order to makeonig
compile with GCC 15, which by default uses a newer C standard (C23).It temporarily fixes #7904 until there is a new
onig
release. An alternative approach would be to change the dependency line foronig
inCargo.toml
as suggested in #7904 (comment)