This is a note to let you know that I've just added the patch titled
perf tools: Add V=2 option to help debug config issues
to the 2.6.32-longterm tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.32.git;a=summary
The filename of the patch is:
perf-tools-add-v-2-option-to-help-debug-config-issue.patch
and it can be found in the queue-2.6.32 subdirectory.
If you, or anyone else, feels it should not be added to the 2.6.32 longterm
tree,
please let <[email protected]> know about it.
>From 07abf40cfbb94b3770c348833c64a46edd9d5d60 Mon Sep 17 00:00:00 2001
From: Michael S. Tsirkin <[email protected]>
Date: Sun, 22 Nov 2009 13:27:27 +0200
Subject: perf tools: Add V=2 option to help debug config issues
From: Michael S. Tsirkin <[email protected]>
commit 7baed9af4bf0d7850045e36d19a43a2c76872b62 upstream.
Make standard error show up on console when V=2 is set.
Signed-off-by: Michael S. Tsirkin <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Frederic Weisbecker <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
[bwh: Backport to 2.6.32]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
tools/perf/Makefile | 22 ++++++++++++++--------
1 file changed, 14 insertions(+), 8 deletions(-)
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -2,6 +2,7 @@
all::
# Define V=1 to have a more verbose compile.
+# Define V=2 to have an even more verbose compile.
#
# Define SNPRINTF_RETURNS_BOGUS if your are on a system which snprintf()
# or vsnprintf() return -1 instead of number of characters which would
@@ -263,7 +264,7 @@ PTHREAD_LIBS = -lpthread
# explicitly what architecture to check for. Fix this up for yours..
SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__
-ifeq ($(shell sh -c "echo 'int foo(void) {char X[2]; return 3;}' | $(CC) -x c
-c -Werror -fstack-protector-all - -o /dev/null >/dev/null 2>&1 && echo y"), y)
+ifeq ($(shell sh -c "echo 'int foo(void) {char X[2]; return 3;}' | $(CC) -x c
-c -Werror -fstack-protector-all - -o /dev/null "$(QUIET_STDERR)" && echo y"),
y)
CFLAGS := $(CFLAGS) -fstack-protector-all
endif
@@ -408,6 +409,11 @@ BUILTIN_OBJS += builtin-trace.o
PERFLIBS = $(LIB_FILE)
+ifeq ($(V), 2)
+ QUIET_STDERR = ">/dev/null"
+else
+ QUIET_STDERR = ">/dev/null 2>&1"
+endif
#
# Platform specific tweaks
#
@@ -435,12 +441,12 @@ ifeq ($(uname_S),Darwin)
PTHREAD_LIBS =
endif
-ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int
main(void) { const char * version = gnu_get_libc_version(); return
(long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) > /dev/null 2>&1
&& echo y"), y)
+ifneq ($(shell sh -c "(echo '\#include <gnu/libc-version.h>'; echo 'int
main(void) { const char * version = gnu_get_libc_version(); return
(long)version; }') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)"
&& echo y"), y)
msg := $(error No gnu/libc-version.h found, please install
glibc-dev[el]);
endif
-ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf
* elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c -
$(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null
$(ALL_LDFLAGS) $(EXTLIBS) > /dev/null 2>&1 && echo y"), y)
- ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int
main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf;
}') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) > /dev/null 2>&1 && echo y"), y)
+ifeq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int main(void) { Elf
* elf = elf_begin(0, ELF_C_READ, 0); return (long)elf; }') | $(CC) -x c -
$(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -o /dev/null
$(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
+ ifneq ($(shell sh -c "(echo '\#include <libelf.h>'; echo 'int
main(void) { Elf * elf = elf_begin(0, ELF_C_READ_MMAP, 0); return (long)elf;
}') | $(CC) -x c - $(ALL_CFLAGS) -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64
-o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) "$(QUIET_STDERR)" && echo y"), y)
BASIC_CFLAGS += -DLIBELF_NO_MMAP
endif
else
@@ -450,20 +456,20 @@ endif
ifdef NO_DEMANGLE
BASIC_CFLAGS += -DNO_DEMANGLE
else
- has_bfd := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int
main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS)
-o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd > /dev/null 2>&1 && echo y")
+ has_bfd := $(shell sh -c "(echo '\#include <bfd.h>'; echo 'int
main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS)
-o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd "$(QUIET_STDERR)" && echo y")
ifeq ($(has_bfd),y)
EXTLIBS += -lbfd
else
- has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>';
echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c -
$(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty > /dev/null
2>&1 && echo y")
+ has_bfd_iberty := $(shell sh -c "(echo '\#include <bfd.h>';
echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC) -x c -
$(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty
"$(QUIET_STDERR)" && echo y")
ifeq ($(has_bfd_iberty),y)
EXTLIBS += -lbfd -liberty
else
- has_bfd_iberty_z := $(shell sh -c "(echo '\#include
<bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC)
-x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz
> /dev/null 2>&1 && echo y")
+ has_bfd_iberty_z := $(shell sh -c "(echo '\#include
<bfd.h>'; echo 'int main(void) { bfd_demangle(0, 0, 0); return 0; }') | $(CC)
-x c - $(ALL_CFLAGS) -o /dev/null $(ALL_LDFLAGS) $(EXTLIBS) -lbfd -liberty -lz
"$(QUIET_STDERR)" && echo y")
ifeq ($(has_bfd_iberty_z),y)
EXTLIBS += -lbfd -liberty -lz
else
- has_cplus_demangle := $(shell sh -c "(echo
'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) {
cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null
$(ALL_LDFLAGS) $(EXTLIBS) -liberty > /dev/null 2>&1 && echo y")
+ has_cplus_demangle := $(shell sh -c "(echo
'extern char *cplus_demangle(const char *, int);'; echo 'int main(void) {
cplus_demangle(0, 0); return 0; }') | $(CC) -x c - $(ALL_CFLAGS) -o /dev/null
$(ALL_LDFLAGS) $(EXTLIBS) -liberty "$(QUIET_STDERR)" && echo y")
ifeq ($(has_cplus_demangle),y)
EXTLIBS += -liberty
BASIC_CFLAGS += -DHAVE_CPLUS_DEMANGLE
Patches currently in longterm-queue-2.6.32 which might be from [email protected]
are
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/perf-tools-add-v-2-option-to-help-debug-config-issue.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/perf-use-default-compiler-mode-by-default.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/perf-tools-suggest-static-libraries-as-well.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/udp-fix-bogus-ufo-packet-generation.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/perf-tools-support-static-build.patch
/home/gregkh/linux/longterm/longterm-queue-2.6.32/queue-2.6.32/virtio_net-fix-oom-handling-on-tx.patch
_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable