summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/lttng
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2015-04-23 20:35:24 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-04-27 14:59:48 +0100
commit35a2acdc7365aaafae2a11be691633e27d29af4f (patch)
tree39ae5948b108966b8f5db519561160fb8f7c6346 /meta/recipes-kernel/lttng
parent25105f86a089aab4f26156af8301290533587ee6 (diff)
downloadpoky-35a2acdc7365aaafae2a11be691633e27d29af4f.tar.gz
lttng-tools: Add extern qualifier to declarations in .h file
This will ensure that compiler does not initialize the definitions in header files Change-Id: I1076201c667f96707c320a51a77d4a70e22df750 (From OE-Core rev: 2e9a4198fc9a9fcc78eddb6cd5c2ad51a2e8d3e7) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-kernel/lttng')
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/extern-decls.patch442
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb1
2 files changed, 443 insertions, 0 deletions
diff --git a/meta/recipes-kernel/lttng/lttng-tools/extern-decls.patch b/meta/recipes-kernel/lttng/lttng-tools/extern-decls.patch
new file mode 100644
index 0000000000..199ef5761f
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/extern-decls.patch
@@ -0,0 +1,442 @@
1This make the declarations to be extern so they dont end up
2in duplicates in data.rel.ro sections
3
4avoid errors like
5
6| ../../../src/common/.libs/libcommon.a(mi-lttng.o):(.data.rel.ro.local+0x0): multiple definition of `mi_lttng_element_snapshots'
7| commands/enable_events.o:(.bss+0x48): first defined here
8| collect2: error: ld returned 1 exit status
9| Makefile:502: recipe for target 'lttng' failed
10| make[3]: *** [lttng] Error 1
11
12
13Upstream-Status: Pending
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15
16Index: git/src/common/config/config-session-abi.h
17===================================================================
18--- git.orig/src/common/config/config-session-abi.h
19+++ git/src/common/config/config-session-abi.h
20@@ -18,95 +18,95 @@
21 #ifndef CONFIG_SESSION_INTERNAL_H
22 #define CONFIG_SESSION_INTERNAL_H
23
24-const char * const config_element_channel;
25-const char * const config_element_channels;
26-const char * const config_element_domain;
27-const char * const config_element_domains;
28-const char * const config_element_event;
29-const char * const config_element_events;
30-const char * const config_element_context;
31-const char * const config_element_contexts;
32-const char * const config_element_attributes;
33-const char * const config_element_exclusion;
34-const char * const config_element_exclusions;
35-const char * const config_element_function_attributes;
36-const char * const config_element_probe_attributes;
37-const char * const config_element_symbol_name;
38-const char * const config_element_address;
39-const char * const config_element_offset;
40-const char * const config_element_name;
41-const char * const config_element_enabled;
42-const char * const config_element_overwrite_mode;
43-const char * const config_element_subbuf_size;
44-const char * const config_element_num_subbuf;
45-const char * const config_element_switch_timer_interval;
46-const char * const config_element_read_timer_interval;
47-const char * const config_element_output;
48-const char * const config_element_output_type;
49-const char * const config_element_tracefile_size;
50-const char * const config_element_tracefile_count;
51-const char * const config_element_live_timer_interval;
52-const char * const config_element_type;
53-const char * const config_element_buffer_type;
54-const char * const config_element_session;
55-const char * const config_element_sessions;
56-const char * const config_element_perf;
57-const char * const config_element_config;
58-const char * const config_element_started;
59-const char * const config_element_snapshot_mode;
60-const char * const config_element_loglevel;
61-const char * const config_element_loglevel_type;
62-const char * const config_element_filter;
63-const char * const config_element_snapshot_outputs;
64-const char * const config_element_consumer_output;
65-const char * const config_element_destination;
66-const char * const config_element_path;
67-const char * const config_element_net_output;
68-const char * const config_element_control_uri;
69-const char * const config_element_data_uri;
70-const char * const config_element_max_size;
71-
72-const char * const config_domain_type_kernel;
73-const char * const config_domain_type_ust;
74-const char * const config_domain_type_jul;
75-const char * const config_domain_type_log4j;
76-
77-const char * const config_buffer_type_per_pid;
78-const char * const config_buffer_type_per_uid;
79-const char * const config_buffer_type_global;
80-
81-const char * const config_overwrite_mode_discard;
82-const char * const config_overwrite_mode_overwrite;
83-
84-const char * const config_output_type_splice;
85-const char * const config_output_type_mmap;
86-
87-const char * const config_loglevel_type_all;
88-const char * const config_loglevel_type_range;
89-const char * const config_loglevel_type_single;
90-
91-const char * const config_event_type_all;
92-const char * const config_event_type_tracepoint;
93-const char * const config_event_type_probe;
94-const char * const config_event_type_function;
95-const char * const config_event_type_function_entry;
96-const char * const config_event_type_noop;
97-const char * const config_event_type_syscall;
98-const char * const config_event_type_kprobe;
99-const char * const config_event_type_kretprobe;
100-
101-const char * const config_event_context_pid;
102-const char * const config_event_context_procname;
103-const char * const config_event_context_prio;
104-const char * const config_event_context_nice;
105-const char * const config_event_context_vpid;
106-const char * const config_event_context_tid;
107-const char * const config_event_context_vtid;
108-const char * const config_event_context_ppid;
109-const char * const config_event_context_vppid;
110-const char * const config_event_context_pthread_id;
111-const char * const config_event_context_hostname;
112-const char * const config_event_context_ip;
113-const char * const config_event_context_perf_thread_counter;
114+extern const char * const config_element_channel;
115+extern const char * const config_element_channels;
116+extern const char * const config_element_domain;
117+extern const char * const config_element_domains;
118+extern const char * const config_element_event;
119+extern const char * const config_element_events;
120+extern const char * const config_element_context;
121+extern const char * const config_element_contexts;
122+extern const char * const config_element_attributes;
123+extern const char * const config_element_exclusion;
124+extern const char * const config_element_exclusions;
125+extern const char * const config_element_function_attributes;
126+extern const char * const config_element_probe_attributes;
127+extern const char * const config_element_symbol_name;
128+extern const char * const config_element_address;
129+extern const char * const config_element_offset;
130+extern const char * const config_element_name;
131+extern const char * const config_element_enabled;
132+extern const char * const config_element_overwrite_mode;
133+extern const char * const config_element_subbuf_size;
134+extern const char * const config_element_num_subbuf;
135+extern const char * const config_element_switch_timer_interval;
136+extern const char * const config_element_read_timer_interval;
137+extern const char * const config_element_output;
138+extern const char * const config_element_output_type;
139+extern const char * const config_element_tracefile_size;
140+extern const char * const config_element_tracefile_count;
141+extern const char * const config_element_live_timer_interval;
142+extern const char * const config_element_type;
143+extern const char * const config_element_buffer_type;
144+extern const char * const config_element_session;
145+extern const char * const config_element_sessions;
146+extern const char * const config_element_perf;
147+extern const char * const config_element_config;
148+extern const char * const config_element_started;
149+extern const char * const config_element_snapshot_mode;
150+extern const char * const config_element_loglevel;
151+extern const char * const config_element_loglevel_type;
152+extern const char * const config_element_filter;
153+extern const char * const config_element_snapshot_outputs;
154+extern const char * const config_element_consumer_output;
155+extern const char * const config_element_destination;
156+extern const char * const config_element_path;
157+extern const char * const config_element_net_output;
158+extern const char * const config_element_control_uri;
159+extern const char * const config_element_data_uri;
160+extern const char * const config_element_max_size;
161+
162+extern const char * const config_domain_type_kernel;
163+extern const char * const config_domain_type_ust;
164+extern const char * const config_domain_type_jul;
165+extern const char * const config_domain_type_log4j;
166+
167+extern const char * const config_buffer_type_per_pid;
168+extern const char * const config_buffer_type_per_uid;
169+extern const char * const config_buffer_type_global;
170+
171+extern const char * const config_overwrite_mode_discard;
172+extern const char * const config_overwrite_mode_overwrite;
173+
174+extern const char * const config_output_type_splice;
175+extern const char * const config_output_type_mmap;
176+
177+extern const char * const config_loglevel_type_all;
178+extern const char * const config_loglevel_type_range;
179+extern const char * const config_loglevel_type_single;
180+
181+extern const char * const config_event_type_all;
182+extern const char * const config_event_type_tracepoint;
183+extern const char * const config_event_type_probe;
184+extern const char * const config_event_type_function;
185+extern const char * const config_event_type_function_entry;
186+extern const char * const config_event_type_noop;
187+extern const char * const config_event_type_syscall;
188+extern const char * const config_event_type_kprobe;
189+extern const char * const config_event_type_kretprobe;
190+
191+extern const char * const config_event_context_pid;
192+extern const char * const config_event_context_procname;
193+extern const char * const config_event_context_prio;
194+extern const char * const config_event_context_nice;
195+extern const char * const config_event_context_vpid;
196+extern const char * const config_event_context_tid;
197+extern const char * const config_event_context_vtid;
198+extern const char * const config_event_context_ppid;
199+extern const char * const config_event_context_vppid;
200+extern const char * const config_event_context_pthread_id;
201+extern const char * const config_event_context_hostname;
202+extern const char * const config_event_context_ip;
203+extern const char * const config_event_context_perf_thread_counter;
204
205 #endif /* CONFIG_SESSION_INTERNAL_H */
206Index: git/src/common/mi-lttng.h
207===================================================================
208--- git.orig/src/common/mi-lttng.h
209+++ git/src/common/mi-lttng.h
210@@ -49,133 +49,133 @@ struct mi_lttng_version {
211 };
212
213 /* Strings related to command */
214-const char * const mi_lttng_element_command;
215-const char * const mi_lttng_element_command_action;
216-const char * const mi_lttng_element_command_add_context;
217-const char * const mi_lttng_element_command_calibrate;
218-const char * const mi_lttng_element_command_create;
219-const char * const mi_lttng_element_command_destroy;
220-const char * const mi_lttng_element_command_disable_channel;
221-const char * const mi_lttng_element_command_disable_event;
222-const char * const mi_lttng_element_command_enable_channels;
223-const char * const mi_lttng_element_command_enable_event;
224-const char * const mi_lttng_element_command_list;
225-const char * const mi_lttng_element_command_load;
226-const char * const mi_lttng_element_command_name;
227-const char * const mi_lttng_element_command_output;
228-const char * const mi_lttng_element_command_save;
229-const char * const mi_lttng_element_command_set_session;
230-const char * const mi_lttng_element_command_snapshot;
231-const char * const mi_lttng_element_command_snapshot_add;
232-const char * const mi_lttng_element_command_snapshot_del;
233-const char * const mi_lttng_element_command_snapshot_list;
234-const char * const mi_lttng_element_command_snapshot_record;
235-const char * const mi_lttng_element_command_start;
236-const char * const mi_lttng_element_command_stop;
237-const char * const mi_lttng_element_command_success;
238-const char * const mi_lttng_element_command_version;
239+extern const char * const mi_lttng_element_command;
240+extern const char * const mi_lttng_element_command_action;
241+extern const char * const mi_lttng_element_command_add_context;
242+extern const char * const mi_lttng_element_command_calibrate;
243+extern const char * const mi_lttng_element_command_create;
244+extern const char * const mi_lttng_element_command_destroy;
245+extern const char * const mi_lttng_element_command_disable_channel;
246+extern const char * const mi_lttng_element_command_disable_event;
247+extern const char * const mi_lttng_element_command_enable_channels;
248+extern const char * const mi_lttng_element_command_enable_event;
249+extern const char * const mi_lttng_element_command_list;
250+extern const char * const mi_lttng_element_command_load;
251+extern const char * const mi_lttng_element_command_name;
252+extern const char * const mi_lttng_element_command_output;
253+extern const char * const mi_lttng_element_command_save;
254+extern const char * const mi_lttng_element_command_set_session;
255+extern const char * const mi_lttng_element_command_snapshot;
256+extern const char * const mi_lttng_element_command_snapshot_add;
257+extern const char * const mi_lttng_element_command_snapshot_del;
258+extern const char * const mi_lttng_element_command_snapshot_list;
259+extern const char * const mi_lttng_element_command_snapshot_record;
260+extern const char * const mi_lttng_element_command_start;
261+extern const char * const mi_lttng_element_command_stop;
262+extern const char * const mi_lttng_element_command_success;
263+extern const char * const mi_lttng_element_command_version;
264
265 /* Strings related to version command */
266-const char * const mi_lttng_element_version;
267-const char * const mi_lttng_element_version_commit;
268-const char * const mi_lttng_element_version_description;
269-const char * const mi_lttng_element_version_license;
270-const char * const mi_lttng_element_version_major;
271-const char * const mi_lttng_element_version_minor;
272-const char * const mi_lttng_element_version_patch_level;
273-const char * const mi_lttng_element_version_str;
274-const char * const mi_lttng_element_version_web;
275+extern const char * const mi_lttng_element_version;
276+extern const char * const mi_lttng_element_version_commit;
277+extern const char * const mi_lttng_element_version_description;
278+extern const char * const mi_lttng_element_version_license;
279+extern const char * const mi_lttng_element_version_major;
280+extern const char * const mi_lttng_element_version_minor;
281+extern const char * const mi_lttng_element_version_patch_level;
282+extern const char * const mi_lttng_element_version_str;
283+extern const char * const mi_lttng_element_version_web;
284
285 /* String related to a lttng_event_field */
286-const char * const mi_lttng_element_event_field;
287-const char * const mi_lttng_element_event_fields;
288+extern const char * const mi_lttng_element_event_field;
289+extern const char * const mi_lttng_element_event_fields;
290
291 /* String related to lttng_event_context */
292-const char * const mi_lttng_context_type_perf_counter;
293-const char * const mi_lttng_context_type_perf_cpu_counter;
294-const char * const mi_lttng_context_type_perf_thread_counter;
295+extern const char * const mi_lttng_context_type_perf_counter;
296+extern const char * const mi_lttng_context_type_perf_cpu_counter;
297+extern const char * const mi_lttng_context_type_perf_thread_counter;
298
299 /* String related to lttng_event_perf_counter_ctx */
300-const char * const mi_lttng_element_perf_counter_context;
301+extern const char * const mi_lttng_element_perf_counter_context;
302
303 /* Strings related to pid */
304-const char * const mi_lttng_element_pids;
305-const char * const mi_lttng_element_pid;
306-const char * const mi_lttng_element_pid_id;
307+extern const char * const mi_lttng_element_pids;
308+extern const char * const mi_lttng_element_pid;
309+extern const char * const mi_lttng_element_pid_id;
310
311 /* Strings related to save command */
312-const char * const mi_lttng_element_save;
313+extern const char * const mi_lttng_element_save;
314
315 /* Strings related to load command */
316-const char * const mi_lttng_element_load;
317+extern const char * const mi_lttng_element_load;
318
319 /* General element of mi_lttng */
320-const char * const mi_lttng_element_empty;
321-const char * const mi_lttng_element_id;
322-const char * const mi_lttng_element_nowrite;
323-const char * const mi_lttng_element_success;
324-const char * const mi_lttng_element_type_enum;
325-const char * const mi_lttng_element_type_float;
326-const char * const mi_lttng_element_type_integer;
327-const char * const mi_lttng_element_type_other;
328-const char * const mi_lttng_element_type_string;
329+extern const char * const mi_lttng_element_empty;
330+extern const char * const mi_lttng_element_id;
331+extern const char * const mi_lttng_element_nowrite;
332+extern const char * const mi_lttng_element_success;
333+extern const char * const mi_lttng_element_type_enum;
334+extern const char * const mi_lttng_element_type_float;
335+extern const char * const mi_lttng_element_type_integer;
336+extern const char * const mi_lttng_element_type_other;
337+extern const char * const mi_lttng_element_type_string;
338
339 /* String related to loglevel */
340-const char * const mi_lttng_loglevel_str_alert;
341-const char * const mi_lttng_loglevel_str_crit;
342-const char * const mi_lttng_loglevel_str_debug;
343-const char * const mi_lttng_loglevel_str_debug_function;
344-const char * const mi_lttng_loglevel_str_debug_line;
345-const char * const mi_lttng_loglevel_str_debug_module;
346-const char * const mi_lttng_loglevel_str_debug_process;
347-const char * const mi_lttng_loglevel_str_debug_program;
348-const char * const mi_lttng_loglevel_str_debug_system;
349-const char * const mi_lttng_loglevel_str_debug_unit;
350-const char * const mi_lttng_loglevel_str_emerg;
351-const char * const mi_lttng_loglevel_str_err;
352-const char * const mi_lttng_loglevel_str_info;
353-const char * const mi_lttng_loglevel_str_notice;
354-const char * const mi_lttng_loglevel_str_unknown;
355-const char * const mi_lttng_loglevel_str_warning;
356+extern const char * const mi_lttng_loglevel_str_alert;
357+extern const char * const mi_lttng_loglevel_str_crit;
358+extern const char * const mi_lttng_loglevel_str_debug;
359+extern const char * const mi_lttng_loglevel_str_debug_function;
360+extern const char * const mi_lttng_loglevel_str_debug_line;
361+extern const char * const mi_lttng_loglevel_str_debug_module;
362+extern const char * const mi_lttng_loglevel_str_debug_process;
363+extern const char * const mi_lttng_loglevel_str_debug_program;
364+extern const char * const mi_lttng_loglevel_str_debug_system;
365+extern const char * const mi_lttng_loglevel_str_debug_unit;
366+extern const char * const mi_lttng_loglevel_str_emerg;
367+extern const char * const mi_lttng_loglevel_str_err;
368+extern const char * const mi_lttng_loglevel_str_info;
369+extern const char * const mi_lttng_loglevel_str_notice;
370+extern const char * const mi_lttng_loglevel_str_unknown;
371+extern const char * const mi_lttng_loglevel_str_warning;
372
373 /* String related to loglevel JUL */
374-const char * const mi_lttng_loglevel_str_jul_all;
375-const char * const mi_lttng_loglevel_str_jul_config;
376-const char * const mi_lttng_loglevel_str_jul_fine;
377-const char * const mi_lttng_loglevel_str_jul_finer;
378-const char * const mi_lttng_loglevel_str_jul_finest;
379-const char * const mi_lttng_loglevel_str_jul_info;
380-const char * const mi_lttng_loglevel_str_jul_off;
381-const char * const mi_lttng_loglevel_str_jul_severe;
382-const char * const mi_lttng_loglevel_str_jul_warning;
383+extern const char * const mi_lttng_loglevel_str_jul_all;
384+extern const char * const mi_lttng_loglevel_str_jul_config;
385+extern const char * const mi_lttng_loglevel_str_jul_fine;
386+extern const char * const mi_lttng_loglevel_str_jul_finer;
387+extern const char * const mi_lttng_loglevel_str_jul_finest;
388+extern const char * const mi_lttng_loglevel_str_jul_info;
389+extern const char * const mi_lttng_loglevel_str_jul_off;
390+extern const char * const mi_lttng_loglevel_str_jul_severe;
391+extern const char * const mi_lttng_loglevel_str_jul_warning;
392
393 /* String related to loglevel Log4j */
394-const char * const mi_lttng_loglevel_str_log4j_off;
395-const char * const mi_lttng_loglevel_str_log4j_fatal;
396-const char * const mi_lttng_loglevel_str_log4j_error;
397-const char * const mi_lttng_loglevel_str_log4j_warn;
398-const char * const mi_lttng_loglevel_str_log4j_info;
399-const char * const mi_lttng_loglevel_str_log4j_debug;
400-const char * const mi_lttng_loglevel_str_log4j_trace;
401-const char * const mi_lttng_loglevel_str_log4j_all;
402+extern const char * const mi_lttng_loglevel_str_log4j_off;
403+extern const char * const mi_lttng_loglevel_str_log4j_fatal;
404+extern const char * const mi_lttng_loglevel_str_log4j_error;
405+extern const char * const mi_lttng_loglevel_str_log4j_warn;
406+extern const char * const mi_lttng_loglevel_str_log4j_info;
407+extern const char * const mi_lttng_loglevel_str_log4j_debug;
408+extern const char * const mi_lttng_loglevel_str_log4j_trace;
409+extern const char * const mi_lttng_loglevel_str_log4j_all;
410
411 /* String related to loglevel type */
412-const char * const mi_lttng_loglevel_type_all;
413-const char * const mi_lttng_loglevel_type_range;
414-const char * const mi_lttng_loglevel_type_single;
415-const char * const mi_lttng_loglevel_type_unknown;
416+extern const char * const mi_lttng_loglevel_type_all;
417+extern const char * const mi_lttng_loglevel_type_range;
418+extern const char * const mi_lttng_loglevel_type_single;
419+extern const char * const mi_lttng_loglevel_type_unknown;
420
421 /* Sting related to lttng_calibrate */
422-const char * const mi_lttng_element_calibrate;
423-const char * const mi_lttng_element_calibrate_function;
424+extern const char * const mi_lttng_element_calibrate;
425+extern const char * const mi_lttng_element_calibrate_function;
426
427 /* String related to a lttng_snapshot */
428-const char * const mi_lttng_element_snapshot_ctrl_url;
429-const char * const mi_lttng_element_snapshot_data_url;
430-const char * const mi_lttng_element_snapshot_max_size;
431-const char * const mi_lttng_element_snapshot_n_ptr;
432-const char * const mi_lttng_element_snapshot_session_name;
433-const char * const mi_lttng_element_snapshots;
434+extern const char * const mi_lttng_element_snapshot_ctrl_url;
435+extern const char * const mi_lttng_element_snapshot_data_url;
436+extern const char * const mi_lttng_element_snapshot_max_size;
437+extern const char * const mi_lttng_element_snapshot_n_ptr;
438+extern const char * const mi_lttng_element_snapshot_session_name;
439+extern const char * const mi_lttng_element_snapshots;
440
441 /* Utility string function */
442 const char *mi_lttng_loglevel_string(int value, enum lttng_domain_type domain);
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb b/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
index f0969b5241..8cc4220c20 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.6.0.bb
@@ -25,6 +25,7 @@ PACKAGECONFIG[kmod] = "--enable-kmod, --disable-kmod, kmod"
25 25
26SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.6 \ 26SRC_URI = "git://git.lttng.org/lttng-tools.git;branch=stable-2.6 \
27 file://runtest-2.4.0.patch \ 27 file://runtest-2.4.0.patch \
28 file://extern-decls.patch \
28 file://run-ptest \ 29 file://run-ptest \
29 " 30 "
30 31