dev-lang/ocaml: tweak for gcc-10
authorSergei Trofimovich <slyfox@gentoo.org>
Wed, 5 Feb 2020 09:38:23 +0000 (09:38 +0000)
committerSergei Trofimovich <slyfox@gentoo.org>
Wed, 5 Feb 2020 09:38:58 +0000 (09:38 +0000)
Package-Manager: Portage-2.3.87, Repoman-2.3.20
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
dev-lang/ocaml/files/ocaml-4.09.0-gcc-10.patch [new file with mode: 0644]
dev-lang/ocaml/ocaml-4.09.0.ebuild

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 (file)
index 0000000..e25d55a
--- /dev/null
@@ -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;
index c39cc2aee83d88a8e3489fdcdb86a93260f4c158..5fb59fc6617aa7bbe13a2ebd560fd9328b01d237 100644 (file)
@@ -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.