diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-08 23:05:30 +0100 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-03-10 02:17:25 +0100 |
commit | 6cca9ba40d61313fd59d34ff6138f8884a26ef51 (patch) | |
tree | c61423dc69ad7bfbf31c7a872473ac4ea016c7d8 /community/ocaml | |
parent | 500d952707ca2e8896377b44dea15cc3388ad6d5 (diff) | |
download | aports-6cca9ba40d61313fd59d34ff6138f8884a26ef51.tar.bz2 aports-6cca9ba40d61313fd59d34ff6138f8884a26ef51.tar.xz |
community/ocaml: upgrade to 4.06.0
Diffstat (limited to 'community/ocaml')
-rw-r--r-- | community/ocaml/010_all_execstacks.patch | 40 | ||||
-rw-r--r-- | community/ocaml/020_all_configure.patch | 51 | ||||
-rw-r--r-- | community/ocaml/050_all_objinfoldflags.patch | 13 | ||||
-rw-r--r-- | community/ocaml/APKBUILD | 14 | ||||
-rw-r--r-- | community/ocaml/fix-segfault-in-ppc64le.patch | 33 |
5 files changed, 30 insertions, 121 deletions
diff --git a/community/ocaml/010_all_execstacks.patch b/community/ocaml/010_all_execstacks.patch deleted file mode 100644 index 30cf23ec61..0000000000 --- a/community/ocaml/010_all_execstacks.patch +++ /dev/null @@ -1,40 +0,0 @@ -Fix the EXEC_STACK in ocaml compiled binaries (#153382) - -Index: ocaml-4.03.0+beta1/asmrun/sparc.S -=================================================================== ---- ocaml-4.03.0+beta1.orig/asmrun/sparc.S -+++ ocaml-4.03.0+beta1/asmrun/sparc.S -@@ -358,3 +358,8 @@ caml_system__frametable: - .type caml_raise_exception, #function - .type caml_system__frametable, #object - #endif -+ -+#ifdef __ELF__ -+.section .note.GNU-stack,"",%progbits -+#endif -+ -Index: ocaml-4.03.0+beta1/asmcomp/sparc/emit.mlp -=================================================================== ---- ocaml-4.03.0+beta1.orig/asmcomp/sparc/emit.mlp -+++ ocaml-4.03.0+beta1/asmcomp/sparc/emit.mlp -@@ -737,6 +737,12 @@ let data l = - ` .data\n`; - List.iter emit_item l - -+(* Mark stack as non executable *) -+let nx_stack() = -+ if Config.system = "linux" then -+ ` .section .note.GNU-stack,\"\",%progbits\n` -+ -+ - (* Beginning / end of an assembly file *) - - let begin_assembly() = -@@ -750,6 +756,7 @@ let begin_assembly() = - `{emit_symbol lbl_begin}:\n` - - let end_assembly() = -+ nx_stack(); - ` .text\n`; - let lbl_end = Compilenv.make_symbol (Some "code_end") in - ` .global {emit_symbol lbl_end}\n`; diff --git a/community/ocaml/020_all_configure.patch b/community/ocaml/020_all_configure.patch deleted file mode 100644 index 4505a987ec..0000000000 --- a/community/ocaml/020_all_configure.patch +++ /dev/null @@ -1,51 +0,0 @@ -The configure script doesn't inherit previous defined variables, -overwriting previous declarations of bytecccompopts, bytecclinkopts, -nativecccompopts and nativecclinkopts. Reported upstream as issue 0004267. - -Index: ocaml-4.03.0+beta1/configure -=================================================================== ---- ocaml-4.03.0+beta1.orig/configure -+++ ocaml-4.03.0+beta1/configure -@@ -290,7 +290,7 @@ esac - # Configure the bytecode compiler - - bytecc="$cc" --mkexe="\$(BYTECC)" -+mkexe="\$(BYTECC) \$(BYTECCLINKOPTS)" - mkexedebugflag="-g" - bytecccompopts="" - bytecclinkopts="" -@@ -1671,6 +1671,16 @@ fi - echo "X11_INCLUDES=$x11_include" >> Makefile - echo "X11_LINK=$x11_link" >> Makefile - -+bytecccompopts="$CFLAGS $bytecccompopts" -+bytecclinkopts="$LDFLAGS $bytecclinkopts" -+natdynlinkopts="$LDFLAGS $natdynlinkopts" -+nativeccrawlinkopts="$RAW_LDFLAGS $nativecclinkopts" -+nativecclinkopts="$LDFLAGS $nativecclinkopts" -+nativecccompopts="$CFLAGS $nativecccompopts" -+nativeccprofopts="$nativecccompopts" -+mksharedlib="$mksharedlib $LDFLAGS" -+mkmaindll="$mkmaindll $LDFLAGS" -+ - # Look for BFD library - - if sh ./hasgot -DPACKAGE=ocaml -i bfd.h && \ -@@ -1769,6 +1779,7 @@ echo "NATIVECC=$nativecc" >> Makefile - echo "NATIVECCCOMPOPTS=$nativecccompopts" >> Makefile - echo "NATIVECCPROFOPTS=$nativeccprofopts" >> Makefile - echo "NATIVECCLINKOPTS=$nativecclinkopts" >> Makefile -+echo "NATIVECCRAWLINKOPTS=$nativeccrawlinkopts" >> Makefile - echo "NATIVECCRPATH=$nativeccrpath" >> Makefile - echo "NATIVECCLIBS=$cclibs $dllib" >> Makefile - echo "ASM=$as" >> Makefile -@@ -1780,7 +1791,7 @@ echo "OTHERLIBRARIES=$otherlibraries" >> - echo "CC_PROFILE=$cc_profile" >> Makefile - echo "SYSTHREAD_SUPPORT=$systhread_support" >> Makefile - echo "PARTIALLD=$partialld" >> Makefile --echo "PACKLD=\$(PARTIALLD) \$(NATIVECCLINKOPTS) -o " \ -+echo "PACKLD=\$(PARTIALLD) \$(NATIVECCRAWLINKOPTS) -o " \ - | sed -e 's/ $/\\ /' >> Makefile - echo "DLLCCCOMPOPTS=$dllccompopts" >> Makefile - echo "IFLEXDIR=$iflexdir" >> Makefile diff --git a/community/ocaml/050_all_objinfoldflags.patch b/community/ocaml/050_all_objinfoldflags.patch deleted file mode 100644 index e7b2fc170f..0000000000 --- a/community/ocaml/050_all_objinfoldflags.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: ocaml-4.03.0+beta1/tools/Makefile.shared -=================================================================== ---- ocaml-4.03.0+beta1.orig/tools/Makefile.shared -+++ ocaml-4.03.0+beta1/tools/Makefile.shared -@@ -273,7 +273,7 @@ CCOUT = -o $(EMPTY) - endif - - objinfo_helper$(EXE): objinfo_helper.c ../config/s.h -- $(BYTECC) $(CCOUT)objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \ -+ $(MKEXE) $(CCOUT)objinfo_helper$(EXE) $(BYTECCCOMPOPTS) \ - $(DEF_SYMBOL_PREFIX) $(LIBBFD_INCLUDE) objinfo_helper.c $(LIBBFD_LINK) - - OBJINFO=../compilerlibs/ocamlcommon.cma \ diff --git a/community/ocaml/APKBUILD b/community/ocaml/APKBUILD index 17d3931897..85af8db40e 100644 --- a/community/ocaml/APKBUILD +++ b/community/ocaml/APKBUILD @@ -1,8 +1,8 @@ # Contributor: Borys Zhukov <mp5@mp5.im> # Maintainer: Borys Zhukov <mp5@mp5.im> pkgname=ocaml -pkgver=4.04.2 -pkgrel=2 +pkgver=4.06.1 +pkgrel=0 pkgdesc="Main implementation of the Caml programming language" url="http://ocaml.org/" arch="all !x86 !armhf !s390x" @@ -12,9 +12,6 @@ depends="ncurses-dev" options="textrels" subpackages="$pkgname-doc" source="http://caml.inria.fr/pub/distrib/ocaml-${pkgver%.*}/$pkgname-$pkgver.tar.gz - 010_all_execstacks.patch - 020_all_configure.patch - 050_all_objinfoldflags.patch fix-mcontext-fields.patch fix-segfault-in-ppc64le.patch " @@ -57,9 +54,6 @@ package() { find "$pkgdir"/usr/lib/ocaml -name \*.ml -delete } -sha512sums="c02e9353e8e62154ca683027c005154a7f280034d1ec9184ee52286d4a41852ba70f4ec976c01e07720f3c75e949da049eafc553e7a35ebaa65136e29ab248f5 ocaml-4.04.2.tar.gz -71ac807fb1173863b9dcf8e5fb4e651e0155d6cd0e4b327f5457b83fc09e1b5fbe34150c5d8ccd24f0faff1a8419f5ed8310aa60af1f38c2766ccc37dc6c3835 010_all_execstacks.patch -286758402517a1345556d374b0c3fc49eb93f1ec2bb9ccd2ffe1cc043f59d93b154f68eb9ff410020a15d3d8f148b27f249b7f97954b0e8a080cdd32d6014b4a 020_all_configure.patch -61d9cae6c8be7c16ed4aa6fafc533e2879caadbbe0e023775c1d735c0e54e66e94b9ffab8dc0b0b12c19ccf5c389e05f62af822014d202ae54c52943a0639753 050_all_objinfoldflags.patch +sha512sums="42560874ce363212fa4e862138d7260113bc8dff8b39c040332bbd9b039ba938788344ba8ce63ffc0a251bf21a6e493f3c1e505b6f51db6fec4d21578921060e ocaml-4.06.1.tar.gz 75c67e143a4a05b334bdebbad48ded1e04d383d8ea9b747df2633a5af96b1115b502510faf57753c71bbac38fbc9d9746b167861a63b2fd295901db0d22ea317 fix-mcontext-fields.patch -87e1c7dff0d550aa9855ec5c22226f7d6d3411256eef250bf985c1ef42089610ca6c3dd483c51c4edf656ebfc1728580b933c02f3043159ec01411e6f54e5a88 fix-segfault-in-ppc64le.patch" +b2cef41400b31c1dcfd206c1534827f7b33b0afd6234b26fb95cf15c092affa85c27a615c14ece254ec326430f31b58ca70b9cc23a84ebf8baac2624bd5b0a71 fix-segfault-in-ppc64le.patch" 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" |