[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEf4BzY+5YQpfJBOVzBfSdZAEcCFjZ9WbeFng8W6tb4M_UwGVQ@mail.gmail.com>
Date: Mon, 16 Sep 2019 13:25:02 -0700
From: Andrii Nakryiko <andrii.nakryiko@...il.com>
To: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
Cc: Alexei Starovoitov <ast@...nel.org>,
Daniel Borkmann <daniel@...earbox.net>,
Yonghong Song <yhs@...com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <jakub.kicinski@...ronome.com>,
Jesper Dangaard Brouer <hawk@...nel.org>,
john fastabend <john.fastabend@...il.com>,
open list <linux-kernel@...r.kernel.org>,
Networking <netdev@...r.kernel.org>, bpf <bpf@...r.kernel.org>,
clang-built-linux@...glegroups.com,
sergei.shtylyov@...entembedded.com
Subject: Re: [PATCH v3 bpf-next 03/14] samples: bpf: makefile: use --target
from cross-compile
On Mon, Sep 16, 2019 at 4:01 AM Ivan Khoronzhuk
<ivan.khoronzhuk@...aro.org> wrote:
>
> For cross compiling the target triple can be inherited from
> cross-compile prefix as it's done in CLANG_FLAGS from kernel makefile.
> So copy-paste this decision from kernel Makefile.
>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@...aro.org>
> ---
Acked-by: Andrii Nakryiko <andriin@...com>
> samples/bpf/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> index 43dee90dffa4..b59e77e2250e 100644
> --- a/samples/bpf/Makefile
> +++ b/samples/bpf/Makefile
> @@ -195,7 +195,7 @@ BTF_PAHOLE ?= pahole
> # Detect that we're cross compiling and use the cross compiler
> ifdef CROSS_COMPILE
> HOSTCC = $(CROSS_COMPILE)gcc
> -CLANG_ARCH_ARGS = -target $(ARCH)
> +CLANG_ARCH_ARGS = --target=$(notdir $(CROSS_COMPILE:%-=%))
> endif
>
> # Don't evaluate probes and warnings if we need to run make recursively
> --
> 2.17.1
>
Powered by blists - more mailing lists