Hi, when trying to build samples/bpf as PIE in Fedora, we came across several issues, mainly related to the way compiler/linker flags are handled in samples/bpf/Makefile. The first 2 commits in this patchset address these issues (see commit messages for details). At the same time, this proposes to allow passing an already built bpftool to samples/bpf/Makefile. The reason is to remove a redundant build step but also because I was not able to find a correct combination of build flags to build libbpf.a for samples/bpf/bpftool/ with -fPIE. Viktor Malik (3): samples/bpf: Allow building with custom CFLAGS/LDFLAGS samples/bpf: Fix passing LDFLAGS to libbpf samples/bpf: Allow building with custom bpftool samples/bpf/Makefile | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) -- 2.41.0