diff options
Diffstat (limited to 'meta-oe/recipes-devtools/perfetto/files')
4 files changed, 40 insertions, 180 deletions
diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch b/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch deleted file mode 100644 index d08721ae65..0000000000 --- a/meta-oe/recipes-devtools/perfetto/files/0001-Add-missing-header-cstdint-for-uintXX_t-types.patch +++ /dev/null | |||
@@ -1,58 +0,0 @@ | |||
1 | From e63949205682bbd2a0e33e256119472d704a2549 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Sun, 29 Jan 2023 22:03:01 -0800 | ||
4 | Subject: [PATCH] Add missing header <cstdint> for uintXX_t types | ||
5 | |||
6 | This is detected by gcc-13 | ||
7 | gcc 13 moved some includes around and as a result <cstdint> is no | ||
8 | longer transitively included [1]. Explicitly include it for uintXX_t. | ||
9 | |||
10 | [1] https://gcc.gnu.org/gcc-13/porting_to.html#header-dep-changes | ||
11 | |||
12 | Upstream-Status: Submitted [https://android-review.googlesource.com/c/platform/external/perfetto/+/2399128] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | include/perfetto/ext/base/http/sha1.h | 1 + | ||
16 | include/perfetto/ext/base/uuid.h | 1 + | ||
17 | src/traced/probes/common/cpu_freq_info.h | 1 + | ||
18 | 3 files changed, 3 insertions(+) | ||
19 | |||
20 | diff --git a/include/perfetto/ext/base/http/sha1.h b/include/perfetto/ext/base/http/sha1.h | ||
21 | index c583d69d4..7e3a48c83 100644 | ||
22 | --- a/include/perfetto/ext/base/http/sha1.h | ||
23 | +++ b/include/perfetto/ext/base/http/sha1.h | ||
24 | @@ -20,6 +20,7 @@ | ||
25 | #include <stddef.h> | ||
26 | |||
27 | #include <array> | ||
28 | +#include <cstdint> | ||
29 | #include <string> | ||
30 | |||
31 | namespace perfetto { | ||
32 | diff --git a/include/perfetto/ext/base/uuid.h b/include/perfetto/ext/base/uuid.h | ||
33 | index 1b4c53815..472042fab 100644 | ||
34 | --- a/include/perfetto/ext/base/uuid.h | ||
35 | +++ b/include/perfetto/ext/base/uuid.h | ||
36 | @@ -18,6 +18,7 @@ | ||
37 | #define INCLUDE_PERFETTO_EXT_BASE_UUID_H_ | ||
38 | |||
39 | #include <array> | ||
40 | +#include <cstdint> | ||
41 | #include <string> | ||
42 | |||
43 | #include "perfetto/ext/base/optional.h" | ||
44 | diff --git a/src/traced/probes/common/cpu_freq_info.h b/src/traced/probes/common/cpu_freq_info.h | ||
45 | index 36f7f9c09..8232cbf64 100644 | ||
46 | --- a/src/traced/probes/common/cpu_freq_info.h | ||
47 | +++ b/src/traced/probes/common/cpu_freq_info.h | ||
48 | @@ -17,6 +17,7 @@ | ||
49 | #ifndef SRC_TRACED_PROBES_COMMON_CPU_FREQ_INFO_H_ | ||
50 | #define SRC_TRACED_PROBES_COMMON_CPU_FREQ_INFO_H_ | ||
51 | |||
52 | +#include <cstdint> | ||
53 | #include <map> | ||
54 | #include <string> | ||
55 | #include <vector> | ||
56 | -- | ||
57 | 2.39.1 | ||
58 | |||
diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch b/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch deleted file mode 100644 index c10400aef4..0000000000 --- a/meta-oe/recipes-devtools/perfetto/files/0001-Remove-check_build_deps-build-steps.patch +++ /dev/null | |||
@@ -1,73 +0,0 @@ | |||
1 | From 3b7091243ec03054ca8800b51b85a1c09e7e3075 Mon Sep 17 00:00:00 2001 | ||
2 | From: Sui Chen <suichen6@gmail.com> | ||
3 | Date: Mon, 13 Jun 2022 17:46:49 +0000 | ||
4 | Subject: [PATCH] Remove "check_build_deps" build steps | ||
5 | |||
6 | When building with Bitbake, we want Bitbake to manage our dependencies, | ||
7 | so we remove the "check_build_deps" steps from Perfetto. | ||
8 | |||
9 | Also setting "is_cross_compiling" to true, so that the host-side tools | ||
10 | (such as protoc) will always be generated using the native toolchain, | ||
11 | rather than the Bitbake-generated one. | ||
12 | |||
13 | Signed-off-by: Sui Chen <suichen6@gmail.com> | ||
14 | --- | ||
15 | Upstream-Status: Pending | ||
16 | |||
17 | gn/BUILD.gn | 1 - | ||
18 | gn/standalone/BUILD.gn | 12 ++++++------ | ||
19 | gn/standalone/BUILDCONFIG.gn | 5 +++-- | ||
20 | 3 files changed, 9 insertions(+), 9 deletions(-) | ||
21 | |||
22 | diff --git a/gn/BUILD.gn b/gn/BUILD.gn | ||
23 | index 8a7ca72a8..e4a2d39f0 100644 | ||
24 | --- a/gn/BUILD.gn | ||
25 | +++ b/gn/BUILD.gn | ||
26 | @@ -111,7 +111,6 @@ group("default_deps") { | ||
27 | deps = [ ":gen_buildflags" ] | ||
28 | if (perfetto_build_standalone) { | ||
29 | public_deps = [ | ||
30 | - "//gn/standalone:check_build_deps", | ||
31 | "//gn/standalone/libc++:deps", | ||
32 | "//gn/standalone/sanitizers:deps", | ||
33 | ] | ||
34 | diff --git a/gn/standalone/BUILD.gn b/gn/standalone/BUILD.gn | ||
35 | index 582e9b867..9c77ac64c 100644 | ||
36 | --- a/gn/standalone/BUILD.gn | ||
37 | +++ b/gn/standalone/BUILD.gn | ||
38 | @@ -441,10 +441,10 @@ config("android_liblog") { | ||
39 | } | ||
40 | |||
41 | # Checks that tools/install-build-deps has been run since it last changed. | ||
42 | -perfetto_check_build_deps("check_build_deps") { | ||
43 | - args = [] | ||
44 | -} | ||
45 | +#perfetto_check_build_deps("check_build_deps") { | ||
46 | +# args = [] | ||
47 | +#} | ||
48 | |||
49 | -perfetto_check_build_deps("check_build_deps_android") { | ||
50 | - args = [ "--android" ] | ||
51 | -} | ||
52 | +#perfetto_check_build_deps("check_build_deps_android") { | ||
53 | +# args = [ "--android" ] | ||
54 | +#} | ||
55 | diff --git a/gn/standalone/BUILDCONFIG.gn b/gn/standalone/BUILDCONFIG.gn | ||
56 | index 6f32686c1..c041989b0 100644 | ||
57 | --- a/gn/standalone/BUILDCONFIG.gn | ||
58 | +++ b/gn/standalone/BUILDCONFIG.gn | ||
59 | @@ -59,8 +59,9 @@ declare_args() { | ||
60 | # the ossfuzz sanitizer overrides this to true. In that config the | ||
61 | # host/target cpu and arch are identical, but we want to build only the | ||
62 | # targets with the sanitizer/fuzzer flags | ||
63 | - is_cross_compiling = | ||
64 | - target_cpu != host_cpu || target_os != host_os || target_triplet != "" | ||
65 | + | ||
66 | + # for Bitbake build | ||
67 | + is_cross_compiling = true | ||
68 | } | ||
69 | default_configs = [ | ||
70 | "//gn/standalone:debug_symbols", | ||
71 | -- | ||
72 | 2.37.1 | ||
73 | |||
diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-fix-musl-build.patch b/meta-oe/recipes-devtools/perfetto/files/0001-fix-musl-build.patch new file mode 100644 index 0000000000..3b7ca951ae --- /dev/null +++ b/meta-oe/recipes-devtools/perfetto/files/0001-fix-musl-build.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 485c21940eb0100a33b7efea40a83e7f79e765f8 Mon Sep 17 00:00:00 2001 | ||
2 | From: Etienne Cordonnier <ecordonnier@snap.com> | ||
3 | Date: Sun, 22 Sep 2024 20:17:52 +0200 | ||
4 | Subject: [PATCH] fix musl build | ||
5 | |||
6 | Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com> | ||
7 | --- | ||
8 | Upstream-Status: Pending | ||
9 | |||
10 | sdk/perfetto.cc | 1 - | ||
11 | src/base/utils.cc | 1 - | ||
12 | 2 files changed, 2 deletions(-) | ||
13 | |||
14 | diff --git a/sdk/perfetto.cc b/sdk/perfetto.cc | ||
15 | index b10dd5aa92..2eb90f0d15 100644 | ||
16 | --- a/sdk/perfetto.cc | ||
17 | +++ b/sdk/perfetto.cc | ||
18 | @@ -6558,7 +6558,6 @@ std::optional<int32_t> GetTimezoneOffsetMins() { | ||
19 | |||
20 | #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ | ||
21 | PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) | ||
22 | -#include <linux/prctl.h> | ||
23 | #include <sys/prctl.h> | ||
24 | |||
25 | #ifndef PR_GET_TAGGED_ADDR_CTRL | ||
26 | diff --git a/src/base/utils.cc b/src/base/utils.cc | ||
27 | index 0d9318c136..419c7dbc1a 100644 | ||
28 | --- a/src/base/utils.cc | ||
29 | +++ b/src/base/utils.cc | ||
30 | @@ -40,7 +40,6 @@ | ||
31 | |||
32 | #if PERFETTO_BUILDFLAG(PERFETTO_OS_LINUX) || \ | ||
33 | PERFETTO_BUILDFLAG(PERFETTO_OS_ANDROID) | ||
34 | -#include <linux/prctl.h> | ||
35 | #include <sys/prctl.h> | ||
36 | |||
37 | #ifndef PR_GET_TAGGED_ADDR_CTRL | ||
38 | -- | ||
39 | 2.43.0 | ||
40 | |||
diff --git a/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch b/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch deleted file mode 100644 index ae644747c1..0000000000 --- a/meta-oe/recipes-devtools/perfetto/files/0001-meson-add-pc-file-for-lib_perfetto.patch +++ /dev/null | |||
@@ -1,49 +0,0 @@ | |||
1 | From 027f90dc9386ec08f2a5107025683e5fed6f3444 Mon Sep 17 00:00:00 2001 | ||
2 | From: Markus Volk <f_l_k@t-online.de> | ||
3 | Date: Mon, 17 Oct 2022 19:20:53 +0200 | ||
4 | Subject: [PATCH] meson: add PC file for lib_perfetto | ||
5 | |||
6 | --- | ||
7 | Upstream-Status: Pending | ||
8 | |||
9 | meson.build | 12 ++++++++++-- | ||
10 | 1 file changed, 10 insertions(+), 2 deletions(-) | ||
11 | |||
12 | --- a/meson.build | ||
13 | +++ b/meson.build | ||
14 | @@ -19,9 +19,12 @@ | ||
15 | project( | ||
16 | 'perfetto', | ||
17 | ['cpp'], | ||
18 | - default_options: ['cpp_std=c++17'] | ||
19 | + default_options: ['cpp_std=c++17'], | ||
20 | + version: '31.0' | ||
21 | ) | ||
22 | |||
23 | +soversion = meson.project_version() | ||
24 | + | ||
25 | fs = import('fs') | ||
26 | |||
27 | if not fs.is_dir('sdk') | ||
28 | @@ -36,8 +39,9 @@ if host_machine.system() == 'android' | ||
29 | deps_perfetto += cpp.find_library('log') | ||
30 | endif | ||
31 | |||
32 | -lib_perfetto = static_library( | ||
33 | +lib_perfetto = shared_library( | ||
34 | 'perfetto', | ||
35 | + version: soversion, | ||
36 | sources: 'sdk/perfetto.cc', | ||
37 | dependencies: deps_perfetto, | ||
38 | install: true, | ||
39 | @@ -50,6 +54,10 @@ dir_perfetto_trace = join_paths(meson.cu | ||
40 | |||
41 | install_data(dir_perfetto_trace / 'perfetto_trace.proto') | ||
42 | |||
43 | +install_headers('sdk/perfetto.h') | ||
44 | +pkg = import('pkgconfig') | ||
45 | +pkg.generate(lib_perfetto) | ||
46 | + | ||
47 | dep_perfetto = declare_dependency( | ||
48 | link_with: lib_perfetto, | ||
49 | include_directories: inc_perfetto, | ||