#12830: Improve handling of CFLAGS in GMP-ECM's spkg-install
----------------------------------------------------------------------------------------------------+
       Reporter:  leif                                                          
                    |         Owner:  leif        
           Type:  enhancement                                                   
                    |        Status:  needs_review
       Priority:  major                                                         
                    |     Milestone:  sage-5.0    
      Component:  packages                                                      
                    |    Resolution:              
       Keywords:  spkg -march=native assembler error Darwin MacOS __GMP_CFLAGS 
__MPIR_CFLAGS gmp.h  |   Work issues:              
Report Upstream:  N/A                                                           
                    |     Reviewers:              
        Authors:  Leif Leonhardy                                                
                    |     Merged in:              
   Dependencies:                                                                
                    |      Stopgaps:              
----------------------------------------------------------------------------------------------------+

Comment (by jdemeyer):

 Concerning `march=native`: what do you think about using `testcflags.sh`
 for this?  Let's add
 {{{
 unsigned long fancy_insns() { return (unsigned long) d; }
 }}}
 to the program that `testcflags.sh` uses to check flags.

 Then we could do something like
 {{{
 if testcflags.sh -march=native >/dev/null; then
     CFLAGS="-march=native $CFLAGS"
 elif testcflags.sh "-march=native -mno-avx" >/dev/null; then
     echo >&2 "Warning bla bla"
     CFLAGS="-march=native -mno-avx $CFLAGS"
 fi

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12830#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 post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to