commit:     3e396d2b57d76c1025491c8313859e59778f65e8
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Wed Feb  5 09:38:23 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Wed Feb  5 09:38:58 2020 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3e396d2b

dev-lang/ocaml: tweak for gcc-10

Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 dev-lang/ocaml/files/ocaml-4.09.0-gcc-10.patch | 21 +++++++++++++++++++++
 dev-lang/ocaml/ocaml-4.09.0.ebuild             |  4 +++-
 2 files changed, 24 insertions(+), 1 deletion(-)

diff --git a/dev-lang/ocaml/files/ocaml-4.09.0-gcc-10.patch 
b/dev-lang/ocaml/files/ocaml-4.09.0-gcc-10.patch
new file mode 100644
index 00000000000..e25d55a5f66
--- /dev/null
+++ b/dev-lang/ocaml/files/ocaml-4.09.0-gcc-10.patch
@@ -0,0 +1,21 @@
+--- a/runtime/backtrace.c
++++ b/runtime/backtrace.c
+@@ -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/runtime/startup_nat.c
++++ b/runtime/startup_nat.c
+@@ -44,7 +44,6 @@
+ #endif
+ 
+ extern int caml_parser_trace;
+-CAMLexport header_t caml_atom_table[256];
+ char * caml_code_area_start, * caml_code_area_end;
+ struct ext_table caml_code_fragments_table;
+ 

diff --git a/dev-lang/ocaml/ocaml-4.09.0.ebuild 
b/dev-lang/ocaml/ocaml-4.09.0.ebuild
index c39cc2aee83..5fb59fc6617 100644
--- a/dev-lang/ocaml/ocaml-4.09.0.ebuild
+++ b/dev-lang/ocaml/ocaml-4.09.0.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2019 Gentoo Authors
+# Copyright 1999-2020 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=7
@@ -19,6 +19,8 @@ BDEPEND="${RDEPEND}
 PDEPEND="emacs? ( app-emacs/ocaml-mode )
        xemacs? ( app-xemacs/ocaml )"
 
+PATCHES=("${FILESDIR}"/${PN}-4.09.0-gcc-10.patch)
+
 src_prepare() {
        default
        # Upstream build ignores LDFLAGS in several places.

Reply via email to