Skip to content

RUBY-3675 Use append_cflags over modifying CFLAGS directly #355

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

Merged
merged 1 commit into from
Jun 2, 2025

Conversation

pboling
Copy link
Contributor

@pboling pboling commented May 30, 2025

@pboling pboling requested a review from a team as a code owner May 30, 2025 23:45
@pboling pboling requested a review from jamis May 30, 2025 23:45
@codeowners-service-app codeowners-service-app bot requested a review from alexbevi May 30, 2025 23:49
Copy link

Assigned alexbevi for team dbx-ruby because jamis is out of office.

@pboling
Copy link
Contributor Author

pboling commented May 31, 2025

@alexbevi Tested locally, and this is working. With this change bson will install with gcc v15.

pboling added a commit to omniauth/omniauth-identity that referenced this pull request May 31, 2025
@jamis jamis merged commit ddbfce8 into mongodb:master Jun 2, 2025
49 checks passed
@jamis
Copy link
Contributor

jamis commented Jun 2, 2025

Thank you! 👍

@jamis jamis changed the title Use append_cflags over modifying CFLAGS directly RUBY-3675 Use append_cflags over modifying CFLAGS directly Jun 2, 2025
@jamis jamis added the bug Fixes a bug, with no new features or broken compatibility label Jun 6, 2025
stanhu added a commit to stanhu/cbor-ruby that referenced this pull request Jul 23, 2025
This fixes a compilation issue in GCC 15 due `stdbool.h`
not being included when `-std=c99` is in use. This occurs because
the standard `configure` script shipped with Ruby does not properly
test for `stdbool.h` on C23 compilers. It needs to pick up this change:

https://cgit.git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6dcecb780a69bd208088d666b299e92aa7ae7e80

The `append_cflags` approach is recommended over modifying CFLAGS since
it ensures compatibility across different build environments by checking
whether the flag is acceptable.

Similar changes:

* socketry/io-event#137
* mongodb/bson-ruby#355

Closes cabo#27
stanhu added a commit to stanhu/ruby-magic that referenced this pull request Jul 27, 2025
This fixes a compilation issue in GCC 15 due `stdbool.h` not being
included when `-std=c99` is in use. This occurs because the standard
`configure` script shipped with older Ruby versions (prior to 3.4.5 and
3.3.9) do not properly test for `stdbool.h` on C23 compilers
(https://bugs.ruby-lang.org/issues/21340).

The `append_cflags` approach is recommended over modifying CFLAGS since
it ensures compatibility across different build environments by checking
whether the flag is acceptable.

Similar changes:

* socketry/io-event#137
* mongodb/bson-ruby#355

Closes kwilczynski#27
stanhu added a commit to stanhu/ruby-magic that referenced this pull request Jul 27, 2025
This fixes a compilation issue in GCC 15 due `stdbool.h` not being
included when `-std=c99` is in use. This occurs because the standard
`configure` script shipped with older Ruby versions (prior to 3.4.5 and
3.3.9) do not properly test for `stdbool.h` on C23 compilers
(https://bugs.ruby-lang.org/issues/21340).

The `append_cflags` approach is recommended over modifying CFLAGS since
it ensures compatibility across different build environments by checking
whether the flag is acceptable.

Similar changes:

* socketry/io-event#137
* mongodb/bson-ruby#355
stanhu added a commit to stanhu/cbor-ruby that referenced this pull request Jul 28, 2025
This fixes a compilation issue in GCC 15 due `stdbool.h`
not being included when `-std=c99` is in use. This occurs because
the standard `configure` script shipped with Ruby does not properly
test for `stdbool.h` on C23 compilers. It needs to pick up this change:

https://cgit.git.savannah.gnu.org/cgit/autoconf.git/commit/?id=6dcecb780a69bd208088d666b299e92aa7ae7e80

The `append_cflags` approach is recommended over modifying CFLAGS since
it ensures compatibility across different build environments by checking
whether the flag is acceptable.

Similar changes:

* socketry/io-event#137
* mongodb/bson-ruby#355

Closes cabo#27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes a bug, with no new features or broken compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants