Ticket #15365: mpir-2.6.0.p4.diff

File mpir-2.6.0.p4.diff, 10.9 KB (added by jpflori, 9 years ago)

Spkg diff, for review only.

  • SPKG.txt

    diff --git a/SPKG.txt b/SPKG.txt
    a b  
    4343   bail out with an error when encountering "define(,1)".
    4444   These files were patched using
    4545     find mpn -name '*.asm' -exec sed -i 's/define(\(OPERATION[^,]*\),/define(\`\1'"'"',/' {} \;
     46 * configure-cxx.patch: remove libtool C++ hack to let MPIR build correctly
     47   on Cygwin when C++ support is disabled.
    4648 * configure.patch: add some extra run-time configure tests, remove
    4749   mentions of Fortran. Re-generated configure (using the same versions
    4850   of autoconf, automake and libtool as the original files).
     
    6264
    6365== Changelog ==
    6466
     67=== mpir-2.6.0.p4 (Jean-Pierre Flori, 6 November 2013) ===
     68 * #15364: remove libtool hack for C++ support.
     69 * Taken from upstream commit 2320c7d965e3277fddaf2390fdf7032d34954c8c.
     70
    6571=== mpir-2.6.0.p3 (Jeroen Demeyer, 2 October 2013) ===
    6672 * #13948: clang-config.patch: fix configure script for Clang.
    6773
  • new file patches/configure-cxx.patch

    diff --git a/patches/configure-cxx.patch b/patches/configure-cxx.patch
    new file mode 100644
    - +  
     1diff -druN src.orig/configure src/configure
     2--- src.orig/configure  2012-11-08 23:13:27.000000000 +0100
     3+++ src/configure       2013-11-06 20:55:30.322220739 +0100
     4@@ -658,6 +658,7 @@
     5 ENABLE_SHARED_TRUE
     6 ENABLE_STATIC_FALSE
     7 ENABLE_STATIC_TRUE
     8+CXXCPP
     9 OTOOL64
     10 OTOOL
     11 LIPO
     12@@ -679,7 +680,6 @@
     13 ac_ct_DUMPBIN
     14 DUMPBIN
     15 AR
     16-CXXCPP
     17 WANT_CXX_FALSE
     18 WANT_CXX_TRUE
     19 ac_ct_CXX
     20@@ -1873,43 +1873,6 @@
     21 
     22 } # ac_fn_cxx_try_compile
     23 
     24-# ac_fn_cxx_try_cpp LINENO
     25-# ------------------------
     26-# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
     27-ac_fn_cxx_try_cpp ()
     28-{
     29-  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     30-  if { { ac_try="$ac_cpp conftest.$ac_ext"
     31-case "(($ac_try" in
     32-  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     33-  *) ac_try_echo=$ac_try;;
     34-esac
     35-eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     36-$as_echo "$ac_try_echo"; } >&5
     37-  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
     38-  ac_status=$?
     39-  if test -s conftest.err; then
     40-    grep -v '^ *+' conftest.err >conftest.er1
     41-    cat conftest.er1 >&5
     42-    mv -f conftest.er1 conftest.err
     43-  fi
     44-  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     45-  test $ac_status = 0; } > conftest.i && {
     46-        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     47-        test ! -s conftest.err
     48-       }; then :
     49-  ac_retval=0
     50-else
     51-  $as_echo "$as_me: failed program was:" >&5
     52-sed 's/^/| /' conftest.$ac_ext >&5
     53-
     54-    ac_retval=1
     55-fi
     56-  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     57-  as_fn_set_status $ac_retval
     58-
     59-} # ac_fn_cxx_try_cpp
     60-
     61 # ac_fn_c_try_link LINENO
     62 # -----------------------
     63 # Try to link conftest.$ac_ext, and return whether this succeeded.
     64@@ -2023,6 +1986,43 @@
     65 
     66 } # ac_fn_c_check_func
     67 
     68+# ac_fn_cxx_try_cpp LINENO
     69+# ------------------------
     70+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
     71+ac_fn_cxx_try_cpp ()
     72+{
     73+  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
     74+  if { { ac_try="$ac_cpp conftest.$ac_ext"
     75+case "(($ac_try" in
     76+  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
     77+  *) ac_try_echo=$ac_try;;
     78+esac
     79+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
     80+$as_echo "$ac_try_echo"; } >&5
     81+  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
     82+  ac_status=$?
     83+  if test -s conftest.err; then
     84+    grep -v '^ *+' conftest.err >conftest.er1
     85+    cat conftest.er1 >&5
     86+    mv -f conftest.er1 conftest.err
     87+  fi
     88+  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
     89+  test $ac_status = 0; } > conftest.i && {
     90+        test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
     91+        test ! -s conftest.err
     92+       }; then :
     93+  ac_retval=0
     94+else
     95+  $as_echo "$as_me: failed program was:" >&5
     96+sed 's/^/| /' conftest.$ac_ext >&5
     97+
     98+    ac_retval=1
     99+fi
     100+  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
     101+  as_fn_set_status $ac_retval
     102+
     103+} # ac_fn_cxx_try_cpp
     104+
     105 # ac_fn_cxx_try_link LINENO
     106 # -------------------------
     107 # Try to link conftest.$ac_ext, and return whether this succeeded.
     108@@ -9913,10 +9913,10 @@
     109 
     110 
     111 # The C++ compiler, if desired.
     112-want_cxx=no
     113-if test $enable_cxx != no; then
     114-  test_CXXFLAGS=${CXXFLAGS+set}
     115-  ac_ext=cpp
     116+
     117+# The following test is quick and harmless.
     118+# It defaults to 'g++' if no compiler is found.
     119+ac_ext=cpp
     120 ac_cpp='$CXXCPP $CPPFLAGS'
     121 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     122 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     123@@ -10174,6 +10174,11 @@
     124 ac_compiler_gnu=$ac_cv_c_compiler_gnu
     125 
     126 
     127+# Now actually check that the C++ compiler works if it is needed.
     128+want_cxx=no
     129+if test $enable_cxx != no; then
     130+  test_CXXFLAGS=${CXXFLAGS+set}
     131+
     132   echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&5
     133   cxxflags_ac_prog_cxx=$CXXFLAGS
     134   cxxflags_list=ac_prog_cxx
     135@@ -10358,147 +10363,6 @@
     136 fi
     137 
     138 
     139-# FIXME: We're not interested in CXXCPP for ourselves, but if we don't do it
     140-# here then AC_PROG_LIBTOOL will AC_REQUIRE it (via _LT_AC_TAGCONFIG) and
     141-# hence execute it unconditionally, and that will fail if there's no C++
     142-# compiler (and no generic /lib/cpp).
     143-#
     144-if test $want_cxx = yes; then
     145-  ac_ext=cpp
     146-ac_cpp='$CXXCPP $CPPFLAGS'
     147-ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     148-ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     149-ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
     150-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
     151-$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
     152-if test -z "$CXXCPP"; then
     153-  if ${ac_cv_prog_CXXCPP+:} false; then :
     154-  $as_echo_n "(cached) " >&6
     155-else
     156-      # Double quotes because CXXCPP needs to be expanded
     157-    for CXXCPP in "$CXX -E" "/lib/cpp"
     158-    do
     159-      ac_preproc_ok=false
     160-for ac_cxx_preproc_warn_flag in '' yes
     161-do
     162-  # Use a header file that comes with gcc, so configuring glibc
     163-  # with a fresh cross-compiler works.
     164-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     165-  # <limits.h> exists even on freestanding compilers.
     166-  # On the NeXT, cc -E runs the code through the compiler's parser,
     167-  # not just through cpp. "Syntax error" is here to catch this case.
     168-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     169-/* end confdefs.h.  */
     170-#ifdef __STDC__
     171-# include <limits.h>
     172-#else
     173-# include <assert.h>
     174-#endif
     175-                    Syntax error
     176-_ACEOF
     177-if ac_fn_cxx_try_cpp "$LINENO"; then :
     178-
     179-else
     180-  # Broken: fails on valid input.
     181-continue
     182-fi
     183-rm -f conftest.err conftest.i conftest.$ac_ext
     184-
     185-  # OK, works on sane cases.  Now check whether nonexistent headers
     186-  # can be detected and how.
     187-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     188-/* end confdefs.h.  */
     189-#include <ac_nonexistent.h>
     190-_ACEOF
     191-if ac_fn_cxx_try_cpp "$LINENO"; then :
     192-  # Broken: success on invalid input.
     193-continue
     194-else
     195-  # Passes both tests.
     196-ac_preproc_ok=:
     197-break
     198-fi
     199-rm -f conftest.err conftest.i conftest.$ac_ext
     200-
     201-done
     202-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     203-rm -f conftest.i conftest.err conftest.$ac_ext
     204-if $ac_preproc_ok; then :
     205-  break
     206-fi
     207-
     208-    done
     209-    ac_cv_prog_CXXCPP=$CXXCPP
     210-
     211-fi
     212-  CXXCPP=$ac_cv_prog_CXXCPP
     213-else
     214-  ac_cv_prog_CXXCPP=$CXXCPP
     215-fi
     216-{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
     217-$as_echo "$CXXCPP" >&6; }
     218-ac_preproc_ok=false
     219-for ac_cxx_preproc_warn_flag in '' yes
     220-do
     221-  # Use a header file that comes with gcc, so configuring glibc
     222-  # with a fresh cross-compiler works.
     223-  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
     224-  # <limits.h> exists even on freestanding compilers.
     225-  # On the NeXT, cc -E runs the code through the compiler's parser,
     226-  # not just through cpp. "Syntax error" is here to catch this case.
     227-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     228-/* end confdefs.h.  */
     229-#ifdef __STDC__
     230-# include <limits.h>
     231-#else
     232-# include <assert.h>
     233-#endif
     234-                    Syntax error
     235-_ACEOF
     236-if ac_fn_cxx_try_cpp "$LINENO"; then :
     237-
     238-else
     239-  # Broken: fails on valid input.
     240-continue
     241-fi
     242-rm -f conftest.err conftest.i conftest.$ac_ext
     243-
     244-  # OK, works on sane cases.  Now check whether nonexistent headers
     245-  # can be detected and how.
     246-  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
     247-/* end confdefs.h.  */
     248-#include <ac_nonexistent.h>
     249-_ACEOF
     250-if ac_fn_cxx_try_cpp "$LINENO"; then :
     251-  # Broken: success on invalid input.
     252-continue
     253-else
     254-  # Passes both tests.
     255-ac_preproc_ok=:
     256-break
     257-fi
     258-rm -f conftest.err conftest.i conftest.$ac_ext
     259-
     260-done
     261-# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
     262-rm -f conftest.i conftest.err conftest.$ac_ext
     263-if $ac_preproc_ok; then :
     264-
     265-else
     266-  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
     267-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
     268-as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
     269-See \`config.log' for more details" "$LINENO" 5; }
     270-fi
     271-
     272-ac_ext=c
     273-ac_cpp='$CPP $CPPFLAGS'
     274-ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
     275-ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
     276-ac_compiler_gnu=$ac_cv_c_compiler_gnu
     277-
     278-fi
     279-
     280 if test -z "$MPN_PATH"; then
     281   path="$add_path $path"
     282 fi
     283diff -druN src.orig/configure.in src/configure.in
     284--- src.orig/configure.in       2012-11-08 23:10:45.000000000 +0100
     285+++ src/configure.in    2013-11-06 20:54:54.730379297 +0100
     286@@ -61,11 +61,6 @@
     287 dnl  gmp-impl.h and longlong.h, and yet only rarely does everything need to
     288 dnl  be rebuilt for changes to those files.
     289 dnl
     290-dnl  "no-dependencies" also helps with the way we're setup to run
     291-dnl  AC_PROG_CXX only conditionally.  If dependencies are used then recent
     292-dnl  automake (eg 1.7.2) appends an AM_CONDITIONAL to AC_PROG_CXX, and then
     293-dnl  gets upset if it's not actually executed.
     294-dnl
     295 dnl  Note that there's a copy of these options in the top-level Makefile.am,
     296 dnl  so update there too if changing anything.
     297 dnl
     298@@ -1694,10 +1689,15 @@
     299 AC_SUBST(MPIR_AS)
     300 
     301 # The C++ compiler, if desired.
     302+
     303+# The following test is quick and harmless.
     304+# It defaults to 'g++' if no compiler is found.
     305+AC_PROG_CXX
     306+
     307+# Now actually check that the C++ compiler works if it is needed.
     308 want_cxx=no
     309 if test $enable_cxx != no; then
     310   test_CXXFLAGS=${CXXFLAGS+set}
     311-  AC_PROG_CXX
     312 
     313   echo "CXXFLAGS chosen by autoconf: $CXXFLAGS" >&AC_FD_CC
     314   cxxflags_ac_prog_cxx=$CXXFLAGS
     315@@ -1738,15 +1738,6 @@
     316 
     317 AM_CONDITIONAL(WANT_CXX, test $want_cxx = yes)
     318 
     319-# FIXME: We're not interested in CXXCPP for ourselves, but if we don't do it
     320-# here then AC_PROG_LIBTOOL will AC_REQUIRE it (via _LT_AC_TAGCONFIG) and
     321-# hence execute it unconditionally, and that will fail if there's no C++
     322-# compiler (and no generic /lib/cpp).
     323-#
     324-if test $want_cxx = yes; then
     325-  AC_PROG_CXXCPP
     326-fi
     327-
     328 if test -z "$MPN_PATH"; then
     329   path="$add_path $path"
     330 fi