#13948: Let MPIR build with Clang
--------------------------------------+-------------------------------------
       Reporter:  jpflori             |         Owner:  leif     
           Type:  defect              |        Status:  new      
       Priority:  major               |     Milestone:  sage-5.10
      Component:  packages: standard  |    Resolution:           
       Keywords:  spkg mpir clang     |   Work issues:           
Report Upstream:  N/A                 |     Reviewers:           
        Authors:                      |     Merged in:           
   Dependencies:  #13137              |      Stopgaps:           
--------------------------------------+-------------------------------------

Comment (by leif):

 And that's the corresponding one against ''upstream's'' `acinclude.m4`:
 {{{
 #!patch
 --- mpir-2.6.0/acinclude.m4     2012-10-23 16:56:46.000000000 +0200
 +++ mpir-2.6.0/acinclude.m4     2013-01-08 22:14:36.895834719 +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;}
 }}}

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13948#comment:4>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

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


Reply via email to