Bill Hart wrote:
That doesn't surprise me. Autotools is not designed to ensure that
software builds on a variety of systems or anything outrageous like
that. :-)

I'll add it to the list of things to try and fix for the next release.
Though I don't have access to that platform either.

Attached patch (against released 2.6.0's) acinclude.m4 fixes the issue.

With that, 'make checked' passed for me on Linux (different clang 3.x versions) and even with Apple's old clang 1.7 on MacOS X 10.6.8.


-leif

[Related thread: http://groups.google.com/group/mpir-devel/browse_thread/thread/7888d9a026432871 ]

--
() The ASCII Ribbon Campaign
/\   Help Cure HTML E-Mail

--
You received this message because you are subscribed to the Google Groups 
"mpir-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mpir-devel+unsubscr...@googlegroups.com.
To post to this group, send email to mpir-devel@googlegroups.com.
Visit this group at http://groups.google.com/group/mpir-devel?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


--- mpir-2.6.0-final/acinclude.m4.orig	2012-10-23 16:56:46.000000000 +0200
+++ mpir-2.6.0-final/acinclude.m4	2013-01-08 16:05:12.875827761 +0100
@@ -480,9 +480,9 @@
 # first see a simple "main()" works, then go on to other checks
 GMP_PROG_CC_WORKS_PART([$1], [])
 
-GMP_PROG_CC_WORKS_PART_MAIN([$1], [gcc-4.3.2 on 64bit is bad , try -O1 or -fno-strict-aliasing for the flags],
-[/* The following aborts with gcc-4.3.2 on a 64bit system which is an unusable compiler */
-#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
+GMP_PROG_CC_WORKS_PART_MAIN([$1], [gcc-4.3.2 on 64-bit is bad, try -O1 or -fno-strict-aliasing for the flags],
+[/* The following aborts with gcc-4.3.2 on a 64-bit system which is an unusable compiler */
+#if defined(__GNUC__) && !defined(__INTEL_COMPILER) && !defined(__clang__)
 int __attribute__((noinline))
 foo(int i)
 {
@@ -566,9 +566,9 @@
 GMP_PROG_CC_WORKS_PART([$1], [long long reliability test 1],
 [/* The following provokes a segfault in the compiler on powerpc-apple-darwin.
    Extracted from tests/mpn/t-iord_u.c.  Causes Apple's gcc 3.3 build 1640 and
-   1666 to segfault with e.g., -O2 -mpowerpc64.  */
+   1666 to segfault with, e.g., -O2 -mpowerpc64. */
 
-#ifdef __GNUC__
+#if	defined(__GNUC__) && !defined(__clang__)
 typedef unsigned long long t1;typedef t1*t2;
 __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;}

Reply via email to