[Buildroot] [PATCH 1/4] package/libbpf: fix cross compilation for 32-bit targets

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Oct 27 06:46:19 UTC 2022


On Thu, 20 Oct 2022 16:14:09 +0200
Tobias Waldekranz <tobias at waldekranz.com> wrote:

> Add upstream patch that sources the library path (lib vs. lib64) from
> the compiler rather than from uname(1).
> 
> Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
> ---
>  ...cross-compilation-for-32-bit-targets.patch | 37 +++++++++++++++++++
>  1 file changed, 37 insertions(+)
>  create mode 100644 package/libbpf/1.0.1/0001-Makefile-Fix-cross-compilation-for-32-bit-targets.patch

Thanks, applied with a rework commit log:

    package/libbpf: install in the correct lib directory
    
    The libbpf build system currently uses the output of "uname -m" to
    determine if the library should be installed in "lib" or
    "lib64". However, uname -m returns the architecture of the build
    machine, which often has nothing to do with the target CPU
    architecture.
    
    A patch has been submitted and accepted upstream to address this
    issue, by using the $(CC) -dumpmachine output instead. This ensures
    libbpf is installed in either "lib" or "lib64" depending on the
    bitness of the target CPU architecture.
    
    Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
    Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>

The patch was also moved away from the version-specific directory, and
the upstream status of the patch was added in the patch itself.

Thanks!

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list