mbox series

[bpf-next,0/6] tools/bpftool: Fix cross and out-of-tree builds

Message ID 20200827153629.3820891-1-jean-philippe@linaro.org
Headers show
Series tools/bpftool: Fix cross and out-of-tree builds | expand

Message

Jean-Philippe Brucker Aug. 27, 2020, 3:36 p.m. UTC
A few fixes for cross-building bpftool and runqslower, to build for
example an arm64 bpftool on a x86 host machine and run it on an embedded
platform. Also fix out-of-tree build, allowing for example to use the
same source tree for different target architectures.

Patch 1 factors the HOST variables definitions. Patches 2 and 3 fix the
bpftool build and patches 4-6 fix the runqslower build. I also have some
fixes for the BPF selftests build which I'll send later.

Jean-Philippe Brucker (6):
  tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
  tools/bpftool: Force clean of out-of-tree build
  tools/bpftool: Fix cross-build
  tools/runqslower: Use Makefile.include
  tools/runqslower: Enable out-of-tree build
  tools/runqslower: Build bpftool using HOSTCC

 tools/bpf/bpftool/Makefile        | 38 +++++++++++++----
 tools/bpf/resolve_btfids/Makefile |  9 ----
 tools/bpf/runqslower/Makefile     | 68 ++++++++++++++++++-------------
 tools/build/Makefile              |  4 --
 tools/objtool/Makefile            |  9 ----
 tools/perf/Makefile.perf          |  4 --
 tools/power/acpi/Makefile.config  |  1 -
 tools/scripts/Makefile.include    | 10 +++++
 8 files changed, 78 insertions(+), 65 deletions(-)

Comments

Daniel Borkmann Aug. 31, 2020, 8:23 p.m. UTC | #1
On 8/27/20 5:36 PM, Jean-Philippe Brucker wrote:
> A few fixes for cross-building bpftool and runqslower, to build for
> example an arm64 bpftool on a x86 host machine and run it on an embedded
> platform. Also fix out-of-tree build, allowing for example to use the
> same source tree for different target architectures.
> 
> Patch 1 factors the HOST variables definitions. Patches 2 and 3 fix the
> bpftool build and patches 4-6 fix the runqslower build. I also have some
> fixes for the BPF selftests build which I'll send later.
> 
> Jean-Philippe Brucker (6):
>    tools: Factor HOSTCC, HOSTLD, HOSTAR definitions
>    tools/bpftool: Force clean of out-of-tree build
>    tools/bpftool: Fix cross-build
>    tools/runqslower: Use Makefile.include
>    tools/runqslower: Enable out-of-tree build
>    tools/runqslower: Build bpftool using HOSTCC
> 
>   tools/bpf/bpftool/Makefile        | 38 +++++++++++++----
>   tools/bpf/resolve_btfids/Makefile |  9 ----
>   tools/bpf/runqslower/Makefile     | 68 ++++++++++++++++++-------------
>   tools/build/Makefile              |  4 --
>   tools/objtool/Makefile            |  9 ----
>   tools/perf/Makefile.perf          |  4 --
>   tools/power/acpi/Makefile.config  |  1 -
>   tools/scripts/Makefile.include    | 10 +++++
>   8 files changed, 78 insertions(+), 65 deletions(-)

Looks like this doesn't apply cleanly and thus needs a rebase. Pls submit a
v2, thanks!