summaryrefslogtreecommitdiffstats
path: root/dynamic-layers/meta-python/recipes-devtools/bcc/bcc/0001-tests-cc-Use-c-14-standard.patch
blob: dcd9dc1713752455bbce5f8d4cf3e1da617eb392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From 9f45e12ad4689ca2c41844b77c6d789d21509a13 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 6 Mar 2023 13:26:11 -0800
Subject: [PATCH] tests/cc: Use c++14 standard

default c++ standard was bumped to c++17 when using clang16+ compiler
via 907b89cc9, however, tests which use check tool is not yet ported
to work with c++17 standard, therefore use c++14 on tests

Upstream-Status: Submitted [https://github.com/iovisor/bcc/pull/4506]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Hengqi Chen <chenhengqi@outlook.com>
---
 tests/cc/CMakeLists.txt | 4 ++++
 1 file changed, 4 insertions(+)

--- a/tests/cc/CMakeLists.txt
+++ b/tests/cc/CMakeLists.txt
@@ -27,6 +27,10 @@ if(${LLVM_PACKAGE_VERSION} VERSION_EQUAL
 set(CMAKE_CXX_STANDARD 14)
 endif()
 
+if(${LLVM_PACKAGE_VERSION} VERSION_EQUAL 16 OR ${LLVM_PACKAGE_VERSION} VERSION_GREATER 16)
+set(CMAKE_CXX_STANDARD 14)
+endif()
+
 if(ENABLE_USDT)
 set(TEST_LIBBCC_SOURCES
 	test_libbcc.cc