aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Daudt <kdaudt@alpinelinux.org>2020-09-01 20:12:01 +0000
committerKevin Daudt <kdaudt@alpinelinux.org>2020-09-01 20:12:01 +0000
commit26ca56d8dbbb3f8e3c00688425f17634201b07df (patch)
treed9441eb617b1303484e2fb2f3e3954d9aab57e7a
parent123073a6f9ab30df36b06696f4ec29a310515e51 (diff)
community/ocaml: fix -fno-common build issues
-rw-r--r--community/ocaml/APKBUILD4
-rw-r--r--community/ocaml/fix-fnocommon-duplicate-definition.patch29
2 files changed, 32 insertions, 1 deletions
diff --git a/community/ocaml/APKBUILD b/community/ocaml/APKBUILD
index e8553e4203b..19d4da72e13 100644
--- a/community/ocaml/APKBUILD
+++ b/community/ocaml/APKBUILD
@@ -23,6 +23,7 @@ source="http://caml.inria.fr/pub/distrib/ocaml-${pkgver%.*}/$pkgname-$pkgver.tar
fix-mcontext-fields.patch
fix-segfault-in-ppc64le.patch
fix-check-parser-uptodate-or-warn.sh.patch
+ fix-fnocommon-duplicate-definition.patch
"
builddir="$srcdir/$pkgname-$pkgver"
@@ -122,4 +123,5 @@ sha512sums="8239c1879926e59c3d9611ad0d97618ce21b0528f1bd59db3df9c24287ad180ffa74
49cbd6df3a70d00df33d34ab4508dd04d52cbc94efc6c8cac8668758e7346be3c7acedf5b8af38a0adb18c69b8d0859667b12cc11699002c048af962cf283ad2 compile-without-debug-info.patch
e853f609006bd2514bbf63cf9215150496ec62ceee3e55f6f719b19453c97251ad935245578528fab798e626dab5a6c4e2fd5fb652f99ddd5cfd261ac0c4c9bb fix-mcontext-fields.patch
e65b647427d9c94933d5be97857daf8cdc65e25c10066740dbcbab7a4e6f8ddb2277ee7d5796abf5916e5bdd59b057de736190432c480fc8ff2a4b2a94d46eca fix-segfault-in-ppc64le.patch
-b3362906c23ecdb084db7dbf18cae22f0a54ba968f1ecf9c8d13c230ca221b3f77fa820a52e091ce7b71b1cb4a91faf1346692aa6fa411bb46fca784500def25 fix-check-parser-uptodate-or-warn.sh.patch"
+b3362906c23ecdb084db7dbf18cae22f0a54ba968f1ecf9c8d13c230ca221b3f77fa820a52e091ce7b71b1cb4a91faf1346692aa6fa411bb46fca784500def25 fix-check-parser-uptodate-or-warn.sh.patch
+22b6aba45bba33707f1effc2c0690b2ffa1c3c00fb8fab896d99ab80da704a424b705d5a51cd01471c3caba8ad47a58aac72a6eec0adcf1ff594fbbabd4d194f fix-fnocommon-duplicate-definition.patch"
diff --git a/community/ocaml/fix-fnocommon-duplicate-definition.patch b/community/ocaml/fix-fnocommon-duplicate-definition.patch
new file mode 100644
index 00000000000..784db62d8bf
--- /dev/null
+++ b/community/ocaml/fix-fnocommon-duplicate-definition.patch
@@ -0,0 +1,29 @@
+Reason: gcc-10 defaults to -fno-common, which results in errors when
+global variables are defined multiple times.
+Upstream: no
+diff --git a/runtime/backtrace.c b/runtime/backtrace.c
+index a3c2c08..0a3ea33 100644
+--- 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;
+diff --git a/runtime/startup_nat.c b/runtime/startup_nat.c
+index 43b85e3..a5479de 100644
+--- a/runtime/startup_nat.c
++++ b/runtime/startup_nat.c
+@@ -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;
+ struct ext_table caml_code_fragments_table;
+