From patchwork Sat Aug 29 04:22:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 52845 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-lb0-f198.google.com (mail-lb0-f198.google.com [209.85.217.198]) by patches.linaro.org (Postfix) with ESMTPS id 2FAD520503 for ; Sat, 29 Aug 2015 04:30:21 +0000 (UTC) Received: by lbck9 with SMTP id k9sf22556986lbc.0 for ; Fri, 28 Aug 2015 21:30:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-type:sender:precedence :list-id:x-original-sender:x-original-authentication-results :mailing-list:list-post:list-help:list-archive:list-unsubscribe; bh=S9M/+nFEjj/l4j1y6ViE59FSnVfG6U9+FOazrdTBSrw=; b=OdXDoHYFq83hwySQGYIP86YMPHIYJMFJe9t12JqjFOJKRyQoj9dORsqrS0FPrB9XKp Dsl6ab4GrWuUH9t2LAErWI57QBSey3E3FdF9a+3YgosZw6KjAbJw6TyjGzRxXS9qLUgp m3gyYpzqdjHl3sdPg7Dc8g+nnqd3lMNaJzsnzX46yH9VtjpOJvvyChfD8f6pz3iJOAmc n+lsyomcJdlrq4qSURZ7c7xmsj6gHTHu3qol1jw0QGQ6O8NdqXNCLOjORNahi3LWj3mR 9Z948dxaQ51Kg+lKtT+mFlklko4HK6trM05FofHPKHHqjM3x1i9ZCc8GqqEcVGHkj95C 46vg== X-Gm-Message-State: ALoCoQlFDQqDgVL2upvgoM/Z12SmeGT0L6FoM6yOfeFU8jHv6jhygtnRoUmPuM+qMiKLTqcp04Ff X-Received: by 10.112.17.106 with SMTP id n10mr3564310lbd.18.1440822619776; Fri, 28 Aug 2015 21:30:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.9.164 with SMTP id a4ls234933lab.105.gmail; Fri, 28 Aug 2015 21:30:19 -0700 (PDT) X-Received: by 10.112.24.163 with SMTP id v3mr6240409lbf.101.1440822619613; Fri, 28 Aug 2015 21:30:19 -0700 (PDT) Received: from mail-la0-f50.google.com (mail-la0-f50.google.com. [209.85.215.50]) by mx.google.com with ESMTPS id z6si7678494lad.39.2015.08.28.21.30.19 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 28 Aug 2015 21:30:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) client-ip=209.85.215.50; Received: by lanb10 with SMTP id b10so8398131lan.2 for ; Fri, 28 Aug 2015 21:30:19 -0700 (PDT) X-Received: by 10.112.67.65 with SMTP id l1mr6296393lbt.86.1440822619488; Fri, 28 Aug 2015 21:30:19 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.151.194 with SMTP id us2csp269369lbb; Fri, 28 Aug 2015 21:30:18 -0700 (PDT) X-Received: by 10.66.235.33 with SMTP id uj1mr27448241pac.10.1440822618369; Fri, 28 Aug 2015 21:30:18 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b6si13341574pbu.118.2015.08.28.21.30.17; Fri, 28 Aug 2015 21:30:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752853AbbH2EaO (ORCPT + 28 others); Sat, 29 Aug 2015 00:30:14 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:3659 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752332AbbH2EXk (ORCPT ); Sat, 29 Aug 2015 00:23:40 -0400 Received: from 172.24.1.50 (EHLO szxeml431-hub.china.huawei.com) ([172.24.1.50]) by szxrg03-dlp.huawei.com (MOS 4.4.3-GA FastPath queued) with ESMTP id BLW04319; Sat, 29 Aug 2015 12:23:32 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml431-hub.china.huawei.com (10.82.67.208) with Microsoft SMTP Server id 14.3.235.1; Sat, 29 Aug 2015 12:23:23 +0800 From: Wang Nan To: , , CC: , , , Wang Nan Subject: [PATCH 30/31] perf tools: Fix cross compiling error Date: Sat, 29 Aug 2015 04:22:04 +0000 Message-ID: <1440822125-52691-31-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 In-Reply-To: <1440822125-52691-1-git-send-email-wangnan0@huawei.com> References: <1440822125-52691-1-git-send-email-wangnan0@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020202.55E133C4.00D5, 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: 148b6253c48e2e4e0c094815f111f45c Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: wangnan0@huawei.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.50 as permitted sender) smtp.mailfrom=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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 Link: http://lkml.kernel.org/n/1440766442-48116-1-git-send-email-wangnan0@huawei.com --- 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