From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753670AbbJHISY (ORCPT ); Thu, 8 Oct 2015 04:18:24 -0400 Received: from szxga03-in.huawei.com ([119.145.14.66]:33636 "EHLO szxga03-in.huawei.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751938AbbJHISV (ORCPT ); Thu, 8 Oct 2015 04:18:21 -0400 Subject: Re: [BUG] perf cross-compile error dual to fixdep not host-exe To: Jiri Olsa References: <560B547C.6080205@huawei.com> <20150930061310.GB26628@krava.redhat.com> CC: , David Ahern , Namhyung Kim , Peter Zijlstra , "Arnaldo Carvalho de Melo" , , Wang Nan From: He Kuang Message-ID: <56162328.1030502@huawei.com> Date: Thu, 8 Oct 2015 16:02:48 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.0 MIME-Version: 1.0 In-Reply-To: <20150930061310.GB26628@krava.redhat.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.110.54.65] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090203.561626BC.0006,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: 43559dd0d7b609c8a59637e3d69b4e88 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org hi, Jirka On 2015/9/30 14:13, Jiri Olsa wrote: > On Wed, Sep 30, 2015 at 11:18:20AM +0800, He Kuang wrote: >> Hi, >> >> perf cross-compile error dual to fixdep is not a host executable, first bad commit >> is 7c422f557266("tools build: Build fixdep helper from perf and basic libs") >> >> Cross-compiling an aarch64 target on x86_64 host, error like this: >> >> $ make ARCH=aarch64 O=xx/aarch64 CROSS_COMPILE=aarch64-linux-gnu >> ... >> make[3]: *** [xx/aarch64/parse-utils.o] Error 126 >> make[3]: *** Waiting for unfinished jobs.... >> /bin/sh: xx/aarch64//fixdep: cannot execute binary file >> >> $ uname -a >> x86_64 x86_64 x86_64 GNU/Linux >> >> $ file xx/aarch64//fixdep >> xx/aarch64//fixdep : ELF 64-bit LSB executable, ARM aarch64, version 1 >> (SYSV), dynamically linked, interpreter /lib/ld-linux-aarch64.so.1, for >> GNU/Linux 3.7.0, not stripped > > hum, we need fixdep to stay the host arch.. I should have seen it :-\ > could you please check attached patch? > > thanks, > jirka > It does not work, 'fixdep' still be compiled as target executable. Thank you. > > --- > diff --git a/tools/build/Makefile b/tools/build/Makefile > index a93036272d43..648897694992 100644 > --- a/tools/build/Makefile > +++ b/tools/build/Makefile > @@ -5,15 +5,6 @@ endif > > include $(srctree)/tools//scripts/Makefile.include > > -define allow-override > - $(if $(or $(findstring environment,$(origin $(1))),\ > - $(findstring command line,$(origin $(1)))),,\ > - $(eval $(1) = $(2))) > -endef > - > -$(call allow-override,CC,$(CROSS_COMPILE)gcc) > -$(call allow-override,LD,$(CROSS_COMPILE)ld) > - > ifeq ($(V),1) > Q = > else >