On Sat, Dec 18 2021, Anil Madhavapeddy <a...@recoil.org> wrote: > On 17 Dec 2021, at 17:48, Daniel Dickman <didick...@gmail.com> wrote: >> >> >> >>> On Dec 17, 2021, at 12:21 PM, Jeremie Courreges-Anglas <j...@wxcvbn.org> >>> wrote: >>> >>> On Sat, Dec 04 2021, Daniel Dickman <didick...@gmail.com> wrote: >>>> See below for a diff for ocaml to the 4.12.x series. Only a few changes >>>> were needed for this update and they're already in the tree: >>>> - mldonkey and unison 2.4.x needed a small diff >>>> - dune needed to be updated to 2.7.0 >>>> >>>> All ocaml ports were built successfully on amd64 (except coccinelle which >>>> is still broken). >>> >>> This update doesn't package on sparc64 and riscv64 - and likely all >>> non-native archs. The diff below fixes this for me, and seems to be >>> correct. IIUC the compilation of those two files is hooked from ASMCOMP >>> in ./compilerlibs/Makefile.compilerlibs. >>> >>> ok? >>> >> >> Ok daniel@ and thank you for testing this! > > This looks right to me.
Thanks for confirming. > Although if you have RISC-V hardware, you could > also try adding riscv64 to OCAML_NATIVE_ARCHS and > OCAML_NATIVE_DYNLINK_ARCHS in arch-defines.mk and seeing how > that gets along. Most things should just work with native riscv OCaml. I think I had already tried with 4.11 and it fails with assembly errors. Some people think that the LLVM assembler could behave more usefully here: https://bugs.llvm.org/show_bug.cgi?id=47910 https://reviews.llvm.org/D95375 Assembly file: https://wxcvbn.org/~jca/tmp/camlasm8395ff.s.gz Error messages: --8<-- ../boot/ocamlrun ../ocamlopt -strict-sequence -absname -w +a-4-9-41-42-44-45-48 -g -warn-error A -bin-annot -nostdlib -principal -safe-string -strict-formats -nolabels -no-alias-deps \ -o stdlib__moreLabels.cmx -c moreLabels.ml /tmp/camlasm8395ff.s:20693:2: error: fixup value out of range bltu s10, s11, .L2647 ^ /tmp/camlasm8395ff.s:20867:2: error: fixup value out of range bge a5, s5, .L2596 ^ /tmp/camlasm8395ff.s:21011:2: error: fixup value out of range bltu s10, s11, .L2652 ^ /tmp/camlasm8395ff.s:21092:2: error: fixup value out of range bltu s10, s11, .L2660 ^ /tmp/camlasm8395ff.s:21134:2: error: fixup value out of range bltu s10, s11, .L2664 ^ /tmp/camlasm8395ff.s:21183:2: error: fixup value out of range bltu s10, s11, .L2669 ^ /tmp/camlasm8395ff.s:21202:2: error: fixup value out of range bltu s10, s11, .L2672 ^ /tmp/camlasm8395ff.s:21238:2: error: fixup value out of range bltu s10, s11, .L2676 ^ /tmp/camlasm8395ff.s:21257:2: error: fixup value out of range bltu s10, s11, .L2679 ^ /tmp/camlasm8395ff.s:21326:2: error: fixup value out of range bltu s10, s11, .L2685 ^ /tmp/camlasm8395ff.s:21354:2: error: fixup value out of range bltu s10, s11, .L2689 ^ /tmp/camlasm8395ff.s:21424:2: error: fixup value out of range bltu s10, s11, .L2695 ^ /tmp/camlasm8395ff.s:21466:2: error: fixup value out of range bltu s10, s11, .L2699 ^ /tmp/camlasm8395ff.s:21494:2: error: fixup value out of range bltu s10, s11, .L2703 ^ /tmp/camlasm8395ff.s:21583:2: error: fixup value out of range bltu s10, s11, .L2710 ^ /tmp/camlasm8395ff.s:21603:2: error: fixup value out of range bltu s10, s11, .L2713 ^ /tmp/camlasm8395ff.s:21633:2: error: fixup value out of range bltu s10, s11, .L2716 ^ /tmp/camlasm8395ff.s:21652:2: error: fixup value out of range bltu s10, s11, .L2719 ^ /tmp/camlasm8395ff.s:21688:2: error: fixup value out of range bltu s10, s11, .L2723 ^ /tmp/camlasm8395ff.s:21707:2: error: fixup value out of range bltu s10, s11, .L2726 ^ File "/usr/ports/pobj/ocaml-4.12.1/ocaml-4.12.1/stdlib/camlinternalFormat.ml", line 1: Error: Assembler error, input left in file /tmp/camlasm8395ff.s gmake[4]: *** [Makefile:213: camlinternalFormat.cmx] Error 2 gmake[4]: Leaving directory '/usr/ports/pobj/ocaml-4.12.1/ocaml-4.12.1/stdlib' gmake[3]: *** [Makefile:785: libraryopt] Error 2 gmake[3]: Leaving directory '/usr/ports/pobj/ocaml-4.12.1/ocaml-4.12.1' gmake[2]: *** [Makefile:199: opt-core] Error 2 gmake[2]: Leaving directory '/usr/ports/pobj/ocaml-4.12.1/ocaml-4.12.1' gmake[1]: *** [Makefile:215: opt.opt] Error 2 gmake[1]: Leaving directory '/usr/ports/pobj/ocaml-4.12.1/ocaml-4.12.1' gmake: *** [Makefile:275: world.opt] Error 2 *** Error 2 in . (/usr/ports/infrastructure/mk/bsd.port.mk:2948 '/usr/ports/pobj/ocaml-4.12.1/.build_done': @cd /usr/ports/pobj/ocaml-4.12.1...) *** Error 2 in /usr/ports/lang/ocaml (/usr/ports/infrastructure/mk/bsd.port.mk:2594 'all': @lock=ocaml-4.12.1p0; export _LOCKS_HELD=" ocaml...) -->8-- -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE