[v3,bpf-next,06/14] samples: bpf: makefile: drop unnecessarily inclusion for bpf_load
diff mbox series

Message ID 20190916105433.11404-7-ivan.khoronzhuk@linaro.org
State Superseded
Headers show
Series
  • samples: bpf: improve/fix cross-compilation
Related show

Commit Message

Ivan Khoronzhuk Sept. 16, 2019, 10:54 a.m. UTC
Drop inclusion for bpf_load -I$(objtree)/usr/include as it is
included for all objects anyway, with above line:
KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include

Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
---
 samples/bpf/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrii Nakryiko Sept. 16, 2019, 8:52 p.m. UTC | #1
On Mon, Sep 16, 2019 at 4:01 AM Ivan Khoronzhuk
<ivan.khoronzhuk@linaro.org> wrote:
>
> Drop inclusion for bpf_load -I$(objtree)/usr/include as it is
> included for all objects anyway, with above line:
> KBUILD_HOSTCFLAGS += -I$(objtree)/usr/include
>
> Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
> ---

Acked-by: Andrii Nakryiko <andriin@fb.com>

>  samples/bpf/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> index d3c8db3df560..9d923546e087 100644
> --- a/samples/bpf/Makefile
> +++ b/samples/bpf/Makefile
> @@ -176,7 +176,7 @@ KBUILD_HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
>  KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
>  KBUILD_HOSTCFLAGS += -I$(srctree)/tools/perf
>
> -HOSTCFLAGS_bpf_load.o += -I$(objtree)/usr/include -Wno-unused-variable
> +HOSTCFLAGS_bpf_load.o += -Wno-unused-variable
>
>  KBUILD_HOSTLDLIBS              += $(LIBBPF) -lelf
>  HOSTLDLIBS_tracex4             += -lrt
> --
> 2.17.1
>

Patch
diff mbox series

diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index d3c8db3df560..9d923546e087 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -176,7 +176,7 @@  KBUILD_HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
 KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
 KBUILD_HOSTCFLAGS += -I$(srctree)/tools/perf
 
-HOSTCFLAGS_bpf_load.o += -I$(objtree)/usr/include -Wno-unused-variable
+HOSTCFLAGS_bpf_load.o += -Wno-unused-variable
 
 KBUILD_HOSTLDLIBS		+= $(LIBBPF) -lelf
 HOSTLDLIBS_tracex4		+= -lrt