summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2016-05-01 13:58:40 +0200
committerFabian Groffen <grobian@gentoo.org>2016-05-01 13:58:40 +0200
commitd21a2403298d3aba04bd1a283a797e56d20a20e9 (patch)
tree40b440ed07702b1ba1de4d9889183b6da40f4f67
parentbzip2-1.0.6-r7: Cygwin port (diff)
downloadprefix-d21a2403.tar.gz
prefix-d21a2403.tar.bz2
prefix-d21a2403.zip
dev-libs/gmp: add fix for gcc-apple, bug #536894
Package-Manager: portage-2.2.26
-rw-r--r--dev-libs/gmp/files/gmp-6.0.0-gcc-inline-fix.patch21
-rw-r--r--dev-libs/gmp/gmp-6.1.0.ebuild1
2 files changed, 22 insertions, 0 deletions
diff --git a/dev-libs/gmp/files/gmp-6.0.0-gcc-inline-fix.patch b/dev-libs/gmp/files/gmp-6.0.0-gcc-inline-fix.patch
new file mode 100644
index 0000000000..8960464ac4
--- /dev/null
+++ b/dev-libs/gmp/files/gmp-6.0.0-gcc-inline-fix.patch
@@ -0,0 +1,21 @@
+--- gmp-6.0.0/gmp-h.in.orig 2015-01-16 22:25:51.000000000 +0100
++++ gmp-6.0.0/gmp-h.in 2015-01-16 22:26:40.000000000 +0100
+@@ -360,14 +360,14 @@
+ GCC 4.3 and above with -std=c99 or -std=gnu99 implements ISO C99
+ inline semantics, unless -fgnu89-inline is used. */
+ #ifdef __GNUC__
+-#if (defined __GNUC_STDC_INLINE__) || (__GNUC__ == 4 && __GNUC_MINOR__ == 2) \
+- || (defined __GNUC_GNU_INLINE__ && defined __cplusplus)
++#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
+ #define __GMP_EXTERN_INLINE extern __inline__ __attribute__ ((__gnu_inline__))
+-#else
++#define __GMP_INLINE_PROTOTYPES 1
++#elif !(defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && __STDC_VERSION__ >= 199901L)
+ #define __GMP_EXTERN_INLINE extern __inline__
+-#endif
+ #define __GMP_INLINE_PROTOTYPES 1
+ #endif
++#endif
+
+ /* DEC C (eg. version 5.9) supports "static __inline foo()", even in -std1
+ strict ANSI mode. Inlining is done even when not optimizing (ie. -O0
diff --git a/dev-libs/gmp/gmp-6.1.0.ebuild b/dev-libs/gmp/gmp-6.1.0.ebuild
index 55b774b329..a50f6d419a 100644
--- a/dev-libs/gmp/gmp-6.1.0.ebuild
+++ b/dev-libs/gmp/gmp-6.1.0.ebuild
@@ -39,6 +39,7 @@ src_prepare() {
elibtoolize
epatch "${FILESDIR}"/${PN}-6.1.0-noexecstack-detect.patch
+ epatch "${FILESDIR}"/${PN}-6.0.0-gcc-inline-fix.patch
# GMP uses the "ABI" env var during configure as does Gentoo (econf).
# So, to avoid patching the source constantly, wrap things up.