Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752478AbbH1MyX (ORCPT ); Fri, 28 Aug 2015 08:54:23 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:44015 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752401AbbH1MyU (ORCPT ); Fri, 28 Aug 2015 08:54:20 -0400 From: Wang Nan To: CC: , , , Wang Nan Subject: [PATCH] perf tools: Fix cross compiling error Date: Fri, 28 Aug 2015 12:54:02 +0000 Message-ID: <1440766442-48116-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020204.55E059F6.0259,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-05-26 15:14:31, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 52a1d4fd6faef470f1e63ff2b0c62fcc Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1867 Lines: 49 Cross compiling perf to other platform failed due to missing symbol: ... 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. Signed-off-by: Wang Nan Cc: Arnaldo Carvalho de Melo --- tools/perf/util/Build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/Build b/tools/perf/util/Build index fd2f084..c8d9c7e 100644 --- a/tools/perf/util/Build +++ b/tools/perf/util/Build @@ -74,7 +74,7 @@ libperf-y += stat-shadow.o 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/