Skip to content

disable _FORTIFY_SOURCE for debug builds #86

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
Apr 23, 2025

Conversation

Abstract-Everything
Copy link
Contributor

Enabling this macro in debug builds causes a warning which is then treated as an error failing the build:
/usr/include/features.h:414:4: warning: _FORTIFY_SOURCE requires compiling with optimization (-O) [-W#warnings]
414 | # warning _FORTIFY_SOURCE requires compiling with optimization (-O)

Enabling this macro in debug builds causes a warning which is then
treated as an error failing the build:
/usr/include/features.h:414:4: warning: _FORTIFY_SOURCE requires compiling with optimization (-O) [-W#warnings]
  414 | #  warning _FORTIFY_SOURCE requires compiling with optimization (-O)
@Abstract-Everything
Copy link
Contributor Author

I have created this PR because downloading the template and compiling was failing without any changes on my machine. I feel like there should be a better way than comparing the build string but I did not think of any.

Copy link
Member

@lefticus lefticus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've also run into this issue in the past.

@lefticus lefticus merged commit 963ed33 into cpp-best-practices:main Apr 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants