lkml.org 
[lkml]   [2018]   [Apr]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH AUTOSEL for 4.14 084/161] samples/bpf: Partially fixes the bpf.o build
    Date
    From: Mickaël Salaün <mic@digikod.net>

    [ Upstream commit c25ef6a5e62fa212d298ce24995ce239f29b5f96 ]

    Do not build lib/bpf/bpf.o with this Makefile but use the one from the
    library directory. This avoid making a buggy bpf.o file (e.g. missing
    symbols).

    This patch is useful if some code (e.g. Landlock tests) needs both the
    bpf.o (from tools/lib/bpf) and the bpf_load.o (from samples/bpf).

    Signed-off-by: Mickaël Salaün <mic@digikod.net>
    Cc: Alexei Starovoitov <ast@kernel.org>
    Cc: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
    Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
    ---
    samples/bpf/Makefile | 5 ++++-
    1 file changed, 4 insertions(+), 1 deletion(-)

    diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
    index 9b4a66e3363e..c1dc632d4ea4 100644
    --- a/samples/bpf/Makefile
    +++ b/samples/bpf/Makefile
    @@ -179,13 +179,16 @@ LLC ?= llc
    CLANG ?= clang

    # Trick to allow make to be run from this directory
    -all:
    +all: $(LIBBPF)
    $(MAKE) -C ../../ $(CURDIR)/

    clean:
    $(MAKE) -C ../../ M=$(CURDIR) clean
    @rm -f *~

    +$(LIBBPF): FORCE
    + $(MAKE) -C $(dir $@) $(notdir $@)
    +
    $(obj)/syscall_nrs.s: $(src)/syscall_nrs.c
    $(call if_changed_dep,cc_s_c)

    --
    2.15.1
    \
     
     \ /
      Last update: 2018-04-09 02:24    [W:4.217 / U:0.376 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site