Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Add patch fixing MPIR (2.7.0.alpha12) 'configure' failure with GCC 5.…
Browse files Browse the repository at this point in the history
…x (#18247)

Reduced patch (only patching acinclude.m4) submitted upstream.
  • Loading branch information
nexttime committed Apr 26, 2015
1 parent f0f7b3a commit 764ad4e
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions build/pkgs/mpir/patches/fix_configure_with_GCC_5.x.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
Fix 'configure' test that fails with GCC 5.x just because it now defaults
to standard C inline semantics. (See Sage trac #18247.)

--- mpir-2.7.0/acinclude.m4 2014-09-14 21:59:12.000000000 +0200
+++ mpir-2.7.0/acinclude.m4 2015-04-26 19:49:14.603554112 +0200
@@ -584,6 +584,9 @@

#if defined(__GNUC__) && !defined(__clang__)
typedef unsigned long long t1;typedef t1*t2;
+#if defined(__GNUC_STDC_INLINE__) /* e.g. GCC 5.x defaults to this, not __GNUC_GNU_INLINE__ */
+extern
+#endif
__inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
--- mpir-2.7.0/configure 2014-09-14 21:59:13.000000000 +0200
+++ mpir-2.7.0/configure 2015-04-26 19:49:48.220468890 +0200
@@ -5663,6 +5663,9 @@

#if defined(__GNUC__) && !defined(__clang__)
typedef unsigned long long t1;typedef t1*t2;
+#if defined(__GNUC_STDC_INLINE__) /* e.g. GCC 5.x defaults to this, not __GNUC_GNU_INLINE__ */
+extern
+#endif
__inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;
@@ -6977,6 +6980,9 @@

#if defined(__GNUC__) && !defined(__clang__)
typedef unsigned long long t1;typedef t1*t2;
+#if defined(__GNUC_STDC_INLINE__) /* e.g. GCC 5.x defaults to this, not __GNUC_GNU_INLINE__ */
+extern
+#endif
__inline__ t1 e(t2 rp,t2 up,int n,t1 v0)
{t1 c,x,r;int i;if(v0){c=1;for(i=1;i<n;i++){x=up[i];r=x+1;rp[i]=r;}}return c;}
f(){static const struct{t1 n;t1 src[9];t1 want[9];}d[]={{1,{0},{1}},};t1 got[9];int i;

0 comments on commit 764ad4e

Please sign in to comment.