[tip:perf/core] perf tools: Fix libunwind build and feature detection for 32-bit build

2013-11-04 Thread tip-bot for Adrian Hunter
Commit-ID:  8a0c4c2843d3b72e23c3c12079b8d5c3ae99f3e3
Gitweb: http://git.kernel.org/tip/8a0c4c2843d3b72e23c3c12079b8d5c3ae99f3e3
Author: Adrian Hunter 
AuthorDate: Fri, 1 Nov 2013 15:51:32 +0200
Committer:  Arnaldo Carvalho de Melo 
CommitDate: Mon, 4 Nov 2013 12:21:18 -0300

perf tools: Fix libunwind build and feature detection for 32-bit build

Use -lunwind-x86 instead of -lunwind-x86_64 for 32-bit build.

Signed-off-by: Adrian Hunter 
Acked-by: Jiri Olsa 
Cc: David Ahern 
Cc: Frederic Weisbecker 
Cc: Ingo Molnar 
Cc: Jiri Olsa 
Cc: Mike Galbraith 
Cc: Namhyung Kim 
Cc: Paul Mackerras 
Cc: Peter Zijlstra 
Cc: Stephane Eranian 
Link: 
http://lkml.kernel.org/r/1383313899-15987-5-git-send-email-adrian.hun...@intel.com
Signed-off-by: Arnaldo Carvalho de Melo 
---
 tools/perf/config/Makefile| 6 --
 tools/perf/config/feature-checks/Makefile | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 2f1d7d7..ffb5f55 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -25,9 +25,11 @@ ifeq ($(ARCH),x86_64)
 RAW_ARCH := x86_64
 CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT
 ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S 
../../arch/x86/lib/memset_64.S
+LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
+  else
+LIBUNWIND_LIBS = -lunwind -lunwind-x86
   endif
   NO_PERF_REGS := 0
-  LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
 endif
 
 ifeq ($(NO_PERF_REGS),0)
@@ -96,7 +98,7 @@ endif
 
 feature_check = $(eval $(feature_check_code))
 define feature_check_code
-  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) 
CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS=$(LDFLAGS) -C config/feature-checks test-$1 
>/dev/null 2>/dev/null && echo 1 || echo 0)
+  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) 
CFLAGS="$(EXTRA_CFLAGS)" LDFLAGS=$(LDFLAGS) LIBUNWIND_LIBS="$(LIBUNWIND_LIBS)" 
-C config/feature-checks test-$1 >/dev/null 2>/dev/null && echo 1 || echo 0)
 endef
 
 feature_set = $(eval $(feature_set_code))
diff --git a/tools/perf/config/feature-checks/Makefile 
b/tools/perf/config/feature-checks/Makefile
index 353c00c..d37d58d 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -36,7 +36,7 @@ BUILD = $(CC) $(CFLAGS) $(LDFLAGS) -o $(OUTPUT)$@ $@.c
 ###
 
 test-all:
-   $(BUILD) -Werror -fstack-protector -fstack-protector-all -O2 -Werror 
-D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lunwind -lunwind-x86_64 -lelf -laudit 
-I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 
2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd 
-ldl
+   $(BUILD) -Werror -fstack-protector -fstack-protector-all -O2 -Werror 
-D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma $(LIBUNWIND_LIBS) -lelf -laudit 
-I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 
2>/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='"perf"' -lbfd 
-ldl
 
 test-hello:
$(BUILD)
@@ -72,7 +72,7 @@ test-libnuma:
$(BUILD) -lnuma
 
 test-libunwind:
-   $(BUILD) -lunwind -lunwind-x86_64 -lelf
+   $(BUILD) $(LIBUNWIND_LIBS) -lelf
 
 test-libaudit:
$(BUILD) -laudit
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/


[tip:perf/core] perf tools: Fix libunwind build and feature detection for 32-bit build

2013-11-04 Thread tip-bot for Adrian Hunter
Commit-ID:  8a0c4c2843d3b72e23c3c12079b8d5c3ae99f3e3
Gitweb: http://git.kernel.org/tip/8a0c4c2843d3b72e23c3c12079b8d5c3ae99f3e3
Author: Adrian Hunter adrian.hun...@intel.com
AuthorDate: Fri, 1 Nov 2013 15:51:32 +0200
Committer:  Arnaldo Carvalho de Melo a...@redhat.com
CommitDate: Mon, 4 Nov 2013 12:21:18 -0300

