Use append_cflags instead of modifying CFLAGS directly #137
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.
Linux system with latest GCC 15 can't compile this gem. See more #136
Types of Changes
Use append_cflags instead of modifying CFLAGS directly
According to this thread
https://inbox.vuxu.org/ruby-core/[email protected]/T/
ed25519
gem had a similar issue, and it was resolved by migrating to append_cflags.RubyCrypto/ed25519@c1ee0e0
Let's move this gem to append_cflags as well. This approach is recommended over modifying CFLAGS since it ensures compatibility across different build environments by checking whether the flag is acceptable, and should not affect most systems.
In the meantime, it appears that Nobu has merged a wider fix to ruby itself. But this improvement will not hurt in the long term.
Testing
Building this branch with
bake build
works on my machine. At the same time,main
branch is failing.Contribution