GNU bug report logs - #12714
[PATCH] build: do not redefine _FORTIFY_SOURCE

Previous Next

Package: coreutils;

Reported by: Mike Frysinger <vapier <at> gentoo.org>

Date: Tue, 23 Oct 2012 19:23:01 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Mike Frysinger <vapier <at> gentoo.org>
Subject: bug#12714: closed (Re: bug#12714: [PATCH] build: do not redefine
 _FORTIFY_SOURCE)
Date: Wed, 24 Oct 2012 16:12:03 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#12714: [PATCH] build: do not redefine _FORTIFY_SOURCE

which was filed against the coreutils package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 12714 <at> debbugs.gnu.org.

-- 
12714: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=12714
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Meyering <jim <at> meyering.net>
To: Mike Frysinger <vapier <at> gentoo.org>
Cc: 12714-done <at> debbugs.gnu.org, bug-coreutils <at> gnu.org
Subject: Re: bug#12714: [PATCH] build: do not redefine _FORTIFY_SOURCE
Date: Wed, 24 Oct 2012 18:09:27 +0200
Mike Frysinger wrote:

> On Tuesday 23 October 2012 15:26:14 Jim Meyering wrote:
>> Mike Frysinger wrote:
>> > If the active compiler or flags have already defined _FORTIFY_SOURCE,
>> > don't go overriding that.  Otherwise we get a lot of spew about the
>> > flag being redefined.
>> >
>> > * configure.ac (FORTIFY_SOURCE): Check if _FORTIFY_SOURCE is defined.
>> > ---
...
>> Thanks.  Please adjust the log (or just tell us and we'll adjust it)
>> so that we know which compiler motivates this change.
>
> Ubuntu will enable _FORTIFY_SOURCE by default.  not sure about Debian.  Gentoo
> has been doing it for a while.

Thanks.  I've adjusted the log.
Ok with you?

From 9517680ed3d4d7baff8a842a052ad405f9e9049f Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier <at> gentoo.org>
Date: Tue, 23 Oct 2012 15:20:07 -0400
Subject: [PATCH] build: do not redefine _FORTIFY_SOURCE

When _FORTIFY_SOURCE is defined by the compiler or via flags, as
it is on Gentoo, do not override it.  Otherwise we get many
redefinition warnings.

* configure.ac (FORTIFY_SOURCE): Check if _FORTIFY_SOURCE is defined.
This addresses http://bugs.gnu.org/12714
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e5e05be..6504144 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,7 +170,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.0

[Message part 3 (message/rfc822, inline)]
From: Mike Frysinger <vapier <at> gentoo.org>
To: bug-coreutils <at> gnu.org
Subject: [PATCH] build: do not redefine _FORTIFY_SOURCE
Date: Tue, 23 Oct 2012 15:20:07 -0400
If the active compiler or flags have already defined _FORTIFY_SOURCE,
don't go overriding that.  Otherwise we get a lot of spew about the
flag being redefined.

* configure.ac (FORTIFY_SOURCE): Check if _FORTIFY_SOURCE is defined.
---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index e5e05be..6504144 100644
--- a/configure.ac
+++ b/configure.ac
@@ -170,7 +170,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.7.12




This bug report was last modified 12 years and 216 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.