noring at nocrew dot org
2018-10-27 00:29:53 UTC
https://sourceware.org/bugzilla/show_bug.cgi?id=23835
Bug ID: 23835
Summary: gdb/common/common-defs.h:71:0: error:
"_FORTIFY_SOURCE" redefined [-Werror]
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: noring at nocrew dot org
Target Milestone: ---
Compilation of GDB (Binutils) on a recent Gentoo
% gcc --version
gcc (Gentoo 7.3.0-r3 p1.4) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% equery l sys-libs/glibc
* Searching for glibc in sys-libs ...
[IP-] [ ] sys-libs/glibc-2.26-r7:2.2
fails with the following error:
CXX gdb.o
In file included from ../../gdb/defs.h:28:0,
from ../../gdb/gdb.c:19:
../../gdb/common/common-defs.h:71:0: error: "_FORTIFY_SOURCE" redefined
[-Werror]
#define _FORTIFY_SOURCE 2
<built-in>: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1619: gdb.o] Error 1
This patch is a simple workaround:
--- a/gdb/common/common-defs.h
+++ b/gdb/common/common-defs.h
@@ -67,7 +67,7 @@
optimization is required because _FORTIFY_SOURCE only works when
optimization is enabled. */
-#if defined __OPTIMIZE__ && __OPTIMIZE__ > 0
+#if defined __OPTIMIZE__ && __OPTIMIZE__ > 0 && 0
#define _FORTIFY_SOURCE 2
#endif
Bug ID: 23835
Summary: gdb/common/common-defs.h:71:0: error:
"_FORTIFY_SOURCE" redefined [-Werror]
Product: gdb
Version: HEAD
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: gdb
Assignee: unassigned at sourceware dot org
Reporter: noring at nocrew dot org
Target Milestone: ---
Compilation of GDB (Binutils) on a recent Gentoo
% gcc --version
gcc (Gentoo 7.3.0-r3 p1.4) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
% equery l sys-libs/glibc
* Searching for glibc in sys-libs ...
[IP-] [ ] sys-libs/glibc-2.26-r7:2.2
fails with the following error:
CXX gdb.o
In file included from ../../gdb/defs.h:28:0,
from ../../gdb/gdb.c:19:
../../gdb/common/common-defs.h:71:0: error: "_FORTIFY_SOURCE" redefined
[-Werror]
#define _FORTIFY_SOURCE 2
<built-in>: note: this is the location of the previous definition
cc1plus: all warnings being treated as errors
make[2]: *** [Makefile:1619: gdb.o] Error 1
This patch is a simple workaround:
--- a/gdb/common/common-defs.h
+++ b/gdb/common/common-defs.h
@@ -67,7 +67,7 @@
optimization is required because _FORTIFY_SOURCE only works when
optimization is enabled. */
-#if defined __OPTIMIZE__ && __OPTIMIZE__ > 0
+#if defined __OPTIMIZE__ && __OPTIMIZE__ > 0 && 0
#define _FORTIFY_SOURCE 2
#endif
--
You are receiving this mail because:
You are on the CC list for the bug.
You are receiving this mail because:
You are on the CC list for the bug.