diff options
author | Mike Sullivan <mksully22@gmail.com> | 2018-07-09 16:17:10 +0000 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2018-07-09 18:42:11 +0200 |
commit | 05dd7c6c47be9dba205c21ab5a287d7c624ab700 (patch) | |
tree | 53eff83b435017afcf23195d22ff41156cd1833a /testing/ocaml-dtoa | |
parent | a90cf30944fe6ed4b3cd5fb3bd523573459dd3c9 (diff) | |
download | aports-05dd7c6c47be9dba205c21ab5a287d7c624ab700.tar.bz2 aports-05dd7c6c47be9dba205c21ab5a287d7c624ab700.tar.xz |
testing/ocaml-dtoa: avoid link error in flow package on ppc64
Diffstat (limited to 'testing/ocaml-dtoa')
-rw-r--r-- | testing/ocaml-dtoa/APKBUILD | 9 | ||||
-rw-r--r-- | testing/ocaml-dtoa/bignum_align-noinline.patch | 26 |
2 files changed, 32 insertions, 3 deletions
diff --git a/testing/ocaml-dtoa/APKBUILD b/testing/ocaml-dtoa/APKBUILD index fe176a2dae..8ce6bad83d 100644 --- a/testing/ocaml-dtoa/APKBUILD +++ b/testing/ocaml-dtoa/APKBUILD @@ -3,7 +3,7 @@ pkgname=ocaml-dtoa _pkgname=dtoa pkgver=0.3.1 -pkgrel=0 +pkgrel=1 pkgdesc="double-to-ascii ocaml implementation" url="https://github.com/flowtype/ocaml-dtoa" arch="all !x86 !armhf !s390x" # limited by ocaml aport @@ -12,7 +12,9 @@ depends="ocaml-runtime" checkdepends="ocaml-ounit-dev" makedepends="dune ocaml ocaml-findlib opam" subpackages="$pkgname-dev" -source="https://github.com/flowtype/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz" +source="https://github.com/flowtype/$pkgname/archive/v$pkgver/$pkgname-$pkgver.tar.gz + bignum_align-noinline.patch + " builddir="$srcdir/$pkgname-$pkgver" build() { @@ -53,4 +55,5 @@ dev() { mv *.cmx *.cmxa *.mli "$subpkgdir"/$sitelib/ } -sha512sums="25eb4f867759a37b42352ca43d5afeecf9baf9b2d9aa8c763dbae3e89581e960bd93ac02e497ac2053d56c1f851d5a8566a65652f9fd9fc6d2c66c525bd60fd2 ocaml-dtoa-0.3.1.tar.gz" +sha512sums="25eb4f867759a37b42352ca43d5afeecf9baf9b2d9aa8c763dbae3e89581e960bd93ac02e497ac2053d56c1f851d5a8566a65652f9fd9fc6d2c66c525bd60fd2 ocaml-dtoa-0.3.1.tar.gz +b5974d89debc14fb0beeb31a08d4a3d82298336488fc907005bcc2fcb1c5a1df12bc2b596956809f4982d9125995d01f08312f5591bd8857c6f0b136bf9aeb25 bignum_align-noinline.patch" diff --git a/testing/ocaml-dtoa/bignum_align-noinline.patch b/testing/ocaml-dtoa/bignum_align-noinline.patch new file mode 100644 index 0000000000..1968f253d7 --- /dev/null +++ b/testing/ocaml-dtoa/bignum_align-noinline.patch @@ -0,0 +1,26 @@ +From: Mike Sullivan <mksully22@gmail.com> +Date: Mon, 9 Jul 2018 16:17:10 +0000 +Subject: [PATCH] Avoid flow link error on ppc64 by eliminating bignum_align inlining + +The libtoa_stubs.a library created when building ocaml-dtoa on ppc64le +contains the bignum_align.part.4 section created by the compiler +optimizing the bignum_align(). This causes the linking against the +library on ppc64le to report errors like we see when building the +flow package. For example: + + /usr/lib/gcc/powerpc64le-alpine-linux-musl/6.4.0/../../../../powerpc64le-alpine-linux-musl/bin/ld: /usr/lib/ocaml/lwt/liblwt_unix_stubs.a(unix_lseek_job.o): In function `result_lseek': + /home/buildozer/aports/testing/ocaml-lwt/src/lwt-3.2.1/_build/default/src/unix/unix_lseek_job.c:113:(.text+0xb8): call to `result_lseek.part.0' lacks nop, can't restore toc; (-mcmodel=small toc adjust stub) + /usr/lib/gcc/powerpc64le-alpine-linux-musl/6.4.0/../../../../powerpc64le-alpine-linux-musl/bin/ld: /usr/lib/ocaml/lwt/liblwt_unix_stubs.a(unix_lseek_job.o): In function `result_lseek_64': + /home/buildozer/aports/testing/ocaml-lwt/src/lwt-3.2.1/_build/default/src/unix/unix_lseek_job.c:134:(.text+0x134): call to `result_lseek_64.part.1' lacks nop, can't restore toc; (-mcmodel=small toc adjust stub) + +--- a/src/bignum.c 2018-07-09 14:12:25.025413017 +0000 ++++ b/src/bignum.c 2018-07-09 14:13:23.210604404 +0000 +@@ -86,7 +86,7 @@ + } + + +-void bignum_align(bignum* num, bignum other) { ++__attribute__((noinline)) void bignum_align(bignum* num, bignum other) { + if (num->exponent > other.exponent) { + // If "X" represents a "hidden" digit (by the exponent) then we are in the + // following case (a == this, b == other): |