Use append_cflags instead of modifying CFLAGS directly #45
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.
This pull request updates the configuration file for the
ed25519_ref10extension to useappend_cflagsinstead of directly modifying theCFLAGSenvironment variable as it was before.This approach is recommended over modifying
CFLAGSsince it ensures compatibility across different build environments by checking whether the flag is acceptable, and should not affect most systems. In my case, I was running into an issue on Fedora 42 where recent updates to GCC seem to not work well with the-std=c99flag that was being set when building the extension (as noted in #44). Usingappend_cflagschecks this and doesn't include it inCFLAGS, allowing the extension to build successfully.I also updated the
rubocopandrubocop-packaginggems to their latest versions, as those checks were failing with Ruby 3.4. Besides updating the gems, I also modified the.rubocop.ymlfile since therubocop-packagingextension now uses the new plugins system, and I also disabled a few gem-related cops (Gemspec/RequireMFAandGemspec/DevelopmentDependencies) since I probably shouldn't be modifying the gemspec. If you prefer these changes be made separately, I can create a separate pull request for the Rubocop updates.Edit: I pushed one last commit to update the CI workflow to include Ruby 3.3 and 3.4 at part of the test matrix.