Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools/bpftool: Some build fixes #323

Closed
wants to merge 8 commits into from

Commits on Nov 11, 2020

  1. adding ci files

    kernel-patches-bot committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    49eb2a5 View commit details
    Browse the repository at this point in the history
  2. tools: Factor HOSTCC, HOSTLD, HOSTAR definitions

    Several Makefiles in tools/ need to define the host toolchain variables.
    Move their definition to tools/scripts/Makefile.include
    
    Acked-by: Jiri Olsa <jolsa@redhat.com>
    Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
    Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
    jpbrucker authored and kernel-patches-bot committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    6e9c6b3 View commit details
    Browse the repository at this point in the history
  3. tools/bpftool: Force clean of out-of-tree build

    Cleaning a partial build can fail if the output directory for libbpf
    wasn't created:
    
    $ make -C tools/bpf/bpftool O=/tmp/bpf clean
    /bin/sh: line 0: cd: /tmp/bpf/libbpf/: No such file or directory
    tools/scripts/Makefile.include:17: *** output directory "/tmp/bpf/libbpf/" does not exist.  Stop.
    make: *** [Makefile:36: /tmp/bpf/libbpf/libbpf.a-clean] Error 2
    
    As a result make never gets around to clearing the leftover objects. Add
    the libbpf output directory as clean dependency to ensure clean always
    succeeds (similarly to the "descend" macro). The directory is later
    removed by the clean recipe.
    
    Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
    jpbrucker authored and kernel-patches-bot committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    7ef9fb9 View commit details
    Browse the repository at this point in the history
  4. tools/bpftool: Fix cross-build

    The bpftool build first creates an intermediate binary, executed on the
    host, to generate skeletons required by the final build. When
    cross-building bpftool for an architecture different from the host, the
    intermediate binary should be built using the host compiler (gcc) and
    the final bpftool using the cross compiler (e.g. aarch64-linux-gnu-gcc).
    
    Generate the intermediate objects into the bootstrap/ directory using
    the host toolchain.
    
    Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
    jpbrucker authored and kernel-patches-bot committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    6d4f95a View commit details
    Browse the repository at this point in the history
  5. tools/runqslower: Use Makefile.include

    Makefile.include defines variables such as OUTPUT and CC for out-of-tree
    build and cross-build. Include it into the runqslower Makefile and use
    its $(QUIET*) helpers.
    
    Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
    jpbrucker authored and kernel-patches-bot committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    07a5a22 View commit details
    Browse the repository at this point in the history
  6. tools/runqslower: Enable out-of-tree build

    Enable out-of-tree build for runqslower. Only set OUTPUT=.output if it
    wasn't already set by the user.
    
    Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
    jpbrucker authored and kernel-patches-bot committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    7a01f69 View commit details
    Browse the repository at this point in the history
  7. tools/runqslower: Build bpftool using HOSTCC

    When cross building runqslower for an other architecture, the
    intermediate bpftool used to generate a skeleton must be built using the
    host toolchain. Pass HOSTCC and HOSTLD, defined in Makefile.include, to
    the bpftool Makefile.
    
    Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
    jpbrucker authored and kernel-patches-bot committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    e5b62c0 View commit details
    Browse the repository at this point in the history
  8. tools/bpftool: Fix build slowdown

    Commit ba2fd56 ("tools/bpftool: Support passing BPFTOOL_VERSION to
    make") changed BPFTOOL_VERSION to a recursively expanded variable,
    forcing it to be recomputed on every expansion of CFLAGS and
    dramatically slowing down the bpftool build. Restore BPFTOOL_VERSION as
    a simply expanded variable, guarded by an ifeq().
    
    Fixes: ba2fd56 ("tools/bpftool: Support passing BPFTOOL_VERSION to make")
    Signed-off-by: Jean-Philippe Brucker <jean-philippe@linaro.org>
    jpbrucker authored and kernel-patches-bot committed Nov 11, 2020
    Configuration menu
    Copy the full SHA
    a0c443d View commit details
    Browse the repository at this point in the history