diff mbox series

[2/2] samples/bpf: fix build by setting HAVE_ATTR_TEST to zero

Message ID 20191001113307.27796-3-bjorn.topel@gmail.com
State Not Applicable
Delegated to: BPF Maintainers
Headers show
Series perf tools: optional compile time test_attr__* depenency for perf-sys.h | expand

Commit Message

Björn Töpel Oct. 1, 2019, 11:33 a.m. UTC
From: Björn Töpel <bjorn.topel@intel.com>

To remove that test_attr__{enabled/open} are used by perf-sys.h, we
set HAVE_ATTR_TEST to zero.

Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
---
 samples/bpf/Makefile | 1 +
 1 file changed, 1 insertion(+)

Comments

Song Liu Oct. 2, 2019, 9 p.m. UTC | #1
On Tue, Oct 1, 2019 at 4:36 AM Björn Töpel <bjorn.topel@gmail.com> wrote:
>
> From: Björn Töpel <bjorn.topel@intel.com>
>
> To remove that test_attr__{enabled/open} are used by perf-sys.h, we
> set HAVE_ATTR_TEST to zero.
>
> Signed-off-by: Björn Töpel <bjorn.topel@intel.com>

Acked-by: Song Liu <songliubraving@fb.com>
KP Singh Oct. 3, 2019, 12:19 a.m. UTC | #2
Tested-by: KP Singh <kpsingh@google.com>

I can confirm that samples/bpf are building for me now (x86_64,
clang-8) after applying this series and:

 * https://lore.kernel.org/bpf/CAPhsuW5c9v0OnU4g+eYkPjBCuNMjC_69pFhzr=nTfDMAy4bK6w@mail.gmail.com
 * https://lore.kernel.org/bpf/20191002191652.11432-1-kpsingh@chromium.org/

on the current bpf-next/master.


- KP

On Wed, Oct 2, 2019 at 11:00 PM Song Liu <liu.song.a23@gmail.com> wrote:
>
> On Tue, Oct 1, 2019 at 4:36 AM Björn Töpel <bjorn.topel@gmail.com> wrote:
> >
> > From: Björn Töpel <bjorn.topel@intel.com>
> >
> > To remove that test_attr__{enabled/open} are used by perf-sys.h, we
> > set HAVE_ATTR_TEST to zero.
> >
> > Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
>
> Acked-by: Song Liu <songliubraving@fb.com>
Arnaldo Carvalho de Melo Oct. 3, 2019, 1:53 p.m. UTC | #3
Em Thu, Oct 03, 2019 at 02:19:42AM +0200, KP Singh escreveu:
> Tested-by: KP Singh <kpsingh@google.com>
> 
> I can confirm that samples/bpf are building for me now (x86_64,
> clang-8) after applying this series and:
> 
>  * https://lore.kernel.org/bpf/CAPhsuW5c9v0OnU4g+eYkPjBCuNMjC_69pFhzr=nTfDMAy4bK6w@mail.gmail.com
>  * https://lore.kernel.org/bpf/20191002191652.11432-1-kpsingh@chromium.org/
> 
> on the current bpf-next/master.
> 
> 
> - KP
> 
> On Wed, Oct 2, 2019 at 11:00 PM Song Liu <liu.song.a23@gmail.com> wrote:
> >
> > On Tue, Oct 1, 2019 at 4:36 AM Björn Töpel <bjorn.topel@gmail.com> wrote:
> > >
> > > From: Björn Töpel <bjorn.topel@intel.com>
> > >
> > > To remove that test_attr__{enabled/open} are used by perf-sys.h, we
> > > set HAVE_ATTR_TEST to zero.
> > >
> > > Signed-off-by: Björn Töpel <bjorn.topel@intel.com>
> >
> > Acked-by: Song Liu <songliubraving@fb.com>

Thanks, applied.

- Arnaldo
diff mbox series

Patch

diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 1d9be26b4edd..42b571cde177 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -176,6 +176,7 @@  KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/bpf/
 KBUILD_HOSTCFLAGS += -I$(srctree)/tools/testing/selftests/bpf/
 KBUILD_HOSTCFLAGS += -I$(srctree)/tools/lib/ -I$(srctree)/tools/include
 KBUILD_HOSTCFLAGS += -I$(srctree)/tools/perf
+KBUILD_HOSTCFLAGS += -DHAVE_ATTR_TEST=0
 
 HOSTCFLAGS_bpf_load.o += -I$(objtree)/usr/include -Wno-unused-variable