Ticket #5847: ecm-6.3.p1.patch

File ecm-6.3.p1.patch, 6.0 KB (added by jdemeyer, 8 years ago)

patch from p0 to p1, for review

  • .hgignore

    # HG changeset patch
    # User Jeroen Demeyer <jdemeyer@cage.ugent.be>
    # Date 1289385896 -3600
    # Node ID 1934e6312f15cfb4e2de6c7c0f67bb82b2f9f0eb
    # Parent  584b01945066ad04225d9ed55abb919d1547df11
    #5847: Apply a patch from upstream to configure.in to fix compilation on 32-bit PowerPC processors
    
    diff -r 584b01945066 -r 1934e6312f15 .hgignore
    a b  
    11src
     2patches/configure
     3patches/configure.in
  • SPKG.txt

    diff -r 584b01945066 -r 1934e6312f15 SPKG.txt
    a b  
    3030
    3131== Changelog ==
    3232
     33=== ecm-6.3.p1 (Jeroen Demeyer, November 10th, 2010) ===
     34 * Apply a patch from upstream to configure.in to fix compilation
     35   on 32-bit PowerPC processors.
     36
    3337=== ecm-6.3.p0 (Leif Leonhardy, November 4th, 2010) ===
    3438 * #5847: Reviewer patch applied to Mike's spkg (upgrade to 6.3)
    3539 * There are no patches, but to avoid confusion with the previous
  • new file patches/configure.patch

    diff -r 584b01945066 -r 1934e6312f15 patches/configure.patch
    - +  
     1diff -r -u src.old/configure src/configure
     2--- src.old/configure   2010-04-18 22:17:12.000000000 +0200
     3+++ src/configure       2010-11-10 11:21:04.000000000 +0100
     4@@ -12340,7 +12340,7 @@
     5 # asm_redc enabled by default for x86_64 and 64 bit PowerPC
     6 if test "x$enable_asm_redc" = x; then
     7   case $host in
     8-    x86_64* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
     9+    x86_64*-*-* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
     10     *) enable_asm_redc=no;;
     11   esac
     12 fi
     13@@ -12348,8 +12348,59 @@
     14 if test "x$enable_asm_redc" = xyes; then
     15   case $host in
     16     pentium4-*-* | pentium3-*-* | viac7-*-* | i786-*-*) ASMPATH=pentium4;;
     17-    x86_64-*-*)  ASMPATH=x86_64;;
     18-    powerpc-apple-darwin*) ASMPATH=powerpc64;;
     19+    x86_64*-*-*)  ASMPATH=x86_64;;
     20+# warning: with powerpc-apple-darwin* we can have ABI=32
     21+# see bug #10646 on the bug tracker, where config.guess says
     22+# powerpc-apple-darwin8.11.0 (this a 64-bit machine, but most applications
     23+# are compiled in 32 bits). It works with --disable-asm-redc.
     24+    powerpc-apple-darwin*)
     25+cat >conftest.$ac_ext <<_ACEOF
     26+/* confdefs.h.  */
     27+_ACEOF
     28+cat confdefs.h >>conftest.$ac_ext
     29+cat >>conftest.$ac_ext <<_ACEOF
     30+/* end confdefs.h.  */
     31+
     32+#if defined(__ppc__)
     33+#error
     34+#endif
     35+int
     36+main ()
     37+{
     38+
     39+  ;
     40+  return 0;
     41+}
     42+_ACEOF
     43+if { (ac_try="$ac_cpp conftest.$ac_ext"
     44+case "(($ac_try" in
     45+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     46+  *) ac_try_echo=$ac_try;;
     47+esac
     48+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
     49+$as_echo "$ac_try_echo") >&5
     50+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
     51+  ac_status=$?
     52+  grep -v '^ *+' conftest.er1 >conftest.err
     53+  rm -f conftest.er1
     54+  cat conftest.err >&5
     55+  $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
     56+  (exit $ac_status); } >/dev/null && {
     57+        test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
     58+        test ! -s conftest.err
     59+       }; then
     60+  :
     61+else
     62+  $as_echo "$as_me: failed program was:" >&5
     63+sed 's/^/| /' conftest.$ac_ext >&5
     64+
     65+  { $as_echo "$as_me:$LINENO: 32-bit PowerPC, disabling asm-redc" >&5
     66+$as_echo "$as_me: 32-bit PowerPC, disabling asm-redc" >&6;}
     67+                enable_asm_redc=no
     68+fi
     69+
     70+rm -f conftest.err conftest.$ac_ext
     71+                          ASMPATH=powerpc64;;
     72     powerpc64-*-linux*)
     73 
     74 echo "include(<"$srcdir"/powerpc64/powerpc-defs.m4>)" >> $gmp_tmpconfigm4
     75@@ -12362,7 +12413,9 @@
     76 $as_echo "$as_me: error: asm redc not available on this machine $host" >&2;}
     77    { (exit 1); exit 1; }; };;
     78   esac
     79+fi
     80 
     81+if test "x$enable_asm_redc" = xyes; then
     82 # do the necessary definitions and includes
     83 
     84 cat >>confdefs.h <<\_ACEOF
     85diff -r -u src.old/configure.in src/configure.in
     86--- src.old/configure.in        2010-04-18 22:03:10.000000000 +0200
     87+++ src/configure.in    2010-11-10 11:20:51.000000000 +0100
     88@@ -195,7 +195,7 @@
     89 # asm_redc enabled by default for x86_64 and 64 bit PowerPC
     90 if test "x$enable_asm_redc" = x; then
     91   case $host in
     92-    x86_64* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
     93+    x86_64*-*-* | powerpc-apple-darwin* | powerpc64-*-linux*) enable_asm_redc=yes;;
     94     *) enable_asm_redc=no;;
     95   esac
     96 fi
     97@@ -203,8 +203,18 @@
     98 if test "x$enable_asm_redc" = xyes; then
     99   case $host in
     100     pentium4-*-* | pentium3-*-* | viac7-*-* | i786-*-*) ASMPATH=pentium4;;
     101-    x86_64-*-*)  ASMPATH=x86_64;;
     102-    powerpc-apple-darwin*) ASMPATH=powerpc64;;
     103+    x86_64*-*-*)  ASMPATH=x86_64;;
     104+# warning: with powerpc-apple-darwin* we can have ABI=32
     105+# see bug #10646 on the bug tracker, where config.guess says
     106+# powerpc-apple-darwin8.11.0 (this a 64-bit machine, but most applications
     107+# are compiled in 32 bits). It works with --disable-asm-redc.
     108+    powerpc-apple-darwin*)
     109+AC_PREPROC_IFELSE([AC_LANG_PROGRAM([
     110+#if defined(__ppc__)
     111+#error
     112+#endif])], [], [AC_MSG_NOTICE([32-bit PowerPC, disabling asm-redc])
     113+                enable_asm_redc=no])
     114+                          ASMPATH=powerpc64;;
     115     powerpc64-*-linux*)
     116                          ECM_INCLUDE([<"$srcdir"/powerpc64/powerpc-defs.m4>])
     117                          ASMPATH=powerpc64;;
     118@@ -213,7 +223,9 @@
     119                          ASMPATH=athlon;;
     120     *) AC_MSG_ERROR([[asm redc not available on this machine $host]]);;
     121   esac
     122+fi
     123 
     124+if test "x$enable_asm_redc" = xyes; then
     125 # do the necessary definitions and includes
     126   AC_DEFINE([NATIVE_REDC],1,[Define to 1 to use asm redc])
     127   test "x$CCAS" != x || CCAS="$CC -c"
  • spkg-install

    diff -r 584b01945066 -r 1934e6312f15 spkg-install
    a b  
    4141
    4242cd src
    4343
     44# Patch configure (and configure.in)
     45cp -p ../patches/configure ../patches/configure.in .
     46if [ $? != 0 ]; then
     47        echo >&2 "Error patching configure and configure.in"
     48        exit 1
     49fi
     50
     51
    4452unset RM
    4553
    4654# Note: Building (also) a *shared* library is disabled by default.