From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1423243AbcFHIsp (ORCPT ); Wed, 8 Jun 2016 04:48:45 -0400 Received: from terminus.zytor.com ([198.137.202.10]:54404 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161478AbcFHIsj (ORCPT ); Wed, 8 Jun 2016 04:48:39 -0400 Date: Wed, 8 Jun 2016 01:47:56 -0700 From: tip-bot for He Kuang Message-ID: Cc: tumanova@linux.vnet.ibm.com, wangnan0@huawei.com, hekuang@huawei.com, acme@redhat.com, hpa@zytor.com, kan.liang@intel.com, dsahern@gmail.com, jolsa@kernel.org, linux-kernel@vger.kernel.org, sukadev@linux.vnet.ibm.com, peterz@infradead.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com, tglx@linutronix.de, mingo@kernel.org, jpoimboe@redhat.com, namhyung@kernel.org, ak@linux.intel.com, mhiramat@kernel.org, eranian@google.com, penberg@kernel.org Reply-To: peterz@infradead.org, sukadev@linux.vnet.ibm.com, linux-kernel@vger.kernel.org, jolsa@kernel.org, tumanova@linux.vnet.ibm.com, wangnan0@huawei.com, hekuang@huawei.com, acme@redhat.com, hpa@zytor.com, kan.liang@intel.com, dsahern@gmail.com, mingo@kernel.org, jpoimboe@redhat.com, tglx@linutronix.de, mhiramat@kernel.org, namhyung@kernel.org, ak@linux.intel.com, eranian@google.com, penberg@kernel.org, alexander.shishkin@linux.intel.com, adrian.hunter@intel.com In-Reply-To: <1464924803-22214-7-git-send-email-hekuang@huawei.com> References: <1464924803-22214-7-git-send-email-hekuang@huawei.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/core] perf unwind: Separate local/remote libunwind config Git-Commit-ID: 9d8e14d306ef2f5daf2fd099ef07c39dd83e2c0d X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 9d8e14d306ef2f5daf2fd099ef07c39dd83e2c0d Gitweb: http://git.kernel.org/tip/9d8e14d306ef2f5daf2fd099ef07c39dd83e2c0d Author: He Kuang AuthorDate: Fri, 3 Jun 2016 03:33:15 +0000 Committer: Arnaldo Carvalho de Melo CommitDate: Tue, 7 Jun 2016 12:08:52 -0300 perf unwind: Separate local/remote libunwind config CONFIG_LIBUNWIND/NO_LIBUNWIND are changed to CONFIG_LOCAL_LIBUNWIND/ NO_LOCAL_LIBUNWIND for retaining local unwind features. The new CONFIG_LIBUNWIND stands for either local or remote or both unwind are supported, and NO_LIBUNWIND means that neither local nor remote unwind is supported. LIBUNWIND_LIBS is eliminated in LDFLAGS if local libunwind is not supported. Signed-off-by: He Kuang Acked-by: Jiri Olsa Cc: Adrian Hunter Cc: Alexander Shishkin Cc: Andi Kleen Cc: David Ahern Cc: Ekaterina Tumanova Cc: Josh Poimboeuf Cc: Kan Liang Cc: Masami Hiramatsu Cc: Namhyung Kim Cc: Pekka Enberg Cc: Peter Zijlstra Cc: Stephane Eranian Cc: Sukadev Bhattiprolu Cc: Wang Nan Link: http://lkml.kernel.org/r/1464924803-22214-7-git-send-email-hekuang@huawei.com Signed-off-by: Arnaldo Carvalho de Melo --- tools/perf/arch/arm/util/Build | 2 +- tools/perf/arch/arm64/util/Build | 2 +- tools/perf/arch/x86/util/Build | 2 +- tools/perf/config/Makefile | 20 +++++++++++++++++--- 4 files changed, 20 insertions(+), 6 deletions(-) diff --git a/tools/perf/arch/arm/util/Build b/tools/perf/arch/arm/util/Build index d22e3d0..f98da17 100644 --- a/tools/perf/arch/arm/util/Build +++ b/tools/perf/arch/arm/util/Build @@ -1,4 +1,4 @@ libperf-$(CONFIG_DWARF) += dwarf-regs.o -libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o +libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o diff --git a/tools/perf/arch/arm64/util/Build b/tools/perf/arch/arm64/util/Build index e58123a8..02f41db 100644 --- a/tools/perf/arch/arm64/util/Build +++ b/tools/perf/arch/arm64/util/Build @@ -1,2 +1,2 @@ libperf-$(CONFIG_DWARF) += dwarf-regs.o -libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o +libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o diff --git a/tools/perf/arch/x86/util/Build b/tools/perf/arch/x86/util/Build index 4cd8a16..f95e6f4 100644 --- a/tools/perf/arch/x86/util/Build +++ b/tools/perf/arch/x86/util/Build @@ -8,7 +8,7 @@ libperf-y += group.o libperf-$(CONFIG_DWARF) += dwarf-regs.o libperf-$(CONFIG_BPF_PROLOGUE) += dwarf-regs.o -libperf-$(CONFIG_LIBUNWIND) += unwind-libunwind.o +libperf-$(CONFIG_LOCAL_LIBUNWIND) += unwind-libunwind.o libperf-$(CONFIG_LIBDW_DWARF_UNWIND) += unwind-libdw.o libperf-$(CONFIG_AUXTRACE) += auxtrace.o diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile index 118df2d..3918687 100644 --- a/tools/perf/config/Makefile +++ b/tools/perf/config/Makefile @@ -353,10 +353,20 @@ ifeq ($(ARCH),powerpc) endif ifndef NO_LIBUNWIND + have_libunwind := ifneq ($(feature-libunwind), 1) msg := $(warning No libunwind found. Please install libunwind-dev[el] >= 1.1 and/or set LIBUNWIND_DIR); + NO_LOCAL_LIBUNWIND := 1 + else + have_libunwind := 1 + $(call detected,CONFIG_LOCAL_LIBUNWIND) + endif + + ifneq ($(have_libunwind), 1) NO_LIBUNWIND := 1 endif +else + NO_LOCAL_LIBUNWIND := 1 endif ifndef NO_LIBBPF @@ -394,7 +404,7 @@ else NO_DWARF_UNWIND := 1 endif -ifndef NO_LIBUNWIND +ifndef NO_LOCAL_LIBUNWIND ifeq ($(ARCH),$(filter $(ARCH),arm arm64)) $(call feature_check,libunwind-debug-frame) ifneq ($(feature-libunwind-debug-frame), 1) @@ -405,10 +415,14 @@ ifndef NO_LIBUNWIND # non-ARM has no dwarf_find_debug_frame() function: CFLAGS += -DNO_LIBUNWIND_DEBUG_FRAME endif - CFLAGS += -DHAVE_LIBUNWIND_SUPPORT EXTLIBS += $(LIBUNWIND_LIBS) + LDFLAGS += $(LIBUNWIND_LIBS) +endif + +ifndef NO_LIBUNWIND + CFLAGS += -DHAVE_LIBUNWIND_SUPPORT CFLAGS += $(LIBUNWIND_CFLAGS) - LDFLAGS += $(LIBUNWIND_LDFLAGS) $(LIBUNWIND_LIBS) + LDFLAGS += $(LIBUNWIND_LDFLAGS) endif ifndef NO_LIBAUDIT