Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753185AbbHaOUh (ORCPT ); Mon, 31 Aug 2015 10:20:37 -0400 Received: from mail.kernel.org ([198.145.29.136]:57875 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753111AbbHaOUf (ORCPT ); Mon, 31 Aug 2015 10:20:35 -0400 Date: Mon, 31 Aug 2015 11:20:31 -0300 From: Arnaldo Carvalho de Melo To: Wang Nan Cc: jolsa@kernel.org, adrian.hunter@intel.com, linux-kernel@vger.kernel.org, lizefan@huawei.com, pi3orama@163.com Subject: Re: [PATCH v2] perf tools: Fix cross compiling error Message-ID: <20150831142031.GA663@kernel.org> References: <1441030181-102193-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1441030181-102193-1-git-send-email-wangnan0@huawei.com> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2375 Lines: 63 Em Mon, Aug 31, 2015 at 02:09:41PM +0000, Wang Nan escreveu: > Cross compiling perf to other platform failed due to missing symbol: Adrian, I think this one covers what you would resend, no? If it does, can I have your Acked-by? - Arnaldo > ... > AR /pathofperf/libperf.a > LD /pathofperf/tests/perf-in.o > LD /pathofperf/perf-in.o > LINK /pathofperf/perf > /pathofperf/libperf.a(libperf-in.o): In function `intel_pt_synth_branch_sample': > /usr/src/kernel/tools/perf/util/intel-pt.c:899: undefined reference to `tsc_to_perf_time' > /pathofperf/libperf.a(libperf-in.o): In function `intel_pt_synth_transaction_sample': > /usr/src/kernel/tools/perf/util/intel-pt.c:992: undefined reference to `tsc_to_perf_time' > /pathofperf/libperf.a(libperf-in.o): In function `intel_pt_synth_instruction_sample': > /usr/src/kernel/tools/perf/util/intel-pt.c:943: undefined reference to `tsc_to_perf_time' > ... > > This is because we allow newly introduced intel-pt-decoder to be > compiled to not only X86, but tsc.c which required by it is compiled > for x86 only. > > This patch fix the compiling error by allow tsc.c to be compiled if > CONFIG_AUXTRACE is set, no matter the target platform. > > Comment from Arnaldo: > > There were some changes in this area, i.e. x86 needs tsc, and auxtrace > as well, so both should express that via: > > libperf-$(CONFIG_X86) += tsc.o > libperf-$(CONFIG_AUXTRACE) += tsc.o > > Because on !x86 we want to process perf.data files containing Intel PT. > > Signed-off-by: Wang Nan > Cc: Arnaldo Carvalho de Melo > --- > tools/perf/util/Build | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/tools/perf/util/Build b/tools/perf/util/Build > index fd2f084..e712311 100644 > --- a/tools/perf/util/Build > +++ b/tools/perf/util/Build > @@ -75,6 +75,7 @@ libperf-y += record.o > libperf-y += srcline.o > libperf-y += data.o > libperf-$(CONFIG_X86) += tsc.o > +libperf-$(CONFIG_AUXTRACE) += tsc.o > libperf-y += cloexec.o > libperf-y += thread-stack.o > libperf-$(CONFIG_AUXTRACE) += auxtrace.o > -- > 1.8.3.4 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/