Compile ocaml natives with -no-pie flag as a workaround for some problem with dynamic loader. ocaml builds fine on ppc64le, but when I try to use ocamlc, I'm getting a segfault. Gdb backtrace shows: #0 0x00003fffb7fad710 in do_relocs (dso=0x3fffb7ff26a0 , rel=0x200ab4b8, rel_size=2495088, stride=3) at ldso/dynlink.c:379 #1 0x00003fffb7fae1ec in reloc_all (p=0x3fffb7ff26a0 ) at ldso/dynlink.c:1195 #2 0x00003fffb7fafc94 in __dls3 (sp=) at ldso/dynlink.c:1638 0000003 0x00003fffb7faf3d4 in __dls2 (base=, sp=0x3ffffffffba0) at ldso/dynlink.c:1424 0000004 0x00003fffb7facd2c in _dlstart_c (sp=, dynv=) at ldso/dlstart.c:147 0000005 0x00003fffb7fb1104 in _dlstart () from /lib/ld-musl-powerpc64le.so.1 Upstream-Issue: https://caml.inria.fr/mantis/view.php?id=7562. --- a/configure +++ b/configure @@ -867,6 +867,9 @@ sharedcccompopts="-fPIC" mksharedlib="$cc -shared" ldflags="$ldflags -Wl,-E" + case "$target" in + powerpc64le*) ldflags="$ldflags -no-pie" + esac rpath="-Wl,-rpath," mksharedlibrpath="-Wl,-rpath," natdynlinkopts="-Wl,-E"