mirror of
https://github.com/openembedded/meta-openembedded.git
synced 2026-07-27 07:57:27 +00:00
fluentbit: Fix build with clang
Fix build using clang-15 which is even stricter then clang-14 These patches are worth upstream too Signed-off-by: Khem Raj <raj.khem@gmail.com> Cc: Paulo Neves <ptsneves@gmail.com>
This commit is contained in:
+34
@@ -0,0 +1,34 @@
|
||||
From f88d9b82e8bd8ae38fba666b5825ffb41769f81a Mon Sep 17 00:00:00 2001
|
||||
From: Khem Raj <raj.khem@gmail.com>
|
||||
Date: Tue, 9 Aug 2022 12:25:22 -0700
|
||||
Subject: [PATCH] monkey: Fix TLS detection testcase
|
||||
|
||||
Clang15 errors out on compiling the check and disables TLS
|
||||
|
||||
Fixes errors like
|
||||
|
||||
error: call to undeclared function '__tls_get_addr'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
|
||||
__tls_get_addr(0);
|
||||
^
|
||||
|
||||
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
||||
---
|
||||
lib/monkey/CMakeLists.txt | 2 ++
|
||||
1 file changed, 2 insertions(+)
|
||||
|
||||
diff --git a/lib/monkey/CMakeLists.txt b/lib/monkey/CMakeLists.txt
|
||||
index 15e62e8..96ac2bd 100644
|
||||
--- a/lib/monkey/CMakeLists.txt
|
||||
+++ b/lib/monkey/CMakeLists.txt
|
||||
@@ -178,6 +178,8 @@ endif()
|
||||
# Use old Pthread TLS
|
||||
if(NOT MK_PTHREAD_TLS)
|
||||
check_c_source_compiles("
|
||||
+ #include <sys/types.h>
|
||||
+ extern void *__tls_get_addr(size_t *v);
|
||||
__thread int a;
|
||||
int main() {
|
||||
__tls_get_addr(0);
|
||||
--
|
||||
2.37.1
|
||||
|
||||
Reference in New Issue
Block a user