Project

General

Profile

Bug #13920

build failure due to distribution implicit compiler files: _FORTIFY_SOURCE on Gentoo

Added by Robin Johnson about 3 years ago. Updated about 3 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
11/30/2015
Due date:
% Done:

0%

Source:
other
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

Description

Gentoo's compiler patches include -D_FORTIFY_SOURCE=2 if -O2 or higher are used.

https://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.9.3/gentoo/10_all_default-fortify-source.patch?view=markup

This causes lots of error spew that _FORTIFY_SOURCE is defined twice when compiling on Gentoo:
CXX cls/version/cls_version_client.o
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined
<built-in>: note: this is the location of the previous definition

To resolve this, we should explicitly undefine _FORTIFY_SOURCE before trying to define it again.

Associated revisions

Revision ccf7c29b (diff)
Added by Robin H. Johnson about 3 years ago

Gentoo: _FORTIFY_SOURCE fix.

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 <>

History

#1 Updated by Robin Johnson about 3 years ago

PR for fix is here: https://github.com/ceph/ceph/pull/6739
should be backported as well, but not 100% required.

#2 Updated by Alfredo Deza about 3 years ago

  • Project changed from teuthology to Ceph

#3 Updated by Sage Weil about 3 years ago

  • Status changed from New to Testing

#4 Updated by Samuel Just about 3 years ago

  • Assignee set to Samuel Just

#5 Updated by Samuel Just about 3 years ago

  • Status changed from Testing to Resolved

Also available in: Atom PDF