mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-11 21:30:35 +00:00
ebpf: fix ebpf compile error
Some/most of the samples/tools throw and error, e.g.: LLVM ERROR: Cannot select: 0x56049b79dcb0: ch,glue = BPFISD::CALL 0x56049a93ad60, TargetExternalSymbol:i64'__stack_chk_fail' 0x56049b391500: i64 = TargetExternalSymbol'__stack_chk_fail' In function: waker bcc-stack-protector.patch adds -fno-stack-protector to the CFLAGS which fixes this error. Signed-off-by: Rolf Neugebauer <rolf.neugebauer@docker.com>
This commit is contained in:
10
alpine/base/ebpf/bcc-stack-protector.patch
Normal file
10
alpine/base/ebpf/bcc-stack-protector.patch
Normal file
@@ -0,0 +1,10 @@
|
||||
--- src/cc/frontends/clang/kbuild_helper.cc
|
||||
+++ src/cc/frontends/clang/kbuild_helper.cc
|
||||
@@ -89,6 +89,7 @@ int KBuildHelper::get_flags(const char *uname_machine, vector<string> *cflags) {
|
||||
cflags->push_back("-D__HAVE_BUILTIN_BSWAP64__");
|
||||
cflags->push_back("-Wno-unused-value");
|
||||
cflags->push_back("-Wno-pointer-sign");
|
||||
+ cflags->push_back("-fno-stack-protector");
|
||||
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user