All of lore.kernel.org
 help / color / mirror / Atom feed
From: He Kuang <hekuang@huawei.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: <jolsa@kernel.org>, David Ahern <dsahern@gmail.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>,
	"Arnaldo Carvalho de Melo" <acme@redhat.com>,
	<linux-kernel@vger.kernel.org>, Wang Nan <wangnan0@huawei.com>
Subject: Re: [BUG] perf cross-compile error dual to fixdep not host-exe
Date: Thu, 8 Oct 2015 16:02:48 +0800	[thread overview]
Message-ID: <56162328.1030502@huawei.com> (raw)
In-Reply-To: <20150930061310.GB26628@krava.redhat.com>

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
>


  reply	other threads:[~2015-10-08  8:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-30  3:18 [BUG] perf cross-compile error dual to fixdep not host-exe He Kuang
2015-09-30  6:13 ` Jiri Olsa
2015-10-08  8:02   ` He Kuang [this message]
2015-10-08  8:30     ` Jiri Olsa
2015-10-13 12:43       ` build: Fix cross compile build Jiri Olsa
2015-10-14 13:15         ` [tip:perf/core] tools " tip-bot for Jiri Olsa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56162328.1030502@huawei.com \
    --to=hekuang@huawei.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=namhyung@kernel.org \
    --cc=wangnan0@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.