Centos-kernel-stream-9/tools/bpf/resolve_btfids
Jerome Marchand e20ac5daf8 tools/resolve_btfids: Build with host flags
Bugzilla: https://bugzilla.redhat.com/2120966

commit 0e3a1c902ffb56e9fe4416f0cd382c97b09ecbf6
Author: Connor O'Brien <connoro@google.com>
Date:   Wed Jan 12 00:25:03 2022 +0000

    tools/resolve_btfids: Build with host flags

    resolve_btfids is built using $(HOSTCC) and $(HOSTLD) but does not
    pick up the corresponding flags. As a result, host-specific settings
    (such as a sysroot specified via HOSTCFLAGS=--sysroot=..., or a linker
    specified via HOSTLDFLAGS=-fuse-ld=...) will not be respected.

    Fix this by setting CFLAGS to KBUILD_HOSTCFLAGS and LDFLAGS to
    KBUILD_HOSTLDFLAGS.

    Also pass the cflags through to libbpf via EXTRA_CFLAGS to ensure that
    the host libbpf is built with flags consistent with resolve_btfids.

    Signed-off-by: Connor O'Brien <connoro@google.com>
    Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
    Acked-by: Song Liu <songliubraving@fb.com>
    Link: https://lore.kernel.org/bpf/20220112002503.115968-1-connoro@google.com

Signed-off-by: Jerome Marchand <jmarchan@redhat.com>
2022-10-25 14:57:39 +02:00
..
.gitignore tools/resolve_btfids: Add /libbpf to .gitignore 2021-02-12 13:08:26 -08:00
Build
Makefile tools/resolve_btfids: Build with host flags 2022-10-25 14:57:39 +02:00
main.c tools/resolve_btf_ids: Close ELF file on error 2022-08-24 12:53:40 +02:00