kernel-fxtec-pro1x/tools/perf/util/ui
David Daney 0a84f007f9 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 1aed267173 (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 <david.daney@cavium.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Joerg Roedel <joerg.roedel@amd.com>
Cc: Namhyung Kim <namhyung.kim@lge.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Link: http://lkml.kernel.org/r/1326836461-11952-1-git-send-email-ddaney.cavm@gmail.com
Signed-off-by: David Daney <david.daney@cavium.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2012-01-30 22:19:54 -02:00
..
browsers perf tools: Fix broken build by defining _GNU_SOURCE in Makefile 2012-01-30 22:19:54 -02:00
browser.c perf hists browser: Warn about lost events 2011-11-02 12:27:23 -02:00
browser.h perf hists browser: Warn about lost events 2011-11-02 12:27:23 -02:00
helpline.c perf tools: Fix broken build by defining _GNU_SOURCE in Makefile 2012-01-30 22:19:54 -02:00
helpline.h perf ui browser: Handle K_RESIZE in dialog windows 2011-10-26 13:15:07 -02:00
keysyms.h perf ui browser: Use libslang to read keys 2011-10-20 16:59:15 -02:00
libslang.h perf ui browser: Use libslang to read keys 2011-10-20 16:59:15 -02:00
progress.c perf ui progress: Fix divide by zero 2011-11-28 10:36:57 -02:00
progress.h perf ui progress: Reimplement using slang 2011-10-26 13:04:42 -02:00
setup.c perf ui: Reimplement the popup windows using libslang 2011-10-26 13:06:36 -02:00
ui.h perf ui: Improve handling sigwinch a bit 2011-10-26 13:05:23 -02:00
util.c perf ui browser: Handle K_RESIZE in dialog windows 2011-10-26 13:15:07 -02:00
util.h perf ui browser: Handle K_RESIZE in dialog windows 2011-10-26 13:15:07 -02:00