projects/guix·blob python-team · refs

41 lines · 1.4 KiB

1Avoid multiply-defined symbols that lead to link errors such as:
2
3 ld: libcamlrund.a(backtrace_bd.o):/tmp/guix-build-ocaml-4.09.0.drv-0/ocaml-4.09.0/runtime/backtrace.c:31: multiple definition of `caml_debug_info'; libcamlrund.a(backtrace_byt_bd.o):/tmp/guix-build-ocaml-4.09.0.drv-0/ocaml-4.09.0/runtime/backtrace_byt.c:47: first defined here
4
5diff --git a/runtime/backtrace.c b/runtime/backtrace.c
6index a3c2c08..f57c81c 100644
7--- a/runtime/backtrace.c
8+++ b/runtime/backtrace.c
9@@ -28,7 +28,7 @@
10 #include "caml/fail.h"
11
12 /* The table of debug information fragments */
13-struct ext_table caml_debug_info;
14+static struct ext_table caml_debug_info;
15
16 CAMLexport int32_t caml_backtrace_active = 0;
17 CAMLexport int32_t caml_backtrace_pos = 0;
18diff --git a/runtime/backtrace_byt.c b/runtime/backtrace_byt.c
19index b913dac..b5ec926 100644
20--- a/runtime/backtrace_byt.c
21+++ b/runtime/backtrace_byt.c
22@@ -44,7 +44,7 @@
23 #include "caml/backtrace_prim.h"
24
25 /* The table of debug information fragments */
26-struct ext_table caml_debug_info;
27+static struct ext_table caml_debug_info;
28
29 CAMLexport char_os * caml_cds_file = NULL;
30
31diff --git a/runtime/startup_nat.c b/runtime/startup_nat.c
32index b4e6bc4..7eca5fa 100644
33--- a/runtime/startup_nat.c
34+++ b/runtime/startup_nat.c
35@@ -44,6 +44,5 @@
36 #endif
37
38 extern int caml_parser_trace;
39-CAMLexport header_t caml_atom_table[256];
40 char * caml_code_area_start, * caml_code_area_end;
41 struct ext_table caml_code_fragments_table;