Skip to content

Commit 9a0a416

Browse files
committed
builder: Fix undefined __noinline__ issue
When `make nocore`, there will be a compiling error: ```bash In file included from kern/boringssl_a_13_kern.c:72: In file included from ./kern/openssl.h:16: ./kern/tc.h:116:8: error: use of undeclared identifier '__noinline__' static __noinline bool filter_pcap_ebpf_l2(void *_skb, void *__skb, ^ ./kern/bpf/bpf_helpers.h:47:35: note: expanded from macro '__noinline' ^ /lib/modules/6.5.0-15-generic/build/include/linux/compiler_attributes.h:244:56: note: expanded from macro 'noinline' ^ 1 error generated. ``` This is because definition of `noinline` in `compiler_attributes.h` is incorrect for us, which makes `__noinline` expanding to clang-unrecognised `__attribute__((__attribute__((__noinline__))))`. So, we have to `undef noinline` for clang compiling for `make nocore`. Signed-off-by: Leon Hwang <hffilwlqm@gmail.com>
1 parent 0b3b762 commit 9a0a416

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

kern/bpf/bpf_helpers.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
#undef __always_inline
4141
#define __always_inline inline __attribute__((always_inline))
4242

43+
#if defined(NOCORE) && defined(noinline)
44+
#undef noinline
45+
#endif
4346
#ifndef __noinline
4447
#define __noinline __attribute__((noinline))
4548
#endif

0 commit comments

Comments
 (0)