diff options
author | Joel Fernandes <joelaf@google.com> | 2017-09-20 18:11:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-21 20:59:16 +0200 |
commit | 8bf2ac25a96c69985a1a9fbbad7da22ae4343a38 (patch) | |
tree | 3a99f3b18a470af3cc600720f021bc6f20444b16 /samples/bpf | |
parent | samples/bpf: Fix pt_regs issues when cross-compiling (diff) | |
download | linux-8bf2ac25a96c69985a1a9fbbad7da22ae4343a38.tar.xz linux-8bf2ac25a96c69985a1a9fbbad7da22ae4343a38.zip |
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>
Diffstat (limited to 'samples/bpf')
-rw-r--r-- | samples/bpf/README.rst | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/samples/bpf/README.rst b/samples/bpf/README.rst index 79f9a58f1872..5f27e4faca50 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 +----------------------- +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 |