All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH bpf] samples: bpf: fix build error due to -isystem removal
@ 2021-11-15 13:07 Alexander Lobakin
  2021-11-15 23:00 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Lobakin @ 2021-11-15 13:07 UTC (permalink / raw)
  To: Alexei Starovoitov, Daniel Borkmann
  Cc: Alexander Lobakin, Jesse Brandeburg, Maciej Fijalkowski,
	Michal Swiatkowski, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, John Fastabend, KP Singh, Nathan Chancellor,
	Nick Desaulniers, Alexey Dobriyan, Masahiro Yamada,
	Ard Biesheuvel, netdev, bpf, linux-kbuild, linux-kernel, llvm

Since recent Kbuild updates we no longer include files from compiler
directories. However, samples/bpf/hbm_kern.h hasn't been tuned for
this (LLVM 13):

  CLANG-bpf  samples/bpf/hbm_out_kern.o
In file included from samples/bpf/hbm_out_kern.c:55:
samples/bpf/hbm_kern.h:12:10: fatal error: 'stddef.h' file not found
         ^~~~~~~~~~
1 error generated.
  CLANG-bpf  samples/bpf/hbm_edt_kern.o
In file included from samples/bpf/hbm_edt_kern.c:53:
samples/bpf/hbm_kern.h:12:10: fatal error: 'stddef.h' file not found
         ^~~~~~~~~~
1 error generated.

It is enough to just drop both stdbool.h and stddef.h from includes
to fix those.

Fixes: 04e85bbf71c9 ("isystem: delete global -isystem compile option")
Signed-off-by: Alexander Lobakin <alexandr.lobakin@intel.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
---
 samples/bpf/hbm_kern.h | 2 --
 1 file changed, 2 deletions(-)

diff --git a/samples/bpf/hbm_kern.h b/samples/bpf/hbm_kern.h
index 722b3fadb467..1752a46a2b05 100644
--- a/samples/bpf/hbm_kern.h
+++ b/samples/bpf/hbm_kern.h
@@ -9,8 +9,6 @@
  * Include file for sample Host Bandwidth Manager (HBM) BPF programs
  */
 #define KBUILD_MODNAME "foo"
-#include <stddef.h>
-#include <stdbool.h>
 #include <uapi/linux/bpf.h>
 #include <uapi/linux/if_ether.h>
 #include <uapi/linux/if_packet.h>
-- 
2.33.1


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

* Re: [PATCH bpf] samples: bpf: fix build error due to -isystem removal
  2021-11-15 13:07 [PATCH bpf] samples: bpf: fix build error due to -isystem removal Alexander Lobakin
@ 2021-11-15 23:00 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-15 23:00 UTC (permalink / raw)
  To: Alexander Lobakin
  Cc: ast, daniel, jesse.brandeburg, maciej.fijalkowski,
	michal.swiatkowski, andrii, kafai, songliubraving, yhs,
	john.fastabend, kpsingh, nathan, ndesaulniers, adobriyan,
	masahiroy, ardb, netdev, bpf, linux-kbuild, linux-kernel, llvm

Hello:

This patch was applied to bpf/bpf.git (master)
by Daniel Borkmann <daniel@iogearbox.net>:

On Mon, 15 Nov 2021 14:07:41 +0100 you wrote:
> Since recent Kbuild updates we no longer include files from compiler
> directories. However, samples/bpf/hbm_kern.h hasn't been tuned for
> this (LLVM 13):
> 
>   CLANG-bpf  samples/bpf/hbm_out_kern.o
> In file included from samples/bpf/hbm_out_kern.c:55:
> samples/bpf/hbm_kern.h:12:10: fatal error: 'stddef.h' file not found
>          ^~~~~~~~~~
> 1 error generated.
>   CLANG-bpf  samples/bpf/hbm_edt_kern.o
> In file included from samples/bpf/hbm_edt_kern.c:53:
> samples/bpf/hbm_kern.h:12:10: fatal error: 'stddef.h' file not found
>          ^~~~~~~~~~
> 1 error generated.
> 
> [...]

Here is the summary with links:
  - [bpf] samples: bpf: fix build error due to -isystem removal
    https://git.kernel.org/bpf/bpf/c/6e528ca494d4

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

end of thread, other threads:[~2021-11-15 23:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-15 13:07 [PATCH bpf] samples: bpf: fix build error due to -isystem removal Alexander Lobakin
2021-11-15 23:00 ` patchwork-bot+netdevbpf

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.