diff options
Diffstat (limited to 'community/ocaml/fix-segfault-in-ppc64le.patch')
-rw-r--r-- | community/ocaml/fix-segfault-in-ppc64le.patch | 33 |
1 files changed, 26 insertions, 7 deletions
diff --git a/community/ocaml/fix-segfault-in-ppc64le.patch b/community/ocaml/fix-segfault-in-ppc64le.patch index 369f448b95..81c837079c 100644 --- a/community/ocaml/fix-segfault-in-ppc64le.patch +++ b/community/ocaml/fix-segfault-in-ppc64le.patch @@ -1,12 +1,31 @@ ---- ocaml-4.04.2/configure -+++ ocaml-4.04.2/configure -@@ -703,6 +703,9 @@ +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 <app>, rel=0x200ab4b8, rel_size=2495088, + stride=3) at ldso/dynlink.c:379 + #1 0x00003fffb7fae1ec in reloc_all (p=0x3fffb7ff26a0 <app>) at ldso/dynlink.c:1195 + #2 0x00003fffb7fafc94 in __dls3 (sp=<optimized out>) at ldso/dynlink.c:1638 + 0000003 0x00003fffb7faf3d4 in __dls2 (base=<optimized out>, sp=0x3ffffffffba0) at ldso/dynlink.c:1424 + 0000004 0x00003fffb7facd2c in _dlstart_c (sp=<optimized out>, dynv=<optimized out>) + 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="$bytecc -shared" - bytecclinkopts="$bytecclinkopts -Wl,-E" + mksharedlib="$cc -shared" + ldflags="$ldflags -Wl,-E" + case "$target" in -+ powerpc64le*) bytecclinkopts="$bytecclinkopts -no-pie" ++ powerpc64le*) ldflags="$ldflags -no-pie" + esac - byteccrpath="-Wl,-rpath," + rpath="-Wl,-rpath," mksharedlibrpath="-Wl,-rpath," natdynlinkopts="-Wl,-E" |