Skip to content

Commit

Permalink
Fix cinaps on arm32
Browse files Browse the repository at this point in the history
Closes ocaml#4069

When `dynlink:false` is passed, the ARM backend emits MOVW/MOVT
instructions which have relocations incompatible with PIC code.
This is similar to ocaml#2527 (ocaml issue: ocaml/ocaml#8867).

Signed-off-by: Etienne Millon <me@emillon.org>
  • Loading branch information
emillon committed Jan 5, 2021
1 parent bbbbc67 commit 8212983
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ Unreleased
- Configurator: fix a bug introduced in 2.6.0 where the configurator V1 API doesn't work at
all when used outside of dune. (#4046, @aalekseyev)

- Fix cinaps on arm32 by not passing `-nodynlink` (#4081, fixes #4069, @emillon)

2.7.1 (2/09/2020)
-----------------

Expand Down
2 changes: 1 addition & 1 deletion src/dune_rules/cinaps.ml
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ let gen_rules sctx t ~dir ~scope =
~requires_compile:(Lib.Compile.direct_requires compile_info)
~requires_link:(Lib.Compile.requires_link compile_info)
~flags:(Ocaml_flags.of_list [ "-w"; "-24" ])
~js_of_ocaml:None ~dynlink:false ~package:None
~js_of_ocaml:None ~dynlink:true ~package:None
in
Exe.build_and_link cctx
~program:{ name; main_module_name; loc }
Expand Down

0 comments on commit 8212983

Please sign in to comment.