diff options
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools/libc++.patch | 48 | ||||
-rw-r--r-- | meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb | 1 |
2 files changed, 49 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/libc++.patch b/meta/recipes-kernel/lttng/lttng-tools/libc++.patch new file mode 100644 index 0000000000..be793c7699 --- /dev/null +++ b/meta/recipes-kernel/lttng/lttng-tools/libc++.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | sessiond: avoid std::vector range-ctor on non-standard iterators (libc++) | ||
2 | |||
3 | libc++ SFINAE-gates std::vector(It, It) behind standard iterator requirements. | ||
4 | The events_view/channels_ht_view iterators don’t model Input/Forward, so the | ||
5 | range constructor is not viable and the build fails under clang+libc++. | ||
6 | Populate the vectors via a simple loop instead, which only relies on !=, ++, | ||
7 | and dereference. No functional change; fixes clang/libc++ builds while keeping | ||
8 | libstdc++ behavior unchanged. | ||
9 | |||
10 | Upstream-Status: Submitted [https://review.lttng.org/c/lttng-tools/+/15163] | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | |||
13 | Index: lttng-tools-2.14.0/src/bin/lttng-sessiond/ust-registry-channel.cpp | ||
14 | =================================================================== | ||
15 | --- lttng-tools-2.14.0.orig/src/bin/lttng-sessiond/ust-registry-channel.cpp | ||
16 | +++ lttng-tools-2.14.0/src/bin/lttng-sessiond/ust-registry-channel.cpp | ||
17 | @@ -529,8 +529,11 @@ void lsu::registry_channel::_accept_on_e | ||
18 | events_view(*_events->ht); | ||
19 | |||
20 | /* Copy the event ptrs from the _events ht to this vector which we'll sort. */ | ||
21 | - std::vector<const lttng::sessiond::ust::registry_event *> sorted_event_classes( | ||
22 | - events_view.begin(), events_view.end()); | ||
23 | + std::vector<const lttng::sessiond::ust::registry_event *> sorted_event_classes; | ||
24 | + /* Avoid libc++’s range-ctor SFINAE on non-standard iterators. */ | ||
25 | + for (auto it = events_view.begin(); it != events_view.end(); ++it) { | ||
26 | + sorted_event_classes.push_back(*it); | ||
27 | + } | ||
28 | |||
29 | std::sort(sorted_event_classes.begin(), | ||
30 | sorted_event_classes.end(), | ||
31 | Index: lttng-tools-2.14.0/src/bin/lttng-sessiond/ust-registry-session.cpp | ||
32 | =================================================================== | ||
33 | --- lttng-tools-2.14.0.orig/src/bin/lttng-sessiond/ust-registry-session.cpp | ||
34 | +++ lttng-tools-2.14.0/src/bin/lttng-sessiond/ust-registry-session.cpp | ||
35 | @@ -586,8 +586,11 @@ void lsu::registry_session::_accept_on_s | ||
36 | decltype(lsu::registry_channel::_node), | ||
37 | &lsu::registry_channel::_node> | ||
38 | channels_ht_view(*_channels->ht); | ||
39 | - std::vector<const lttng::sessiond::ust::registry_channel *> sorted_stream_classes( | ||
40 | - channels_ht_view.begin(), channels_ht_view.end()); | ||
41 | + std::vector<const lttng::sessiond::ust::registry_channel *> sorted_stream_classes; | ||
42 | + /* Avoid libc++’s range-ctor SFINAE on non-standard iterators. */ | ||
43 | + for (auto it = channels_ht_view.begin(); it != channels_ht_view.end(); ++it) { | ||
44 | + sorted_stream_classes.push_back(*it); | ||
45 | + } | ||
46 | |||
47 | std::sort(sorted_stream_classes.begin(), | ||
48 | sorted_stream_classes.end(), | ||
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb index ed420384bf..49575ef57c 100644 --- a/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb +++ b/meta/recipes-kernel/lttng/lttng-tools_2.14.0.bb | |||
@@ -53,6 +53,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \ | |||
53 | file://0001-eventfd.cpp-Remove-the-scope-resolution-operator.patch \ | 53 | file://0001-eventfd.cpp-Remove-the-scope-resolution-operator.patch \ |
54 | file://disable-tests2.patch \ | 54 | file://disable-tests2.patch \ |
55 | file://0001-liblttng-ctl-drop-index-allocator-symbols-from-versi.patch \ | 55 | file://0001-liblttng-ctl-drop-index-allocator-symbols-from-versi.patch \ |
56 | file://libc++.patch \ | ||
56 | " | 57 | " |
57 | 58 | ||
58 | SRC_URI[sha256sum] = "d8c39c26cec13b7bd82551cd52a22efc358b888e36ebcf9c1b60ef1c3a3c2fd3" | 59 | SRC_URI[sha256sum] = "d8c39c26cec13b7bd82551cd52a22efc358b888e36ebcf9c1b60ef1c3a3c2fd3" |