Ticket #14151: ecm-6.4.4.diff

File ecm-6.4.4.diff, 9.6 KB (added by jdemeyer, 7 years ago)
  • SPKG.txt

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1365692207 -7200
    # Node ID 45523e19e2a6319c413b733b5f282613ca7e7cf7
    # Parent  e0526d3d4e4ba55261bb443364618e775c7bb691
    Trac #14151: upgrade to GMP-ECM 6.4.4, remove all Sage patches
    
    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    88
    99== License ==
    1010
    11 LGPL V2+
     11LGPL V3+
    1212
    1313== SPKG Maintainers ==
    1414
    15  * William Stein
     15 * Jeroen Demeyer
    1616
    1717== Upstream Contact ==
    1818
     
    2525
    2626== Special Update/Build Instructions ==
    2727
    28  * src/ contains "stable" upstream code, to which we currently apply a single
    29    upstream patch (to 'configure'). The patch should be removed on the next
    30    upgrade to a stable release.
    31    Note that all autotools-generated files (and their support files) in src/
    32    have been regenerated with newer versions of autotools (autoconf 2.68,
    33    automake 1.11.3 and libtool 2.4.2), to make the size of the patch to the
    34    also generated `configure` acceptable.  (See "Patches" section below for
    35    why we don't patch `configure.in`, from which `configure` is created.)
    3628 * GMP-ECM comes with a self-tuning feature; we could support
    3729   that as an option ($SAGE_TUNE_*=yes) in the future.
    3830 * We currently work around a linker bug on MacOS X 10.5 PPC (with
     
    5446   "-mcpu=...", and perhaps pass a more generic "--host=..." to
    5547   'configure'. (MPIR honors '--enable-fat' to some extent, but this
    5648   option isn't used on anything other than x86 / x86_64.)
    57  * We could save some space by removing the `src/build.vc9/` directory which
     49 * We could save some space by removing the `src/build.vc10/` directory which
    5850   isn't used in Sage.  (It gets probably more worth in case also directories /
    5951   files for later versions of Microsoft Visual C get added.)
    6052
    6153=== Patches ===
    62  * configure.patch:
    63    - Disable "asm-redc" on 32-bit Darwin PPCs (upstream revision 1516 / bug
    64      #10646).
    65      (Note that this upstream patch is likely to slow down GMP-ECM on 64-bit
    66      PPC CPUs running (32-bit) MacOS X, since the extended instruction set of
    67      the CPU is no longer exploitet.  A proper fix would just pass an option
    68      to Apple's assembler to allow the use of the extended instruction set.) 
    69    - Fix compilation error on x86 CPUs supporting SSE2. (Sage trac #10252,
    70      upstream revision 1546).
    71    Note that we don't patch `configure.in`, since it is only needed to generate
    72    automatically-generated files in the source tree.  Patching `configure.in`
    73    would force `automake` to be run, which could cause build failures on
    74    systems where autotools aren't installed.
    75 
     54 * Currently none
    7655
    7756== Changelog ==
    7857
     58=== ecm-6.4.4 (Jeroen Demeyer, 11 April 2013) ===
     59 * Trac #14151: upgrade to GMP-ECM 6.4.4, remove all Sage patches
     60   since they are upstream now.
     61
    7962=== ecm-6.3.p8 (Jeroen Demeyer, 28 May 2012) ===
    8063 * Trac #12751: remove the gcc-4.7.0 workaround for ia64 since this bug
    8164   has been fixed in gcc-4.7.1 and we will not support building Sage
  • deleted file patches/configure.in.diff

    diff --git a/patches/configure.in.diff b/patches/configure.in.diff
    deleted file mode 100644
    + -  
    1 --- configure.in.orig   2010-04-18 22:03:10.000000000 +0200
    2 +++ configure.in        2010-11-23 20:03:33.000000000 +0100
    3 @@ -195,7 +195,7 @@
    4  # asm_redc enabled by default for x86_64 and 64 bit PowerPC
    5  if test "x$enable_asm_redc" = x; then
    6    case $host in
    7 -    x86_64* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
    8 +    x86_64*-*-* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
    9      *) enable_asm_redc=no;;
    10    esac
    11  fi
    12 @@ -203,8 +203,18 @@
    13  if test "x$enable_asm_redc" = xyes; then
    14    case $host in
    15      pentium4-*-* | pentium3-*-* | viac7-*-* | i786-*-*) ASMPATH=pentium4;;
    16 -    x86_64-*-*)  ASMPATH=x86_64;;
    17 -    powerpc-apple-darwin*) ASMPATH=powerpc64;;
    18 +    x86_64*-*-*)  ASMPATH=x86_64;;
    19 +# warning: with powerpc-apple-darwin* we can have ABI=32
    20 +# see bug #10646 on the bug tracker, where config.guess says
    21 +# powerpc-apple-darwin8.11.0 (this a 64-bit machine, but most applications
    22 +# are compiled in 32 bits). It works with --disable-asm-redc.
    23 +    powerpc-apple-darwin*)
    24 +AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
    25 +#if defined(__ppc__)
    26 +#error
    27 +#endif])], [], [AC_MSG_NOTICE([32-bit PowerPC, disabling asm-redc])
    28 +                enable_asm_redc=no])
    29 +                          ASMPATH=powerpc64;;
    30      powerpc64-*-linux*)
    31                           ECM_INCLUDE([<"$srcdir"/powerpc64/powerpc-defs.m4>])
    32                           ASMPATH=powerpc64;;
    33 @@ -213,7 +223,9 @@
    34                           ASMPATH=athlon;;
    35      *) AC_MSG_ERROR([[asm redc not available on this machine $host]]);;
    36    esac
    37 +fi
    38  
    39 +if test "x$enable_asm_redc" = xyes; then
    40  # do the necessary definitions and includes
    41    AC_DEFINE([NATIVE_REDC],1,[Define to 1 to use asm redc])
    42    test "x$CCAS" != x || CCAS="$CC -c"
    43 @@ -275,9 +287,9 @@
    44    AC_MSG_CHECKING([for SSE2 support])
    45    m4_define([SSE2_TEST_PROG], [AC_LANG_PROGRAM([], dnl
    46  [#if (defined(__GNUC__) || defined(__ICL)) && defined(__i386__)
    47 -/* When there are no constraints, registers are referred to by
    48 -   single % sign, not double. Argh */
    49 -asm volatile ("pmuludq %xmm2, %xmm0");
    50 +/* On some machines, a program without constraints may pass without -msse2 but
    51 +   those with constraints in spv.c fail, thus we test with constraints here. */
    52 +asm volatile ("pmuludq %%xmm2, %%xmm0" : : :"%xmm0");
    53  #else
    54  #error
    55  #IRIXdoesnotexitaterrordirective
  • deleted file patches/configure.patch

    diff --git a/patches/configure.patch b/patches/configure.patch
    deleted file mode 100644
    + -  
    1 --- src/configure       2012-04-16 21:51:42.586783117 +0200
    2 +++ src-patched/configure       2012-04-16 22:13:59.096783235 +0200
    3 @@ -12343,7 +12343,7 @@
    4  # asm_redc enabled by default for x86_64 and 64 bit PowerPC
    5  if test "x$enable_asm_redc" = x; then
    6    case $host in
    7 -    x86_64* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
    8 +    x86_64*-*-* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
    9      *) enable_asm_redc=no;;
    10    esac
    11  fi
    12 @@ -12351,8 +12351,35 @@
    13  if test "x$enable_asm_redc" = xyes; then
    14    case $host in
    15      pentium4-*-* | pentium3-*-* | viac7-*-* | i786-*-*) ASMPATH=pentium4;;
    16 -    x86_64-*-*)  ASMPATH=x86_64;;
    17 -    powerpc-apple-darwin*) ASMPATH=powerpc64;;
    18 +    x86_64*-*-*)  ASMPATH=x86_64;;
    19 +# warning: with powerpc-apple-darwin* we can have ABI=32
    20 +# see bug #10646 on the bug tracker, where config.guess says
    21 +# powerpc-apple-darwin8.11.0 (this a 64-bit machine, but most applications
    22 +# are compiled in 32 bits). It works with --disable-asm-redc.
    23 +    powerpc-apple-darwin*)
    24 +cat confdefs.h - <<_ACEOF >conftest.$ac_ext
    25 +/* end confdefs.h.  */
    26 +
    27 +#if defined(__ppc__)
    28 +#error
    29 +#endif
    30 +int
    31 +main ()
    32 +{
    33 +
    34 +  ;
    35 +  return 0;
    36 +}
    37 +_ACEOF
    38 +if ac_fn_c_try_cpp "$LINENO"; then :
    39 +
    40 +else
    41 +  { $as_echo "$as_me:${as_lineno-$LINENO}: 32-bit PowerPC, disabling asm-redc" >&5
    42 +$as_echo "$as_me: 32-bit PowerPC, disabling asm-redc" >&6;}
    43 +                enable_asm_redc=no
    44 +fi
    45 +rm -f conftest.err conftest.i conftest.$ac_ext
    46 +                          ASMPATH=powerpc64;;
    47      powerpc64-*-linux*)
    48  
    49  echo "include(<"$srcdir"/powerpc64/powerpc-defs.m4>)" >> $gmp_tmpconfigm4
    50 @@ -12363,7 +12390,9 @@
    51                           ASMPATH=athlon;;
    52      *) as_fn_error $? "asm redc not available on this machine $host" "$LINENO" 5;;
    53    esac
    54 +fi
    55  
    56 +if test "x$enable_asm_redc" = xyes; then
    57  # do the necessary definitions and includes
    58  
    59  $as_echo "#define NATIVE_REDC 1" >>confdefs.h
    60 @@ -12684,9 +12713,9 @@
    61  main ()
    62  {
    63  #if (defined(__GNUC__) || defined(__ICL)) && defined(__i386__)
    64 -/* When there are no constraints, registers are referred to by
    65 -   single % sign, not double. Argh */
    66 -asm volatile ("pmuludq %xmm2, %xmm0");
    67 +/* On some machines, a program without constraints may pass without -msse2 but
    68 +   those with constraints in spv.c fail, thus we test with constraints here. */
    69 +asm volatile ("pmuludq %%xmm2, %%xmm0" : : :"%xmm0");
    70  #else
    71  #error
    72  #IRIXdoesnotexitaterrordirective
    73 @@ -12708,9 +12737,9 @@
    74  main ()
    75  {
    76  #if (defined(__GNUC__) || defined(__ICL)) && defined(__i386__)
    77 -/* When there are no constraints, registers are referred to by
    78 -   single % sign, not double. Argh */
    79 -asm volatile ("pmuludq %xmm2, %xmm0");
    80 +/* On some machines, a program without constraints may pass without -msse2 but
    81 +   those with constraints in spv.c fail, thus we test with constraints here. */
    82 +asm volatile ("pmuludq %%xmm2, %%xmm0" : : :"%xmm0");
    83  #else
    84  #error
    85  #IRIXdoesnotexitaterrordirective
  • spkg-install

    diff --git a/spkg-install b/spkg-install
    a b  
    1111# Apply patches (if any):
    1212###############################################################################
    1313
    14 ls ../patches/*.patch &>/dev/null &&
    15 echo "Applying patches to upstream sources..." &&
     14# Apply patches.  See SPKG.txt for information about what each patch
     15# does.
    1616for patch in ../patches/*.patch; do
    17     basename "$patch"
     17    [ -r "$patch" ] || continue  # Skip non-existing or non-readable patches
    1818    patch -p1 <"$patch"
    1919    if [ $? -ne 0 ]; then
    20         echo >&2 "Error: '$patch' failed to apply."
     20        echo >&2 "Error applying '$patch'"
    2121        exit 1
    2222    fi
    23 done &&
    24 echo
     23done
    2524
    2625###############################################################################
    2726# Set up environment variables, depending on SAGE_* settings:
     
    214213              # necessary.  We currently don't set (or modify) any other
    215214              # environment variables, so don't have to export them here.
    216215
    217 unset RM
    218216
    219217###############################################################################
    220218# Now configure ECM: