public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf-next 0/3] samples/bpf: Allow building as PIE
@ 2023-10-25  6:19 Viktor Malik
  2023-10-25  6:19 ` [PATCH bpf-next 1/3] samples/bpf: Allow building with custom CFLAGS/LDFLAGS Viktor Malik
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Viktor Malik @ 2023-10-25  6:19 UTC (permalink / raw)
  To: bpf
  Cc: Alexei Starovoitov, Daniel Borkmann, Andrii Nakryiko,
	Martin KaFai Lau, Song Liu, Yonghong Song, John Fastabend,
	KP Singh, Stanislav Fomichev, Hao Luo, Jiri Olsa, Donald Zickus,
	Viktor Malik

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-10-26 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-25  6:19 [PATCH bpf-next 0/3] samples/bpf: Allow building as PIE Viktor Malik
2023-10-25  6:19 ` [PATCH bpf-next 1/3] samples/bpf: Allow building with custom CFLAGS/LDFLAGS Viktor Malik
2023-10-25  6:19 ` [PATCH bpf-next 2/3] samples/bpf: Fix passing LDFLAGS to libbpf Viktor Malik
2023-10-25  6:19 ` [PATCH bpf-next 3/3] samples/bpf: Allow building with custom bpftool Viktor Malik
2023-10-26 13:40 ` [PATCH bpf-next 0/3] samples/bpf: Allow building as PIE patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox