1 |
commit: f30c216790959e23260ddb19c0b55e19f3f18c5b |
2 |
Author: Sam James <sam <AT> gentoo <DOT> org> |
3 |
AuthorDate: Tue Sep 7 00:19:48 2021 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Sep 7 00:19:48 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f30c2167 |
7 |
|
8 |
dev-libs/libtommath: add sparc patch from upstream |
9 |
|
10 |
Closes: https://bugs.gentoo.org/781938 |
11 |
See: https://github.com/libtom/libtommath/issues/509 |
12 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
13 |
|
14 |
.../libtommath/files/libtommath-1.2.0-sparc.patch | 22 ++++++++++++++++++++++ |
15 |
dev-libs/libtommath/libtommath-1.2.0.ebuild | 4 ++++ |
16 |
2 files changed, 26 insertions(+) |
17 |
|
18 |
diff --git a/dev-libs/libtommath/files/libtommath-1.2.0-sparc.patch b/dev-libs/libtommath/files/libtommath-1.2.0-sparc.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..3ed8aedf398 |
21 |
--- /dev/null |
22 |
+++ b/dev-libs/libtommath/files/libtommath-1.2.0-sparc.patch |
23 |
@@ -0,0 +1,22 @@ |
24 |
+https://bugs.gentoo.org/781938 |
25 |
+https://github.com/libtom/libtommath/issues/509 |
26 |
+https://github.com/libtom/libtommath/pull/510 (didn't apply) |
27 |
+https://github.com/tcltk/tcl/commit/dadb2c18d0b1b2bd26628aded323e9df4566d463 |
28 |
+ |
29 |
+From: "jan.nijtmans" <nijtmans@×××××××××××××××××.net> |
30 |
+Date: Wed, 14 Jul 2021 15:54:56 +0000 |
31 |
+Subject: [PATCH] Fix build on Linux/Sparc with 32 bit userspace. See: |
32 |
+ [https://github.com/libtom/libtommath/issues/509] for the upstream libtommath |
33 |
+ fix |
34 |
+ |
35 |
+--- a/tommath.h |
36 |
++++ b/tommath.h |
37 |
+@@ -45,7 +45,7 @@ extern "C" { |
38 |
+ defined(__ia64) || defined(__ia64__) || defined(__itanium__) || defined(_M_IA64) || \ |
39 |
+ defined(__LP64__) || defined(_LP64) || defined(__64BIT__) |
40 |
+ # if !(defined(MP_64BIT) || defined(MP_32BIT) || defined(MP_16BIT) || defined(MP_8BIT)) |
41 |
+-# if defined(__GNUC__) && !defined(__hppa) |
42 |
++# if defined(__GNUC__) && defined(__SIZEOF_INT128__) && !defined(__hppa) |
43 |
+ /* we support 128bit integers only via: __attribute__((mode(TI))) */ |
44 |
+ # define MP_64BIT |
45 |
+ # else |
46 |
|
47 |
diff --git a/dev-libs/libtommath/libtommath-1.2.0.ebuild b/dev-libs/libtommath/libtommath-1.2.0.ebuild |
48 |
index e65ded25c03..fd90c3f2981 100644 |
49 |
--- a/dev-libs/libtommath/libtommath-1.2.0.ebuild |
50 |
+++ b/dev-libs/libtommath/libtommath-1.2.0.ebuild |
51 |
@@ -16,6 +16,10 @@ IUSE="doc examples static-libs" |
52 |
|
53 |
BDEPEND="sys-devel/libtool" |
54 |
|
55 |
+PATCHES=( |
56 |
+ "${FILESDIR}"/${P}-sparc.patch |
57 |
+) |
58 |
+ |
59 |
src_prepare() { |
60 |
default |