Skip to content
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

build: set hardening flags conditionally #8296

Closed
wants to merge 2 commits into from
Closed

build: set hardening flags conditionally #8296

wants to merge 2 commits into from

Conversation

ghost
Copy link

@ghost ghost commented Mar 24, 2016

Last night I was stepping (actually hopping :D) through radosgw in gdb due to the optimization level set during compilation. I went digging where to set -O0... do_autogen.sh provides a "-O" option, however this broke compilation because FORTIFY_SOURCE=2 (along with a few others) are being set via HARDENING_CFLAGS in src/Makefile-env.am under a "if LINUX" conditional.

This patch tries to fix this by adding a "--without-hardening" option to do_autogen.sh/configure.ac to be used alongside "-d" and "-O".

First pass at fixing: http://tracker.ceph.com/issues/15263

When specifying -O0, FORTIFY_SOURCE=2 is still set via HARDENING_CFLAGS
in Makefile-env.am. This option can be used to disable appending the
HARDENING_CFLAGS to C/CXX flags.

Signed-off-by: Karol Mroz <kmroz@suse.com>
@tchaikov
Copy link
Contributor

#8301 is another way to fix this.

Signed-off-by: Karol Mroz <kmroz@suse.com>
@ghost
Copy link
Author

ghost commented Mar 24, 2016

@tchaikov Yes it is. Let's get one of them committed so we can build with -O0. Though I suspect this is not much of a tragedy for the upcoming release :)

@ghost ghost closed this May 11, 2016
@ghost ghost deleted the wip-build-optimization branch May 11, 2016 10:15
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants