#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:              
----------------------------------------------------------------------------------------------------+
Changes (by {'newvalue': u'Leif Leonhardy', 'oldvalue': ''}):

 * cc: hedtke, justin (added)
  * status:  new => needs_review
  * author:  => Leif Leonhardy


Old description:

> Adding `-march=native` to `CFLAGS` may lead to assembler errors, e.g. on
> MacOS X with newer GCCs on newer CPUs (e.g. such supporting AVX, which
> Apple's assembler currently doesn't).
>
> Newer versions of MPIR don't define `__GMP_CFLAGS` (in `gmp.h`) to a
> ''string literal'', but instead to a ''preprocessor macro''
> (`__MPIR_CFLAGS`), which in turn is defined to the string we want.

New description:

 Adding `-march=native` to `CFLAGS` may lead to assembler errors, e.g. on
 MacOS X with newer GCCs on newer CPUs (e.g. such supporting AVX, which
 Apple's assembler currently doesn't).

 Newer versions of MPIR don't define `__GMP_CFLAGS` (in `gmp.h`) to a
 ''string literal'', but instead to a ''preprocessor macro''
 (`__MPIR_CFLAGS`), which in turn is defined to the string we want.

 ----

 '''New spkg:'''
 [http://boxen.math.washington.edu/home/leif/Sage/spkgs/ecm-6.3.p5.spkg]

 '''md5sum:''' `dd60d1fb3e6c0e1dbcfeab40ef7faff2  ecm-6.3.p5.spkg`


 === ecm-6.3.p5 (Leif Leonhardy, April 11th 2012) ===
  * #12830: Don't add `-march=native` if the assembler doesn't understand
 the
    instructions the compiler emits with that.  (E.g. the Apple/XCode
 assembler
    on Darwin doesn't yet support AVX.)
  * Fix extraction of `__GMP_CC` and `__GMP_CFLAGS` (from `gmp.h`) for
 newer
    versions of MPIR, which define these to preprocessor macros rather than
    strings.
  * Redirect warnings and error messages to `stderr`; add some messages.
  * Correct `SPKG.txt` w.r.t. applied patches.

--

Comment:

 This new spkg (also) fixes issues (i.e., assembler errors) on MacOS X with
 the GCC spkg.

 Please test and review!

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/12830#comment:1>
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