[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: 06b36e0f648bef1acf5ad451d9eebe3e04df2120 Author: Mark Wright gentoo org> AuthorDate: Tue Mar 29 12:08:33 2022 + Commit: Mark Wright gentoo org> CommitDate: Tue Mar 29 12:08:33 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=06b36e0f dev-lang/ocaml: Bump to 4.14.0, fix clang build. See: https://github.com/ocaml/ocaml/pull/10774 Closes: https://bugs.gentoo.org/729566 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Mark Wright gentoo.org> dev-lang/ocaml/Manifest | 1 + dev-lang/ocaml/files/ocaml-4.14.0-clang.patch | 132 ++ dev-lang/ocaml/ocaml-4.14.0.ebuild| 103 3 files changed, 236 insertions(+) diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest index 9466e909f6b9..edc6337be4cb 100644 --- a/dev-lang/ocaml/Manifest +++ b/dev-lang/ocaml/Manifest @@ -7,4 +7,5 @@ DIST ocaml-4.10.2.tar.gz 4933135 BLAKE2B ec5e92adb23c28a254247182c79ab555fd82603 DIST ocaml-4.11.2.tar.gz 5075323 BLAKE2B bdc503d9a8d0e39dd11060febcd0287657b460e50ed81e55578a3e778af990ca5d4ef9011753eee4e1a144da33eb76c95b1672dc99b76e65a2e107eee472fe06 SHA512 03d8a9f6e130142c121ff2eb3d54f584f1e7c8475f066a5803bb0edd2fa172ca06a56a3ec548b225f5c8b12112d7a68511b1e16f3ade075b5f02610d4247bbb3 DIST ocaml-4.12.1.tar.gz 5181696 BLAKE2B 9d21438e09b1a9680eabb65f5c78d9fe84459592ef7bb797a1933e5383f7b6d5cefffa8cdc184abc102417f5dbc0fca8ef624c9b560f89eaff6537544b5b395f SHA512 e942e5cf5530804690ec45c40936ad2acbb60e11279fc676e0f04181fe1855f84ee5c3cb9c337fc5d01f6ee0e7b2251a6c04f7de56d99c20bb62026dff6c5671 DIST ocaml-4.13.1.tar.gz 5323203 BLAKE2B f1dcb1601ebfa2a37351e3a466a7ca601518c2da403b01aeb182738a54d5887523ab554d747d6591cb09b07b417865e20907f7877117b2d2d069ef6c9edc0fae SHA512 da3434177438c852da53c0fda7bc2519adcda6384d97d45e44137ed0fd384ffb3da61958a7b51296edb3f88f5a5310ca71b6862f6d756aaa4012d1f54e5955f6 +DIST ocaml-4.14.0.tar.gz 5494844 BLAKE2B f2f9142a95722c7fc5fda205ea6b951939f7d285963b8aa14dc157ac10202ef9d00c7590beabdc97ed83548d61e5ef28b60a360f1a492420a54f4e26dfbf89f0 SHA512 3c5e5b9f00bb109dd99b5f7b0078cf8663d4247e548f3e601d6b2a55582e04bb20f6de85005c4cf2f78ae9aaa449f5ca6f2bab2f6ce83eeb3aeb386e3f2fcc32 DIST ocaml-patches-9.tar.bz2 1700 BLAKE2B 4e46b8fb490db28f815414e285f54e251394ea53e1d25c529bbea9f03e426fd19132b1e2c7c2be7d14983fceb4cad073d191b001f6da522fee4226371d4a2eca SHA512 cc19f9104fac69aecc5effa8cb772342e1fb61cdcd38ba0176efe04cf3d710b1c56d5178748f3bd29099af91fa684da432a8ef8d42de76dbd1b6954a255ea6c0 diff --git a/dev-lang/ocaml/files/ocaml-4.14.0-clang.patch b/dev-lang/ocaml/files/ocaml-4.14.0-clang.patch new file mode 100644 index ..cd3c042f2639 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.14.0-clang.patch @@ -0,0 +1,132 @@ +commit 28b553622bd0f168411d86ddcfba1adab0d87b92 +Author: Yawar Amin +Date: Mon Nov 15 22:40:43 2021 -0500 + +Fix ranlib error + +- Always pass ranlib one file argument at a time to avoid error 'Exactly + one archive should be specified' +- Call ranlib without cd'ing into the library's directory +- Use Makefile functionality to simplify recipes + +diff --git a/Makefile b/Makefile +index c2522c775..2e4e44faa 100644 +--- a/Makefile b/Makefile +@@ -549,6 +549,8 @@ else + endif + $(MAKE) -C tools installopt + ++LIBRARIES = $(addsuffix .$(A), ocamlcommon ocamlbytecomp ocamloptcomp) ++ + .PHONY: installoptopt + installoptopt: + $(INSTALL_PROG) ocamlc.opt$(EXE) "$(INSTALL_BINDIR)" +@@ -585,8 +587,11 @@ endif + ifeq "$(INSTALL_OCAMLNAT)" "true" + $(INSTALL_PROG) ocamlnat$(EXE) "$(INSTALL_BINDIR)" + endif +- cd "$(INSTALL_COMPLIBDIR)" && \ +- $(RANLIB) ocamlcommon.$(A) ocamlbytecomp.$(A) ocamloptcomp.$(A) ++# Some versions of ranlib do not support multiple archives ++ for library in $(LIBRARIES); \ ++ do \ ++$(RANLIB) "$(INSTALL_COMPLIBDIR)/$$library"; \ ++ done + + # Installation of the *.ml sources of compiler-libs + .PHONY: install-compiler-sources +diff --git a/otherlibs/Makefile.otherlibs.common b/otherlibs/Makefile.otherlibs.common +index 95ff4d58f..6a4451e47 100644 +--- a/otherlibs/Makefile.otherlibs.common b/otherlibs/Makefile.otherlibs.common +@@ -95,7 +95,7 @@ install:: + fi + ifneq "$(STUBSLIB)" "" + $(INSTALL_DATA) $(STUBSLIB) "$(INSTALL_LIBDIR)/" +- cd "$(INSTALL_LIBDIR)"; $(RANLIB) lib$(CLIBNAME).$(A) ++ $(RANLIB) "$(INSTALL_LIBDIR)/lib$(CLIBNAME).$(A)" + endif + + $(INSTALL_DATA) \ +@@ -104,7 +104,7 @@ endif + ifeq "$(INSTALL_SOURCE_ARTIFACTS)" "true" + $(INSTALL_DATA) \ + $(CMIFILES:.cmi=.mli) \ +- $(CMIFILES:.cmi=.cmti) \ ++ $(CMIFILES:.cmi=.cmti) \ + "$(INSTALL_LIBDIR)/" + endif + if test -n "$(HEADERS)"; then \ +@@ -115,7 +115,7 @@ installopt: + $(INSTALL_DATA) \ + $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) \ +
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: 687393e4bd5f9a0f9bf4a2f766ea1246f7b324f7 Author: Sam James gentoo org> AuthorDate: Sun Feb 27 06:25:12 2022 + Commit: Sam James gentoo org> CommitDate: Sun Feb 27 06:26:48 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=687393e4 dev-lang/ocaml: fix 4.11.2 src_prepare (missing patch) Accidentally cleaned up in 9e8369277b272b15f3dd1159fa18b71ec4431a77 (got confused by what I had/hadn't moved into patch tarballs, renamed accordingly now to avoid that in future). Once OCaml 4.09.0-r3 stabilisation is complete, we can cleanup all the obsolete patches from files/ and then everything is a bit clearer. Bug: https://bugs.gentoo.org/804498 Fixes: 9e8369277b272b15f3dd1159fa18b71ec4431a77 See: https://forums.gentoo.org/viewtopic-t-1147490.html Signed-off-by: Sam James gentoo.org> dev-lang/ocaml/files/ocaml-4.11.2-cflags.patch | 42 ++ dev-lang/ocaml/ocaml-4.11.2-r2.ebuild | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/dev-lang/ocaml/files/ocaml-4.11.2-cflags.patch b/dev-lang/ocaml/files/ocaml-4.11.2-cflags.patch new file mode 100644 index ..7adb1ea0768d --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.11.2-cflags.patch @@ -0,0 +1,42 @@ +--- a/runtime/Makefile b/runtime/Makefile +@@ -335,7 +335,7 @@ + # (without the extension, which is added by the macro) + define COMPILE_C_FILE + $(1).$(O): %.c +- $$(CC) -c $$(OC_CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$< ++ $$(CC) -c $$(OC_CFLAGS) $(CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$< + endef + + object_types := % %_b %_bd %_bi %_bpic %_n %_nd %_ni %_np %_npic +--- a/otherlibs/Makefile.otherlibs.common b/otherlibs/Makefile.otherlibs.common +@@ -138,4 +138,4 @@ + $(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $< + + .c.$(O): +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< +--- a/otherlibs/systhreads/Makefile b/otherlibs/systhreads/Makefile +@@ -102,10 +102,10 @@ + st_stubs_n.$(O): OC_CPPFLAGS += $(NATIVE_CPPFLAGS) + + st_stubs_b.$(O): st_stubs.c $(HEADER) +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< + + st_stubs_n.$(O): st_stubs.c $(HEADER) +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< + + partialclean: + rm -f *.cm* +--- a/Makefile.common.in b/Makefile.common.in +@@ -79,4 +79,4 @@ + # general (it supports both .o and .obj) + + %.$(O): %.c +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< diff --git a/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild b/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild index 666f43b938bd..00f3ebf026fd 100644 --- a/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild +++ b/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild @@ -25,7 +25,7 @@ QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs' PATCHES=( "${FILESDIR}"/${PN}-4.11.2-glibc-2.34.patch - "${FILESDIR}"/${PN}-4.10.2-cflags.patch + "${FILESDIR}"/${PN}-4.11.2-cflags.patch ) src_prepare() {
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: 85fb0c39c57aae6d7795b6ee1259d53ecfebd882 Author: Alfredo Tupone gentoo org> AuthorDate: Fri Feb 25 19:58:12 2022 + Commit: Alfredo Tupone gentoo org> CommitDate: Fri Feb 25 19:58:12 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=85fb0c39 dev-lang/ocaml: fix TEXTREL on 4.12.1 Closes: https://bugs.gentoo.org/825282 Package-Manager: Portage-3.0.30, Repoman-3.0.3 Signed-off-by: Alfredo Tupone gentoo.org> .../files/ocaml-4.12.1-fix-textrel-riscv.patch | 46 ++ dev-lang/ocaml/ocaml-4.12.1.ebuild | 1 + 2 files changed, 47 insertions(+) diff --git a/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch b/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch new file mode 100644 index ..5ba8582d3a65 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.12.1-fix-textrel-riscv.patch @@ -0,0 +1,46 @@ +From ddf99786f8229c8282905af5c7c74360d4f2fbd0 Mon Sep 17 00:00:00 2001 +From: Alex Fan +Date: Tue, 22 Feb 2022 19:28:30 +1100 +Subject: [PATCH] riscv: Generate frametable in data section to improve code + relocatability (#11042) + +Similar to what PowerPC and System-Z have done in commit 24980d3fd9848e281761ef2b8fe383e71261789b + +With this commit ocamlopt produces .so shared libraries and PIE relocatable +executables that contain no relocations in the text segment. + +Upstream status: merged in 4.14 and 5.x +--- + Changes| 5 + + asmcomp/riscv/emit.mlp | 2 +- + 2 files changed, 6 insertions(+), 1 deletion(-) + +diff --git a/Changes b/Changes +index 4898e9d69fc..2bec76daac6 100644 +--- a/Changes b/Changes +@@ -477,6 +477,11 @@ OCaml 4.14.0 + - #10907, #10959: Wrong type inferred from existential types + (Jacques Garrigue and Gabriel Scherer, report by @dyzsr, review by Leo White) + ++- #10688: Move frame descriptor table from `rodata` to `data` section on ++ RISC-V. Improves support for building DLLs and PIEs. In particular, this ++ applies to all binaries in distributions that build PIEs by default (eg ++ Gentoo and Alpine). ++ (Alex Fan, review by Gabriel Scherer) + + OCaml 4.13 maintenance branch + - +diff --git a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp +index 474a3c6857a..b36aa0ea38c 100644 +--- a/asmcomp/riscv/emit.mlp b/asmcomp/riscv/emit.mlp +@@ -645,7 +645,7 @@ let end_assembly() = + `{emit_symbol lbl_end}:\n`; + ` .quad 0\n`; + (* Emit the frame descriptors *) +- ` {emit_string rodata_space}\n`; ++ ` {emit_string data_space}\n`; (* not rodata because relocations inside *) + let lbl = Compilenv.make_symbol (Some "frametable") in + declare_global_data lbl; + `{emit_symbol lbl}:\n`; diff --git a/dev-lang/ocaml/ocaml-4.12.1.ebuild b/dev-lang/ocaml/ocaml-4.12.1.ebuild index fd6cae2fff2c..70049fcc0ae4 100644 --- a/dev-lang/ocaml/ocaml-4.12.1.ebuild +++ b/dev-lang/ocaml/ocaml-4.12.1.ebuild @@ -24,6 +24,7 @@ QA_FLAGS_IGNORED='/usr/lib.*/ocaml/bigarray.cmxs' PATCHES=( "${FILESDIR}"/${PN}-4.12.0-glibc-2.34.patch + "${FILESDIR}"/${P}-fix-textrel-riscv.patch ) src_prepare() {
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: baf24b7ec12927d0ac7e2b853cccec4e28fe Author: Sam James gentoo org> AuthorDate: Tue Feb 22 00:55:02 2022 + Commit: Sam James gentoo org> CommitDate: Tue Feb 22 00:55:41 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=baf2 dev-lang/ocaml: use tarball for 4.05/4.09/4.10 patches Signed-off-by: Sam James gentoo.org> dev-lang/ocaml/Manifest| 3 + dev-lang/ocaml/files/ocaml-4.05.0-glibc-2.34.patch | 186 dev-lang/ocaml/files/ocaml-4.09.0-glibc-2.34.patch | 178 --- dev-lang/ocaml/files/ocaml-4.10.2-glibc-2.34.patch | 239 - dev-lang/ocaml/ocaml-4.05.0-r9.ebuild | 7 +- dev-lang/ocaml/ocaml-4.09.0-r3.ebuild | 12 +- dev-lang/ocaml/ocaml-4.10.2-r3.ebuild | 11 +- 7 files changed, 18 insertions(+), 618 deletions(-) diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest index eda27fba03db..9466e909f6b9 100644 --- a/dev-lang/ocaml/Manifest +++ b/dev-lang/ocaml/Manifest @@ -1,5 +1,8 @@ +DIST ocaml-4.05.0-patches-1.tar.bz2 4009 BLAKE2B 052c3a6859a942f2993d0b06ab57ca8f7469650c096f20bff7ff7cf5c2842e8d5019d595a4eca0dc1a4e5feda2db8a831a6917b3b6d9f39166c8ae7af1e894e7 SHA512 b349e6613201d9400f736c5b2d0ede01e7e113524cbc698a71fb97cb1eb67f90af8c2fbd3fd8abeccf3193e317cdd8258aee328c3e078634385c21558619 DIST ocaml-4.05.0.tar.gz 4431750 BLAKE2B c2ab003a13e0a581ebd0e1c96eeb8a9baea9bfe6bee08823b0e4541819201ec109f1846e13fc1aefa51a001eefbb8f73320ba854d41975fc68cef41bc75b1ecc SHA512 9a060ae4b741e1687277403e5bdb8f6eda2e2ebf6c45f7c0149b66ea1213cb26d13febfbb3f11c12543e244cfdd053b786b09c4145e2348e5d89a7206f7de225 +DIST ocaml-4.09.0-patches-1.tar.bz2 3300 BLAKE2B ef710ea5ed5a243ae684f68b7f203ba454192c9f8f19c32697d336bf18cf2a0e8ea08df232b0fd8e2475a000758a5ba95b3794096ec7d0d1b292a715ab3de86f SHA512 94096b99fd58b32232e418c5736203f08ab3c1558154ed00d4290730bd4db849bc60dfae6160f344acce63bbb8eaceecee25cf836bb73fa419d7bbf4eac433f1 DIST ocaml-4.09.0.tar.gz 4838748 BLAKE2B 80f29d535c64bf2371b480217723ed20b2b21cfd93ce31366a7b91e7ddffdf68db4e88d085288b7e21efee567a13f42ecff24c3a0115507b006acf844239cefd SHA512 dc0271e591bf929b751705835790949a9d741e12d085c8b207c3689b5838a02ea8de80da8b2605d2e6744f2f541b0d1694ffafff9509e99ce01f3a391f6ef2ae +DIST ocaml-4.10.2-patches-1.tar.bz2 3180 BLAKE2B 474471e10c4525e4da730fcf8602fddf5209f7d8eb15bd76894ed2bc22213a6e61aa7f52b1b67dff6c8bf04eac7d759ada28f1783c83a075cc65e7e5caadc715 SHA512 1456f90c0c833461eb9d1c140ba1a7358aa9351f6303e83b0e19bb8688dcb17bdad211f4cec1281a47180bbdddcfdbf44367b47a6b301d2ea41fa9d926bd03a5 DIST ocaml-4.10.2.tar.gz 4933135 BLAKE2B ec5e92adb23c28a254247182c79ab555fd82603e02f24799049b8057abf869d18234302408c8ae89b9997a2b210ed6965e45c2c03e4f0cab34262ad3f6ebb528 SHA512 1dd827da07f01e815fd74dd7ee84db0900f24782f8f7fd426e2d71b9fb03c7b8045f22e018120a0446c362315751365d1bd8c1724edef2b182394e76eb0a07b2 DIST ocaml-4.11.2.tar.gz 5075323 BLAKE2B bdc503d9a8d0e39dd11060febcd0287657b460e50ed81e55578a3e778af990ca5d4ef9011753eee4e1a144da33eb76c95b1672dc99b76e65a2e107eee472fe06 SHA512 03d8a9f6e130142c121ff2eb3d54f584f1e7c8475f066a5803bb0edd2fa172ca06a56a3ec548b225f5c8b12112d7a68511b1e16f3ade075b5f02610d4247bbb3 DIST ocaml-4.12.1.tar.gz 5181696 BLAKE2B 9d21438e09b1a9680eabb65f5c78d9fe84459592ef7bb797a1933e5383f7b6d5cefffa8cdc184abc102417f5dbc0fca8ef624c9b560f89eaff6537544b5b395f SHA512 e942e5cf5530804690ec45c40936ad2acbb60e11279fc676e0f04181fe1855f84ee5c3cb9c337fc5d01f6ee0e7b2251a6c04f7de56d99c20bb62026dff6c5671 diff --git a/dev-lang/ocaml/files/ocaml-4.05.0-glibc-2.34.patch b/dev-lang/ocaml/files/ocaml-4.05.0-glibc-2.34.patch deleted file mode 100644 index d95d2bb0fa50.. --- a/dev-lang/ocaml/files/ocaml-4.05.0-glibc-2.34.patch +++ /dev/null @@ -1,186 +0,0 @@ -https://github.com/ocaml/ocaml/commit/50c2d1275e537906ea144bd557fde31e0bf16e5f -https://bugs.gentoo.org/804498 - -From 50c2d1275e537906ea144bd557fde31e0bf16e5f Mon Sep 17 00:00:00 2001 -From: Xavier Leroy -Date: Fri, 5 Mar 2021 19:14:07 +0100 -Subject: [PATCH] Dynamically allocate the alternate signal stack - -In Glibc 2.34 and later, SIGSTKSZ may not be a compile-time constant. -It is no longer possible to statically allocate the alternate signal -stack for the main thread, as we've been doing for the last 25 years. - -This commit implements dynamic allocation of the alternate signal stack -even for the main thread. It reuses the code already in place to allocate -the alternate signal stack for other threads. - -The alternate signal stack is freed when the main OCaml code / an OCaml thread -stops. - -(partial back-port of PR#10266 and PR#10726) a/asmrun/fail.c -+++ b/asmrun/fail.c -@@ -31,6 +31,8 @@ - #include "caml/roots.h" - #include "caml/callback.h" - -+extern void caml_terminate_signals(void); -+ - /* The globals holding predefined exceptions */ - - typedef value caml_generated_constant[1]; -@@ -60,7 +62,10
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: 08d38917b110ea52b3107556e283498a09a89a36 Author: Sam James gentoo org> AuthorDate: Tue Feb 22 00:35:29 2022 + Commit: Sam James gentoo org> CommitDate: Tue Feb 22 00:41:22 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=08d38917 dev-lang/ocaml: fix 4.10 with glibc 2.34 Bug: https://bugs.gentoo.org/804498 See: https://github.com/gentoo/gentoo/pull/22851#pullrequestreview-882504245 Signed-off-by: Sam James gentoo.org> dev-lang/ocaml/files/ocaml-4.10.2-glibc-2.34.patch | 257 + dev-lang/ocaml/ocaml-4.10.2-r3.ebuild | 106 + 2 files changed, 363 insertions(+) diff --git a/dev-lang/ocaml/files/ocaml-4.10.2-glibc-2.34.patch b/dev-lang/ocaml/files/ocaml-4.10.2-glibc-2.34.patch new file mode 100644 index ..8ce76701366a --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.10.2-glibc-2.34.patch @@ -0,0 +1,257 @@ +https://github.com/ocaml/ocaml/commit/4b4c643d1d5d28738f6d900cd902851ed9dc5364 +https://bugs.gentoo.org/804498 + +From 4b4c643d1d5d28738f6d900cd902851ed9dc5364 Mon Sep 17 00:00:00 2001 +From: Xavier Leroy +Date: Fri, 5 Mar 2021 19:14:07 +0100 +Subject: [PATCH] Dynamically allocate the alternate signal stack + +In Glibc 2.34 and later, SIGSTKSZ may not be a compile-time constant. +It is no longer possible to statically allocate the alternate signal +stack for the main thread, as we've been doing for the last 25 years. + +This commit implements dynamic allocation of the alternate signal stack +even for the main thread. It reuses the code already in place to allocate +the alternate signal stack for other threads. + +The alternate signal stack is freed when the main OCaml code / an OCaml thread +stops. + +(partial back-port of PR#10266 and PR#10726) +--- + otherlibs/systhreads/st_stubs.c | 2 + + runtime/fail_nat.c | 7 ++- + runtime/signals_nat.c | 87 - + runtime/startup_nat.c | 7 ++- + runtime/sys.c | 5 ++ + 5 files changed, 95 insertions(+), 13 deletions(-) + +diff --git a/otherlibs/systhreads/st_stubs.c b/otherlibs/systhreads/st_stubs.c +index e46a67be9dc..0b441934ae9 100644 +--- a/otherlibs/systhreads/st_stubs.c b/otherlibs/systhreads/st_stubs.c +@@ -140,6 +140,7 @@ static st_retcode caml_threadstatus_wait (value); + #ifdef NATIVE_CODE + extern struct longjmp_buffer caml_termination_jmpbuf; + extern void (*caml_termination_hook)(void); ++extern int caml_stop_stack_overflow_detection(void); + #endif + + /* Hook for scanning the stacks of the other threads */ +@@ -576,6 +577,7 @@ static ST_THREAD_FUNCTION caml_thread_start(void * arg) + caml_thread_stop(); + #ifdef NATIVE_CODE + } ++ caml_stop_stack_overflow_detection(); + #endif + /* The thread now stops running */ + return 0; +diff --git a/runtime/fail_nat.c b/runtime/fail_nat.c +index 380578ac47b..4ea658684b4 100644 +--- a/runtime/fail_nat.c b/runtime/fail_nat.c +@@ -32,6 +32,8 @@ + #include "caml/roots.h" + #include "caml/callback.h" + ++extern void caml_terminate_signals(void); ++ + /* The globals holding predefined exceptions */ + + typedef value caml_generated_constant[1]; +@@ -62,7 +64,10 @@ CAMLno_asan + void caml_raise(value v) + { + Unlock_exn(); +- if (Caml_state->exception_pointer == NULL) caml_fatal_uncaught_exception(v); ++ if (Caml_state->exception_pointer == NULL) { ++caml_terminate_signals(); ++caml_fatal_uncaught_exception(v); ++ } + + while (Caml_state->local_roots != NULL && + (char *) Caml_state->local_roots < Caml_state->exception_pointer) { +diff --git a/runtime/signals_nat.c b/runtime/signals_nat.c +index 017298394e9..b4c58259fc2 100644 +--- a/runtime/signals_nat.c b/runtime/signals_nat.c +@@ -191,8 +191,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler) + #error "CONTEXT_SP is required if HAS_STACK_OVERFLOW_DETECTION is defined" + #endif + +-static char sig_alt_stack[SIGSTKSZ]; +- + /* Code compiled with ocamlopt never accesses more than +EXTRA_STACK bytes below the stack pointer. */ + #define EXTRA_STACK 256 +@@ -254,6 +252,10 @@ DECLARE_SIGNAL_HANDLER(segv_handler) + + /* Initialization of signal stuff */ + ++#ifdef HAS_STACK_OVERFLOW_DETECTION ++static int setup_stack_overflow_detection(void); ++#endif ++ + void caml_init_signals(void) + { + /* Bound-check trap handling */ +@@ -278,28 +280,91 @@ void caml_init_signals(void) + #endif + + #ifdef HAS_STACK_OVERFLOW_DETECTION +- { +-stack_t stk; ++ if (setup_stack_overflow_detection() != -1) { + struct sigaction act; +-stk.ss_sp = sig_alt_stack; +-stk.ss_size = SIGSTKSZ; +-stk.ss_flags = 0; + SET_SIGACT(act, segv_handler); + act.sa_flags |= SA_ONSTACK | SA_NODEFER; + sigemptyset(_mask); +-if (sigaltstack(, NULL) == 0) { sigaction(SIGSEGV, , NULL); } ++sigaction(SIGSEGV, , NULL); + } + #endif + } + +-void caml_setup_stack_overflow_detection(void) ++/* Termination of signal stuff */ ++ ++#if
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: aa94926bbf041302507bd8a121edba782f0d2afc Author: Alfredo Tupone gentoo org> AuthorDate: Sat Jan 22 20:25:03 2022 + Commit: Alfredo Tupone gentoo org> CommitDate: Sat Jan 22 20:25:03 2022 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aa94926b dev-lang/ocaml: respect CFLAGS for ocaml-4.09 Package-Manager: Portage-3.0.28, Repoman-3.0.3 Signed-off-by: Alfredo Tupone gentoo.org> dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch | 54 ++ dev-lang/ocaml/ocaml-4.09.0-r2.ebuild | 7 +++- 2 files changed, 59 insertions(+), 2 deletions(-) diff --git a/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch b/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch new file mode 100644 index ..920cd32264b6 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.09.0-cflags.patch @@ -0,0 +1,54 @@ +--- a/runtime/Makefile 2022-01-22 19:49:32.914213696 +0100 b/runtime/Makefile 2022-01-22 19:50:03.765640701 +0100 +@@ -335,7 +335,7 @@ + # (without the extension, which is added by the macro) + define COMPILE_C_FILE + $(1).$(O): %.c +- $$(CC) -c $$(OC_CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$< ++ $$(CC) -c $$(OC_CFLAGS) $(CFLAGS) $$(OC_CPPFLAGS) $$(OUTPUTOBJ)$$@ $$< + endef + + object_types := % %_b %_bd %_bi %_bpic %_n %_nd %_ni %_np %_npic +--- a/yacc/Makefile2022-01-22 20:02:56.510340885 +0100 b/yacc/Makefile2022-01-22 20:03:14.998000508 +0100 +@@ -63,4 +63,4 @@ + # also works for .obj files. + + %.$(O): %.c +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< +--- a/otherlibs/Makefile.otherlibs.common 2022-01-22 20:24:15.316779625 +0100 b/otherlibs/Makefile.otherlibs.common 2022-01-22 20:24:50.730126701 +0100 +@@ -138,4 +138,4 @@ + $(CAMLOPT) -c $(COMPFLAGS) $(OPTCOMPFLAGS) $< + + .c.$(O): +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) $(OUTPUTOBJ)$@ $< +--- a/ocamltest/Makefile 2022-01-22 20:30:22.454009704 +0100 b/ocamltest/Makefile 2022-01-22 20:30:33.845799603 +0100 +@@ -221,7 +221,7 @@ + $(ocamllex) -q $< + + %.$(O): %.c +- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) -c $< ++ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -c $< + + ocamltest_config.ml: ocamltest_config.ml.in Makefile ../Makefile.config + sed \ +--- a/otherlibs/systhreads/Makefile2022-01-22 20:42:17.647349876 +0100 b/otherlibs/systhreads/Makefile2022-01-22 20:43:29.766086103 +0100 +@@ -93,11 +93,11 @@ + # twice, each time with different options). + + st_stubs_b.$(O): st_stubs.c $(HEADER) +- $(CC) -c $(OC_CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \ ++ $(CC) -c $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) -I$(ROOTDIR)/runtime \ + $(SHAREDLIB_CFLAGS) $(OUTPUTOBJ)$@ $< + + st_stubs_n.$(O): st_stubs.c $(HEADER) +- $(CC) $(OC_CFLAGS) $(OC_CPPFLAGS) \ ++ $(CC) $(OC_CFLAGS) $(CFLAGS) $(OC_CPPFLAGS) \ + -I$(ROOTDIR)/runtime $(SHAREDLIB_CFLAGS) -DNATIVE_CODE \ + -DTARGET_$(ARCH) -DMODEL_$(MODEL) -DSYS_$(SYSTEM) \ + $(OUTPUTOBJ)$@ -c $< diff --git a/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild b/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild index 68b58ca86b18..ca9871a0c358 100644 --- a/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild +++ b/dev-lang/ocaml/ocaml-4.09.0-r2.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2021 Gentoo Authors +# Copyright 1999-2022 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -21,7 +21,10 @@ BDEPEND="${RDEPEND} PDEPEND="emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )" -PATCHES=( "${FILESDIR}"/${PN}-4.09.0-gcc-10.patch ) +PATCHES=( + "${FILESDIR}"/${PN}-4.09.0-gcc-10.patch + "${FILESDIR}"/${P}-cflags.patch +) src_prepare() { default
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: c309652d566cedeb0c93c8b1a08569f54545d354 Author: Sam James gentoo org> AuthorDate: Sun Oct 17 05:16:49 2021 + Commit: Sam James gentoo org> CommitDate: Sun Oct 17 05:24:32 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c309652d dev-lang/ocaml: fix build with glibc-2.34 in 4.11.2 Closes: https://bugs.gentoo.org/804498 Signed-off-by: Sam James gentoo.org> dev-lang/ocaml/files/ocaml-4.11.2-glibc-2.34.patch | 91 ++ dev-lang/ocaml/ocaml-4.11.2-r2.ebuild | 4 + 2 files changed, 95 insertions(+) diff --git a/dev-lang/ocaml/files/ocaml-4.11.2-glibc-2.34.patch b/dev-lang/ocaml/files/ocaml-4.11.2-glibc-2.34.patch new file mode 100644 index 000..22cbb806e6e --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.11.2-glibc-2.34.patch @@ -0,0 +1,91 @@ +https://gitlab.com/redhat/centos-stream/rpms/ocaml/-/raw/c9s/0006-Dynamically-allocate-the-alternate-signal-stack-1026.patch +https://bugs.gentoo.org/804498 + +From 24a9db7784ddfcf0af2d2be2f51616ed960ae7e8 Mon Sep 17 00:00:00 2001 +From: Xavier Leroy +Date: Fri, 5 Mar 2021 19:14:07 +0100 +Subject: [PATCH 6/6] Dynamically allocate the alternate signal stack (#10266) + +In Glibc 2.34 and later, SIGSTKSZ may not be a compile-time constant. +It is no longer possible to statically allocate the alternate signal +stack for the main thread, as we've been doing for the last 25 years. + +This commit implements dynamic allocation of the alternate signal stack +even for the main thread. It reuses the code already in place to allocate +the alternate signal stack for other threads. + +Fixes: #10250. +(cherry picked from commit fc9534746bf5d08a4c109f22e344cf49d5d46d54) +--- a/runtime/caml/signals.h b/runtime/caml/signals.h +@@ -82,7 +82,7 @@ void caml_set_action_pending (void); + value caml_do_pending_actions_exn (void); + value caml_process_pending_actions_with_root (value extra_root); // raises + int caml_set_signal_action(int signo, int action); +-void caml_setup_stack_overflow_detection(void); ++CAMLextern int caml_setup_stack_overflow_detection(void); + + CAMLextern void (*caml_enter_blocking_section_hook)(void); + CAMLextern void (*caml_leave_blocking_section_hook)(void); +--- a/runtime/signals_byt.c b/runtime/signals_byt.c +@@ -86,4 +86,4 @@ int caml_set_signal_action(int signo, int action) + return 0; + } + +-void caml_setup_stack_overflow_detection(void) {} ++CAMLexport int caml_setup_stack_overflow_detection(void) { return 0; } +--- a/runtime/signals_nat.c b/runtime/signals_nat.c +@@ -195,8 +195,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler) + #error "CONTEXT_SP is required if HAS_STACK_OVERFLOW_DETECTION is defined" + #endif + +-static char sig_alt_stack[SIGSTKSZ]; +- + /* Code compiled with ocamlopt never accesses more than +EXTRA_STACK bytes below the stack pointer. */ + #define EXTRA_STACK 256 +@@ -282,28 +280,33 @@ void caml_init_signals(void) + #endif + + #ifdef HAS_STACK_OVERFLOW_DETECTION +- { +-stack_t stk; ++ if (caml_setup_stack_overflow_detection() != -1) { + struct sigaction act; +-stk.ss_sp = sig_alt_stack; +-stk.ss_size = SIGSTKSZ; +-stk.ss_flags = 0; + SET_SIGACT(act, segv_handler); + act.sa_flags |= SA_ONSTACK | SA_NODEFER; + sigemptyset(_mask); +-if (sigaltstack(, NULL) == 0) { sigaction(SIGSEGV, , NULL); } ++sigaction(SIGSEGV, , NULL); + } + #endif + } + +-void caml_setup_stack_overflow_detection(void) ++/* Allocate and select an alternate stack for handling signals, ++ especially SIGSEGV signals. ++ Each thread needs its own alternate stack. ++ The alternate stack used to be statically-allocated for the main thread, ++ but this is incompatible with Glibc 2.34 and newer, where SIGSTKSZ ++ may not be a compile-time constant (issue #10250). */ ++ ++CAMLexport int caml_setup_stack_overflow_detection(void) + { + #ifdef HAS_STACK_OVERFLOW_DETECTION + stack_t stk; + stk.ss_sp = malloc(SIGSTKSZ); ++ if (stk.ss_sp == NULL) return -1; + stk.ss_size = SIGSTKSZ; + stk.ss_flags = 0; +- if (stk.ss_sp) +-sigaltstack(, NULL); ++ return sigaltstack(, NULL); ++#else ++ return 0; + #endif + } diff --git a/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild b/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild index 2d52afb654e..51cc9f56afa 100644 --- a/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild +++ b/dev-lang/ocaml/ocaml-4.11.2-r2.ebuild @@ -21,6 +21,10 @@ BDEPEND="${RDEPEND} PDEPEND="emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )" +PATCHES=( + "${FILESDIR}"/${PN}-4.11.2-glibc-2.34.patch +) + src_prepare() { default
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: 474a14bc9ede109fb7a8033667f42b6f63720962 Author: Sam James gentoo org> AuthorDate: Sat Oct 9 05:54:21 2021 + Commit: Sam James gentoo org> CommitDate: Sat Oct 9 05:55:51 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=474a14bc dev-lang/ocaml: fix build with glibc 2.34 Closes: https://bugs.gentoo.org/816765 Signed-off-by: Sam James gentoo.org> dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch | 91 ++ dev-lang/ocaml/ocaml-4.12.0-r2.ebuild | 4 + dev-lang/ocaml/ocaml-4.12.1.ebuild | 4 + 3 files changed, 99 insertions(+) diff --git a/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch b/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch new file mode 100644 index 000..486b44846a8 --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.12.0-glibc-2.34.patch @@ -0,0 +1,91 @@ +https://src.fedoraproject.org/rpms/ocaml/blob/129153b85109944bf0b2922949f77ef8f32b39a1/f/0004-Dynamically-allocate-the-alternate-signal-stack-1026.patch +https://bugs.gentoo.org/816765 + +From 3104d92743614f8f52039e0520116af4179880a5 Mon Sep 17 00:00:00 2001 +From: Xavier Leroy +Date: Fri, 5 Mar 2021 19:14:07 +0100 +Subject: [PATCH 4/4] Dynamically allocate the alternate signal stack (#10266) + +In Glibc 2.34 and later, SIGSTKSZ may not be a compile-time constant. +It is no longer possible to statically allocate the alternate signal +stack for the main thread, as we've been doing for the last 25 years. + +This commit implements dynamic allocation of the alternate signal stack +even for the main thread. It reuses the code already in place to allocate +the alternate signal stack for other threads. + +Fixes: #10250. +(cherry picked from commit fc9534746bf5d08a4c109f22e344cf49d5d46d54) +--- a/runtime/caml/signals.h b/runtime/caml/signals.h +@@ -87,7 +87,7 @@ value caml_do_pending_actions_exn (void); + value caml_process_pending_actions_with_root (value extra_root); // raises + value caml_process_pending_actions_with_root_exn (value extra_root); + int caml_set_signal_action(int signo, int action); +-CAMLextern void caml_setup_stack_overflow_detection(void); ++CAMLextern int caml_setup_stack_overflow_detection(void); + + CAMLextern void (*caml_enter_blocking_section_hook)(void); + CAMLextern void (*caml_leave_blocking_section_hook)(void); +--- a/runtime/signals_byt.c b/runtime/signals_byt.c +@@ -81,4 +81,4 @@ int caml_set_signal_action(int signo, int action) + return 0; + } + +-CAMLexport void caml_setup_stack_overflow_detection(void) {} ++CAMLexport int caml_setup_stack_overflow_detection(void) { return 0; } +--- a/runtime/signals_nat.c b/runtime/signals_nat.c +@@ -181,8 +181,6 @@ DECLARE_SIGNAL_HANDLER(trap_handler) + #error "CONTEXT_SP is required if HAS_STACK_OVERFLOW_DETECTION is defined" + #endif + +-static char sig_alt_stack[SIGSTKSZ]; +- + /* Code compiled with ocamlopt never accesses more than +EXTRA_STACK bytes below the stack pointer. */ + #define EXTRA_STACK 256 +@@ -276,28 +274,33 @@ void caml_init_signals(void) + #endif + + #ifdef HAS_STACK_OVERFLOW_DETECTION +- { +-stack_t stk; ++ if (caml_setup_stack_overflow_detection() != -1) { + struct sigaction act; +-stk.ss_sp = sig_alt_stack; +-stk.ss_size = SIGSTKSZ; +-stk.ss_flags = 0; + SET_SIGACT(act, segv_handler); + act.sa_flags |= SA_ONSTACK | SA_NODEFER; + sigemptyset(_mask); +-if (sigaltstack(, NULL) == 0) { sigaction(SIGSEGV, , NULL); } ++sigaction(SIGSEGV, , NULL); + } + #endif + } + +-CAMLexport void caml_setup_stack_overflow_detection(void) ++/* Allocate and select an alternate stack for handling signals, ++ especially SIGSEGV signals. ++ Each thread needs its own alternate stack. ++ The alternate stack used to be statically-allocated for the main thread, ++ but this is incompatible with Glibc 2.34 and newer, where SIGSTKSZ ++ may not be a compile-time constant (issue #10250). */ ++ ++CAMLexport int caml_setup_stack_overflow_detection(void) + { + #ifdef HAS_STACK_OVERFLOW_DETECTION + stack_t stk; + stk.ss_sp = malloc(SIGSTKSZ); ++ if (stk.ss_sp == NULL) return -1; + stk.ss_size = SIGSTKSZ; + stk.ss_flags = 0; +- if (stk.ss_sp) +-sigaltstack(, NULL); ++ return sigaltstack(, NULL); ++#else ++ return 0; + #endif + } diff --git a/dev-lang/ocaml/ocaml-4.12.0-r2.ebuild b/dev-lang/ocaml/ocaml-4.12.0-r2.ebuild index da99522c6e3..287a7f38e79 100644 --- a/dev-lang/ocaml/ocaml-4.12.0-r2.ebuild +++ b/dev-lang/ocaml/ocaml-4.12.0-r2.ebuild @@ -20,6 +20,10 @@ BDEPEND="${RDEPEND} PDEPEND="emacs? ( app-emacs/ocaml-mode ) xemacs? ( app-xemacs/ocaml )" +PATCHES=( + "${FILESDIR}"/${PN}-4.12.0-glibc-2.34.patch +) + src_prepare() { default diff --git a/dev-lang/ocaml/ocaml-4.12.1.ebuild b/dev-lang/ocaml/ocaml-4.12.1.ebuild index da99522c6e3..287a7f38e79 100644 --- a/dev-lang/ocaml/ocaml-4.12.1.ebuild +++ b/dev-lang/ocaml/ocaml-4.12.1.ebuild @@ -20,6
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: 77fd8a0f1e7d400c8658105c0e0163ac49b6412b Author: Alfredo Tupone gentoo org> AuthorDate: Thu Jan 28 22:15:08 2021 + Commit: Alfredo Tupone gentoo org> CommitDate: Thu Jan 28 22:15:08 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=77fd8a0f dev-lang/ocaml: build with gcc-10 Bug: https://bugs.gentoo.org/735274 Package-Manager: Portage-3.0.13, Repoman-3.0.2 Signed-off-by: Alfredo Tupone gentoo.org> dev-lang/ocaml/files/ocaml-4.05.0-gcc10.patch | 59 dev-lang/ocaml/ocaml-4.05.0-r2.ebuild | 132 ++ 2 files changed, 191 insertions(+) diff --git a/dev-lang/ocaml/files/ocaml-4.05.0-gcc10.patch b/dev-lang/ocaml/files/ocaml-4.05.0-gcc10.patch new file mode 100644 index 000..a0c67da534a --- /dev/null +++ b/dev-lang/ocaml/files/ocaml-4.05.0-gcc10.patch @@ -0,0 +1,59 @@ +--- a/byterun/caml/intext.h2021-01-28 22:46:20.400224678 +0100 b/byterun/caml/intext.h2021-01-28 22:46:49.312751054 +0100 +@@ -196,7 +196,7 @@ + + CAMLextern struct code_fragment * caml_extern_find_code(char *addr); + +-struct ext_table caml_code_fragments_table; ++extern struct ext_table caml_code_fragments_table; + + #endif /* CAML_INTERNALS */ + +--- a/byterun/caml/major_gc.h 2021-01-28 22:44:12.193323457 +0100 b/byterun/caml/major_gc.h 2021-01-28 22:45:20.918198701 +0100 +@@ -64,9 +64,9 @@ + extern char *caml_gc_sweep_hp; + + extern int caml_major_window; +-double caml_major_ring[Max_major_window]; +-int caml_major_ring_index; +-double caml_major_work_credit; ++extern double caml_major_ring[Max_major_window]; ++extern int caml_major_ring_index; ++extern double caml_major_work_credit; + extern double caml_gc_clock; + + /* [caml_major_gc_hook] is called just between the end of the mark +--- a/byterun/meta.c 2021-01-28 22:47:34.148016359 +0100 b/byterun/meta.c 2021-01-28 22:47:56.048657393 +0100 +@@ -32,6 +32,8 @@ + #include "caml/prims.h" + #include "caml/stacks.h" + ++struct ext_table caml_code_fragments_table; ++ + #ifndef NATIVE_CODE + + CAMLprim value caml_get_global_data(value unit) +--- a/byterun/backtrace.c 2021-01-28 22:50:25.275226598 +0100 b/byterun/backtrace.c 2021-01-28 22:50:37.541027290 +0100 +@@ -28,7 +28,7 @@ + #include "caml/fail.h" + + /* The table of debug information fragments */ +-struct ext_table caml_debug_info; ++extern struct ext_table caml_debug_info; + + CAMLexport int32_t caml_backtrace_active = 0; + CAMLexport int32_t caml_backtrace_pos = 0; +--- a/asmrun/startup.c 2021-01-28 23:02:50.526072662 +0100 b/asmrun/startup.c 2021-01-28 23:03:09.977754311 +0100 +@@ -44,7 +44,7 @@ + #endif + + extern int caml_parser_trace; +-CAMLexport header_t caml_atom_table[256]; ++CAMLextern header_t caml_atom_table[256]; + char * caml_code_area_start, * caml_code_area_end; + + /* Initialize the atom table and the static data and code area limits. */ diff --git a/dev-lang/ocaml/ocaml-4.05.0-r2.ebuild b/dev-lang/ocaml/ocaml-4.05.0-r2.ebuild new file mode 100644 index 000..dc6ca02c535 --- /dev/null +++ b/dev-lang/ocaml/ocaml-4.05.0-r2.ebuild @@ -0,0 +1,132 @@ +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit flag-o-matic eutils multilib versionator toolchain-funcs + +PATCHLEVEL="9" +MY_P="${P/_/-}" +DESCRIPTION="Type-inferring functional programming language descended from the ML family" +HOMEPAGE="https://ocaml.org; +SRC_URI="https://github.com/ocaml/ocaml/archive/${PV/_/+}.tar.gz -> ${MY_P}.tar.gz + mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2" + +LICENSE="QPL-1.0 LGPL-2" +# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt, +# so here we go with the subslot. +SLOT="0/${PV}" +KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~sparc-solaris ~x86-solaris" +IUSE="emacs flambda latex ncurses +ocamlopt spacetime X xemacs" + +RDEPEND=" + sys-libs/binutils-libs:= + ncurses? ( sys-libs/ncurses:0= ) + spacetime? ( sys-libs/libunwind:= ) + X? ( x11-libs/libX11 ) + !dev-ml/num" +DEPEND="${RDEPEND} + virtual/pkgconfig" + +PDEPEND="emacs? ( app-emacs/ocaml-mode ) + xemacs? ( app-xemacs/ocaml )" + +S="${WORKDIR}/${MY_P}" +pkg_setup() { + # dev-lang/ocaml creates its own objects but calls gcc for linking, which will + # results in relocations if gcc wants to create a PIE executable + if gcc-specs-pie ; then + append-ldflags -nopie + ewarn "Ocaml generates its own native asm, you're using a PIE compiler" + ewarn "We have appended -nopie to ocaml build options" + ewarn "because linking an executable with pie while the objects are not pic will not work" + fi +} + +src_prepare() { + EPATCH_SUFFIX="patch" epatch "${WORKDIR}/patches" + epatch
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: 4530442dc257bbc66a5b67b1846d16c7d2f0093f Author: Alexis Ballier gentoo org> AuthorDate: Wed Jan 25 16:56:07 2017 + Commit: Alexis Ballier gentoo org> CommitDate: Wed Jan 25 16:56:07 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4530442d dev-lang/ocaml: remove old Package-Manager: Portage-2.3.3, Repoman-2.3.1 dev-lang/ocaml/Manifest| 1 - .../files/ocaml-4.01.0-pkg-config-ncurses.patch| 15 --- dev-lang/ocaml/ocaml-4.02.3-r1.ebuild | 116 --- dev-lang/ocaml/ocaml-4.03.0-r1.ebuild | 125 - 4 files changed, 257 deletions(-) diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest index c5f58f1..321529f 100644 --- a/dev-lang/ocaml/Manifest +++ b/dev-lang/ocaml/Manifest @@ -1,5 +1,4 @@ DIST ocaml-4.02.3.tar.xz 2058552 SHA256 83c6697e135b599a196fd7936eaf8a53dd6b8f3155a796d18407b56f91df9ce3 SHA512 a815421f6a320b18e7f351bd66884024ad4a33525ba161a198ea356892ce331be6c1ddf4cd07d120ebe9a902bcf815ce1b17e45f405e4e0b2d55ce1b6d2adada WHIRLPOOL 1104cdcf23b773ebf0c0ef8d8ee36b2b4b58b1fab10a41ff7f2d522c34ae6161bc6cba28b279eea03ac183a111fc332557084b017d0c2ad6f9c969204e309597 -DIST ocaml-4.03.0.tar.xz 2289296 SHA256 695caf381105183f9d37bcfb63f863f782352b070e5d7ff3ca269712398fe326 SHA512 9a7f4b17d459373334fb04f8a0d42732243245bf16bc35c935fb2119c7990d0c85549b2e11adea68a98a0a0171a461ccfbb2e249b59eedf90349f087a18ce243 WHIRLPOOL 9c822f7c66494a6e7fc30e565e7c8d120808a15b42cd64ccad0946f8413da44b50ec84dfd658e8f394dce4effe7eda380a0a203db14df9dfc24c7b54f7681cea DIST ocaml-4.04.0.tar.gz 4057711 SHA256 03e49d09d5a509216ca0cc8fccd10df3ad9dd441d7633e89974a74e149be3c51 SHA512 288c514e7ccfe29fe9a65239d04f000b3b05df71f15bc05b3e5af50cb233544b4fec22baad69f60de587e8f0f8f65ee023a5b709896a1a68f9fd6fe30b81344d WHIRLPOOL 91fea4195ed84fb97f2ae68e30f47ce60a2404bc47ca809f6e0d182dd755833ea16a2e033ee0a02fab008f5905a2a9b6fa8dc2194c75b8d9daa353eb6b1d70e9 DIST ocaml-patches-7.tar.bz2 2194 SHA256 71e9496af89ded9852d8e1f32be18a5f0d7e11270958fb4bc8c588420b1e9156 SHA512 63bca96f009e2de24ff6f7a4b37b97c5b7655d5ad6196f06cc2b18ca213e87878a310d169378c341c00aaac698530e458e301620bcc21284bc8b9ea143f642dd WHIRLPOOL 02d17436f901c70b2fa8a104d8b7a6526c65ab9b40408b549c4f4dfe7a1eeae8213620d151fb181833782504e4d7cb6fa3ff7ddebe77efcb88d32fe057cbd8cc DIST ocaml-patches-8.tar.bz2 1803 SHA256 bce7ea483842f6e201cdf3de266928b39b5b45322315010291ed28f811720525 SHA512 fc477fbb5bdec60a3c4d3dfa110119bb579560ac0e0e57e30e076da72643bda6359c06fd3745fd3436c5d611dbbd888ec2921e9d1920f4929df633c35a797411 WHIRLPOOL ae73b5377744add3afce012b5745fafd70c0f92f75cd6cf91560e0f2ba359a91f7276afed13db145c307be9fdf79c339c2c69be6946565354c68d701fa61a4be diff --git a/dev-lang/ocaml/files/ocaml-4.01.0-pkg-config-ncurses.patch b/dev-lang/ocaml/files/ocaml-4.01.0-pkg-config-ncurses.patch deleted file mode 100644 index b9fa750.. --- a/dev-lang/ocaml/files/ocaml-4.01.0-pkg-config-ncurses.patch +++ /dev/null @@ -1,15 +0,0 @@ ocaml-4.01.0-orig/configure2013-08-23 16:22:36.0 +1000 -+++ ocaml-4.01.0/configure 2014-01-18 20:06:50.669644267 +1100 -@@ -892,7 +892,11 @@ - # For the terminfo module - - if test "$withcurses" = "yes"; then -- for libs in "" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do -+ ncurseslibs="" -+ if pkg-config --exists ncurses 2>/dev/null; then -+ncurseslibs=`pkg-config --libs ncurses` -+ fi -+ for libs in "${ncurseslibs}" "-lcurses" "-ltermcap" "-lcurses -ltermcap" "-lncurses"; do - if sh ./hasgot $libs tgetent tgetstr tgetnum tputs; then - echo "termcap functions found (with libraries '$libs')" - echo "#define HAS_TERMCAP" >> s.h diff --git a/dev-lang/ocaml/ocaml-4.02.3-r1.ebuild b/dev-lang/ocaml/ocaml-4.02.3-r1.ebuild deleted file mode 100644 index 39bf504.. --- a/dev-lang/ocaml/ocaml-4.02.3-r1.ebuild +++ /dev/null @@ -1,116 +0,0 @@ -# Copyright 1999-2015 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Id$ - -EAPI="5" - -inherit flag-o-matic eutils multilib versionator toolchain-funcs - -PATCHLEVEL="7" -MY_P="${P/_/+}" -DESCRIPTION="Fast modern type-inferring functional programming language descended from the ML family" -HOMEPAGE="http://www.ocaml.org/; -SRC_URI="http://caml.inria.fr/pub/distrib/ocaml-$(get_version_component_range 1-2)/${MY_P}.tar.xz - mirror://gentoo/${PN}-patches-${PATCHLEVEL}.tar.bz2" - -LICENSE="QPL-1.0 LGPL-2" -# Everytime ocaml is updated to a new version, everything ocaml must be rebuilt, -# so here we go with the subslot. -SLOT="0/${PV}" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-fbsd ~x86-fbsd ~amd64-linux ~x86-linux" -IUSE="emacs latex ncurses +ocamlopt X xemacs" - -RDEPEND=" - ncurses? ( sys-libs/ncurses:0= ) - X? ( x11-libs/libX11 x11-proto/xproto )" -DEPEND="${RDEPEND} - virtual/pkgconfig" -
[gentoo-commits] repo/gentoo:master commit in: dev-lang/ocaml/, dev-lang/ocaml/files/
commit: 8484ddce33a613a12ca92e65d73ffb27f9aea76e Author: Alexis Ballier gentoo org> AuthorDate: Tue Nov 10 12:08:00 2015 + Commit: Alexis Ballier gentoo org> CommitDate: Tue Nov 10 12:08:00 2015 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8484ddce dev-lang/ocaml: remove old Package-Manager: portage-2.2.24 Signed-off-by: Alexis Ballier gentoo.org> dev-lang/ocaml/Manifest| 4 - ...-3.11.2-Fix-ocamlopt-w.r.t.-binutils-2.21.patch | 66 --- dev-lang/ocaml/ocaml-4.01.0.ebuild | 128 - dev-lang/ocaml/ocaml-4.02.1.ebuild | 114 -- dev-lang/ocaml/ocaml-4.02.2.ebuild | 115 -- 5 files changed, 427 deletions(-) diff --git a/dev-lang/ocaml/Manifest b/dev-lang/ocaml/Manifest index 31e4a53..70893c3 100644 --- a/dev-lang/ocaml/Manifest +++ b/dev-lang/ocaml/Manifest @@ -1,8 +1,4 @@ DIST ocaml-3.12.1.tar.bz2 2949124 SHA256 edcf563da75e0b91f09765649caa98ab1535e0c7498f0737b5591b7de084958d SHA512 cbb050aabcbe19a4aa070d6cb74f3774cb136692dfd9433ca977f0f9520ad2f583b6cfb1a9cedfedc92e7dc794ac4a869e20aa5a67a4739002feb290435dc7e7 WHIRLPOOL b7bf4844452ab52027e6b785159df6e4defc548d2f3d31eb73dc0dc05214e7c19ed654c8b3ff234a85691599df0be568ba02fafe257856be7f603177584a7ca0 -DIST ocaml-4.01.0.tar.bz2 3691090 SHA256 b1ca708994180236917ae79e17606da5bd334ca6acd6873a550027e1c0ec874a SHA512 b0a4efa89d0e48e5c01922156a73a8ed67c58efa07170710eaef9de1138e1d6fff8a440b2c81860fc63c604f3a4e189b795bb08a5e9d8df60778fcd468985f6e WHIRLPOOL a31cc2c46e19ca1c5ca65ffdee77ef42b7269b1584f81629e29b725b167c7e3d9eb467a3e8171aaba7d2cf1d8aea31d1822c5631fe3e209ce7731c16112a11d3 -DIST ocaml-4.02.1.tar.xz 2031244 SHA256 68c4b01be54c23bc20fc0a8beaa5c7433b8483f8950490129cfe7662e0c6f4dc SHA512 79d257210c0ddfb0367250a688ffb58f143fcc8c159f7d6e149d42b074e811eaf69449b66ad39da399e1bdcb2bab5924d195fc7c5ebc29d44cb637c093b9931d WHIRLPOOL 2c9849f73a705a63c0d0d4682d1ab1225a3150f68bda98805dc2d2b11f100ee7206200b9dc49b07d39d1b737f45671f3662a9bf2c069d6795f26e1f9b9b65ead -DIST ocaml-4.02.2.tar.xz 2059800 SHA256 60f923988ab7ae023a0799f9699d7d7a476bf8207ee2c900f92c8288ea363085 SHA512 f826cdb149ba594134b02d62343c5d25aca7ca2a36154e360560fe11d285c4f4905074d81db03ce71758254fc390e93ae8d530ecd08853324966f39af870d46e WHIRLPOOL 8fa47f214743000c0e372f77cfe874d1c8e5b043647c753a459a22e6045cecda3f8a18edaca75e262d4004d2b3bf11c500232864cfdf71e9231ac24af4419c0e DIST ocaml-4.02.3.tar.xz 2058552 SHA256 83c6697e135b599a196fd7936eaf8a53dd6b8f3155a796d18407b56f91df9ce3 SHA512 a815421f6a320b18e7f351bd66884024ad4a33525ba161a198ea356892ce331be6c1ddf4cd07d120ebe9a902bcf815ce1b17e45f405e4e0b2d55ce1b6d2adada WHIRLPOOL 1104cdcf23b773ebf0c0ef8d8ee36b2b4b58b1fab10a41ff7f2d522c34ae6161bc6cba28b279eea03ac183a111fc332557084b017d0c2ad6f9c969204e309597 DIST ocaml-patches-3.tar.bz2 4101 SHA256 c4ceb604f4480c78d1cf4f848b0903c8d37798d9761f582d8d1643d4e38b8658 SHA512 8be5c44de5a6b0b7c14723e41d92fe807b881b218cc5eee38ea7519c0f971415cb7fe30035303da275089dcb8a61c4f334c4a88e0bdbced3953503794b8308a7 WHIRLPOOL f1920606785702c44dead01b1426145653bc1931acba2d614c6818baddc051e4f74ca0322cae66ade63ba0cd0df5651cfd67f511fca5f12973b67a0c50ebab6d -DIST ocaml-patches-6.tar.bz2 2197 SHA256 7acfa3d056c2b3f7dfc3b1f96a2557d81802c837c2ba0abc1487de10627e5e07 SHA512 88afa904044192b945b537cbfc3c17308e333ed1d241332212b9500d01c14bb306905b03f2b48ec64dd2f428df1f7179772d742b77b4402da108ba7790239bf6 WHIRLPOOL d2001a8a3e799080c3981be87bcef62635c11cab037d6d92da186643614c6e2a568543f82f3566bfb099c063ad344cab2238edf863a9fb02081f4e20f442d9f8 DIST ocaml-patches-7.tar.bz2 2194 SHA256 71e9496af89ded9852d8e1f32be18a5f0d7e11270958fb4bc8c588420b1e9156 SHA512 63bca96f009e2de24ff6f7a4b37b97c5b7655d5ad6196f06cc2b18ca213e87878a310d169378c341c00aaac698530e458e301620bcc21284bc8b9ea143f642dd WHIRLPOOL 02d17436f901c70b2fa8a104d8b7a6526c65ab9b40408b549c4f4dfe7a1eeae8213620d151fb181833782504e4d7cb6fa3ff7ddebe77efcb88d32fe057cbd8cc diff --git a/dev-lang/ocaml/files/ocaml-3.11.2-Fix-ocamlopt-w.r.t.-binutils-2.21.patch b/dev-lang/ocaml/files/ocaml-3.11.2-Fix-ocamlopt-w.r.t.-binutils-2.21.patch deleted file mode 100644 index fa7664c..000 --- a/dev-lang/ocaml/files/ocaml-3.11.2-Fix-ocamlopt-w.r.t.-binutils-2.21.patch +++ /dev/null @@ -1,66 +0,0 @@ -From: Stephane Glondu-Date: Tue, 8 Mar 2011 21:17:40 +0100 -Subject: [PATCH] Fix ocamlopt w.r.t. binutils 2.21 -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Bug: http://caml.inria.fr/mantis/view.php?id=5237 -Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=617404 -Authors: Eric Cooper, spiralvoice -Reviewed-by: Stéphane Glondu - asmcomp/amd64/emit.mlp | 13 +++-- - asmcomp/i386/emit.mlp |6 +++--- - 2 files changed, 10 insertions(+), 9 deletions(-) - -diff --git a/asmcomp/amd64/emit.mlp