aports/community/ocaml/fix-segfault-in-ppc64le.patch
Roberto Oliveira 529c9fdc1b community/ocaml: fix segfault in ppc64le and enable build
Since ocaml 4.04, ocaml commands start to point to native-compiled instead
of the byte-code compiled, e.g. ocamlc points to the native-compiled
ocamlc.opt.

This patch adds -no-pie to all ocaml compiled to native code (for ppc64le),
fixing the segfault problem that was happening.
2017-06-30 21:51:47 +00:00

13 lines
392 B
Diff

--- ocaml-4.04.2/configure
+++ ocaml-4.04.2/configure
@@ -703,6 +703,9 @@
sharedcccompopts="-fPIC"
mksharedlib="$bytecc -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
+ case "$target" in
+ powerpc64le*) bytecclinkopts="$bytecclinkopts -no-pie"
+ esac
byteccrpath="-Wl,-rpath,"
mksharedlibrpath="-Wl,-rpath,"
natdynlinkopts="-Wl,-E"