Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1215713

[PATCH 30/31] perf tools: Fix cross compiling error

From Wang Nan <wangnan0@huawei.com>
Newsgroups linux.kernel
Subject [PATCH 30/31] perf tools: Fix cross compiling error
Date 2015-08-29 06:40 +0200
Message-ID <q2G5P-82q-3@gated-at.bofh.it> (permalink)
References <q2FWa-7Rj-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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 <wangnan0@huawei.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
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
-- 
2.1.0

--
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/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[GIT PULL 00/31] perf tools: filtering events using eBPF programs Wang Nan <wangnan0@huawei.com> - 2015-08-29 06:30 +0200
  [PATCH 18/31] perf test: Add 'perf test BPF' Wang Nan <wangnan0@huawei.com> - 2015-08-29 06:30 +0200
    Re: [PATCH 18/31] perf test: Add 'perf test BPF' Namhyung Kim <namhyung@kernel.org> - 2015-09-02 14:50 +0200
      Re: [PATCH 18/31] perf test: Add 'perf test BPF' Wang Nan <pi3orama@163.com> - 2015-09-05 14:30 +0200
  [PATCH 12/31] perf tools: Allow filter option to be applied to bof object Wang Nan <wangnan0@huawei.com> - 2015-08-29 06:40 +0200
  [PATCH 30/31] perf tools: Fix cross compiling error Wang Nan <wangnan0@huawei.com> - 2015-08-29 06:40 +0200
  [PATCH 05/31] perf ebpf: Add the libbpf glue Wang Nan <wangnan0@huawei.com> - 2015-08-29 06:40 +0200
  [PATCH 13/31] perf tools: Attach eBPF program to perf event Wang Nan <wangnan0@huawei.com> - 2015-08-29 06:50 +0200

csiph-web