Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1735876 > unrolled thread

[PATCH v4 4/4] samples/bpf: Add documentation on cross compilation

Started byJoel Fernandes <joelaf@google.com>
First post2017-09-20 18:20 +0200
Last post2017-09-20 23:30 +0200
Articles 3 — 3 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v4 4/4] samples/bpf: Add documentation on cross compilation Joel Fernandes <joelaf@google.com> - 2017-09-20 18:20 +0200
    Re: [PATCH v4 4/4] samples/bpf: Add documentation on cross  compilation Randy Dunlap <rdunlap@infradead.org> - 2017-09-20 19:00 +0200
    Re: [PATCH v4 4/4] samples/bpf: Add documentation on cross compilation Daniel Borkmann <daniel@iogearbox.net> - 2017-09-20 23:30 +0200

#1735876 — [PATCH v4 4/4] samples/bpf: Add documentation on cross compilation

FromJoel Fernandes <joelaf@google.com>
Date2017-09-20 18:20 +0200
Subject[PATCH v4 4/4] samples/bpf: Add documentation on cross compilation
Message-ID<urPTb-5ov-1@gated-at.bofh.it>
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Joel Fernandes <joelaf@google.com>
---
 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
+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
-- 
2.14.1.821.g8fa685d3b7-goog

[toc] | [next] | [standalone]


#1735912 — Re: [PATCH v4 4/4] samples/bpf: Add documentation on cross compilation

FromRandy Dunlap <rdunlap@infradead.org>
Date2017-09-20 19:00 +0200
SubjectRe: [PATCH v4 4/4] samples/bpf: Add documentation on cross compilation
Message-ID<urQvT-5Dp-9@gated-at.bofh.it>
In reply to#1735876
On 09/20/17 09:11, Joel Fernandes wrote:
> Acked-by: Alexei Starovoitov <ast@kernel.org>
> Signed-off-by: Joel Fernandes <joelaf@google.com>
> ---
>  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

[toc] | [prev] | [next] | [standalone]


#1736173

FromDaniel Borkmann <daniel@iogearbox.net>
Date2017-09-20 23:30 +0200
Message-ID<urUJd-8w7-41@gated-at.bofh.it>
In reply to#1735876
On 09/20/2017 06:11 PM, Joel Fernandes wrote:
> Acked-by: Alexei Starovoitov <ast@kernel.org>
> Signed-off-by: Joel Fernandes <joelaf@google.com>

(Minor typo pointed out by Randy, but rest looks fine.)

Acked-by: Daniel Borkmann <daniel@iogearbox.net>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web