Skip to content

build: set hardening flags conditionally - #8296

Closed
ghost wants to merge 2 commits into
masterfrom
unknown repository
Closed

ghost wants to merge 2 commits into
masterfrom
unknown repository

Conversation

@ghost

@ghost ghost commented Mar 24, 2016

Copy link
Copy Markdown

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 <[email protected]>
@tchaikov

Copy link
Copy Markdown
Contributor

#8301 is another way to fix this.

@ghost

ghost commented Mar 24, 2016

Copy link
Copy Markdown
Author

@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

Development

Successfully merging this pull request may close these issues.

3 participants