id,summary,reporter,owner,description,type,status,priority,milestone,component,resolution,keywords,cc,work_issues,upstream,reviewer,author,merged,dependencies,stopgaps
12830,Work around GCC 4.7.0 bug on ia64 and improve the GMP-ECM spkg,leif,leif,"GCC 4.7.0 is broken on ia64 (Itanium), which also affects the GMP-ECM spkg (cf. #12751).

----

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.p7.spkg]

'''md5sum:''' `a5e9a4b47d30c4aba2c77ada47579e1a  ecm-6.3.p7.spkg`


=== ecm-6.3.p7 (Leif Leonhardy, April 19th 2012) ===
 * #12830: Add `-m[no-]power*` to the processor-specific options recognized;
   these are used to enable/disable specific instruction set extensions of the
   POWER and PowerPC (PPC) CPUs. 

=== ecm-6.3.p6 (Leif Leonhardy, April 16th 2012) ===
 * #12830: Add a work-around for GCC 4.7.x on ia64 (Itanium), since GMP-ECM
   currently won't build with that and anything but `-O0` on that platform.
 * Use `\{1,\}` instead of `\+` in `sed` patterns, which is more portable.
 * Also support newer system-wide MPIR installations for printing their
   settings.
 * Use `patch` to apply patches.  Since the pre-patched `configure` in
   `patches/` was created with a newer version of autotools (or, rather, the
   original `configure` was created with an outdated version), the patch would
   have been almost as large as the patched `configure` file itself.  Hence
   I `autoreconf`ed the source tree with a patched `configure.in` (and almost
   the latest versions of autotools), then created a patch to `configure`
   from the resulting file(s).  Note that therefore `src/` isn't really vanilla
   any more, although just the auto-generated files differ (which are still
   made from vanilla upstream sources, including `configure.in`).
   Add a ""Patches"" subsection and update ""Special Update/Build Instructions"".
   Remove files in `patches/` from `.hgignore` (and also remove pre-patched
   files from that directory); the patch to `configure` and the diff of
   `configure.in` are [now] under revision control, which IMHO makes sense.
 * Beautify (and simplify) the output with respect to options passed to
   `configure`; print the settings of a few more environment variables that
   GMP-ECM uses (in case they're set); add some messages, also mention
   `--enable-assert` etc. if `SAGE_DEBUG=yes`.
 * Remove unused test for GCC.

=== 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.

",enhancement,closed,blocker,sage-5.0,packages: standard,fixed,spkg -march=native assembler error Darwin MacOS __GMP_CFLAGS __MPIR_CFLAGS gmp.h GCC 4.7.0 ia64 Itanium bug impossible reload,hedtke justin,,N/A,Jeroen Demeyer,Leif Leonhardy,sage-5.0.rc0,,
