Skip to content

Commit 8bf2ac2

Browse files
Joel Fernandesdavem330
authored andcommitted
samples/bpf: Add documentation on cross compilation
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>
1 parent b655fc1 commit 8bf2ac2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

samples/bpf/README.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,13 @@ It is also possible to point make to the newly compiled 'llc' or
6464
'clang' command via redefining LLC or CLANG on the make command line::
6565

6666
make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang
67+
68+
Cross compiling samples
69+
-----------------------
70+
In order to cross-compile, say for arm64 targets, export CROSS_COMPILE and ARCH
71+
environment variables before calling make. This will direct make to build
72+
samples for the cross target.
73+
74+
export ARCH=arm64
75+
export CROSS_COMPILE="aarch64-linux-gnu-"
76+
make samples/bpf/ LLC=~/git/llvm/build/bin/llc CLANG=~/git/llvm/build/bin/clang

0 commit comments

Comments
 (0)