#13948: Let MPIR build with Clang
-------------------------------------------------+-------------------------
       Reporter:  jpflori                        |        Owner:  leif
           Type:  defect                         |       Status:
       Priority:  major                          |  needs_review
      Component:  packages: standard             |    Milestone:  sage-5.12
       Keywords:  spkg mpir clang                |   Resolution:
        Authors:  Jeroen Demeyer                 |    Merged in:
Report Upstream:  Reported upstream. Developers  |    Reviewers:
  acknowledge bug.                               |  Work issues:
         Branch:                                 |       Commit:
   Dependencies:                                 |     Stopgaps:
-------------------------------------------------+-------------------------

Comment (by jhpalmieri):

 I mean that if I do
 {{{
 export CFLAGS="-O2 -fomit-frame-pointer -mtune=corei7-avx
 -march=corei7-avx  -g"
 ./configure
 make
 }}}
 it finishes without error. (I haven't tried a full Sage build on top of
 this, of course.) If `CFLAGS` also includes `-m32`, then `make` fails.

 In the spkg, we could have some code like
 {{{
 #!diff
 diff --git a/spkg-install b/spkg-install
 --- a/spkg-install
 +++ b/spkg-install
 @@ -275,6 +275,12 @@
  echo "  ABI:     $user_abi"
  echo "  (CPP, CPPFLAGS, CXX and CXXFLAGS are listed below; these don't
 get modified.)"

 +# Fix bug with Xcode 5.0 on Darwin: mpir doesn't build using the -m32
 +# flag with the gcc from this version of Xcode.
 +if [ blah ]; then        # using Xcode 5.0 on Darwin
 +    mpir_cflags=...      # remove -m32 from $mpir_cflags
 +fi
 +
  # Finally: use MPIR's flags, plus those required by Sage for the
  # package to build properly, plus those specified by the user.
  CFLAGS="$mpir_cflags $required_cflags $user_cflags"
 }}}
 I have no idea if this is actually a good idea, though.

--
Ticket URL: <http://trac.sagemath.org/ticket/13948#comment:28>
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.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to