mirror of
https://git.FreeBSD.org/ports.git
synced 2025-01-22 08:58:47 +00:00
lang/ocaml: Fix build with llvm 11
Fix the build of lang/ocaml with llvm 11. There are two issues, first off, te issue with -fno-common, which is default with llvm 11. This is fixed by pulling in a modified patch from upstream, as well as local patches. Secondly, there's a problem with how asm sections are handled, patch this locally. Thanks to dim@ for help with this. MFH: 2020Q3 (implicit, -fno-common fixes, ok by joenum)
This commit is contained in:
parent
727e797e30
commit
d6dff4bed5
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=545786
48
lang/ocaml/files/patch-675e98a2.c
Normal file
48
lang/ocaml/files/patch-675e98a2.c
Normal file
@ -0,0 +1,48 @@
|
||||
--- asmrun/startup.c.orig 2017-07-13 08:56:44 UTC
|
||||
+++ asmrun/startup.c
|
||||
@@ -44,8 +44,8 @@
|
||||
#endif
|
||||
|
||||
extern int caml_parser_trace;
|
||||
-CAMLexport header_t caml_atom_table[256];
|
||||
char * caml_code_area_start, * caml_code_area_end;
|
||||
+struct ext_table caml_code_fragments_table;
|
||||
|
||||
/* Initialize the atom table and the static data and code area limits. */
|
||||
|
||||
--- byterun/caml/intext.h.orig 2017-07-13 08:56:44 UTC
|
||||
+++ byterun/caml/intext.h
|
||||
@@ -196,7 +196,7 @@ struct code_fragment {
|
||||
|
||||
CAMLextern struct code_fragment * caml_extern_find_code(char *addr);
|
||||
|
||||
-struct ext_table caml_code_fragments_table;
|
||||
+extern struct ext_table caml_code_fragments_table;
|
||||
|
||||
#endif /* CAML_INTERNALS */
|
||||
|
||||
--- byterun/caml/major_gc.h.orig 2017-07-13 08:56:44 UTC
|
||||
+++ byterun/caml/major_gc.h
|
||||
@@ -64,9 +64,9 @@ extern uintnat total_heap_size;
|
||||
extern char *caml_gc_sweep_hp;
|
||||
|
||||
extern int caml_major_window;
|
||||
-double caml_major_ring[Max_major_window];
|
||||
-int caml_major_ring_index;
|
||||
-double caml_major_work_credit;
|
||||
+extern double caml_major_ring[Max_major_window];
|
||||
+extern int caml_major_ring_index;
|
||||
+extern double caml_major_work_credit;
|
||||
extern double caml_gc_clock;
|
||||
|
||||
/* [caml_major_gc_hook] is called just between the end of the mark
|
||||
--- byterun/fix_code.c.orig 2017-07-13 08:56:44 UTC
|
||||
+++ byterun/fix_code.c
|
||||
@@ -38,6 +38,7 @@
|
||||
code_t caml_start_code;
|
||||
asize_t caml_code_size;
|
||||
unsigned char * caml_saved_code;
|
||||
+struct ext_table caml_code_fragments_table;
|
||||
|
||||
/* Read the main bytecode block from a file */
|
||||
|
11
lang/ocaml/files/patch-asmrun_amd64.S
Normal file
11
lang/ocaml/files/patch-asmrun_amd64.S
Normal file
@ -0,0 +1,11 @@
|
||||
--- asmrun/amd64.S.orig 2020-08-22 20:02:29 UTC
|
||||
+++ asmrun/amd64.S
|
||||
@@ -725,7 +725,7 @@ G(caml_system__spacetime_shapes):
|
||||
#elif defined(SYS_mingw64) || defined(SYS_cygwin)
|
||||
.section .rdata,"dr"
|
||||
#else
|
||||
- .section .rodata.cst8,"a",@progbits
|
||||
+ .section .rodata.cst8,"aM",@progbits,8
|
||||
#endif
|
||||
.globl G(caml_negf_mask)
|
||||
.align SIXTEEN_ALIGN
|
12
lang/ocaml/files/patch-byterun_backtrace.c
Normal file
12
lang/ocaml/files/patch-byterun_backtrace.c
Normal file
@ -0,0 +1,12 @@
|
||||
--- byterun/backtrace.c.orig 2020-08-22 14:46:44 UTC
|
||||
+++ byterun/backtrace.c
|
||||
@@ -27,9 +27,6 @@
|
||||
#include "caml/backtrace_prim.h"
|
||||
#include "caml/fail.h"
|
||||
|
||||
-/* The table of debug information fragments */
|
||||
-struct ext_table caml_debug_info;
|
||||
-
|
||||
CAMLexport int32_t caml_backtrace_active = 0;
|
||||
CAMLexport int32_t caml_backtrace_pos = 0;
|
||||
CAMLexport backtrace_slot * caml_backtrace_buffer = NULL;
|
Loading…
Reference in New Issue
Block a user