perf tools: Fix libunwind build and feature detection for 32-bit build

Use -lunwind-x86 instead of -lunwind-x86_64 for 32-bit build.

Signed-off-by: Adrian Hunter adrian.hun...@intel.com
Acked-by: Jiri Olsa jo...@redhat.com
Cc: David Ahern dsah...@gmail.com
Cc: Frederic Weisbecker fweis...@gmail.com
Cc: Ingo Molnar mi...@redhat.com
Cc: Jiri Olsa jo...@redhat.com
Cc: Mike Galbraith efa...@gmx.de
Cc: Namhyung Kim namhy...@gmail.com
Cc: Paul Mackerras pau...@samba.org
Cc: Peter Zijlstra a.p.zijls...@chello.nl
Cc: Stephane Eranian eran...@google.com
Link: 
http://lkml.kernel.org/r/1383313899-15987-5-git-send-email-adrian.hun...@intel.com
Signed-off-by: Arnaldo Carvalho de Melo a...@redhat.com
---
 tools/perf/config/Makefile| 6 --
 tools/perf/config/feature-checks/Makefile | 4 ++--
 2 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile
index 2f1d7d7..ffb5f55 100644
--- a/tools/perf/config/Makefile
+++ b/tools/perf/config/Makefile
@@ -25,9 +25,11 @@ ifeq ($(ARCH),x86_64)
 RAW_ARCH := x86_64
 CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT
 ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S 
../../arch/x86/lib/memset_64.S
+LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
+  else
+LIBUNWIND_LIBS = -lunwind -lunwind-x86
   endif
   NO_PERF_REGS := 0
-  LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
 endif
 
 ifeq ($(NO_PERF_REGS),0)
@@ -96,7 +98,7 @@ endif
 
 feature_check = $(eval $(feature_check_code))
 define feature_check_code
-  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) 
CFLAGS=$(EXTRA_CFLAGS) LDFLAGS=$(LDFLAGS) -C config/feature-checks test-$1 
/dev/null 2/dev/null  echo 1 || echo 0)
+  feature-$(1) := $(shell $(MAKE) OUTPUT=$(OUTPUT_FEATURES) 
CFLAGS=$(EXTRA_CFLAGS) LDFLAGS=$(LDFLAGS) LIBUNWIND_LIBS=$(LIBUNWIND_LIBS) 
-C config/feature-checks test-$1 /dev/null 2/dev/null  echo 1 || echo 0)
 endef
 
 feature_set = $(eval $(feature_set_code))
diff --git a/tools/perf/config/feature-checks/Makefile 
b/tools/perf/config/feature-checks/Makefile
index 353c00c..d37d58d 100644
--- a/tools/perf/config/feature-checks/Makefile
+++ b/tools/perf/config/feature-checks/Makefile
@@ -36,7 +36,7 @@ BUILD = $(CC) $(CFLAGS) $(LDFLAGS) -o $(OUTPUT)$@ $@.c
 ###
 
 test-all:
-   $(BUILD) -Werror -fstack-protector -fstack-protector-all -O2 -Werror 
-D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma -lunwind -lunwind-x86_64 -lelf -laudit 
-I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 
2/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='perf' -lbfd 
-ldl
+   $(BUILD) -Werror -fstack-protector -fstack-protector-all -O2 -Werror 
-D_FORTIFY_SOURCE=2 -ldw -lelf -lnuma $(LIBUNWIND_LIBS) -lelf -laudit 
-I/usr/include/slang -lslang $(shell pkg-config --libs --cflags gtk+-2.0 
2/dev/null) $(FLAGS_PERL_EMBED) $(FLAGS_PYTHON_EMBED) -DPACKAGE='perf' -lbfd 
-ldl
 
 test-hello:
$(BUILD)
@@ -72,7 +72,7 @@ test-libnuma:
$(BUILD) -lnuma
 
 test-libunwind:
-   $(BUILD) -lunwind -lunwind-x86_64 -lelf
+   $(BUILD) $(LIBUNWIND_LIBS) -lelf
 
 test-libaudit:
$(BUILD) -laudit
--
To unsubscribe from this list: send the line unsubscribe linux-kernel in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/