[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15663: _FORTIFY_SOURCE compilation error: Redefinition with GCC 4.7.
From: |
Paul Eggert |
Subject: |
bug#15663: _FORTIFY_SOURCE compilation error: Redefinition with GCC 4.7.3 under Gentoo |
Date: |
Sun, 20 Oct 2013 15:06:57 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 |
behoffski wrote:
> I can suggest two ways of dealing with this: Either respect any previous
> definition:
That's what Emacs does, so I changed 'grep' to do that, as follows.
Thanks for reporting the bug.
>From 15e16023b8318b6eece1325eb2ea9d3fcfbc77ad Mon Sep 17 00:00:00 2001
From: Paul Eggert <address@hidden>
Date: Sun, 20 Oct 2013 15:05:14 -0700
Subject: [PATCH] build: port to platforms that predefine _FORTIFY_SOURCE
Problem reported by Brenton Hoff (Bug#15663).
* configure.ac (_FORTIFY_SOURCE): Don't define if already defined.
This is what Emacs does.
---
configure.ac | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index 5c93d04..6ce7237 100644
--- a/configure.ac
+++ b/configure.ac
@@ -159,7 +159,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
])
--
1.8.3.1