Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751506AbdITQu1 (ORCPT ); Wed, 20 Sep 2017 12:50:27 -0400 Received: from bombadil.infradead.org ([65.50.211.133]:35114 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750973AbdITQu0 (ORCPT ); Wed, 20 Sep 2017 12:50:26 -0400 Subject: Re: [PATCH v4 4/4] samples/bpf: Add documentation on cross compilation To: Joel Fernandes , linux-kernel@vger.kernel.org Cc: netdev@vger.kernel.org, alison@she-devel.com, juri.lelli@arm.com, fengc@google.com, daniel@iogearbox.net, davem@davemloft.net, ast@kernel.org, kernel-team@android.com References: <20170920161159.25747-1-joelaf@google.com> <20170920161159.25747-4-joelaf@google.com> From: Randy Dunlap Message-ID: Date: Wed, 20 Sep 2017 09:50:07 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <20170920161159.25747-4-joelaf@google.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1079 Lines: 33 On 09/20/17 09:11, Joel Fernandes wrote: > Acked-by: Alexei Starovoitov > Signed-off-by: Joel Fernandes > --- > samples/bpf/README.rst | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst > index 79f9a58f1872..2b906127ef54 100644 > --- a/samples/bpf/README.rst > +++ b/samples/bpf/README.rst > @@ -64,3 +64,13 @@ It is also possible to point make to the newly compiled 'llc' or > 'clang' command via redefining LLC or CLANG on the make command line:: > > make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang > + > +Cross compiling samples > +----------------------- > +Inorder to cross-compile, say for arm64 targets, export CROSS_COMPILE and ARCH In order to > +environment variables before calling make. This will direct make to build > +samples for the cross target. > + > +export ARCH=arm64 > +export CROSS_COMPILE="aarch64-linux-gnu-" > +make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang > -- ~Randy