[PATCH 1/2] perf tools: Move QUIET_STDERR def to before first use

From: Arnaldo Carvalho de Melo
Date: Tue Jan 12 2010 - 05:58:49 EST


From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>

QUIET_STDERR is used when detecting if -fstack-protector-all can be used.

Noticed while building the perf tools on a Debian PARISC64 machine.

Cc: FrÃdÃric Weisbecker <fweisbec@xxxxxxxxx>
Cc: Mike Galbraith <efault@xxxxxx>
Cc: Peter Zijlstra <a.p.zijlstra@xxxxxxxxx>
Cc: Paul Mackerras <paulus@xxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/perf/Makefile | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/tools/perf/Makefile b/tools/perf/Makefile
index 7c84642..4e4acb6 100644
--- a/tools/perf/Makefile
+++ b/tools/perf/Makefile
@@ -250,6 +250,12 @@ PTHREAD_LIBS = -lpthread
# explicitly what architecture to check for. Fix this up for yours..
SPARSE_FLAGS = -D__BIG_ENDIAN__ -D__powerpc__

+ifeq ($(V), 2)
+ QUIET_STDERR = ">/dev/null"
+else
+ QUIET_STDERR = ">/dev/null 2>&1"
+endif
+
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
@@ -452,11 +458,6 @@ BUILTIN_OBJS += builtin-kmem.o

PERFLIBS = $(LIB_FILE)

-ifeq ($(V), 2)
- QUIET_STDERR = ">/dev/null"
-else
- QUIET_STDERR = ">/dev/null 2>&1"
-endif
#
# Platform specific tweaks
#
--
1.6.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/