]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
Gentoo: _FORTIFY_SOURCE fix. 6739/head
authorRobin H. Johnson <robin.johnson@dreamhost.com>
Mon, 30 Nov 2015 21:20:45 +0000 (13:20 -0800)
committerRobin H. Johnson <robin.johnson@dreamhost.com>
Mon, 30 Nov 2015 21:20:45 +0000 (13:20 -0800)
GCC under Gentoo has a patch that has a built-in define for
_FORTIFY_SOURCE if -O2 or higher are used. This causes warnings about
_FORTIFY_SOURCE redefined for every single object compiled.

Work around the issue by explicitly undefining _FORTIFY_SOURCE before we
define it again.

http://tracker.ceph.com/issues/13920 Fixes: #13920
Signed-off-by: Robin H. Johnson <robin.johnson@dreamhost.com>
src/Makefile-env.am

index 199d90a6892e9f1c650c0c15e4267e85a4ede0f5..3d8a252e378be7390c3e16414d37ccc3a9aec206 100644 (file)
@@ -57,6 +57,7 @@ HARDENING_CFLAGS = \
                    -g \
                    -pipe \
                    -Wall \
+                   -Wp,-U_FORTIFY_SOURCE \
                    -Wp,-D_FORTIFY_SOURCE=2 \
                    -fexceptions \
                    --param=ssp-buffer-size=4 \