GNU bug report logs -
#63172
[PATCH cppi] build: avoid a compiler warning about _FORTIFY_SOURCE redefinition
Previous Next
Full log
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
When compiler provides its own definition of _FORTIFY_SOURCE, it complains
about _FORTIFY_SOURCE being redefined:
./lib/config.h:35: error: "_FORTIFY_SOURCE" redefined [-Werror]
35 | # define _FORTIFY_SOURCE 2
|
<built-in>: note: this is the location of the previous definition
* configure.ac (FORTIFY_SOURCE): Do not redefine _FORTIFY_SOURCE.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index f2078b2..36d8c31 100644
--- a/configure.ac
+++ b/configure.ac
@@ -78,7 +78,7 @@ if test "$gl_gcc_warnings" = yes; then
AH_VERBATIM([FORTIFY_SOURCE],
[/* Enable compile-time and run-time bounds-checking, and some warnings,
without upsetting glibc 2.15+. */
- #if defined __OPTIMIZE__ && __OPTIMIZE__
+ #if !defined _FORTIFY_SOURCE && defined __OPTIMIZE__ && __OPTIMIZE__
# define _FORTIFY_SOURCE 2
#endif
])
--
ldv
This bug report was last modified 2 years and 48 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.