diff options
Diffstat (limited to 'dynamic-layers/meta-python')
2 files changed, 50 insertions, 0 deletions
diff --git a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch new file mode 100644 index 0000000..0364d90 --- /dev/null +++ b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace/0001-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch | |||
@@ -0,0 +1,45 @@ | |||
1 | From 814d20901a71fd4d98a5a67789d69ef7e9a2169c Mon Sep 17 00:00:00 2001 | ||
2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
3 | Date: Tue, 3 Sep 2024 13:47:48 +0200 | ||
4 | Subject: [PATCH] CMakeLists.txt: allow to set BISON_FLAGS like -l | ||
5 | |||
6 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
7 | |||
8 | Upstream-Status: Pending | ||
9 | |||
10 | Signed-off-by: Archana Polampalli <archana.polampalli@windriver.com> | ||
11 | --- | ||
12 | CMakeLists.txt | 10 +++++++--- | ||
13 | 1 file changed, 7 insertions(+), 3 deletions(-) | ||
14 | |||
15 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
16 | index 7d0433d..6b3d445 100644 | ||
17 | --- a/CMakeLists.txt | ||
18 | +++ b/CMakeLists.txt | ||
19 | @@ -91,16 +91,20 @@ include_directories(SYSTEM ${LIBCEREAL_INCLUDE_DIRS}) | ||
20 | |||
21 | find_package(BISON REQUIRED) | ||
22 | find_package(FLEX REQUIRED) | ||
23 | + | ||
24 | +# avoid buildpaths in generated #line statements and allow to pass --file-prefix-map=OLD=NEW | ||
25 | +set(BISON_FLAGS "${BISON_FLAGS} -l") | ||
26 | +set(FLEX_FLAGS "${FLEX_FLAGS} -L") | ||
27 | # `parser_class_name` is deprecated and generates warnings in bison >= 3.3. | ||
28 | # But `api.parser.class` is not supported in bison < 3.3. So we must inject | ||
29 | # the %define based on the bison version here. | ||
30 | if(${BISON_VERSION} VERSION_GREATER_EQUAL 3.3) | ||
31 | - set(BISON_FLAGS "-Dapi.parser.class={Parser}") | ||
32 | + set(BISON_FLAGS "${BISON_FLAGS} -Dapi.parser.class={Parser}") | ||
33 | else() | ||
34 | - set(BISON_FLAGS "-Dparser_class_name={Parser}") | ||
35 | + set(BISON_FLAGS "${BISON_FLAGS} -Dparser_class_name={Parser}") | ||
36 | endif() | ||
37 | bison_target(bison_parser src/parser.yy ${CMAKE_BINARY_DIR}/parser.tab.cc COMPILE_FLAGS ${BISON_FLAGS} VERBOSE) | ||
38 | -flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc) | ||
39 | +flex_target(flex_lexer src/lexer.l ${CMAKE_BINARY_DIR}/lex.yy.cc COMPILE_FLAGS ${FLEX_FLAGS}) | ||
40 | add_flex_bison_dependency(flex_lexer bison_parser) | ||
41 | add_library(parser ${BISON_bison_parser_OUTPUTS} ${FLEX_flex_lexer_OUTPUTS}) | ||
42 | target_compile_options(parser PRIVATE "-w") | ||
43 | -- | ||
44 | 2.40.0 | ||
45 | |||
diff --git a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.20.1.bb b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.20.1.bb index 355f427..f0c29f4 100644 --- a/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.20.1.bb +++ b/dynamic-layers/meta-python/recipes-devtools/bpftrace/bpftrace_0.20.1.bb | |||
@@ -25,6 +25,7 @@ SRC_URI = "git://github.com/iovisor/bpftrace;branch=master;protocol=https \ | |||
25 | file://0004-cmake-Bump-max-LLVM-version-to-18.patch \ | 25 | file://0004-cmake-Bump-max-LLVM-version-to-18.patch \ |
26 | file://0001-use-64bit-alignment-for-map-counter-atomic-add.patch \ | 26 | file://0001-use-64bit-alignment-for-map-counter-atomic-add.patch \ |
27 | file://run-ptest \ | 27 | file://run-ptest \ |
28 | file://0001-CMakeLists.txt-allow-to-set-BISON_FLAGS-like-l.patch \ | ||
28 | " | 29 | " |
29 | SRCREV = "fe6362b4e2c1b9d0833c7d3f308c1d4006b54723" | 30 | SRCREV = "fe6362b4e2c1b9d0833c7d3f308c1d4006b54723" |
30 | 31 | ||
@@ -55,6 +56,7 @@ EXTRA_OECMAKE = " \ | |||
55 | -DCMAKE_BUILD_TYPE=Release \ | 56 | -DCMAKE_BUILD_TYPE=Release \ |
56 | -DUSE_SYSTEM_BPF_BCC=ON \ | 57 | -DUSE_SYSTEM_BPF_BCC=ON \ |
57 | -DENABLE_MAN=OFF \ | 58 | -DENABLE_MAN=OFF \ |
59 | -DBISON_FLAGS='--file-prefix-map=${WORKDIR}=' \ | ||
58 | " | 60 | " |
59 | 61 | ||
60 | COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" | 62 | COMPATIBLE_HOST = "(x86_64.*|aarch64.*|powerpc64.*|riscv64.*)-linux" |
@@ -63,3 +65,6 @@ COMPATIBLE_HOST:libc-musl = "null" | |||
63 | INHIBIT_PACKAGE_STRIP_FILES += "\ | 65 | INHIBIT_PACKAGE_STRIP_FILES += "\ |
64 | ${PKGD}${PTEST_PATH}/tests/testprogs/uprobe_test \ | 66 | ${PKGD}${PTEST_PATH}/tests/testprogs/uprobe_test \ |
65 | " | 67 | " |
68 | |||
69 | WARN_QA:append = "${@bb.utils.contains('PTEST_ENABLED', '1', ' buildpaths', '', d)}" | ||
70 | ERROR_QA:remove = "${@bb.utils.contains('PTEST_ENABLED', '1', 'buildpaths', '', d)}" | ||