Skip to content

samples/bpf: Allow building as PIE

Viktor Malik bpf 1 version Applied

Status from this message: This series was applied to bpf/bpf-next.git (master)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest3 patches 0 repliesApplied 3/3

Patches in v1 All 3 applied

#Subject and filesSizeRepliesApplied
1/3samples/bpf: Allow building with custom CFLAGS/LDFLAGSsamples/bpf/Makefile+4 -10 repliesApplied
2/3samples/bpf: Fix passing LDFLAGS to libbpfsamples/bpf/Makefile+1 -10 repliesApplied
3/3samples/bpf: Allow building with custom bpftoolsamples/bpf/Makefile+3 -20 repliesApplied

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH bpf-next 0/3] samples/bpf: Allow building as PIE

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(-)
Signature · 1 line
2.41.0