1 |
commit: ce669e75475c6e73dad1365857186719559ed33f |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Wed Jan 3 15:22:44 2018 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 3 15:22:55 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ce669e75 |
7 |
|
8 |
dev-libs/gmp: add patch to aid bootstrapping with old gcc on darwin |
9 |
|
10 |
Package-Manager: Portage-2.3.13, Repoman-2.3.3 |
11 |
|
12 |
dev-libs/gmp/files/gmp-6.1.2-gcc-apple-4.0.1.patch | 21 +++++++++++++++++++++ |
13 |
dev-libs/gmp/gmp-6.1.2.ebuild | 7 ++++++- |
14 |
2 files changed, 27 insertions(+), 1 deletion(-) |
15 |
|
16 |
diff --git a/dev-libs/gmp/files/gmp-6.1.2-gcc-apple-4.0.1.patch b/dev-libs/gmp/files/gmp-6.1.2-gcc-apple-4.0.1.patch |
17 |
new file mode 100644 |
18 |
index 00000000000..8960464ac4f |
19 |
--- /dev/null |
20 |
+++ b/dev-libs/gmp/files/gmp-6.1.2-gcc-apple-4.0.1.patch |
21 |
@@ -0,0 +1,21 @@ |
22 |
+--- gmp-6.0.0/gmp-h.in.orig 2015-01-16 22:25:51.000000000 +0100 |
23 |
++++ gmp-6.0.0/gmp-h.in 2015-01-16 22:26:40.000000000 +0100 |
24 |
+@@ -360,14 +360,14 @@ |
25 |
+ GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99 |
26 |
+ inline semantics, unless -fgnu89-inline is used. */ |
27 |
+ #ifdef __GNUC__ |
28 |
+-#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \ |
29 |
+- || (defined __GNUC_GNU_INLINE__ && defined __cplusplus) |
30 |
++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2) |
31 |
+ #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__)) |
32 |
+-#else |
33 |
++#define __GMP_INLINE_PROTOTYPES 1 |
34 |
++#elif !(defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && __STDC_VERSION__ >= 199901L) |
35 |
+ #define __GMP_EXTERN_INLINE extern __inline__ |
36 |
+-#endif |
37 |
+ #define __GMP_INLINE_PROTOTYPES 1 |
38 |
+ #endif |
39 |
++#endif |
40 |
+ |
41 |
+ /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1 |
42 |
+ strict ANSI mode. Inlining is done even when not optimizing (ie. -O0 |
43 |
|
44 |
diff --git a/dev-libs/gmp/gmp-6.1.2.ebuild b/dev-libs/gmp/gmp-6.1.2.ebuild |
45 |
index 266f6ce8b86..9134d5cfa90 100644 |
46 |
--- a/dev-libs/gmp/gmp-6.1.2.ebuild |
47 |
+++ b/dev-libs/gmp/gmp-6.1.2.ebuild |
48 |
@@ -1,4 +1,4 @@ |
49 |
-# Copyright 1999-2017 Gentoo Foundation |
50 |
+# Copyright 1999-2018 Gentoo Foundation |
51 |
# Distributed under the terms of the GNU General Public License v2 |
52 |
|
53 |
EAPI="5" |
54 |
@@ -39,6 +39,11 @@ src_prepare() { |
55 |
|
56 |
epatch "${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch |
57 |
|
58 |
+ # https://bugs.gentoo.org/536894 |
59 |
+ if [[ ${CHOST} == *-darwin* ]] ; then |
60 |
+ epatch "${FILESDIR}"/${PN}-6.1.2-gcc-apple-4.0.1.patch |
61 |
+ fi |
62 |
+ |
63 |
# GMP uses the "ABI" env var during configure as does Gentoo (econf). |
64 |
# So, to avoid patching the source constantly, wrap things up. |
65 |
mv configure configure.wrapped || die |