From patchwork Mon Aug 31 14:09:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wang Nan X-Patchwork-Id: 52894 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f72.google.com (mail-la0-f72.google.com [209.85.215.72]) by patches.linaro.org (Postfix) with ESMTPS id 1518C22EB3 for ; Mon, 31 Aug 2015 14:10:26 +0000 (UTC) Received: by labip2 with SMTP id ip2sf40764684lab.1 for ; Mon, 31 Aug 2015 07:10:25 -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 :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=oicFEMR68c9/6GpoP1Mal//MYj5RU53gcmZFpQisBSw=; b=KMTo8iJnvidwBVtPrzxZu7ZUfrIp0oxWtBy5YVBfhl4IQW+MS2951tVWRmqE9ETj2u M46gvf9ac6PlLdBpo3RUkXnJykzx3QgNYTPrqhf7UhVmmrySMe2aFCf7orka168OWM0T F12Sko5dsKnau2kiJCVaK64deIINgu9UnjRlCPBuM4QWBAhVjuZtL2/nenofaQsIY9Up MsDqsGYuTwP+78JK3cjLJnG94TIjpWeQM87a6GBBUNyeIEgAV/bWpyRbw13O082yuLKY fe5CcQevTbsLJeYB0sRSA1oySkuWOvv1WHnAIAY8bL7ws+mkgMzjoRNcpHTqIW0wqP+S 8CVw== X-Gm-Message-State: ALoCoQmSPrxoRg4muRJFxVIqzXmYwVIpzTNH62Oao2rvSrjMWJuTjlr2uVR96ri37Be0qLVrZagG X-Received: by 10.152.4.69 with SMTP id i5mr6242186lai.10.1441030225088; Mon, 31 Aug 2015 07:10:25 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.1.199 with SMTP id 7ls446086lao.67.gmail; Mon, 31 Aug 2015 07:10:24 -0700 (PDT) X-Received: by 10.152.203.134 with SMTP id kq6mr10632696lac.106.1441030224920; Mon, 31 Aug 2015 07:10:24 -0700 (PDT) Received: from mail-lb0-f181.google.com (mail-lb0-f181.google.com. [209.85.217.181]) by mx.google.com with ESMTPS id ld1si13250398lab.51.2015.08.31.07.10.24 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 31 Aug 2015 07:10:24 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.217.181 as permitted sender) client-ip=209.85.217.181; Received: by lbvd4 with SMTP id d4so24951653lbv.3 for ; Mon, 31 Aug 2015 07:10:24 -0700 (PDT) X-Received: by 10.152.178.165 with SMTP id cz5mr4135705lac.29.1441030224809; Mon, 31 Aug 2015 07:10:24 -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 us2csp1662070lbb; Mon, 31 Aug 2015 07:10:21 -0700 (PDT) X-Received: by 10.66.62.163 with SMTP id z3mr38090309par.12.1441030221096; Mon, 31 Aug 2015 07:10:21 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id di2si23959580pbd.158.2015.08.31.07.10.20; Mon, 31 Aug 2015 07:10:21 -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 S1753170AbbHaOKP (ORCPT + 28 others); Mon, 31 Aug 2015 10:10:15 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:5412 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752792AbbHaOKM (ORCPT ); Mon, 31 Aug 2015 10:10:12 -0400 Received: from 172.24.1.48 (EHLO szxeml433-hub.china.huawei.com) ([172.24.1.48]) by szxrg02-dlp.huawei.com (MOS 4.3.7-GA FastPath queued) with ESMTP id CRN53868; Mon, 31 Aug 2015 22:09:55 +0800 (CST) Received: from linux-4hy3.site (10.107.193.248) by szxeml433-hub.china.huawei.com (10.82.67.210) with Microsoft SMTP Server id 14.3.235.1; Mon, 31 Aug 2015 22:09:46 +0800 From: Wang Nan To: , , CC: , , , Wang Nan , Arnaldo Carvalho de Melo Subject: [PATCH v2] perf tools: Fix cross compiling error Date: Mon, 31 Aug 2015 14:09:41 +0000 Message-ID: <1441030181-102193-1-git-send-email-wangnan0@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 X-Originating-IP: [10.107.193.248] X-CFilter-Loop: Reflected 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.217.181 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. 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