Skip to contentSkip to conversation

tools/perf/Makefile: drop _FORTIFY_SOURCE right before redefinition

PATCH In review Sergei Trofimovich 2 participants 3 messages Feb 22, 2013 – Feb 23, 2013 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tools/perf/Makefile: drop _FORTIFY_SOURCE right before redefinition

From: Sergei Trofimovich <[email protected]>

Gentoo's toolchain sets _FORTIFY_SOURCE by default which leads to very obscure error:

perf # make clean && make
Makefile:455: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev Makefile:470: *** No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static. Stop

Patch explicitely undefines _FORTIFY_SOURCE. Thanks!

CC Peter Zijlstra <[email protected]>
CC Paul Mackerras <[email protected]>
CC Ingo Molnar <[email protected]>
CC Arnaldo Carvalho de Melo <[email protected]>
---
 tools/perf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/Makefile +1 -1
index 891bc77..60f083d 100644
@@ -94,7 +94,7 @@ ifeq ("$(origin DEBUG)", "command line")
   PERF_DEBUG = $(DEBUG)
 endif
 ifndef PERF_DEBUG
-  CFLAGS_OPTIMIZE = -O6 -D_FORTIFY_SOURCE=2
+  CFLAGS_OPTIMIZE = -O6 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2
 endif
 
 ifdef PARSER_DEBUG
Signature · 1 line
1.8.0
#1 lore raw

Em Fri, Feb 22, 2013 at 01:17:54PM +0300, Sergei Trofimovich escreveu:

Quoted 10 lines

From: Sergei Trofimovich <[email protected]>

Gentoo's toolchain sets _FORTIFY_SOURCE by default which leads to very obscure error:

perf # make clean && make
Makefile:455: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev Makefile:470: *** No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static. Stop

Patch explicitely undefines _FORTIFY_SOURCE. Thanks!

There was a fix merged recently related to this define, can you please check?

git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

branch

perf/core

This patch:

http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=commitdiff;h=1807606ac70da5cda870362c13e71d60e94f9c13

- Arnaldo

#2 lore raw
Quoted 19 lines · On Fri, 22 Feb 2013 12:08:14 -0300 Arnaldo Carvalho de Melo…

Em Fri, Feb 22, 2013 at 01:17:54PM +0300, Sergei Trofimovich escreveu:

Quoted 10 lines

From: Sergei Trofimovich <[email protected]>

Gentoo's toolchain sets _FORTIFY_SOURCE by default which leads to very obscure error:

perf # make clean && make
Makefile:455: No libdw.h found or old libdw.h found or elfutils is older than 0.138, disables dwarf support. Please install new elfutils-devel/libdw-dev Makefile:470: *** No gnu/libc-version.h found, please install glibc-dev[el]/glibc-static. Stop

Patch explicitely undefines _FORTIFY_SOURCE. Thanks!

There was a fix merged recently related to this define, can you please check?

git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux

branch

Quoted 7 lines

perf/core

This patch:

http://git.kernel.org/?p=linux/kernel/git/acme/linux.git;a=commitdiff;h=1807606ac70da5cda870362c13e71d60e94f9c13

- Arnaldo

Yeah, works fine as well. Thank you!

Signature · 1 line
  Sergei