OSDN Git Service

samples/bpf: Add makefile.target for separate CC target build
authorIvan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Fri, 11 Oct 2019 00:28:00 +0000 (03:28 +0300)
committerAlexei Starovoitov <ast@kernel.org>
Sat, 12 Oct 2019 23:08:59 +0000 (16:08 -0700)
commit752677e89fca11fd6e239df2fb9877b9e6b83ab2
treef32b58b0b71990477e909f1861de4609227abaab
parent54b7fbd4484bdf8a13045abdf57a66185390f07f
samples/bpf: Add makefile.target for separate CC target build

The Makefile.target is added only and will be used in
sample/bpf/Makefile later in order to switch cross-compiling to CC
from HOSTCC environment.

The HOSTCC is supposed to build binaries and tools running on the host
afterwards, in order to simplify build or so, like "fixdep" or else.
In case of cross compiling "fixdep" is executed on host when the rest
samples should run on target arch. In order to build binaries for
target arch with CC and tools running on host with HOSTCC, lets add
Makefile.target for simplicity, having definition and routines similar
to ones, used in script/Makefile.host. This allows later add
cross-compilation to samples/bpf with minimum changes.

The tprog stands for target programs built with CC.

Makefile.target contains only stuff needed for samples/bpf, potentially
can be reused later and now needed only for unblocking tricky
samples/bpf cross compilation.

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Link: https://lore.kernel.org/bpf/20191011002808.28206-8-ivan.khoronzhuk@linaro.org
samples/bpf/Makefile.target [new file with mode: 0644]