Repository navigation
Put -std=gnu17 on CC for Ruby 2.7 too, its configure ignores cflags - #2650
Merged
Merged
Conversation
The configure script of Ruby 2.7.8 is generated by Autoconf 2.71, which
runs AC_PROG_CC (setting CFLAGS=-g -O2) before Ruby's own
`test -z "${CFLAGS+set}"` check, so the cflags configure variable is
silently ignored and Ruby 2.7 was still compiled as C23 on GCC 15.
Ruby 3.0+ unset CFLAGS again in that case, and the tarballs of 2.0 to
2.5 ship an Autoconf 2.69 configure which runs the check first.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Member
Author
|
Maybe we should always override I'd imagine it's better if for some reason there is |
Member
Author
|
Same as #2649 (comment), I'll merge this now, happy to address any review later. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up of #2649, which worked fine except on Ruby 2.7:
https://github.com/ruby/ruby-builder/actions/runs/41236443425/job/124641118792
Where the
cflags=-std=gnu17was completely ignored.The configure script of Ruby 2.7.8 is generated by Autoconf 2.71, which runs AC_PROG_CC (setting
CFLAGS=-g -O2) before Ruby's owntest -z "${CFLAGS+set}"check, so the cflags configure variable is silently ignored and Ruby 2.7 was still compiled as C23 on GCC 15. Ruby 3.0+ unset CFLAGS again in that case, and the tarballs of 2.0 to 2.5 ship an Autoconf 2.69 configure which runs the check first.