From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754817AbcETDBL (ORCPT ); Thu, 19 May 2016 23:01:11 -0400 Received: from szxga02-in.huawei.com ([119.145.14.65]:57467 "EHLO szxga02-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751461AbcETDBJ (ORCPT ); Thu, 19 May 2016 23:01:09 -0400 Subject: Re: [PATCH v4 2/6] perf tools: Promote proper messages for cross-platform unwind To: Jiri Olsa References: <1463658462-85131-1-git-send-email-hekuang@huawei.com> <1463658462-85131-3-git-send-email-hekuang@huawei.com> <20160519164609.GC18909@krava> CC: , , , , , , , , , , , , , , , , From: Hekuang Message-ID: <573E7D79.8080804@huawei.com> Date: Fri, 20 May 2016 10:59:05 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160519164609.GC18909@krava> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Originating-IP: [10.110.55.166] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A020201.573E7D86.00D0,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2013-06-18 04:22:30, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 015f86362dc30c3c93746105a9d2454e Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi 在 2016/5/20 0:46, Jiri Olsa 写道: > On Thu, May 19, 2016 at 11:47:38AM +0000, He Kuang wrote: > > SNIP > >> #endif /* ARCH_PERF_COMMON_H */ >> diff --git a/tools/perf/config/Makefile b/tools/perf/config/Makefile >> index 1e46277..a86b864 100644 >> --- a/tools/perf/config/Makefile >> +++ b/tools/perf/config/Makefile >> @@ -345,6 +345,12 @@ ifeq ($(ARCH),powerpc) >> endif >> >> ifndef NO_LIBUNWIND >> + ifeq ($(feature-libunwind-x86), 1) >> + LIBUNWIND_LIBS += -lunwind-x86 >> + $(call detected,CONFIG_LIBUNWIND_X86) >> + CFLAGS += -DHAVE_LIBUNWIND_X86_SUPPORT >> + endif >> + > how does one install that lirary? > > thanks, > jirka My work environment is on an old suse distribution, so it's difficult to find libunwind-$arch rpm packages, so I build them from source. The git repository url is here: http://git.savannah.gnu.org/r/libunwind.git(master) Then flow the build step in README, first for i686: $ ./autogen.sh $ ./configure prefix=/xx/dst_i686 --target=i686-oe-linux CC=x86_64-oe-linux-gcc $ make && make install Similar for aarch64: $ make clean $ ./configure prefix=/xx/dst_aarch64 --target=i686-oe-linux CC=x86_64-oe-linux-gcc $ make && make install NOTICE: the contents in '--target' should be like 'i686-oe-linux', only give 'i686' cause strange build errors. It looks like that libunwind don't support building for multiple platforms at the same time, so I build them separately into different directories. Finally, copy the outputs into /usr/include and /usr/lib64, now perf can detect them: $ make VF=1 ARCH=x86_64 CROSS_COMPILE=x86_64-oe-linux- EXTRA_CFLAGS="-m64" ... ... libunwind-x86: [ on ] ... libunwind-x86_64: [ OFF ] ... libunwind-arm: [ OFF ] ... libunwind-aarch64: [ on ] Thanks.