* [PATCH] Btrfs-progs: -U_FORTIFY_SOURCE before -D
@ 2013-02-08 23:30 Ian Kumlien
2013-02-09 18:02 ` Sergei Trofimovich
0 siblings, 1 reply; 6+ messages in thread
From: Ian Kumlien @ 2013-02-08 23:30 UTC (permalink / raw)
To: linux-btrfs; +Cc: Ian Kumlien
My builds are cluttered with:
<command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by
default]
Which makes it hard to tell if something breaks or not.
Signed-off-by: Ian Kumlien <pomac@demius.net>
---
I don't know about you, but bilding with
GCC 4.7.2 on gentoo, this is a issue.
Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Makefile b/Makefile
index afd6cb2..ae3abdc 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
CC = gcc
-AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2
+AM_CFLAGS = -Wall -D_FILE_OFFSET_BITS=64 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
CFLAGS = -g -O1
objects = ctree.o disk-io.o radix-tree.o extent-tree.o print-tree.o \
root-tree.o dir-item.o file-item.o inode-item.o \
--
1.8.1.2
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs-progs: -U_FORTIFY_SOURCE before -D
2013-02-08 23:30 [PATCH] Btrfs-progs: -U_FORTIFY_SOURCE before -D Ian Kumlien
@ 2013-02-09 18:02 ` Sergei Trofimovich
2013-02-09 18:57 ` Ian Kumlien
2013-02-12 14:18 ` David Sterba
0 siblings, 2 replies; 6+ messages in thread
From: Sergei Trofimovich @ 2013-02-09 18:02 UTC (permalink / raw)
To: Ian Kumlien; +Cc: linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 695 bytes --]
On Sat, 9 Feb 2013 00:30:21 +0100
Ian Kumlien <pomac@demius.net> wrote:
> My builds are cluttered with:
> <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by
> default]
>
> Which makes it hard to tell if something breaks or not.
> I don't know about you, but bilding with
> GCC 4.7.2 on gentoo, this is a issue.
Unfortunately it's a gentoo specific gcc bug. I'd suggest reporting
it to bugs.gentoo.org. That -D by default breaks linux's perf as well
(due to -D_FOTIFY_SOURCE=2 -Werror in perf sources).
Current workaround is to pass AM_CFLAGS to make:
make AM_CFLAGS=stuff_w/o_fortify_source
It's what gentoo's live ebuild does.
--
Sergei
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs-progs: -U_FORTIFY_SOURCE before -D
2013-02-09 18:02 ` Sergei Trofimovich
@ 2013-02-09 18:57 ` Ian Kumlien
2013-02-09 22:06 ` Sergei Trofimovich
2013-02-12 14:18 ` David Sterba
1 sibling, 1 reply; 6+ messages in thread
From: Ian Kumlien @ 2013-02-09 18:57 UTC (permalink / raw)
To: Sergei Trofimovich; +Cc: Ian Kumlien, linux-btrfs
On Sat, Feb 09, 2013 at 09:02:06PM +0300, Sergei Trofimovich wrote:
> On Sat, 9 Feb 2013 00:30:21 +0100
> Ian Kumlien <pomac@demius.net> wrote:
>
> > My builds are cluttered with:
> > <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by
> > default]
> >
> > Which makes it hard to tell if something breaks or not.
>
> > I don't know about you, but bilding with
> > GCC 4.7.2 on gentoo, this is a issue.
>
> Unfortunately it's a gentoo specific gcc bug. I'd suggest reporting
> it to bugs.gentoo.org. That -D by default breaks linux's perf as well
> (due to -D_FOTIFY_SOURCE=2 -Werror in perf sources).
Is it? There is a workaround in the android build system for compilers
on ubuntu.
Where can i find that bug report?
This is not a emerge, this is a normal system build.
> Current workaround is to pass AM_CFLAGS to make:
> make AM_CFLAGS=stuff_w/o_fortify_source
> It's what gentoo's live ebuild does.
I can't see it here in the live ebuild...
> --
>
> Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs-progs: -U_FORTIFY_SOURCE before -D
2013-02-09 18:57 ` Ian Kumlien
@ 2013-02-09 22:06 ` Sergei Trofimovich
2013-02-09 22:33 ` Ian Kumlien
0 siblings, 1 reply; 6+ messages in thread
From: Sergei Trofimovich @ 2013-02-09 22:06 UTC (permalink / raw)
To: Ian Kumlien; +Cc: Ian Kumlien, linux-btrfs
[-- Attachment #1: Type: text/plain, Size: 1676 bytes --]
On Sat, 9 Feb 2013 19:57:20 +0100
Ian Kumlien <pomac@vapor.com> wrote:
> On Sat, Feb 09, 2013 at 09:02:06PM +0300, Sergei Trofimovich wrote:
> > On Sat, 9 Feb 2013 00:30:21 +0100
> > Ian Kumlien <pomac@demius.net> wrote:
> >
> > > My builds are cluttered with:
> > > <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by
> > > default]
> > >
> > > Which makes it hard to tell if something breaks or not.
> >
> > > I don't know about you, but bilding with
> > > GCC 4.7.2 on gentoo, this is a issue.
> >
> > Unfortunately it's a gentoo specific gcc bug. I'd suggest reporting
> > it to bugs.gentoo.org. That -D by default breaks linux's perf as well
> > (due to -D_FOTIFY_SOURCE=2 -Werror in perf sources).
>
> Is it? There is a workaround in the android build system for compilers
> on ubuntu.
>
> Where can i find that bug report?
I think you need to fill the new one.
> This is not a emerge, this is a normal system build.
Yeah, gentoo has patched gcc specs so you get -D_FORTIFY_SOURCE=2
in gcc command line by default.
http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.6.0/gentoo/10_all_default-fortify-source.patch?view=markup
> > Current workaround is to pass AM_CFLAGS to make:
> > make AM_CFLAGS=stuff_w/o_fortify_source
> > It's what gentoo's live ebuild does.
>
> I can't see it here in the live ebuild...
sys-fs/btrfs-progs/btrfs-progs-9999.ebuild:
...
src_compile() {
emake \
CC="$(tc-getCC)" \
AM_CFLAGS=-D_FILE_OFFSET_BITS=64 \
...
}
This line overrides in-Makefiles AM_CFLAGS.
--
Sergei
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs-progs: -U_FORTIFY_SOURCE before -D
2013-02-09 22:06 ` Sergei Trofimovich
@ 2013-02-09 22:33 ` Ian Kumlien
0 siblings, 0 replies; 6+ messages in thread
From: Ian Kumlien @ 2013-02-09 22:33 UTC (permalink / raw)
To: Sergei Trofimovich; +Cc: Ian Kumlien, linux-btrfs
On Sun, Feb 10, 2013 at 01:06:26AM +0300, Sergei Trofimovich wrote:
> On Sat, 9 Feb 2013 19:57:20 +0100
> Ian Kumlien <pomac@vapor.com> wrote:
>
> > On Sat, Feb 09, 2013 at 09:02:06PM +0300, Sergei Trofimovich wrote:
> > > On Sat, 9 Feb 2013 00:30:21 +0100
> > > Ian Kumlien <pomac@demius.net> wrote:
> > >
> > > > My builds are cluttered with:
> > > > <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by
> > > > default]
> > > >
> > > > Which makes it hard to tell if something breaks or not.
> > >
> > > > I don't know about you, but bilding with
> > > > GCC 4.7.2 on gentoo, this is a issue.
> > >
> > > Unfortunately it's a gentoo specific gcc bug. I'd suggest reporting
> > > it to bugs.gentoo.org. That -D by default breaks linux's perf as well
> > > (due to -D_FOTIFY_SOURCE=2 -Werror in perf sources).
> >
> > Is it? There is a workaround in the android build system for compilers
> > on ubuntu.
> >
> > Where can i find that bug report?
>
> I think you need to fill the new one.
>
> > This is not a emerge, this is a normal system build.
>
> Yeah, gentoo has patched gcc specs so you get -D_FORTIFY_SOURCE=2
> in gcc command line by default.
>
> http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo/src/patchsets/gcc/4.6.0/gentoo/10_all_default-fortify-source.patch?view=markup
Actually they don't patch the specs they patch the source.
If they'd patched the specs i would have found it, i actually checked
gcc -dumpspecs
Again, is there any harm in adding this patch? Apparently other distors
has done the same...
> > > Current workaround is to pass AM_CFLAGS to make:
> > > make AM_CFLAGS=stuff_w/o_fortify_source
> > > It's what gentoo's live ebuild does.
> >
> > I can't see it here in the live ebuild...
>
> sys-fs/btrfs-progs/btrfs-progs-9999.ebuild:
> ...
> src_compile() {
> emake \
> CC="$(tc-getCC)" \
> AM_CFLAGS=-D_FILE_OFFSET_BITS=64 \
> ...
> }
>
> This line overrides in-Makefiles AM_CFLAGS.
Must have changed recently... Was it changed on the 4:th, 5 days ago?
> --
>
> Sergei
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] Btrfs-progs: -U_FORTIFY_SOURCE before -D
2013-02-09 18:02 ` Sergei Trofimovich
2013-02-09 18:57 ` Ian Kumlien
@ 2013-02-12 14:18 ` David Sterba
1 sibling, 0 replies; 6+ messages in thread
From: David Sterba @ 2013-02-12 14:18 UTC (permalink / raw)
To: Sergei Trofimovich; +Cc: Ian Kumlien, linux-btrfs
On Sat, Feb 09, 2013 at 09:02:06PM +0300, Sergei Trofimovich wrote:
> On Sat, 9 Feb 2013 00:30:21 +0100
> Ian Kumlien <pomac@demius.net> wrote:
>
> > My builds are cluttered with:
> > <command-line>:0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by
> > default]
> >
> > Which makes it hard to tell if something breaks or not.
>
> > I don't know about you, but bilding with
> > GCC 4.7.2 on gentoo, this is a issue.
>
> Unfortunately it's a gentoo specific gcc bug. I'd suggest reporting
> it to bugs.gentoo.org. That -D by default breaks linux's perf as well
> (due to -D_FOTIFY_SOURCE=2 -Werror in perf sources).
>
> Current workaround is to pass AM_CFLAGS to make:
> make AM_CFLAGS=stuff_w/o_fortify_source
> It's what gentoo's live ebuild does.
The fortify flag was added without a special reason, it's good to have
it. I'm ok with adding the forced undefine to keep the build quiet and
working as specified in the Makefile.
david
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-02-12 14:18 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-08 23:30 [PATCH] Btrfs-progs: -U_FORTIFY_SOURCE before -D Ian Kumlien
2013-02-09 18:02 ` Sergei Trofimovich
2013-02-09 18:57 ` Ian Kumlien
2013-02-09 22:06 ` Sergei Trofimovich
2013-02-09 22:33 ` Ian Kumlien
2013-02-12 14:18 ` David Sterba
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.