summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tests-cc-Use-c-14-standard.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tests-cc-Use-c-14-standard.patch')
-rw-r--r--dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tests-cc-Use-c-14-standard.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tests-cc-Use-c-14-standard.patch b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tests-cc-Use-c-14-standard.patch
new file mode 100644
index 0000000..48754f6
--- /dev/null
+++ b/dynamic-layers/openembedded-layer/recipes-devtools/bcc/bcc/0001-tests-cc-Use-c-14-standard.patch
@@ -0,0 +1,34 @@
1From 9f45e12ad4689ca2c41844b77c6d789d21509a13 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 6 Mar 2023 13:26:11 -0800
4Subject: [PATCH] tests/cc: Use c++14 standard
5
6default c++ standard was bumped to c++17 when using clang16+ compiler
7via 907b89cc9, however, tests which use check tool is not yet ported
8to work with c++17 standard, therefore use c++14 on tests
9
10Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/4506]
11Signed-off-by: Khem Raj <raj.khem@gmail.com>
12Cc: Hengqi Chen <chenhengqi@outlook.com>
13---
14 tests/cc/CMakeLists.txt | 4 ++++
15 1 file changed, 4 insertions(+)
16
17diff --git a/tests/cc/CMakeLists.txt b/tests/cc/CMakeLists.txt
18index bc870b07..b45f2369 100644
19--- a/tests/cc/CMakeLists.txt
20+++ b/tests/cc/CMakeLists.txt
21@@ -23,6 +23,10 @@ add_compile_options(-DCMAKE_CURRENT_BINARY_DIR="${CMAKE_CURRENT_BINARY_DIR}")
22 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-unused-result -fPIC")
23 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-result -fPIC")
24
25+if(${LLVM_PACKAGE_VERSION} VERSION_EQUAL 16 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 16)
26+set(CMAKE_CXX_STANDARD 14)
27+endif()
28+
29 if(ENABLE_USDT)
30 set(TEST_LIBBCC_SOURCES
31 test_libbcc.cc
32--
332.39.2
34