Skip to content

Commit

Permalink
samples/bpf: Add documentation on cross compilation
Browse files Browse the repository at this point in the history
Acked-by: Alexei Starovoitov <ast@kernel.org>
Signed-off-by: Joel Fernandes <joelaf@google.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Joel Fernandes authored and David S. Miller committed Sep 21, 2017
1 parent b655fc1 commit 8bf2ac2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions samples/bpf/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
-----------------------
In order 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

0 comments on commit 8bf2ac2

Please sign in to comment.