diff options
author | David Daney <[email protected]> | 2012-01-17 13:41:01 -0800 |
---|---|---|
committer | Arnaldo Carvalho de Melo <[email protected]> | 2012-01-30 22:19:54 -0200 |
commit | 0a84f007f97ce6fc7c07a481a5b9808b187a0193 (patch) | |
tree | 59828d7871e9baa2f447f1a5b58010972be73894 /lib/mpi/mpi-scan.c | |
parent | d0caf292505d051b1026e85faf3a85e907566f31 (diff) |
perf tools: Fix broken build by defining _GNU_SOURCE in Makefile
When building on my Debian/mips system, util/util.c fails to build
because commit 1aed2671738785e8f5aea663a6fda91aa7ef59b5 (perf kvm: Do
guest-only counting by default) indirectly includes stdio.h before the
feature selection in util.h is done. This prevents _GNU_SOURCE in
util.h from enabling the declaration of getline(), from now second
inclusion of stdio.h, and the build is broken.
There is another breakage in util/evsel.c caused by include ordering,
but I didn't fully track down the commit that caused it.
The root cause of all this is an inconsistent definition of _GNU_SOURCE,
so I move the definition into the Makefile so that it is passed to all
invocations of the compiler and used uniformly for all system header
files. All other #define and #undef of _GNU_SOURCE are removed as they
cause conflicts with the definition passed to the compiler.
All the features.h definitions (_LARGEFILE64_SOURCE _FILE_OFFSET_BITS=64
and _GNU_SOURCE) are needed by the python glue code too, so they are
moved to BASIC_CFLAGS, and the misleading comments about BASIC_CFLAGS
are removed.
This gives me a clean build on x86_64 (fc12) and mips (Debian).
Cc: David Daney <[email protected]>
Cc: Ingo Molnar <[email protected]>
Cc: Joerg Roedel <[email protected]>
Cc: Namhyung Kim <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: David Daney <[email protected]>
Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
Diffstat (limited to 'lib/mpi/mpi-scan.c')
0 files changed, 0 insertions, 0 deletions