Skip to content
This repository has been archived by the owner on Mar 28, 2018. It is now read-only.

configure.ac: Add -D_FORTIFY_SOURCE=2 optimization #778

Merged
merged 1 commit into from
Mar 28, 2017

Conversation

sboeuf
Copy link

@sboeuf sboeuf commented Mar 27, 2017

In order to harden the build and the overall security of the project, this patch enables FORTIFY_SOURCE optimization in case the flag --enable-debug is not detected.

Indeed, when debug is enabled, the -O flag is set to -O0, and the option FORTIFY_SOURCE expect at least -O1 to be properly enabled.

In order to harden the build and the overall security of the project,
this patch enables FORTIFY_SOURCE optimization in case the flag
--enable-debug is not detected.

Indeed, when debug is enabled, the -O flag is set to -O0, and the
option FORTIFY_SOURCE expect at least -O1 to be properly enabled.

Signed-off-by: Sebastien Boeuf <sebastien.boeuf@intel.com>
@sboeuf
Copy link
Author

sboeuf commented Mar 27, 2017

@dlespiau could you take a look ?

@chavafg
Copy link
Contributor

chavafg commented Mar 27, 2017

qa-passed

Approved with PullApprove

@amshinde
Copy link
Contributor

amshinde commented Mar 27, 2017

lgtm

Approved with PullApprove

@grahamwhaley
Copy link

grahamwhaley commented Mar 28, 2017

I'm not sure I'd call it an 'optimisation' - more of a 'feature' :-) , but - nice!
lgtm

Approved with PullApprove

@grahamwhaley grahamwhaley merged commit 65dba07 into master Mar 28, 2017
@sboeuf
Copy link
Author

sboeuf commented Mar 28, 2017

@grahamwhaley I called it optimization because it is a compiler optimization that can only be used if at least -O1 is enabled.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants