diff -Nru gmp-4.3.2+dfsg/acinclude.m4 gmp-5.0.2+dfsg/acinclude.m4 --- gmp-4.3.2+dfsg/acinclude.m4 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/acinclude.m4 2011-05-08 09:49:29.000000000 +0000 @@ -44,8 +44,10 @@ [[powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*]]) define(X86_PATTERN, -[[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-*]]) +[[i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*]]) +define(X86_64_PATTERN, +[[athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*]]) dnl GMP_FAT_SUFFIX(DSTVAR, DIRECTORY) dnl --------------------------------- @@ -110,13 +112,12 @@ dnl instead of gmp.h, since that file isn't generated until the end of the dnl configure. dnl -dnl Dummy values for __GMP_BITS_PER_MP_LIMB and GMP_LIMB_BITS are enough +dnl Dummy value for GMP_LIMB_BITS is enough dnl for all current configure-time uses of gmp.h. define(GMP_INCLUDE_GMP_H, [[#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in"] @@ -1940,7 +1941,8 @@ esac cat >conftest.c <&AC_FD_CC cat conftest.c >&AC_FD_CC @@ -3800,6 +3802,8 @@ dnl -------------------- dnl Determine whether CC_FOR_BUILD is ANSI, and establish U_FOR_BUILD dnl accordingly. +dnl +dnl FIXME: Use AC_PROG_CC sets ac_cv_prog_cc_c89 which could be used instead AC_DEFUN([GMP_C_FOR_BUILD_ANSI], [AC_REQUIRE([GMP_PROG_CC_FOR_BUILD]) diff -Nru gmp-4.3.2+dfsg/aclocal.m4 gmp-5.0.2+dfsg/aclocal.m4 --- gmp-4.3.2+dfsg/aclocal.m4 2010-01-09 06:26:18.000000000 +0000 +++ gmp-5.0.2+dfsg/aclocal.m4 2011-08-30 01:19:36.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.11 -*- Autoconf -*- +# generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. @@ -13,8 +13,8 @@ m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl -m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, -[m4_warning([this file was generated for autoconf 2.65. +m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],, +[m4_warning([this file was generated for autoconf 2.68. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) @@ -22,7 +22,8 @@ # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives @@ -31,7 +32,8 @@ m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -58,7 +60,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) -# serial 56 LT_INIT +# serial 57 LT_INIT # LT_PREREQ(VERSION) @@ -87,6 +89,7 @@ # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl @@ -103,6 +106,8 @@ AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) @@ -139,7 +144,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) @@ -159,6 +164,9 @@ m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl + _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl @@ -181,10 +189,13 @@ dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl +m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl +m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our @@ -200,7 +211,6 @@ _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl -_LT_PROG_ECHO_BACKSLASH case $host_os in aix3*) @@ -214,23 +224,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\([["`\\]]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -271,6 +264,28 @@ ])# _LT_SETUP +# _LT_PREPARE_SED_QUOTE_VARS +# -------------------------- +# Define a few sed substitution that help us do robust quoting. +m4_defun([_LT_PREPARE_SED_QUOTE_VARS], +[# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([["`\\]]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' +]) + # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' @@ -423,7 +438,7 @@ # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], -[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`']) +[$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS @@ -433,7 +448,7 @@ # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # -# ='`$ECHO "X$" | $Xsed -e "$delay_single_quote_subst"`' +# ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) @@ -532,12 +547,20 @@ LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$[]1 +_LTECHO_EOF' +} + # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -548,9 +571,9 @@ # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -558,16 +581,38 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\[$]0 --fallback-echo"')dnl " - lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\` - ;; -esac - _LT_OUTPUT_LIBTOOL_INIT ]) +# _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) +# ------------------------------------ +# Generate a child script FILE with all initialization necessary to +# reuse the environment learned by the parent script, and make the +# file executable. If COMMENT is supplied, it is inserted after the +# `#!' sequence but before initialization text begins. After this +# macro, additional text can be appended to FILE to form the body of +# the child script. The macro ends with non-zero status if the +# file could not be fully written (such as if the disk is full). +m4_ifdef([AS_INIT_GENERATED], +[m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], +[m4_defun([_LT_GENERATED_FILE_INIT], +[m4_require([AS_PREPARE])]dnl +[m4_pushdef([AS_MESSAGE_LOG_FD])]dnl +[lt_write_fail=0 +cat >$1 <<_ASEOF || lt_write_fail=1 +#! $SHELL +# Generated by $as_me. +$2 +SHELL=\${CONFIG_SHELL-$SHELL} +export SHELL +_ASEOF +cat >>$1 <<\_ASEOF || lt_write_fail=1 +AS_SHELL_SANITIZE +_AS_PREPARE +exec AS_MESSAGE_FD>&1 +_ASEOF +test $lt_write_fail = 0 && chmod +x $1[]dnl +m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- @@ -577,20 +622,11 @@ AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 +lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo @@ -616,7 +652,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -661,15 +697,13 @@ # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT @@ -732,15 +766,12 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) - _LT_PROG_XSI_SHELLFNS + _LT_PROG_REPLACE_SHELLFNS - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], @@ -846,11 +877,13 @@ AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) +dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER @@ -955,6 +988,31 @@ [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) + AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], + [lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD + echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD + $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD + echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD + $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&AS_MESSAGE_LOG_FD + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; @@ -982,7 +1040,7 @@ else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi - if test "$DSYMUTIL" != ":"; then + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= @@ -1002,7 +1060,11 @@ _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported - _LT_TAGVAR(whole_archive_flag_spec, $1)='' + if test "$lt_cv_ld_force_load" = "yes"; then + _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + _LT_TAGVAR(whole_archive_flag_spec, $1)='' + fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in @@ -1010,7 +1072,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -1026,203 +1088,142 @@ fi ]) -# _LT_SYS_MODULE_PATH_AIX -# ----------------------- +# _LT_SYS_MODULE_PATH_AIX([TAGNAME]) +# ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. +# Store the results from the different compilers for each TAGNAME. +# Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl -AC_LINK_IFELSE(AC_LANG_PROGRAM,[ -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi],[]) -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], + [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ + lt_aix_libpath_sed='[ + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }]' + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi],[]) + if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then + _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" + fi + ]) + aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) +fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], -[ifdef([AC_DIVERSION_NOTICE], - [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], - [AC_DIVERT_PUSH(NOTICE)]) -$1 -AC_DIVERT_POP -])# _LT_SHELL_INIT +[m4_divert_text([M4SH-INIT], [$1 +])])# _LT_SHELL_INIT + # _LT_PROG_ECHO_BACKSLASH # ----------------------- -# Add some code to the start of the generated configure script which -# will find an echo command which doesn't interpret backslashes. +# Find how we can fake an echo command that does not interpret backslash. +# In particular, with Autoconf 2.60 or later we add some code to the start +# of the generated configure script which will find a shell with a builtin +# printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], -[_LT_SHELL_INIT([ -# Check that we are running under the correct shell. -SHELL=${CONFIG_SHELL-/bin/sh} - -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X[$]1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X[$]1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : +[ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +AC_MSG_CHECKING([how to print strings]) +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' else - # Restart under the correct shell. - exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} -fi - -if test "X[$]1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -[$]* -_LT_EOF - exit 0 + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$[]1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' fi -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL [$]0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} - if test "$prev" != 'sed 50q "[$]0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi +case "$ECHO" in + printf*) AC_MSG_RESULT([printf]) ;; + print*) AC_MSG_RESULT([print -r]) ;; + *) AC_MSG_RESULT([cat]) ;; +esac -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" -fi +m4_ifdef([_AS_DETECT_SUGGESTED], +[_AS_DETECT_SUGGESTED([ + test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO + ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test "X`printf %s $ECHO`" = "X$ECHO" \ + || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) -AC_SUBST(lt_ECHO) -]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) -_LT_DECL([], [ECHO], [1], - [An echo program that does not interpret backslashes]) +_LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH +# _LT_WITH_SYSROOT +# ---------------- +AC_DEFUN([_LT_WITH_SYSROOT], +[AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) + # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], @@ -1251,7 +1252,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '[#]line __oline__ "configure"' > conftest.$ac_ext + echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in @@ -1369,14 +1370,47 @@ ])# _LT_ENABLE_LOCK +# _LT_PROG_AR +# ----------- +m4_defun([_LT_PROG_AR], +[AC_CHECK_TOOLS(AR, [ar], false) +: ${AR=ar} +: ${AR_FLAGS=cru} +_LT_DECL([], [AR], [1], [The archiver]) +_LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) + +AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], + [lt_cv_ar_at_file=no + AC_COMPILE_IFELSE([AC_LANG_PROGRAM], + [echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + AC_TRY_EVAL([lt_ar_try]) + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + ]) + ]) + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi +_LT_DECL([], [archiver_list_spec], [1], + [How to feed a file listing to the archiver]) +])# _LT_PROG_AR + + # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], -[AC_CHECK_TOOL(AR, ar, false) -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru -_LT_DECL([], [AR], [1], [The archiver]) -_LT_DECL([], [AR_FLAGS], [1]) +[_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: @@ -1403,10 +1437,19 @@ esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi + +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) +_LT_DECL([], [lock_old_archive_extraction], [0], + [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE @@ -1431,15 +1474,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1479,7 +1522,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -1542,6 +1585,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -1606,8 +1654,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -1658,7 +1706,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -[#line __oline__ "configure" +[#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -1699,7 +1747,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -1708,7 +1762,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -1884,16 +1942,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes @@ -2052,6 +2110,7 @@ m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl +m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ @@ -2060,16 +2119,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -2082,7 +2148,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -2102,7 +2168,13 @@ if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) @@ -2190,7 +2262,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -2221,8 +2293,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -2243,36 +2316,83 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" +m4_if([$1], [],[ + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -2356,6 +2476,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -2401,8 +2535,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[[3-9]]*) @@ -2469,16 +2605,21 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ - LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" - AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], - [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], - [shlibpath_overrides_runpath=yes])]) - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], + [lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ + LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" + AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], + [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], + [lt_cv_shlibpath_overrides_runpath=yes])]) + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + ]) + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -2487,7 +2628,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -2732,6 +2873,8 @@ The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) +_LT_DECL([], [install_override_mode], [1], + [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], @@ -2844,6 +2987,7 @@ AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], @@ -2965,6 +3109,11 @@ esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' @@ -2973,8 +3122,8 @@ fi ;; esac -_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl -_LT_DECL([], [reload_cmds], [2])dnl +_LT_TAGDECL([], [reload_flag], [1], [How to create reloadable object files])dnl +_LT_TAGDECL([], [reload_cmds], [2])dnl ])# _LT_CMD_RELOAD @@ -3026,16 +3175,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -3065,6 +3216,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -3073,11 +3228,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -3177,6 +3332,21 @@ ;; esac ]) + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -3184,7 +3354,11 @@ _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], - [Command to use when deplibs_check_method == "file_magic"]) + [Command to use when deplibs_check_method = "file_magic"]) +_LT_DECL([], [file_magic_glob], [1], + [How to find potential files when deplibs_check_method = "file_magic"]) +_LT_DECL([], [want_nocaseglob], [1], + [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD @@ -3241,7 +3415,19 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -3254,13 +3440,13 @@ AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -3275,6 +3461,67 @@ dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) +# _LT_CHECK_SHAREDLIB_FROM_LINKLIB +# -------------------------------- +# how to determine the name of the shared library +# associated with a specific link library. +# -- PORTME fill in with the dynamic library characteristics +m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], +[m4_require([_LT_DECL_EGREP]) +m4_require([_LT_DECL_OBJDUMP]) +m4_require([_LT_DECL_DLLTOOL]) +AC_CACHE_CHECK([how to associate runtime and link libraries], +lt_cv_sharedlib_from_linklib_cmd, +[lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac +]) +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + +_LT_DECL([], [sharedlib_from_linklib_cmd], [1], + [Command to associate shared and link libraries]) +])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB + + +# _LT_PATH_MANIFEST_TOOL +# ---------------------- +# locate the manifest tool +m4_defun([_LT_PATH_MANIFEST_TOOL], +[AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], + [lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&AS_MESSAGE_LOG_FD + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest*]) +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi +_LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl +])# _LT_PATH_MANIFEST_TOOL + # LT_LIB_M # -------- @@ -3283,7 +3530,7 @@ [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) @@ -3311,7 +3558,12 @@ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then - _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + case $cc_basename in + nvcc*) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; + *) + _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; + esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, @@ -3328,6 +3580,7 @@ m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl @@ -3395,8 +3648,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -3432,6 +3685,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -3453,7 +3707,7 @@ if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm - if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then + if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" @@ -3465,8 +3719,20 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext -#ifdef __cplusplus -extern "C" { +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + +#ifdef __cplusplus +extern "C" { #endif _LT_EOF @@ -3476,7 +3742,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT@&t@_DLSYM_CONST struct { const char *name; void *address; } @@ -3502,15 +3768,15 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi @@ -3543,6 +3809,13 @@ AC_MSG_RESULT(ok) fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], @@ -3553,6 +3826,8 @@ _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) +_LT_DECL([], [nm_file_list_spec], [1], + [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS @@ -3564,7 +3839,6 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= -AC_MSG_CHECKING([for $compiler option to produce PIC]) m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -3615,6 +3889,11 @@ # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -3664,6 +3943,12 @@ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + m4_if([$1], [GCJ], [], + [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) + ;; dgux*) case $cc_basename in ec++*) @@ -3753,8 +4038,8 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' @@ -3816,7 +4101,7 @@ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' @@ -3920,6 +4205,12 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + _LT_TAGVAR(lt_prog_compiler_static, $1)= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -3962,6 +4253,13 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -4025,7 +4323,13 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' + _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' @@ -4037,25 +4341,25 @@ # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - _LT_TAGVAR(lt_prog_compiler_wl, $1)='' + _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; @@ -4087,7 +4391,7 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; @@ -4144,9 +4448,11 @@ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac -AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) -_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], - [How to pass a linker flag through the compiler]) + +AC_CACHE_CHECK([for $compiler option to produce PIC], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], + [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) +_LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. @@ -4165,6 +4471,8 @@ _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) +_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], + [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # @@ -4185,6 +4493,7 @@ m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl @@ -4193,30 +4502,38 @@ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) + case $cc_basename in + cl*) ;; + *) + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no - ;; + ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= @@ -4276,13 +4593,39 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; + *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -4316,11 +4659,12 @@ _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -4356,10 +4700,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' + _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -4377,6 +4723,11 @@ fi ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4402,15 +4753,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -4421,13 +4773,17 @@ lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; - xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(compiler_needs_object, $1)=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -4443,17 +4799,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' - _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -4467,8 +4823,8 @@ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -4486,8 +4842,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4533,8 +4889,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -4574,8 +4930,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -4663,9 +5021,9 @@ _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' @@ -4674,14 +5032,19 @@ else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -4713,20 +5076,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' - # FIXME: Should let the user specify the lib program. - _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' - _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + case $cc_basename in + cl*) + # Native MSVC + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + esac ;; darwin* | rhapsody*) @@ -4764,7 +5170,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no @@ -4772,7 +5178,7 @@ hpux9*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -4787,8 +5193,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -4806,16 +5212,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -4827,7 +5233,14 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + m4_if($1, [], [ + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + _LT_LINKER_OPTION([if $CC understands -b], + _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], + [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], + [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi @@ -4855,19 +5268,34 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - AC_LINK_IFELSE(int foo(void) {}, - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - ) - LDFLAGS="$save_LDFLAGS" + # This should be the same for all languages, so no per-tag cache variable. + AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], + [lt_cv_irix_exported_symbol], + [save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + AC_LINK_IFELSE( + [AC_LANG_SOURCE( + [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], + [C++], [[int foo (void) { return 0; }]], + [Fortran 77], [[ + subroutine foo + end]], + [Fortran], [[ + subroutine foo + end]])])], + [lt_cv_irix_exported_symbol=yes], + [lt_cv_irix_exported_symbol=no]) + LDFLAGS="$save_LDFLAGS"]) + if test "$lt_cv_irix_exported_symbol" = yes; then + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' @@ -4929,17 +5357,17 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' @@ -4949,13 +5377,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' @@ -4968,9 +5396,9 @@ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -5146,36 +5574,38 @@ # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. - AC_MSG_CHECKING([whether -lc should be explicitly linked in]) - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext - - if AC_TRY_EVAL(ac_compile) 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) - pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) - _LT_TAGVAR(allow_undefined_flag, $1)= - if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) - then - _LT_TAGVAR(archive_cmds_need_lc, $1)=no - else - _LT_TAGVAR(archive_cmds_need_lc, $1)=yes - fi - _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)]) + AC_CACHE_CHECK([whether -lc should be explicitly linked in], + [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), + [$RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) + pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) + _LT_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) + then + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no + else + lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + ]) + _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi @@ -5240,8 +5670,6 @@ to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) -_LT_TAGDECL([], [fix_srcfile_path], [1], - [Fix the shell variable $srcfile for the compiler]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], @@ -5252,6 +5680,8 @@ [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) +_LT_TAGDECL([], [postlink_cmds], [2], + [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented @@ -5341,37 +5771,22 @@ ])# _LT_LANG_C_CONFIG -# _LT_PROG_CXX -# ------------ -# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++ -# compiler, we have our own version here. -m4_defun([_LT_PROG_CXX], -[ -pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes]) -AC_PROG_CXX -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -else - _lt_caught_CXX_error=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_CXX - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_CXX], []) - - # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], -[AC_REQUIRE([_LT_PROG_CXX])dnl -m4_require([_LT_FILEUTILS_DEFAULTS])dnl +[m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PATH_MANIFEST_TOOL])dnl +if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + AC_PROG_CXXCPP +else + _lt_caught_CXX_error=yes +fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no @@ -5393,6 +5808,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -5424,6 +5841,7 @@ # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -5441,6 +5859,7 @@ fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -5462,8 +5881,8 @@ # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5495,7 +5914,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -5604,10 +6023,10 @@ _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" - _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' @@ -5616,14 +6035,19 @@ else # Determine the default libpath from the value encoded in an # empty executable. - _LT_SYS_MODULE_PATH_AIX + _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' + fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. @@ -5653,28 +6077,75 @@ ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, - # as there is no search path for DLLs. - _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' - _LT_TAGVAR(allow_undefined_flag, $1)=unsupported - _LT_TAGVAR(always_export_symbols, $1)=no - _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_TAGVAR(ld_shlibs, $1)=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=yes + _LT_TAGVAR(file_list_spec, $1)='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + # Don't use ranlib + _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' + _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' + _LT_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_TAGVAR(always_export_symbols, $1)=no + _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + _LT_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; @@ -5716,6 +6187,11 @@ gnu*) ;; + haiku*) + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_TAGVAR(link_all_deplibs, $1)=yes + ;; + hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: @@ -5740,11 +6216,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then - _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no @@ -5805,7 +6281,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then @@ -5815,10 +6291,10 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -5848,7 +6324,7 @@ case $cc_basename in CC*) # SGI C++ - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -5859,9 +6335,9 @@ *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes @@ -5890,7 +6366,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5927,26 +6403,26 @@ pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*) + *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; @@ -5954,7 +6430,7 @@ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -5973,9 +6449,9 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' @@ -5995,13 +6471,13 @@ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' - _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6070,7 +6546,7 @@ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi @@ -6105,15 +6581,15 @@ case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' - _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; @@ -6129,17 +6605,17 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -6149,7 +6625,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -6185,7 +6661,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' @@ -6206,7 +6682,7 @@ esac _LT_TAGVAR(link_all_deplibs, $1)=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -6226,14 +6702,14 @@ if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -6244,7 +6720,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' @@ -6298,6 +6774,10 @@ CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ + '"$_LT_TAGVAR(old_archive_cmds, $1)" + _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ + '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -6353,6 +6833,7 @@ fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -6367,6 +6848,29 @@ ])# _LT_LANG_CXX_CONFIG +# _LT_FUNC_STRIPNAME_CNF +# ---------------------- +# func_stripname_cnf prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# +# This function is identical to the (non-XSI) version of func_stripname, +# except this one can be used by m4 code that may be executed by configure, +# rather than the libtool script. +m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl +AC_REQUIRE([_LT_DECL_SED]) +AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf +])# _LT_FUNC_STRIPNAME_CNF + # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose @@ -6375,6 +6879,7 @@ # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= @@ -6425,6 +6930,13 @@ }; _LT_EOF ]) + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then @@ -6436,7 +6948,7 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -6445,13 +6957,22 @@ test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -6471,8 +6992,10 @@ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -6508,6 +7031,7 @@ fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], @@ -6544,7 +7068,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -6588,32 +7112,16 @@ ])# _LT_SYS_HIDDEN_LIBDEPS -# _LT_PROG_F77 -# ------------ -# Since AC_PROG_F77 is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_F77], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes]) -AC_PROG_F77 -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_F77 - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_F77], []) - - # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], -[AC_REQUIRE([_LT_PROG_F77])dnl -AC_LANG_PUSH(Fortran 77) +[AC_LANG_PUSH(Fortran 77) +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6632,6 +7140,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6671,7 +7181,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6725,38 +7237,24 @@ GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG -# _LT_PROG_FC -# ----------- -# Since AC_PROG_FC is broken, in that it returns the empty string -# if there is no fortran compiler, we have our own version here. -m4_defun([_LT_PROG_FC], -[ -pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes]) -AC_PROG_FC -if test -z "$FC" || test "X$FC" = "Xno"; then - _lt_disable_FC=yes -fi -popdef([AC_MSG_ERROR]) -])# _LT_PROG_FC - -dnl aclocal-1.4 backwards compatibility: -dnl AC_DEFUN([_LT_PROG_FC], []) - - # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], -[AC_REQUIRE([_LT_PROG_FC])dnl -AC_LANG_PUSH(Fortran) +[AC_LANG_PUSH(Fortran) + +if test -z "$FC" || test "X$FC" = "Xno"; then + _lt_disable_FC=yes +fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= @@ -6775,6 +7273,8 @@ _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no @@ -6814,7 +7314,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} + CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu @@ -6870,7 +7372,8 @@ fi # test -n "$compiler" GCC=$lt_save_GCC - CC="$lt_save_CC" + CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP @@ -6907,10 +7410,12 @@ _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. -lt_save_CC="$CC" +lt_save_CC=$CC +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} +CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" @@ -6920,6 +7425,8 @@ _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_TAGVAR(reload_flag, $1)=$reload_flag +_LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) @@ -6935,7 +7442,8 @@ AC_LANG_RESTORE GCC=$lt_save_GCC -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG @@ -6970,9 +7478,11 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" +lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} +CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) @@ -6985,7 +7495,8 @@ GCC=$lt_save_GCC AC_LANG_RESTORE -CC="$lt_save_CC" +CC=$lt_save_CC +CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG @@ -7044,6 +7555,15 @@ AC_SUBST([OBJDUMP]) ]) +# _LT_DECL_DLLTOOL +# ---------------- +# Ensure DLLTOOL variable is set. +m4_defun([_LT_DECL_DLLTOOL], +[AC_CHECK_TOOL(DLLTOOL, dlltool, false) +test -z "$DLLTOOL" && DLLTOOL=dlltool +_LT_DECL([], [DLLTOOL], [1], [DLL creation program]) +AC_SUBST([DLLTOOL]) +]) # _LT_DECL_SED # ------------ @@ -7135,8 +7655,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -7175,222 +7695,177 @@ ])# _LT_CHECK_SHELL_FEATURES -# _LT_PROG_XSI_SHELLFNS -# --------------------- -# Bourne and XSI compatible variants of some useful shell functions. -m4_defun([_LT_PROG_XSI_SHELLFNS], -[case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $[*] )) -} +# _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) +# ------------------------------------------------------ +# In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and +# '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. +m4_defun([_LT_PROG_FUNCTION_REPLACE], +[dnl { +sed -e '/^$1 ()$/,/^} # $1 /c\ +$1 ()\ +{\ +m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) +} # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: +]) -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" +# _LT_PROG_REPLACE_SHELLFNS +# ------------------------- +# Replace existing portable implementations of several shell functions with +# equivalent extended shell implementations where those features are available.. +m4_defun([_LT_PROG_REPLACE_SHELLFNS], +[if test x"$xsi_shell" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac]) + + _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl + func_basename_result="${1##*/}"]) + + _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl + case ${1} in + */*) func_dirname_result="${1%/*}${2}" ;; + * ) func_dirname_result="${3}" ;; + esac + func_basename_result="${1##*/}"]) -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} + _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl + # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are + # positional parameters, so assign one to ordinary parameter first. + func_stripname_result=${3} + func_stripname_result=${func_stripname_result#"${1}"} + func_stripname_result=${func_stripname_result%"${2}"}]) -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} + _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl + func_split_long_opt_name=${1%%=*} + func_split_long_opt_arg=${1#*=}]) -dnl func_dirname_and_basename -dnl A portable version of this function is already defined in general.m4sh -dnl so there is no need for it here. + _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl + func_split_short_opt_arg=${1#??} + func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} + _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl + case ${1} in + *.lo) func_lo2o_result=${1%.lo}.${objext} ;; + *) func_lo2o_result=${1} ;; + esac]) -# sed scripts: -my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[[^=]]*=//' + _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} + _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} + _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) +fi -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'` -} +if test x"$lt_shell_append" = xyes; then + _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$[@]"` -} + _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl + func_quote_for_eval "${2}" +dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ + eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len` -} + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi -_LT_EOF -esac +if test x"$_lt_function_replace_fail" = x":"; then + AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) +fi +]) -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]+=\$[2]" -} -_LT_EOF +# _LT_PATH_CONVERSION_FUNCTIONS +# ----------------------------- +# Determine which file name conversion functions should be used by +# func_to_host_file (and, implicitly, by func_to_host_path). These are needed +# for certain cross-compile configurations and native mingw. +m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_MSG_CHECKING([how to convert $build file names to $host format]) +AC_CACHE_VAL(lt_cv_to_host_file_cmd, +[case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$[1]=\$$[1]\$[2]" -} - -_LT_EOF + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac ;; - esac + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac +]) +to_host_file_cmd=$lt_cv_to_host_file_cmd +AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) +_LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], + [0], [convert $build file names to $host format])dnl + +AC_MSG_CHECKING([how to convert $build file names to toolchain format]) +AC_CACHE_VAL(lt_cv_to_tool_file_cmd, +[#assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac ]) +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) +_LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], + [0], [convert $build files to toolchain format])dnl +])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # -# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, +# Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 6 ltoptions.m4 +# serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) @@ -7505,7 +7980,7 @@ [enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) @@ -7513,13 +7988,13 @@ esac test -z "$AS" && AS=as -_LT_DECL([], [AS], [0], [Assembler program])dnl +_LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool -_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl +_LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump -_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl +_LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], @@ -7877,31 +8352,31 @@ # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# Generated from ltversion.in. +# @configure_input@ -# serial 3017 ltversion.m4 +# serial 3293 ltversion.m4 # This file is part of GNU Libtool -m4_define([LT_PACKAGE_VERSION], [2.2.6b]) -m4_define([LT_PACKAGE_REVISION], [1.3017]) +m4_define([LT_PACKAGE_VERSION], [2.4]) +m4_define([LT_PACKAGE_REVISION], [1.3293]) AC_DEFUN([LTVERSION_VERSION], -[macro_version='2.2.6b' -macro_revision='1.3017' +[macro_version='2.4' +macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # -# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc. +# Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. -# serial 4 lt~obsolete.m4 +# serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # @@ -7971,7 +8446,6 @@ m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) -m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) @@ -7984,6 +8458,13 @@ m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) +m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) +m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) +m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) +m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) +m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) +m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) +m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. # @@ -8000,7 +8481,7 @@ [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -8016,7 +8497,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.11])dnl +[AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) diff -Nru gmp-4.3.2+dfsg/AUTHORS gmp-5.0.2+dfsg/AUTHORS --- gmp-4.3.2+dfsg/AUTHORS 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/AUTHORS 2011-05-08 09:49:28.000000000 +0000 @@ -1,25 +1,55 @@ Authors of GNU MP (in chronological order of initial contribution) Torbjörn Granlund Main author + John Amanatides Original version of mpz/pprime_p.c + Paul Zimmermann mpn/generic/mul_fft.c, dc_divrem_n.c, rootrem.c, old mpz/powm.c, old toom3 code. + Ken Weber mpn/generic/bdivmod.c, old mpn/generic/gcd.c + Bennet Yee mpz/jacobi.c mpz/legendre.c -Andreas Schwab mpn/m68k/lshift.S, mpn/m68k/rshift.S -Robert Harley Old mpn/generic/mul_n.c, files in mpn/arm + +Andreas Schwab mpn/m68k/lshift.asm, mpn/m68k/rshift.asm + +Robert Harley Old mpn/generic/mul_n.c, many files in mpn/arm + Linus Nordberg Random number framework, original autoconfery + Kent Boortz MacOS 9 port + Kevin Ryde Most x86 assembly, new autoconfery, and countless other things (please see the GMP manual for complete list) + Gerardo Ballabio gmpxx.h and C++ istream input + Pedro Gimeno Mersenne Twister random generator, other random number revisions -Jason Moxham New mpz/fac_ui.c and gen-fac_ui.c + +Jason Moxham mpz/fac_ui.c and gen-fac_ui.c + Niels Möller mpn/generic/hgcd2.c, gcd.c, gcdext.c, matrix22_mul.c, hgcd.c, gcdext_1.c, gcd_subdiv_step.c, gcd_lehmer.c, gcdext_subdiv_step.c, gcdext_lehmer.c, - toom_interpolate_7pts, mpz/nextprime.c. + toom_interpolate_7pts, mulmod_bnm1.c, dcpi1_bdiv_qr.c, + dcpi1_bdiv_q.c, sbpi1_bdiv_qr.c, sbpi1_bdiv_q.c, + toom_eval_dgr3_pm1.c, toom_eval_dgr3_pm2.c, + toom_eval_pm1.c, toom_eval_pm2.c, toom_eval_pm2exp.c, + divexact.c, mpn/x86/invert_limb.asm, + mpn/x86_64/invert_limb.asm, mpz/nextprime.c, + mpz/divexact.c. + Marco Bodrato mpn/generic/toom44_mul.c, toom4_sqr.c, toom53_mul.c, - toom62_mul.c -David Harvey mpn/x86_64/mul_basecase.asm. + toom62_mul.c, toom43_mul.c, toom52_mul.c, + toom_interpolate_6pts.c, toom_couple_handling.c, + toom63_mul.c, toom_interpolate_8pts.c, + toom6h_mul.c, toom6_sqr.c, toom_interpolate_12pts.c, + toom8h_mul.c, toom8_sqr.c, toom_interpolate_16pts.c, + mulmod_bnm1.c, sqrmod_bnm1.c, nussbaumer_mul.c, + toom_eval_pm2.c, toom_eval_pm2rexp.c, + mullo_n.c, invert.c, invertappr.c. + +David Harvey mpn/x86_64/mul_basecase.asm + +Martin Boij mpn/generic/perfpow.c diff -Nru gmp-4.3.2+dfsg/autom4te.cache/output.0 gmp-5.0.2+dfsg/autom4te.cache/output.0 --- gmp-4.3.2+dfsg/autom4te.cache/output.0 2010-01-09 06:26:11.000000000 +0000 +++ gmp-5.0.2+dfsg/autom4te.cache/output.0 2011-08-30 01:19:28.000000000 +0000 @@ -1,14 +1,14 @@ @%:@! /bin/sh @%:@ From configure.in Revision. @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.65 for GNU MP 4.3.2. +@%:@ Generated by GNU Autoconf 2.68 for GNU MP 5.0.2. @%:@ @%:@ Report bugs to . @%:@ @%:@ @%:@ @%:@ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -@%:@ 2007 Free Software Foundation, Inc. +@%:@ 2007, 2008, 2009, 2010 Free Software Foundation, Inc. @%:@ @%:@ This file is part of the GNU MP Library. @%:@ @@ -28,8 +28,8 @@ @%:@ @%:@ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -@%:@ Inc. +@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +@%:@ Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @@ -113,6 +113,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -195,7 +196,15 @@ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -238,11 +247,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in @%:@ (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -341,7 +357,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @@ -381,19 +397,19 @@ fi # as_fn_arith -@%:@ as_fn_error ERROR [LINENO LOG_FD] -@%:@ --------------------------------- +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with status @S|@?, using 1 if that was 0. +@%:@ script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @@ -550,161 +566,14 @@ # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -723,8 +592,8 @@ # Identity of this package. PACKAGE_NAME='GNU MP' PACKAGE_TARNAME='gmp' -PACKAGE_VERSION='4.3.2' -PACKAGE_STRING='GNU MP 4.3.2' +PACKAGE_VERSION='5.0.2' +PACKAGE_STRING='GNU MP 5.0.2' PACKAGE_BUGREPORT='gmp-bugs@gmplib.org' PACKAGE_URL='http://www.gnu.org/software/gmp/' @@ -791,22 +660,20 @@ mpn_objs_in_libgmp mpn_objects mpn_objs_in_libmp -BITS_PER_MP_LIMB +GMP_LIMB_BITS M4 TAL_OBJECT LIBM ENABLE_STATIC_FALSE ENABLE_STATIC_TRUE -ac_ct_F77 -FFLAGS -F77 OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL -lt_ECHO +MANIFEST_TOOL RANLIB +ac_ct_AR LN_S LD FGREP @@ -937,6 +804,7 @@ enable_alloca enable_cxx enable_fft +enable_old_fft_full enable_mpbsd enable_nails enable_profiling @@ -948,6 +816,7 @@ with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -966,8 +835,6 @@ CXXFLAGS CCC CXXCPP -F77 -FFLAGS M4 YACC YFLAGS' @@ -1033,8 +900,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1079,7 +947,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1105,7 +973,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1309,7 +1177,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1325,7 +1193,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1355,8 +1223,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1364,7 +1232,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1374,7 +1242,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1382,13 +1250,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1411,7 +1279,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1425,8 +1293,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1441,9 +1309,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1482,11 +1350,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1512,7 +1380,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU MP 4.3.2 to adapt to many kinds of systems. +\`configure' configures GNU MP 5.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1526,7 +1394,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1582,7 +1450,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU MP 4.3.2:";; + short | recursive ) echo "Configuration of GNU MP 5.0.2:";; esac cat <<\_ACEOF @@ -1596,6 +1464,8 @@ --enable-alloca how to get temp memory @<:@@<:@default=reentrant@:>@@:>@ --enable-cxx enable C++ support @<:@@<:@default=no@:>@@:>@ --enable-fft enable FFTs for multiplication @<:@@<:@default=yes@:>@@:>@ + --enable-old-fft-full enable old mpn_mul_fft_full for multiplication + @<:@@<:@default=no@:>@@:>@ --enable-mpbsd build Berkeley MP compatibility library @<:@@<:@default=no@:>@@:>@ --enable-nails use nails on limbs @<:@@<:@default=no@:>@@:>@ @@ -1617,6 +1487,8 @@ --with-pic try to use only PIC/non-PIC objects @<:@default=use both@:>@ --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: ABI desired ABI (for processors supporting more than one ABI) @@ -1635,11 +1507,10 @@ CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags M4 m4 macro processor - YACC The `Yet Another C Compiler' implementation to use. Defaults to - the first program found out of: `bison -y', `byacc', `yacc'. + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. YFLAGS The list of arguments that will be passed by default to @S|@YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. @@ -1712,17 +1583,17 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU MP configure 4.3.2 -generated by GNU Autoconf 2.65 +GNU MP configure 5.0.2 +generated by GNU Autoconf 2.68 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007 Free Software Foundation, Inc. +2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -1780,7 +1651,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @@ -1806,7 +1677,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1817,7 +1688,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @@ -1855,7 +1726,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_cxx_try_compile @@ -1881,7 +1752,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -1892,7 +1763,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_cxx_try_cpp @@ -1934,7 +1805,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @@ -1947,10 +1818,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1986,7 +1857,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2009,17 +1880,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ---------------------------------- ## +( $as_echo "## ---------------------------------- ## ## Report this to gmp-bugs@gmplib.org ## -## ---------------------------------- ## -_ASBOX +## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2028,7 +1897,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @@ -2041,7 +1910,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2059,7 +1928,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @@ -2104,7 +1973,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @@ -2117,7 +1986,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2172,7 +2041,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func @@ -2217,49 +2086,11 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_cxx_try_link -@%:@ ac_fn_f77_try_compile LINENO -@%:@ ---------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_f77_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} @%:@ ac_fn_f77_try_compile - @%:@ ac_fn_f77_try_link LINENO @%:@ ------------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. @@ -2301,20 +2132,23 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_f77_try_link -@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR -@%:@ ------------------------------------ -@%:@ Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +@%:@ --------------------------------------------- +@%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +@%:@ accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2323,8 +2157,12 @@ int main () { -@%:@ifndef $2 - (void) $2; +@%:@ifndef $as_decl_name +@%:@ifdef __cplusplus + (void) $as_decl_use; +@%:@else + (void) $as_decl_name; +@%:@endif @%:@endif ; @@ -2341,7 +2179,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_decl @@ -2354,7 +2192,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2395,7 +2233,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_type @@ -2408,7 +2246,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2452,7 +2290,7 @@ eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_member @@ -2464,10 +2302,10 @@ ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2503,7 +2341,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2526,17 +2364,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ---------------------------------- ## +( $as_echo "## ---------------------------------- ## ## Report this to gmp-bugs@gmplib.org ## -## ---------------------------------- ## -_ASBOX +## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2545,7 +2381,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_cxx_check_header_mongrel @@ -2558,7 +2394,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2599,7 +2435,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_cxx_check_type @@ -2776,7 +2612,7 @@ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_compute_int @@ -2784,8 +2620,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU MP $as_me 4.3.2, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by GNU MP $as_me 5.0.2, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2895,11 +2731,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2933,11 +2767,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2950,11 +2782,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2968,11 +2798,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -3027,7 +2855,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in @%:@(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3042,7 +2875,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -3118,7 +2955,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3145,7 +2982,7 @@ # "athlon-pc-freebsd3.5". # if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then - as_fn_error "--target is not appropriate for GMP + as_fn_error $? "--target is not appropriate for GMP Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system explicitly. Use --host if cross-compiling (see \"Installing GMP\" in the manual for more on this)." "$LINENO" 5 @@ -3172,16 +3009,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3195,27 +3038,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3233,14 +3076,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3248,7 +3091,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3284,7 +3127,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3371,11 +3214,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3397,7 +3240,7 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3407,7 +3250,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3461,7 +3304,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3501,7 +3344,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3554,7 +3397,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3605,7 +3448,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3645,7 +3488,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3653,7 +3496,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -3687,7 +3530,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3703,7 +3546,7 @@ # Define the identity of the package. PACKAGE='gmp' - VERSION='4.3.2' + VERSION='5.0.2' cat >>confdefs.h <<_ACEOF @@ -3774,7 +3617,7 @@ if test "${enable_assert+set}" = set; then : enableval=$enable_assert; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;; esac else enable_assert=no @@ -3801,7 +3644,7 @@ yes|no|reentrant|notreentrant) ;; debug) ;; *) - as_fn_error "bad value $enableval for --enable-alloca, need one of: + as_fn_error $? "bad value $enableval for --enable-alloca, need one of: yes no reentrant notreentrant alloca malloc-reentrant malloc-notreentrant debug" "$LINENO" 5 ;; esac else @@ -3826,7 +3669,7 @@ if test "${enable_cxx+set}" = set; then : enableval=$enable_cxx; case $enableval in yes|no|detect) ;; -*) as_fn_error "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;; esac else enable_cxx=no @@ -3838,7 +3681,7 @@ if test "${enable_fft+set}" = set; then : enableval=$enable_fft; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;; esac else enable_fft=yes @@ -3852,11 +3695,29 @@ fi +@%:@ Check whether --enable-old-fft-full was given. +if test "${enable_old_fft_full+set}" = set; then : + enableval=$enable_old_fft_full; case $enableval in +yes|no) ;; +*) as_fn_error $? "bad value $enableval for --enable-old-fft-full, need yes or no" "$LINENO" 5 ;; +esac +else + enable_old_fft_full=no +fi + + +if test "$enable_old_fft_full" = "yes"; then + +$as_echo "@%:@define WANT_OLD_FFT_FULL 1" >>confdefs.h + +fi + + @%:@ Check whether --enable-mpbsd was given. if test "${enable_mpbsd+set}" = set; then : enableval=$enable_mpbsd; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-mpbsd, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-mpbsd, need yes or no" "$LINENO" 5 ;; esac else enable_mpbsd=no @@ -3877,9 +3738,9 @@ enableval=$enable_nails; case $enableval in yes|no|[02468]|[0-9][02468]) ;; *[13579]) - as_fn_error "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;; *) - as_fn_error "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;; esac else enable_nails=no @@ -3898,7 +3759,7 @@ if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; case $enableval in no|prof|gprof|instrument) ;; -*) as_fn_error "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;; esac else enable_profiling=no @@ -3940,7 +3801,7 @@ if test "${with_readline+set}" = set; then : withval=$with_readline; case $withval in yes|no|detect) ;; -*) as_fn_error "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;; esac else with_readline=detect @@ -3952,7 +3813,7 @@ if test "${enable_fat+set}" = set; then : enableval=$enable_fat; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;; esac else enable_fat=no @@ -3964,7 +3825,7 @@ if test "${enable_minithres+set}" = set; then : enableval=$enable_minithres; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;; esac else enable_minithres=no @@ -4119,11 +3980,14 @@ $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_alpha 1" >>confdefs.h case $host_cpu in - alphaev5* | alphapca5*) path="alpha/ev5 alpha" ;; + alphaev5* | alphapca5*) + path="alpha/ev5 alpha" ;; alphaev67 | alphaev68 | alphaev7*) - path="alpha/ev67 alpha/ev6 alpha/ev5 alpha" ;; - alphaev6* | alphaev7*) path="alpha/ev6 alpha/ev5 alpha" ;; - *) path="alpha" ;; + path="alpha/ev67 alpha/ev6 alpha" ;; + alphaev6) + path="alpha/ev6 alpha" ;; + *) + path="alpha" ;; esac extra_functions="cntlz" gcc_cflags_optlist="asm cpu oldas" # need asm ahead of cpu, see below @@ -4291,7 +4155,6 @@ # checking sizeof(long), either 4 or 8 bytes respectively. Do this in # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc. # - gcc_cflags="-O2" gcc_cflags_optlist="arch" gcc_testlist="sizeof-long-4" SPEED_CYCLECOUNTER_OBJ=hppa.lo @@ -4362,6 +4225,7 @@ # systems (GNU/Linux for instance), but lets assume they're ok. case $host in *-*-hpux[1-9] | *-*-hpux[1-9].* | *-*-hpux10 | *-*-hpux10.*) ;; + *-*-linux*) abilist="1.0" ;; # due to linux permanent kernel bug *) abilist="2.0w $abilist" ;; esac @@ -4582,6 +4446,7 @@ gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin gcc_cflags_asm="" gcc_cflags_cpu="" + vmx_path="" # grab this object, though it's not a true cycle counter routine SPEED_CYCLECOUNTER_OBJ=powerpc.lo @@ -4623,7 +4488,8 @@ powerpc604) gcc_cflags_cpu="-mcpu=604" ;; powerpc604e) gcc_cflags_cpu="-mcpu=604e -mcpu=604" ;; powerpc620) gcc_cflags_cpu="-mcpu=620" ;; - powerpc630) gcc_cflags_cpu="-mcpu=630" ;; + powerpc630) gcc_cflags_cpu="-mcpu=630" + cpu_path="p3" ;; powerpc740) gcc_cflags_cpu="-mcpu=740" ;; powerpc7400 | powerpc7410) gcc_cflags_asm="-Wa,-maltivec" @@ -4636,7 +4502,15 @@ powerpc821) gcc_cflags_cpu="-mcpu=821" ;; powerpc823) gcc_cflags_cpu="-mcpu=823" ;; powerpc860) gcc_cflags_cpu="-mcpu=860" ;; - powerpc970) gcc_cflags_cpu="-mcpu=970" ;; + powerpc970) gcc_cflags_cpu="-mtune=970" + vmx_path="powerpc64/vmx" + cpu_path="p4" ;; + power4) gcc_cflags_cpu="-mtune=power4" + cpu_path="p4" ;; + power5) gcc_cflags_cpu="-mtune=power5 -mtune=power4" + cpu_path="p5 p4" ;; + power6) gcc_cflags_cpu="-mtune=power6" + cpu_path="p6" ;; esac case $host in @@ -4664,11 +4538,21 @@ esac case $host in + *-*-aix*) + cclist="gcc xlc cc" + gcc_32_cflags_maybe="-maix32" + xlc_cflags="-O2 -qmaxmem=20000" + xlc_cflags_optlist="arch" + xlc_32_cflags_maybe="-q32" + cc_cflags="-O2 -qmaxmem=20000" + cc_cflags_optlist="arch" + cc_32_cflags_maybe="-q32" + ar_32_flags="-X32" + nm_32_flags="-X32" + esac + + case $host in powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*) - case $host_cpu in - powerpc970) vmx_path="powerpc64/vmx" ;; - *) vmx_path="" ;; - esac case $host in *-*-aix*) # On AIX a true 64-bit ABI is available. @@ -4683,7 +4567,9 @@ # Must indicate object type to ar and nm ar_aix64_flags="-X64" nm_aix64_flags="-X64" - path_aix64="powerpc64/mode64 $vmx_path powerpc64" + path_aix64="" + for i in $cpu_path; do path_aix64="${path_aix64}powerpc64/mode64/$i "; done + path_aix64="${path_aix64}powerpc64/mode64 $vmx_path powerpc64" # grab this object, though it's not a true cycle counter routine SPEED_CYCLECOUNTER_OBJ_aix64=powerpc64.lo cyclecounter_size_aix64=0 @@ -4698,7 +4584,7 @@ # longlong.h macros expect limb operands in a single 64-bit # register, not two 32-bit registers as would be given for a # long long without -mpowerpc64. In theory we could detect and - # accomodate both styles, but the proper 64-bit registers will + # accommodate both styles, but the proper 64-bit registers will # be fastest and are what we really want to use. # # One would think -mpowerpc64 would set the assembler in the right @@ -4721,7 +4607,9 @@ gcc_mode64_cflags="-m64" gcc_mode64_cflags_optlist="cpu opt" gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="powerpc64/mode64 $vmx_path powerpc64" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo cyclecounter_size_mode64=0 any_mode64_testlist="sizeof-long-8" @@ -4752,7 +4640,9 @@ gcc_mode64_cflags_maybe="-m64" gcc_mode64_cflags_optlist="cpu opt" gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="powerpc64/mode64 $vmx_path powerpc64" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo cyclecounter_size_mode64=0 any_mode64_testlist="sizeof-long-8" @@ -4798,8 +4688,13 @@ ;; - # IBM s/370 and similar - s3[6-9]0*-*-*) + # IBM S/390 64 bit + s390x-*-*) + gcc_cflags="-g -O2 $fomit_frame_pointer" + path="s390x" + ;; + # IBM S/390 32 bit + s390-*-*) gcc_cflags="$gcc_cflags $fomit_frame_pointer" path="s390" extra_functions="udiv_w_sdiv" @@ -4945,7 +4840,15 @@ *) abilist="64 32" ;; esac - path_64="sparc64" + case $host_cpu in + ultrasparc | ultrasparc2 | ultrasparc2i) + path_64="sparc64/ultrasparc12 sparc64" ;; + ultrasparc3) + path_64="sparc64/ultrasparc34 sparc64/ultrasparc12 sparc64" ;; + *) + path_64="sparc64" + esac + cclist_64="gcc" any_64_testlist="sizeof-long-8" @@ -5015,7 +4918,7 @@ # mode, in case -m32 has failed not because it's an old gcc, but because # it's a dual 32/64-bit gcc without a 32-bit libc, or whatever. # - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) abilist="32" cclist="gcc icc cc" gcc_cflags="$gcc_cflags $fomit_frame_pointer" @@ -5123,6 +5026,7 @@ # gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486" gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium" + gcc_64_cflags_cpu="-mtune=nocona" ;; viac32) # Not sure of the best fallbacks here for -mcpu. @@ -5139,10 +5043,14 @@ gcc_cflags_cpu="-mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" gcc_cflags_arch="-march=k8 -march=k8~-mno-sse2 -march=athlon -march=pentiumpro -march=pentium" ;; - core2) + core2 | corei) gcc_cflags_cpu="-mtune=core2 -mtune=k8" gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" ;; + atom) + gcc_cflags_cpu="-mtune=atom -mtune=pentium3" + gcc_cflags_arch="-march=atom -march=pentium3" + ;; *) gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" gcc_cflags_arch="-march=i486" @@ -5157,7 +5065,8 @@ i686 | pentiumpro) path="x86/p6 x86" ;; pentium2) path="x86/p6/mmx x86/p6 x86" ;; pentium3) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; - pentiumm | core2) path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; + pentiumm | core2 | corei) + path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; k6[23]) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; k6) path="x86/k6/mmx x86/k6 x86" ;; geode) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; @@ -5168,64 +5077,55 @@ # VIA/Centaur processors, sold as CyrixIII and C3. viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; viac3*) path="x86/pentium/mmx x86/pentium x86";; + atom) path="x86/atom x86" ;; *) path="x86" ;; esac - # If the user asked for a fat build, override the path and flags set above - if test $enable_fat = yes; then - gcc_cflags_cpu="" - gcc_cflags_arch="" - extra_functions="$extra_functions fat fat_entry" - path="x86/fat x86" - fat_path="x86 x86/fat x86/i486 - x86/k6 x86/k6/mmx x86/k6/k62mmx - x86/k7 x86/k7/mmx - x86/pentium x86/pentium/mmx - x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 - x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2" - fat_functions="add_n addmul_1 copyd copyi - dive_1 diveby3 divrem_1 gcd_1 lshift - mod_1 mod_34lsub1 mode1o mul_1 mul_basecase - pre_divrem_1 pre_mod_1 rshift - sqr_basecase sub_n submul_1" - fat_thresholds="MUL_KARATSUBA_THRESHOLD MUL_TOOM3_THRESHOLD - SQR_KARATSUBA_THRESHOLD SQR_TOOM3_THRESHOLD" - fi - - case $host_cpu in - athlon64 | atom | core2 | pentium4 | x86_64) - cclist_64="gcc" - gcc_64_cflags="$gcc_64_cflags -m64" - gcc_64_cflags_optlist="cpu" - CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' - SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo - cyclecounter_size_64=2 - - case $host in - *-*-solaris*) - # Sun cc. - cclist_64="$cclist_64 cc" - cc_64_cflags="-xO3 -m64" - ;; - esac + case $host in + athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) + cclist_64="gcc" + gcc_64_cflags="$gcc_64_cflags -m64" + gcc_64_cflags_optlist="cpu arch" + CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' + SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo + cyclecounter_size_64=2 + abilist="64 32" + path_64="x86_64" case $host_cpu in - athlon64 | x86_64) - abilist="64 32" - path_64="x86_64" + x86_64) + ;; + athlon64) + path_64="x86_64/k8 $path_64" ;; pentium4) - abilist="64 32" - path_64="x86_64/pentium4 x86_64" + path_64="x86_64/pentium4 $path_64" ;; core2) - abilist="64 32" - path_64="x86_64/core2 x86_64" + path_64="x86_64/core2 $path_64" + ;; + corei) + path_64="x86_64/corei x86_64/core2 $path_64" ;; atom) - # The AMD K8/K9/K10 code seems best for Intel Atom - abilist="64 32" - path_64="x86_64/atom x86_64" + path_64="x86_64/atom $path_64" + ;; + nano) + path_64="x86_64/nano $path_64" + ;; + esac + + case $host in + *-*-solaris*) + # Sun cc. + cclist_64="$cclist_64 cc" + cc_64_cflags="-xO3 -m64" + ;; + *-*-mingw*) + limb_64=longlong + path_64="" # Windows amd64 calling conventions are *different* + # Silence many pedantic warnings for w64. FIXME. + gcc_64_cflags="$gcc_64_cflags -std=gnu99" ;; esac ;; @@ -5309,7 +5209,7 @@ if test $abi = "$ABI"; then found=yes; break; fi done if test $found = no; then - as_fn_error "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5 + as_fn_error $? "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5 fi abilist="$ABI" fi @@ -5461,10 +5361,10 @@ cflags="$cflags_maybe $cflags" fi - # Any user CFLAGS, even an empty string, takes precendence + # Any user CFLAGS, even an empty string, takes precedence if test "$test_CFLAGS" = set; then cflags=$CFLAGS; fi - # Any user CPPFLAGS, even an empty string, takes precendence + # Any user CPPFLAGS, even an empty string, takes precedence eval cppflags=\"\$${ccbase}${abi1}_cppflags\" test -n "$cppflags" || eval cppflags=\"\$${ccbase}${abi2}_cppflags\" if test "$test_CPPFLAGS" = set; then cppflags=$CPPFLAGS; fi @@ -6407,7 +6307,7 @@ # if test "$gmp_prog_cc_works" = yes; then case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) # this problem only arises in PIC code, so don't need to test when # --disable-shared. We don't necessarily have $enable_shared set to # yes at this point, it will still be unset for the default (which is @@ -6756,9 +6656,45 @@ # C on MS-DOS systems). # if test $found_compiler = no && test -n "$path"; then - as_fn_error "could not find a working compiler, see config.log for details" "$LINENO" 5 + as_fn_error $? "could not find a working compiler, see config.log for details" "$LINENO" 5 fi +case $host in + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) + # If the user asked for a fat build, override the path and flags set above + if test $enable_fat = yes; then + gcc_cflags_cpu="" + gcc_cflags_arch="" + + if test "$abi" = 32; then + extra_functions="$extra_functions fat fat_entry" + path="x86/fat x86" + fat_path="x86 x86/fat x86/i486 + x86/k6 x86/k6/mmx x86/k6/k62mmx + x86/k7 x86/k7/mmx + x86/pentium x86/pentium/mmx + x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 + x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2" + fi + + if test "$abi" = 64; then + gcc_64_cflags="" + extra_functions_64="$extra_functions_64 fat fat_entry" + path_64="x86_64/fat x86_64" + fat_path="x86_64 x86_64/fat x86_64/pentium4 x86_64/core2 x86_64/corei x86_64/atom x86_64/nano" + fi + + fat_functions="add_n addmul_1 copyd copyi + dive_1 diveby3 divrem_1 gcd_1 lshift + mod_1 mod_34lsub1 mode1o mul_1 mul_basecase + pre_divrem_1 pre_mod_1 rshift + sqr_basecase sub_n submul_1" + fat_thresholds="MUL_TOOM22_THRESHOLD MUL_TOOM33_THRESHOLD + SQR_TOOM2_THRESHOLD SQR_TOOM3_THRESHOLD" + fi + ;; +esac + if test $found_compiler = yes; then @@ -6809,7 +6745,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports XMM registers" >&5 $as_echo_n "checking whether the operating system supports XMM registers... " >&6; } -if test "${gmp_cv_os_x86_xmm+set}" = set; then : +if ${gmp_cv_os_x86_xmm+:} false; then : $as_echo_n "(cached) " >&6 else if test "$build" = "$host"; then @@ -7914,7 +7850,7 @@ # if test "$gmp_prog_cc_works" = yes; then case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) # this problem only arises in PIC code, so don't need to test when # --disable-shared. We don't necessarily have $enable_shared set to # yes at this point, it will still be unset for the default (which is @@ -8136,7 +8072,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8176,7 +8112,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -8229,7 +8165,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8269,7 +8205,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8328,7 +8264,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8372,7 +8308,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -8426,8 +8362,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -8541,9 +8477,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -8585,8 +8520,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -8643,9 +8578,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -8656,7 +8591,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8696,8 +8631,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -8707,7 +8642,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8744,7 +8679,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -8822,7 +8757,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -8923,7 +8858,7 @@ *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if test "${ac_cv_prog_cc_c99+set}" = set; then : +if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no @@ -9098,7 +9033,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -9194,7 +9129,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } - if test "${ac_cv_prog_cc_stdc+set}" = set; then : + if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi @@ -9222,7 +9157,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -9252,7 +9187,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -9268,11 +9203,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -9311,7 +9246,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -9327,18 +9262,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -9357,7 +9292,6 @@ /* end confdefs.h. */ #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -9417,7 +9351,7 @@ if test "$cc_for_build_works" = yes; then : else - as_fn_error "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 fi elif test -n "$HOST_CC"; then @@ -9449,7 +9383,7 @@ if test "$cc_for_build_works" = yes; then CC_FOR_BUILD=$HOST_CC else - as_fn_error "Specified HOST_CC doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Specified HOST_CC doesn't seem to work" "$LINENO" 5 fi else @@ -9488,7 +9422,7 @@ done if test -z "$CC_FOR_BUILD"; then - as_fn_error "Cannot find a build system compiler" "$LINENO" 5 + as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5 fi fi @@ -9499,7 +9433,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system preprocessor" >&5 $as_echo_n "checking for build system preprocessor... " >&6; } if test -z "$CPP_FOR_BUILD"; then - if test "${gmp_cv_prog_cpp_for_build+set}" = set; then : + if ${gmp_cv_prog_cpp_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for build system executable suffix... " >&6; } -if test "${gmp_cv_prog_exeext_for_build+set}" = set; then : +if ${gmp_cv_prog_exeext_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking whether build system compiler is ANSI... " >&6; } -if test "${gmp_cv_c_for_build_ansi+set}" = set; then : +if ${gmp_cv_c_for_build_ansi+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for build system compiler math library... " >&6; } -if test "${gmp_cv_check_libm_for_build+set}" = set; then : +if ${gmp_cv_check_libm_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -9718,7 +9652,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -9796,7 +9730,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9833,7 +9767,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -10087,7 +10021,7 @@ # If --enable-cxx=yes but a C++ compiler can't be found, then abort. if test $want_cxx = no && test $enable_cxx = yes; then - as_fn_error "C++ compiler not available, see config.log for details" "$LINENO" 5 + as_fn_error $? "C++ compiler not available, see config.log for details" "$LINENO" 5 fi fi @@ -10114,7 +10048,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -10144,7 +10078,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -10160,11 +10094,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -10203,7 +10137,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -10219,18 +10153,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -10248,7 +10182,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -10297,7 +10231,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -10311,7 +10245,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -10363,7 +10297,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -10435,12 +10369,12 @@ # enough assembler. # case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) if test "$ABI" = 32; then case "$path $fat_path" in *mmx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about MMX instructions" >&5 $as_echo_n "checking if the assembler knows about MMX instructions... " >&6; } -if test "${gmp_cv_asm_x86_mmx+set}" = set; then : +if ${gmp_cv_asm_x86_mmx+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if the assembler knows about SSE2 instructions... " >&6; } -if test "${gmp_cv_asm_x86_sse2+set}" = set; then : +if ${gmp_cv_asm_x86_sse2+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10776,8 +10710,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -10798,7 +10731,7 @@ for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = x""yes; then : +if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRING_H 1 _ACEOF @@ -10812,7 +10745,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports --noexecstack option" >&5 $as_echo_n "checking whether assembler supports --noexecstack option... " >&6; } -if test "${cl_cv_as_noexecstack+set}" = set; then : +if ${cl_cv_as_noexecstack+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c <&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -10895,7 +10828,7 @@ set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -10963,7 +10896,7 @@ gmp_user_NM=$NM { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -11016,14 +10949,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -11061,13 +10997,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -11116,6 +11052,15 @@ fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -11130,18 +11075,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:__oline__: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -11166,7 +11111,7 @@ NM= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -11219,14 +11164,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -11264,13 +11212,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -11319,6 +11267,15 @@ fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -11330,18 +11287,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:__oline__: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -11389,13 +11346,13 @@ enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AS+set}" = set; then : +if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then @@ -11435,7 +11392,7 @@ set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : +if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then @@ -11487,7 +11444,7 @@ set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then : +if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -11527,7 +11484,7 @@ set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -11579,7 +11536,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -11619,7 +11576,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -11700,7 +11657,7 @@ fi # Don't allow both static and DLL. if test "$enable_shared" != no && test "$enable_static" != no; then - as_fn_error "cannot build both static and DLL, since gmp.h is different for each. + as_fn_error $? "cannot build both static and DLL, since gmp.h is different for each. Use \"--disable-static --enable-shared\" to build just a DLL." "$LINENO" 5 fi @@ -11787,8 +11744,8 @@ -macro_version='2.2.6b' -macro_revision='1.3017' +macro_version='2.4' +macro_revision='1.3293' @@ -11804,9 +11761,78 @@ ltmain="$ac_aux_dir/ltmain.sh" +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -11861,7 +11887,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -11888,7 +11914,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -11940,7 +11966,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -12019,7 +12045,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -12056,10 +12082,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -12098,7 +12124,7 @@ # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -12131,6 +12157,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -12195,8 +12226,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -12238,8 +12269,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -12288,25 +12319,104 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -12326,7 +12436,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -12366,7 +12476,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -12422,7 +12532,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -12464,16 +12574,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -12503,6 +12615,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -12511,11 +12627,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -12618,6 +12734,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -12633,12 +12764,162 @@ + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -12651,7 +12932,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12671,14 +12952,18 @@ fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -12691,7 +12976,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12710,6 +12995,10 @@ $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -12721,29 +13010,85 @@ esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -12783,7 +13128,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -12842,7 +13187,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -12882,7 +13227,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -12953,8 +13298,20 @@ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi - - +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + @@ -12999,7 +13356,7 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -13060,8 +13417,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -13097,6 +13454,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -13122,8 +13480,8 @@ test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then @@ -13138,6 +13496,18 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -13149,7 +13519,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT@&t@_DLSYM_CONST struct { const char *name; void *address; } @@ -13175,8 +13545,8 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -13186,8 +13556,8 @@ test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -13224,6 +13594,18 @@ $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + @@ -13245,6 +13627,43 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +@%:@ Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + @%:@ Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -13276,7 +13695,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line __oline__ "configure"' > conftest.$ac_ext + echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13370,7 +13789,7 @@ CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -13438,6 +13857,123 @@ need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -13446,7 +13982,7 @@ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -13486,7 +14022,7 @@ set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -13538,7 +14074,7 @@ set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -13578,7 +14114,7 @@ set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -13630,7 +14166,7 @@ set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -13670,7 +14206,7 @@ set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -13722,7 +14258,7 @@ set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -13762,7 +14298,7 @@ set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -13814,7 +14350,7 @@ set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -13854,7 +14390,7 @@ set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -13929,729 +14465,156 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -_lt_caught_CXX_error=yes; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_F77+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -$as_echo "$F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then : + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - end +int +main () +{ + + ; + return 0; +} _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes else - ac_compiler_gnu=no + lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else - FFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac - end +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_DLFCN_H 1 _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_cv_prog_f77_g=yes -else - ac_cv_prog_f77_g=no + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi +done -if test $ac_compiler_gnu = yes; then - G77=yes -else - G77= -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi + + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + @@ -14784,6 +14747,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + @@ -14828,7 +14792,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -14856,19 +14820,6 @@ - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -14881,23 +14832,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -14926,7 +14860,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -14936,7 +14870,7 @@ if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -15002,7 +14936,7 @@ if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -15135,11 +15069,16 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -15155,15 +15094,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes @@ -15192,8 +15131,6 @@ lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -15241,6 +15178,12 @@ lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -15283,6 +15226,13 @@ lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -15345,7 +15295,13 @@ lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -15357,25 +15313,25 @@ # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_wl='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' + lt_prog_compiler_wl='-Wl,' ;; esac ;; @@ -15407,7 +15363,7 @@ lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -15464,13 +15420,17 @@ lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -15478,7 +15438,7 @@ if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -15494,15 +15454,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes @@ -15531,13 +15491,18 @@ + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -15550,7 +15515,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -15580,7 +15545,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -15599,16 +15564,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -15635,7 +15600,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -15654,16 +15619,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -15773,13 +15738,39 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -15813,11 +15804,12 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -15853,10 +15845,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -15874,6 +15868,11 @@ fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -15899,15 +15898,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -15918,13 +15918,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -15940,17 +15944,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -15964,8 +15968,8 @@ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -15983,8 +15987,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -16030,8 +16034,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -16071,8 +16075,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -16160,7 +16166,13 @@ allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -16173,25 +16185,32 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' @@ -16200,7 +16219,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -16213,30 +16238,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -16268,20 +16305,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -16291,7 +16371,11 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in @@ -16299,7 +16383,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -16342,7 +16426,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -16350,7 +16434,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -16365,8 +16449,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -16384,16 +16468,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -16405,7 +16489,46 @@ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + ;; esac fi @@ -16433,26 +16556,39 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -16514,17 +16650,17 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -16534,13 +16670,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -16553,9 +16689,9 @@ no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -16743,44 +16879,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi @@ -16951,16 +17093,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -16973,7 +17122,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -16993,7 +17142,13 @@ if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -17081,7 +17236,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -17112,8 +17267,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -17134,36 +17290,83 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -17247,6 +17450,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -17292,8 +17509,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -17360,12 +17579,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -17378,13 +17602,17 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -17393,7 +17621,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -17708,6 +17936,11 @@ + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= @@ -17780,7 +18013,7 @@ # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17814,7 +18047,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -17828,12 +18061,12 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17867,16 +18100,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17910,12 +18143,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17949,12 +18182,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17988,7 +18221,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -18029,7 +18262,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -18038,7 +18271,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line __oline__ "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18079,7 +18312,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -18088,7 +18327,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -18125,7 +18368,7 @@ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -18134,7 +18377,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line __oline__ "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18175,7 +18418,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -18184,7 +18433,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -18341,7 +18594,146 @@ CC="$lt_save_CC" - + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -18367,6 +18759,8 @@ module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no @@ -18422,6 +18816,7 @@ # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -18439,6 +18834,7 @@ fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do @@ -18449,7 +18845,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then @@ -18512,7 +18908,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -18549,10 +18945,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -18578,8 +18974,8 @@ # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -18611,7 +19007,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -18721,7 +19117,13 @@ allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -18734,26 +19136,33 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' @@ -18762,7 +19171,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -18775,30 +19190,42 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. @@ -18828,28 +19255,75 @@ ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; darwin* | rhapsody*) @@ -18857,7 +19331,11 @@ hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_CXX='' + fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in @@ -18865,7 +19343,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -18918,6 +19396,11 @@ gnu*) ;; + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -18942,11 +19425,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -19007,7 +19490,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then @@ -19017,10 +19500,10 @@ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -19050,7 +19533,7 @@ case $cc_basename in CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -19061,9 +19544,9 @@ *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes @@ -19092,7 +19575,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -19129,26 +19612,26 @@ pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; @@ -19156,7 +19639,7 @@ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -19175,9 +19658,9 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -19197,13 +19680,13 @@ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -19272,7 +19755,7 @@ export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi @@ -19307,15 +19790,15 @@ case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; @@ -19331,17 +19814,17 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -19351,7 +19834,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -19387,7 +19870,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' @@ -19408,7 +19891,7 @@ esac link_all_deplibs_CXX=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -19428,14 +19911,14 @@ if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -19446,7 +19929,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' @@ -19500,6 +19983,10 @@ CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -19561,6 +20048,13 @@ }; _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -19574,7 +20068,7 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -19583,13 +20077,22 @@ test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -19609,8 +20112,10 @@ postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -19646,6 +20151,7 @@ fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in @@ -19681,7 +20187,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -19746,8 +20252,6 @@ lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -19797,6 +20301,11 @@ # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -19846,6 +20355,11 @@ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; dgux*) case $cc_basename in ec++*) @@ -19935,8 +20449,8 @@ lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' @@ -19998,7 +20512,7 @@ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' @@ -20063,10 +20577,17 @@ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX@&t@ -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. @@ -20074,7 +20595,7 @@ if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no @@ -20090,15 +20611,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes @@ -20124,13 +20645,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no @@ -20143,7 +20666,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes @@ -20170,7 +20693,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -20189,16 +20712,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -20222,7 +20745,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -20241,16 +20764,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -20301,30 +20824,38 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) + case $cc_basename in + cl*) ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no - ;; + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } @@ -20356,44 +20887,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi @@ -20550,7 +21087,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -20581,8 +21118,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -20603,36 +21141,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -20715,6 +21299,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -20760,8 +21358,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -20828,12 +21428,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -20846,13 +21451,17 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -20861,7 +21470,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -21125,6 +21734,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= @@ -21172,6 +21783,7 @@ fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -21195,6 +21807,9 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi archive_cmds_need_lc_F77=no allow_undefined_flag_F77= @@ -21213,6 +21828,8 @@ module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds +reload_flag_F77=$reload_flag +reload_cmds_F77=$reload_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no @@ -21276,7 +21893,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do @@ -21287,7 +21906,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` GCC=$G77 if test -n "$compiler"; then @@ -21337,8 +21956,6 @@ lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' @@ -21386,6 +22003,12 @@ lt_prog_compiler_pic_F77='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_F77= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -21428,6 +22051,13 @@ lt_prog_compiler_pic_F77='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_F77='-Xlinker ' + lt_prog_compiler_pic_F77='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -21490,7 +22120,13 @@ lt_prog_compiler_pic_F77='--shared' lt_prog_compiler_static_F77='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' @@ -21502,25 +22138,25 @@ # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-qpic' lt_prog_compiler_static_F77='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_wl_F77='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' + lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; @@ -21552,7 +22188,7 @@ lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; @@ -21609,10 +22245,17 @@ lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77@&t@" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 -$as_echo "$lt_prog_compiler_pic_F77" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. @@ -21620,7 +22263,7 @@ if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no @@ -21636,15 +22279,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes @@ -21670,13 +22313,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no @@ -21689,7 +22334,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes @@ -21716,7 +22361,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no @@ -21735,16 +22380,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes @@ -21768,7 +22413,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no @@ -21787,16 +22432,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes @@ -21903,13 +22548,39 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) link_all_deplibs_F77=no ;; esac ld_shlibs_F77=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -21943,11 +22614,12 @@ ld_shlibs_F77=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -21983,10 +22655,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' + export_dynamic_flag_spec_F77='${wl}--export-all-symbols' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -22004,6 +22678,11 @@ fi ;; + haiku*) + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_F77=yes + ;; + interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no @@ -22029,15 +22708,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -22048,13 +22728,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec_F77= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_F77=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_F77=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -22070,17 +22754,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - archive_cmds_F77='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -22094,8 +22778,8 @@ archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -22113,8 +22797,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -22160,8 +22844,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -22201,8 +22885,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -22290,32 +22976,45 @@ allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' @@ -22324,37 +23023,55 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_F77='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + fi archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -22386,20 +23103,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + file_list_spec_F77='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_F77='chmod 644 $oldlib' + postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_F77=yes + ;; + esac ;; darwin* | rhapsody*) @@ -22409,7 +23169,11 @@ hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_F77='' + fi link_all_deplibs_F77=yes allow_undefined_flag_F77="$_lt_dar_allow_undefined" case $cc_basename in @@ -22417,7 +23181,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -22460,7 +23224,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no @@ -22468,7 +23232,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -22483,8 +23247,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -22502,16 +23266,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -22523,7 +23287,7 @@ archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi @@ -22551,25 +23315,40 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' @@ -22631,17 +23410,17 @@ hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported - archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' @@ -22651,13 +23430,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' @@ -22670,9 +23449,9 @@ no_undefined_flag_F77=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -22851,44 +23630,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5 -$as_echo "$archive_cmds_need_lc_F77" >&6; } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_F77=no + else + lt_cv_archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; } + archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 ;; esac fi @@ -23045,7 +23830,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -23076,8 +23861,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -23098,36 +23884,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -23210,6 +24042,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -23255,8 +24101,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -23323,25 +24171,34 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" - cat > conftest.$ac_ext <<_ACEOF + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -23350,7 +24207,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -23614,6 +24471,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= @@ -23662,6 +24521,7 @@ GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes ac_ext=c @@ -23696,7 +24556,7 @@ if test "$enable_shared" = yes && test "$enable_static" = yes; then case $library_names_spec in *libname.a*) - as_fn_error "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5 + as_fn_error $? "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5 ;; esac fi @@ -23716,7 +24576,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23828,7 +24688,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23891,8 +24751,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -23916,7 +24775,7 @@ # endif #endif " -if test "x$ac_cv_header_sys_resource_h" = x""yes; then : +if test "x$ac_cv_header_sys_resource_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_RESOURCE_H 1 _ACEOF @@ -23933,7 +24792,7 @@ # include #endif " -if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then : +if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_SYSCTL_H 1 _ACEOF @@ -23950,7 +24809,7 @@ # include #endif " -if test "x$ac_cv_header_machine_hal_sysinfo_h" = x""yes; then : +if test "x$ac_cv_header_machine_hal_sysinfo_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_MACHINE_HAL_SYSINFO_H 1 _ACEOF @@ -23972,7 +24831,7 @@ # to the man page (but aren't), in glibc they're in stdio.h. # ac_fn_c_check_decl "$LINENO" "fgetc" "ac_cv_have_decl_fgetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_fgetc" = x""yes; then : +if test "x$ac_cv_have_decl_fgetc" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23982,7 +24841,7 @@ @%:@define HAVE_DECL_FGETC $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fscanf" "ac_cv_have_decl_fscanf" "$ac_includes_default" -if test "x$ac_cv_have_decl_fscanf" = x""yes; then : +if test "x$ac_cv_have_decl_fscanf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23992,7 +24851,7 @@ @%:@define HAVE_DECL_FSCANF $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default" -if test "x$ac_cv_have_decl_optarg" = x""yes; then : +if test "x$ac_cv_have_decl_optarg" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24002,7 +24861,7 @@ @%:@define HAVE_DECL_OPTARG $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "ungetc" "ac_cv_have_decl_ungetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_ungetc" = x""yes; then : +if test "x$ac_cv_have_decl_ungetc" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24012,7 +24871,7 @@ @%:@define HAVE_DECL_UNGETC $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "vfprintf" "ac_cv_have_decl_vfprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vfprintf" = x""yes; then : +if test "x$ac_cv_have_decl_vfprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24025,7 +24884,7 @@ ac_fn_c_check_decl "$LINENO" "sys_errlist" "ac_cv_have_decl_sys_errlist" "#include #include " -if test "x$ac_cv_have_decl_sys_errlist" = x""yes; then : +if test "x$ac_cv_have_decl_sys_errlist" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24037,7 +24896,7 @@ ac_fn_c_check_decl "$LINENO" "sys_nerr" "ac_cv_have_decl_sys_nerr" "#include #include " -if test "x$ac_cv_have_decl_sys_nerr" = x""yes; then : +if test "x$ac_cv_have_decl_sys_nerr" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24050,7 +24909,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24093,7 +24952,7 @@ # the default includes are sufficient for all these types # ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" -if test "x$ac_cv_type_intmax_t" = x""yes; then : +if test "x$ac_cv_type_intmax_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_INTMAX_T 1 @@ -24102,7 +24961,7 @@ fi ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default" -if test "x$ac_cv_type_long_double" = x""yes; then : +if test "x$ac_cv_type_long_double" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LONG_DOUBLE 1 @@ -24111,7 +24970,7 @@ fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = x""yes; then : +if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LONG_LONG 1 @@ -24120,7 +24979,7 @@ fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_PTRDIFF_T 1 @@ -24129,7 +24988,7 @@ fi ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default" -if test "x$ac_cv_type_quad_t" = x""yes; then : +if test "x$ac_cv_type_quad_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_QUAD_T 1 @@ -24138,7 +24997,7 @@ fi ac_fn_c_check_type "$LINENO" "uint_least32_t" "ac_cv_type_uint_least32_t" "$ac_includes_default" -if test "x$ac_cv_type_uint_least32_t" = x""yes; then : +if test "x$ac_cv_type_uint_least32_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_UINT_LEAST32_T 1 @@ -24146,11 +25005,20 @@ fi +ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" +if test "x$ac_cv_type_intptr_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +@%:@define HAVE_INTPTR_T 1 +_ACEOF + + +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 $as_echo_n "checking for preprocessor stringizing operator... " >&6; } -if test "${ac_cv_c_stringize+set}" = set; then : +if ${ac_cv_c_stringize+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24182,7 +25050,7 @@ # But we don't use it in C++ currently. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } -if test "${ac_cv_c_volatile+set}" = set; then : +if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24217,7 +25085,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : +if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no @@ -24264,7 +25132,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether exists and works" >&5 $as_echo_n "checking whether exists and works... " >&6; } -if test "${gmp_cv_c_stdarg+set}" = set; then : +if ${gmp_cv_c_stdarg+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24305,7 +25173,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((const)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((const)) works... " >&6; } -if test "${gmp_cv_c_attribute_const+set}" = set; then : +if ${gmp_cv_c_attribute_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24337,7 +25205,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((malloc)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((malloc)) works... " >&6; } -if test "${gmp_cv_c_attribute_malloc+set}" = set; then : +if ${gmp_cv_c_attribute_malloc+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking whether gcc __attribute__ ((mode (XX))) works... " >&6; } -if test "${gmp_cv_c_attribute_mode+set}" = set; then : +if ${gmp_cv_c_attribute_mode+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24403,7 +25271,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((noreturn)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((noreturn)) works... " >&6; } -if test "${gmp_cv_c_attribute_noreturn+set}" = set; then : +if ${gmp_cv_c_attribute_noreturn+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24436,7 +25304,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -24485,7 +25353,6 @@ #define __GMP_WITHIN_CONFIGURE_INLINE 1 #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24520,13 +25387,13 @@ # from libtool LIBM= case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 $as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } -if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then : +if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24560,13 +25427,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } -if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then : +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : LIBM="-lmw" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } -if test "${ac_cv_lib_m_cos+set}" = set; then : +if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24600,7 +25467,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = x""yes; then : +if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="$LIBM -lm" fi @@ -24608,7 +25475,7 @@ *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } -if test "${ac_cv_lib_m_cos+set}" = set; then : +if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24642,7 +25509,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = x""yes; then : +if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="-lm" fi @@ -24656,7 +25523,7 @@ # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${gmp_cv_header_alloca+set}" = set; then : +if ${gmp_cv_header_alloca+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24689,14 +25556,13 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca (via gmp-impl.h)" >&5 $as_echo_n "checking for alloca (via gmp-impl.h)... " >&6; } -if test "${gmp_cv_func_alloca+set}" = set; then : +if ${gmp_cv_func_alloca+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24730,7 +25596,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to allocate temporary memory" >&5 $as_echo_n "checking how to allocate temporary memory... " >&6; } -if test "${gmp_cv_option_alloca+set}" = set; then : +if ${gmp_cv_option_alloca+:} false; then : $as_echo_n "(cached) " >&6 else case $enable_alloca in @@ -24760,7 +25626,7 @@ case $gmp_cv_option_alloca in alloca) if test $gmp_cv_func_alloca = no; then - as_fn_error "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5 + as_fn_error $? "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5 fi $as_echo "@%:@define WANT_TMP_ALLOCA 1" >>confdefs.h @@ -24783,7 +25649,7 @@ ;; *) # checks at the start of configure.in should protect us - as_fn_error "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5 + as_fn_error $? "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5 ;; esac @@ -24794,7 +25660,6 @@ #include #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24822,7 +25687,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -25057,7 +25922,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking format of \`double' floating point" >&5 $as_echo_n "checking format of \`double' floating point... " >&6; } -if test "${gmp_cv_c_double_format+set}" = set; then : +if ${gmp_cv_c_double_format+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_c_double_format=unknown @@ -25328,8 +26193,7 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -25340,7 +26204,7 @@ ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" -if test "x$ac_cv_func_vsnprintf" = x""yes; then : +if test "x$ac_cv_func_vsnprintf" = xyes; then : gmp_vsnprintf_exists=yes else gmp_vsnprintf_exists=no @@ -25351,7 +26215,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf works" >&5 $as_echo_n "checking whether vsnprintf works... " >&6; } -if test "${gmp_cv_func_vsnprintf+set}" = set; then : +if ${gmp_cv_func_vsnprintf+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_func_vsnprintf=yes @@ -25438,7 +26302,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sscanf needs writable input" >&5 $as_echo_n "checking whether sscanf needs writable input... " >&6; } -if test "${gmp_cv_func_sscanf_writable_input+set}" = set; then : +if ${gmp_cv_func_sscanf_writable_input+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -25455,7 +26319,7 @@ $as_echo "@%:@define SSCANF_WRITABLE_INPUT 1" >>confdefs.h ;; no) ;; - *) as_fn_error "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;; + *) as_fn_error $? "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;; esac @@ -25464,7 +26328,7 @@ # ac_fn_c_check_member "$LINENO" "struct pst_processor" "psp_iticksperclktick" "ac_cv_member_struct_pst_processor_psp_iticksperclktick" "#include " -if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = x""yes; then : +if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = xyes; then : $as_echo "@%:@define HAVE_PSP_ITICKSPERCLKTICK 1" >>confdefs.h @@ -25489,7 +26353,7 @@ for ac_header in sstream do : ac_fn_cxx_check_header_mongrel "$LINENO" "sstream" "ac_cv_header_sstream" "$ac_includes_default" -if test "x$ac_cv_header_sstream" = x""yes; then : +if test "x$ac_cv_header_sstream" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SSTREAM 1 _ACEOF @@ -25500,7 +26364,7 @@ ac_fn_cxx_check_type "$LINENO" "std::locale" "ac_cv_type_std__locale" "#include " -if test "x$ac_cv_type_std__locale" = x""yes; then : +if test "x$ac_cv_type_std__locale" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STD__LOCALE 1 @@ -25527,43 +26391,55 @@ # can provide some functions too. (mpn/Makefile.am passes # -DOPERATION_ to get them to generate the right code.) -# Note: The following lines defining $gmp_mpn_functions_optional -# and $gmp_mpn_functions are parsed by the "macos/configure" -# Perl script. So if you change the lines in a major way -# make sure to run and examine the output from -# -# % (cd macos; perl configure) -# # Note: $gmp_mpn_functions must have mod_1 before pre_mod_1 so the former # can optionally provide the latter as an extra entrypoint. Likewise # divrem_1 and pre_divrem_1. -gmp_mpn_functions_optional="umul udiv copyi copyd com_n - and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ +gmp_mpn_functions_optional="umul udiv \ invert_limb sqr_diagonal \ mul_2 mul_3 mul_4 \ addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8 \ - addlsh1_n sublsh1_n rsh1add_n rsh1sub_n addsub_n addaddmul_1msb0 lshiftc" + addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n \ + addlsh2_n sublsh2_n rsblsh2_n \ + addlsh_n sublsh_n rsblsh_n \ + add_n_sub_n addaddmul_1msb0" gmp_mpn_functions="$extra_functions \ - add add_1 add_n sub sub_1 sub_n neg_n mul_1 addmul_1 \ + add add_1 add_n sub sub_1 sub_n neg com mul_1 addmul_1 \ submul_1 lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2 \ fib2_ui mod_1 mod_34lsub1 mode1o pre_divrem_1 pre_mod_1 dump \ - mod_1_1 mod_1_2 mod_1_3 mod_1_4 \ - mul mul_fft mul_n mul_basecase sqr_basecase random random2 pow_1 \ - rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp perfsqr \ - bdivmod gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ + mod_1_1 mod_1_2 mod_1_3 mod_1_4 lshiftc \ + mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \ + random random2 pow_1 \ + rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp \ + perfsqr perfpow \ + gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ gcdext_lehmer gcdext_subdiv_step \ - tdiv_qr dc_divrem_n sb_divrem_mn jacbase get_d \ - matrix22_mul hgcd2 hgcd mullow_n mullow_basecase \ - toom22_mul toom33_mul toom44_mul \ - toom32_mul toom42_mul toom62_mul toom53_mul \ + div_q tdiv_qr jacbase get_d \ + matrix22_mul hgcd2 hgcd mullo_n mullo_basecase \ + toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \ + toom33_mul toom43_mul toom53_mul toom63_mul \ + toom44_mul \ + toom6h_mul toom6_sqr toom8h_mul toom8_sqr \ + toom_couple_handling \ toom2_sqr toom3_sqr toom4_sqr \ - toom_interpolate_5pts toom_interpolate_7pts invert binvert \ - sb_div_qr sb_divappr_q sb_div_q dc_div_qr dc_divappr_q dc_div_q \ + toom_eval_dgr3_pm1 toom_eval_dgr3_pm2 \ + toom_eval_pm1 toom_eval_pm2 toom_eval_pm2exp toom_eval_pm2rexp \ + toom_interpolate_5pts toom_interpolate_6pts toom_interpolate_7pts \ + toom_interpolate_8pts toom_interpolate_12pts toom_interpolate_16pts \ + invertappr invert binvert mulmod_bnm1 sqrmod_bnm1 \ + sbpi1_div_q sbpi1_div_qr sbpi1_divappr_q \ + dcpi1_div_q dcpi1_div_qr dcpi1_divappr_q \ mu_div_qr mu_divappr_q mu_div_q \ - sb_bdiv_q sb_bdiv_qr dc_bdiv_q dc_bdiv_qr mu_bdiv_q mu_bdiv_qr \ - divexact bdiv_dbm1c redc_1 redc_2 powm powlo powm_sec subcnd_n \ + bdiv_q_1 \ + sbpi1_bdiv_q sbpi1_bdiv_qr \ + dcpi1_bdiv_q dcpi1_bdiv_qr \ + mu_bdiv_q mu_bdiv_qr \ + bdiv_q bdiv_qr \ + divexact bdiv_dbm1c redc_1 redc_2 redc_n powm powlo powm_sec subcnd_n \ + redc_1_sec trialdiv remove \ + and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ + copyi copyd zero \ $gmp_mpn_functions_optional" @@ -25605,10 +26481,10 @@ # setup that structure, on a per-directory basis ready for # mpn//fat/fat.c. # -# fat.h includes thesholds listed in $fat_thresholds, extracted from +# fat.h includes thresholds listed in $fat_thresholds, extracted from # gmp-mparam.h in each directory. An overall maximum for each threshold is # established, for use in making fixed size arrays of temporary space. -# (Eg. MUL_TOOM3_THRESHOLD_LIMIT used by mpn/generic/mul.c.) +# (Eg. MUL_TOOM33_THRESHOLD_LIMIT used by mpn/generic/mul.c.) # # It'd be possible to do some of this manually, but when there's more than a # few functions and a few directories it becomes very tedious, and very @@ -25687,7 +26563,7 @@ echo " /* Copy all fields into __gmpn_cpuvec. memcpy is not used because it might operate byte-wise (depending on its - implemenation), and we need the function pointer writes to be atomic. + implementation), and we need the function pointer writes to be atomic. "volatile" discourages the compiler from trying to optimize this. */ #define CPUVEC_INSTALL(vec) \\ do { \\ @@ -25765,7 +26641,7 @@ esac # Extract desired thresholds from gmp-mparam.h file in this directory, - # if prsent. + # if present. tmp_mparam=$srcdir/mpn/$tmp_dir/gmp-mparam.h if test -f $tmp_mparam; then for tmp_tn in $fat_thresholds; do @@ -25796,8 +26672,24 @@ and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) tmp_mulfunc="logops_n" ;; lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n|sublsh1_n) - tmp_mulfunc="aorslsh1_n";; + addlsh1_n) + tmp_mulfunc="aorslsh1_n aorrlsh1_n";; + sublsh1_n) + tmp_mulfunc="aorslsh1_n sorrlsh1_n";; + rsblsh1_n) + tmp_mulfunc="aorrlsh1_n sorrlsh1_n";; + addlsh2_n) + tmp_mulfunc="aorslsh2_n aorrlsh2_n";; + sublsh2_n) + tmp_mulfunc="aorslsh2_n sorrlsh2_n";; + rsblsh2_n) + tmp_mulfunc="aorrlsh2_n sorrlsh2_n";; + addlsh_n) + tmp_mulfunc="aorslsh_n aorrlsh_n";; + sublsh_n) + tmp_mulfunc="aorslsh_n sorrlsh_n";; + rsblsh_n) + tmp_mulfunc="aorrlsh_n sorrlsh_n";; rsh1add_n|rsh1sub_n) tmp_mulfunc="rsh1aors_n";; esac @@ -25931,8 +26823,24 @@ and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) tmp_mulfunc="logops_n" ;; lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n|sublsh1_n) - tmp_mulfunc="aorslsh1_n";; + addlsh1_n) + tmp_mulfunc="aorslsh1_n aorrlsh1_n";; + sublsh1_n) + tmp_mulfunc="aorslsh1_n sorrlsh1_n";; + rsblsh1_n) + tmp_mulfunc="aorrlsh1_n sorrlsh1_n";; + addlsh2_n) + tmp_mulfunc="aorslsh2_n aorrlsh2_n";; + sublsh2_n) + tmp_mulfunc="aorslsh2_n sorrlsh2_n";; + rsblsh2_n) + tmp_mulfunc="aorrlsh2_n sorrlsh2_n";; + addlsh_n) + tmp_mulfunc="aorslsh_n aorrlsh_n";; + sublsh_n) + tmp_mulfunc="aorslsh_n sorrlsh_n";; + rsblsh_n) + tmp_mulfunc="aorrlsh_n sorrlsh_n";; rsh1add_n|rsh1sub_n) tmp_mulfunc="rsh1aors_n";; esac @@ -26040,7 +26948,7 @@ fi done if test $found = no; then - as_fn_error "no version of $tmp_fn found in path: $path" "$LINENO" 5 + as_fn_error $? "no version of $tmp_fn found in path: $path" "$LINENO" 5 fi fi done @@ -26059,7 +26967,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable m4" >&5 $as_echo_n "checking for suitable m4... " >&6; } -if test "${gmp_cv_prog_m4+set}" = set; then : +if ${gmp_cv_prog_m4+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$M4"; then @@ -26093,7 +27001,7 @@ done IFS="$ac_save_ifs" if test -z "$gmp_cv_prog_m4"; then - as_fn_error "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5 + as_fn_error $? "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5 fi fi rm -f conftest.m4 @@ -26107,7 +27015,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if m4wrap produces spurious output" >&5 $as_echo_n "checking if m4wrap produces spurious output... " >&6; } -if test "${gmp_cv_m4_m4wrap_spurious+set}" = set; then : +if ${gmp_cv_m4_m4wrap_spurious+:} false; then : $as_echo_n "(cached) " >&6 else # hide the d-n-l from autoconf's error checking @@ -26134,7 +27042,10 @@ else - M4=m4-not-needed + # In case the user has set M4 in the environment, don't touch it. + if test -z "$M4" ; then + M4=m4-not-needed + fi fi # Only do the GMP_ASM checks if there's a .S or .asm wanting them. @@ -26145,7 +27056,7 @@ if test "$gmp_asm_syntax_testing" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to text section" >&5 $as_echo_n "checking how to switch to text section... " >&6; } -if test "${gmp_cv_asm_text+set}" = set; then : +if ${gmp_cv_asm_text+:} false; then : $as_echo_n "(cached) " >&6 else for i in ".text" ".code" ".csect .text[PR]"; do @@ -26173,7 +27084,7 @@ done if test -z "$gmp_cv_asm_text"; then - as_fn_error "Cannot determine text section directive" "$LINENO" 5 + as_fn_error $? "Cannot determine text section directive" "$LINENO" 5 fi fi @@ -26183,7 +27094,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to data section" >&5 $as_echo_n "checking how to switch to data section... " >&6; } -if test "${gmp_cv_asm_data+set}" = set; then : +if ${gmp_cv_asm_data+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26199,7 +27110,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler label suffix" >&5 $as_echo_n "checking for assembler label suffix... " >&6; } -if test "${gmp_cv_asm_label_suffix+set}" = set; then : +if ${gmp_cv_asm_label_suffix+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_label_suffix=unknown @@ -26229,7 +27140,7 @@ done if test "$gmp_cv_asm_label_suffix" = "unknown"; then - as_fn_error "Cannot determine label suffix" "$LINENO" 5 + as_fn_error $? "Cannot determine label suffix" "$LINENO" 5 fi fi @@ -26240,7 +27151,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive" >&5 $as_echo_n "checking for assembler global directive... " >&6; } -if test "${gmp_cv_asm_globl+set}" = set; then : +if ${gmp_cv_asm_globl+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26257,7 +27168,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive attribute" >&5 $as_echo_n "checking for assembler global directive attribute... " >&6; } -if test "${gmp_cv_asm_globl_attr+set}" = set; then : +if ${gmp_cv_asm_globl_attr+:} false; then : $as_echo_n "(cached) " >&6 else case $gmp_cv_asm_globl in @@ -26273,7 +27184,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if globals are prefixed by underscore" >&5 $as_echo_n "checking if globals are prefixed by underscore... " >&6; } -if test "${gmp_cv_asm_underscore+set}" = set; then : +if ${gmp_cv_asm_underscore+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_underscore="unknown" @@ -26344,19 +27255,20 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to read-only data section" >&5 $as_echo_n "checking how to switch to read-only data section... " >&6; } -if test "${gmp_cv_asm_rodata+set}" = set; then : +if ${gmp_cv_asm_rodata+:} false; then : $as_echo_n "(cached) " >&6 else case $host in -i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | x86_64-*-*) +i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | x86_64-*-*) gmp_cv_asm_rodata="$gmp_cv_asm_data" ;; *) gmp_cv_asm_rodata="$gmp_cv_asm_text" ;; esac cat >conftest.c <&5 cat conftest.c >&5 @@ -26401,7 +27313,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .type directive" >&5 $as_echo_n "checking for assembler .type directive... " >&6; } -if test "${gmp_cv_asm_type+set}" = set; then : +if ${gmp_cv_asm_type+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_type= @@ -26439,7 +27351,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .size directive" >&5 $as_echo_n "checking for assembler .size directive... " >&6; } -if test "${gmp_cv_asm_size+set}" = set; then : +if ${gmp_cv_asm_size+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_size= @@ -26476,7 +27388,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler local label prefix" >&5 $as_echo_n "checking for assembler local label prefix... " >&6; } -if test "${gmp_cv_asm_lsym_prefix+set}" = set; then : +if ${gmp_cv_asm_lsym_prefix+:} false; then : $as_echo_n "(cached) " >&6 else gmp_tmp_pre_appears=yes @@ -26550,7 +27462,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler byte directive" >&5 $as_echo_n "checking for assembler byte directive... " >&6; } -if test "${gmp_cv_asm_byte+set}" = set; then : +if ${gmp_cv_asm_byte+:} false; then : $as_echo_n "(cached) " >&6 else for i in .byte data1; do @@ -26580,7 +27492,7 @@ done if test -z "$gmp_cv_asm_byte"; then - as_fn_error "Cannot determine how to emit a data byte" "$LINENO" 5 + as_fn_error $? "Cannot determine how to emit a data byte" "$LINENO" 5 fi fi @@ -26594,7 +27506,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to define a 32-bit word" >&5 $as_echo_n "checking how to define a 32-bit word... " >&6; } -if test "${gmp_cv_asm_w32+set}" = set; then : +if ${gmp_cv_asm_w32+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26642,7 +27554,7 @@ ;; esac if test -z "$gmp_cv_asm_w32"; then - as_fn_error "cannot determine how to define a 32-bit word" "$LINENO" 5 + as_fn_error $? "cannot determine how to define a 32-bit word" "$LINENO" 5 fi fi @@ -26657,7 +27569,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align assembly directive is logarithmic" >&5 $as_echo_n "checking if .align assembly directive is logarithmic... " >&6; } -if test "${gmp_cv_asm_align_log+set}" = set; then : +if ${gmp_cv_asm_align_log+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "cannot assemble alignment test" "$LINENO" 5 + as_fn_error $? "cannot assemble alignment test" "$LINENO" 5 fi rm -f conftest* @@ -26710,7 +27622,7 @@ ia64*-*-* | itanium-*-* | itanium2-*-*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler .align padding is good" >&5 $as_echo_n "checking whether assembler .align padding is good... " >&6; } -if test "${gmp_cv_asm_ia64_align_ok+set}" = set; then : +if ${gmp_cv_asm_ia64_align_ok+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.awk <<\EOF @@ -26836,7 +27748,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler instruction and register style" >&5 $as_echo_n "checking assembler instruction and register style... " >&6; } -if test "${gmp_cv_asm_m68k_instruction+set}" = set; then : +if ${gmp_cv_asm_m68k_instruction+:} false; then : $as_echo_n "(cached) " >&6 else for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do @@ -26864,7 +27776,7 @@ done if test -z "$gmp_cv_asm_m68k_instruction"; then - as_fn_error "cannot determine assembler instruction and register style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler instruction and register style" "$LINENO" 5 fi fi @@ -26875,7 +27787,7 @@ "addl %d0,%d1") want_dot_size=no; want_register_percent=yes ;; "add.l d0,d1") want_dot_size=yes; want_register_percent=no ;; "add.l %d0,%d1") want_dot_size=yes; want_register_percent=yes ;; -*) as_fn_error "oops, unrecognised instruction and register style" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised instruction and register style" "$LINENO" 5 ;; esac echo "define(, <\`$want_register_percent'>)" >> $gmp_tmpconfigm4 @@ -26888,18 +27800,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler addressing style" >&5 $as_echo_n "checking assembler addressing style... " >&6; } -if test "${gmp_cv_asm_m68k_addressing+set}" = set; then : +if ${gmp_cv_asm_m68k_addressing+:} false; then : $as_echo_n "(cached) " >&6 else case $gmp_cv_asm_m68k_instruction in addl*) movel=movel ;; add.l*) movel=move.l ;; -*) as_fn_error "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; esac case $gmp_cv_asm_m68k_instruction in *"%d0,%d1") dreg=%d0; areg=%a0 ;; *"d0,d1") dreg=d0; areg=a0 ;; -*) as_fn_error "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; esac cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "cannot determine assembler addressing style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler addressing style" "$LINENO" 5 fi rm -f conftest* @@ -26951,7 +27863,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler shortest branches" >&5 $as_echo_n "checking assembler shortest branches... " >&6; } -if test "${gmp_cv_asm_m68k_branches+set}" = set; then : +if ${gmp_cv_asm_m68k_branches+:} false; then : $as_echo_n "(cached) " >&6 else for i in jra jbra bra; do @@ -26980,7 +27892,7 @@ done if test -z "$gmp_cv_asm_m68k_branches"; then - as_fn_error "cannot determine assembler branching style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler branching style" "$LINENO" 5 fi fi @@ -26995,7 +27907,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler output is PIC by default" >&5 $as_echo_n "checking whether compiler output is PIC by default... " >&6; } -if test "${gmp_cv_asm_powerpc_pic+set}" = set; then : +if ${gmp_cv_asm_powerpc_pic+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_powerpc_pic=yes @@ -27032,7 +27944,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler needs r on registers" >&5 $as_echo_n "checking if the assembler needs r on registers... " >&6; } -if test "${gmp_cv_asm_powerpc_r_registers+set}" = set; then : +if ${gmp_cv_asm_powerpc_r_registers+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5 + as_fn_error $? "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5 fi rm -f conftest* @@ -27135,7 +28047,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts \".register\"" >&5 $as_echo_n "checking if the assembler accepts \".register\"... " >&6; } -if test "${gmp_cv_asm_sparc_register+set}" = set; then : +if ${gmp_cv_asm_sparc_register+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if the .align directive accepts an 0x90 fill in .text... " >&6; } -if test "${gmp_cv_asm_align_fill_0x90+set}" = set; then : +if ${gmp_cv_asm_align_fill_0x90+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking for assembler COFF type directives... " >&6; } -if test "${gmp_cv_asm_x86_coff_type+set}" = set; then : +if ${gmp_cv_asm_x86_coff_type+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore... " >&6; } -if test "${gmp_cv_asm_x86_got_underscore+set}" = set; then : +if ${gmp_cv_asm_x86_got_underscore+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_x86_got_underscore="not applicable" @@ -27318,7 +28230,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler takes cl with shldl" >&5 $as_echo_n "checking if the assembler takes cl with shldl... " >&6; } -if test "${gmp_cv_asm_x86_shldl_cl+set}" = set; then : +if ${gmp_cv_asm_x86_shldl_cl+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <> $gmp_tmpconfigm4i + $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_x86_64 1" >>confdefs.h + case $host in *-*-darwin*) @@ -27503,7 +28417,7 @@ fi done if test -z "$gmp_mparam_source"; then - as_fn_error "no version of gmp-mparam.h found in path: $path" "$LINENO" 5 + as_fn_error $? "no version of gmp-mparam.h found in path: $path" "$LINENO" 5 fi # For a helpful message from tune/tuneup.c @@ -27521,15 +28435,15 @@ -# Copy any SQR_KARATSUBA_THRESHOLD from gmp-mparam.h to config.m4. +# Copy any SQR_TOOM2_THRESHOLD from gmp-mparam.h to config.m4. # Some versions of sqr_basecase.asm use this. # Fat binaries do this on a per-file basis, so skip in that case. # if test -z "$fat_path"; then - tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_KARATSUBA_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` + tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_TOOM2_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` if test -n "$tmp_gmp_karatsuba_sqr_threshold"; then -echo "define(,<$tmp_gmp_karatsuba_sqr_threshold>)" >> $gmp_tmpconfigm4 +echo "define(,<$tmp_gmp_karatsuba_sqr_threshold>)" >> $gmp_tmpconfigm4 fi fi @@ -27537,8 +28451,8 @@ # Sizes of some types, needed at preprocessing time. # -# FIXME: The assumption that BITS_PER_MP_LIMB is 8*sizeof(mp_limb_t) might -# be slightly rash, but it's true everwhere we know of and ought to be true +# FIXME: The assumption that GMP_LIMB_BITS is 8*sizeof(mp_limb_t) might +# be slightly rash, but it's true everywhere we know of and ought to be true # of any sensible system. In a generic C build, grepping LONG_BIT out of # might be an alternative, for maximum portability. # @@ -27546,9 +28460,42 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if ${ac_cv_sizeof_void_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5 $as_echo_n "checking size of unsigned short... " >&6; } -if test "${ac_cv_sizeof_unsigned_short+set}" = set; then : +if ${ac_cv_sizeof_unsigned_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default"; then : @@ -27557,9 +28504,8 @@ if test "$ac_cv_type_unsigned_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned short) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned short) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_short=0 fi @@ -27582,7 +28528,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 $as_echo_n "checking size of unsigned... " >&6; } -if test "${ac_cv_sizeof_unsigned+set}" = set; then : +if ${ac_cv_sizeof_unsigned+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : @@ -27591,9 +28537,8 @@ if test "$ac_cv_type_unsigned" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned=0 fi @@ -27616,7 +28561,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 $as_echo_n "checking size of unsigned long... " >&6; } -if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : +if ${ac_cv_sizeof_unsigned_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : @@ -27625,9 +28570,8 @@ if test "$ac_cv_type_unsigned_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi @@ -27650,12 +28594,11 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of mp_limb_t" >&5 $as_echo_n "checking size of mp_limb_t... " >&6; } -if test "${ac_cv_sizeof_mp_limb_t+set}" = set; then : +if ${ac_cv_sizeof_mp_limb_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (mp_limb_t))" "ac_cv_sizeof_mp_limb_t" "#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include \"$srcdir/gmp-h.in\" @@ -27666,9 +28609,8 @@ if test "$ac_cv_type_mp_limb_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (mp_limb_t) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (mp_limb_t) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_mp_limb_t=0 fi @@ -27686,9 +28628,9 @@ if test "$ac_cv_sizeof_mp_limb_t" = 0; then - as_fn_error "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5 fi -BITS_PER_MP_LIMB=`expr 8 \* $ac_cv_sizeof_mp_limb_t` +GMP_LIMB_BITS=`expr 8 \* $ac_cv_sizeof_mp_limb_t` echo "define(,<$ac_cv_sizeof_unsigned>)" >> $gmp_tmpconfigm4 @@ -27701,21 +28643,21 @@ # probably wouldn't want to be fatal, none of the libgmp assembler code # depends on ulong. # -mparam_bits=`sed -n 's/^#define BITS_PER_MP_LIMB[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source` -if test -n "$mparam_bits" && test "$mparam_bits" -ne $BITS_PER_MP_LIMB; then +mparam_bits=`sed -n 's/^#define GMP_LIMB_BITS[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source` +if test -n "$mparam_bits" && test "$mparam_bits" -ne $GMP_LIMB_BITS; then if test "$test_CFLAGS" = set; then - as_fn_error "Oops, mp_limb_t is $BITS_PER_MP_LIMB bits, but the assembler code + as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code in this configuration expects $mparam_bits bits. You appear to have set \$CFLAGS, perhaps you also need to tell GMP the intended ABI, see \"ABI and ISA\" in the manual." "$LINENO" 5 else - as_fn_error "Oops, mp_limb_t is $BITS_PER_MP_LIMB bits, but the assembler code + as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code in this configuration expects $mparam_bits bits." "$LINENO" 5 fi fi -echo "define(,$BITS_PER_MP_LIMB)" >> $gmp_tmpconfigm4 +echo "define(,$GMP_LIMB_BITS)" >> $gmp_tmpconfigm4 echo "define(,$GMP_NAIL_BITS)" >> $gmp_tmpconfigm4 @@ -27749,12 +28691,12 @@ test -d tune || mkdir tune case $sqr_basecase_source in *.asm) - sqr_max=`sed -n 's/^def...(SQR_KARATSUBA_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source` + sqr_max=`sed -n 's/^def...(SQR_TOOM2_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source` if test -n "$sqr_max"; then TUNE_SQR_OBJ=sqr_asm.o cat >>confdefs.h <<_ACEOF -@%:@define TUNE_SQR_KARATSUBA_MAX $sqr_max +@%:@define TUNE_SQR_TOOM2_MAX $sqr_max _ACEOF fi @@ -27765,7 +28707,7 @@ ;; *.c) TUNE_SQR_OBJ= - $as_echo "@%:@define TUNE_SQR_KARATSUBA_MAX SQR_KARATSUBA_MAX_GENERIC" >>confdefs.h + $as_echo "@%:@define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC" >>confdefs.h cat >tune/sqr_basecase.c < " -if test "x$ac_cv_type_stack_t" = x""yes; then : +if test "x$ac_cv_type_stack_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STACK_T 1 @@ -27871,7 +28813,7 @@ if test $with_readline != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5 $as_echo_n "checking for tputs in -lncurses... " >&6; } -if test "${ac_cv_lib_ncurses_tputs+set}" = set; then : +if ${ac_cv_lib_ncurses_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27905,12 +28847,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 $as_echo "$ac_cv_lib_ncurses_tputs" >&6; } -if test "x$ac_cv_lib_ncurses_tputs" = x""yes; then : +if test "x$ac_cv_lib_ncurses_tputs" = xyes; then : LIBCURSES=-lncurses else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 $as_echo_n "checking for tputs in -lcurses... " >&6; } -if test "${ac_cv_lib_curses_tputs+set}" = set; then : +if ${ac_cv_lib_curses_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27944,7 +28886,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 $as_echo "$ac_cv_lib_curses_tputs" >&6; } -if test "x$ac_cv_lib_curses_tputs" = x""yes; then : +if test "x$ac_cv_lib_curses_tputs" = xyes; then : LIBCURSES=-lcurses fi @@ -27957,7 +28899,7 @@ use_readline=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } -if test "${ac_cv_lib_readline_readline+set}" = set; then : +if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27991,11 +28933,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = x""yes; then : +if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = x""yes; then : +if test "x$ac_cv_header_readline_readline_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = x""yes; then : +if test "x$ac_cv_header_readline_history_h" = xyes; then : use_readline=yes fi @@ -28024,7 +28966,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_YACC+set}" = set; then : +if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then @@ -28067,7 +29009,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LEX+set}" = set; then : +if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then @@ -28137,7 +29079,7 @@ test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } -if test "${ac_cv_prog_lex_root+set}" = set; then : +if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else @@ -28146,7 +29088,7 @@ elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else - as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5 + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 @@ -28156,7 +29098,7 @@ if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } -if test "${ac_cv_lib_lex+set}" = set; then : +if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else @@ -28186,7 +29128,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } -if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : +if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the @@ -28197,7 +29139,8 @@ LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define YYTEXT_POINTER 1 + + #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : @@ -28234,7 +29177,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -28274,7 +29217,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -28418,10 +29361,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -28460,24 +29414,24 @@ fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WANT_MPBSD_TRUE}" && test -z "${WANT_MPBSD_FALSE}"; then - as_fn_error "conditional \"WANT_MPBSD\" was never defined. + as_fn_error $? "conditional \"WANT_MPBSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WANT_CXX_TRUE}" && test -z "${WANT_CXX_FALSE}"; then - as_fn_error "conditional \"WANT_CXX\" was never defined. + as_fn_error $? "conditional \"WANT_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then - as_fn_error "conditional \"ENABLE_STATIC\" was never defined. + as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -28578,6 +29532,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -28623,19 +29578,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -@%:@ as_fn_error ERROR [LINENO LOG_FD] -@%:@ --------------------------------- +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with status @S|@?, using 1 if that was 0. +@%:@ script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @@ -28831,7 +29786,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @@ -28884,8 +29839,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU MP $as_me 4.3.2, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by GNU MP $as_me 5.0.2, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -28956,11 +29911,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU MP config.status 4.3.2 -configured by $0, generated by GNU Autoconf 2.65, +GNU MP config.status 5.0.2 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -28978,11 +29933,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -29004,6 +29964,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -29016,7 +29977,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -29025,7 +29986,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -29078,233 +30039,261 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -LD_F77='`$ECHO "X$LD_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_F77='`$ECHO "X$old_archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_F77='`$ECHO "X$compiler_F77" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_F77='`$ECHO "X$GCC_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_F77='`$ECHO "X$lt_prog_compiler_no_builtin_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_F77='`$ECHO "X$lt_prog_compiler_wl_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_F77='`$ECHO "X$lt_prog_compiler_pic_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_F77='`$ECHO "X$lt_prog_compiler_static_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_F77='`$ECHO "X$lt_cv_prog_compiler_c_o_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_F77='`$ECHO "X$archive_cmds_need_lc_F77" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_F77='`$ECHO "X$enable_shared_with_static_runtimes_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_F77='`$ECHO "X$export_dynamic_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_F77='`$ECHO "X$whole_archive_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_F77='`$ECHO "X$compiler_needs_object_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_F77='`$ECHO "X$old_archive_from_new_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_F77='`$ECHO "X$module_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_F77='`$ECHO "X$module_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_F77='`$ECHO "X$with_gnu_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_F77='`$ECHO "X$allow_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_F77='`$ECHO "X$no_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_F77='`$ECHO "X$hardcode_libdir_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_F77='`$ECHO "X$hardcode_libdir_flag_spec_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_F77='`$ECHO "X$hardcode_libdir_separator_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_F77='`$ECHO "X$hardcode_direct_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_F77='`$ECHO "X$hardcode_direct_absolute_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_F77='`$ECHO "X$hardcode_minus_L_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_F77='`$ECHO "X$hardcode_shlibpath_var_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_F77='`$ECHO "X$hardcode_automatic_F77" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_F77='`$ECHO "X$inherit_rpath_F77" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_F77='`$ECHO "X$link_all_deplibs_F77" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_F77='`$ECHO "X$fix_srcfile_path_F77" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_F77='`$ECHO "X$always_export_symbols_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_F77='`$ECHO "X$export_symbols_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_F77='`$ECHO "X$exclude_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_F77='`$ECHO "X$include_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_F77='`$ECHO "X$prelink_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_F77='`$ECHO "X$file_list_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_F77='`$ECHO "X$hardcode_action_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_F77='`$ECHO "X$compiler_lib_search_dirs_F77" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_F77='`$ECHO "X$postdeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_F77='`$ECHO "X$compiler_lib_search_path_F77" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_F77='`$ECHO "$hardcode_libdir_flag_spec_ld_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. for var in NM \ +AS \ +DLLTOOL \ +OBJDUMP \ +SHELL \ +ECHO \ SED \ GREP \ EGREP \ @@ -29316,8 +30305,12 @@ reload_flag \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -29327,14 +30320,14 @@ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -29350,7 +30343,6 @@ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -29358,6 +30350,7 @@ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib \ @@ -29369,14 +30362,16 @@ compiler_lib_search_path \ LD_CXX \ LD_F77 \ +reload_flag_CXX \ +reload_flag_F77 \ compiler_CXX \ compiler_F77 \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_no_builtin_flag_F77 \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_F77 \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_wl_F77 \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_F77 \ lt_cv_prog_compiler_c_o_CXX \ @@ -29399,8 +30394,6 @@ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_CXX \ hardcode_libdir_separator_F77 \ -fix_srcfile_path_CXX \ -fix_srcfile_path_F77 \ exclude_expsyms_CXX \ exclude_expsyms_F77 \ include_expsyms_CXX \ @@ -29419,9 +30412,9 @@ postdeps_F77 \ compiler_lib_search_path_CXX \ compiler_lib_search_path_F77; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -29443,11 +30436,14 @@ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +reload_cmds_F77 \ old_archive_cmds_CXX \ old_archive_cmds_F77 \ old_archive_from_new_cmds_CXX \ @@ -29465,10 +30461,12 @@ export_symbols_cmds_CXX \ export_symbols_cmds_F77 \ prelink_cmds_CXX \ -prelink_cmds_F77; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in +prelink_cmds_F77 \ +postlink_cmds_CXX \ +postlink_cmds_F77; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -29476,12 +30474,6 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -29547,7 +30539,7 @@ "gmp.h") CONFIG_FILES="$CONFIG_FILES gmp.h:gmp-h.in" ;; "mp.h") CONFIG_FILES="$CONFIG_FILES mp.h:mp-h.in" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -29571,9 +30563,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -29581,12 +30574,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -29603,12 +30597,12 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -29617,18 +30611,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -29636,7 +30630,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -29684,7 +30678,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -29716,21 +30710,29 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -29742,7 +30744,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -29754,11 +30756,11 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -29843,7 +30845,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -29856,7 +30858,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -29875,7 +30877,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -29884,7 +30886,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -29910,8 +30912,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -30047,23 +31049,24 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -30072,21 +31075,21 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -30140,19 +31143,19 @@ $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then - as_fn_error "$ac_source: file not found" "$LINENO" 5 + as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. - case $srcdir in + case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || - as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 @@ -30183,7 +31186,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -30219,13 +31223,13 @@ NM=$lt_NM # Assembler program. -AS=$AS +AS=$lt_AS # DLL creation program. -DLLTOOL=$DLLTOOL +DLLTOOL=$lt_DLLTOOL # Object dumper program. -OBJDUMP=$OBJDUMP +OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version @@ -30243,6 +31247,12 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + # The host system. host_alias=$host_alias host=$host @@ -30289,20 +31299,36 @@ # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -30311,6 +31337,9 @@ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -30329,14 +31358,14 @@ # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# The name of the directory that contains temporary libtool files. +objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -30344,6 +31373,9 @@ # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -30400,6 +31432,9 @@ # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -30439,6 +31474,10 @@ # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -30451,12 +31490,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -30543,9 +31582,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -30561,6 +31597,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -30607,212 +31646,169 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -30824,6 +31820,10 @@ # The linker used to build libraries. LD=$lt_LD_CXX +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX @@ -30836,12 +31836,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX @@ -30928,9 +31928,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -30946,6 +31943,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX @@ -30977,6 +31977,10 @@ # The linker used to build libraries. LD=$lt_LD_F77 +# How to create reloadable object files. +reload_flag=$lt_reload_flag_F77 +reload_cmds=$lt_reload_cmds_F77 + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_F77 @@ -30989,12 +31993,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 @@ -31081,9 +32085,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_F77 - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -31099,6 +32100,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 @@ -31133,7 +32137,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -31154,7 +32158,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -Nru gmp-4.3.2+dfsg/autom4te.cache/output.1 gmp-5.0.2+dfsg/autom4te.cache/output.1 --- gmp-4.3.2+dfsg/autom4te.cache/output.1 2010-01-09 06:26:20.000000000 +0000 +++ gmp-5.0.2+dfsg/autom4te.cache/output.1 2011-08-30 01:19:38.000000000 +0000 @@ -1,14 +1,14 @@ @%:@! /bin/sh @%:@ From configure.in Revision. @%:@ Guess values for system-dependent variables and create Makefiles. -@%:@ Generated by GNU Autoconf 2.65 for GNU MP 4.3.2. +@%:@ Generated by GNU Autoconf 2.68 for GNU MP 5.0.2. @%:@ @%:@ Report bugs to . @%:@ @%:@ @%:@ @%:@ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -@%:@ 2007 Free Software Foundation, Inc. +@%:@ 2007, 2008, 2009, 2010 Free Software Foundation, Inc. @%:@ @%:@ This file is part of the GNU MP Library. @%:@ @@ -28,8 +28,8 @@ @%:@ @%:@ @%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -@%:@ Inc. +@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +@%:@ Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @@ -113,6 +113,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -195,7 +196,15 @@ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -238,11 +247,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in @%:@ (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -341,7 +357,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @@ -381,19 +397,19 @@ fi # as_fn_arith -@%:@ as_fn_error ERROR [LINENO LOG_FD] -@%:@ --------------------------------- +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with status @S|@?, using 1 if that was 0. +@%:@ script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @@ -550,161 +566,14 @@ # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -723,8 +592,8 @@ # Identity of this package. PACKAGE_NAME='GNU MP' PACKAGE_TARNAME='gmp' -PACKAGE_VERSION='4.3.2' -PACKAGE_STRING='GNU MP 4.3.2' +PACKAGE_VERSION='5.0.2' +PACKAGE_STRING='GNU MP 5.0.2' PACKAGE_BUGREPORT='gmp-bugs@gmplib.org' PACKAGE_URL='http://www.gnu.org/software/gmp/' @@ -791,22 +660,20 @@ mpn_objs_in_libgmp mpn_objects mpn_objs_in_libmp -BITS_PER_MP_LIMB +GMP_LIMB_BITS M4 TAL_OBJECT LIBM ENABLE_STATIC_FALSE ENABLE_STATIC_TRUE -ac_ct_F77 -FFLAGS -F77 OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL -lt_ECHO +MANIFEST_TOOL RANLIB +ac_ct_AR LN_S LD FGREP @@ -937,6 +804,7 @@ enable_alloca enable_cxx enable_fft +enable_old_fft_full enable_mpbsd enable_nails enable_profiling @@ -948,6 +816,7 @@ with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -966,8 +835,6 @@ CXXFLAGS CCC CXXCPP -F77 -FFLAGS M4 YACC YFLAGS' @@ -1033,8 +900,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1079,7 +947,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1105,7 +973,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1309,7 +1177,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1325,7 +1193,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1355,8 +1223,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1364,7 +1232,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1374,7 +1242,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1382,13 +1250,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1411,7 +1279,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1425,8 +1293,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1441,9 +1309,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1482,11 +1350,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1512,7 +1380,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU MP 4.3.2 to adapt to many kinds of systems. +\`configure' configures GNU MP 5.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1526,7 +1394,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1582,7 +1450,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU MP 4.3.2:";; + short | recursive ) echo "Configuration of GNU MP 5.0.2:";; esac cat <<\_ACEOF @@ -1596,6 +1464,8 @@ --enable-alloca how to get temp memory @<:@@<:@default=reentrant@:>@@:>@ --enable-cxx enable C++ support @<:@@<:@default=no@:>@@:>@ --enable-fft enable FFTs for multiplication @<:@@<:@default=yes@:>@@:>@ + --enable-old-fft-full enable old mpn_mul_fft_full for multiplication + @<:@@<:@default=no@:>@@:>@ --enable-mpbsd build Berkeley MP compatibility library @<:@@<:@default=no@:>@@:>@ --enable-nails use nails on limbs @<:@@<:@default=no@:>@@:>@ @@ -1617,6 +1487,8 @@ --with-pic try to use only PIC/non-PIC objects @<:@default=use both@:>@ --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@ + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: ABI desired ABI (for processors supporting more than one ABI) @@ -1635,11 +1507,10 @@ CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags M4 m4 macro processor - YACC The `Yet Another C Compiler' implementation to use. Defaults to - the first program found out of: `bison -y', `byacc', `yacc'. + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. YFLAGS The list of arguments that will be passed by default to @S|@YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. @@ -1712,17 +1583,17 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU MP configure 4.3.2 -generated by GNU Autoconf 2.65 +GNU MP configure 5.0.2 +generated by GNU Autoconf 2.68 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007 Free Software Foundation, Inc. +2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -1780,7 +1651,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @@ -1806,7 +1677,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1817,7 +1688,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @@ -1855,7 +1726,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_cxx_try_compile @@ -1881,7 +1752,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -1892,7 +1763,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_cxx_try_cpp @@ -1934,7 +1805,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @@ -1947,10 +1818,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1986,7 +1857,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2009,17 +1880,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ---------------------------------- ## +( $as_echo "## ---------------------------------- ## ## Report this to gmp-bugs@gmplib.org ## -## ---------------------------------- ## -_ASBOX +## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2028,7 +1897,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @@ -2041,7 +1910,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2059,7 +1928,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @@ -2104,7 +1973,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @@ -2117,7 +1986,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2172,7 +2041,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func @@ -2217,49 +2086,11 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_cxx_try_link -@%:@ ac_fn_f77_try_compile LINENO -@%:@ ---------------------------- -@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. -ac_fn_f77_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} @%:@ ac_fn_f77_try_compile - @%:@ ac_fn_f77_try_link LINENO @%:@ ------------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. @@ -2301,20 +2132,23 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_f77_try_link -@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR -@%:@ ------------------------------------ -@%:@ Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +@%:@ --------------------------------------------- +@%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +@%:@ accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2323,8 +2157,12 @@ int main () { -@%:@ifndef $2 - (void) $2; +@%:@ifndef $as_decl_name +@%:@ifdef __cplusplus + (void) $as_decl_use; +@%:@else + (void) $as_decl_name; +@%:@endif @%:@endif ; @@ -2341,7 +2179,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_decl @@ -2354,7 +2192,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2395,7 +2233,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_type @@ -2408,7 +2246,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2452,7 +2290,7 @@ eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_member @@ -2464,10 +2302,10 @@ ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2503,7 +2341,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2526,17 +2364,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ---------------------------------- ## +( $as_echo "## ---------------------------------- ## ## Report this to gmp-bugs@gmplib.org ## -## ---------------------------------- ## -_ASBOX +## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2545,7 +2381,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_cxx_check_header_mongrel @@ -2558,7 +2394,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2599,7 +2435,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_cxx_check_type @@ -2776,7 +2612,7 @@ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_compute_int @@ -2784,8 +2620,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU MP $as_me 4.3.2, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by GNU MP $as_me 5.0.2, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2895,11 +2731,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2933,11 +2767,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2950,11 +2782,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2968,11 +2798,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -3027,7 +2855,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in @%:@(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3042,7 +2875,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -3118,7 +2955,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3145,7 +2982,7 @@ # "athlon-pc-freebsd3.5". # if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then - as_fn_error "--target is not appropriate for GMP + as_fn_error $? "--target is not appropriate for GMP Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system explicitly. Use --host if cross-compiling (see \"Installing GMP\" in the manual for more on this)." "$LINENO" 5 @@ -3172,16 +3009,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3195,27 +3038,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3233,14 +3076,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3248,7 +3091,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3284,7 +3127,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3371,11 +3214,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3397,7 +3240,7 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3407,7 +3250,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3461,7 +3304,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3501,7 +3344,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3554,7 +3397,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3605,7 +3448,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3645,7 +3488,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3653,7 +3496,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -3687,7 +3530,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3703,7 +3546,7 @@ # Define the identity of the package. PACKAGE='gmp' - VERSION='4.3.2' + VERSION='5.0.2' cat >>confdefs.h <<_ACEOF @@ -3774,7 +3617,7 @@ if test "${enable_assert+set}" = set; then : enableval=$enable_assert; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;; esac else enable_assert=no @@ -3801,7 +3644,7 @@ yes|no|reentrant|notreentrant) ;; debug) ;; *) - as_fn_error "bad value $enableval for --enable-alloca, need one of: + as_fn_error $? "bad value $enableval for --enable-alloca, need one of: yes no reentrant notreentrant alloca malloc-reentrant malloc-notreentrant debug" "$LINENO" 5 ;; esac else @@ -3826,7 +3669,7 @@ if test "${enable_cxx+set}" = set; then : enableval=$enable_cxx; case $enableval in yes|no|detect) ;; -*) as_fn_error "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;; esac else enable_cxx=no @@ -3838,7 +3681,7 @@ if test "${enable_fft+set}" = set; then : enableval=$enable_fft; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;; esac else enable_fft=yes @@ -3852,11 +3695,29 @@ fi +@%:@ Check whether --enable-old-fft-full was given. +if test "${enable_old_fft_full+set}" = set; then : + enableval=$enable_old_fft_full; case $enableval in +yes|no) ;; +*) as_fn_error $? "bad value $enableval for --enable-old-fft-full, need yes or no" "$LINENO" 5 ;; +esac +else + enable_old_fft_full=no +fi + + +if test "$enable_old_fft_full" = "yes"; then + +$as_echo "@%:@define WANT_OLD_FFT_FULL 1" >>confdefs.h + +fi + + @%:@ Check whether --enable-mpbsd was given. if test "${enable_mpbsd+set}" = set; then : enableval=$enable_mpbsd; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-mpbsd, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-mpbsd, need yes or no" "$LINENO" 5 ;; esac else enable_mpbsd=no @@ -3877,9 +3738,9 @@ enableval=$enable_nails; case $enableval in yes|no|[02468]|[0-9][02468]) ;; *[13579]) - as_fn_error "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;; *) - as_fn_error "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;; esac else enable_nails=no @@ -3898,7 +3759,7 @@ if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; case $enableval in no|prof|gprof|instrument) ;; -*) as_fn_error "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;; esac else enable_profiling=no @@ -3940,7 +3801,7 @@ if test "${with_readline+set}" = set; then : withval=$with_readline; case $withval in yes|no|detect) ;; -*) as_fn_error "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;; esac else with_readline=detect @@ -3952,7 +3813,7 @@ if test "${enable_fat+set}" = set; then : enableval=$enable_fat; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;; esac else enable_fat=no @@ -3964,7 +3825,7 @@ if test "${enable_minithres+set}" = set; then : enableval=$enable_minithres; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;; esac else enable_minithres=no @@ -4119,11 +3980,14 @@ $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_alpha 1" >>confdefs.h case $host_cpu in - alphaev5* | alphapca5*) path="alpha/ev5 alpha" ;; + alphaev5* | alphapca5*) + path="alpha/ev5 alpha" ;; alphaev67 | alphaev68 | alphaev7*) - path="alpha/ev67 alpha/ev6 alpha/ev5 alpha" ;; - alphaev6* | alphaev7*) path="alpha/ev6 alpha/ev5 alpha" ;; - *) path="alpha" ;; + path="alpha/ev67 alpha/ev6 alpha" ;; + alphaev6) + path="alpha/ev6 alpha" ;; + *) + path="alpha" ;; esac extra_functions="cntlz" gcc_cflags_optlist="asm cpu oldas" # need asm ahead of cpu, see below @@ -4291,7 +4155,6 @@ # checking sizeof(long), either 4 or 8 bytes respectively. Do this in # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc. # - gcc_cflags="-O2" gcc_cflags_optlist="arch" gcc_testlist="sizeof-long-4" SPEED_CYCLECOUNTER_OBJ=hppa.lo @@ -4362,6 +4225,7 @@ # systems (GNU/Linux for instance), but lets assume they're ok. case $host in *-*-hpux[1-9] | *-*-hpux[1-9].* | *-*-hpux10 | *-*-hpux10.*) ;; + *-*-linux*) abilist="1.0" ;; # due to linux permanent kernel bug *) abilist="2.0w $abilist" ;; esac @@ -4582,6 +4446,7 @@ gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin gcc_cflags_asm="" gcc_cflags_cpu="" + vmx_path="" # grab this object, though it's not a true cycle counter routine SPEED_CYCLECOUNTER_OBJ=powerpc.lo @@ -4623,7 +4488,8 @@ powerpc604) gcc_cflags_cpu="-mcpu=604" ;; powerpc604e) gcc_cflags_cpu="-mcpu=604e -mcpu=604" ;; powerpc620) gcc_cflags_cpu="-mcpu=620" ;; - powerpc630) gcc_cflags_cpu="-mcpu=630" ;; + powerpc630) gcc_cflags_cpu="-mcpu=630" + cpu_path="p3" ;; powerpc740) gcc_cflags_cpu="-mcpu=740" ;; powerpc7400 | powerpc7410) gcc_cflags_asm="-Wa,-maltivec" @@ -4636,7 +4502,15 @@ powerpc821) gcc_cflags_cpu="-mcpu=821" ;; powerpc823) gcc_cflags_cpu="-mcpu=823" ;; powerpc860) gcc_cflags_cpu="-mcpu=860" ;; - powerpc970) gcc_cflags_cpu="-mcpu=970" ;; + powerpc970) gcc_cflags_cpu="-mtune=970" + vmx_path="powerpc64/vmx" + cpu_path="p4" ;; + power4) gcc_cflags_cpu="-mtune=power4" + cpu_path="p4" ;; + power5) gcc_cflags_cpu="-mtune=power5 -mtune=power4" + cpu_path="p5 p4" ;; + power6) gcc_cflags_cpu="-mtune=power6" + cpu_path="p6" ;; esac case $host in @@ -4664,11 +4538,21 @@ esac case $host in + *-*-aix*) + cclist="gcc xlc cc" + gcc_32_cflags_maybe="-maix32" + xlc_cflags="-O2 -qmaxmem=20000" + xlc_cflags_optlist="arch" + xlc_32_cflags_maybe="-q32" + cc_cflags="-O2 -qmaxmem=20000" + cc_cflags_optlist="arch" + cc_32_cflags_maybe="-q32" + ar_32_flags="-X32" + nm_32_flags="-X32" + esac + + case $host in powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*) - case $host_cpu in - powerpc970) vmx_path="powerpc64/vmx" ;; - *) vmx_path="" ;; - esac case $host in *-*-aix*) # On AIX a true 64-bit ABI is available. @@ -4683,7 +4567,9 @@ # Must indicate object type to ar and nm ar_aix64_flags="-X64" nm_aix64_flags="-X64" - path_aix64="powerpc64/mode64 $vmx_path powerpc64" + path_aix64="" + for i in $cpu_path; do path_aix64="${path_aix64}powerpc64/mode64/$i "; done + path_aix64="${path_aix64}powerpc64/mode64 $vmx_path powerpc64" # grab this object, though it's not a true cycle counter routine SPEED_CYCLECOUNTER_OBJ_aix64=powerpc64.lo cyclecounter_size_aix64=0 @@ -4698,7 +4584,7 @@ # longlong.h macros expect limb operands in a single 64-bit # register, not two 32-bit registers as would be given for a # long long without -mpowerpc64. In theory we could detect and - # accomodate both styles, but the proper 64-bit registers will + # accommodate both styles, but the proper 64-bit registers will # be fastest and are what we really want to use. # # One would think -mpowerpc64 would set the assembler in the right @@ -4721,7 +4607,9 @@ gcc_mode64_cflags="-m64" gcc_mode64_cflags_optlist="cpu opt" gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="powerpc64/mode64 $vmx_path powerpc64" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo cyclecounter_size_mode64=0 any_mode64_testlist="sizeof-long-8" @@ -4752,7 +4640,9 @@ gcc_mode64_cflags_maybe="-m64" gcc_mode64_cflags_optlist="cpu opt" gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="powerpc64/mode64 $vmx_path powerpc64" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo cyclecounter_size_mode64=0 any_mode64_testlist="sizeof-long-8" @@ -4798,8 +4688,13 @@ ;; - # IBM s/370 and similar - s3[6-9]0*-*-*) + # IBM S/390 64 bit + s390x-*-*) + gcc_cflags="-g -O2 $fomit_frame_pointer" + path="s390x" + ;; + # IBM S/390 32 bit + s390-*-*) gcc_cflags="$gcc_cflags $fomit_frame_pointer" path="s390" extra_functions="udiv_w_sdiv" @@ -4945,7 +4840,15 @@ *) abilist="64 32" ;; esac - path_64="sparc64" + case $host_cpu in + ultrasparc | ultrasparc2 | ultrasparc2i) + path_64="sparc64/ultrasparc12 sparc64" ;; + ultrasparc3) + path_64="sparc64/ultrasparc34 sparc64/ultrasparc12 sparc64" ;; + *) + path_64="sparc64" + esac + cclist_64="gcc" any_64_testlist="sizeof-long-8" @@ -5015,7 +4918,7 @@ # mode, in case -m32 has failed not because it's an old gcc, but because # it's a dual 32/64-bit gcc without a 32-bit libc, or whatever. # - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) abilist="32" cclist="gcc icc cc" gcc_cflags="$gcc_cflags $fomit_frame_pointer" @@ -5123,6 +5026,7 @@ # gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486" gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium" + gcc_64_cflags_cpu="-mtune=nocona" ;; viac32) # Not sure of the best fallbacks here for -mcpu. @@ -5139,10 +5043,14 @@ gcc_cflags_cpu="-mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" gcc_cflags_arch="-march=k8 -march=k8~-mno-sse2 -march=athlon -march=pentiumpro -march=pentium" ;; - core2) + core2 | corei) gcc_cflags_cpu="-mtune=core2 -mtune=k8" gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" ;; + atom) + gcc_cflags_cpu="-mtune=atom -mtune=pentium3" + gcc_cflags_arch="-march=atom -march=pentium3" + ;; *) gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" gcc_cflags_arch="-march=i486" @@ -5157,7 +5065,8 @@ i686 | pentiumpro) path="x86/p6 x86" ;; pentium2) path="x86/p6/mmx x86/p6 x86" ;; pentium3) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; - pentiumm | core2) path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; + pentiumm | core2 | corei) + path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; k6[23]) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; k6) path="x86/k6/mmx x86/k6 x86" ;; geode) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; @@ -5168,64 +5077,55 @@ # VIA/Centaur processors, sold as CyrixIII and C3. viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; viac3*) path="x86/pentium/mmx x86/pentium x86";; + atom) path="x86/atom x86" ;; *) path="x86" ;; esac - # If the user asked for a fat build, override the path and flags set above - if test $enable_fat = yes; then - gcc_cflags_cpu="" - gcc_cflags_arch="" - extra_functions="$extra_functions fat fat_entry" - path="x86/fat x86" - fat_path="x86 x86/fat x86/i486 - x86/k6 x86/k6/mmx x86/k6/k62mmx - x86/k7 x86/k7/mmx - x86/pentium x86/pentium/mmx - x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 - x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2" - fat_functions="add_n addmul_1 copyd copyi - dive_1 diveby3 divrem_1 gcd_1 lshift - mod_1 mod_34lsub1 mode1o mul_1 mul_basecase - pre_divrem_1 pre_mod_1 rshift - sqr_basecase sub_n submul_1" - fat_thresholds="MUL_KARATSUBA_THRESHOLD MUL_TOOM3_THRESHOLD - SQR_KARATSUBA_THRESHOLD SQR_TOOM3_THRESHOLD" - fi - - case $host_cpu in - athlon64 | atom | core2 | pentium4 | x86_64) - cclist_64="gcc" - gcc_64_cflags="$gcc_64_cflags -m64" - gcc_64_cflags_optlist="cpu" - CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' - SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo - cyclecounter_size_64=2 - - case $host in - *-*-solaris*) - # Sun cc. - cclist_64="$cclist_64 cc" - cc_64_cflags="-xO3 -m64" - ;; - esac + case $host in + athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) + cclist_64="gcc" + gcc_64_cflags="$gcc_64_cflags -m64" + gcc_64_cflags_optlist="cpu arch" + CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' + SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo + cyclecounter_size_64=2 + abilist="64 32" + path_64="x86_64" case $host_cpu in - athlon64 | x86_64) - abilist="64 32" - path_64="x86_64" + x86_64) + ;; + athlon64) + path_64="x86_64/k8 $path_64" ;; pentium4) - abilist="64 32" - path_64="x86_64/pentium4 x86_64" + path_64="x86_64/pentium4 $path_64" ;; core2) - abilist="64 32" - path_64="x86_64/core2 x86_64" + path_64="x86_64/core2 $path_64" + ;; + corei) + path_64="x86_64/corei x86_64/core2 $path_64" ;; atom) - # The AMD K8/K9/K10 code seems best for Intel Atom - abilist="64 32" - path_64="x86_64/atom x86_64" + path_64="x86_64/atom $path_64" + ;; + nano) + path_64="x86_64/nano $path_64" + ;; + esac + + case $host in + *-*-solaris*) + # Sun cc. + cclist_64="$cclist_64 cc" + cc_64_cflags="-xO3 -m64" + ;; + *-*-mingw*) + limb_64=longlong + path_64="" # Windows amd64 calling conventions are *different* + # Silence many pedantic warnings for w64. FIXME. + gcc_64_cflags="$gcc_64_cflags -std=gnu99" ;; esac ;; @@ -5309,7 +5209,7 @@ if test $abi = "$ABI"; then found=yes; break; fi done if test $found = no; then - as_fn_error "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5 + as_fn_error $? "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5 fi abilist="$ABI" fi @@ -5461,10 +5361,10 @@ cflags="$cflags_maybe $cflags" fi - # Any user CFLAGS, even an empty string, takes precendence + # Any user CFLAGS, even an empty string, takes precedence if test "$test_CFLAGS" = set; then cflags=$CFLAGS; fi - # Any user CPPFLAGS, even an empty string, takes precendence + # Any user CPPFLAGS, even an empty string, takes precedence eval cppflags=\"\$${ccbase}${abi1}_cppflags\" test -n "$cppflags" || eval cppflags=\"\$${ccbase}${abi2}_cppflags\" if test "$test_CPPFLAGS" = set; then cppflags=$CPPFLAGS; fi @@ -6407,7 +6307,7 @@ # if test "$gmp_prog_cc_works" = yes; then case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) # this problem only arises in PIC code, so don't need to test when # --disable-shared. We don't necessarily have $enable_shared set to # yes at this point, it will still be unset for the default (which is @@ -6756,9 +6656,45 @@ # C on MS-DOS systems). # if test $found_compiler = no && test -n "$path"; then - as_fn_error "could not find a working compiler, see config.log for details" "$LINENO" 5 + as_fn_error $? "could not find a working compiler, see config.log for details" "$LINENO" 5 fi +case $host in + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) + # If the user asked for a fat build, override the path and flags set above + if test $enable_fat = yes; then + gcc_cflags_cpu="" + gcc_cflags_arch="" + + if test "$abi" = 32; then + extra_functions="$extra_functions fat fat_entry" + path="x86/fat x86" + fat_path="x86 x86/fat x86/i486 + x86/k6 x86/k6/mmx x86/k6/k62mmx + x86/k7 x86/k7/mmx + x86/pentium x86/pentium/mmx + x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 + x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2" + fi + + if test "$abi" = 64; then + gcc_64_cflags="" + extra_functions_64="$extra_functions_64 fat fat_entry" + path_64="x86_64/fat x86_64" + fat_path="x86_64 x86_64/fat x86_64/pentium4 x86_64/core2 x86_64/corei x86_64/atom x86_64/nano" + fi + + fat_functions="add_n addmul_1 copyd copyi + dive_1 diveby3 divrem_1 gcd_1 lshift + mod_1 mod_34lsub1 mode1o mul_1 mul_basecase + pre_divrem_1 pre_mod_1 rshift + sqr_basecase sub_n submul_1" + fat_thresholds="MUL_TOOM22_THRESHOLD MUL_TOOM33_THRESHOLD + SQR_TOOM2_THRESHOLD SQR_TOOM3_THRESHOLD" + fi + ;; +esac + if test $found_compiler = yes; then @@ -6809,7 +6745,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports XMM registers" >&5 $as_echo_n "checking whether the operating system supports XMM registers... " >&6; } -if test "${gmp_cv_os_x86_xmm+set}" = set; then : +if ${gmp_cv_os_x86_xmm+:} false; then : $as_echo_n "(cached) " >&6 else if test "$build" = "$host"; then @@ -7914,7 +7850,7 @@ # if test "$gmp_prog_cc_works" = yes; then case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) # this problem only arises in PIC code, so don't need to test when # --disable-shared. We don't necessarily have $enable_shared set to # yes at this point, it will still be unset for the default (which is @@ -8136,7 +8072,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8176,7 +8112,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -8229,7 +8165,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8269,7 +8205,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8328,7 +8264,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8372,7 +8308,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -8426,8 +8362,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -8541,9 +8477,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -8585,8 +8520,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -8643,9 +8578,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -8656,7 +8591,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8696,8 +8631,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -8707,7 +8642,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8744,7 +8679,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -8822,7 +8757,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -8923,7 +8858,7 @@ *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if test "${ac_cv_prog_cc_c99+set}" = set; then : +if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no @@ -9098,7 +9033,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -9194,7 +9129,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } - if test "${ac_cv_prog_cc_stdc+set}" = set; then : + if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi @@ -9222,7 +9157,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -9252,7 +9187,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -9268,11 +9203,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -9311,7 +9246,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -9327,18 +9262,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -9357,7 +9292,6 @@ /* end confdefs.h. */ #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -9417,7 +9351,7 @@ if test "$cc_for_build_works" = yes; then : else - as_fn_error "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 fi elif test -n "$HOST_CC"; then @@ -9449,7 +9383,7 @@ if test "$cc_for_build_works" = yes; then CC_FOR_BUILD=$HOST_CC else - as_fn_error "Specified HOST_CC doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Specified HOST_CC doesn't seem to work" "$LINENO" 5 fi else @@ -9488,7 +9422,7 @@ done if test -z "$CC_FOR_BUILD"; then - as_fn_error "Cannot find a build system compiler" "$LINENO" 5 + as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5 fi fi @@ -9499,7 +9433,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system preprocessor" >&5 $as_echo_n "checking for build system preprocessor... " >&6; } if test -z "$CPP_FOR_BUILD"; then - if test "${gmp_cv_prog_cpp_for_build+set}" = set; then : + if ${gmp_cv_prog_cpp_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for build system executable suffix... " >&6; } -if test "${gmp_cv_prog_exeext_for_build+set}" = set; then : +if ${gmp_cv_prog_exeext_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking whether build system compiler is ANSI... " >&6; } -if test "${gmp_cv_c_for_build_ansi+set}" = set; then : +if ${gmp_cv_c_for_build_ansi+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for build system compiler math library... " >&6; } -if test "${gmp_cv_check_libm_for_build+set}" = set; then : +if ${gmp_cv_check_libm_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -9718,7 +9652,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -9796,7 +9730,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9833,7 +9767,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -10087,7 +10021,7 @@ # If --enable-cxx=yes but a C++ compiler can't be found, then abort. if test $want_cxx = no && test $enable_cxx = yes; then - as_fn_error "C++ compiler not available, see config.log for details" "$LINENO" 5 + as_fn_error $? "C++ compiler not available, see config.log for details" "$LINENO" 5 fi fi @@ -10114,7 +10048,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -10144,7 +10078,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -10160,11 +10094,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -10203,7 +10137,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -10219,18 +10153,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -10248,7 +10182,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -10297,7 +10231,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -10311,7 +10245,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -10363,7 +10297,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -10435,12 +10369,12 @@ # enough assembler. # case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) if test "$ABI" = 32; then case "$path $fat_path" in *mmx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about MMX instructions" >&5 $as_echo_n "checking if the assembler knows about MMX instructions... " >&6; } -if test "${gmp_cv_asm_x86_mmx+set}" = set; then : +if ${gmp_cv_asm_x86_mmx+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if the assembler knows about SSE2 instructions... " >&6; } -if test "${gmp_cv_asm_x86_sse2+set}" = set; then : +if ${gmp_cv_asm_x86_sse2+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10776,8 +10710,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -10798,7 +10731,7 @@ for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = x""yes; then : +if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRING_H 1 _ACEOF @@ -10812,7 +10745,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports --noexecstack option" >&5 $as_echo_n "checking whether assembler supports --noexecstack option... " >&6; } -if test "${cl_cv_as_noexecstack+set}" = set; then : +if ${cl_cv_as_noexecstack+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c <&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -10895,7 +10828,7 @@ set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -10963,7 +10896,7 @@ gmp_user_NM=$NM { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -11016,14 +10949,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -11061,13 +10997,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -11116,6 +11052,15 @@ fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -11130,18 +11075,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:__oline__: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -11166,7 +11111,7 @@ NM= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -11219,14 +11164,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -11264,13 +11212,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -11319,6 +11267,15 @@ fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -11330,18 +11287,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:__oline__: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -11389,13 +11346,13 @@ enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AS+set}" = set; then : +if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then @@ -11435,7 +11392,7 @@ set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : +if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then @@ -11487,7 +11444,7 @@ set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then : +if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -11527,7 +11484,7 @@ set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -11579,7 +11536,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -11619,7 +11576,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -11700,7 +11657,7 @@ fi # Don't allow both static and DLL. if test "$enable_shared" != no && test "$enable_static" != no; then - as_fn_error "cannot build both static and DLL, since gmp.h is different for each. + as_fn_error $? "cannot build both static and DLL, since gmp.h is different for each. Use \"--disable-static --enable-shared\" to build just a DLL." "$LINENO" 5 fi @@ -11787,8 +11744,8 @@ -macro_version='2.2.6b' -macro_revision='1.3017' +macro_version='2.4' +macro_revision='1.3293' @@ -11804,9 +11761,78 @@ ltmain="$ac_aux_dir/ltmain.sh" +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -11861,7 +11887,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -11888,7 +11914,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -11940,7 +11966,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -12019,7 +12045,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -12056,10 +12082,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -12098,7 +12124,7 @@ # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -12131,6 +12157,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -12195,8 +12226,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -12238,8 +12269,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -12288,25 +12319,104 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then + reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi @@ -12326,7 +12436,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -12366,7 +12476,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -12422,7 +12532,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -12464,16 +12574,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -12503,6 +12615,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -12511,11 +12627,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -12618,6 +12734,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -12633,12 +12764,162 @@ + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -12651,7 +12932,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12671,14 +12952,18 @@ fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -12691,7 +12976,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12710,6 +12995,10 @@ $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -12721,29 +13010,85 @@ esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi + + if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -12783,7 +13128,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -12842,7 +13187,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -12882,7 +13227,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -12953,8 +13298,20 @@ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi - - +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + @@ -12999,7 +13356,7 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -13060,8 +13417,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -13097,6 +13454,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -13122,8 +13480,8 @@ test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then @@ -13138,6 +13496,18 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT@&t@_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT@&t@_DLSYM_CONST +#else +# define LT@&t@_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -13149,7 +13519,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT@&t@_DLSYM_CONST struct { const char *name; void *address; } @@ -13175,8 +13545,8 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -13186,8 +13556,8 @@ test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -13224,6 +13594,18 @@ $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + @@ -13245,6 +13627,43 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +@%:@ Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + + + @%:@ Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -13276,7 +13695,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line __oline__ "configure"' > conftest.$ac_ext + echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13370,7 +13789,7 @@ CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -13438,6 +13857,123 @@ need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -13446,7 +13982,7 @@ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -13486,7 +14022,7 @@ set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -13538,7 +14074,7 @@ set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -13578,7 +14114,7 @@ set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -13630,7 +14166,7 @@ set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -13670,7 +14206,7 @@ set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -13722,7 +14258,7 @@ set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -13762,7 +14298,7 @@ set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -13814,7 +14350,7 @@ set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -13854,7 +14390,7 @@ set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -13929,729 +14465,156 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : +if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -@%:@define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@ifdef __STDC__ -@%:@ include -@%:@else -@%:@ include -@%:@endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -@%:@include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -_lt_caught_CXX_error=yes; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_F77+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -$as_echo "$F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then : + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - end +int +main () +{ + + ; + return 0; +} _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_compiler_gnu=yes +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes else - ac_compiler_gnu=no + lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" + fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else - FFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac - end +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +@%:@define HAVE_DLFCN_H 1 _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_cv_prog_f77_g=yes -else - ac_cv_prog_f77_g=no + fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi -else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi +done -if test $ac_compiler_gnu = yes; then - G77=yes -else - G77= -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes -fi + + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + @@ -14784,6 +14747,7 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtool' + @@ -14828,7 +14792,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -14856,19 +14820,6 @@ - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -14881,23 +14832,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -14926,7 +14860,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -14936,7 +14870,7 @@ if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -15002,7 +14936,7 @@ if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -15131,11 +15065,16 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -15151,15 +15090,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes @@ -15188,8 +15127,6 @@ lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -15237,6 +15174,12 @@ lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -15279,6 +15222,13 @@ lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -15341,7 +15291,13 @@ lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -15353,25 +15309,25 @@ # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_wl='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' + lt_prog_compiler_wl='-Wl,' ;; esac ;; @@ -15403,7 +15359,7 @@ lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -15460,13 +15416,17 @@ lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -15474,7 +15434,7 @@ if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -15490,15 +15450,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes @@ -15527,13 +15487,18 @@ + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -15546,7 +15511,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -15576,7 +15541,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -15595,16 +15560,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -15631,7 +15596,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -15650,16 +15615,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -15769,13 +15734,39 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -15809,11 +15800,12 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -15849,10 +15841,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -15870,6 +15864,11 @@ fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -15895,15 +15894,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -15914,13 +15914,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -15936,17 +15940,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -15960,8 +15964,8 @@ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -15979,8 +15983,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -16026,8 +16030,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -16067,8 +16071,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -16156,7 +16162,13 @@ allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -16169,25 +16181,32 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' @@ -16196,7 +16215,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -16209,30 +16234,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -16264,20 +16301,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -16287,7 +16367,11 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in @@ -16295,7 +16379,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -16338,7 +16422,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -16346,7 +16430,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -16361,8 +16445,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -16380,16 +16464,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -16401,7 +16485,46 @@ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + ;; esac fi @@ -16429,26 +16552,39 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -16510,17 +16646,17 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -16530,13 +16666,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -16549,9 +16685,9 @@ no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -16739,44 +16875,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi @@ -16947,16 +17089,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -16969,7 +17118,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -16989,7 +17138,13 @@ if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -17077,7 +17232,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -17108,8 +17263,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -17130,36 +17286,83 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -17243,6 +17446,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -17288,8 +17505,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -17356,12 +17575,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -17374,13 +17598,17 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -17389,7 +17617,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -17704,6 +17932,11 @@ + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= @@ -17776,7 +18009,7 @@ # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17810,7 +18043,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -17824,12 +18057,12 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17863,16 +18096,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17906,12 +18139,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17945,12 +18178,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17984,7 +18217,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -18025,7 +18258,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -18034,7 +18267,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line __oline__ "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18075,7 +18308,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -18084,7 +18323,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -18121,7 +18364,7 @@ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -18130,7 +18373,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line __oline__ "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18171,7 +18414,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -18180,7 +18429,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -18337,7 +18590,146 @@ CC="$lt_save_CC" - + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@ifdef __STDC__ +@%:@ include +@%:@else +@%:@ include +@%:@endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +@%:@include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi + ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' @@ -18363,6 +18755,8 @@ module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no @@ -18418,6 +18812,7 @@ # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -18435,6 +18830,7 @@ fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do @@ -18445,7 +18841,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then @@ -18508,7 +18904,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -18545,10 +18941,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -18574,8 +18970,8 @@ # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -18607,7 +19003,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -18717,7 +19113,13 @@ allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -18730,26 +19132,33 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' @@ -18758,7 +19167,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -18771,30 +19186,42 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. @@ -18824,28 +19251,75 @@ ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; darwin* | rhapsody*) @@ -18853,7 +19327,11 @@ hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_CXX='' + fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in @@ -18861,7 +19339,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -18914,6 +19392,11 @@ gnu*) ;; + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -18938,11 +19421,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -19003,7 +19486,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then @@ -19013,10 +19496,10 @@ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -19046,7 +19529,7 @@ case $cc_basename in CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -19057,9 +19540,9 @@ *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes @@ -19088,7 +19571,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -19125,26 +19608,26 @@ pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; @@ -19152,7 +19635,7 @@ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -19171,9 +19654,9 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -19193,13 +19676,13 @@ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -19268,7 +19751,7 @@ export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi @@ -19303,15 +19786,15 @@ case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; @@ -19327,17 +19810,17 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -19347,7 +19830,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -19383,7 +19866,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' @@ -19404,7 +19887,7 @@ esac link_all_deplibs_CXX=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -19424,14 +19907,14 @@ if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -19442,7 +19925,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' @@ -19496,6 +19979,10 @@ CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -19557,6 +20044,13 @@ }; _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -19570,7 +20064,7 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -19579,13 +20073,22 @@ test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -19605,8 +20108,10 @@ postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -19642,6 +20147,7 @@ fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in @@ -19677,7 +20183,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -19742,8 +20248,6 @@ lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -19793,6 +20297,11 @@ # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -19842,6 +20351,11 @@ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; dgux*) case $cc_basename in ec++*) @@ -19931,8 +20445,8 @@ lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' @@ -19994,7 +20508,7 @@ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' @@ -20059,10 +20573,17 @@ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX@&t@ -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. @@ -20070,7 +20591,7 @@ if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no @@ -20086,15 +20607,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes @@ -20120,13 +20641,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no @@ -20139,7 +20662,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes @@ -20166,7 +20689,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -20185,16 +20708,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -20218,7 +20741,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -20237,16 +20760,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -20297,30 +20820,38 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) + case $cc_basename in + cl*) ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no - ;; + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } @@ -20352,44 +20883,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi @@ -20546,7 +21083,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -20577,8 +21114,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -20599,36 +21137,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -20711,6 +21295,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -20756,8 +21354,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -20824,12 +21424,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -20842,13 +21447,17 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -20857,7 +21466,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -21121,6 +21730,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= @@ -21168,6 +21779,7 @@ fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -21191,6 +21803,9 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi archive_cmds_need_lc_F77=no allow_undefined_flag_F77= @@ -21209,6 +21824,8 @@ module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds +reload_flag_F77=$reload_flag +reload_cmds_F77=$reload_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no @@ -21272,7 +21889,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do @@ -21283,7 +21902,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` GCC=$G77 if test -n "$compiler"; then @@ -21333,8 +21952,6 @@ lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' @@ -21382,6 +21999,12 @@ lt_prog_compiler_pic_F77='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_F77= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -21424,6 +22047,13 @@ lt_prog_compiler_pic_F77='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_F77='-Xlinker ' + lt_prog_compiler_pic_F77='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -21486,7 +22116,13 @@ lt_prog_compiler_pic_F77='--shared' lt_prog_compiler_static_F77='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' @@ -21498,25 +22134,25 @@ # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-qpic' lt_prog_compiler_static_F77='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_wl_F77='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' + lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; @@ -21548,7 +22184,7 @@ lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; @@ -21605,10 +22241,17 @@ lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77@&t@" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 -$as_echo "$lt_prog_compiler_pic_F77" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. @@ -21616,7 +22259,7 @@ if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no @@ -21632,15 +22275,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes @@ -21666,13 +22309,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no @@ -21685,7 +22330,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes @@ -21712,7 +22357,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no @@ -21731,16 +22376,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes @@ -21764,7 +22409,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no @@ -21783,16 +22428,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:__oline__: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes @@ -21899,13 +22544,39 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) link_all_deplibs_F77=no ;; esac ld_shlibs_F77=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -21939,11 +22610,12 @@ ld_shlibs_F77=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -21979,10 +22651,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' + export_dynamic_flag_spec_F77='${wl}--export-all-symbols' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -22000,6 +22674,11 @@ fi ;; + haiku*) + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_F77=yes + ;; + interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no @@ -22025,15 +22704,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -22044,13 +22724,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec_F77= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_F77=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_F77=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -22066,17 +22750,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - archive_cmds_F77='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -22090,8 +22774,8 @@ archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -22109,8 +22793,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -22156,8 +22840,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -22197,8 +22881,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -22286,32 +22972,45 @@ allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' @@ -22320,37 +23019,55 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_F77='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + fi archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -22382,20 +23099,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + file_list_spec_F77='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_F77='chmod 644 $oldlib' + postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_F77=yes + ;; + esac ;; darwin* | rhapsody*) @@ -22405,7 +23165,11 @@ hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_F77='' + fi link_all_deplibs_F77=yes allow_undefined_flag_F77="$_lt_dar_allow_undefined" case $cc_basename in @@ -22413,7 +23177,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -22456,7 +23220,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no @@ -22464,7 +23228,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -22479,8 +23243,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -22498,16 +23262,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -22519,7 +23283,7 @@ archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi @@ -22547,25 +23311,40 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' @@ -22627,17 +23406,17 @@ hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported - archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' @@ -22647,13 +23426,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' @@ -22666,9 +23445,9 @@ no_undefined_flag_F77=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -22847,44 +23626,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5 -$as_echo "$archive_cmds_need_lc_F77" >&6; } + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_F77=no + else + lt_cv_archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; } + archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 ;; esac fi @@ -23041,7 +23826,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -23072,8 +23857,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -23094,36 +23880,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -23206,6 +24038,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -23251,8 +24097,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -23319,25 +24167,34 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" - cat > conftest.$ac_ext <<_ACEOF + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -23346,7 +24203,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -23610,6 +24467,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= @@ -23658,6 +24517,7 @@ GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes ac_ext=c @@ -23692,7 +24552,7 @@ if test "$enable_shared" = yes && test "$enable_static" = yes; then case $library_names_spec in *libname.a*) - as_fn_error "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5 + as_fn_error $? "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5 ;; esac fi @@ -23712,7 +24572,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23824,7 +24684,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23887,8 +24747,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -23912,7 +24771,7 @@ # endif #endif " -if test "x$ac_cv_header_sys_resource_h" = x""yes; then : +if test "x$ac_cv_header_sys_resource_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_RESOURCE_H 1 _ACEOF @@ -23929,7 +24788,7 @@ # include #endif " -if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then : +if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_SYSCTL_H 1 _ACEOF @@ -23946,7 +24805,7 @@ # include #endif " -if test "x$ac_cv_header_machine_hal_sysinfo_h" = x""yes; then : +if test "x$ac_cv_header_machine_hal_sysinfo_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_MACHINE_HAL_SYSINFO_H 1 _ACEOF @@ -23968,7 +24827,7 @@ # to the man page (but aren't), in glibc they're in stdio.h. # ac_fn_c_check_decl "$LINENO" "fgetc" "ac_cv_have_decl_fgetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_fgetc" = x""yes; then : +if test "x$ac_cv_have_decl_fgetc" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23978,7 +24837,7 @@ @%:@define HAVE_DECL_FGETC $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fscanf" "ac_cv_have_decl_fscanf" "$ac_includes_default" -if test "x$ac_cv_have_decl_fscanf" = x""yes; then : +if test "x$ac_cv_have_decl_fscanf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23988,7 +24847,7 @@ @%:@define HAVE_DECL_FSCANF $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default" -if test "x$ac_cv_have_decl_optarg" = x""yes; then : +if test "x$ac_cv_have_decl_optarg" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23998,7 +24857,7 @@ @%:@define HAVE_DECL_OPTARG $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "ungetc" "ac_cv_have_decl_ungetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_ungetc" = x""yes; then : +if test "x$ac_cv_have_decl_ungetc" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24008,7 +24867,7 @@ @%:@define HAVE_DECL_UNGETC $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "vfprintf" "ac_cv_have_decl_vfprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vfprintf" = x""yes; then : +if test "x$ac_cv_have_decl_vfprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24021,7 +24880,7 @@ ac_fn_c_check_decl "$LINENO" "sys_errlist" "ac_cv_have_decl_sys_errlist" "#include #include " -if test "x$ac_cv_have_decl_sys_errlist" = x""yes; then : +if test "x$ac_cv_have_decl_sys_errlist" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24033,7 +24892,7 @@ ac_fn_c_check_decl "$LINENO" "sys_nerr" "ac_cv_have_decl_sys_nerr" "#include #include " -if test "x$ac_cv_have_decl_sys_nerr" = x""yes; then : +if test "x$ac_cv_have_decl_sys_nerr" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24046,7 +24905,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24089,7 +24948,7 @@ # the default includes are sufficient for all these types # ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" -if test "x$ac_cv_type_intmax_t" = x""yes; then : +if test "x$ac_cv_type_intmax_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_INTMAX_T 1 @@ -24098,7 +24957,7 @@ fi ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default" -if test "x$ac_cv_type_long_double" = x""yes; then : +if test "x$ac_cv_type_long_double" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LONG_DOUBLE 1 @@ -24107,7 +24966,7 @@ fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = x""yes; then : +if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LONG_LONG 1 @@ -24116,7 +24975,7 @@ fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_PTRDIFF_T 1 @@ -24125,7 +24984,7 @@ fi ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default" -if test "x$ac_cv_type_quad_t" = x""yes; then : +if test "x$ac_cv_type_quad_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_QUAD_T 1 @@ -24134,7 +24993,7 @@ fi ac_fn_c_check_type "$LINENO" "uint_least32_t" "ac_cv_type_uint_least32_t" "$ac_includes_default" -if test "x$ac_cv_type_uint_least32_t" = x""yes; then : +if test "x$ac_cv_type_uint_least32_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_UINT_LEAST32_T 1 @@ -24142,11 +25001,20 @@ fi +ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" +if test "x$ac_cv_type_intptr_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +@%:@define HAVE_INTPTR_T 1 +_ACEOF + + +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 $as_echo_n "checking for preprocessor stringizing operator... " >&6; } -if test "${ac_cv_c_stringize+set}" = set; then : +if ${ac_cv_c_stringize+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24178,7 +25046,7 @@ # But we don't use it in C++ currently. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } -if test "${ac_cv_c_volatile+set}" = set; then : +if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24213,7 +25081,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : +if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no @@ -24260,7 +25128,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether exists and works" >&5 $as_echo_n "checking whether exists and works... " >&6; } -if test "${gmp_cv_c_stdarg+set}" = set; then : +if ${gmp_cv_c_stdarg+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24301,7 +25169,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((const)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((const)) works... " >&6; } -if test "${gmp_cv_c_attribute_const+set}" = set; then : +if ${gmp_cv_c_attribute_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24333,7 +25201,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((malloc)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((malloc)) works... " >&6; } -if test "${gmp_cv_c_attribute_malloc+set}" = set; then : +if ${gmp_cv_c_attribute_malloc+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking whether gcc __attribute__ ((mode (XX))) works... " >&6; } -if test "${gmp_cv_c_attribute_mode+set}" = set; then : +if ${gmp_cv_c_attribute_mode+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24399,7 +25267,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((noreturn)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((noreturn)) works... " >&6; } -if test "${gmp_cv_c_attribute_noreturn+set}" = set; then : +if ${gmp_cv_c_attribute_noreturn+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24432,7 +25300,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -24481,7 +25349,6 @@ #define __GMP_WITHIN_CONFIGURE_INLINE 1 #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24516,13 +25383,13 @@ # from libtool LIBM= case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 $as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } -if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then : +if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24556,13 +25423,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } -if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then : +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : LIBM="-lmw" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } -if test "${ac_cv_lib_m_cos+set}" = set; then : +if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24596,7 +25463,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = x""yes; then : +if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="$LIBM -lm" fi @@ -24604,7 +25471,7 @@ *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } -if test "${ac_cv_lib_m_cos+set}" = set; then : +if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24638,7 +25505,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = x""yes; then : +if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="-lm" fi @@ -24652,7 +25519,7 @@ # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${gmp_cv_header_alloca+set}" = set; then : +if ${gmp_cv_header_alloca+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24685,14 +25552,13 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca (via gmp-impl.h)" >&5 $as_echo_n "checking for alloca (via gmp-impl.h)... " >&6; } -if test "${gmp_cv_func_alloca+set}" = set; then : +if ${gmp_cv_func_alloca+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24726,7 +25592,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to allocate temporary memory" >&5 $as_echo_n "checking how to allocate temporary memory... " >&6; } -if test "${gmp_cv_option_alloca+set}" = set; then : +if ${gmp_cv_option_alloca+:} false; then : $as_echo_n "(cached) " >&6 else case $enable_alloca in @@ -24756,7 +25622,7 @@ case $gmp_cv_option_alloca in alloca) if test $gmp_cv_func_alloca = no; then - as_fn_error "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5 + as_fn_error $? "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5 fi $as_echo "@%:@define WANT_TMP_ALLOCA 1" >>confdefs.h @@ -24779,7 +25645,7 @@ ;; *) # checks at the start of configure.in should protect us - as_fn_error "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5 + as_fn_error $? "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5 ;; esac @@ -24790,7 +25656,6 @@ #include #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24818,7 +25683,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -25053,7 +25918,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking format of \`double' floating point" >&5 $as_echo_n "checking format of \`double' floating point... " >&6; } -if test "${gmp_cv_c_double_format+set}" = set; then : +if ${gmp_cv_c_double_format+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_c_double_format=unknown @@ -25324,8 +26189,7 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -25336,7 +26200,7 @@ ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" -if test "x$ac_cv_func_vsnprintf" = x""yes; then : +if test "x$ac_cv_func_vsnprintf" = xyes; then : gmp_vsnprintf_exists=yes else gmp_vsnprintf_exists=no @@ -25347,7 +26211,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf works" >&5 $as_echo_n "checking whether vsnprintf works... " >&6; } -if test "${gmp_cv_func_vsnprintf+set}" = set; then : +if ${gmp_cv_func_vsnprintf+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_func_vsnprintf=yes @@ -25434,7 +26298,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sscanf needs writable input" >&5 $as_echo_n "checking whether sscanf needs writable input... " >&6; } -if test "${gmp_cv_func_sscanf_writable_input+set}" = set; then : +if ${gmp_cv_func_sscanf_writable_input+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -25451,7 +26315,7 @@ $as_echo "@%:@define SSCANF_WRITABLE_INPUT 1" >>confdefs.h ;; no) ;; - *) as_fn_error "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;; + *) as_fn_error $? "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;; esac @@ -25460,7 +26324,7 @@ # ac_fn_c_check_member "$LINENO" "struct pst_processor" "psp_iticksperclktick" "ac_cv_member_struct_pst_processor_psp_iticksperclktick" "#include " -if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = x""yes; then : +if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = xyes; then : $as_echo "@%:@define HAVE_PSP_ITICKSPERCLKTICK 1" >>confdefs.h @@ -25485,7 +26349,7 @@ for ac_header in sstream do : ac_fn_cxx_check_header_mongrel "$LINENO" "sstream" "ac_cv_header_sstream" "$ac_includes_default" -if test "x$ac_cv_header_sstream" = x""yes; then : +if test "x$ac_cv_header_sstream" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SSTREAM 1 _ACEOF @@ -25496,7 +26360,7 @@ ac_fn_cxx_check_type "$LINENO" "std::locale" "ac_cv_type_std__locale" "#include " -if test "x$ac_cv_type_std__locale" = x""yes; then : +if test "x$ac_cv_type_std__locale" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STD__LOCALE 1 @@ -25523,43 +26387,55 @@ # can provide some functions too. (mpn/Makefile.am passes # -DOPERATION_ to get them to generate the right code.) -# Note: The following lines defining $gmp_mpn_functions_optional -# and $gmp_mpn_functions are parsed by the "macos/configure" -# Perl script. So if you change the lines in a major way -# make sure to run and examine the output from -# -# % (cd macos; perl configure) -# # Note: $gmp_mpn_functions must have mod_1 before pre_mod_1 so the former # can optionally provide the latter as an extra entrypoint. Likewise # divrem_1 and pre_divrem_1. -gmp_mpn_functions_optional="umul udiv copyi copyd com_n - and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ +gmp_mpn_functions_optional="umul udiv \ invert_limb sqr_diagonal \ mul_2 mul_3 mul_4 \ addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8 \ - addlsh1_n sublsh1_n rsh1add_n rsh1sub_n addsub_n addaddmul_1msb0 lshiftc" + addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n \ + addlsh2_n sublsh2_n rsblsh2_n \ + addlsh_n sublsh_n rsblsh_n \ + add_n_sub_n addaddmul_1msb0" gmp_mpn_functions="$extra_functions \ - add add_1 add_n sub sub_1 sub_n neg_n mul_1 addmul_1 \ + add add_1 add_n sub sub_1 sub_n neg com mul_1 addmul_1 \ submul_1 lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2 \ fib2_ui mod_1 mod_34lsub1 mode1o pre_divrem_1 pre_mod_1 dump \ - mod_1_1 mod_1_2 mod_1_3 mod_1_4 \ - mul mul_fft mul_n mul_basecase sqr_basecase random random2 pow_1 \ - rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp perfsqr \ - bdivmod gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ + mod_1_1 mod_1_2 mod_1_3 mod_1_4 lshiftc \ + mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \ + random random2 pow_1 \ + rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp \ + perfsqr perfpow \ + gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ gcdext_lehmer gcdext_subdiv_step \ - tdiv_qr dc_divrem_n sb_divrem_mn jacbase get_d \ - matrix22_mul hgcd2 hgcd mullow_n mullow_basecase \ - toom22_mul toom33_mul toom44_mul \ - toom32_mul toom42_mul toom62_mul toom53_mul \ + div_q tdiv_qr jacbase get_d \ + matrix22_mul hgcd2 hgcd mullo_n mullo_basecase \ + toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \ + toom33_mul toom43_mul toom53_mul toom63_mul \ + toom44_mul \ + toom6h_mul toom6_sqr toom8h_mul toom8_sqr \ + toom_couple_handling \ toom2_sqr toom3_sqr toom4_sqr \ - toom_interpolate_5pts toom_interpolate_7pts invert binvert \ - sb_div_qr sb_divappr_q sb_div_q dc_div_qr dc_divappr_q dc_div_q \ + toom_eval_dgr3_pm1 toom_eval_dgr3_pm2 \ + toom_eval_pm1 toom_eval_pm2 toom_eval_pm2exp toom_eval_pm2rexp \ + toom_interpolate_5pts toom_interpolate_6pts toom_interpolate_7pts \ + toom_interpolate_8pts toom_interpolate_12pts toom_interpolate_16pts \ + invertappr invert binvert mulmod_bnm1 sqrmod_bnm1 \ + sbpi1_div_q sbpi1_div_qr sbpi1_divappr_q \ + dcpi1_div_q dcpi1_div_qr dcpi1_divappr_q \ mu_div_qr mu_divappr_q mu_div_q \ - sb_bdiv_q sb_bdiv_qr dc_bdiv_q dc_bdiv_qr mu_bdiv_q mu_bdiv_qr \ - divexact bdiv_dbm1c redc_1 redc_2 powm powlo powm_sec subcnd_n \ + bdiv_q_1 \ + sbpi1_bdiv_q sbpi1_bdiv_qr \ + dcpi1_bdiv_q dcpi1_bdiv_qr \ + mu_bdiv_q mu_bdiv_qr \ + bdiv_q bdiv_qr \ + divexact bdiv_dbm1c redc_1 redc_2 redc_n powm powlo powm_sec subcnd_n \ + redc_1_sec trialdiv remove \ + and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ + copyi copyd zero \ $gmp_mpn_functions_optional" @@ -25601,10 +26477,10 @@ # setup that structure, on a per-directory basis ready for # mpn//fat/fat.c. # -# fat.h includes thesholds listed in $fat_thresholds, extracted from +# fat.h includes thresholds listed in $fat_thresholds, extracted from # gmp-mparam.h in each directory. An overall maximum for each threshold is # established, for use in making fixed size arrays of temporary space. -# (Eg. MUL_TOOM3_THRESHOLD_LIMIT used by mpn/generic/mul.c.) +# (Eg. MUL_TOOM33_THRESHOLD_LIMIT used by mpn/generic/mul.c.) # # It'd be possible to do some of this manually, but when there's more than a # few functions and a few directories it becomes very tedious, and very @@ -25683,7 +26559,7 @@ echo " /* Copy all fields into __gmpn_cpuvec. memcpy is not used because it might operate byte-wise (depending on its - implemenation), and we need the function pointer writes to be atomic. + implementation), and we need the function pointer writes to be atomic. "volatile" discourages the compiler from trying to optimize this. */ #define CPUVEC_INSTALL(vec) \\ do { \\ @@ -25761,7 +26637,7 @@ esac # Extract desired thresholds from gmp-mparam.h file in this directory, - # if prsent. + # if present. tmp_mparam=$srcdir/mpn/$tmp_dir/gmp-mparam.h if test -f $tmp_mparam; then for tmp_tn in $fat_thresholds; do @@ -25792,8 +26668,24 @@ and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) tmp_mulfunc="logops_n" ;; lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n|sublsh1_n) - tmp_mulfunc="aorslsh1_n";; + addlsh1_n) + tmp_mulfunc="aorslsh1_n aorrlsh1_n";; + sublsh1_n) + tmp_mulfunc="aorslsh1_n sorrlsh1_n";; + rsblsh1_n) + tmp_mulfunc="aorrlsh1_n sorrlsh1_n";; + addlsh2_n) + tmp_mulfunc="aorslsh2_n aorrlsh2_n";; + sublsh2_n) + tmp_mulfunc="aorslsh2_n sorrlsh2_n";; + rsblsh2_n) + tmp_mulfunc="aorrlsh2_n sorrlsh2_n";; + addlsh_n) + tmp_mulfunc="aorslsh_n aorrlsh_n";; + sublsh_n) + tmp_mulfunc="aorslsh_n sorrlsh_n";; + rsblsh_n) + tmp_mulfunc="aorrlsh_n sorrlsh_n";; rsh1add_n|rsh1sub_n) tmp_mulfunc="rsh1aors_n";; esac @@ -25927,8 +26819,24 @@ and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) tmp_mulfunc="logops_n" ;; lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n|sublsh1_n) - tmp_mulfunc="aorslsh1_n";; + addlsh1_n) + tmp_mulfunc="aorslsh1_n aorrlsh1_n";; + sublsh1_n) + tmp_mulfunc="aorslsh1_n sorrlsh1_n";; + rsblsh1_n) + tmp_mulfunc="aorrlsh1_n sorrlsh1_n";; + addlsh2_n) + tmp_mulfunc="aorslsh2_n aorrlsh2_n";; + sublsh2_n) + tmp_mulfunc="aorslsh2_n sorrlsh2_n";; + rsblsh2_n) + tmp_mulfunc="aorrlsh2_n sorrlsh2_n";; + addlsh_n) + tmp_mulfunc="aorslsh_n aorrlsh_n";; + sublsh_n) + tmp_mulfunc="aorslsh_n sorrlsh_n";; + rsblsh_n) + tmp_mulfunc="aorrlsh_n sorrlsh_n";; rsh1add_n|rsh1sub_n) tmp_mulfunc="rsh1aors_n";; esac @@ -26036,7 +26944,7 @@ fi done if test $found = no; then - as_fn_error "no version of $tmp_fn found in path: $path" "$LINENO" 5 + as_fn_error $? "no version of $tmp_fn found in path: $path" "$LINENO" 5 fi fi done @@ -26055,7 +26963,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable m4" >&5 $as_echo_n "checking for suitable m4... " >&6; } -if test "${gmp_cv_prog_m4+set}" = set; then : +if ${gmp_cv_prog_m4+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$M4"; then @@ -26089,7 +26997,7 @@ done IFS="$ac_save_ifs" if test -z "$gmp_cv_prog_m4"; then - as_fn_error "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5 + as_fn_error $? "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5 fi fi rm -f conftest.m4 @@ -26103,7 +27011,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if m4wrap produces spurious output" >&5 $as_echo_n "checking if m4wrap produces spurious output... " >&6; } -if test "${gmp_cv_m4_m4wrap_spurious+set}" = set; then : +if ${gmp_cv_m4_m4wrap_spurious+:} false; then : $as_echo_n "(cached) " >&6 else # hide the d-n-l from autoconf's error checking @@ -26130,7 +27038,10 @@ else - M4=m4-not-needed + # In case the user has set M4 in the environment, don't touch it. + if test -z "$M4" ; then + M4=m4-not-needed + fi fi # Only do the GMP_ASM checks if there's a .S or .asm wanting them. @@ -26141,7 +27052,7 @@ if test "$gmp_asm_syntax_testing" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to text section" >&5 $as_echo_n "checking how to switch to text section... " >&6; } -if test "${gmp_cv_asm_text+set}" = set; then : +if ${gmp_cv_asm_text+:} false; then : $as_echo_n "(cached) " >&6 else for i in ".text" ".code" ".csect .text[PR]"; do @@ -26169,7 +27080,7 @@ done if test -z "$gmp_cv_asm_text"; then - as_fn_error "Cannot determine text section directive" "$LINENO" 5 + as_fn_error $? "Cannot determine text section directive" "$LINENO" 5 fi fi @@ -26179,7 +27090,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to data section" >&5 $as_echo_n "checking how to switch to data section... " >&6; } -if test "${gmp_cv_asm_data+set}" = set; then : +if ${gmp_cv_asm_data+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26195,7 +27106,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler label suffix" >&5 $as_echo_n "checking for assembler label suffix... " >&6; } -if test "${gmp_cv_asm_label_suffix+set}" = set; then : +if ${gmp_cv_asm_label_suffix+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_label_suffix=unknown @@ -26225,7 +27136,7 @@ done if test "$gmp_cv_asm_label_suffix" = "unknown"; then - as_fn_error "Cannot determine label suffix" "$LINENO" 5 + as_fn_error $? "Cannot determine label suffix" "$LINENO" 5 fi fi @@ -26236,7 +27147,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive" >&5 $as_echo_n "checking for assembler global directive... " >&6; } -if test "${gmp_cv_asm_globl+set}" = set; then : +if ${gmp_cv_asm_globl+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26253,7 +27164,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive attribute" >&5 $as_echo_n "checking for assembler global directive attribute... " >&6; } -if test "${gmp_cv_asm_globl_attr+set}" = set; then : +if ${gmp_cv_asm_globl_attr+:} false; then : $as_echo_n "(cached) " >&6 else case $gmp_cv_asm_globl in @@ -26269,7 +27180,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if globals are prefixed by underscore" >&5 $as_echo_n "checking if globals are prefixed by underscore... " >&6; } -if test "${gmp_cv_asm_underscore+set}" = set; then : +if ${gmp_cv_asm_underscore+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_underscore="unknown" @@ -26340,19 +27251,20 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to read-only data section" >&5 $as_echo_n "checking how to switch to read-only data section... " >&6; } -if test "${gmp_cv_asm_rodata+set}" = set; then : +if ${gmp_cv_asm_rodata+:} false; then : $as_echo_n "(cached) " >&6 else case $host in -i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | x86_64-*-*) +i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | x86_64-*-*) gmp_cv_asm_rodata="$gmp_cv_asm_data" ;; *) gmp_cv_asm_rodata="$gmp_cv_asm_text" ;; esac cat >conftest.c <&5 cat conftest.c >&5 @@ -26397,7 +27309,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .type directive" >&5 $as_echo_n "checking for assembler .type directive... " >&6; } -if test "${gmp_cv_asm_type+set}" = set; then : +if ${gmp_cv_asm_type+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_type= @@ -26435,7 +27347,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .size directive" >&5 $as_echo_n "checking for assembler .size directive... " >&6; } -if test "${gmp_cv_asm_size+set}" = set; then : +if ${gmp_cv_asm_size+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_size= @@ -26472,7 +27384,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler local label prefix" >&5 $as_echo_n "checking for assembler local label prefix... " >&6; } -if test "${gmp_cv_asm_lsym_prefix+set}" = set; then : +if ${gmp_cv_asm_lsym_prefix+:} false; then : $as_echo_n "(cached) " >&6 else gmp_tmp_pre_appears=yes @@ -26546,7 +27458,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler byte directive" >&5 $as_echo_n "checking for assembler byte directive... " >&6; } -if test "${gmp_cv_asm_byte+set}" = set; then : +if ${gmp_cv_asm_byte+:} false; then : $as_echo_n "(cached) " >&6 else for i in .byte data1; do @@ -26576,7 +27488,7 @@ done if test -z "$gmp_cv_asm_byte"; then - as_fn_error "Cannot determine how to emit a data byte" "$LINENO" 5 + as_fn_error $? "Cannot determine how to emit a data byte" "$LINENO" 5 fi fi @@ -26590,7 +27502,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to define a 32-bit word" >&5 $as_echo_n "checking how to define a 32-bit word... " >&6; } -if test "${gmp_cv_asm_w32+set}" = set; then : +if ${gmp_cv_asm_w32+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26638,7 +27550,7 @@ ;; esac if test -z "$gmp_cv_asm_w32"; then - as_fn_error "cannot determine how to define a 32-bit word" "$LINENO" 5 + as_fn_error $? "cannot determine how to define a 32-bit word" "$LINENO" 5 fi fi @@ -26653,7 +27565,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align assembly directive is logarithmic" >&5 $as_echo_n "checking if .align assembly directive is logarithmic... " >&6; } -if test "${gmp_cv_asm_align_log+set}" = set; then : +if ${gmp_cv_asm_align_log+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "cannot assemble alignment test" "$LINENO" 5 + as_fn_error $? "cannot assemble alignment test" "$LINENO" 5 fi rm -f conftest* @@ -26706,7 +27618,7 @@ ia64*-*-* | itanium-*-* | itanium2-*-*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler .align padding is good" >&5 $as_echo_n "checking whether assembler .align padding is good... " >&6; } -if test "${gmp_cv_asm_ia64_align_ok+set}" = set; then : +if ${gmp_cv_asm_ia64_align_ok+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.awk <<\EOF @@ -26832,7 +27744,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler instruction and register style" >&5 $as_echo_n "checking assembler instruction and register style... " >&6; } -if test "${gmp_cv_asm_m68k_instruction+set}" = set; then : +if ${gmp_cv_asm_m68k_instruction+:} false; then : $as_echo_n "(cached) " >&6 else for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do @@ -26860,7 +27772,7 @@ done if test -z "$gmp_cv_asm_m68k_instruction"; then - as_fn_error "cannot determine assembler instruction and register style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler instruction and register style" "$LINENO" 5 fi fi @@ -26871,7 +27783,7 @@ "addl %d0,%d1") want_dot_size=no; want_register_percent=yes ;; "add.l d0,d1") want_dot_size=yes; want_register_percent=no ;; "add.l %d0,%d1") want_dot_size=yes; want_register_percent=yes ;; -*) as_fn_error "oops, unrecognised instruction and register style" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised instruction and register style" "$LINENO" 5 ;; esac echo "define(, <\`$want_register_percent'>)" >> $gmp_tmpconfigm4 @@ -26884,18 +27796,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler addressing style" >&5 $as_echo_n "checking assembler addressing style... " >&6; } -if test "${gmp_cv_asm_m68k_addressing+set}" = set; then : +if ${gmp_cv_asm_m68k_addressing+:} false; then : $as_echo_n "(cached) " >&6 else case $gmp_cv_asm_m68k_instruction in addl*) movel=movel ;; add.l*) movel=move.l ;; -*) as_fn_error "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; esac case $gmp_cv_asm_m68k_instruction in *"%d0,%d1") dreg=%d0; areg=%a0 ;; *"d0,d1") dreg=d0; areg=a0 ;; -*) as_fn_error "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; esac cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "cannot determine assembler addressing style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler addressing style" "$LINENO" 5 fi rm -f conftest* @@ -26947,7 +27859,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler shortest branches" >&5 $as_echo_n "checking assembler shortest branches... " >&6; } -if test "${gmp_cv_asm_m68k_branches+set}" = set; then : +if ${gmp_cv_asm_m68k_branches+:} false; then : $as_echo_n "(cached) " >&6 else for i in jra jbra bra; do @@ -26976,7 +27888,7 @@ done if test -z "$gmp_cv_asm_m68k_branches"; then - as_fn_error "cannot determine assembler branching style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler branching style" "$LINENO" 5 fi fi @@ -26991,7 +27903,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler output is PIC by default" >&5 $as_echo_n "checking whether compiler output is PIC by default... " >&6; } -if test "${gmp_cv_asm_powerpc_pic+set}" = set; then : +if ${gmp_cv_asm_powerpc_pic+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_powerpc_pic=yes @@ -27028,7 +27940,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler needs r on registers" >&5 $as_echo_n "checking if the assembler needs r on registers... " >&6; } -if test "${gmp_cv_asm_powerpc_r_registers+set}" = set; then : +if ${gmp_cv_asm_powerpc_r_registers+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5 + as_fn_error $? "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5 fi rm -f conftest* @@ -27131,7 +28043,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts \".register\"" >&5 $as_echo_n "checking if the assembler accepts \".register\"... " >&6; } -if test "${gmp_cv_asm_sparc_register+set}" = set; then : +if ${gmp_cv_asm_sparc_register+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if the .align directive accepts an 0x90 fill in .text... " >&6; } -if test "${gmp_cv_asm_align_fill_0x90+set}" = set; then : +if ${gmp_cv_asm_align_fill_0x90+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking for assembler COFF type directives... " >&6; } -if test "${gmp_cv_asm_x86_coff_type+set}" = set; then : +if ${gmp_cv_asm_x86_coff_type+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore... " >&6; } -if test "${gmp_cv_asm_x86_got_underscore+set}" = set; then : +if ${gmp_cv_asm_x86_got_underscore+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_x86_got_underscore="not applicable" @@ -27314,7 +28226,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler takes cl with shldl" >&5 $as_echo_n "checking if the assembler takes cl with shldl... " >&6; } -if test "${gmp_cv_asm_x86_shldl_cl+set}" = set; then : +if ${gmp_cv_asm_x86_shldl_cl+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <> $gmp_tmpconfigm4i + $as_echo "@%:@define HAVE_HOST_CPU_FAMILY_x86_64 1" >>confdefs.h + case $host in *-*-darwin*) @@ -27499,7 +28413,7 @@ fi done if test -z "$gmp_mparam_source"; then - as_fn_error "no version of gmp-mparam.h found in path: $path" "$LINENO" 5 + as_fn_error $? "no version of gmp-mparam.h found in path: $path" "$LINENO" 5 fi # For a helpful message from tune/tuneup.c @@ -27517,15 +28431,15 @@ -# Copy any SQR_KARATSUBA_THRESHOLD from gmp-mparam.h to config.m4. +# Copy any SQR_TOOM2_THRESHOLD from gmp-mparam.h to config.m4. # Some versions of sqr_basecase.asm use this. # Fat binaries do this on a per-file basis, so skip in that case. # if test -z "$fat_path"; then - tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_KARATSUBA_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` + tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_TOOM2_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` if test -n "$tmp_gmp_karatsuba_sqr_threshold"; then -echo "define(,<$tmp_gmp_karatsuba_sqr_threshold>)" >> $gmp_tmpconfigm4 +echo "define(,<$tmp_gmp_karatsuba_sqr_threshold>)" >> $gmp_tmpconfigm4 fi fi @@ -27533,8 +28447,8 @@ # Sizes of some types, needed at preprocessing time. # -# FIXME: The assumption that BITS_PER_MP_LIMB is 8*sizeof(mp_limb_t) might -# be slightly rash, but it's true everwhere we know of and ought to be true +# FIXME: The assumption that GMP_LIMB_BITS is 8*sizeof(mp_limb_t) might +# be slightly rash, but it's true everywhere we know of and ought to be true # of any sensible system. In a generic C build, grepping LONG_BIT out of # might be an alternative, for maximum portability. # @@ -27542,9 +28456,42 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if ${ac_cv_sizeof_void_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +@%:@define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5 $as_echo_n "checking size of unsigned short... " >&6; } -if test "${ac_cv_sizeof_unsigned_short+set}" = set; then : +if ${ac_cv_sizeof_unsigned_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default"; then : @@ -27553,9 +28500,8 @@ if test "$ac_cv_type_unsigned_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned short) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned short) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_short=0 fi @@ -27578,7 +28524,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 $as_echo_n "checking size of unsigned... " >&6; } -if test "${ac_cv_sizeof_unsigned+set}" = set; then : +if ${ac_cv_sizeof_unsigned+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : @@ -27587,9 +28533,8 @@ if test "$ac_cv_type_unsigned" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned=0 fi @@ -27612,7 +28557,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 $as_echo_n "checking size of unsigned long... " >&6; } -if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : +if ${ac_cv_sizeof_unsigned_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : @@ -27621,9 +28566,8 @@ if test "$ac_cv_type_unsigned_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi @@ -27646,12 +28590,11 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of mp_limb_t" >&5 $as_echo_n "checking size of mp_limb_t... " >&6; } -if test "${ac_cv_sizeof_mp_limb_t+set}" = set; then : +if ${ac_cv_sizeof_mp_limb_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (mp_limb_t))" "ac_cv_sizeof_mp_limb_t" "#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include \"$srcdir/gmp-h.in\" @@ -27662,9 +28605,8 @@ if test "$ac_cv_type_mp_limb_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (mp_limb_t) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (mp_limb_t) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_mp_limb_t=0 fi @@ -27682,9 +28624,9 @@ if test "$ac_cv_sizeof_mp_limb_t" = 0; then - as_fn_error "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5 fi -BITS_PER_MP_LIMB=`expr 8 \* $ac_cv_sizeof_mp_limb_t` +GMP_LIMB_BITS=`expr 8 \* $ac_cv_sizeof_mp_limb_t` echo "define(,<$ac_cv_sizeof_unsigned>)" >> $gmp_tmpconfigm4 @@ -27697,21 +28639,21 @@ # probably wouldn't want to be fatal, none of the libgmp assembler code # depends on ulong. # -mparam_bits=`sed -n 's/^#define BITS_PER_MP_LIMB[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source` -if test -n "$mparam_bits" && test "$mparam_bits" -ne $BITS_PER_MP_LIMB; then +mparam_bits=`sed -n 's/^#define GMP_LIMB_BITS[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source` +if test -n "$mparam_bits" && test "$mparam_bits" -ne $GMP_LIMB_BITS; then if test "$test_CFLAGS" = set; then - as_fn_error "Oops, mp_limb_t is $BITS_PER_MP_LIMB bits, but the assembler code + as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code in this configuration expects $mparam_bits bits. You appear to have set \$CFLAGS, perhaps you also need to tell GMP the intended ABI, see \"ABI and ISA\" in the manual." "$LINENO" 5 else - as_fn_error "Oops, mp_limb_t is $BITS_PER_MP_LIMB bits, but the assembler code + as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code in this configuration expects $mparam_bits bits." "$LINENO" 5 fi fi -echo "define(,$BITS_PER_MP_LIMB)" >> $gmp_tmpconfigm4 +echo "define(,$GMP_LIMB_BITS)" >> $gmp_tmpconfigm4 echo "define(,$GMP_NAIL_BITS)" >> $gmp_tmpconfigm4 @@ -27745,12 +28687,12 @@ test -d tune || mkdir tune case $sqr_basecase_source in *.asm) - sqr_max=`sed -n 's/^def...(SQR_KARATSUBA_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source` + sqr_max=`sed -n 's/^def...(SQR_TOOM2_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source` if test -n "$sqr_max"; then TUNE_SQR_OBJ=sqr_asm.o cat >>confdefs.h <<_ACEOF -@%:@define TUNE_SQR_KARATSUBA_MAX $sqr_max +@%:@define TUNE_SQR_TOOM2_MAX $sqr_max _ACEOF fi @@ -27761,7 +28703,7 @@ ;; *.c) TUNE_SQR_OBJ= - $as_echo "@%:@define TUNE_SQR_KARATSUBA_MAX SQR_KARATSUBA_MAX_GENERIC" >>confdefs.h + $as_echo "@%:@define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC" >>confdefs.h cat >tune/sqr_basecase.c < " -if test "x$ac_cv_type_stack_t" = x""yes; then : +if test "x$ac_cv_type_stack_t" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STACK_T 1 @@ -27867,7 +28809,7 @@ if test $with_readline != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5 $as_echo_n "checking for tputs in -lncurses... " >&6; } -if test "${ac_cv_lib_ncurses_tputs+set}" = set; then : +if ${ac_cv_lib_ncurses_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27901,12 +28843,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 $as_echo "$ac_cv_lib_ncurses_tputs" >&6; } -if test "x$ac_cv_lib_ncurses_tputs" = x""yes; then : +if test "x$ac_cv_lib_ncurses_tputs" = xyes; then : LIBCURSES=-lncurses else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 $as_echo_n "checking for tputs in -lcurses... " >&6; } -if test "${ac_cv_lib_curses_tputs+set}" = set; then : +if ${ac_cv_lib_curses_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27940,7 +28882,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 $as_echo "$ac_cv_lib_curses_tputs" >&6; } -if test "x$ac_cv_lib_curses_tputs" = x""yes; then : +if test "x$ac_cv_lib_curses_tputs" = xyes; then : LIBCURSES=-lcurses fi @@ -27953,7 +28895,7 @@ use_readline=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } -if test "${ac_cv_lib_readline_readline+set}" = set; then : +if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27987,11 +28929,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = x""yes; then : +if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = x""yes; then : +if test "x$ac_cv_header_readline_readline_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = x""yes; then : +if test "x$ac_cv_header_readline_history_h" = xyes; then : use_readline=yes fi @@ -28020,7 +28962,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_YACC+set}" = set; then : +if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then @@ -28063,7 +29005,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LEX+set}" = set; then : +if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then @@ -28133,7 +29075,7 @@ test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } -if test "${ac_cv_prog_lex_root+set}" = set; then : +if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else @@ -28142,7 +29084,7 @@ elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else - as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5 + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 @@ -28152,7 +29094,7 @@ if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } -if test "${ac_cv_lib_lex+set}" = set; then : +if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else @@ -28182,7 +29124,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } -if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : +if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the @@ -28193,7 +29135,8 @@ LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define YYTEXT_POINTER 1 + + #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : @@ -28230,7 +29173,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -28270,7 +29213,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -28414,10 +29357,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -28456,24 +29410,24 @@ fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WANT_MPBSD_TRUE}" && test -z "${WANT_MPBSD_FALSE}"; then - as_fn_error "conditional \"WANT_MPBSD\" was never defined. + as_fn_error $? "conditional \"WANT_MPBSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WANT_CXX_TRUE}" && test -z "${WANT_CXX_FALSE}"; then - as_fn_error "conditional \"WANT_CXX\" was never defined. + as_fn_error $? "conditional \"WANT_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then - as_fn_error "conditional \"ENABLE_STATIC\" was never defined. + as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -28574,6 +29528,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -28619,19 +29574,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -@%:@ as_fn_error ERROR [LINENO LOG_FD] -@%:@ --------------------------------- +@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] +@%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the -@%:@ script with status @S|@?, using 1 if that was 0. +@%:@ script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @@ -28827,7 +29782,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @@ -28880,8 +29835,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU MP $as_me 4.3.2, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by GNU MP $as_me 5.0.2, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -28952,11 +29907,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU MP config.status 4.3.2 -configured by $0, generated by GNU Autoconf 2.65, +GNU MP config.status 5.0.2 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -28974,11 +29929,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -29000,6 +29960,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -29012,7 +29973,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -29021,7 +29982,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -29074,233 +30035,261 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -LD_F77='`$ECHO "X$LD_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_F77='`$ECHO "X$old_archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_F77='`$ECHO "X$compiler_F77" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_F77='`$ECHO "X$GCC_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_F77='`$ECHO "X$lt_prog_compiler_no_builtin_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_F77='`$ECHO "X$lt_prog_compiler_wl_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_F77='`$ECHO "X$lt_prog_compiler_pic_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_F77='`$ECHO "X$lt_prog_compiler_static_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_F77='`$ECHO "X$lt_cv_prog_compiler_c_o_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_F77='`$ECHO "X$archive_cmds_need_lc_F77" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_F77='`$ECHO "X$enable_shared_with_static_runtimes_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_F77='`$ECHO "X$export_dynamic_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_F77='`$ECHO "X$whole_archive_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_F77='`$ECHO "X$compiler_needs_object_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_F77='`$ECHO "X$old_archive_from_new_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_F77='`$ECHO "X$module_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_F77='`$ECHO "X$module_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_F77='`$ECHO "X$with_gnu_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_F77='`$ECHO "X$allow_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_F77='`$ECHO "X$no_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_F77='`$ECHO "X$hardcode_libdir_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_F77='`$ECHO "X$hardcode_libdir_flag_spec_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_F77='`$ECHO "X$hardcode_libdir_separator_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_F77='`$ECHO "X$hardcode_direct_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_F77='`$ECHO "X$hardcode_direct_absolute_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_F77='`$ECHO "X$hardcode_minus_L_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_F77='`$ECHO "X$hardcode_shlibpath_var_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_F77='`$ECHO "X$hardcode_automatic_F77" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_F77='`$ECHO "X$inherit_rpath_F77" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_F77='`$ECHO "X$link_all_deplibs_F77" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_F77='`$ECHO "X$fix_srcfile_path_F77" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_F77='`$ECHO "X$always_export_symbols_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_F77='`$ECHO "X$export_symbols_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_F77='`$ECHO "X$exclude_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_F77='`$ECHO "X$include_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_F77='`$ECHO "X$prelink_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_F77='`$ECHO "X$file_list_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_F77='`$ECHO "X$hardcode_action_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_F77='`$ECHO "X$compiler_lib_search_dirs_F77" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_F77='`$ECHO "X$postdeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_F77='`$ECHO "X$compiler_lib_search_path_F77" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_F77='`$ECHO "$hardcode_libdir_flag_spec_ld_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. for var in NM \ +AS \ +DLLTOOL \ +OBJDUMP \ +SHELL \ +ECHO \ SED \ GREP \ EGREP \ @@ -29312,8 +30301,12 @@ reload_flag \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -29323,14 +30316,14 @@ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -29346,7 +30339,6 @@ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -29354,6 +30346,7 @@ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib \ @@ -29365,14 +30358,16 @@ compiler_lib_search_path \ LD_CXX \ LD_F77 \ +reload_flag_CXX \ +reload_flag_F77 \ compiler_CXX \ compiler_F77 \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_no_builtin_flag_F77 \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_F77 \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_wl_F77 \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_F77 \ lt_cv_prog_compiler_c_o_CXX \ @@ -29395,8 +30390,6 @@ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_CXX \ hardcode_libdir_separator_F77 \ -fix_srcfile_path_CXX \ -fix_srcfile_path_F77 \ exclude_expsyms_CXX \ exclude_expsyms_F77 \ include_expsyms_CXX \ @@ -29415,9 +30408,9 @@ postdeps_F77 \ compiler_lib_search_path_CXX \ compiler_lib_search_path_F77; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -29439,11 +30432,14 @@ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +reload_cmds_F77 \ old_archive_cmds_CXX \ old_archive_cmds_F77 \ old_archive_from_new_cmds_CXX \ @@ -29461,10 +30457,12 @@ export_symbols_cmds_CXX \ export_symbols_cmds_F77 \ prelink_cmds_CXX \ -prelink_cmds_F77; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in +prelink_cmds_F77 \ +postlink_cmds_CXX \ +postlink_cmds_F77; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -29472,12 +30470,6 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -29543,7 +30535,7 @@ "gmp.h") CONFIG_FILES="$CONFIG_FILES gmp.h:gmp-h.in" ;; "mp.h") CONFIG_FILES="$CONFIG_FILES mp.h:mp-h.in" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -29567,9 +30559,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -29577,12 +30570,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -29599,12 +30593,12 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -29613,18 +30607,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -29632,7 +30626,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -29680,7 +30674,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -29712,21 +30706,29 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -29738,7 +30740,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -29750,11 +30752,11 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -29839,7 +30841,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -29852,7 +30854,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -29871,7 +30873,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -29880,7 +30882,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -29906,8 +30908,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -30043,23 +31045,24 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -30068,21 +31071,21 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -30136,19 +31139,19 @@ $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then - as_fn_error "$ac_source: file not found" "$LINENO" 5 + as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. - case $srcdir in + case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || - as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 @@ -30179,7 +31182,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -30215,13 +31219,13 @@ NM=$lt_NM # Assembler program. -AS=$AS +AS=$lt_AS # DLL creation program. -DLLTOOL=$DLLTOOL +DLLTOOL=$lt_DLLTOOL # Object dumper program. -OBJDUMP=$OBJDUMP +OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version @@ -30239,6 +31243,12 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + # The host system. host_alias=$host_alias host=$host @@ -30285,20 +31295,36 @@ # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -30307,6 +31333,9 @@ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -30325,14 +31354,14 @@ # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# The name of the directory that contains temporary libtool files. +objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -30340,6 +31369,9 @@ # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -30396,6 +31428,9 @@ # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -30435,6 +31470,10 @@ # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -30447,12 +31486,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -30539,9 +31578,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -30557,6 +31593,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -30603,212 +31642,169 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -30820,6 +31816,10 @@ # The linker used to build libraries. LD=$lt_LD_CXX +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX @@ -30832,12 +31832,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX @@ -30924,9 +31924,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -30942,6 +31939,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX @@ -30973,6 +31973,10 @@ # The linker used to build libraries. LD=$lt_LD_F77 +# How to create reloadable object files. +reload_flag=$lt_reload_flag_F77 +reload_cmds=$lt_reload_cmds_F77 + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_F77 @@ -30985,12 +31989,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 @@ -31077,9 +32081,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_F77 - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -31095,6 +32096,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 @@ -31129,7 +32133,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -31150,7 +32154,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -Nru gmp-4.3.2+dfsg/autom4te.cache/requests gmp-5.0.2+dfsg/autom4te.cache/requests --- gmp-4.3.2+dfsg/autom4te.cache/requests 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/autom4te.cache/requests 2011-08-30 01:19:39.000000000 +0000 @@ -1,4 +1,4 @@ -# This file was generated by Autom4te Wed Dec 9 19:58:16 PST 2009. +# This file was generated by Autom4te Sat Apr 9 10:01:39 PDT 2011. # It contains the lists of macros which have been traced. # It can be safely removed. @@ -58,8 +58,8 @@ 'GMP_ASM_DATA' => 1, '_m4_warn' => 1, 'GMP_ASM_POWERPC_R_REGISTERS' => 1, - 'AM_SANITY_CHECK' => 1, 'LTOBSOLETE_VERSION' => 1, + 'AM_SANITY_CHECK' => 1, 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1, 'LTSUGAR_VERSION' => 1, '_LT_PROG_LTMAIN' => 1, @@ -70,28 +70,28 @@ 'AC_LTDL_DLLIB' => 1, '_AM_AUTOCONF_VERSION' => 1, 'AM_DISABLE_SHARED' => 1, - 'GMP_H_EXTERN_INLINE' => 1, '_LT_AC_LANG_CXX' => 1, + 'GMP_H_EXTERN_INLINE' => 1, 'fp_C_PROTOTYPES' => 1, 'GMP_C_STDARG' => 1, 'GMP_ASM_POWERPC_PIC_ALWAYS' => 1, 'AC_PROG_NM' => 1, - 'GMP_PROG_CXX_WORKS' => 1, - 'AC_PROG_LD_GNU' => 1, 'AC_ENABLE_FAST_INSTALL' => 1, + 'AC_PROG_LD_GNU' => 1, + 'GMP_PROG_CXX_WORKS' => 1, 'GMP_GCC_PENTIUM4_SSE2' => 1, - 'GMP_PROG_CC_FOR_BUILD' => 1, 'LTDL_CONVENIENCE' => 1, + 'GMP_PROG_CC_FOR_BUILD' => 1, 'AC_LIBTOOL_PROG_CC_C_O' => 1, 'GMP_ASM_M68K_ADDRESSING' => 1, - 'GMP_FUNC_SSCANF_WRITABLE_INPUT' => 1, 'GMP_PROG_CC_IS_GNU' => 1, + 'GMP_FUNC_SSCANF_WRITABLE_INPUT' => 1, 'LT_SUPPORTED_TAG' => 1, 'AC_DEFUN_ONCE' => 1, 'GMP_TRY_ASSEMBLE' => 1, '_LT_AC_LANG_GCJ' => 1, - 'GMP_C_ATTRIBUTE_CONST' => 1, 'GMP_OS_X86_XMM' => 1, + 'GMP_C_ATTRIBUTE_CONST' => 1, 'AC_LTDL_OBJDIR' => 1, '_LT_AC_PROG_ECHO_BACKSLASH' => 1, '_LT_AC_TRY_DLOPEN_SELF' => 1, @@ -108,68 +108,69 @@ '_AC_AM_CONFIG_HEADER_HOOK' => 1, 'GMP_ASM_SIZE' => 1, 'AM_MAKE_INCLUDE' => 1, - '_LT_AC_TAGCONFIG' => 1, 'LT_CMD_MAX_LEN' => 1, + '_LT_AC_TAGCONFIG' => 1, '_LT_COMPILER_BOILERPLATE' => 1, 'AC_LIBTOOL_SETUP' => 1, 'AC_PROG_LD_RELOAD_FLAG' => 1, - 'CL_AS_NOEXECSTACK' => 1, 'AC_LTDL_DLSYM_USCORE' => 1, + 'CL_AS_NOEXECSTACK' => 1, 'AM_MISSING_HAS_RUN' => 1, 'LT_CONFIG_LTDL_DIR' => 1, - 'AC_LIBTOOL_DLOPEN_SELF' => 1, 'LT_OUTPUT' => 1, + 'AC_LIBTOOL_DLOPEN_SELF' => 1, 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1, 'GMP_GCC_MIPS_O32' => 1, - 'AC_WITH_LTDL' => 1, 'AC_LIBTOOL_LINKER_OPTION' => 1, - 'LT_AC_PROG_GCJ' => 1, + 'AC_WITH_LTDL' => 1, 'LT_SYS_DLOPEN_SELF' => 1, + 'LT_AC_PROG_GCJ' => 1, 'GMP_ASM_X86_SSE2' => 1, - 'GMP_PROG_AR' => 1, + '_LT_AC_PROG_CXXCPP' => 1, 'AM_DISABLE_STATIC' => 1, - 'AM_CONFIG_HEADER' => 1, + 'GMP_PROG_AR' => 1, '_AC_PROG_LIBTOOL' => 1, + 'AM_CONFIG_HEADER' => 1, '_AM_IF_OPTION' => 1, - 'GMP_HPPA_LEVEL_20' => 1, 'AC_PATH_TOOL_PREFIX' => 1, + 'GMP_HPPA_LEVEL_20' => 1, 'm4_pattern_allow' => 1, 'AC_LIBTOOL_F77' => 1, 'AM_SET_LEADING_DOT' => 1, 'GMP_PROG_CC_WORKS_PART_TEST' => 1, '_LT_AC_SYS_COMPILER' => 1, - 'GMP_ASM_M68K_BRANCHES' => 1, 'AM_PROG_NM' => 1, + 'GMP_ASM_M68K_BRANCHES' => 1, 'AC_LIBLTDL_CONVENIENCE' => 1, 'AC_DEPLIBS_CHECK_METHOD' => 1, - 'jm_MAINTAINER_MODE' => 1, 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1, + 'jm_MAINTAINER_MODE' => 1, 'AC_LTDL_ENABLE_INSTALL' => 1, 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1, 'GMP_C_ATTRIBUTE_NORETURN' => 1, - 'AM_INIT_AUTOMAKE' => 1, 'GMP_ASM_IA64_ALIGN_OK' => 1, + 'AM_INIT_AUTOMAKE' => 1, 'GMP_HPC_HPPA_2_0' => 1, 'GMP_ASM_W32' => 1, 'AC_DISABLE_STATIC' => 1, 'LT_PATH_NM' => 1, - 'AM_MAINTAINER_MODE' => 1, 'GMP_PROG_NM' => 1, - 'AC_LTDL_SHLIBEXT' => 1, + 'AM_MAINTAINER_MODE' => 1, '_GMP_SUBST_CHECK_HEADERS' => 1, + 'AC_LTDL_SHLIBEXT' => 1, '_LT_AC_LOCK' => 1, '_LT_AC_LANG_RC_CONFIG' => 1, 'GMP_C_ATTRIBUTE_MODE' => 1, 'GMP_C_TEST_SIZEOF' => 1, 'AC_LTDL_SHLIBPATH' => 1, - 'AM_AUX_DIR_EXPAND' => 1, 'GMP_DEFINE' => 1, + 'AM_AUX_DIR_EXPAND' => 1, 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1, - '_AM_SET_OPTIONS' => 1, '_LT_COMPILER_OPTION' => 1, + '_AM_SET_OPTIONS' => 1, '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'GMP_ASM_M68K_INSTRUCTION' => 1, 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1, + 'GMP_ASM_M68K_INSTRUCTION' => 1, 'AC_CHECK_LIBM' => 1, 'LT_PATH_LD' => 1, '_AM_MANGLE_OPTION' => 1, @@ -189,74 +190,80 @@ 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1, '_LT_AC_LANG_C_CONFIG' => 1, 'AM_PROG_INSTALL_STRIP' => 1, - 'AC_LIBTOOL_OBJDIR' => 1, 'GMP_PROG_CC_WORKS' => 1, + 'AC_LIBTOOL_OBJDIR' => 1, 'gl_FUNC_ARGZ' => 1, 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1, + 'LT_LIB_M' => 1, '_LT_AC_CHECK_DLFCN' => 1, 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1, - 'LT_LIB_M' => 1, 'GMP_GCC_WA_MCPU' => 1, 'GMP_OPTION_ALLOCA' => 1, '_AM_PROG_TAR' => 1, 'GMP_PROG_CC_WORKS_PART_MAIN' => 1, 'GMP_PROG_CC_WORKS_LONGLONG' => 1, + '_LT_WITH_SYSROOT' => 1, 'LT_SYS_DLOPEN_DEPLIBS' => 1, '_LT_AC_LANG_F77' => 1, '_AM_SUBST_NOTMAKE' => 1, 'GMP_H_HAVE_FILE' => 1, 'GMP_DEFINE_RAW' => 1, + '_LT_PROG_ECHO_BACKSLASH' => 1, '_LTDL_SETUP' => 1, 'AM_PROG_LIBTOOL' => 1, - 'AC_LIB_LTDL' => 1, - '_LT_AC_FILE_LTDLL_C' => 1, 'AM_PROG_LD' => 1, + '_LT_AC_FILE_LTDLL_C' => 1, + 'AC_LIB_LTDL' => 1, 'GMP_FUNC_VSNPRINTF' => 1, 'AU_DEFUN' => 1, 'AC_LIBTOOL_DLOPEN' => 1, - 'AC_PROG_LD' => 1, 'GMP_GCC_WA_OLDAS' => 1, + 'AC_PROG_LD' => 1, 'AC_LIBTOOL_FC' => 1, '_AM_SET_OPTION' => 1, - 'AC_LTDL_PREOPEN' => 1, - 'GMP_ASM_X86_GOT_EAX_OK' => 1, 'GMP_ASM_X86_SHLDL_CL' => 1, + 'GMP_ASM_X86_GOT_EAX_OK' => 1, + 'AC_LTDL_PREOPEN' => 1, '_LT_LINKER_BOILERPLATE' => 1, + '_LT_PREPARE_SED_QUOTE_VARS' => 1, 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1, - 'gl_PREREQ_ARGZ' => 1, 'GMP_INIT' => 1, - 'GMP_GCC_NO_CPP_PRECOMP' => 1, + 'gl_PREREQ_ARGZ' => 1, 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1, - 'LT_SYS_MODULE_EXT' => 1, + 'GMP_GCC_NO_CPP_PRECOMP' => 1, 'LT_PROG_RC' => 1, + 'LT_SYS_MODULE_EXT' => 1, 'GMP_ASM_COFF_TYPE' => 1, 'GMP_ASM_X86_MCOUNT' => 1, '_LT_PATH_TOOL_PREFIX' => 1, 'AC_LIBTOOL_RC' => 1, - 'AC_DISABLE_FAST_INSTALL' => 1, 'AM_SILENT_RULES' => 1, - '_LT_AC_SYS_LIBPATH_AIX' => 1, - 'GMP_HEADER_ALLOCA' => 1, + 'AC_DISABLE_FAST_INSTALL' => 1, 'include' => 1, + 'GMP_HEADER_ALLOCA' => 1, + '_LT_AC_SYS_LIBPATH_AIX' => 1, 'GMP_ASM_TYPE' => 1, - 'AM_ENABLE_SHARED' => 1, 'GMP_SUBST_CHECK_HEADERS' => 1, + 'AM_ENABLE_SHARED' => 1, 'GMP_ASM_GLOBL' => 1, 'AM_C_PROTOTYPES' => 1, - 'AC_ENABLE_STATIC' => 1, + '_LT_REQUIRED_DARWIN_CHECKS' => 1, 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1, + 'AC_ENABLE_STATIC' => 1, 'AC_LIBTOOL_LANG_F77_CONFIG' => 1, 'AM_CONDITIONAL' => 1, 'GMP_H_ANSI' => 1, - 'LTDL_INIT' => 1, 'LTVERSION_VERSION' => 1, + '_LT_PROG_CXX' => 1, + '_LT_PROG_F77' => 1, + 'LTDL_INIT' => 1, 'AM_PROG_INSTALL_SH' => 1, 'AC_PROG_EGREP' => 1, 'AC_PATH_MAGIC' => 1, 'AC_LTDL_SYSSEARCHPATH' => 1, 'm4_pattern_forbid' => 1, - '_LT_LINKER_OPTION' => 1, 'GMP_PROG_CPP_FOR_BUILD' => 1, + '_LT_LINKER_OPTION' => 1, 'AC_LIBTOOL_COMPILER_OPTION' => 1, 'GMP_GCC_ARM_UMODSI' => 1, 'AC_DISABLE_SHARED' => 1, @@ -267,16 +274,17 @@ 'GMP_ASM_X86_MMX' => 1, 'GMP_COMPARE_GE_INTERNAL' => 1, 'GMP_ASM_RODATA' => 1, - 'AC_LIBTOOL_CXX' => 1, 'LT_AC_PROG_RC' => 1, - 'LT_INIT' => 1, + 'AC_LIBTOOL_CXX' => 1, 'GMP_CHECK_LIBM_FOR_BUILD' => 1, + 'LT_INIT' => 1, 'AM_DEP_TRACK' => 1, - 'GMP_PROG_CXX_WORKS_PART' => 1, 'GMP_ASM_ALIGN_LOG' => 1, + 'GMP_PROG_CXX_WORKS_PART' => 1, 'GMP_ASM_UNDERSCORE' => 1, 'GMP_ASM_GLOBL_ATTR' => 1, 'LT_AC_PROG_EGREP' => 1, + '_LT_PROG_FC' => 1, '_AM_DEPENDENCIES' => 1, 'AC_LIBTOOL_LANG_C_CONFIG' => 1, 'LTOPTIONS_VERSION' => 1, @@ -289,8 +297,8 @@ 'GMP_C_FOR_BUILD_ANSI' => 1, '_GMP_SUBST_CHECK_FUNCS' => 1, 'LT_SYS_MODULE_PATH' => 1, - 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, 'LT_WITH_LTDL' => 1, + 'AC_LIBTOOL_POSTDEP_PREDEP' => 1, '_LT_AC_LANG_F77_CONFIG' => 1, 'AM_RUN_LOG' => 1, 'AC_LIBTOOL_PICMODE' => 1, @@ -300,8 +308,8 @@ 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1, 'GMP_PROG_CC_IS_XLC' => 1, 'GMP_C_ATTRIBUTE_MALLOC' => 1, - 'GMP_ASM_TEXT' => 1, - 'GMP_SUBST_CHECK_FUNCS' => 1 + 'GMP_SUBST_CHECK_FUNCS' => 1, + 'GMP_ASM_TEXT' => 1 } ], 'Autom4te::Request' ), bless( [ @@ -328,6 +336,7 @@ 'AC_CANONICAL_HOST' => 1, 'AC_PROG_LIBTOOL' => 1, 'AM_INIT_AUTOMAKE' => 1, + 'AM_PATH_GUILE' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'LT_CONFIG_LTDL_DIR' => 1, @@ -336,15 +345,20 @@ 'm4_sinclude' => 1, 'LT_SUPPORTED_TAG' => 1, 'AM_MAINTAINER_MODE' => 1, + 'AM_NLS' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, + 'AM_MAKEFILE_INCLUDE' => 1, '_m4_warn' => 1, 'AM_PROG_CXX_C_O' => 1, '_AM_COND_ENDIF' => 1, + '_AM_MAKEFILE_INCLUDE' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AM_SILENT_RULES' => 1, + 'AM_PROG_MOC' => 1, 'AC_CONFIG_FILES' => 1, 'LT_INIT' => 1, 'include' => 1, + 'AM_PROG_AR' => 1, 'AM_GNU_GETTEXT' => 1, 'AC_LIBSOURCE' => 1, 'AM_PROG_FC_C_O' => 1, @@ -354,12 +368,14 @@ '_AM_SUBST_NOTMAKE' => 1, 'AC_CONFIG_AUX_DIR' => 1, 'sinclude' => 1, - 'm4_pattern_allow' => 1, 'AM_PROG_CC_C_O' => 1, + 'm4_pattern_allow' => 1, + 'AM_XGETTEXT_OPTION' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_CONDITIONAL' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, + 'AM_POT_TOOLS' => 1, 'm4_include' => 1, '_AM_COND_ELSE' => 1, 'AC_SUBST_TRACE' => 1 diff -Nru gmp-4.3.2+dfsg/autom4te.cache/traces.0 gmp-5.0.2+dfsg/autom4te.cache/traces.0 --- gmp-4.3.2+dfsg/autom4te.cache/traces.0 2010-01-09 06:26:11.000000000 +0000 +++ gmp-5.0.2+dfsg/autom4te.cache/traces.0 2011-08-30 01:19:28.000000000 +0000 @@ -54,7 +54,7 @@ ;; #( *) lt_cv_sys_argz_works=yes ;; esac]]) - AS_IF([test $lt_cv_sys_argz_works = yes], + AS_IF([test "$lt_cv_sys_argz_works" = yes], [AC_DEFINE([HAVE_WORKING_ARGZ], 1, [This value is set to 1 to indicate that the system argz facility works])], [ARGZ_H=argz.h @@ -63,7 +63,8 @@ AC_SUBST([ARGZ_H]) ]) m4trace:/usr/share/aclocal/argz.m4:79: -1- AC_DEFUN([gl_PREREQ_ARGZ], [:]) -m4trace:/usr/share/aclocal/libtool.m4:67: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +m4trace:/usr/share/aclocal/libtool.m4:69: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT +AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl @@ -80,6 +81,8 @@ AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl +_LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) + dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) @@ -95,30 +98,21 @@ # Only expand once: m4_define([LT_INIT]) ]) -m4trace:/usr/share/aclocal/libtool.m4:102: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:102: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:107: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:107: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:103: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:103: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:108: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:108: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_INIT], [LT_INIT($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:562: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} +m4trace:/usr/share/aclocal/libtool.m4:607: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) -cat >"$CONFIG_LT" <<_LTEOF -#! $SHELL -# Generated by $as_me. -# Run this file to recreate a libtool stub with the current configuration. - -lt_cl_silent=false -SHELL=\${CONFIG_SHELL-$SHELL} -_LTEOF +_LT_GENERATED_FILE_INIT(["$CONFIG_LT"], +[# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF -AS_SHELL_SANITIZE -_AS_PREPARE - -exec AS_MESSAGE_FD>&1 +lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo @@ -144,7 +138,7 @@ m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. -Copyright (C) 2008 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." @@ -189,18 +183,16 @@ # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. -if test "$no_create" != yes; then - lt_cl_success=: - test "$silent" = yes && - lt_config_lt_args="$lt_config_lt_args --quiet" - exec AS_MESSAGE_LOG_FD>/dev/null - $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false - exec AS_MESSAGE_LOG_FD>>config.log - $lt_cl_success || AS_EXIT(1) -fi +lt_cl_success=: +test "$silent" = yes && + lt_config_lt_args="$lt_config_lt_args --quiet" +exec AS_MESSAGE_LOG_FD>/dev/null +$SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false +exec AS_MESSAGE_LOG_FD>>config.log +$lt_cl_success || AS_EXIT(1) ]) -m4trace:/usr/share/aclocal/libtool.m4:757: -1- AC_DEFUN([LT_SUPPORTED_TAG], []) -m4trace:/usr/share/aclocal/libtool.m4:768: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl +m4trace:/usr/share/aclocal/libtool.m4:788: -1- AC_DEFUN([LT_SUPPORTED_TAG], []) +m4trace:/usr/share/aclocal/libtool.m4:799: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], @@ -212,23 +204,56 @@ [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ]) -m4trace:/usr/share/aclocal/libtool.m4:830: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) -m4trace:/usr/share/aclocal/libtool.m4:830: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:861: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) +m4trace:/usr/share/aclocal/libtool.m4:861: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete. You should run autoupdate.])dnl LT_LANG(C++)]) -m4trace:/usr/share/aclocal/libtool.m4:831: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) -m4trace:/usr/share/aclocal/libtool.m4:831: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:862: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) +m4trace:/usr/share/aclocal/libtool.m4:862: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete. You should run autoupdate.])dnl LT_LANG(Fortran 77)]) -m4trace:/usr/share/aclocal/libtool.m4:832: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) -m4trace:/usr/share/aclocal/libtool.m4:832: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:863: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) +m4trace:/usr/share/aclocal/libtool.m4:863: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete. You should run autoupdate.])dnl LT_LANG(Fortran)]) -m4trace:/usr/share/aclocal/libtool.m4:833: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) -m4trace:/usr/share/aclocal/libtool.m4:833: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:864: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) +m4trace:/usr/share/aclocal/libtool.m4:864: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete. You should run autoupdate.])dnl LT_LANG(Java)]) -m4trace:/usr/share/aclocal/libtool.m4:1402: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4trace:/usr/share/aclocal/libtool.m4:865: -1- AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) +m4trace:/usr/share/aclocal/libtool.m4:865: -1- AC_DEFUN([AC_LIBTOOL_RC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_RC' is obsolete. +You should run autoupdate.])dnl +LT_LANG(Windows Resource)]) +m4trace:/usr/share/aclocal/libtool.m4:1181: -1- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) +AC_ARG_WITH([sysroot], +[ --with-sysroot[=DIR] Search for dependent libraries within DIR + (or the compiler's sysroot if not specified).], +[], [with_sysroot=no]) + +dnl lt_sysroot will always be passed unquoted. We quote it here +dnl in case the user passed a directory name. +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + AC_MSG_RESULT([${with_sysroot}]) + AC_MSG_ERROR([The sysroot must be an absolute path.]) + ;; +esac + + AC_MSG_RESULT([${lt_sysroot:-no}]) +_LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl +[dependent libraries, and in which our libraries should be installed.])]) +m4trace:/usr/share/aclocal/libtool.m4:1445: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no @@ -244,15 +269,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD - echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -267,11 +292,11 @@ m4_if([$6], , :, [$6]) fi ]) -m4trace:/usr/share/aclocal/libtool.m4:1444: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1444: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:1487: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1487: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1453: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl +m4trace:/usr/share/aclocal/libtool.m4:1496: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no @@ -284,7 +309,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes @@ -303,11 +328,11 @@ m4_if([$5], , :, [$5]) fi ]) -m4trace:/usr/share/aclocal/libtool.m4:1488: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1488: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:1531: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1531: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1495: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4trace:/usr/share/aclocal/libtool.m4:1538: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl @@ -341,6 +366,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -405,8 +435,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -432,11 +462,11 @@ _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ]) -m4trace:/usr/share/aclocal/libtool.m4:1623: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1623: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:1671: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1671: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1724: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl +m4trace:/usr/share/aclocal/libtool.m4:1782: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown @@ -550,11 +580,11 @@ _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ]) -m4trace:/usr/share/aclocal/libtool.m4:1841: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:1841: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:1899: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:1899: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:2741: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl +m4trace:/usr/share/aclocal/libtool.m4:2884: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in @@ -613,15 +643,16 @@ _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ]) -m4trace:/usr/share/aclocal/libtool.m4:2803: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:2803: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:2946: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:2946: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:2826: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl +m4trace:/usr/share/aclocal/libtool.m4:2969: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl +m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], @@ -702,15 +733,15 @@ _LT_TAGDECL([], [LD], [1], [The linker used to build libraries]) ]) -m4trace:/usr/share/aclocal/libtool.m4:2914: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:2914: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3058: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3058: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:2915: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:2915: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3059: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3059: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3179: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl +m4trace:/usr/share/aclocal/libtool.m4:3353: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. @@ -759,7 +790,19 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :) + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -772,31 +815,31 @@ AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD - (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD) + (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ]) -m4trace:/usr/share/aclocal/libtool.m4:3257: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3257: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3443: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3443: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3258: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3258: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3444: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3444: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3267: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4trace:/usr/share/aclocal/libtool.m4:3514: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) @@ -809,28 +852,28 @@ esac AC_SUBST([LIBM]) ]) -m4trace:/usr/share/aclocal/libtool.m4:3286: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:3286: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:3533: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:3533: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:6987: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], +m4trace:/usr/share/aclocal/libtool.m4:7498: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) -m4trace:/usr/share/aclocal/libtool.m4:6996: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:6996: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:7507: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:7507: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7003: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) +m4trace:/usr/share/aclocal/libtool.m4:7514: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) -m4trace:/usr/share/aclocal/libtool.m4:7008: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7008: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:7519: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:7519: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7119: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) -m4trace:/usr/share/aclocal/libtool.m4:7119: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. +m4trace:/usr/share/aclocal/libtool.m4:7639: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) +m4trace:/usr/share/aclocal/libtool.m4:7639: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])]) m4trace:/usr/share/aclocal/ltdl.m4:16: -1- AC_DEFUN([LT_CONFIG_LTDL_DIR], [AC_BEFORE([$0], [LTDL_INIT]) @@ -1047,13 +1090,19 @@ AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])]) AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])]) +m4_pattern_allow([LT_LIBEXT])dnl AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension]) +name= +eval "lt_libprefix=\"$libname_spec\"" +m4_pattern_allow([LT_LIBPREFIX])dnl +AC_DEFINE_UNQUOTED([LT_LIBPREFIX],["$lt_libprefix"],[The archive prefix]) + name=ltdl -LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""` +eval "LTDLOPEN=\"$libname_spec\"" AC_SUBST([LTDLOPEN]) ]) -m4trace:/usr/share/aclocal/ltdl.m4:437: -1- AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4trace:/usr/share/aclocal/ltdl.m4:443: -1- AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_CACHE_CHECK([whether deplibs are loaded by dlopen], [lt_cv_sys_dlopen_deplibs], [# PORTME does your system automatically load deplibs for dlopen? @@ -1149,11 +1198,11 @@ [Define if the OS needs help to load dependent libraries for dlopen().]) fi ]) -m4trace:/usr/share/aclocal/ltdl.m4:536: -1- AU_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:536: -1- AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYS_DLOPEN_DEPLIBS' is obsolete. +m4trace:/usr/share/aclocal/ltdl.m4:542: -1- AU_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])]) +m4trace:/usr/share/aclocal/ltdl.m4:542: -1- AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYS_DLOPEN_DEPLIBS' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:543: -1- AC_DEFUN([LT_SYS_MODULE_EXT], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl +m4trace:/usr/share/aclocal/ltdl.m4:549: -1- AC_DEFUN([LT_SYS_MODULE_EXT], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which extension is used for runtime loadable modules], [libltdl_cv_shlibext], [ @@ -1166,11 +1215,11 @@ [Define to the extension used for runtime loadable modules, say, ".so".]) fi ]) -m4trace:/usr/share/aclocal/ltdl.m4:559: -1- AU_DEFUN([AC_LTDL_SHLIBEXT], [m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:559: -1- AC_DEFUN([AC_LTDL_SHLIBEXT], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBEXT' is obsolete. +m4trace:/usr/share/aclocal/ltdl.m4:565: -1- AU_DEFUN([AC_LTDL_SHLIBEXT], [m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])]) +m4trace:/usr/share/aclocal/ltdl.m4:565: -1- AC_DEFUN([AC_LTDL_SHLIBEXT], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBEXT' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:566: -1- AC_DEFUN([LT_SYS_MODULE_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl +m4trace:/usr/share/aclocal/ltdl.m4:572: -1- AC_DEFUN([LT_SYS_MODULE_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([which variable specifies run-time module search path], [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"]) if test -n "$lt_cv_module_path_var"; then @@ -1179,11 +1228,11 @@ [Define to the name of the environment variable that determines the run-time module search path.]) fi ]) -m4trace:/usr/share/aclocal/ltdl.m4:578: -1- AU_DEFUN([AC_LTDL_SHLIBPATH], [m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:578: -1- AC_DEFUN([AC_LTDL_SHLIBPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBPATH' is obsolete. +m4trace:/usr/share/aclocal/ltdl.m4:584: -1- AU_DEFUN([AC_LTDL_SHLIBPATH], [m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])]) +m4trace:/usr/share/aclocal/ltdl.m4:584: -1- AC_DEFUN([AC_LTDL_SHLIBPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBPATH' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:585: -1- AC_DEFUN([LT_SYS_DLSEARCH_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl +m4trace:/usr/share/aclocal/ltdl.m4:591: -1- AC_DEFUN([LT_SYS_DLSEARCH_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl AC_CACHE_CHECK([for the default library search path], [lt_cv_sys_dlsearch_path], [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"]) @@ -1201,11 +1250,11 @@ [Define to the system default library search path.]) fi ]) -m4trace:/usr/share/aclocal/ltdl.m4:606: -1- AU_DEFUN([AC_LTDL_SYSSEARCHPATH], [m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:606: -1- AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYSSEARCHPATH' is obsolete. +m4trace:/usr/share/aclocal/ltdl.m4:612: -1- AU_DEFUN([AC_LTDL_SYSSEARCHPATH], [m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])]) +m4trace:/usr/share/aclocal/ltdl.m4:612: -1- AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYSSEARCHPATH' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:632: -1- AC_DEFUN([LT_LIB_DLLOAD], [m4_pattern_allow([^LT_DLLOADERS$]) +m4trace:/usr/share/aclocal/ltdl.m4:638: -1- AC_DEFUN([LT_LIB_DLLOAD], [m4_pattern_allow([^LT_DLLOADERS$]) LT_DLLOADERS= AC_SUBST([LT_DLLOADERS]) @@ -1295,11 +1344,11 @@ AC_LANG_POP ]) -m4trace:/usr/share/aclocal/ltdl.m4:725: -1- AU_DEFUN([AC_LTDL_DLLIB], [m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:725: -1- AC_DEFUN([AC_LTDL_DLLIB], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLLIB' is obsolete. +m4trace:/usr/share/aclocal/ltdl.m4:731: -1- AU_DEFUN([AC_LTDL_DLLIB], [m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])]) +m4trace:/usr/share/aclocal/ltdl.m4:731: -1- AC_DEFUN([AC_LTDL_DLLIB], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLLIB' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:733: -1- AC_DEFUN([LT_SYS_SYMBOL_USCORE], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl +m4trace:/usr/share/aclocal/ltdl.m4:739: -1- AC_DEFUN([LT_SYS_SYMBOL_USCORE], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl AC_CACHE_CHECK([for _ prefix in compiled symbols], [lt_cv_sys_symbol_underscore], [lt_cv_sys_symbol_underscore=no @@ -1333,11 +1382,11 @@ sys_symbol_underscore=$lt_cv_sys_symbol_underscore AC_SUBST([sys_symbol_underscore]) ]) -m4trace:/usr/share/aclocal/ltdl.m4:770: -1- AU_DEFUN([AC_LTDL_SYMBOL_USCORE], [m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:770: -1- AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYMBOL_USCORE' is obsolete. +m4trace:/usr/share/aclocal/ltdl.m4:776: -1- AU_DEFUN([AC_LTDL_SYMBOL_USCORE], [m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])]) +m4trace:/usr/share/aclocal/ltdl.m4:776: -1- AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYMBOL_USCORE' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:777: -1- AC_DEFUN([LT_FUNC_DLSYM_USCORE], [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl +m4trace:/usr/share/aclocal/ltdl.m4:783: -1- AC_DEFUN([LT_FUNC_DLSYM_USCORE], [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl if test x"$lt_cv_sys_symbol_underscore" = xyes; then if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then @@ -1359,30 +1408,30 @@ [Define if dlsym() requires a leading underscore in symbol names.]) fi ]) -m4trace:/usr/share/aclocal/ltdl.m4:802: -1- AU_DEFUN([AC_LTDL_DLSYM_USCORE], [m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])]) -m4trace:/usr/share/aclocal/ltdl.m4:802: -1- AC_DEFUN([AC_LTDL_DLSYM_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLSYM_USCORE' is obsolete. +m4trace:/usr/share/aclocal/ltdl.m4:808: -1- AU_DEFUN([AC_LTDL_DLSYM_USCORE], [m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])]) +m4trace:/usr/share/aclocal/ltdl.m4:808: -1- AC_DEFUN([AC_LTDL_DLSYM_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLSYM_USCORE' is obsolete. You should run autoupdate.])dnl m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])]) -m4trace:/usr/share/aclocal/ltoptions.m4:13: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) -m4trace:/usr/share/aclocal/ltoptions.m4:110: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) +m4trace:/usr/share/aclocal/ltoptions.m4:14: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) +m4trace:/usr/share/aclocal/ltoptions.m4:111: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:110: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:111: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete. You should run autoupdate.])dnl _LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:145: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl +m4trace:/usr/share/aclocal/ltoptions.m4:146: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:145: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:146: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. You should run autoupdate.])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) @@ -1390,60 +1439,60 @@ [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:194: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) +m4trace:/usr/share/aclocal/ltoptions.m4:195: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:198: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) +m4trace:/usr/share/aclocal/ltoptions.m4:199: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:202: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:202: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:203: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:203: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete. You should run autoupdate.])dnl AC_ENABLE_SHARED($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:203: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:203: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:204: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:204: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete. You should run autoupdate.])dnl AC_DISABLE_SHARED($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:248: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) +m4trace:/usr/share/aclocal/ltoptions.m4:249: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:252: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) +m4trace:/usr/share/aclocal/ltoptions.m4:253: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:256: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:256: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:257: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:257: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete. You should run autoupdate.])dnl AC_ENABLE_STATIC($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:257: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:257: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:258: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +m4trace:/usr/share/aclocal/ltoptions.m4:258: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete. You should run autoupdate.])dnl AC_DISABLE_STATIC($@)]) -m4trace:/usr/share/aclocal/ltoptions.m4:302: -1- AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) +m4trace:/usr/share/aclocal/ltoptions.m4:303: -1- AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:302: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:303: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete. You should run autoupdate.])dnl _LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:309: -1- AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) +m4trace:/usr/share/aclocal/ltoptions.m4:310: -1- AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:309: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:310: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete. You should run autoupdate.])dnl _LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:342: -1- AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) +m4trace:/usr/share/aclocal/ltoptions.m4:343: -1- AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) -m4trace:/usr/share/aclocal/ltoptions.m4:342: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete. +m4trace:/usr/share/aclocal/ltoptions.m4:343: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete. You should run autoupdate.])dnl _LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], @@ -1451,8 +1500,8 @@ put the `pic-only' option into LT_INIT's first parameter.]) ]) m4trace:/usr/share/aclocal/ltsugar.m4:13: -1- AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) -m4trace:/usr/share/aclocal/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b' -macro_revision='1.3017' +m4trace:/usr/share/aclocal/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4' +macro_revision='1.3293' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) @@ -1491,26 +1540,29 @@ m4trace:/usr/share/aclocal/lt~obsolete.m4:77: -1- AC_DEFUN([_LT_AC_LANG_CXX]) m4trace:/usr/share/aclocal/lt~obsolete.m4:78: -1- AC_DEFUN([_LT_AC_LANG_F77]) m4trace:/usr/share/aclocal/lt~obsolete.m4:79: -1- AC_DEFUN([_LT_AC_LANG_GCJ]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:80: -1- AC_DEFUN([AC_LIBTOOL_RC]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:81: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:82: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:83: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:84: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:85: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:86: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:87: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:88: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:89: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:90: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:91: -1- AC_DEFUN([AC_LIBTOOL_CONFIG]) -m4trace:/usr/share/aclocal/lt~obsolete.m4:92: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:80: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:81: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:82: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:83: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:84: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:85: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:86: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:87: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:88: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:89: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:90: -1- AC_DEFUN([AC_LIBTOOL_CONFIG]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:91: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:93: -1- AC_DEFUN([_LT_AC_PROG_CXXCPP]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:96: -1- AC_DEFUN([_LT_PROG_F77]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:97: -1- AC_DEFUN([_LT_PROG_FC]) +m4trace:/usr/share/aclocal/lt~obsolete.m4:98: -1- AC_DEFUN([_LT_PROG_CXX]) m4trace:/usr/share/aclocal-1.11/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.11], [], +m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) -m4trace:/usr/share/aclocal-1.11/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11])dnl +m4trace:/usr/share/aclocal-1.11/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -2129,27 +2181,27 @@ AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) -m4trace:acinclude.m4:156: -1- AC_DEFUN([GMP_SUBST_CHECK_FUNCS], [m4_if([$1],,, +m4trace:acinclude.m4:157: -1- AC_DEFUN([GMP_SUBST_CHECK_FUNCS], [m4_if([$1],,, [_GMP_SUBST_CHECK_FUNCS(ac_cv_func_[$1],HAVE_[]m4_translit([$1],[a-z],[A-Z])_01) GMP_SUBST_CHECK_FUNCS(m4_shift($@))])]) -m4trace:acinclude.m4:162: -1- AC_DEFUN([_GMP_SUBST_CHECK_FUNCS], [case $[$1] in +m4trace:acinclude.m4:163: -1- AC_DEFUN([_GMP_SUBST_CHECK_FUNCS], [case $[$1] in yes) AC_SUBST([$2],1) ;; no) [$2]=0 ;; esac ]) -m4trace:acinclude.m4:174: -1- AC_DEFUN([GMP_SUBST_CHECK_HEADERS], [m4_if([$1],,, +m4trace:acinclude.m4:175: -1- AC_DEFUN([GMP_SUBST_CHECK_HEADERS], [m4_if([$1],,, [_GMP_SUBST_CHECK_HEADERS(ac_cv_header_[]m4_translit([$1],[./],[__]), HAVE_[]m4_translit([$1],[a-z./],[A-Z__])_01) GMP_SUBST_CHECK_HEADERS(m4_shift($@))])]) -m4trace:acinclude.m4:181: -1- AC_DEFUN([_GMP_SUBST_CHECK_HEADERS], [case $[$1] in +m4trace:acinclude.m4:182: -1- AC_DEFUN([_GMP_SUBST_CHECK_HEADERS], [case $[$1] in yes) AC_SUBST([$2],1) ;; no) [$2]=0 ;; esac ]) -m4trace:acinclude.m4:204: -1- AC_DEFUN([GMP_COMPARE_GE], [gmp_compare_ge=no +m4trace:acinclude.m4:205: -1- AC_DEFUN([GMP_COMPARE_GE], [gmp_compare_ge=no GMP_COMPARE_GE_INTERNAL($@) ]) -m4trace:acinclude.m4:209: -1- AC_DEFUN([GMP_COMPARE_GE_INTERNAL], [ifelse(len([$3]),0, +m4trace:acinclude.m4:210: -1- AC_DEFUN([GMP_COMPARE_GE_INTERNAL], [ifelse(len([$3]),0, [if test -n "$1" && test "$1" -ge $2; then gmp_compare_ge=yes fi], @@ -2163,7 +2215,7 @@ fi fi]) ]) -m4trace:acinclude.m4:259: -1- AC_DEFUN([GMP_PROG_AR], [dnl Want to establish $AR before libtool initialization. +m4trace:acinclude.m4:260: -1- AC_DEFUN([GMP_PROG_AR], [dnl Want to establish $AR before libtool initialization. AC_BEFORE([$0],[AC_PROG_LIBTOOL]) gmp_user_AR=$AR AC_CHECK_TOOL(AR, ar, ar) @@ -2182,7 +2234,7 @@ AR_FLAGS=cq fi ]) -m4trace:acinclude.m4:291: -1- AC_DEFUN([GMP_PROG_M4], [AC_ARG_VAR(M4,[m4 macro processor]) +m4trace:acinclude.m4:292: -1- AC_DEFUN([GMP_PROG_M4], [AC_ARG_VAR(M4,[m4 macro processor]) AC_CACHE_CHECK([for suitable m4], gmp_cv_prog_m4, [if test -n "$M4"; then @@ -2231,7 +2283,7 @@ M4="$gmp_cv_prog_m4" AC_SUBST(M4) ]) -m4trace:acinclude.m4:359: -1- AC_DEFUN([GMP_M4_M4WRAP_SPURIOUS], [AC_REQUIRE([GMP_PROG_M4]) +m4trace:acinclude.m4:360: -1- AC_DEFUN([GMP_M4_M4WRAP_SPURIOUS], [AC_REQUIRE([GMP_PROG_M4]) AC_CACHE_CHECK([if m4wrap produces spurious output], gmp_cv_m4_m4wrap_spurious, [# hide the d-n-l from autoconf's error checking @@ -2252,7 +2304,7 @@ ]) GMP_DEFINE_RAW(["define(,<$gmp_cv_m4_m4wrap_spurious>)"]) ]) -m4trace:acinclude.m4:403: -1- AC_DEFUN([GMP_PROG_NM], [dnl Make sure we're the first to call AC_PROG_NM, so our extra flags are +m4trace:acinclude.m4:404: -1- AC_DEFUN([GMP_PROG_NM], [dnl Make sure we're the first to call AC_PROG_NM, so our extra flags are dnl used by everyone. AC_BEFORE([$0],[AC_PROG_NM]) gmp_user_NM=$NM @@ -2284,7 +2336,7 @@ fi fi ]) -m4trace:acinclude.m4:460: -1- AC_DEFUN([GMP_PROG_CC_WORKS], [AC_MSG_CHECKING([compiler $1]) +m4trace:acinclude.m4:461: -1- AC_DEFUN([GMP_PROG_CC_WORKS], [AC_MSG_CHECKING([compiler $1]) gmp_prog_cc_works=yes # first see a simple "main()" works, then go on to other checks @@ -2585,16 +2637,16 @@ ;; esac ]) -m4trace:acinclude.m4:766: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART], [GMP_PROG_CC_WORKS_PART_MAIN([$1],[$2], +m4trace:acinclude.m4:767: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART], [GMP_PROG_CC_WORKS_PART_MAIN([$1],[$2], [$3] [int main () { return 0; }]) ]) -m4trace:acinclude.m4:775: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART_MAIN], [GMP_PROG_CC_WORKS_PART_TEST([$1],[$2],[$3], +m4trace:acinclude.m4:776: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART_MAIN], [GMP_PROG_CC_WORKS_PART_TEST([$1],[$2],[$3], [], gmp_prog_cc_works="no[]m4_if([$2],,,[[, ]])[$2]", gmp_prog_cc_works="no[]m4_if([$2],,,[[, ]])[$2][[, program does not run]]") ]) -m4trace:acinclude.m4:785: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART_TEST], [if test "$gmp_prog_cc_works" = yes; then +m4trace:acinclude.m4:786: -1- AC_DEFUN([GMP_PROG_CC_WORKS_PART_TEST], [if test "$gmp_prog_cc_works" = yes; then # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c <conftest.c <&AC_FD_CC +m4trace:acinclude.m4:873: -1- AC_DEFUN([GMP_C_TEST_SIZEOF], [echo "configure: testlist $2" >&AC_FD_CC [gmp_sizeof_type=`echo "$2" | sed 's/sizeof-\([a-z]*\).*/\1/'`] [gmp_sizeof_want=`echo "$2" | sed 's/sizeof-[a-z]*-\([0-9]*\).*/\1/'`] AC_MSG_CHECKING([compiler $1 has sizeof($gmp_sizeof_type)==$gmp_sizeof_want]) @@ -2679,7 +2731,7 @@ ifelse([$4],,:,[$4]) fi ]) -m4trace:acinclude.m4:909: -1- AC_DEFUN([GMP_PROG_CC_IS_GNU], [cat >conftest.c <conftest.c <&AC_FD_CC +m4trace:acinclude.m4:977: -1- AC_DEFUN([GMP_PROG_CC_X86_GOT_EAX_EMITTED], [echo "Testing gcc GOT with eax emitted" >&AC_FD_CC cat >conftest.c <<\EOF [int foo; int bar () { return foo; } @@ -2724,7 +2776,7 @@ ifelse([$3],,:,[$3]) fi ]) -m4trace:acinclude.m4:1006: -1- AC_DEFUN([GMP_HPC_HPPA_2_0], [AC_MSG_CHECKING([whether HP compiler $1 is good for 64-bits]) +m4trace:acinclude.m4:1007: -1- AC_DEFUN([GMP_HPC_HPPA_2_0], [AC_MSG_CHECKING([whether HP compiler $1 is good for 64-bits]) # Bad compiler output: # ccom: HP92453-01 G.10.32.05 HP C Compiler # Good compiler output: @@ -2751,7 +2803,7 @@ ifelse([$3],,:,[$3]) fi ]) -m4trace:acinclude.m4:1047: -1- AC_DEFUN([GMP_GCC_ARM_UMODSI], [AC_MSG_CHECKING([whether ARM gcc unsigned division works]) +m4trace:acinclude.m4:1048: -1- AC_DEFUN([GMP_GCC_ARM_UMODSI], [AC_MSG_CHECKING([whether ARM gcc unsigned division works]) tmp_version=`$1 --version` echo "$tmp_version" >&AC_FD_CC case $tmp_version in @@ -2764,7 +2816,7 @@ esac AC_MSG_RESULT([$gmp_gcc_arm_umodsi_result]) ]) -m4trace:acinclude.m4:1072: -1- AC_DEFUN([GMP_GCC_MIPS_O32], [AC_MSG_CHECKING([whether gcc supports o32]) +m4trace:acinclude.m4:1073: -1- AC_DEFUN([GMP_GCC_MIPS_O32], [AC_MSG_CHECKING([whether gcc supports o32]) echo 'int x;' >conftest.c echo "$1 -mabi=32 -c conftest.c" >&AC_FD_CC if $1 -mabi=32 -c conftest.c >conftest.out 2>&1; then @@ -2785,7 +2837,7 @@ ifelse([$3],,:,[$3]) fi ]) -m4trace:acinclude.m4:1107: -1- AC_DEFUN([GMP_GCC_NO_CPP_PRECOMP], [if test "$ccbase" = gcc; then +m4trace:acinclude.m4:1108: -1- AC_DEFUN([GMP_GCC_NO_CPP_PRECOMP], [if test "$ccbase" = gcc; then AC_MSG_CHECKING([compiler $2 $3 -no-cpp-precomp]) result=no cat >conftest.c <conftest.c <conftest.c <conftest.s <conftest.cc <>$gmp_tmpconfigm4i ]) -m4trace:acinclude.m4:1529: -1- AC_DEFUN([GMP_FINISH], [AC_REQUIRE([GMP_INIT]) +m4trace:acinclude.m4:1530: -1- AC_DEFUN([GMP_FINISH], [AC_REQUIRE([GMP_INIT]) echo "creating $gmp_configm4" echo ["d""nl $gmp_configm4. Generated automatically by configure."] > $gmp_configm4 if test -f $gmp_tmpconfigm4; then @@ -3053,17 +3105,17 @@ echo ["')"] >> $gmp_configm4 echo ["define(\`__CONFIG_M4_INCLUDED__')"] >> $gmp_configm4 ]) -m4trace:acinclude.m4:1563: -1- AC_DEFUN([GMP_INCLUDE_MPN], [AC_REQUIRE([GMP_INIT]) +m4trace:acinclude.m4:1564: -1- AC_DEFUN([GMP_INCLUDE_MPN], [AC_REQUIRE([GMP_INIT]) echo ["include_mpn(\`$1')"] >> $gmp_tmpconfigm4i ]) -m4trace:acinclude.m4:1579: -1- AC_DEFUN([GMP_DEFINE], [AC_REQUIRE([GMP_INIT]) +m4trace:acinclude.m4:1580: -1- AC_DEFUN([GMP_DEFINE], [AC_REQUIRE([GMP_INIT]) echo ['define(<$1>, <$2>)'] >>ifelse([$3], [POST], $gmp_tmpconfigm4p, $gmp_tmpconfigm4) ]) -m4trace:acinclude.m4:1594: -1- AC_DEFUN([GMP_DEFINE_RAW], [AC_REQUIRE([GMP_INIT]) +m4trace:acinclude.m4:1595: -1- AC_DEFUN([GMP_DEFINE_RAW], [AC_REQUIRE([GMP_INIT]) echo [$1] >> ifelse([$2], [POST], $gmp_tmpconfigm4p, $gmp_tmpconfigm4) ]) -m4trace:acinclude.m4:1612: -1- AC_DEFUN([GMP_TRY_ASSEMBLE], [cat >conftest.s <conftest.s <, <$gmp_cv_asm_label_suffix>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:1708: -1- AC_DEFUN([GMP_ASM_UNDERSCORE], [AC_REQUIRE([GMP_PROG_NM]) +m4trace:acinclude.m4:1709: -1- AC_DEFUN([GMP_ASM_UNDERSCORE], [AC_REQUIRE([GMP_PROG_NM]) AC_CACHE_CHECK([if globals are prefixed by underscore], gmp_cv_asm_underscore, [gmp_cv_asm_underscore="unknown" @@ -3164,7 +3216,7 @@ ;; esac ]) -m4trace:acinclude.m4:1758: -1- AC_DEFUN([GMP_ASM_ALIGN_LOG], [AC_REQUIRE([GMP_ASM_GLOBL]) +m4trace:acinclude.m4:1759: -1- AC_DEFUN([GMP_ASM_ALIGN_LOG], [AC_REQUIRE([GMP_ASM_GLOBL]) AC_REQUIRE([GMP_ASM_BYTE]) AC_REQUIRE([GMP_ASM_DATA]) AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) @@ -3190,7 +3242,7 @@ GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_align_log>)"]) ]) -m4trace:acinclude.m4:1817: -1- AC_DEFUN([GMP_ASM_ALIGN_FILL_0x90], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:1818: -1- AC_DEFUN([GMP_ASM_ALIGN_FILL_0x90], [AC_REQUIRE([GMP_ASM_TEXT]) AC_CACHE_CHECK([if the .align directive accepts an 0x90 fill in .text], gmp_cv_asm_align_fill_0x90, [GMP_TRY_ASSEMBLE( @@ -3208,7 +3260,7 @@ GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_align_fill_0x90>)"]) ]) -m4trace:acinclude.m4:1846: -1- AC_DEFUN([GMP_ASM_BYTE], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:1847: -1- AC_DEFUN([GMP_ASM_BYTE], [AC_REQUIRE([GMP_ASM_TEXT]) AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) AC_CACHE_CHECK([for assembler byte directive], gmp_cv_asm_byte, @@ -3228,7 +3280,7 @@ fi ]) ]) -m4trace:acinclude.m4:1875: -1- AC_DEFUN([GMP_ASM_TEXT], [AC_CACHE_CHECK([how to switch to text section], +m4trace:acinclude.m4:1876: -1- AC_DEFUN([GMP_ASM_TEXT], [AC_CACHE_CHECK([how to switch to text section], gmp_cv_asm_text, [for i in ".text" ".code" [".csect .text[PR]"]; do echo "trying $i" >&AC_FD_CC @@ -3243,7 +3295,7 @@ ]) echo ["define(, <$gmp_cv_asm_text>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:1897: -1- AC_DEFUN([GMP_ASM_DATA], [AC_CACHE_CHECK([how to switch to data section], +m4trace:acinclude.m4:1898: -1- AC_DEFUN([GMP_ASM_DATA], [AC_CACHE_CHECK([how to switch to data section], gmp_cv_asm_data, [case $host in *-*-aix*) gmp_cv_asm_data=[".csect .data[RW]"] ;; @@ -3252,7 +3304,7 @@ ]) echo ["define(, <$gmp_cv_asm_data>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:1925: -1- AC_DEFUN([GMP_ASM_RODATA], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:1926: -1- AC_DEFUN([GMP_ASM_RODATA], [AC_REQUIRE([GMP_ASM_TEXT]) AC_REQUIRE([GMP_ASM_DATA]) AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) AC_REQUIRE([GMP_ASM_UNDERSCORE]) @@ -3269,7 +3321,8 @@ esac cat >conftest.c <&AC_FD_CC cat conftest.c >&AC_FD_CC @@ -3305,7 +3358,7 @@ ]) echo ["define(, <$gmp_cv_asm_rodata>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:1995: -1- AC_DEFUN([GMP_ASM_GLOBL], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:1997: -1- AC_DEFUN([GMP_ASM_GLOBL], [AC_REQUIRE([GMP_ASM_TEXT]) AC_CACHE_CHECK([for assembler global directive], gmp_cv_asm_globl, [case $host in @@ -3316,7 +3369,7 @@ ]) echo ["define(, <$gmp_cv_asm_globl>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:2013: -1- AC_DEFUN([GMP_ASM_GLOBL_ATTR], [AC_REQUIRE([GMP_ASM_GLOBL]) +m4trace:acinclude.m4:2015: -1- AC_DEFUN([GMP_ASM_GLOBL_ATTR], [AC_REQUIRE([GMP_ASM_GLOBL]) AC_CACHE_CHECK([for assembler global directive attribute], gmp_cv_asm_globl_attr, [case $gmp_cv_asm_globl in @@ -3326,7 +3379,7 @@ ]) echo ["define(, <$gmp_cv_asm_globl_attr>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:2045: -1- AC_DEFUN([GMP_ASM_TYPE], [AC_CACHE_CHECK([for assembler .type directive], +m4trace:acinclude.m4:2047: -1- AC_DEFUN([GMP_ASM_TYPE], [AC_CACHE_CHECK([for assembler .type directive], gmp_cv_asm_type, [gmp_cv_asm_type= for gmp_tmp_prefix in @ \# %; do @@ -3341,7 +3394,7 @@ ]) echo ["define(, <$gmp_cv_asm_type>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:2067: -1- AC_DEFUN([GMP_ASM_SIZE], [AC_CACHE_CHECK([for assembler .size directive], +m4trace:acinclude.m4:2069: -1- AC_DEFUN([GMP_ASM_SIZE], [AC_CACHE_CHECK([for assembler .size directive], gmp_cv_asm_size, [gmp_cv_asm_size= GMP_TRY_ASSEMBLE([ .size sym,1], @@ -3352,7 +3405,7 @@ ]) echo ["define(, <$gmp_cv_asm_size>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:2123: -1- AC_DEFUN([GMP_ASM_COFF_TYPE], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:2125: -1- AC_DEFUN([GMP_ASM_COFF_TYPE], [AC_REQUIRE([GMP_ASM_TEXT]) AC_REQUIRE([GMP_ASM_GLOBL]) AC_REQUIRE([GMP_ASM_GLOBL_ATTR]) AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) @@ -3373,7 +3426,7 @@ ]) echo ["define(, <$gmp_cv_asm_x86_coff_type>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:2180: -1- AC_DEFUN([GMP_ASM_LSYM_PREFIX], [AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) +m4trace:acinclude.m4:2182: -1- AC_DEFUN([GMP_ASM_LSYM_PREFIX], [AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) AC_REQUIRE([GMP_ASM_TEXT]) AC_REQUIRE([GMP_PROG_NM]) AC_CACHE_CHECK([for assembler local label prefix], @@ -3421,7 +3474,7 @@ AC_DEFINE_UNQUOTED(LSYM_PREFIX, "$gmp_cv_asm_lsym_prefix", [Assembler local label prefix]) ]) -m4trace:acinclude.m4:2239: -1- AC_DEFUN([GMP_ASM_W32], [AC_REQUIRE([GMP_ASM_DATA]) +m4trace:acinclude.m4:2241: -1- AC_DEFUN([GMP_ASM_W32], [AC_REQUIRE([GMP_ASM_DATA]) AC_REQUIRE([GMP_ASM_BYTE]) AC_REQUIRE([GMP_ASM_GLOBL]) AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) @@ -3462,7 +3515,7 @@ ]) echo ["define(, <$gmp_cv_asm_w32>)"] >> $gmp_tmpconfigm4 ]) -m4trace:acinclude.m4:2323: -1- AC_DEFUN([GMP_ASM_X86_GOT_UNDERSCORE], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:2325: -1- AC_DEFUN([GMP_ASM_X86_GOT_UNDERSCORE], [AC_REQUIRE([GMP_ASM_TEXT]) AC_REQUIRE([GMP_ASM_GLOBL]) AC_REQUIRE([GMP_ASM_GLOBL_ATTR]) AC_REQUIRE([GMP_ASM_LABEL_SUFFIX]) @@ -3501,7 +3554,7 @@ GMP_DEFINE(GOT_GSYM_PREFIX, []) fi ]) -m4trace:acinclude.m4:2405: -1- AC_DEFUN([GMP_ASM_X86_GOT_EAX_OK], [echo "Testing gas GOT with eax good" >&AC_FD_CC +m4trace:acinclude.m4:2407: -1- AC_DEFUN([GMP_ASM_X86_GOT_EAX_OK], [echo "Testing gas GOT with eax good" >&AC_FD_CC cat >conftest.awk <<\EOF [BEGIN { want[0] = "001" @@ -3574,7 +3627,7 @@ ifelse([$2],,:,[$2]) fi ]) -m4trace:acinclude.m4:2495: -1- AC_DEFUN([GMP_ASM_X86_MMX], [AC_CACHE_CHECK([if the assembler knows about MMX instructions], +m4trace:acinclude.m4:2497: -1- AC_DEFUN([GMP_ASM_X86_MMX], [AC_CACHE_CHECK([if the assembler knows about MMX instructions], gmp_cv_asm_x86_mmx, [GMP_TRY_ASSEMBLE( [ .text @@ -3620,7 +3673,7 @@ ifelse([$2],,:,[$2]) fi ]) -m4trace:acinclude.m4:2547: -1- AC_DEFUN([GMP_ASM_X86_SHLDL_CL], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:2549: -1- AC_DEFUN([GMP_ASM_X86_SHLDL_CL], [AC_REQUIRE([GMP_ASM_TEXT]) AC_CACHE_CHECK([if the assembler takes cl with shldl], gmp_cv_asm_x86_shldl_cl, [GMP_TRY_ASSEMBLE( @@ -3635,7 +3688,7 @@ GMP_DEFINE(WANT_SHLDL_CL,0) fi ]) -m4trace:acinclude.m4:2574: -1- AC_DEFUN([GMP_ASM_X86_SSE2], [AC_CACHE_CHECK([if the assembler knows about SSE2 instructions], +m4trace:acinclude.m4:2576: -1- AC_DEFUN([GMP_ASM_X86_SSE2], [AC_CACHE_CHECK([if the assembler knows about SSE2 instructions], gmp_cv_asm_x86_sse2, [GMP_TRY_ASSEMBLE( [ .text @@ -3659,7 +3712,7 @@ ;; esac ]) -m4trace:acinclude.m4:2637: -1- AC_DEFUN([GMP_ASM_X86_MCOUNT], [AC_REQUIRE([AC_ENABLE_SHARED]) +m4trace:acinclude.m4:2639: -1- AC_DEFUN([GMP_ASM_X86_MCOUNT], [AC_REQUIRE([AC_ENABLE_SHARED]) AC_REQUIRE([AC_PROG_LIBTOOL]) AC_MSG_CHECKING([how to call x86 mcount]) cat >conftest.c <conftest.awk <<\EOF [BEGIN { @@ -3815,7 +3868,7 @@ ]) GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_ia64_align_ok'>)"]) ]) -m4trace:acinclude.m4:2824: -1- AC_DEFUN([GMP_ASM_M68K_INSTRUCTION], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:2826: -1- AC_DEFUN([GMP_ASM_M68K_INSTRUCTION], [AC_REQUIRE([GMP_ASM_TEXT]) AC_CACHE_CHECK([assembler instruction and register style], gmp_cv_asm_m68k_instruction, [for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do @@ -3840,7 +3893,7 @@ GMP_DEFINE_RAW(["define(, <\`$want_register_percent'>)"]) GMP_DEFINE_RAW(["define(, <\`$want_dot_size'>)"]) ]) -m4trace:acinclude.m4:2855: -1- AC_DEFUN([GMP_ASM_M68K_ADDRESSING], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:2857: -1- AC_DEFUN([GMP_ASM_M68K_ADDRESSING], [AC_REQUIRE([GMP_ASM_TEXT]) AC_REQUIRE([GMP_ASM_M68K_INSTRUCTION]) AC_CACHE_CHECK([assembler addressing style], gmp_cv_asm_m68k_addressing, @@ -3866,7 +3919,7 @@ ]) GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_m68k_addressing'>)"]) ]) -m4trace:acinclude.m4:2892: -1- AC_DEFUN([GMP_ASM_M68K_BRANCHES], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:2894: -1- AC_DEFUN([GMP_ASM_M68K_BRANCHES], [AC_REQUIRE([GMP_ASM_TEXT]) AC_CACHE_CHECK([assembler shortest branches], gmp_cv_asm_m68k_branches, [for i in jra jbra bra; do @@ -3884,7 +3937,7 @@ ]) GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_m68k_branches'>)"]) ]) -m4trace:acinclude.m4:2931: -1- AC_DEFUN([GMP_ASM_POWERPC_PIC_ALWAYS], [AC_REQUIRE([AC_PROG_CC]) +m4trace:acinclude.m4:2933: -1- AC_DEFUN([GMP_ASM_POWERPC_PIC_ALWAYS], [AC_REQUIRE([AC_PROG_CC]) AC_CACHE_CHECK([whether compiler output is PIC by default], gmp_cv_asm_powerpc_pic, [gmp_cv_asm_powerpc_pic=yes @@ -3909,7 +3962,7 @@ ]) GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_powerpc_pic>)"]) ]) -m4trace:acinclude.m4:2968: -1- AC_DEFUN([GMP_ASM_POWERPC_R_REGISTERS], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:2970: -1- AC_DEFUN([GMP_ASM_POWERPC_R_REGISTERS], [AC_REQUIRE([GMP_ASM_TEXT]) AC_CACHE_CHECK([if the assembler needs r on registers], gmp_cv_asm_powerpc_r_registers, [GMP_TRY_ASSEMBLE( @@ -3924,7 +3977,7 @@ GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_powerpc_r_registers>)"]) ]) -m4trace:acinclude.m4:2993: -1- AC_DEFUN([GMP_ASM_SPARC_REGISTER], [AC_REQUIRE([GMP_ASM_TEXT]) +m4trace:acinclude.m4:2995: -1- AC_DEFUN([GMP_ASM_SPARC_REGISTER], [AC_REQUIRE([GMP_ASM_TEXT]) AC_CACHE_CHECK([if the assembler accepts ".register"], gmp_cv_asm_sparc_register, [GMP_TRY_ASSEMBLE( @@ -3936,7 +3989,7 @@ GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_sparc_register>)"]) ]) -m4trace:acinclude.m4:3011: -1- AC_DEFUN([GMP_C_ATTRIBUTE_CONST], [AC_CACHE_CHECK([whether gcc __attribute__ ((const)) works], +m4trace:acinclude.m4:3013: -1- AC_DEFUN([GMP_C_ATTRIBUTE_CONST], [AC_CACHE_CHECK([whether gcc __attribute__ ((const)) works], gmp_cv_c_attribute_const, [AC_TRY_COMPILE([int foo (int x) __attribute__ ((const));], , gmp_cv_c_attribute_const=yes, gmp_cv_c_attribute_const=no) @@ -3946,7 +3999,7 @@ [Define to 1 if the compiler accepts gcc style __attribute__ ((const))]) fi ]) -m4trace:acinclude.m4:3030: -1- AC_DEFUN([GMP_C_ATTRIBUTE_MALLOC], [AC_CACHE_CHECK([whether gcc __attribute__ ((malloc)) works], +m4trace:acinclude.m4:3032: -1- AC_DEFUN([GMP_C_ATTRIBUTE_MALLOC], [AC_CACHE_CHECK([whether gcc __attribute__ ((malloc)) works], gmp_cv_c_attribute_malloc, [cat >conftest.c < exists and works], +m4trace:acinclude.m4:3343: -1- AC_DEFUN([GMP_C_STDARG], [AC_CACHE_CHECK([whether exists and works], gmp_cv_c_stdarg, [AC_TRY_COMPILE( [#include @@ -4231,7 +4284,7 @@ AC_DEFINE(HAVE_STDARG, 1, [Define to 1 if exists and works]) fi ]) -m4trace:acinclude.m4:3370: -1- AC_DEFUN([GMP_FUNC_ALLOCA], [AC_REQUIRE([GMP_HEADER_ALLOCA]) +m4trace:acinclude.m4:3372: -1- AC_DEFUN([GMP_FUNC_ALLOCA], [AC_REQUIRE([GMP_HEADER_ALLOCA]) AC_CACHE_CHECK([for alloca (via gmp-impl.h)], gmp_cv_func_alloca, [AC_TRY_LINK( @@ -4245,7 +4298,7 @@ AC_DEFINE(HAVE_ALLOCA, 1, [Define to 1 if alloca() works (via gmp-impl.h).]) fi ]) -m4trace:acinclude.m4:3386: -1- AC_DEFUN([GMP_HEADER_ALLOCA], [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works +m4trace:acinclude.m4:3388: -1- AC_DEFUN([GMP_HEADER_ALLOCA], [# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! AC_CACHE_CHECK([for working alloca.h], gmp_cv_header_alloca, @@ -4258,7 +4311,7 @@ [Define to 1 if you have and it should be used (not on Ultrix).]) fi ]) -m4trace:acinclude.m4:3407: -1- AC_DEFUN([GMP_OPTION_ALLOCA], [AC_REQUIRE([GMP_FUNC_ALLOCA]) +m4trace:acinclude.m4:3409: -1- AC_DEFUN([GMP_OPTION_ALLOCA], [AC_REQUIRE([GMP_FUNC_ALLOCA]) AC_CACHE_CHECK([how to allocate temporary memory], gmp_cv_option_alloca, [case $enable_alloca in @@ -4315,7 +4368,7 @@ esac AC_SUBST(TAL_OBJECT) ]) -m4trace:acinclude.m4:3475: -1- AC_DEFUN([GMP_FUNC_SSCANF_WRITABLE_INPUT], [AC_CACHE_CHECK([whether sscanf needs writable input], +m4trace:acinclude.m4:3477: -1- AC_DEFUN([GMP_FUNC_SSCANF_WRITABLE_INPUT], [AC_CACHE_CHECK([whether sscanf needs writable input], gmp_cv_func_sscanf_writable_input, [case $host in *-*-hpux9 | *-*-hpux9.*) @@ -4330,7 +4383,7 @@ *) AC_MSG_ERROR([unrecognised \$gmp_cv_func_sscanf_writable_input]) ;; esac ]) -m4trace:acinclude.m4:3513: -1- AC_DEFUN([GMP_FUNC_VSNPRINTF], [AC_REQUIRE([GMP_C_STDARG]) +m4trace:acinclude.m4:3515: -1- AC_DEFUN([GMP_FUNC_VSNPRINTF], [AC_REQUIRE([GMP_C_STDARG]) AC_CHECK_FUNC(vsnprintf, [gmp_vsnprintf_exists=yes], [gmp_vsnprintf_exists=no]) @@ -4404,7 +4457,7 @@ fi fi ]) -m4trace:acinclude.m4:3594: -1- AC_DEFUN([GMP_H_ANSI], [AC_REQUIRE([AC_PROG_CC_STDC]) +m4trace:acinclude.m4:3596: -1- AC_DEFUN([GMP_H_ANSI], [AC_REQUIRE([AC_PROG_CC_STDC]) case $ac_cv_prog_cc_stdc in no) ;; @@ -4419,7 +4472,7 @@ ;; esac ]) -m4trace:acinclude.m4:3617: -1- AC_DEFUN([GMP_H_EXTERN_INLINE], [AC_REQUIRE([AC_C_INLINE]) +m4trace:acinclude.m4:3619: -1- AC_DEFUN([GMP_H_EXTERN_INLINE], [AC_REQUIRE([AC_C_INLINE]) case $ac_cv_c_inline in no) ;; *) @@ -4438,7 +4491,7 @@ ;; esac ]) -m4trace:acinclude.m4:3644: -1- AC_DEFUN([GMP_H_HAVE_FILE], [AC_TRY_COMPILE( +m4trace:acinclude.m4:3646: -1- AC_DEFUN([GMP_H_HAVE_FILE], [AC_TRY_COMPILE( [#include ] GMP_INCLUDE_GMP_H [#if ! _GMP_H_HAVE_FILE @@ -4447,7 +4500,7 @@ ],,, [AC_MSG_WARN([gmp.h doesnt recognise , FILE prototypes will be unavailable])]) ]) -m4trace:acinclude.m4:3664: -1- AC_DEFUN([GMP_PROG_CC_FOR_BUILD], [AC_REQUIRE([AC_PROG_CC]) +m4trace:acinclude.m4:3666: -1- AC_DEFUN([GMP_PROG_CC_FOR_BUILD], [AC_REQUIRE([AC_PROG_CC]) if test -n "$CC_FOR_BUILD"; then GMP_PROG_CC_FOR_BUILD_WORKS($CC_FOR_BUILD,, [AC_MSG_ERROR([Specified CC_FOR_BUILD doesn't seem to work])]) @@ -4469,7 +4522,7 @@ AC_ARG_VAR(CC_FOR_BUILD,[build system C compiler]) AC_SUBST(CC_FOR_BUILD) ]) -m4trace:acinclude.m4:3696: -1- AC_DEFUN([GMP_PROG_CC_FOR_BUILD_WORKS], [AC_MSG_CHECKING([build system compiler $1]) +m4trace:acinclude.m4:3698: -1- AC_DEFUN([GMP_PROG_CC_FOR_BUILD_WORKS], [AC_MSG_CHECKING([build system compiler $1]) # remove anything that might look like compiler output to our "||" expression rm -f conftest* a.out b.out a.exe a_out.exe cat >conftest.c <conftest.c <conftest.c <conftest.c <,<\`$enable_profiling'>)"]) -m4trace:configure.in:204: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +configure.in:165: the top level]) +m4trace:configure.in:180: -1- m4_pattern_allow([^GMP_NAIL_BITS$]) +m4trace:configure.in:184: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... -configure.in:204: the top level]) -m4trace:configure.in:214: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +configure.in:184: the top level]) +m4trace:configure.in:194: -1- m4_pattern_allow([^WANT_PROFILING_PROF$]) +m4trace:configure.in:198: -1- m4_pattern_allow([^WANT_PROFILING_GPROF$]) +m4trace:configure.in:202: -1- m4_pattern_allow([^WANT_PROFILING_INSTRUMENT$]) +m4trace:configure.in:207: -1- GMP_DEFINE_RAW(["define(,<\`$enable_profiling'>)"]) +m4trace:configure.in:218: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... -configure.in:214: the top level]) -m4trace:configure.in:224: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +configure.in:218: the top level]) +m4trace:configure.in:228: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... -configure.in:224: the top level]) -m4trace:configure.in:236: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')"], [POST]) -m4trace:configure.in:375: -1- m4_pattern_allow([^ABI$]) -m4trace:configure.in:396: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) -m4trace:configure.in:397: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) -m4trace:configure.in:407: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_alpha$]) -m4trace:configure.in:478: -1- GMP_INCLUDE_MPN([alpha/alpha-defs.m4]) -m4trace:configure.in:482: -1- GMP_INCLUDE_MPN([alpha/unicos.m4]) -m4trace:configure.in:487: -1- GMP_INCLUDE_MPN([alpha/default.m4]) -m4trace:configure.in:509: -1- GMP_INCLUDE_MPN([alpha/default.m4]) -m4trace:configure.in:542: -1- GMP_INCLUDE_MPN([arm/arm-defs.m4]) -m4trace:configure.in:667: -1- GMP_INCLUDE_MPN([ia64/ia64-defs.m4]) -m4trace:configure.in:732: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_m68k$]) -m4trace:configure.in:733: -1- GMP_INCLUDE_MPN([m68k/m68k-defs.m4]) -m4trace:configure.in:797: -1- GMP_INCLUDE_MPN([mips32/mips-defs.m4]) -m4trace:configure.in:843: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) -m4trace:configure.in:1037: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) -m4trace:configure.in:1093: -1- GMP_INCLUDE_MPN([sparc32/sparc-defs.m4]) -m4trace:configure.in:1549: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -configure.in:1549: the top level]) -m4trace:configure.in:1662: -1- GMP_PROG_CC_IS_GNU([$cc], [ccbase=gcc]) -m4trace:configure.in:1662: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:909: GMP_PROG_CC_IS_GNU is expanded from... -configure.in:1662: the top level]) -m4trace:configure.in:1668: -1- GMP_PROG_CC_IS_XLC([$cc], [ccbase=xlc]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS([$cc $cflags $cppflags], [], [continue]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], []) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [], [ +configure.in:228: the top level]) +m4trace:configure.in:238: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.in:238: the top level]) +m4trace:configure.in:250: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')"], [POST]) +m4trace:configure.in:390: -1- m4_pattern_allow([^ABI$]) +m4trace:configure.in:411: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) +m4trace:configure.in:412: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) +m4trace:configure.in:422: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_alpha$]) +m4trace:configure.in:496: -1- GMP_INCLUDE_MPN([alpha/alpha-defs.m4]) +m4trace:configure.in:500: -1- GMP_INCLUDE_MPN([alpha/unicos.m4]) +m4trace:configure.in:505: -1- GMP_INCLUDE_MPN([alpha/default.m4]) +m4trace:configure.in:527: -1- GMP_INCLUDE_MPN([alpha/default.m4]) +m4trace:configure.in:560: -1- GMP_INCLUDE_MPN([arm/arm-defs.m4]) +m4trace:configure.in:685: -1- GMP_INCLUDE_MPN([ia64/ia64-defs.m4]) +m4trace:configure.in:750: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_m68k$]) +m4trace:configure.in:751: -1- GMP_INCLUDE_MPN([m68k/m68k-defs.m4]) +m4trace:configure.in:815: -1- GMP_INCLUDE_MPN([mips32/mips-defs.m4]) +m4trace:configure.in:861: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) +m4trace:configure.in:1081: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) +m4trace:configure.in:1142: -1- GMP_INCLUDE_MPN([sparc32/sparc-defs.m4]) +m4trace:configure.in:1603: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +configure.in:1603: the top level]) +m4trace:configure.in:1716: -1- GMP_PROG_CC_IS_GNU([$cc], [ccbase=gcc]) +m4trace:configure.in:1716: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:910: GMP_PROG_CC_IS_GNU is expanded from... +configure.in:1716: the top level]) +m4trace:configure.in:1722: -1- GMP_PROG_CC_IS_XLC([$cc], [ccbase=xlc]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS([$cc $cflags $cppflags], [], [continue]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], []) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [], [ int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [], [ +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [], [ int main () { return 0; }], [], [gmp_prog_cc_works="no"], [gmp_prog_cc_works="no[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 (without -maix64), hence detecting an unusable compiler */ void *g() { return (void *) 0; } void *f() { return g(); } ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 (without -maix64), hence detecting an unusable compiler */ void *g() { return (void *) 0; } void *f() { return g(); } int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 (without -maix64), hence detecting an unusable compiler */ void *g() { return (void *) 0; } void *f() { return g(); } int main () { return 0; }], [], [gmp_prog_cc_works="no, function pointer return"], [gmp_prog_cc_works="no, function pointer return[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc -march=pentiumpro on Solaris 2.8. The native sun assembler requires a non-standard syntax for cmov which gcc (as of 2.95.2 at least) doesn't know. */ int n; int cmov () { return (n >= 0 ? n : 0); } ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc -march=pentiumpro on Solaris 2.8. The native sun assembler requires a non-standard syntax for cmov which gcc (as of 2.95.2 at least) doesn't know. */ @@ -4918,7 +4975,7 @@ int cmov () { return (n >= 0 ? n : 0); } int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc -march=pentiumpro on Solaris 2.8. The native sun assembler requires a non-standard syntax for cmov which gcc (as of 2.95.2 at least) doesn't know. */ @@ -4926,35 +4983,35 @@ int cmov () { return (n >= 0 ? n : 0); } int main () { return 0; }], [], [gmp_prog_cc_works="no, cmov instruction"], [gmp_prog_cc_works="no, cmov instruction[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 option causes gcc to incorrectly select the 32-bit libgcc.a, not the 64-bit one, and consequently it misses out on the __fixunsdfdi @@ -4962,7 +5019,7 @@ double d; unsigned long gcc303 () { return (unsigned long) d; } ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 option causes gcc to incorrectly select the 32-bit libgcc.a, not the 64-bit one, and consequently it misses out on the __fixunsdfdi @@ -4971,7 +5028,7 @@ unsigned long gcc303 () { return (unsigned long) d; } int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 option causes gcc to incorrectly select the 32-bit libgcc.a, not the 64-bit one, and consequently it misses out on the __fixunsdfdi @@ -4980,90 +5037,90 @@ unsigned long gcc303 () { return (unsigned long) d; } int main () { return 0; }], [], [gmp_prog_cc_works="no, double -> ulong conversion"], [gmp_prog_cc_works="no, double -> ulong conversion[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 instruction, and a negation like this comes out using it. */ double fneg_data; unsigned long fneg () { return -fneg_data; } ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 instruction, and a negation like this comes out using it. */ double fneg_data; unsigned long fneg () { return -fneg_data; } int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 instruction, and a negation like this comes out using it. */ double fneg_data; unsigned long fneg () { return -fneg_data; } int main () { return 0; }], [], [gmp_prog_cc_works="no, double negation"], [gmp_prog_cc_works="no, double negation[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn (cvtsd2ss) which will provoke an error if the assembler doesn't recognise those instructions. Not sure how much of the gmp code will come out wanting sse2, but it's easiest to reject an option we know is bad. */ double ftod_data; float ftod () { return (float) ftod_data; } ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn (cvtsd2ss) which will provoke an error if the assembler doesn't recognise those instructions. Not sure how much of the gmp code will come out wanting sse2, but it's easiest to reject an option we know is bad. */ @@ -5071,7 +5128,7 @@ float ftod () { return (float) ftod_data; } int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn (cvtsd2ss) which will provoke an error if the assembler doesn't recognise those instructions. Not sure how much of the gmp code will come out wanting sse2, but it's easiest to reject an option we know is bad. */ @@ -5079,35 +5136,35 @@ float ftod () { return (float) ftod_data; } int main () { return 0; }], [], [gmp_prog_cc_works="no, double -> float conversion"], [gmp_prog_cc_works="no, double -> float conversion[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char values being spilled into floating point registers. The problem doesn't show up all the time, but has occurred enough in GMP for us to reject @@ -5143,7 +5200,7 @@ return 0; } ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char values being spilled into floating point registers. The problem doesn't show up all the time, but has occurred enough in GMP for us to reject @@ -5180,7 +5237,7 @@ } int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char values being spilled into floating point registers. The problem doesn't show up all the time, but has occurred enough in GMP for us to reject @@ -5217,35 +5274,35 @@ } int main () { return 0; }], [], [gmp_prog_cc_works="no, gnupro alpha ev6 char spilling"], [gmp_prog_cc_works="no, gnupro alpha ev6 char spilling[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [__builtin_alloca availability], [int k; int foo () { __builtin_alloca (k); }], [GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [alloca array], +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [__builtin_alloca availability], [int k; int foo () { __builtin_alloca (k); }], [GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ int k; @@ -5257,27 +5314,27 @@ a[i] = __builtin_alloca (1 << i); } ])]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ int k; int foo () @@ -5288,7 +5345,7 @@ a[i] = __builtin_alloca (1 << i); } ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ int k; int foo () @@ -5300,7 +5357,7 @@ } int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ int k; int foo () @@ -5312,39 +5369,39 @@ } int main () { return 0; }], [], [gmp_prog_cc_works="no, alloca array"], [gmp_prog_cc_works="no, alloca array[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this results in "Internal error related to the source program domain". @@ -5363,7 +5420,7 @@ return a * fp[0]; } ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this results in "Internal error related to the source program domain". @@ -5383,7 +5440,7 @@ } int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this results in "Internal error related to the source program domain". @@ -5403,35 +5460,35 @@ } int main () { return 0; }], [], [gmp_prog_cc_works="no, abs int -> double conversion"], [gmp_prog_cc_works="no, abs int -> double conversion[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and 1666 to segfault with e.g., -O2 -mpowerpc64. */ @@ -5446,7 +5503,7 @@ int dummy; #endif ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and 1666 to segfault with e.g., -O2 -mpowerpc64. */ @@ -5462,7 +5519,7 @@ #endif int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and 1666 to segfault with e.g., -O2 -mpowerpc64. */ @@ -5478,35 +5535,35 @@ #endif int main () { return 0; }], [], [gmp_prog_cc_works="no, long long reliability test 1"], [gmp_prog_cc_works="no, long long reliability test 1[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and 1666 to get an ICE with -O1 -mpowerpc64. */ @@ -5517,7 +5574,7 @@ int dummy; #endif ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and 1666 to get an ICE with -O1 -mpowerpc64. */ @@ -5529,7 +5586,7 @@ #endif int main () { return 0; }]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and 1666 to get an ICE with -O1 -mpowerpc64. */ @@ -5541,35 +5598,35 @@ #endif int main () { return 0; }], [], [gmp_prog_cc_works="no, long long reliability test 2"], [gmp_prog_cc_works="no, long long reliability test 2[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets inlined and its return value somehow botched to be 0 instead of 1. This @@ -5620,7 +5677,7 @@ } #endif ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets inlined and its return value somehow botched to be 0 instead of 1. This @@ -5671,31 +5728,31 @@ } #endif ], [], [gmp_prog_cc_works="no, mpn_lshift_com optimization"], [gmp_prog_cc_works="no, mpn_lshift_com optimization[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under "icc -O3", After several calls, the function writes parial garbage to the result vector. Perhaps relates to the chk.a.nc insn. This code needs to be run to show the problem, but that's fine, the offending cc is a @@ -5756,7 +5813,7 @@ } #endif ]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under +m4trace:configure.in:1766: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under "icc -O3", After several calls, the function writes parial garbage to the result vector. Perhaps relates to the chk.a.nc insn. This code needs to be run to show the problem, but that's fine, the offending cc is a @@ -5817,250 +5874,250 @@ } #endif ], [], [gmp_prog_cc_works="no, mpn_lshift_com optimization 2"], [gmp_prog_cc_works="no, mpn_lshift_com optimization 2[, program does not run]"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_PROG_CC_X86_GOT_EAX_EMITTED([$cc $cflags $cppflags], [GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags],, +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_PROG_CC_X86_GOT_EAX_EMITTED([$cc $cflags $cppflags], [GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags],, [gmp_prog_cc_works="no, bad gas GOT with eax"])]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags], [], [gmp_prog_cc_works="no, bad gas GOT with eax"]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1719: -1- GMP_PROG_CC_WORKS_LONGLONG([$cc $cflags $cppflags], [], [continue]) -m4trace:configure.in:1719: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:832: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.in:1719: the top level]) -m4trace:configure.in:1719: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:832: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.in:1719: the top level]) -m4trace:configure.in:1719: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:832: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.in:1719: the top level]) -m4trace:configure.in:1731: -1- GMP_HPC_HPPA_2_0([$cc], [], [testlist_pass=no]) -m4trace:configure.in:1731: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1006: GMP_HPC_HPPA_2_0 is expanded from... -configure.in:1731: the top level]) -m4trace:configure.in:1731: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1006: GMP_HPC_HPPA_2_0 is expanded from... -configure.in:1731: the top level]) -m4trace:configure.in:1731: -1- GMP_COMPARE_GE([$gmp_tmp_v1], [10], [$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) -m4trace:configure.in:1731: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v1], [10], [$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) -m4trace:configure.in:1731: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) -m4trace:configure.in:1731: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v3], [30]) -m4trace:configure.in:1732: -1- GMP_GCC_ARM_UMODSI([$cc], [], [testlist_pass=no]) -m4trace:configure.in:1732: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1047: GMP_GCC_ARM_UMODSI is expanded from... -configure.in:1732: the top level]) -m4trace:configure.in:1733: -1- GMP_GCC_MIPS_O32([$cc], [], [testlist_pass=no]) -m4trace:configure.in:1733: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1072: GMP_GCC_MIPS_O32 is expanded from... -configure.in:1733: the top level]) -m4trace:configure.in:1733: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1072: GMP_GCC_MIPS_O32 is expanded from... -configure.in:1733: the top level]) -m4trace:configure.in:1734: -1- GMP_HPPA_LEVEL_20([$cc $cflags], [], [testlist_pass=no]) -m4trace:configure.in:1734: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1377: GMP_HPPA_LEVEL_20 is expanded from... -configure.in:1734: the top level]) -m4trace:configure.in:1734: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1377: GMP_HPPA_LEVEL_20 is expanded from... -configure.in:1734: the top level]) -m4trace:configure.in:1734: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1377: GMP_HPPA_LEVEL_20 is expanded from... -configure.in:1734: the top level]) -m4trace:configure.in:1735: -1- GMP_C_TEST_SIZEOF([$cc $cflags], [$tst], [], [testlist_pass=no]) -m4trace:configure.in:1735: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:872: GMP_C_TEST_SIZEOF is expanded from... -configure.in:1735: the top level]) -m4trace:configure.in:1735: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:872: GMP_C_TEST_SIZEOF is expanded from... -configure.in:1735: the top level]) -m4trace:configure.in:1807: -1- GMP_GCC_PENTIUM4_SSE2([$cc $cflags $cppflags], [], [continue]) -m4trace:configure.in:1808: -1- GMP_OS_X86_XMM([$cc $cflags $cppflags], [], [continue]) -m4trace:configure.in:1808: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1279: GMP_OS_X86_XMM is expanded from... -configure.in:1808: the top level]) -m4trace:configure.in:1813: -1- GMP_GCC_NO_CPP_PRECOMP([$ccbase], [$cc], [$cflags], [cflags="$cflags $flag" +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags], [], [gmp_prog_cc_works="no, bad gas GOT with eax"]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1773: -1- GMP_PROG_CC_WORKS_LONGLONG([$cc $cflags $cppflags], [], [continue]) +m4trace:configure.in:1773: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:833: GMP_PROG_CC_WORKS_LONGLONG is expanded from... +configure.in:1773: the top level]) +m4trace:configure.in:1773: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:833: GMP_PROG_CC_WORKS_LONGLONG is expanded from... +configure.in:1773: the top level]) +m4trace:configure.in:1773: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:833: GMP_PROG_CC_WORKS_LONGLONG is expanded from... +configure.in:1773: the top level]) +m4trace:configure.in:1785: -1- GMP_HPC_HPPA_2_0([$cc], [], [testlist_pass=no]) +m4trace:configure.in:1785: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1007: GMP_HPC_HPPA_2_0 is expanded from... +configure.in:1785: the top level]) +m4trace:configure.in:1785: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1007: GMP_HPC_HPPA_2_0 is expanded from... +configure.in:1785: the top level]) +m4trace:configure.in:1785: -1- GMP_COMPARE_GE([$gmp_tmp_v1], [10], [$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) +m4trace:configure.in:1785: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v1], [10], [$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) +m4trace:configure.in:1785: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v2], [32], [$gmp_tmp_v3], [30]) +m4trace:configure.in:1785: -1- GMP_COMPARE_GE_INTERNAL([$gmp_tmp_v3], [30]) +m4trace:configure.in:1786: -1- GMP_GCC_ARM_UMODSI([$cc], [], [testlist_pass=no]) +m4trace:configure.in:1786: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1048: GMP_GCC_ARM_UMODSI is expanded from... +configure.in:1786: the top level]) +m4trace:configure.in:1787: -1- GMP_GCC_MIPS_O32([$cc], [], [testlist_pass=no]) +m4trace:configure.in:1787: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1073: GMP_GCC_MIPS_O32 is expanded from... +configure.in:1787: the top level]) +m4trace:configure.in:1787: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1073: GMP_GCC_MIPS_O32 is expanded from... +configure.in:1787: the top level]) +m4trace:configure.in:1788: -1- GMP_HPPA_LEVEL_20([$cc $cflags], [], [testlist_pass=no]) +m4trace:configure.in:1788: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1378: GMP_HPPA_LEVEL_20 is expanded from... +configure.in:1788: the top level]) +m4trace:configure.in:1788: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1378: GMP_HPPA_LEVEL_20 is expanded from... +configure.in:1788: the top level]) +m4trace:configure.in:1788: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1378: GMP_HPPA_LEVEL_20 is expanded from... +configure.in:1788: the top level]) +m4trace:configure.in:1789: -1- GMP_C_TEST_SIZEOF([$cc $cflags], [$tst], [], [testlist_pass=no]) +m4trace:configure.in:1789: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:873: GMP_C_TEST_SIZEOF is expanded from... +configure.in:1789: the top level]) +m4trace:configure.in:1789: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:873: GMP_C_TEST_SIZEOF is expanded from... +configure.in:1789: the top level]) +m4trace:configure.in:1897: -1- GMP_GCC_PENTIUM4_SSE2([$cc $cflags $cppflags], [], [continue]) +m4trace:configure.in:1898: -1- GMP_OS_X86_XMM([$cc $cflags $cppflags], [], [continue]) +m4trace:configure.in:1898: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1280: GMP_OS_X86_XMM is expanded from... +configure.in:1898: the top level]) +m4trace:configure.in:1903: -1- GMP_GCC_NO_CPP_PRECOMP([$ccbase], [$cc], [$cflags], [cflags="$cflags $flag" break], [continue]) -m4trace:configure.in:1813: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1107: GMP_GCC_NO_CPP_PRECOMP is expanded from... -configure.in:1813: the top level]) -m4trace:configure.in:1821: -1- GMP_GCC_WA_MCPU([$cc $cflags], [$flag], [], [continue]) -m4trace:configure.in:1821: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1167: GMP_GCC_WA_MCPU is expanded from... -configure.in:1821: the top level]) -m4trace:configure.in:1826: -1- GMP_GCC_WA_OLDAS([$cc $cflags $cppflags], [cflags="$cflags $flag" +m4trace:configure.in:1903: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1108: GMP_GCC_NO_CPP_PRECOMP is expanded from... +configure.in:1903: the top level]) +m4trace:configure.in:1911: -1- GMP_GCC_WA_MCPU([$cc $cflags], [$flag], [], [continue]) +m4trace:configure.in:1911: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1168: GMP_GCC_WA_MCPU is expanded from... +configure.in:1911: the top level]) +m4trace:configure.in:1916: -1- GMP_GCC_WA_OLDAS([$cc $cflags $cppflags], [cflags="$cflags $flag" break], [continue]) -m4trace:configure.in:1826: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1219: GMP_GCC_WA_OLDAS is expanded from... -configure.in:1826: the top level]) -m4trace:configure.in:1826: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1219: GMP_GCC_WA_OLDAS is expanded from... -configure.in:1826: the top level]) -m4trace:configure.in:1826: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1219: GMP_GCC_WA_OLDAS is expanded from... -configure.in:1826: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS([$cc $cflags $cppflags $flag], [cflags="$cflags $flag" +m4trace:configure.in:1916: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1220: GMP_GCC_WA_OLDAS is expanded from... +configure.in:1916: the top level]) +m4trace:configure.in:1916: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1220: GMP_GCC_WA_OLDAS is expanded from... +configure.in:1916: the top level]) +m4trace:configure.in:1916: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1220: GMP_GCC_WA_OLDAS is expanded from... +configure.in:1916: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS([$cc $cflags $cppflags $flag], [cflags="$cflags $flag" break]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], []) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [], [ +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], []) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [], [ int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [], [ +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [], [ int main () { return 0; }], [], [gmp_prog_cc_works="no"], [gmp_prog_cc_works="no[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 (without -maix64), hence detecting an unusable compiler */ void *g() { return (void *) 0; } void *f() { return g(); } ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 (without -maix64), hence detecting an unusable compiler */ void *g() { return (void *) 0; } void *f() { return g(); } int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [function pointer return], [/* The following provokes an internal error from gcc 2.95.2 -mpowerpc64 (without -maix64), hence detecting an unusable compiler */ void *g() { return (void *) 0; } void *f() { return g(); } int main () { return 0; }], [], [gmp_prog_cc_works="no, function pointer return"], [gmp_prog_cc_works="no, function pointer return[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc -march=pentiumpro on Solaris 2.8. The native sun assembler requires a non-standard syntax for cmov which gcc (as of 2.95.2 at least) doesn't know. */ int n; int cmov () { return (n >= 0 ? n : 0); } ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc -march=pentiumpro on Solaris 2.8. The native sun assembler requires a non-standard syntax for cmov which gcc (as of 2.95.2 at least) doesn't know. */ @@ -6068,7 +6125,7 @@ int cmov () { return (n >= 0 ? n : 0); } int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [cmov instruction], [/* The following provokes an invalid instruction syntax from i386 gcc -march=pentiumpro on Solaris 2.8. The native sun assembler requires a non-standard syntax for cmov which gcc (as of 2.95.2 at least) doesn't know. */ @@ -6076,35 +6133,35 @@ int cmov () { return (n >= 0 ? n : 0); } int main () { return 0; }], [], [gmp_prog_cc_works="no, cmov instruction"], [gmp_prog_cc_works="no, cmov instruction[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 option causes gcc to incorrectly select the 32-bit libgcc.a, not the 64-bit one, and consequently it misses out on the __fixunsdfdi @@ -6112,7 +6169,7 @@ double d; unsigned long gcc303 () { return (unsigned long) d; } ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 option causes gcc to incorrectly select the 32-bit libgcc.a, not the 64-bit one, and consequently it misses out on the __fixunsdfdi @@ -6121,7 +6178,7 @@ unsigned long gcc303 () { return (unsigned long) d; } int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double -> ulong conversion], [/* The following provokes a linker invocation problem with gcc 3.0.3 on AIX 4.3 under "-maix64 -mpowerpc64 -mcpu=630". The -mcpu=630 option causes gcc to incorrectly select the 32-bit libgcc.a, not the 64-bit one, and consequently it misses out on the __fixunsdfdi @@ -6130,90 +6187,90 @@ unsigned long gcc303 () { return (unsigned long) d; } int main () { return 0; }], [], [gmp_prog_cc_works="no, double -> ulong conversion"], [gmp_prog_cc_works="no, double -> ulong conversion[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 instruction, and a negation like this comes out using it. */ double fneg_data; unsigned long fneg () { return -fneg_data; } ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 instruction, and a negation like this comes out using it. */ double fneg_data; unsigned long fneg () { return -fneg_data; } int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double negation], [/* The following provokes an error from hppa gcc 2.95 under -mpa-risc-2-0 if the assembler doesn't know hppa 2.0 instructions. fneg is a 2.0 instruction, and a negation like this comes out using it. */ double fneg_data; unsigned long fneg () { return -fneg_data; } int main () { return 0; }], [], [gmp_prog_cc_works="no, double negation"], [gmp_prog_cc_works="no, double negation[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn (cvtsd2ss) which will provoke an error if the assembler doesn't recognise those instructions. Not sure how much of the gmp code will come out wanting sse2, but it's easiest to reject an option we know is bad. */ double ftod_data; float ftod () { return (float) ftod_data; } ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn (cvtsd2ss) which will provoke an error if the assembler doesn't recognise those instructions. Not sure how much of the gmp code will come out wanting sse2, but it's easiest to reject an option we know is bad. */ @@ -6221,7 +6278,7 @@ float ftod () { return (float) ftod_data; } int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [double -> float conversion], [/* The following makes gcc 3.3 -march=pentium4 generate an SSE2 xmm insn (cvtsd2ss) which will provoke an error if the assembler doesn't recognise those instructions. Not sure how much of the gmp code will come out wanting sse2, but it's easiest to reject an option we know is bad. */ @@ -6229,35 +6286,35 @@ float ftod () { return (float) ftod_data; } int main () { return 0; }], [], [gmp_prog_cc_works="no, double -> float conversion"], [gmp_prog_cc_works="no, double -> float conversion[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char values being spilled into floating point registers. The problem doesn't show up all the time, but has occurred enough in GMP for us to reject @@ -6293,7 +6350,7 @@ return 0; } ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char values being spilled into floating point registers. The problem doesn't show up all the time, but has occurred enough in GMP for us to reject @@ -6330,7 +6387,7 @@ } int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [gnupro alpha ev6 char spilling], [/* The following provokes an internal compiler error from gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6", apparently relating to char values being spilled into floating point registers. The problem doesn't show up all the time, but has occurred enough in GMP for us to reject @@ -6367,35 +6424,35 @@ } int main () { return 0; }], [], [gmp_prog_cc_works="no, gnupro alpha ev6 char spilling"], [gmp_prog_cc_works="no, gnupro alpha ev6 char spilling[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [__builtin_alloca availability], [int k; int foo () { __builtin_alloca (k); }], [GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [alloca array], +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [__builtin_alloca availability], [int k; int foo () { __builtin_alloca (k); }], [GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ int k; @@ -6407,27 +6464,27 @@ a[i] = __builtin_alloca (1 << i); } ])]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ int k; int foo () @@ -6438,7 +6495,7 @@ a[i] = __builtin_alloca (1 << i); } ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ int k; int foo () @@ -6450,7 +6507,7 @@ } int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [alloca array], [/* The following provokes an internal compiler error from Itanium HP-UX cc under +O2 or higher. We use this sort of code in mpn/generic/mul_fft.c. */ int k; int foo () @@ -6462,39 +6519,39 @@ } int main () { return 0; }], [], [gmp_prog_cc_works="no, alloca array"], [gmp_prog_cc_works="no, alloca array[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this results in "Internal error related to the source program domain". @@ -6513,7 +6570,7 @@ return a * fp[0]; } ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this results in "Internal error related to the source program domain". @@ -6533,7 +6590,7 @@ } int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [abs int -> double conversion], [/* The following provokes an internal error from the assembler on power2-ibm-aix4.3.1.0. gcc -mrios2 compiles to nabs+fcirz, and this results in "Internal error related to the source program domain". @@ -6553,35 +6610,35 @@ } int main () { return 0; }], [], [gmp_prog_cc_works="no, abs int -> double conversion"], [gmp_prog_cc_works="no, abs int -> double conversion[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and 1666 to segfault with e.g., -O2 -mpowerpc64. */ @@ -6596,7 +6653,7 @@ int dummy; #endif ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and 1666 to segfault with e.g., -O2 -mpowerpc64. */ @@ -6612,7 +6669,7 @@ #endif int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [long long reliability test 1], [/* The following provokes a segfault in the compiler on powerpc-apple-darwin. Extracted from tests/mpn/t-iord_u.c. Causes Apple's gcc 3.3 build 1640 and 1666 to segfault with e.g., -O2 -mpowerpc64. */ @@ -6628,35 +6685,35 @@ #endif int main () { return 0; }], [], [gmp_prog_cc_works="no, long long reliability test 1"], [gmp_prog_cc_works="no, long long reliability test 1[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and 1666 to get an ICE with -O1 -mpowerpc64. */ @@ -6667,7 +6724,7 @@ int dummy; #endif ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and 1666 to get an ICE with -O1 -mpowerpc64. */ @@ -6679,7 +6736,7 @@ #endif int main () { return 0; }]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [long long reliability test 2], [/* The following provokes an internal compiler error on powerpc-apple-darwin. Extracted from mpz/cfdiv_q_2exp.c. Causes Apple's gcc 3.3 build 1640 and 1666 to get an ICE with -O1 -mpowerpc64. */ @@ -6691,35 +6748,35 @@ #endif int main () { return 0; }], [], [gmp_prog_cc_works="no, long long reliability test 2"], [gmp_prog_cc_works="no, long long reliability test 2[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets inlined and its return value somehow botched to be 0 instead of 1. This @@ -6770,7 +6827,7 @@ } #endif ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization], [/* The following is mis-compiled by HP ia-64 cc version cc: HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003] under "cc +O3", both in +DD32 and +DD64 modes. The mpn_lshift_com gets inlined and its return value somehow botched to be 0 instead of 1. This @@ -6821,31 +6878,31 @@ } #endif ], [], [gmp_prog_cc_works="no, mpn_lshift_com optimization"], [gmp_prog_cc_works="no, mpn_lshift_com optimization[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_MAIN([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under "icc -O3", After several calls, the function writes parial garbage to the result vector. Perhaps relates to the chk.a.nc insn. This code needs to be run to show the problem, but that's fine, the offending cc is a @@ -6906,7 +6963,7 @@ } #endif ]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under +m4trace:configure.in:1923: -1- GMP_PROG_CC_WORKS_PART_TEST([$cc $cflags $cppflags $flag], [mpn_lshift_com optimization 2], [/* The following is mis-compiled by Intel ia-64 icc version 1.8 under "icc -O3", After several calls, the function writes parial garbage to the result vector. Perhaps relates to the chk.a.nc insn. This code needs to be run to show the problem, but that's fine, the offending cc is a @@ -6967,197 +7024,197 @@ } #endif ], [], [gmp_prog_cc_works="no, mpn_lshift_com optimization 2"], [gmp_prog_cc_works="no, mpn_lshift_com optimization 2[, program does not run]"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_PROG_CC_X86_GOT_EAX_EMITTED([$cc $cflags $cppflags $flag], [GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags $flag],, +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_PROG_CC_X86_GOT_EAX_EMITTED([$cc $cflags $cppflags $flag], [GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags $flag],, [gmp_prog_cc_works="no, bad gas GOT with eax"])]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags $flag], [], [gmp_prog_cc_works="no, bad gas GOT with eax"]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1848: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')"], [POST]) -m4trace:configure.in:1857: -1- m4_pattern_allow([^GMP_LDFLAGS$]) -m4trace:configure.in:1858: -1- m4_pattern_allow([^LIBGMP_LDFLAGS$]) -m4trace:configure.in:1859: -1- m4_pattern_allow([^LIBGMPXX_LDFLAGS$]) -m4trace:configure.in:1877: -1- m4_pattern_allow([^HAVE_SPEED_CYCLECOUNTER$]) -m4trace:configure.in:1880: -1- m4_pattern_allow([^SPEED_CYCLECOUNTER_OBJ$]) -m4trace:configure.in:1890: -1- m4_pattern_allow([^HAVE_CALLING_CONVENTIONS$]) -m4trace:configure.in:1893: -1- m4_pattern_allow([^CALLING_CONVENTIONS_OBJS$]) -m4trace:configure.in:1915: -1- m4_pattern_allow([^DEFN_LONG_LONG_LIMB$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^EXEEXT$]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^OBJEXT$]) -m4trace:configure.in:1921: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.in:1921: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:1921: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.in:1922: -1- GMP_H_ANSI -m4trace:configure.in:1922: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -acinclude.m4:3594: GMP_H_ANSI is expanded from... -configure.in:1922: the top level]) -m4trace:configure.in:1926: -1- GMP_PROG_CC_FOR_BUILD -m4trace:configure.in:1926: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$CC_FOR_BUILD], [], [AC_MSG_ERROR([Specified CC_FOR_BUILD doesn't seem to work])]) -m4trace:configure.in:1926: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:3696: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3664: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.in:1926: the top level]) -m4trace:configure.in:1926: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$HOST_CC], [CC_FOR_BUILD=$HOST_CC], [AC_MSG_ERROR([Specified HOST_CC doesn't seem to work])]) -m4trace:configure.in:1926: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:3696: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3664: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.in:1926: the top level]) -m4trace:configure.in:1926: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$i], [CC_FOR_BUILD=$i +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- GMP_ASM_X86_GOT_EAX_OK([$cc $cflags $cppflags $flag], [], [gmp_prog_cc_works="no, bad gas GOT with eax"]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1938: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_ABI_$ABI_nodots')"], [POST]) +m4trace:configure.in:1947: -1- m4_pattern_allow([^GMP_LDFLAGS$]) +m4trace:configure.in:1948: -1- m4_pattern_allow([^LIBGMP_LDFLAGS$]) +m4trace:configure.in:1949: -1- m4_pattern_allow([^LIBGMPXX_LDFLAGS$]) +m4trace:configure.in:1967: -1- m4_pattern_allow([^HAVE_SPEED_CYCLECOUNTER$]) +m4trace:configure.in:1970: -1- m4_pattern_allow([^SPEED_CYCLECOUNTER_OBJ$]) +m4trace:configure.in:1980: -1- m4_pattern_allow([^HAVE_CALLING_CONVENTIONS$]) +m4trace:configure.in:1983: -1- m4_pattern_allow([^CALLING_CONVENTIONS_OBJS$]) +m4trace:configure.in:2005: -1- m4_pattern_allow([^DEFN_LONG_LONG_LIMB$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^EXEEXT$]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.in:2011: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.in:2011: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2011: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.in:2012: -1- GMP_H_ANSI +m4trace:configure.in:2012: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +acinclude.m4:3596: GMP_H_ANSI is expanded from... +configure.in:2012: the top level]) +m4trace:configure.in:2016: -1- GMP_PROG_CC_FOR_BUILD +m4trace:configure.in:2016: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$CC_FOR_BUILD], [], [AC_MSG_ERROR([Specified CC_FOR_BUILD doesn't seem to work])]) +m4trace:configure.in:2016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:3698: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... +acinclude.m4:3666: GMP_PROG_CC_FOR_BUILD is expanded from... +configure.in:2016: the top level]) +m4trace:configure.in:2016: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$HOST_CC], [CC_FOR_BUILD=$HOST_CC], [AC_MSG_ERROR([Specified HOST_CC doesn't seem to work])]) +m4trace:configure.in:2016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:3698: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... +acinclude.m4:3666: GMP_PROG_CC_FOR_BUILD is expanded from... +configure.in:2016: the top level]) +m4trace:configure.in:2016: -1- GMP_PROG_CC_FOR_BUILD_WORKS([$i], [CC_FOR_BUILD=$i break]) -m4trace:configure.in:1926: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:3696: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3664: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.in:1926: the top level]) -m4trace:configure.in:1926: -1- m4_pattern_allow([^CC_FOR_BUILD$]) -m4trace:configure.in:1926: -1- m4_pattern_allow([^CC_FOR_BUILD$]) -m4trace:configure.in:1927: -1- GMP_PROG_CPP_FOR_BUILD -m4trace:configure.in:1927: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -acinclude.m4:3730: GMP_PROG_CPP_FOR_BUILD is expanded from... -configure.in:1927: the top level]) -m4trace:configure.in:1927: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) -m4trace:configure.in:1927: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) -m4trace:configure.in:1928: -1- GMP_PROG_EXEEXT_FOR_BUILD -m4trace:configure.in:1928: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3770: GMP_PROG_EXEEXT_FOR_BUILD is expanded from... -configure.in:1928: the top level]) -m4trace:configure.in:1928: -1- m4_pattern_allow([^EXEEXT_FOR_BUILD$]) -m4trace:configure.in:1929: -1- GMP_C_FOR_BUILD_ANSI -m4trace:configure.in:1929: -1- m4_pattern_allow([^U_FOR_BUILD$]) -m4trace:configure.in:1930: -1- GMP_CHECK_LIBM_FOR_BUILD -m4trace:configure.in:1930: -1- m4_pattern_allow([^LIBM_FOR_BUILD$]) -m4trace:configure.in:1938: -1- m4_pattern_allow([^CCAS$]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^CXXFLAGS$]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^ac_ct_CXX$]) -m4trace:configure.in:1947: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -configure.in:1947: the top level]) -m4trace:configure.in:1973: -1- GMP_PROG_CXX_WORKS([$CXX $CPPFLAGS $CXXFLAGS], [want_cxx=yes +m4trace:configure.in:2016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:3698: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... +acinclude.m4:3666: GMP_PROG_CC_FOR_BUILD is expanded from... +configure.in:2016: the top level]) +m4trace:configure.in:2016: -1- m4_pattern_allow([^CC_FOR_BUILD$]) +m4trace:configure.in:2016: -1- m4_pattern_allow([^CC_FOR_BUILD$]) +m4trace:configure.in:2017: -1- GMP_PROG_CPP_FOR_BUILD +m4trace:configure.in:2017: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +acinclude.m4:3732: GMP_PROG_CPP_FOR_BUILD is expanded from... +configure.in:2017: the top level]) +m4trace:configure.in:2017: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) +m4trace:configure.in:2017: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) +m4trace:configure.in:2018: -1- GMP_PROG_EXEEXT_FOR_BUILD +m4trace:configure.in:2018: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3772: GMP_PROG_EXEEXT_FOR_BUILD is expanded from... +configure.in:2018: the top level]) +m4trace:configure.in:2018: -1- m4_pattern_allow([^EXEEXT_FOR_BUILD$]) +m4trace:configure.in:2019: -1- GMP_C_FOR_BUILD_ANSI +m4trace:configure.in:2019: -1- m4_pattern_allow([^U_FOR_BUILD$]) +m4trace:configure.in:2020: -1- GMP_CHECK_LIBM_FOR_BUILD +m4trace:configure.in:2020: -1- m4_pattern_allow([^LIBM_FOR_BUILD$]) +m4trace:configure.in:2028: -1- m4_pattern_allow([^CCAS$]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^CXXFLAGS$]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^ac_ct_CXX$]) +m4trace:configure.in:2037: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +configure.in:2037: the top level]) +m4trace:configure.in:2063: -1- GMP_PROG_CXX_WORKS([$CXX $CPPFLAGS $CXXFLAGS], [want_cxx=yes break]) -m4trace:configure.in:1973: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], []) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], [namespace], [namespace foo { } +m4trace:configure.in:2063: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], []) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], [namespace], [namespace foo { } using namespace foo; ]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], [std iostream], [/* This test rejects g++ 2.7.2 which doesn't have , only a +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- GMP_PROG_CXX_WORKS_PART([$CXX $CPPFLAGS $CXXFLAGS], [std iostream], [/* This test rejects g++ 2.7.2 which doesn't have , only a pre-standard iostream.h. */ #include @@ -7165,40 +7222,40 @@ mode, since that mode puts cout in the global namespace, not "std". */ void someoutput (void) { std::cout << 123; } ]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1984: -1- AM_CONDITIONAL([WANT_CXX], [test $want_cxx = yes]) -m4trace:configure.in:1984: -1- m4_pattern_allow([^WANT_CXX_TRUE$]) -m4trace:configure.in:1984: -1- m4_pattern_allow([^WANT_CXX_FALSE$]) -m4trace:configure.in:1984: -1- _AM_SUBST_NOTMAKE([WANT_CXX_TRUE]) -m4trace:configure.in:1984: -1- _AM_SUBST_NOTMAKE([WANT_CXX_FALSE]) -m4trace:configure.in:1992: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.in:1992: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:1992: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.in:1999: -1- GMP_CRAY_OPTIONS([add_path="cray/ieee"], [add_path="cray/cfp"; extra_functions="mulwwc90"], [add_path="cray/cfp"; extra_functions="mulwwj90"]) -m4trace:configure.in:1999: -1- AC_PROG_EGREP -m4trace:configure.in:1999: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.in:1999: -1- m4_pattern_allow([^EGREP$]) -m4trace:configure.in:2043: -1- GMP_ASM_X86_MMX([], [GMP_STRIP_PATH(*mmx*)]) -m4trace:configure.in:2043: -1- GMP_TRY_ASSEMBLE([ .text +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2074: -1- AM_CONDITIONAL([WANT_CXX], [test $want_cxx = yes]) +m4trace:configure.in:2074: -1- m4_pattern_allow([^WANT_CXX_TRUE$]) +m4trace:configure.in:2074: -1- m4_pattern_allow([^WANT_CXX_FALSE$]) +m4trace:configure.in:2074: -1- _AM_SUBST_NOTMAKE([WANT_CXX_TRUE]) +m4trace:configure.in:2074: -1- _AM_SUBST_NOTMAKE([WANT_CXX_FALSE]) +m4trace:configure.in:2082: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.in:2082: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2082: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.in:2089: -1- GMP_CRAY_OPTIONS([add_path="cray/ieee"], [add_path="cray/cfp"; extra_functions="mulwwc90"], [add_path="cray/cfp"; extra_functions="mulwwj90"]) +m4trace:configure.in:2089: -1- AC_PROG_EGREP +m4trace:configure.in:2089: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.in:2089: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.in:2133: -1- GMP_ASM_X86_MMX([], [GMP_STRIP_PATH(*mmx*)]) +m4trace:configure.in:2133: -1- GMP_TRY_ASSEMBLE([ .text movq %mm0, %mm1], [gmp_cv_asm_x86_mmx=yes case $host in *-*-solaris*) @@ -7210,723 +7267,719 @@ AC_MSG_WARN(["dis" not available to check for "as" movq bug]) fi esac], [gmp_cv_asm_x86_mmx=no]) -m4trace:configure.in:2043: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2495: GMP_ASM_X86_MMX is expanded from... -configure.in:2043: the top level]) -m4trace:configure.in:2043: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2495: GMP_ASM_X86_MMX is expanded from... -configure.in:2043: the top level]) -m4trace:configure.in:2043: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2495: GMP_ASM_X86_MMX is expanded from... -configure.in:2043: the top level]) -m4trace:configure.in:2043: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2495: GMP_ASM_X86_MMX is expanded from... -configure.in:2043: the top level]) -m4trace:configure.in:2046: -1- GMP_ASM_X86_SSE2([], [GMP_STRIP_PATH(sse2)]) -m4trace:configure.in:2046: -1- GMP_TRY_ASSEMBLE([ .text +m4trace:configure.in:2133: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2497: GMP_ASM_X86_MMX is expanded from... +configure.in:2133: the top level]) +m4trace:configure.in:2133: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2497: GMP_ASM_X86_MMX is expanded from... +configure.in:2133: the top level]) +m4trace:configure.in:2133: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2497: GMP_ASM_X86_MMX is expanded from... +configure.in:2133: the top level]) +m4trace:configure.in:2133: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2497: GMP_ASM_X86_MMX is expanded from... +configure.in:2133: the top level]) +m4trace:configure.in:2136: -1- GMP_ASM_X86_SSE2([], [GMP_STRIP_PATH(sse2)]) +m4trace:configure.in:2136: -1- GMP_TRY_ASSEMBLE([ .text paddq %mm0, %mm1], [gmp_cv_asm_x86_sse2=yes], [gmp_cv_asm_x86_sse2=no]) -m4trace:configure.in:2046: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2574: GMP_ASM_X86_SSE2 is expanded from... -configure.in:2046: the top level]) -m4trace:configure.in:2046: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2574: GMP_ASM_X86_SSE2 is expanded from... -configure.in:2046: the top level]) -m4trace:configure.in:2046: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2574: GMP_ASM_X86_SSE2 is expanded from... -configure.in:2046: the top level]) -m4trace:configure.in:2046: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2574: GMP_ASM_X86_SSE2 is expanded from... -configure.in:2046: the top level]) -m4trace:configure.in:2053: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -configure.in:2053: the top level]) -m4trace:configure.in:2076: -1- AM_C_PROTOTYPES -m4trace:configure.in:2076: -1- m4_pattern_allow([^PROTOTYPES$]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^__PROTOTYPES$]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^HAVE_STRING_H$]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^U$]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^ANSI2KNR$]) -m4trace:configure.in:2076: -1- _AM_SUBST_NOTMAKE([ANSI2KNR]) -m4trace:configure.in:2078: -1- CL_AS_NOEXECSTACK -m4trace:configure.in:2078: -1- m4_pattern_allow([^ASMFLAGS$]) -m4trace:configure.in:2080: -1- GMP_PROG_AR -m4trace:configure.in:2080: -1- m4_pattern_allow([^AR$]) -m4trace:configure.in:2081: -1- GMP_PROG_NM -m4trace:configure.in:2081: -1- AC_PROG_NM -m4trace:configure.in:2081: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3258: AC_PROG_NM is expanded from... -acinclude.m4:403: GMP_PROG_NM is expanded from... -configure.in:2081: the top level]) -m4trace:configure.in:2081: -1- LT_PATH_NM -m4trace:configure.in:2081: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^NM$]) -m4trace:configure.in:2081: -1- AC_PROG_NM -m4trace:configure.in:2081: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3258: AC_PROG_NM is expanded from... -acinclude.m4:403: GMP_PROG_NM is expanded from... -configure.in:2081: the top level]) -m4trace:configure.in:2081: -1- LT_PATH_NM -m4trace:configure.in:2081: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^NM$]) -m4trace:configure.in:2102: -1- AC_LIBTOOL_WIN32_DLL -m4trace:configure.in:2102: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/ltoptions.m4:145: AC_LIBTOOL_WIN32_DLL is expanded from... -configure.in:2102: the top level]) -m4trace:configure.in:2102: -1- m4_pattern_allow([^AS$]) -m4trace:configure.in:2102: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.in:2102: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.in:2102: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.], [/usr/share/aclocal/ltoptions.m4:145: AC_LIBTOOL_WIN32_DLL is expanded from... -configure.in:2102: the top level]) -m4trace:configure.in:2104: -1- m4_pattern_allow([^LIBGMP_DLL$]) -m4trace:configure.in:2192: -1- AC_PROG_LIBTOOL -m4trace:configure.in:2192: -1- _m4_warn([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/libtool.m4:102: AC_PROG_LIBTOOL is expanded from... +m4trace:configure.in:2136: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2576: GMP_ASM_X86_SSE2 is expanded from... +configure.in:2136: the top level]) +m4trace:configure.in:2136: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2576: GMP_ASM_X86_SSE2 is expanded from... +configure.in:2136: the top level]) +m4trace:configure.in:2136: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2576: GMP_ASM_X86_SSE2 is expanded from... +configure.in:2136: the top level]) +m4trace:configure.in:2136: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2576: GMP_ASM_X86_SSE2 is expanded from... +configure.in:2136: the top level]) +m4trace:configure.in:2143: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +configure.in:2143: the top level]) +m4trace:configure.in:2166: -1- AM_C_PROTOTYPES +m4trace:configure.in:2166: -1- m4_pattern_allow([^PROTOTYPES$]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^__PROTOTYPES$]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^HAVE_STRING_H$]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^U$]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^ANSI2KNR$]) +m4trace:configure.in:2166: -1- _AM_SUBST_NOTMAKE([ANSI2KNR]) +m4trace:configure.in:2168: -1- CL_AS_NOEXECSTACK +m4trace:configure.in:2168: -1- m4_pattern_allow([^ASMFLAGS$]) +m4trace:configure.in:2170: -1- GMP_PROG_AR +m4trace:configure.in:2170: -1- m4_pattern_allow([^AR$]) +m4trace:configure.in:2171: -1- GMP_PROG_NM +m4trace:configure.in:2171: -1- AC_PROG_NM +m4trace:configure.in:2171: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. +You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3444: AC_PROG_NM is expanded from... +acinclude.m4:404: GMP_PROG_NM is expanded from... +configure.in:2171: the top level]) +m4trace:configure.in:2171: -1- LT_PATH_NM +m4trace:configure.in:2171: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^NM$]) +m4trace:configure.in:2171: -1- AC_PROG_NM +m4trace:configure.in:2171: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. +You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3444: AC_PROG_NM is expanded from... +acinclude.m4:404: GMP_PROG_NM is expanded from... +configure.in:2171: the top level]) +m4trace:configure.in:2171: -1- LT_PATH_NM +m4trace:configure.in:2171: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^NM$]) +m4trace:configure.in:2192: -1- AC_LIBTOOL_WIN32_DLL +m4trace:configure.in:2192: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. +You should run autoupdate.], [/usr/share/aclocal/ltoptions.m4:146: AC_LIBTOOL_WIN32_DLL is expanded from... configure.in:2192: the top level]) -m4trace:configure.in:2192: -1- LT_INIT -m4trace:configure.in:2192: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) -m4trace:configure.in:2192: -1- LTOPTIONS_VERSION -m4trace:configure.in:2192: -1- LTSUGAR_VERSION -m4trace:configure.in:2192: -1- LTVERSION_VERSION -m4trace:configure.in:2192: -1- LTOBSOLETE_VERSION -m4trace:configure.in:2192: -1- _LT_PROG_LTMAIN -m4trace:configure.in:2192: -1- m4_pattern_allow([^LIBTOOL$]) -m4trace:configure.in:2192: -1- LT_PATH_LD -m4trace:configure.in:2192: -1- m4_pattern_allow([^SED$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^FGREP$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LD$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LN_S$]) -m4trace:configure.in:2192: -1- LT_CMD_MAX_LEN -m4trace:configure.in:2192: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.in:2192: -1- m4_pattern_allow([^AS$]) +m4trace:configure.in:2192: -1- m4_pattern_allow([^DLLTOOL$]) m4trace:configure.in:2192: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^AR$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([LT_OBJDIR]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LT_OBJDIR$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^lt_ECHO$]) -m4trace:configure.in:2192: -1- _LT_CC_BASENAME([$compiler]) -m4trace:configure.in:2192: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) -m4trace:configure.in:2192: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) -m4trace:configure.in:2192: -1- LT_SUPPORTED_TAG([CC]) -m4trace:configure.in:2192: -1- _LT_COMPILER_BOILERPLATE -m4trace:configure.in:2192: -1- _LT_LINKER_BOILERPLATE -m4trace:configure.in:2192: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) -m4trace:configure.in:2192: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in +m4trace:configure.in:2192: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.], [/usr/share/aclocal/ltoptions.m4:146: AC_LIBTOOL_WIN32_DLL is expanded from... +configure.in:2192: the top level]) +m4trace:configure.in:2194: -1- m4_pattern_allow([^LIBGMP_DLL$]) +m4trace:configure.in:2282: -1- AC_PROG_LIBTOOL +m4trace:configure.in:2282: -1- _m4_warn([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. +You should run autoupdate.], [/usr/share/aclocal/libtool.m4:107: AC_PROG_LIBTOOL is expanded from... +configure.in:2282: the top level]) +m4trace:configure.in:2282: -1- LT_INIT +m4trace:configure.in:2282: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) +m4trace:configure.in:2282: -1- LTOPTIONS_VERSION +m4trace:configure.in:2282: -1- LTSUGAR_VERSION +m4trace:configure.in:2282: -1- LTVERSION_VERSION +m4trace:configure.in:2282: -1- LTOBSOLETE_VERSION +m4trace:configure.in:2282: -1- _LT_PROG_LTMAIN +m4trace:configure.in:2282: -1- m4_pattern_allow([^LIBTOOL$]) +m4trace:configure.in:2282: -1- _LT_PREPARE_SED_QUOTE_VARS +m4trace:configure.in:2282: -1- _LT_PROG_ECHO_BACKSLASH +m4trace:configure.in:2282: -1- LT_PATH_LD +m4trace:configure.in:2282: -1- m4_pattern_allow([^SED$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^FGREP$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LD$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.in:2282: -1- LT_CMD_MAX_LEN +m4trace:configure.in:2282: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^AR$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^ac_ct_AR$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.in:2282: -1- _LT_WITH_SYSROOT +m4trace:configure.in:2282: -1- m4_pattern_allow([LT_OBJDIR]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LT_OBJDIR$]) +m4trace:configure.in:2282: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.in:2282: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) +m4trace:configure.in:2282: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) +m4trace:configure.in:2282: -1- LT_SUPPORTED_TAG([CC]) +m4trace:configure.in:2282: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.in:2282: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.in:2282: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"]) +m4trace:configure.in:2282: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, )=" $_LT_TAGVAR(lt_prog_compiler_pic, )" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, )= _LT_TAGVAR(lt_prog_compiler_can_build_shared, )=no]) -m4trace:configure.in:2192: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^DSYMUTIL$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^NMEDIT$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LIPO$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^OTOOL$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^OTOOL64$]) -m4trace:configure.in:2192: -1- LT_SYS_DLOPEN_SELF -m4trace:configure.in:2192: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) -m4trace:configure.in:2192: -1- LT_LANG([CXX]) -m4trace:configure.in:2192: -1- LT_SUPPORTED_TAG([CXX]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXXFLAGS$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^ac_ct_CXX$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.in:2192: -1- _LT_COMPILER_BOILERPLATE -m4trace:configure.in:2192: -1- _LT_LINKER_BOILERPLATE -m4trace:configure.in:2192: -1- _LT_CC_BASENAME([$compiler]) -m4trace:configure.in:2192: -1- LT_PATH_LD -m4trace:configure.in:2192: -1- m4_pattern_allow([^LD$]) -m4trace:configure.in:2192: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, CXX) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, CXX)], [$_LT_TAGVAR(lt_prog_compiler_pic, CXX)@&t@m4_if([CXX],[],[ -DPIC],[m4_if([CXX],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, CXX) in +m4trace:configure.in:2282: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^MANIFEST_TOOL$]) +m4trace:configure.in:2282: -1- _LT_REQUIRED_DARWIN_CHECKS +m4trace:configure.in:2282: -1- m4_pattern_allow([^DSYMUTIL$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^NMEDIT$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LIPO$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^OTOOL$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^OTOOL64$]) +m4trace:configure.in:2282: -1- _LT_LINKER_OPTION([if $CC understands -b], [lt_cv_prog_compiler__b], [-b], [_LT_TAGVAR(archive_cmds, )='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, )='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags']) +m4trace:configure.in:2282: -1- LT_SYS_DLOPEN_SELF +m4trace:configure.in:2282: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) +m4trace:configure.in:2282: -1- LT_LANG([CXX]) +m4trace:configure.in:2282: -1- LT_SUPPORTED_TAG([CXX]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.in:2282: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.in:2282: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.in:2282: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.in:2282: -1- LT_PATH_LD +m4trace:configure.in:2282: -1- m4_pattern_allow([^LD$]) +m4trace:configure.in:2282: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, CXX) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, CXX)], [$_LT_TAGVAR(lt_prog_compiler_pic, CXX)@&t@m4_if([CXX],[],[ -DPIC],[m4_if([CXX],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, CXX) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, CXX)=" $_LT_TAGVAR(lt_prog_compiler_pic, CXX)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, CXX)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, CXX)=no]) -m4trace:configure.in:2192: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_CXX], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, CXX)=]) -m4trace:configure.in:2192: -1- LT_LANG([F77]) -m4trace:configure.in:2192: -1- LT_SUPPORTED_TAG([F77]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^F77$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^FFLAGS$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^F77$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^ac_ct_F77$]) -m4trace:configure.in:2192: -1- _LT_COMPILER_BOILERPLATE -m4trace:configure.in:2192: -1- _LT_LINKER_BOILERPLATE -m4trace:configure.in:2192: -1- _LT_CC_BASENAME([$compiler]) -m4trace:configure.in:2192: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, F77) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, F77)], [$_LT_TAGVAR(lt_prog_compiler_pic, F77)@&t@m4_if([F77],[],[ -DPIC],[m4_if([F77],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, F77) in +m4trace:configure.in:2282: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_CXX], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, CXX)=]) +m4trace:configure.in:2282: -1- LT_LANG([F77]) +m4trace:configure.in:2282: -1- LT_SUPPORTED_TAG([F77]) +m4trace:configure.in:2282: -1- _LT_COMPILER_BOILERPLATE +m4trace:configure.in:2282: -1- _LT_LINKER_BOILERPLATE +m4trace:configure.in:2282: -1- _LT_CC_BASENAME([$compiler]) +m4trace:configure.in:2282: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, F77) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, F77)], [$_LT_TAGVAR(lt_prog_compiler_pic, F77)@&t@m4_if([F77],[],[ -DPIC],[m4_if([F77],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, F77) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, F77)=" $_LT_TAGVAR(lt_prog_compiler_pic, F77)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, F77)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, F77)=no]) -m4trace:configure.in:2192: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_F77], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, F77)=]) -m4trace:configure.in:2206: -1- AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) -m4trace:configure.in:2206: -1- m4_pattern_allow([^ENABLE_STATIC_TRUE$]) -m4trace:configure.in:2206: -1- m4_pattern_allow([^ENABLE_STATIC_FALSE$]) -m4trace:configure.in:2206: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_TRUE]) -m4trace:configure.in:2206: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_FALSE]) -m4trace:configure.in:2212: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.in:2213: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.in:2243: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H$]) -m4trace:configure.in:2256: -1- m4_pattern_allow([^HAVE_SYS_SYSCTL_H$]) -m4trace:configure.in:2262: -1- m4_pattern_allow([^HAVE_MACHINE_HAL_SYSINFO_H$]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_FGETC$]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_FSCANF$]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_OPTARG$]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_UNGETC$]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_VFPRINTF$]) -m4trace:configure.in:2279: -1- m4_pattern_allow([^HAVE_DECL_SYS_ERRLIST$]) -m4trace:configure.in:2279: -1- m4_pattern_allow([^HAVE_DECL_SYS_NERR$]) -m4trace:configure.in:2283: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. +m4trace:configure.in:2282: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works_F77], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, F77)=]) +m4trace:configure.in:2296: -1- AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) +m4trace:configure.in:2296: -1- m4_pattern_allow([^ENABLE_STATIC_TRUE$]) +m4trace:configure.in:2296: -1- m4_pattern_allow([^ENABLE_STATIC_FALSE$]) +m4trace:configure.in:2296: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_TRUE]) +m4trace:configure.in:2296: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_FALSE]) +m4trace:configure.in:2302: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.in:2303: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) +m4trace:configure.in:2333: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H$]) +m4trace:configure.in:2346: -1- m4_pattern_allow([^HAVE_SYS_SYSCTL_H$]) +m4trace:configure.in:2352: -1- m4_pattern_allow([^HAVE_MACHINE_HAL_SYSINFO_H$]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_FGETC$]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_FSCANF$]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_OPTARG$]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_UNGETC$]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_VFPRINTF$]) +m4trace:configure.in:2369: -1- m4_pattern_allow([^HAVE_DECL_SYS_ERRLIST$]) +m4trace:configure.in:2369: -1- m4_pattern_allow([^HAVE_DECL_SYS_NERR$]) +m4trace:configure.in:2373: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:738: AC_TYPE_SIGNAL is expanded from... -configure.in:2283: the top level]) -m4trace:configure.in:2283: -1- m4_pattern_allow([^RETSIGTYPE$]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_INTMAX_T$]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_LONG_DOUBLE$]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_LONG_LONG$]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_QUAD_T$]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_UINT_LEAST32_T$]) -m4trace:configure.in:2297: -1- m4_pattern_allow([^HAVE_STRINGIZE$]) -m4trace:configure.in:2302: -1- m4_pattern_allow([^volatile$]) -m4trace:configure.in:2304: -1- m4_pattern_allow([^restrict$]) -m4trace:configure.in:2304: -1- m4_pattern_allow([^restrict$]) -m4trace:configure.in:2306: -1- GMP_C_STDARG -m4trace:configure.in:2306: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3341: GMP_C_STDARG is expanded from... -configure.in:2306: the top level]) -m4trace:configure.in:2306: -1- m4_pattern_allow([^HAVE_STDARG$]) -m4trace:configure.in:2307: -1- GMP_C_ATTRIBUTE_CONST -m4trace:configure.in:2307: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3011: GMP_C_ATTRIBUTE_CONST is expanded from... -configure.in:2307: the top level]) -m4trace:configure.in:2307: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_CONST$]) -m4trace:configure.in:2308: -1- GMP_C_ATTRIBUTE_MALLOC -m4trace:configure.in:2308: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3030: GMP_C_ATTRIBUTE_MALLOC is expanded from... -configure.in:2308: the top level]) -m4trace:configure.in:2308: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MALLOC$]) -m4trace:configure.in:2309: -1- GMP_C_ATTRIBUTE_MODE -m4trace:configure.in:2309: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3060: GMP_C_ATTRIBUTE_MODE is expanded from... -configure.in:2309: the top level]) -m4trace:configure.in:2309: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MODE$]) -m4trace:configure.in:2310: -1- GMP_C_ATTRIBUTE_NORETURN -m4trace:configure.in:2310: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3076: GMP_C_ATTRIBUTE_NORETURN is expanded from... -configure.in:2310: the top level]) -m4trace:configure.in:2310: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_NORETURN$]) -m4trace:configure.in:2312: -1- GMP_H_EXTERN_INLINE -m4trace:configure.in:2312: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -acinclude.m4:3617: GMP_H_EXTERN_INLINE is expanded from... -configure.in:2312: the top level]) -m4trace:configure.in:2315: -1- AC_CHECK_LIBM -m4trace:configure.in:2315: -1- _m4_warn([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. -You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3286: AC_CHECK_LIBM is expanded from... -configure.in:2315: the top level]) -m4trace:configure.in:2315: -1- LT_LIB_M -m4trace:configure.in:2315: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.in:2316: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.in:2318: -1- GMP_FUNC_ALLOCA -m4trace:configure.in:2318: -1- GMP_HEADER_ALLOCA -m4trace:configure.in:2318: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2654: AC_TRY_LINK is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3386: GMP_HEADER_ALLOCA is expanded from... -acinclude.m4:3370: GMP_FUNC_ALLOCA is expanded from... -configure.in:2318: the top level]) -m4trace:configure.in:2318: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) -m4trace:configure.in:2318: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2654: AC_TRY_LINK is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3370: GMP_FUNC_ALLOCA is expanded from... -configure.in:2318: the top level]) -m4trace:configure.in:2318: -1- m4_pattern_allow([^HAVE_ALLOCA$]) -m4trace:configure.in:2319: -1- GMP_OPTION_ALLOCA -m4trace:configure.in:2319: -1- m4_pattern_allow([^WANT_TMP_ALLOCA$]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^WANT_TMP_REENTRANT$]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^WANT_TMP_NOTREENTRANT$]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^WANT_TMP_DEBUG$]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^TAL_OBJECT$]) -m4trace:configure.in:2321: -1- GMP_H_HAVE_FILE -m4trace:configure.in:2321: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -acinclude.m4:3644: GMP_H_HAVE_FILE is expanded from... -configure.in:2321: the top level]) -m4trace:configure.in:2323: -1- m4_pattern_allow([^HAVE_LIMB_BIG_ENDIAN$]) -m4trace:configure.in:2323: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_LIMB_BIG_ENDIAN')"], [POST]) -m4trace:configure.in:2323: -1- m4_pattern_allow([^HAVE_LIMB_LITTLE_ENDIAN$]) -m4trace:configure.in:2323: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_LIMB_LITTLE_ENDIAN')"], [POST]) -m4trace:configure.in:2323: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) -m4trace:configure.in:2336: -1- GMP_C_DOUBLE_FORMAT -m4trace:configure.in:2336: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3103: GMP_C_DOUBLE_FORMAT is expanded from... -configure.in:2336: the top level]) -m4trace:configure.in:2336: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3103: GMP_C_DOUBLE_FORMAT is expanded from... -configure.in:2336: the top level]) -m4trace:configure.in:2336: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3103: GMP_C_DOUBLE_FORMAT is expanded from... -configure.in:2336: the top level]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_BIG_ENDIAN$]) -m4trace:configure.in:2336: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_DOUBLE_IEEE_BIG_ENDIAN')"], [POST]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_ENDIAN$]) -m4trace:configure.in:2336: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')"], [POST]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_SWAPPED$]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_D$]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_G$]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_CRAY_CFP$]) -m4trace:configure.in:2374: -1- GMP_FUNC_VSNPRINTF -m4trace:configure.in:2374: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2731: AC_TRY_RUN is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3513: GMP_FUNC_VSNPRINTF is expanded from... -configure.in:2374: the top level]) -m4trace:configure.in:2374: -1- m4_pattern_allow([^HAVE_VSNPRINTF$]) -m4trace:configure.in:2375: -1- GMP_FUNC_SSCANF_WRITABLE_INPUT -m4trace:configure.in:2375: -1- m4_pattern_allow([^SSCANF_WRITABLE_INPUT$]) -m4trace:configure.in:2380: -1- m4_pattern_allow([^HAVE_PSP_ITICKSPERCLKTICK$]) -m4trace:configure.in:2395: -1- m4_pattern_allow([^HAVE_SSTREAM$]) -m4trace:configure.in:2396: -1- m4_pattern_allow([^HAVE_STD__LOCALE$]) -m4trace:configure.in:2537: -1- m4_pattern_allow([^WANT_FAT_BINARY$]) -m4trace:configure.in:2538: -1- GMP_DEFINE([WANT_FAT_BINARY], [yes]) -m4trace:configure.in:2943: -1- GMP_PROG_M4 -m4trace:configure.in:2943: -1- m4_pattern_allow([^M4$]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- m4_pattern_allow([^M4$]) -m4trace:configure.in:2944: -1- GMP_M4_M4WRAP_SPURIOUS -m4trace:configure.in:2944: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:359: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.in:2944: the top level]) -m4trace:configure.in:2944: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:359: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.in:2944: the top level]) -m4trace:configure.in:2944: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:359: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.in:2944: the top level]) -m4trace:configure.in:2944: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_m4_m4wrap_spurious>)"]) -m4trace:configure.in:2955: -1- GMP_ASM_TEXT -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2955: -1- GMP_TRY_ASSEMBLE([ $i], [gmp_cv_asm_text=$i +configure.in:2373: the top level]) +m4trace:configure.in:2373: -1- m4_pattern_allow([^RETSIGTYPE$]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_INTMAX_T$]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_LONG_DOUBLE$]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_LONG_LONG$]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_QUAD_T$]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_UINT_LEAST32_T$]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_INTPTR_T$]) +m4trace:configure.in:2388: -1- m4_pattern_allow([^HAVE_STRINGIZE$]) +m4trace:configure.in:2393: -1- m4_pattern_allow([^volatile$]) +m4trace:configure.in:2395: -1- m4_pattern_allow([^restrict$]) +m4trace:configure.in:2395: -1- m4_pattern_allow([^restrict$]) +m4trace:configure.in:2397: -1- GMP_C_STDARG +m4trace:configure.in:2397: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3343: GMP_C_STDARG is expanded from... +configure.in:2397: the top level]) +m4trace:configure.in:2397: -1- m4_pattern_allow([^HAVE_STDARG$]) +m4trace:configure.in:2398: -1- GMP_C_ATTRIBUTE_CONST +m4trace:configure.in:2398: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3013: GMP_C_ATTRIBUTE_CONST is expanded from... +configure.in:2398: the top level]) +m4trace:configure.in:2398: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_CONST$]) +m4trace:configure.in:2399: -1- GMP_C_ATTRIBUTE_MALLOC +m4trace:configure.in:2399: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3032: GMP_C_ATTRIBUTE_MALLOC is expanded from... +configure.in:2399: the top level]) +m4trace:configure.in:2399: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MALLOC$]) +m4trace:configure.in:2400: -1- GMP_C_ATTRIBUTE_MODE +m4trace:configure.in:2400: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3062: GMP_C_ATTRIBUTE_MODE is expanded from... +configure.in:2400: the top level]) +m4trace:configure.in:2400: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MODE$]) +m4trace:configure.in:2401: -1- GMP_C_ATTRIBUTE_NORETURN +m4trace:configure.in:2401: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3078: GMP_C_ATTRIBUTE_NORETURN is expanded from... +configure.in:2401: the top level]) +m4trace:configure.in:2401: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_NORETURN$]) +m4trace:configure.in:2403: -1- GMP_H_EXTERN_INLINE +m4trace:configure.in:2403: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +acinclude.m4:3619: GMP_H_EXTERN_INLINE is expanded from... +configure.in:2403: the top level]) +m4trace:configure.in:2406: -1- AC_CHECK_LIBM +m4trace:configure.in:2406: -1- _m4_warn([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. +You should run autoupdate.], [/usr/share/aclocal/libtool.m4:3533: AC_CHECK_LIBM is expanded from... +configure.in:2406: the top level]) +m4trace:configure.in:2406: -1- LT_LIB_M +m4trace:configure.in:2406: -1- m4_pattern_allow([^LIBM$]) +m4trace:configure.in:2407: -1- m4_pattern_allow([^LIBM$]) +m4trace:configure.in:2409: -1- GMP_FUNC_ALLOCA +m4trace:configure.in:2409: -1- GMP_HEADER_ALLOCA +m4trace:configure.in:2409: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3388: GMP_HEADER_ALLOCA is expanded from... +acinclude.m4:3372: GMP_FUNC_ALLOCA is expanded from... +configure.in:2409: the top level]) +m4trace:configure.in:2409: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) +m4trace:configure.in:2409: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3372: GMP_FUNC_ALLOCA is expanded from... +configure.in:2409: the top level]) +m4trace:configure.in:2409: -1- m4_pattern_allow([^HAVE_ALLOCA$]) +m4trace:configure.in:2410: -1- GMP_OPTION_ALLOCA +m4trace:configure.in:2410: -1- m4_pattern_allow([^WANT_TMP_ALLOCA$]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^WANT_TMP_REENTRANT$]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^WANT_TMP_NOTREENTRANT$]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^WANT_TMP_DEBUG$]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^TAL_OBJECT$]) +m4trace:configure.in:2412: -1- GMP_H_HAVE_FILE +m4trace:configure.in:2412: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +acinclude.m4:3646: GMP_H_HAVE_FILE is expanded from... +configure.in:2412: the top level]) +m4trace:configure.in:2414: -1- m4_pattern_allow([^HAVE_LIMB_BIG_ENDIAN$]) +m4trace:configure.in:2414: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_LIMB_BIG_ENDIAN')"], [POST]) +m4trace:configure.in:2414: -1- m4_pattern_allow([^HAVE_LIMB_LITTLE_ENDIAN$]) +m4trace:configure.in:2414: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_LIMB_LITTLE_ENDIAN')"], [POST]) +m4trace:configure.in:2414: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) +m4trace:configure.in:2427: -1- GMP_C_DOUBLE_FORMAT +m4trace:configure.in:2427: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3105: GMP_C_DOUBLE_FORMAT is expanded from... +configure.in:2427: the top level]) +m4trace:configure.in:2427: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3105: GMP_C_DOUBLE_FORMAT is expanded from... +configure.in:2427: the top level]) +m4trace:configure.in:2427: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3105: GMP_C_DOUBLE_FORMAT is expanded from... +configure.in:2427: the top level]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_BIG_ENDIAN$]) +m4trace:configure.in:2427: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_DOUBLE_IEEE_BIG_ENDIAN')"], [POST]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_ENDIAN$]) +m4trace:configure.in:2427: -1- GMP_DEFINE_RAW(["define_not_for_expansion(\`HAVE_DOUBLE_IEEE_LITTLE_ENDIAN')"], [POST]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_SWAPPED$]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_D$]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_G$]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_CRAY_CFP$]) +m4trace:configure.in:2465: -1- GMP_FUNC_VSNPRINTF +m4trace:configure.in:2465: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2765: AC_TRY_RUN is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3515: GMP_FUNC_VSNPRINTF is expanded from... +configure.in:2465: the top level]) +m4trace:configure.in:2465: -1- m4_pattern_allow([^HAVE_VSNPRINTF$]) +m4trace:configure.in:2466: -1- GMP_FUNC_SSCANF_WRITABLE_INPUT +m4trace:configure.in:2466: -1- m4_pattern_allow([^SSCANF_WRITABLE_INPUT$]) +m4trace:configure.in:2471: -1- m4_pattern_allow([^HAVE_PSP_ITICKSPERCLKTICK$]) +m4trace:configure.in:2486: -1- m4_pattern_allow([^HAVE_SSTREAM$]) +m4trace:configure.in:2487: -1- m4_pattern_allow([^HAVE_STD__LOCALE$]) +m4trace:configure.in:2656: -1- m4_pattern_allow([^WANT_FAT_BINARY$]) +m4trace:configure.in:2657: -1- GMP_DEFINE([WANT_FAT_BINARY], [yes]) +m4trace:configure.in:3084: -1- GMP_PROG_M4 +m4trace:configure.in:3084: -1- m4_pattern_allow([^M4$]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- m4_pattern_allow([^M4$]) +m4trace:configure.in:3085: -1- GMP_M4_M4WRAP_SPURIOUS +m4trace:configure.in:3085: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:360: GMP_M4_M4WRAP_SPURIOUS is expanded from... +configure.in:3085: the top level]) +m4trace:configure.in:3085: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:360: GMP_M4_M4WRAP_SPURIOUS is expanded from... +configure.in:3085: the top level]) +m4trace:configure.in:3085: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:360: GMP_M4_M4WRAP_SPURIOUS is expanded from... +configure.in:3085: the top level]) +m4trace:configure.in:3085: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_m4_m4wrap_spurious>)"]) +m4trace:configure.in:3099: -1- GMP_ASM_TEXT +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3099: -1- GMP_TRY_ASSEMBLE([ $i], [gmp_cv_asm_text=$i rm -f conftest* break]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2956: -1- GMP_ASM_DATA -m4trace:configure.in:2957: -1- GMP_ASM_LABEL_SUFFIX -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3100: -1- GMP_ASM_DATA +m4trace:configure.in:3101: -1- GMP_ASM_LABEL_SUFFIX +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text somelabel$i], [gmp_cv_asm_label_suffix=$i rm -f conftest* break], [cat conftest.out >&AC_FD_CC]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2958: -1- GMP_ASM_GLOBL -m4trace:configure.in:2959: -1- GMP_ASM_GLOBL_ATTR -m4trace:configure.in:2960: -1- GMP_ASM_UNDERSCORE -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- GMP_DEFINE([GSYM_PREFIX], [_]) -m4trace:configure.in:2960: -1- GMP_DEFINE([GSYM_PREFIX], []) -m4trace:configure.in:2960: -1- GMP_DEFINE([GSYM_PREFIX], []) -m4trace:configure.in:2961: -1- GMP_ASM_RODATA -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2962: -1- GMP_ASM_TYPE -m4trace:configure.in:2962: -1- GMP_TRY_ASSEMBLE([ .type sym,${gmp_tmp_prefix}function], [if grep "\.type pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3102: -1- GMP_ASM_GLOBL +m4trace:configure.in:3103: -1- GMP_ASM_GLOBL_ATTR +m4trace:configure.in:3104: -1- GMP_ASM_UNDERSCORE +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- GMP_DEFINE([GSYM_PREFIX], [_]) +m4trace:configure.in:3104: -1- GMP_DEFINE([GSYM_PREFIX], []) +m4trace:configure.in:3104: -1- GMP_DEFINE([GSYM_PREFIX], []) +m4trace:configure.in:3105: -1- GMP_ASM_RODATA +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3106: -1- GMP_ASM_TYPE +m4trace:configure.in:3106: -1- GMP_TRY_ASSEMBLE([ .type sym,${gmp_tmp_prefix}function], [if grep "\.type pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; else gmp_cv_asm_type=".type \$1,${gmp_tmp_prefix}\$2" break fi]) -m4trace:configure.in:2962: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2045: GMP_ASM_TYPE is expanded from... -configure.in:2962: the top level]) -m4trace:configure.in:2962: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2045: GMP_ASM_TYPE is expanded from... -configure.in:2962: the top level]) -m4trace:configure.in:2962: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2045: GMP_ASM_TYPE is expanded from... -configure.in:2962: the top level]) -m4trace:configure.in:2962: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2045: GMP_ASM_TYPE is expanded from... -configure.in:2962: the top level]) -m4trace:configure.in:2963: -1- GMP_ASM_SIZE -m4trace:configure.in:2963: -1- GMP_TRY_ASSEMBLE([ .size sym,1], [if grep "\.size pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; +m4trace:configure.in:3106: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2047: GMP_ASM_TYPE is expanded from... +configure.in:3106: the top level]) +m4trace:configure.in:3106: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2047: GMP_ASM_TYPE is expanded from... +configure.in:3106: the top level]) +m4trace:configure.in:3106: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2047: GMP_ASM_TYPE is expanded from... +configure.in:3106: the top level]) +m4trace:configure.in:3106: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2047: GMP_ASM_TYPE is expanded from... +configure.in:3106: the top level]) +m4trace:configure.in:3107: -1- GMP_ASM_SIZE +m4trace:configure.in:3107: -1- GMP_TRY_ASSEMBLE([ .size sym,1], [if grep "\.size pseudo-op used outside of \.def/\.endef ignored" conftest.out >/dev/null; then : ; else gmp_cv_asm_size=".size \$1,\$2" fi]) -m4trace:configure.in:2963: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2067: GMP_ASM_SIZE is expanded from... -configure.in:2963: the top level]) -m4trace:configure.in:2963: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2067: GMP_ASM_SIZE is expanded from... -configure.in:2963: the top level]) -m4trace:configure.in:2963: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2067: GMP_ASM_SIZE is expanded from... -configure.in:2963: the top level]) -m4trace:configure.in:2963: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2067: GMP_ASM_SIZE is expanded from... -configure.in:2963: the top level]) -m4trace:configure.in:2964: -1- GMP_ASM_LSYM_PREFIX -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3107: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2069: GMP_ASM_SIZE is expanded from... +configure.in:3107: the top level]) +m4trace:configure.in:3107: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2069: GMP_ASM_SIZE is expanded from... +configure.in:3107: the top level]) +m4trace:configure.in:3107: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2069: GMP_ASM_SIZE is expanded from... +configure.in:3107: the top level]) +m4trace:configure.in:3107: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2069: GMP_ASM_SIZE is expanded from... +configure.in:3107: the top level]) +m4trace:configure.in:3108: -1- GMP_ASM_LSYM_PREFIX +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text dummy${gmp_cv_asm_label_suffix} ${gmp_tmp_pre}gurkmacka${gmp_cv_asm_label_suffix}], [if $NM conftest.$OBJEXT >conftest.nm 2>&AC_FD_CC; then : ; else cat conftest.nm >&AC_FD_CC @@ -7951,155 +8004,155 @@ echo "$gmp_tmp_pre label is something unknown" >&AC_FD_CC fi ]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- m4_pattern_allow([^LSYM_PREFIX$]) -m4trace:configure.in:2965: -1- GMP_ASM_W32 -m4trace:configure.in:2965: -1- GMP_ASM_BYTE -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- m4_pattern_allow([^LSYM_PREFIX$]) +m4trace:configure.in:3109: -1- GMP_ASM_W32 +m4trace:configure.in:3109: -1- GMP_ASM_BYTE +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data $i 0 ], [gmp_cv_asm_byte=$i rm -f conftest* break], [cat conftest.out >&AC_FD_CC]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data $gmp_cv_asm_globl foo $gmp_tmp_op 0 foo$gmp_cv_asm_label_suffix @@ -8109,40 +8162,40 @@ gmp_cv_asm_w32="$gmp_tmp_op" break fi]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2966: -1- GMP_ASM_ALIGN_LOG -m4trace:configure.in:2966: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3110: -1- GMP_ASM_ALIGN_LOG +m4trace:configure.in:3110: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_data .align 4 $gmp_cv_asm_globl foo $gmp_cv_asm_byte 1 @@ -8155,42 +8208,42 @@ else gmp_cv_asm_align_log=no fi], [AC_MSG_ERROR([cannot assemble alignment test])]) -m4trace:configure.in:2966: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1758: GMP_ASM_ALIGN_LOG is expanded from... -configure.in:2966: the top level]) -m4trace:configure.in:2966: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1758: GMP_ASM_ALIGN_LOG is expanded from... -configure.in:2966: the top level]) -m4trace:configure.in:2966: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1758: GMP_ASM_ALIGN_LOG is expanded from... -configure.in:2966: the top level]) -m4trace:configure.in:2966: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1758: GMP_ASM_ALIGN_LOG is expanded from... -configure.in:2966: the top level]) -m4trace:configure.in:2966: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_align_log>)"]) -m4trace:configure.in:2971: -1- GMP_INCLUDE_MPN([pa32/pa-defs.m4]) -m4trace:configure.in:2974: -1- GMP_ASM_IA64_ALIGN_OK -m4trace:configure.in:2974: -1- GMP_TRY_ASSEMBLE([ .text +m4trace:configure.in:3110: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1759: GMP_ASM_ALIGN_LOG is expanded from... +configure.in:3110: the top level]) +m4trace:configure.in:3110: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1759: GMP_ASM_ALIGN_LOG is expanded from... +configure.in:3110: the top level]) +m4trace:configure.in:3110: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1759: GMP_ASM_ALIGN_LOG is expanded from... +configure.in:3110: the top level]) +m4trace:configure.in:3110: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1759: GMP_ASM_ALIGN_LOG is expanded from... +configure.in:3110: the top level]) +m4trace:configure.in:3110: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_align_log>)"]) +m4trace:configure.in:3115: -1- GMP_INCLUDE_MPN([pa32/pa-defs.m4]) +m4trace:configure.in:3118: -1- GMP_ASM_IA64_ALIGN_OK +m4trace:configure.in:3118: -1- GMP_TRY_ASSEMBLE([ .text .align 32 { .mmi; add r14 = r15, r16 add r17 = r18, r19 @@ -8201,372 +8254,372 @@ add r29 = r30, r31 ;; } ], [gmp_cv_asm_ia64_align_ok=`od -b conftest.$OBJEXT | $AWK -f conftest.awk`], [AC_MSG_WARN([oops, cannot compile test program]) gmp_cv_asm_ia64_align_ok=yes]) -m4trace:configure.in:2974: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2710: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.in:2974: the top level]) -m4trace:configure.in:2974: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2710: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.in:2974: the top level]) -m4trace:configure.in:2974: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2710: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.in:2974: the top level]) -m4trace:configure.in:2974: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2710: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.in:2974: the top level]) -m4trace:configure.in:2974: -1- GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_ia64_align_ok'>)"]) -m4trace:configure.in:2977: -1- GMP_ASM_M68K_INSTRUCTION -m4trace:configure.in:2977: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3118: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2712: GMP_ASM_IA64_ALIGN_OK is expanded from... +configure.in:3118: the top level]) +m4trace:configure.in:3118: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2712: GMP_ASM_IA64_ALIGN_OK is expanded from... +configure.in:3118: the top level]) +m4trace:configure.in:3118: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2712: GMP_ASM_IA64_ALIGN_OK is expanded from... +configure.in:3118: the top level]) +m4trace:configure.in:3118: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2712: GMP_ASM_IA64_ALIGN_OK is expanded from... +configure.in:3118: the top level]) +m4trace:configure.in:3118: -1- GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_ia64_align_ok'>)"]) +m4trace:configure.in:3121: -1- GMP_ASM_M68K_INSTRUCTION +m4trace:configure.in:3121: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text $i], [gmp_cv_asm_m68k_instruction=$i rm -f conftest* break]) -m4trace:configure.in:2977: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2824: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.in:2977: the top level]) -m4trace:configure.in:2977: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2824: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.in:2977: the top level]) -m4trace:configure.in:2977: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2824: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.in:2977: the top level]) -m4trace:configure.in:2977: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2824: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.in:2977: the top level]) -m4trace:configure.in:2977: -1- GMP_DEFINE_RAW(["define(, <\`$want_register_percent'>)"]) -m4trace:configure.in:2977: -1- GMP_DEFINE_RAW(["define(, <\`$want_dot_size'>)"]) -m4trace:configure.in:2978: -1- GMP_ASM_M68K_ADDRESSING -m4trace:configure.in:2978: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3121: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2826: GMP_ASM_M68K_INSTRUCTION is expanded from... +configure.in:3121: the top level]) +m4trace:configure.in:3121: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2826: GMP_ASM_M68K_INSTRUCTION is expanded from... +configure.in:3121: the top level]) +m4trace:configure.in:3121: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2826: GMP_ASM_M68K_INSTRUCTION is expanded from... +configure.in:3121: the top level]) +m4trace:configure.in:3121: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2826: GMP_ASM_M68K_INSTRUCTION is expanded from... +configure.in:3121: the top level]) +m4trace:configure.in:3121: -1- GMP_DEFINE_RAW(["define(, <\`$want_register_percent'>)"]) +m4trace:configure.in:3121: -1- GMP_DEFINE_RAW(["define(, <\`$want_dot_size'>)"]) +m4trace:configure.in:3122: -1- GMP_ASM_M68K_ADDRESSING +m4trace:configure.in:3122: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text $movel $dreg, $areg@-], [gmp_cv_asm_m68k_addressing=mit], [GMP_TRY_ASSEMBLE( [ $gmp_cv_asm_text $movel $dreg, -($areg)], [gmp_cv_asm_m68k_addressing=motorola], [AC_MSG_ERROR([cannot determine assembler addressing style])])]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text $movel $dreg, -($areg)], [gmp_cv_asm_m68k_addressing=motorola], [AC_MSG_ERROR([cannot determine assembler addressing style])]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_m68k_addressing'>)"]) -m4trace:configure.in:2979: -1- GMP_ASM_M68K_BRANCHES -m4trace:configure.in:2979: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_m68k_addressing'>)"]) +m4trace:configure.in:3123: -1- GMP_ASM_M68K_BRANCHES +m4trace:configure.in:3123: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text foo$gmp_cv_asm_label_suffix $i foo], [gmp_cv_asm_m68k_branches=$i rm -f conftest* break]) -m4trace:configure.in:2979: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2892: GMP_ASM_M68K_BRANCHES is expanded from... -configure.in:2979: the top level]) -m4trace:configure.in:2979: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2892: GMP_ASM_M68K_BRANCHES is expanded from... -configure.in:2979: the top level]) -m4trace:configure.in:2979: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2892: GMP_ASM_M68K_BRANCHES is expanded from... -configure.in:2979: the top level]) -m4trace:configure.in:2979: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2892: GMP_ASM_M68K_BRANCHES is expanded from... -configure.in:2979: the top level]) -m4trace:configure.in:2979: -1- GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_m68k_branches'>)"]) -m4trace:configure.in:2982: -1- GMP_ASM_POWERPC_PIC_ALWAYS -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_powerpc_pic>)"]) -m4trace:configure.in:2983: -1- GMP_ASM_POWERPC_R_REGISTERS -m4trace:configure.in:2983: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3123: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2894: GMP_ASM_M68K_BRANCHES is expanded from... +configure.in:3123: the top level]) +m4trace:configure.in:3123: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2894: GMP_ASM_M68K_BRANCHES is expanded from... +configure.in:3123: the top level]) +m4trace:configure.in:3123: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2894: GMP_ASM_M68K_BRANCHES is expanded from... +configure.in:3123: the top level]) +m4trace:configure.in:3123: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2894: GMP_ASM_M68K_BRANCHES is expanded from... +configure.in:3123: the top level]) +m4trace:configure.in:3123: -1- GMP_DEFINE_RAW(["define(, <\`$gmp_cv_asm_m68k_branches'>)"]) +m4trace:configure.in:3126: -1- GMP_ASM_POWERPC_PIC_ALWAYS +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_powerpc_pic>)"]) +m4trace:configure.in:3127: -1- GMP_ASM_POWERPC_R_REGISTERS +m4trace:configure.in:3127: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text mtctr 6], [gmp_cv_asm_powerpc_r_registers=no], [GMP_TRY_ASSEMBLE( [ $gmp_cv_asm_text mtctr r6], [gmp_cv_asm_powerpc_r_registers=yes], [AC_MSG_ERROR([neither "mtctr 6" nor "mtctr r6" works])])]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text mtctr r6], [gmp_cv_asm_powerpc_r_registers=yes], [AC_MSG_ERROR([neither "mtctr 6" nor "mtctr r6" works])]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_powerpc_r_registers>)"]) -m4trace:configure.in:2984: -1- GMP_INCLUDE_MPN([powerpc32/powerpc-defs.m4]) -m4trace:configure.in:2988: -1- GMP_INCLUDE_MPN([powerpc64/aix.m4]) -m4trace:configure.in:2989: -1- GMP_INCLUDE_MPN([powerpc32/aix.m4]) -m4trace:configure.in:2994: -1- GMP_INCLUDE_MPN([powerpc64/elf.m4]) -m4trace:configure.in:2995: -1- GMP_INCLUDE_MPN([powerpc32/elf.m4]) -m4trace:configure.in:3000: -1- GMP_INCLUDE_MPN([powerpc64/darwin.m4]) -m4trace:configure.in:3001: -1- GMP_INCLUDE_MPN([powerpc32/darwin.m4]) -m4trace:configure.in:3006: -1- GMP_INCLUDE_MPN([powerpc32/eabi.m4]) -m4trace:configure.in:3011: -1- GMP_INCLUDE_MPN([powerpc32/aix.m4]) -m4trace:configure.in:3016: -1- GMP_ASM_SPARC_REGISTER -m4trace:configure.in:3016: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_powerpc_r_registers>)"]) +m4trace:configure.in:3128: -1- GMP_INCLUDE_MPN([powerpc32/powerpc-defs.m4]) +m4trace:configure.in:3132: -1- GMP_INCLUDE_MPN([powerpc64/aix.m4]) +m4trace:configure.in:3133: -1- GMP_INCLUDE_MPN([powerpc32/aix.m4]) +m4trace:configure.in:3138: -1- GMP_INCLUDE_MPN([powerpc64/elf.m4]) +m4trace:configure.in:3139: -1- GMP_INCLUDE_MPN([powerpc32/elf.m4]) +m4trace:configure.in:3144: -1- GMP_INCLUDE_MPN([powerpc64/darwin.m4]) +m4trace:configure.in:3145: -1- GMP_INCLUDE_MPN([powerpc32/darwin.m4]) +m4trace:configure.in:3150: -1- GMP_INCLUDE_MPN([powerpc32/eabi.m4]) +m4trace:configure.in:3155: -1- GMP_INCLUDE_MPN([powerpc32/aix.m4]) +m4trace:configure.in:3160: -1- GMP_ASM_SPARC_REGISTER +m4trace:configure.in:3160: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text .register %g2,#scratch ], [gmp_cv_asm_sparc_register=yes], [gmp_cv_asm_sparc_register=no]) -m4trace:configure.in:3016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2993: GMP_ASM_SPARC_REGISTER is expanded from... -configure.in:3016: the top level]) -m4trace:configure.in:3016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2993: GMP_ASM_SPARC_REGISTER is expanded from... -configure.in:3016: the top level]) -m4trace:configure.in:3016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2993: GMP_ASM_SPARC_REGISTER is expanded from... -configure.in:3016: the top level]) -m4trace:configure.in:3016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2993: GMP_ASM_SPARC_REGISTER is expanded from... -configure.in:3016: the top level]) -m4trace:configure.in:3016: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_sparc_register>)"]) -m4trace:configure.in:3021: -1- GMP_ASM_ALIGN_FILL_0x90 -m4trace:configure.in:3021: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3160: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2995: GMP_ASM_SPARC_REGISTER is expanded from... +configure.in:3160: the top level]) +m4trace:configure.in:3160: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2995: GMP_ASM_SPARC_REGISTER is expanded from... +configure.in:3160: the top level]) +m4trace:configure.in:3160: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2995: GMP_ASM_SPARC_REGISTER is expanded from... +configure.in:3160: the top level]) +m4trace:configure.in:3160: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2995: GMP_ASM_SPARC_REGISTER is expanded from... +configure.in:3160: the top level]) +m4trace:configure.in:3160: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_sparc_register>)"]) +m4trace:configure.in:3165: -1- GMP_ASM_ALIGN_FILL_0x90 +m4trace:configure.in:3165: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text .align 4, 0x90 .byte 0 .align 4, 0x90], [if grep "Warning: Fill parameter ignored for executable section" conftest.out >/dev/null; then @@ -8575,51 +8628,51 @@ else gmp_cv_asm_align_fill_0x90=yes fi], [gmp_cv_asm_align_fill_0x90=no]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_align_fill_0x90>)"]) -m4trace:configure.in:3024: -1- GMP_INCLUDE_MPN([x86/x86-defs.m4]) -m4trace:configure.in:3025: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86$]) -m4trace:configure.in:3026: -1- GMP_ASM_COFF_TYPE -m4trace:configure.in:3026: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- GMP_DEFINE_RAW(["define(,<$gmp_cv_asm_align_fill_0x90>)"]) +m4trace:configure.in:3168: -1- GMP_INCLUDE_MPN([x86/x86-defs.m4]) +m4trace:configure.in:3169: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86$]) +m4trace:configure.in:3170: -1- GMP_ASM_COFF_TYPE +m4trace:configure.in:3170: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text $gmp_cv_asm_globl ${tmp_gsym_prefix}foo$gmp_cv_asm_globl_attr .def ${tmp_gsym_prefix}foo .scl 2 @@ -8627,177 +8680,179 @@ .endef ${tmp_gsym_prefix}foo$gmp_cv_asm_label_suffix ], [gmp_cv_asm_x86_coff_type=yes], [gmp_cv_asm_x86_coff_type=no]) -m4trace:configure.in:3026: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2123: GMP_ASM_COFF_TYPE is expanded from... -configure.in:3026: the top level]) -m4trace:configure.in:3026: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2123: GMP_ASM_COFF_TYPE is expanded from... -configure.in:3026: the top level]) -m4trace:configure.in:3026: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2123: GMP_ASM_COFF_TYPE is expanded from... -configure.in:3026: the top level]) -m4trace:configure.in:3026: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2123: GMP_ASM_COFF_TYPE is expanded from... -configure.in:3026: the top level]) -m4trace:configure.in:3027: -1- GMP_ASM_X86_GOT_UNDERSCORE -m4trace:configure.in:3027: -1- AC_LIBTOOL_PROG_COMPILER_PIC -m4trace:configure.in:3027: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2323: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... -configure.in:3027: the top level]) -m4trace:configure.in:3027: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2323: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... -configure.in:3027: the top level]) -m4trace:configure.in:3027: -1- GMP_DEFINE([GOT_GSYM_PREFIX], [_]) -m4trace:configure.in:3027: -1- GMP_DEFINE([GOT_GSYM_PREFIX], []) -m4trace:configure.in:3028: -1- GMP_ASM_X86_SHLDL_CL -m4trace:configure.in:3028: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text +m4trace:configure.in:3170: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2125: GMP_ASM_COFF_TYPE is expanded from... +configure.in:3170: the top level]) +m4trace:configure.in:3170: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2125: GMP_ASM_COFF_TYPE is expanded from... +configure.in:3170: the top level]) +m4trace:configure.in:3170: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2125: GMP_ASM_COFF_TYPE is expanded from... +configure.in:3170: the top level]) +m4trace:configure.in:3170: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2125: GMP_ASM_COFF_TYPE is expanded from... +configure.in:3170: the top level]) +m4trace:configure.in:3171: -1- GMP_ASM_X86_GOT_UNDERSCORE +m4trace:configure.in:3171: -1- AC_LIBTOOL_PROG_COMPILER_PIC +m4trace:configure.in:3171: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2325: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... +configure.in:3171: the top level]) +m4trace:configure.in:3171: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2325: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... +configure.in:3171: the top level]) +m4trace:configure.in:3171: -1- GMP_DEFINE([GOT_GSYM_PREFIX], [_]) +m4trace:configure.in:3171: -1- GMP_DEFINE([GOT_GSYM_PREFIX], []) +m4trace:configure.in:3172: -1- GMP_ASM_X86_SHLDL_CL +m4trace:configure.in:3172: -1- GMP_TRY_ASSEMBLE([ $gmp_cv_asm_text shldl %cl, %eax, %ebx], [gmp_cv_asm_x86_shldl_cl=yes], [gmp_cv_asm_x86_shldl_cl=no]) -m4trace:configure.in:3028: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2547: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.in:3028: the top level]) -m4trace:configure.in:3028: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2547: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.in:3028: the top level]) -m4trace:configure.in:3028: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2547: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.in:3028: the top level]) -m4trace:configure.in:3028: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2547: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.in:3028: the top level]) -m4trace:configure.in:3028: -1- GMP_DEFINE([WANT_SHLDL_CL], [1]) -m4trace:configure.in:3028: -1- GMP_DEFINE([WANT_SHLDL_CL], [0]) -m4trace:configure.in:3030: -1- GMP_ASM_X86_MCOUNT -m4trace:configure.in:3030: -1- AC_ENABLE_SHARED -m4trace:configure.in:3030: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2637: GMP_ASM_X86_MCOUNT is expanded from... -configure.in:3030: the top level]) -m4trace:configure.in:3030: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2637: GMP_ASM_X86_MCOUNT is expanded from... -configure.in:3030: the top level]) -m4trace:configure.in:3030: -1- GMP_DEFINE_RAW(["define(, <\`$mcount_nonpic_reg'>)"]) -m4trace:configure.in:3030: -1- GMP_DEFINE_RAW(["define(,<\`$mcount_nonpic_call'>)"]) -m4trace:configure.in:3030: -1- GMP_DEFINE_RAW(["define(, <\`$mcount_pic_reg'>)"]) -m4trace:configure.in:3030: -1- GMP_DEFINE_RAW(["define(, <\`$mcount_pic_call'>)"]) -m4trace:configure.in:3034: -1- GMP_INCLUDE_MPN([x86/darwin.m4]) -m4trace:configure.in:3038: -1- GMP_INCLUDE_MPN([x86_64/x86_64-defs.m4]) -m4trace:configure.in:3041: -1- GMP_INCLUDE_MPN([x86_64/darwin.m4]) -m4trace:configure.in:3079: -1- m4_pattern_allow([^GMP_MPARAM_H_SUGGEST$]) -m4trace:configure.in:3090: -1- GMP_DEFINE_RAW(["define(,<$tmp_gmp_karatsuba_sqr_threshold>)"]) -m4trace:configure.in:3102: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_SHORT$]) -m4trace:configure.in:3103: -1- m4_pattern_allow([^SIZEOF_UNSIGNED$]) -m4trace:configure.in:3104: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG$]) -m4trace:configure.in:3105: -1- m4_pattern_allow([^SIZEOF_MP_LIMB_T$]) -m4trace:configure.in:3109: -1- m4_pattern_allow([^BITS_PER_MP_LIMB$]) -m4trace:configure.in:3110: -1- GMP_DEFINE_RAW(["define(,<$ac_cv_sizeof_unsigned>)"]) -m4trace:configure.in:3132: -1- GMP_DEFINE_RAW(["define(,$BITS_PER_MP_LIMB)"]) -m4trace:configure.in:3133: -1- GMP_DEFINE_RAW(["define(,$GMP_NAIL_BITS)"]) -m4trace:configure.in:3134: -1- GMP_DEFINE_RAW(["define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))"]) -m4trace:configure.in:3149: -1- m4_pattern_allow([^mpn_objs_in_libmp$]) -m4trace:configure.in:3151: -1- m4_pattern_allow([^mpn_objects$]) -m4trace:configure.in:3152: -1- m4_pattern_allow([^mpn_objs_in_libgmp$]) -m4trace:configure.in:3153: -1- m4_pattern_allow([^gmp_srclinks$]) -m4trace:configure.in:3164: -1- m4_pattern_allow([^TUNE_SQR_KARATSUBA_MAX$]) -m4trace:configure.in:3174: -1- m4_pattern_allow([^TUNE_SQR_KARATSUBA_MAX$]) -m4trace:configure.in:3182: -1- m4_pattern_allow([^TUNE_SQR_OBJ$]) -m4trace:configure.in:3188: -1- GMP_SUBST_CHECK_FUNCS([clock], [cputime], [getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) -m4trace:configure.in:3188: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_clock], [HAVE_CLOCK_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_CLOCK_01$]) -m4trace:configure.in:3188: -1- GMP_SUBST_CHECK_FUNCS([cputime], [getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) -m4trace:configure.in:3188: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_cputime], [HAVE_CPUTIME_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_CPUTIME_01$]) -m4trace:configure.in:3188: -1- GMP_SUBST_CHECK_FUNCS([getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) -m4trace:configure.in:3188: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_getrusage], [HAVE_GETRUSAGE_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_GETRUSAGE_01$]) -m4trace:configure.in:3188: -1- GMP_SUBST_CHECK_FUNCS([gettimeofday], [sigaction], [sigaltstack], [sigstack]) -m4trace:configure.in:3188: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_gettimeofday], [HAVE_GETTIMEOFDAY_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY_01$]) -m4trace:configure.in:3188: -1- GMP_SUBST_CHECK_FUNCS([sigaction], [sigaltstack], [sigstack]) -m4trace:configure.in:3188: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigaction], [HAVE_SIGACTION_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_SIGACTION_01$]) -m4trace:configure.in:3188: -1- GMP_SUBST_CHECK_FUNCS([sigaltstack], [sigstack]) -m4trace:configure.in:3188: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigaltstack], [HAVE_SIGALTSTACK_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_SIGALTSTACK_01$]) -m4trace:configure.in:3188: -1- GMP_SUBST_CHECK_FUNCS([sigstack]) -m4trace:configure.in:3188: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigstack], [HAVE_SIGSTACK_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_SIGSTACK_01$]) -m4trace:configure.in:3188: -1- GMP_SUBST_CHECK_FUNCS([]) -m4trace:configure.in:3189: -1- GMP_SUBST_CHECK_HEADERS([sys/resource.h]) -m4trace:configure.in:3189: -1- _GMP_SUBST_CHECK_HEADERS([ac_cv_header_sys_resource_h], [HAVE_SYS_RESOURCE_H_01]) -m4trace:configure.in:3189: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H_01$]) -m4trace:configure.in:3189: -1- GMP_SUBST_CHECK_HEADERS([]) -m4trace:configure.in:3190: -1- m4_pattern_allow([^HAVE_STACK_T$]) -m4trace:configure.in:3192: -1- m4_pattern_allow([^HAVE_STACK_T_01$]) -m4trace:configure.in:3219: -1- m4_pattern_allow([^LIBCURSES$]) -m4trace:configure.in:3231: -1- m4_pattern_allow([^WITH_READLINE_01$]) -m4trace:configure.in:3232: -1- m4_pattern_allow([^LIBREADLINE$]) -m4trace:configure.in:3236: -1- m4_pattern_allow([^YACC$]) -m4trace:configure.in:3236: -1- m4_pattern_allow([^YACC$]) -m4trace:configure.in:3236: -1- m4_pattern_allow([^YFLAGS$]) -m4trace:configure.in:3237: -1- AM_PROG_LEX -m4trace:configure.in:3237: -1- m4_pattern_allow([^LEX$]) -m4trace:configure.in:3237: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) -m4trace:configure.in:3237: -1- m4_pattern_allow([^LEXLIB$]) -m4trace:configure.in:3237: -1- m4_pattern_allow([^YYTEXT_POINTER$]) -m4trace:configure.in:3246: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.in:3250: -1- GMP_FINISH -m4trace:configure.in:3256: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. +m4trace:configure.in:3172: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2549: GMP_ASM_X86_SHLDL_CL is expanded from... +configure.in:3172: the top level]) +m4trace:configure.in:3172: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2549: GMP_ASM_X86_SHLDL_CL is expanded from... +configure.in:3172: the top level]) +m4trace:configure.in:3172: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2549: GMP_ASM_X86_SHLDL_CL is expanded from... +configure.in:3172: the top level]) +m4trace:configure.in:3172: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2549: GMP_ASM_X86_SHLDL_CL is expanded from... +configure.in:3172: the top level]) +m4trace:configure.in:3172: -1- GMP_DEFINE([WANT_SHLDL_CL], [1]) +m4trace:configure.in:3172: -1- GMP_DEFINE([WANT_SHLDL_CL], [0]) +m4trace:configure.in:3174: -1- GMP_ASM_X86_MCOUNT +m4trace:configure.in:3174: -1- AC_ENABLE_SHARED +m4trace:configure.in:3174: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2639: GMP_ASM_X86_MCOUNT is expanded from... +configure.in:3174: the top level]) +m4trace:configure.in:3174: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2639: GMP_ASM_X86_MCOUNT is expanded from... +configure.in:3174: the top level]) +m4trace:configure.in:3174: -1- GMP_DEFINE_RAW(["define(, <\`$mcount_nonpic_reg'>)"]) +m4trace:configure.in:3174: -1- GMP_DEFINE_RAW(["define(,<\`$mcount_nonpic_call'>)"]) +m4trace:configure.in:3174: -1- GMP_DEFINE_RAW(["define(, <\`$mcount_pic_reg'>)"]) +m4trace:configure.in:3174: -1- GMP_DEFINE_RAW(["define(, <\`$mcount_pic_call'>)"]) +m4trace:configure.in:3178: -1- GMP_INCLUDE_MPN([x86/darwin.m4]) +m4trace:configure.in:3182: -1- GMP_INCLUDE_MPN([x86_64/x86_64-defs.m4]) +m4trace:configure.in:3183: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86_64$]) +m4trace:configure.in:3186: -1- GMP_INCLUDE_MPN([x86_64/darwin.m4]) +m4trace:configure.in:3224: -1- m4_pattern_allow([^GMP_MPARAM_H_SUGGEST$]) +m4trace:configure.in:3235: -1- GMP_DEFINE_RAW(["define(,<$tmp_gmp_karatsuba_sqr_threshold>)"]) +m4trace:configure.in:3247: -1- m4_pattern_allow([^SIZEOF_VOID_P$]) +m4trace:configure.in:3248: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_SHORT$]) +m4trace:configure.in:3249: -1- m4_pattern_allow([^SIZEOF_UNSIGNED$]) +m4trace:configure.in:3250: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG$]) +m4trace:configure.in:3251: -1- m4_pattern_allow([^SIZEOF_MP_LIMB_T$]) +m4trace:configure.in:3255: -1- m4_pattern_allow([^GMP_LIMB_BITS$]) +m4trace:configure.in:3256: -1- GMP_DEFINE_RAW(["define(,<$ac_cv_sizeof_unsigned>)"]) +m4trace:configure.in:3278: -1- GMP_DEFINE_RAW(["define(,$GMP_LIMB_BITS)"]) +m4trace:configure.in:3279: -1- GMP_DEFINE_RAW(["define(,$GMP_NAIL_BITS)"]) +m4trace:configure.in:3280: -1- GMP_DEFINE_RAW(["define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))"]) +m4trace:configure.in:3295: -1- m4_pattern_allow([^mpn_objs_in_libmp$]) +m4trace:configure.in:3297: -1- m4_pattern_allow([^mpn_objects$]) +m4trace:configure.in:3298: -1- m4_pattern_allow([^mpn_objs_in_libgmp$]) +m4trace:configure.in:3299: -1- m4_pattern_allow([^gmp_srclinks$]) +m4trace:configure.in:3310: -1- m4_pattern_allow([^TUNE_SQR_TOOM2_MAX$]) +m4trace:configure.in:3320: -1- m4_pattern_allow([^TUNE_SQR_TOOM2_MAX$]) +m4trace:configure.in:3328: -1- m4_pattern_allow([^TUNE_SQR_OBJ$]) +m4trace:configure.in:3334: -1- GMP_SUBST_CHECK_FUNCS([clock], [cputime], [getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) +m4trace:configure.in:3334: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_clock], [HAVE_CLOCK_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_CLOCK_01$]) +m4trace:configure.in:3334: -1- GMP_SUBST_CHECK_FUNCS([cputime], [getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) +m4trace:configure.in:3334: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_cputime], [HAVE_CPUTIME_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_CPUTIME_01$]) +m4trace:configure.in:3334: -1- GMP_SUBST_CHECK_FUNCS([getrusage], [gettimeofday], [sigaction], [sigaltstack], [sigstack]) +m4trace:configure.in:3334: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_getrusage], [HAVE_GETRUSAGE_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_GETRUSAGE_01$]) +m4trace:configure.in:3334: -1- GMP_SUBST_CHECK_FUNCS([gettimeofday], [sigaction], [sigaltstack], [sigstack]) +m4trace:configure.in:3334: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_gettimeofday], [HAVE_GETTIMEOFDAY_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY_01$]) +m4trace:configure.in:3334: -1- GMP_SUBST_CHECK_FUNCS([sigaction], [sigaltstack], [sigstack]) +m4trace:configure.in:3334: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigaction], [HAVE_SIGACTION_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_SIGACTION_01$]) +m4trace:configure.in:3334: -1- GMP_SUBST_CHECK_FUNCS([sigaltstack], [sigstack]) +m4trace:configure.in:3334: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigaltstack], [HAVE_SIGALTSTACK_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_SIGALTSTACK_01$]) +m4trace:configure.in:3334: -1- GMP_SUBST_CHECK_FUNCS([sigstack]) +m4trace:configure.in:3334: -1- _GMP_SUBST_CHECK_FUNCS([ac_cv_func_sigstack], [HAVE_SIGSTACK_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_SIGSTACK_01$]) +m4trace:configure.in:3334: -1- GMP_SUBST_CHECK_FUNCS([]) +m4trace:configure.in:3335: -1- GMP_SUBST_CHECK_HEADERS([sys/resource.h]) +m4trace:configure.in:3335: -1- _GMP_SUBST_CHECK_HEADERS([ac_cv_header_sys_resource_h], [HAVE_SYS_RESOURCE_H_01]) +m4trace:configure.in:3335: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H_01$]) +m4trace:configure.in:3335: -1- GMP_SUBST_CHECK_HEADERS([]) +m4trace:configure.in:3336: -1- m4_pattern_allow([^HAVE_STACK_T$]) +m4trace:configure.in:3338: -1- m4_pattern_allow([^HAVE_STACK_T_01$]) +m4trace:configure.in:3365: -1- m4_pattern_allow([^LIBCURSES$]) +m4trace:configure.in:3377: -1- m4_pattern_allow([^WITH_READLINE_01$]) +m4trace:configure.in:3378: -1- m4_pattern_allow([^LIBREADLINE$]) +m4trace:configure.in:3382: -1- m4_pattern_allow([^YACC$]) +m4trace:configure.in:3382: -1- m4_pattern_allow([^YACC$]) +m4trace:configure.in:3382: -1- m4_pattern_allow([^YFLAGS$]) +m4trace:configure.in:3383: -1- AM_PROG_LEX +m4trace:configure.in:3383: -1- m4_pattern_allow([^LEX$]) +m4trace:configure.in:3383: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) +m4trace:configure.in:3383: -1- m4_pattern_allow([^LEXLIB$]) +m4trace:configure.in:3383: -1- m4_pattern_allow([^YYTEXT_POINTER$]) +m4trace:configure.in:3392: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.in:3396: -1- GMP_FINISH +m4trace:configure.in:3402: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. You should run autoupdate.], []) -m4trace:configure.in:3256: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.in:3256: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.in:3256: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.in:3256: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.in:3256: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.in:3256: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.in:3256: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.in:3256: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) -m4trace:configure.in:3256: -1- _LT_PROG_LTMAIN +m4trace:configure.in:3402: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.in:3402: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.in:3402: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.in:3402: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.in:3402: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.in:3402: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.in:3402: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.in:3402: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"]) +m4trace:configure.in:3402: -1- _LT_PROG_LTMAIN diff -Nru gmp-4.3.2+dfsg/autom4te.cache/traces.1 gmp-5.0.2+dfsg/autom4te.cache/traces.1 --- gmp-4.3.2+dfsg/autom4te.cache/traces.1 2010-01-09 06:26:20.000000000 +0000 +++ gmp-5.0.2+dfsg/autom4te.cache/traces.1 2011-08-30 01:19:38.000000000 +0000 @@ -1,8 +1,8 @@ -m4trace:aclocal.m4:8703: -1- m4_include([acinclude.m4]) +m4trace:aclocal.m4:9184: -1- m4_include([acinclude.m4]) m4trace:configure.in:26: -1- AH_OUTPUT([00001], [/* Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007 Free Software Foundation, Inc. +2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -19,7 +19,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */]) -m4trace:configure.in:30: -1- AC_INIT([GNU MP], [4.3.2], [gmp-bugs@gmplib.org], [gmp]) +m4trace:configure.in:30: -1- AC_INIT([GNU MP], [5.0.2], [gmp-bugs@gmplib.org], [gmp]) m4trace:configure.in:30: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.in:30: -1- m4_pattern_forbid([_AC_]) m4trace:configure.in:30: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) @@ -203,7 +203,7 @@ m4trace:configure.in:53: -1- m4_pattern_allow([^host_os$]) m4trace:configure.in:68: -1- AM_INIT_AUTOMAKE([1.8 gnu no-dependencies $(top_builddir)/ansi2knr]) m4trace:configure.in:68: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$]) -m4trace:configure.in:68: -1- AM_AUTOMAKE_VERSION([1.11]) +m4trace:configure.in:68: -1- AM_AUTOMAKE_VERSION([1.11.1]) m4trace:configure.in:68: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.in:68: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.in:68: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) @@ -286,7 +286,7 @@ m4trace:configure.in:68: -1- AC_SUBST_TRACE([am__untar]) m4trace:configure.in:68: -1- m4_pattern_allow([^am__untar$]) m4trace:configure.in:69: -1- _m4_warn([obsolete], [The macro `AM_CONFIG_HEADER' is obsolete. -You should run autoupdate.], [aclocal.m4:8123: AM_CONFIG_HEADER is expanded from... +You should run autoupdate.], [aclocal.m4:8604: AM_CONFIG_HEADER is expanded from... configure.in:69: the top level]) m4trace:configure.in:69: -1- AC_CONFIG_HEADERS([config.h:config.in]) m4trace:configure.in:70: -1- AM_MAINTAINER_MODE @@ -325,46 +325,54 @@ m4trace:configure.in:140: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... configure.in:140: the top level]) -m4trace:configure.in:147: -1- AM_CONDITIONAL([WANT_MPBSD], [test "$enable_mpbsd" = "yes"]) -m4trace:configure.in:147: -1- AC_SUBST([WANT_MPBSD_TRUE]) -m4trace:configure.in:147: -1- AC_SUBST_TRACE([WANT_MPBSD_TRUE]) -m4trace:configure.in:147: -1- m4_pattern_allow([^WANT_MPBSD_TRUE$]) -m4trace:configure.in:147: -1- AC_SUBST([WANT_MPBSD_FALSE]) -m4trace:configure.in:147: -1- AC_SUBST_TRACE([WANT_MPBSD_FALSE]) -m4trace:configure.in:147: -1- m4_pattern_allow([^WANT_MPBSD_FALSE$]) -m4trace:configure.in:147: -1- _AM_SUBST_NOTMAKE([WANT_MPBSD_TRUE]) -m4trace:configure.in:147: -1- _AM_SUBST_NOTMAKE([WANT_MPBSD_FALSE]) -m4trace:configure.in:151: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +m4trace:configure.in:148: -1- AC_DEFINE_TRACE_LITERAL([WANT_OLD_FFT_FULL]) +m4trace:configure.in:148: -1- m4_pattern_allow([^WANT_OLD_FFT_FULL$]) +m4trace:configure.in:148: -1- AH_OUTPUT([WANT_OLD_FFT_FULL], [/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per + --enable-old-fft-full */ +@%:@undef WANT_OLD_FFT_FULL]) +m4trace:configure.in:154: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... -configure.in:151: the top level]) -m4trace:configure.in:166: -1- AC_SUBST([GMP_NAIL_BITS]) -m4trace:configure.in:166: -1- AC_SUBST_TRACE([GMP_NAIL_BITS]) -m4trace:configure.in:166: -1- m4_pattern_allow([^GMP_NAIL_BITS$]) -m4trace:configure.in:170: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +configure.in:154: the top level]) +m4trace:configure.in:161: -1- AM_CONDITIONAL([WANT_MPBSD], [test "$enable_mpbsd" = "yes"]) +m4trace:configure.in:161: -1- AC_SUBST([WANT_MPBSD_TRUE]) +m4trace:configure.in:161: -1- AC_SUBST_TRACE([WANT_MPBSD_TRUE]) +m4trace:configure.in:161: -1- m4_pattern_allow([^WANT_MPBSD_TRUE$]) +m4trace:configure.in:161: -1- AC_SUBST([WANT_MPBSD_FALSE]) +m4trace:configure.in:161: -1- AC_SUBST_TRACE([WANT_MPBSD_FALSE]) +m4trace:configure.in:161: -1- m4_pattern_allow([^WANT_MPBSD_FALSE$]) +m4trace:configure.in:161: -1- _AM_SUBST_NOTMAKE([WANT_MPBSD_TRUE]) +m4trace:configure.in:161: -1- _AM_SUBST_NOTMAKE([WANT_MPBSD_FALSE]) +m4trace:configure.in:165: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... -configure.in:170: the top level]) -m4trace:configure.in:180: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_PROF]) -m4trace:configure.in:180: -1- m4_pattern_allow([^WANT_PROFILING_PROF$]) -m4trace:configure.in:180: -1- AH_OUTPUT([WANT_PROFILING_PROF], [/* Define to 1 if --enable-profiling=prof */ +configure.in:165: the top level]) +m4trace:configure.in:180: -1- AC_SUBST([GMP_NAIL_BITS]) +m4trace:configure.in:180: -1- AC_SUBST_TRACE([GMP_NAIL_BITS]) +m4trace:configure.in:180: -1- m4_pattern_allow([^GMP_NAIL_BITS$]) +m4trace:configure.in:184: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... +configure.in:184: the top level]) +m4trace:configure.in:194: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_PROF]) +m4trace:configure.in:194: -1- m4_pattern_allow([^WANT_PROFILING_PROF$]) +m4trace:configure.in:194: -1- AH_OUTPUT([WANT_PROFILING_PROF], [/* Define to 1 if --enable-profiling=prof */ @%:@undef WANT_PROFILING_PROF]) -m4trace:configure.in:184: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_GPROF]) -m4trace:configure.in:184: -1- m4_pattern_allow([^WANT_PROFILING_GPROF$]) -m4trace:configure.in:184: -1- AH_OUTPUT([WANT_PROFILING_GPROF], [/* Define to 1 if --enable-profiling=gprof */ +m4trace:configure.in:198: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_GPROF]) +m4trace:configure.in:198: -1- m4_pattern_allow([^WANT_PROFILING_GPROF$]) +m4trace:configure.in:198: -1- AH_OUTPUT([WANT_PROFILING_GPROF], [/* Define to 1 if --enable-profiling=gprof */ @%:@undef WANT_PROFILING_GPROF]) -m4trace:configure.in:188: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_INSTRUMENT]) -m4trace:configure.in:188: -1- m4_pattern_allow([^WANT_PROFILING_INSTRUMENT$]) -m4trace:configure.in:188: -1- AH_OUTPUT([WANT_PROFILING_INSTRUMENT], [/* Define to 1 if --enable-profiling=instrument */ +m4trace:configure.in:202: -1- AC_DEFINE_TRACE_LITERAL([WANT_PROFILING_INSTRUMENT]) +m4trace:configure.in:202: -1- m4_pattern_allow([^WANT_PROFILING_INSTRUMENT$]) +m4trace:configure.in:202: -1- AH_OUTPUT([WANT_PROFILING_INSTRUMENT], [/* Define to 1 if --enable-profiling=instrument */ @%:@undef WANT_PROFILING_INSTRUMENT]) -m4trace:configure.in:204: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +m4trace:configure.in:218: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... -configure.in:204: the top level]) -m4trace:configure.in:214: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +configure.in:218: the top level]) +m4trace:configure.in:228: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... -configure.in:214: the top level]) -m4trace:configure.in:224: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. +configure.in:228: the top level]) +m4trace:configure.in:238: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:209: AC_HELP_STRING is expanded from... -configure.in:224: the top level]) -m4trace:configure.in:244: -1- AH_OUTPUT([HAVE_HOST_CPU_1], [/* Define one of these to 1 for the host CPU family. +configure.in:238: the top level]) +m4trace:configure.in:258: -1- AH_OUTPUT([HAVE_HOST_CPU_1], [/* Define one of these to 1 for the host CPU family. If your CPU is not in any of these families, leave all undefined. For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ #undef HAVE_HOST_CPU_FAMILY_alpha @@ -372,6 +380,7 @@ #undef HAVE_HOST_CPU_FAMILY_power #undef HAVE_HOST_CPU_FAMILY_powerpc #undef HAVE_HOST_CPU_FAMILY_x86 +#undef HAVE_HOST_CPU_FAMILY_x86_64 /* Define one of the following to 1 for the host CPU, as per the output of ./config.guess. If your CPU is not listed here, leave all undefined. */ @@ -396,1597 +405,1571 @@ #undef HAVE_HOST_CPU_pentiumpro #undef HAVE_HOST_CPU_pentium2 #undef HAVE_HOST_CPU_pentium3]) -m4trace:configure.in:375: -1- AC_SUBST([ABI]) -m4trace:configure.in:375: -1- AC_SUBST_TRACE([ABI]) -m4trace:configure.in:375: -1- m4_pattern_allow([^ABI$]) -m4trace:configure.in:396: -1- AC_SUBST([HAVE_HOST_CPU_FAMILY_power], [0]) -m4trace:configure.in:396: -1- AC_SUBST_TRACE([HAVE_HOST_CPU_FAMILY_power]) -m4trace:configure.in:396: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) -m4trace:configure.in:397: -1- AC_SUBST([HAVE_HOST_CPU_FAMILY_powerpc], [0]) -m4trace:configure.in:397: -1- AC_SUBST_TRACE([HAVE_HOST_CPU_FAMILY_powerpc]) -m4trace:configure.in:397: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) -m4trace:configure.in:407: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_alpha]) -m4trace:configure.in:407: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_alpha$]) -m4trace:configure.in:732: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_m68k]) -m4trace:configure.in:732: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_m68k$]) -m4trace:configure.in:843: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_powerpc]) -m4trace:configure.in:843: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) -m4trace:configure.in:1037: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_power]) -m4trace:configure.in:1037: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) -m4trace:configure.in:1549: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -configure.in:1549: the top level]) -m4trace:configure.in:1662: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:909: GMP_PROG_CC_IS_GNU is expanded from... -configure.in:1662: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1712: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1712: the top level]) -m4trace:configure.in:1719: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:832: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.in:1719: the top level]) -m4trace:configure.in:1719: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:832: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.in:1719: the top level]) -m4trace:configure.in:1719: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:832: GMP_PROG_CC_WORKS_LONGLONG is expanded from... -configure.in:1719: the top level]) -m4trace:configure.in:1731: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1006: GMP_HPC_HPPA_2_0 is expanded from... -configure.in:1731: the top level]) -m4trace:configure.in:1731: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1006: GMP_HPC_HPPA_2_0 is expanded from... -configure.in:1731: the top level]) -m4trace:configure.in:1732: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1047: GMP_GCC_ARM_UMODSI is expanded from... -configure.in:1732: the top level]) -m4trace:configure.in:1733: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1072: GMP_GCC_MIPS_O32 is expanded from... -configure.in:1733: the top level]) -m4trace:configure.in:1733: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1072: GMP_GCC_MIPS_O32 is expanded from... -configure.in:1733: the top level]) -m4trace:configure.in:1734: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1377: GMP_HPPA_LEVEL_20 is expanded from... -configure.in:1734: the top level]) -m4trace:configure.in:1734: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1377: GMP_HPPA_LEVEL_20 is expanded from... -configure.in:1734: the top level]) -m4trace:configure.in:1734: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1377: GMP_HPPA_LEVEL_20 is expanded from... -configure.in:1734: the top level]) -m4trace:configure.in:1735: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:872: GMP_C_TEST_SIZEOF is expanded from... -configure.in:1735: the top level]) -m4trace:configure.in:1735: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:872: GMP_C_TEST_SIZEOF is expanded from... -configure.in:1735: the top level]) -m4trace:configure.in:1808: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1279: GMP_OS_X86_XMM is expanded from... -configure.in:1808: the top level]) -m4trace:configure.in:1813: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1107: GMP_GCC_NO_CPP_PRECOMP is expanded from... -configure.in:1813: the top level]) -m4trace:configure.in:1821: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1167: GMP_GCC_WA_MCPU is expanded from... -configure.in:1821: the top level]) -m4trace:configure.in:1826: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1219: GMP_GCC_WA_OLDAS is expanded from... -configure.in:1826: the top level]) -m4trace:configure.in:1826: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1219: GMP_GCC_WA_OLDAS is expanded from... -configure.in:1826: the top level]) -m4trace:configure.in:1826: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1219: GMP_GCC_WA_OLDAS is expanded from... -configure.in:1826: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:766: GMP_PROG_CC_WORKS_PART is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:785: GMP_PROG_CC_WORKS_PART_TEST is expanded from... -acinclude.m4:775: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1833: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2405: GMP_ASM_X86_GOT_EAX_OK is expanded from... -acinclude.m4:976: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... -acinclude.m4:460: GMP_PROG_CC_WORKS is expanded from... -configure.in:1833: the top level]) -m4trace:configure.in:1857: -1- AC_SUBST([GMP_LDFLAGS]) -m4trace:configure.in:1857: -1- AC_SUBST_TRACE([GMP_LDFLAGS]) -m4trace:configure.in:1857: -1- m4_pattern_allow([^GMP_LDFLAGS$]) -m4trace:configure.in:1858: -1- AC_SUBST([LIBGMP_LDFLAGS]) -m4trace:configure.in:1858: -1- AC_SUBST_TRACE([LIBGMP_LDFLAGS]) -m4trace:configure.in:1858: -1- m4_pattern_allow([^LIBGMP_LDFLAGS$]) -m4trace:configure.in:1859: -1- AC_SUBST([LIBGMPXX_LDFLAGS]) -m4trace:configure.in:1859: -1- AC_SUBST_TRACE([LIBGMPXX_LDFLAGS]) -m4trace:configure.in:1859: -1- m4_pattern_allow([^LIBGMPXX_LDFLAGS$]) -m4trace:configure.in:1877: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SPEED_CYCLECOUNTER]) -m4trace:configure.in:1877: -1- m4_pattern_allow([^HAVE_SPEED_CYCLECOUNTER$]) -m4trace:configure.in:1877: -1- AH_OUTPUT([HAVE_SPEED_CYCLECOUNTER], [/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ +m4trace:configure.in:390: -1- AC_SUBST([ABI]) +m4trace:configure.in:390: -1- AC_SUBST_TRACE([ABI]) +m4trace:configure.in:390: -1- m4_pattern_allow([^ABI$]) +m4trace:configure.in:411: -1- AC_SUBST([HAVE_HOST_CPU_FAMILY_power], [0]) +m4trace:configure.in:411: -1- AC_SUBST_TRACE([HAVE_HOST_CPU_FAMILY_power]) +m4trace:configure.in:411: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) +m4trace:configure.in:412: -1- AC_SUBST([HAVE_HOST_CPU_FAMILY_powerpc], [0]) +m4trace:configure.in:412: -1- AC_SUBST_TRACE([HAVE_HOST_CPU_FAMILY_powerpc]) +m4trace:configure.in:412: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) +m4trace:configure.in:422: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_alpha]) +m4trace:configure.in:422: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_alpha$]) +m4trace:configure.in:750: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_m68k]) +m4trace:configure.in:750: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_m68k$]) +m4trace:configure.in:861: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_powerpc]) +m4trace:configure.in:861: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_powerpc$]) +m4trace:configure.in:1081: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_power]) +m4trace:configure.in:1081: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_power$]) +m4trace:configure.in:1603: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +configure.in:1603: the top level]) +m4trace:configure.in:1716: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:910: GMP_PROG_CC_IS_GNU is expanded from... +configure.in:1716: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1766: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1766: the top level]) +m4trace:configure.in:1773: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:833: GMP_PROG_CC_WORKS_LONGLONG is expanded from... +configure.in:1773: the top level]) +m4trace:configure.in:1773: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:833: GMP_PROG_CC_WORKS_LONGLONG is expanded from... +configure.in:1773: the top level]) +m4trace:configure.in:1773: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:833: GMP_PROG_CC_WORKS_LONGLONG is expanded from... +configure.in:1773: the top level]) +m4trace:configure.in:1785: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1007: GMP_HPC_HPPA_2_0 is expanded from... +configure.in:1785: the top level]) +m4trace:configure.in:1785: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1007: GMP_HPC_HPPA_2_0 is expanded from... +configure.in:1785: the top level]) +m4trace:configure.in:1786: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1048: GMP_GCC_ARM_UMODSI is expanded from... +configure.in:1786: the top level]) +m4trace:configure.in:1787: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1073: GMP_GCC_MIPS_O32 is expanded from... +configure.in:1787: the top level]) +m4trace:configure.in:1787: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1073: GMP_GCC_MIPS_O32 is expanded from... +configure.in:1787: the top level]) +m4trace:configure.in:1788: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1378: GMP_HPPA_LEVEL_20 is expanded from... +configure.in:1788: the top level]) +m4trace:configure.in:1788: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1378: GMP_HPPA_LEVEL_20 is expanded from... +configure.in:1788: the top level]) +m4trace:configure.in:1788: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1378: GMP_HPPA_LEVEL_20 is expanded from... +configure.in:1788: the top level]) +m4trace:configure.in:1789: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:873: GMP_C_TEST_SIZEOF is expanded from... +configure.in:1789: the top level]) +m4trace:configure.in:1789: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:873: GMP_C_TEST_SIZEOF is expanded from... +configure.in:1789: the top level]) +m4trace:configure.in:1898: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1280: GMP_OS_X86_XMM is expanded from... +configure.in:1898: the top level]) +m4trace:configure.in:1903: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1108: GMP_GCC_NO_CPP_PRECOMP is expanded from... +configure.in:1903: the top level]) +m4trace:configure.in:1911: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1168: GMP_GCC_WA_MCPU is expanded from... +configure.in:1911: the top level]) +m4trace:configure.in:1916: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1220: GMP_GCC_WA_OLDAS is expanded from... +configure.in:1916: the top level]) +m4trace:configure.in:1916: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1220: GMP_GCC_WA_OLDAS is expanded from... +configure.in:1916: the top level]) +m4trace:configure.in:1916: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1220: GMP_GCC_WA_OLDAS is expanded from... +configure.in:1916: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:767: GMP_PROG_CC_WORKS_PART is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:786: GMP_PROG_CC_WORKS_PART_TEST is expanded from... +acinclude.m4:776: GMP_PROG_CC_WORKS_PART_MAIN is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1923: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2407: GMP_ASM_X86_GOT_EAX_OK is expanded from... +acinclude.m4:977: GMP_PROG_CC_X86_GOT_EAX_EMITTED is expanded from... +acinclude.m4:461: GMP_PROG_CC_WORKS is expanded from... +configure.in:1923: the top level]) +m4trace:configure.in:1947: -1- AC_SUBST([GMP_LDFLAGS]) +m4trace:configure.in:1947: -1- AC_SUBST_TRACE([GMP_LDFLAGS]) +m4trace:configure.in:1947: -1- m4_pattern_allow([^GMP_LDFLAGS$]) +m4trace:configure.in:1948: -1- AC_SUBST([LIBGMP_LDFLAGS]) +m4trace:configure.in:1948: -1- AC_SUBST_TRACE([LIBGMP_LDFLAGS]) +m4trace:configure.in:1948: -1- m4_pattern_allow([^LIBGMP_LDFLAGS$]) +m4trace:configure.in:1949: -1- AC_SUBST([LIBGMPXX_LDFLAGS]) +m4trace:configure.in:1949: -1- AC_SUBST_TRACE([LIBGMPXX_LDFLAGS]) +m4trace:configure.in:1949: -1- m4_pattern_allow([^LIBGMPXX_LDFLAGS$]) +m4trace:configure.in:1967: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SPEED_CYCLECOUNTER]) +m4trace:configure.in:1967: -1- m4_pattern_allow([^HAVE_SPEED_CYCLECOUNTER$]) +m4trace:configure.in:1967: -1- AH_OUTPUT([HAVE_SPEED_CYCLECOUNTER], [/* Tune directory speed_cyclecounter, undef=none, 1=32bits, 2=64bits) */ @%:@undef HAVE_SPEED_CYCLECOUNTER]) -m4trace:configure.in:1880: -1- AC_SUBST([SPEED_CYCLECOUNTER_OBJ]) -m4trace:configure.in:1880: -1- AC_SUBST_TRACE([SPEED_CYCLECOUNTER_OBJ]) -m4trace:configure.in:1880: -1- m4_pattern_allow([^SPEED_CYCLECOUNTER_OBJ$]) -m4trace:configure.in:1890: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CALLING_CONVENTIONS]) -m4trace:configure.in:1890: -1- m4_pattern_allow([^HAVE_CALLING_CONVENTIONS$]) -m4trace:configure.in:1890: -1- AH_OUTPUT([HAVE_CALLING_CONVENTIONS], [/* Define to 1 if tests/libtests has calling conventions checking for the CPU +m4trace:configure.in:1970: -1- AC_SUBST([SPEED_CYCLECOUNTER_OBJ]) +m4trace:configure.in:1970: -1- AC_SUBST_TRACE([SPEED_CYCLECOUNTER_OBJ]) +m4trace:configure.in:1970: -1- m4_pattern_allow([^SPEED_CYCLECOUNTER_OBJ$]) +m4trace:configure.in:1980: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CALLING_CONVENTIONS]) +m4trace:configure.in:1980: -1- m4_pattern_allow([^HAVE_CALLING_CONVENTIONS$]) +m4trace:configure.in:1980: -1- AH_OUTPUT([HAVE_CALLING_CONVENTIONS], [/* Define to 1 if tests/libtests has calling conventions checking for the CPU */ @%:@undef HAVE_CALLING_CONVENTIONS]) -m4trace:configure.in:1893: -1- AC_SUBST([CALLING_CONVENTIONS_OBJS]) -m4trace:configure.in:1893: -1- AC_SUBST_TRACE([CALLING_CONVENTIONS_OBJS]) -m4trace:configure.in:1893: -1- m4_pattern_allow([^CALLING_CONVENTIONS_OBJS$]) -m4trace:configure.in:1915: -1- AC_SUBST([DEFN_LONG_LONG_LIMB]) -m4trace:configure.in:1915: -1- AC_SUBST_TRACE([DEFN_LONG_LONG_LIMB]) -m4trace:configure.in:1915: -1- m4_pattern_allow([^DEFN_LONG_LONG_LIMB$]) -m4trace:configure.in:1919: -1- AC_SUBST([CC]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- AC_SUBST([CFLAGS]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([CFLAGS]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CFLAGS$]) -m4trace:configure.in:1919: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.in:1919: -1- AC_SUBST([LIBS]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.in:1919: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:1919: -1- AC_SUBST([CC]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- AC_SUBST([CC]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- AC_SUBST([CC]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- AC_SUBST([CC]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([CC]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^CC$]) -m4trace:configure.in:1919: -1- AC_SUBST([ac_ct_CC]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([ac_ct_CC]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^ac_ct_CC$]) -m4trace:configure.in:1919: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([EXEEXT]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^EXEEXT$]) -m4trace:configure.in:1919: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) -m4trace:configure.in:1919: -1- AC_SUBST_TRACE([OBJEXT]) -m4trace:configure.in:1919: -1- m4_pattern_allow([^OBJEXT$]) -m4trace:configure.in:1921: -1- AC_SUBST([CPP]) -m4trace:configure.in:1921: -1- AC_SUBST_TRACE([CPP]) -m4trace:configure.in:1921: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.in:1921: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:1921: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.in:1921: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:1921: -1- AC_SUBST([CPP]) -m4trace:configure.in:1921: -1- AC_SUBST_TRACE([CPP]) -m4trace:configure.in:1921: -1- m4_pattern_allow([^CPP$]) -m4trace:configure.in:1922: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -acinclude.m4:3594: GMP_H_ANSI is expanded from... -configure.in:1922: the top level]) -m4trace:configure.in:1926: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:3696: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3664: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.in:1926: the top level]) -m4trace:configure.in:1926: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:3696: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3664: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.in:1926: the top level]) -m4trace:configure.in:1926: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:3696: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... -acinclude.m4:3664: GMP_PROG_CC_FOR_BUILD is expanded from... -configure.in:1926: the top level]) -m4trace:configure.in:1926: -1- AC_SUBST([CC_FOR_BUILD]) -m4trace:configure.in:1926: -1- AC_SUBST_TRACE([CC_FOR_BUILD]) -m4trace:configure.in:1926: -1- m4_pattern_allow([^CC_FOR_BUILD$]) -m4trace:configure.in:1926: -1- AC_SUBST([CC_FOR_BUILD]) -m4trace:configure.in:1926: -1- AC_SUBST_TRACE([CC_FOR_BUILD]) -m4trace:configure.in:1926: -1- m4_pattern_allow([^CC_FOR_BUILD$]) -m4trace:configure.in:1927: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -acinclude.m4:3730: GMP_PROG_CPP_FOR_BUILD is expanded from... -configure.in:1927: the top level]) -m4trace:configure.in:1927: -1- AC_SUBST([CPP_FOR_BUILD]) -m4trace:configure.in:1927: -1- AC_SUBST_TRACE([CPP_FOR_BUILD]) -m4trace:configure.in:1927: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) -m4trace:configure.in:1927: -1- AC_SUBST([CPP_FOR_BUILD]) -m4trace:configure.in:1927: -1- AC_SUBST_TRACE([CPP_FOR_BUILD]) -m4trace:configure.in:1927: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) -m4trace:configure.in:1928: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3770: GMP_PROG_EXEEXT_FOR_BUILD is expanded from... -configure.in:1928: the top level]) -m4trace:configure.in:1928: -1- AC_SUBST([EXEEXT_FOR_BUILD], [$gmp_cv_prog_exeext_for_build]) -m4trace:configure.in:1928: -1- AC_SUBST_TRACE([EXEEXT_FOR_BUILD]) -m4trace:configure.in:1928: -1- m4_pattern_allow([^EXEEXT_FOR_BUILD$]) -m4trace:configure.in:1929: -1- AC_SUBST([U_FOR_BUILD], [_]) -m4trace:configure.in:1929: -1- AC_SUBST_TRACE([U_FOR_BUILD]) -m4trace:configure.in:1929: -1- m4_pattern_allow([^U_FOR_BUILD$]) -m4trace:configure.in:1930: -1- AC_SUBST([LIBM_FOR_BUILD], [-lm]) -m4trace:configure.in:1930: -1- AC_SUBST_TRACE([LIBM_FOR_BUILD]) -m4trace:configure.in:1930: -1- m4_pattern_allow([^LIBM_FOR_BUILD$]) -m4trace:configure.in:1938: -1- AC_SUBST([CCAS]) -m4trace:configure.in:1938: -1- AC_SUBST_TRACE([CCAS]) -m4trace:configure.in:1938: -1- m4_pattern_allow([^CCAS$]) -m4trace:configure.in:1945: -1- AC_SUBST([CXX]) -m4trace:configure.in:1945: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.in:1945: -1- AC_SUBST([CXXFLAGS]) -m4trace:configure.in:1945: -1- AC_SUBST_TRACE([CXXFLAGS]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^CXXFLAGS$]) -m4trace:configure.in:1945: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.in:1945: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.in:1945: -1- AC_SUBST([LIBS]) -m4trace:configure.in:1945: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.in:1945: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:1945: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:1945: -1- AC_SUBST([CXX]) -m4trace:configure.in:1945: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.in:1945: -1- AC_SUBST([ac_ct_CXX]) -m4trace:configure.in:1945: -1- AC_SUBST_TRACE([ac_ct_CXX]) -m4trace:configure.in:1945: -1- m4_pattern_allow([^ac_ct_CXX$]) -m4trace:configure.in:1947: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -configure.in:1947: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1973: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1453: GMP_PROG_CXX_WORKS_PART is expanded from... -acinclude.m4:1417: GMP_PROG_CXX_WORKS is expanded from... -configure.in:1973: the top level]) -m4trace:configure.in:1984: -1- AM_CONDITIONAL([WANT_CXX], [test $want_cxx = yes]) -m4trace:configure.in:1984: -1- AC_SUBST([WANT_CXX_TRUE]) -m4trace:configure.in:1984: -1- AC_SUBST_TRACE([WANT_CXX_TRUE]) -m4trace:configure.in:1984: -1- m4_pattern_allow([^WANT_CXX_TRUE$]) -m4trace:configure.in:1984: -1- AC_SUBST([WANT_CXX_FALSE]) -m4trace:configure.in:1984: -1- AC_SUBST_TRACE([WANT_CXX_FALSE]) -m4trace:configure.in:1984: -1- m4_pattern_allow([^WANT_CXX_FALSE$]) -m4trace:configure.in:1984: -1- _AM_SUBST_NOTMAKE([WANT_CXX_TRUE]) -m4trace:configure.in:1984: -1- _AM_SUBST_NOTMAKE([WANT_CXX_FALSE]) -m4trace:configure.in:1992: -1- AC_SUBST([CXXCPP]) -m4trace:configure.in:1992: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.in:1992: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.in:1992: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:1992: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.in:1992: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:1992: -1- AC_SUBST([CXXCPP]) -m4trace:configure.in:1992: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.in:1992: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.in:1999: -1- AC_SUBST([GREP]) -m4trace:configure.in:1999: -1- AC_SUBST_TRACE([GREP]) -m4trace:configure.in:1999: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.in:1999: -1- AC_SUBST([EGREP]) -m4trace:configure.in:1999: -1- AC_SUBST_TRACE([EGREP]) -m4trace:configure.in:1999: -1- m4_pattern_allow([^EGREP$]) -m4trace:configure.in:2043: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2495: GMP_ASM_X86_MMX is expanded from... -configure.in:2043: the top level]) -m4trace:configure.in:2043: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2495: GMP_ASM_X86_MMX is expanded from... -configure.in:2043: the top level]) -m4trace:configure.in:2043: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2495: GMP_ASM_X86_MMX is expanded from... -configure.in:2043: the top level]) -m4trace:configure.in:2043: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2495: GMP_ASM_X86_MMX is expanded from... -configure.in:2043: the top level]) -m4trace:configure.in:2046: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2574: GMP_ASM_X86_SSE2 is expanded from... -configure.in:2046: the top level]) -m4trace:configure.in:2046: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2574: GMP_ASM_X86_SSE2 is expanded from... -configure.in:2046: the top level]) -m4trace:configure.in:2046: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2574: GMP_ASM_X86_SSE2 is expanded from... -configure.in:2046: the top level]) -m4trace:configure.in:2046: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2574: GMP_ASM_X86_SSE2 is expanded from... -configure.in:2046: the top level]) -m4trace:configure.in:2053: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -configure.in:2053: the top level]) -m4trace:configure.in:2076: -1- AC_DEFINE_TRACE_LITERAL([PROTOTYPES]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^PROTOTYPES$]) -m4trace:configure.in:2076: -1- AH_OUTPUT([PROTOTYPES], [/* Define to 1 if the C compiler supports function prototypes. */ +m4trace:configure.in:1983: -1- AC_SUBST([CALLING_CONVENTIONS_OBJS]) +m4trace:configure.in:1983: -1- AC_SUBST_TRACE([CALLING_CONVENTIONS_OBJS]) +m4trace:configure.in:1983: -1- m4_pattern_allow([^CALLING_CONVENTIONS_OBJS$]) +m4trace:configure.in:2005: -1- AC_SUBST([DEFN_LONG_LONG_LIMB]) +m4trace:configure.in:2005: -1- AC_SUBST_TRACE([DEFN_LONG_LONG_LIMB]) +m4trace:configure.in:2005: -1- m4_pattern_allow([^DEFN_LONG_LONG_LIMB$]) +m4trace:configure.in:2009: -1- AC_SUBST([CC]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- AC_SUBST([CFLAGS]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([CFLAGS]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CFLAGS$]) +m4trace:configure.in:2009: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.in:2009: -1- AC_SUBST([LIBS]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.in:2009: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2009: -1- AC_SUBST([CC]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- AC_SUBST([CC]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- AC_SUBST([CC]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- AC_SUBST([CC]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([CC]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^CC$]) +m4trace:configure.in:2009: -1- AC_SUBST([ac_ct_CC]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([ac_ct_CC]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^ac_ct_CC$]) +m4trace:configure.in:2009: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([EXEEXT]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^EXEEXT$]) +m4trace:configure.in:2009: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) +m4trace:configure.in:2009: -1- AC_SUBST_TRACE([OBJEXT]) +m4trace:configure.in:2009: -1- m4_pattern_allow([^OBJEXT$]) +m4trace:configure.in:2011: -1- AC_SUBST([CPP]) +m4trace:configure.in:2011: -1- AC_SUBST_TRACE([CPP]) +m4trace:configure.in:2011: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.in:2011: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.in:2011: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.in:2011: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2011: -1- AC_SUBST([CPP]) +m4trace:configure.in:2011: -1- AC_SUBST_TRACE([CPP]) +m4trace:configure.in:2011: -1- m4_pattern_allow([^CPP$]) +m4trace:configure.in:2012: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +acinclude.m4:3596: GMP_H_ANSI is expanded from... +configure.in:2012: the top level]) +m4trace:configure.in:2016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:3698: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... +acinclude.m4:3666: GMP_PROG_CC_FOR_BUILD is expanded from... +configure.in:2016: the top level]) +m4trace:configure.in:2016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:3698: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... +acinclude.m4:3666: GMP_PROG_CC_FOR_BUILD is expanded from... +configure.in:2016: the top level]) +m4trace:configure.in:2016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:3698: GMP_PROG_CC_FOR_BUILD_WORKS is expanded from... +acinclude.m4:3666: GMP_PROG_CC_FOR_BUILD is expanded from... +configure.in:2016: the top level]) +m4trace:configure.in:2016: -1- AC_SUBST([CC_FOR_BUILD]) +m4trace:configure.in:2016: -1- AC_SUBST_TRACE([CC_FOR_BUILD]) +m4trace:configure.in:2016: -1- m4_pattern_allow([^CC_FOR_BUILD$]) +m4trace:configure.in:2016: -1- AC_SUBST([CC_FOR_BUILD]) +m4trace:configure.in:2016: -1- AC_SUBST_TRACE([CC_FOR_BUILD]) +m4trace:configure.in:2016: -1- m4_pattern_allow([^CC_FOR_BUILD$]) +m4trace:configure.in:2017: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +acinclude.m4:3732: GMP_PROG_CPP_FOR_BUILD is expanded from... +configure.in:2017: the top level]) +m4trace:configure.in:2017: -1- AC_SUBST([CPP_FOR_BUILD]) +m4trace:configure.in:2017: -1- AC_SUBST_TRACE([CPP_FOR_BUILD]) +m4trace:configure.in:2017: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) +m4trace:configure.in:2017: -1- AC_SUBST([CPP_FOR_BUILD]) +m4trace:configure.in:2017: -1- AC_SUBST_TRACE([CPP_FOR_BUILD]) +m4trace:configure.in:2017: -1- m4_pattern_allow([^CPP_FOR_BUILD$]) +m4trace:configure.in:2018: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3772: GMP_PROG_EXEEXT_FOR_BUILD is expanded from... +configure.in:2018: the top level]) +m4trace:configure.in:2018: -1- AC_SUBST([EXEEXT_FOR_BUILD], [$gmp_cv_prog_exeext_for_build]) +m4trace:configure.in:2018: -1- AC_SUBST_TRACE([EXEEXT_FOR_BUILD]) +m4trace:configure.in:2018: -1- m4_pattern_allow([^EXEEXT_FOR_BUILD$]) +m4trace:configure.in:2019: -1- AC_SUBST([U_FOR_BUILD], [_]) +m4trace:configure.in:2019: -1- AC_SUBST_TRACE([U_FOR_BUILD]) +m4trace:configure.in:2019: -1- m4_pattern_allow([^U_FOR_BUILD$]) +m4trace:configure.in:2020: -1- AC_SUBST([LIBM_FOR_BUILD], [-lm]) +m4trace:configure.in:2020: -1- AC_SUBST_TRACE([LIBM_FOR_BUILD]) +m4trace:configure.in:2020: -1- m4_pattern_allow([^LIBM_FOR_BUILD$]) +m4trace:configure.in:2028: -1- AC_SUBST([CCAS]) +m4trace:configure.in:2028: -1- AC_SUBST_TRACE([CCAS]) +m4trace:configure.in:2028: -1- m4_pattern_allow([^CCAS$]) +m4trace:configure.in:2035: -1- AC_SUBST([CXX]) +m4trace:configure.in:2035: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.in:2035: -1- AC_SUBST([CXXFLAGS]) +m4trace:configure.in:2035: -1- AC_SUBST_TRACE([CXXFLAGS]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^CXXFLAGS$]) +m4trace:configure.in:2035: -1- AC_SUBST([LDFLAGS]) +m4trace:configure.in:2035: -1- AC_SUBST_TRACE([LDFLAGS]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^LDFLAGS$]) +m4trace:configure.in:2035: -1- AC_SUBST([LIBS]) +m4trace:configure.in:2035: -1- AC_SUBST_TRACE([LIBS]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^LIBS$]) +m4trace:configure.in:2035: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.in:2035: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2035: -1- AC_SUBST([CXX]) +m4trace:configure.in:2035: -1- AC_SUBST_TRACE([CXX]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^CXX$]) +m4trace:configure.in:2035: -1- AC_SUBST([ac_ct_CXX]) +m4trace:configure.in:2035: -1- AC_SUBST_TRACE([ac_ct_CXX]) +m4trace:configure.in:2035: -1- m4_pattern_allow([^ac_ct_CXX$]) +m4trace:configure.in:2037: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +configure.in:2037: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2063: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1454: GMP_PROG_CXX_WORKS_PART is expanded from... +acinclude.m4:1418: GMP_PROG_CXX_WORKS is expanded from... +configure.in:2063: the top level]) +m4trace:configure.in:2074: -1- AM_CONDITIONAL([WANT_CXX], [test $want_cxx = yes]) +m4trace:configure.in:2074: -1- AC_SUBST([WANT_CXX_TRUE]) +m4trace:configure.in:2074: -1- AC_SUBST_TRACE([WANT_CXX_TRUE]) +m4trace:configure.in:2074: -1- m4_pattern_allow([^WANT_CXX_TRUE$]) +m4trace:configure.in:2074: -1- AC_SUBST([WANT_CXX_FALSE]) +m4trace:configure.in:2074: -1- AC_SUBST_TRACE([WANT_CXX_FALSE]) +m4trace:configure.in:2074: -1- m4_pattern_allow([^WANT_CXX_FALSE$]) +m4trace:configure.in:2074: -1- _AM_SUBST_NOTMAKE([WANT_CXX_TRUE]) +m4trace:configure.in:2074: -1- _AM_SUBST_NOTMAKE([WANT_CXX_FALSE]) +m4trace:configure.in:2082: -1- AC_SUBST([CXXCPP]) +m4trace:configure.in:2082: -1- AC_SUBST_TRACE([CXXCPP]) +m4trace:configure.in:2082: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.in:2082: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.in:2082: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.in:2082: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2082: -1- AC_SUBST([CXXCPP]) +m4trace:configure.in:2082: -1- AC_SUBST_TRACE([CXXCPP]) +m4trace:configure.in:2082: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.in:2089: -1- AC_SUBST([GREP]) +m4trace:configure.in:2089: -1- AC_SUBST_TRACE([GREP]) +m4trace:configure.in:2089: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.in:2089: -1- AC_SUBST([EGREP]) +m4trace:configure.in:2089: -1- AC_SUBST_TRACE([EGREP]) +m4trace:configure.in:2089: -1- m4_pattern_allow([^EGREP$]) +m4trace:configure.in:2133: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2497: GMP_ASM_X86_MMX is expanded from... +configure.in:2133: the top level]) +m4trace:configure.in:2133: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2497: GMP_ASM_X86_MMX is expanded from... +configure.in:2133: the top level]) +m4trace:configure.in:2133: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2497: GMP_ASM_X86_MMX is expanded from... +configure.in:2133: the top level]) +m4trace:configure.in:2133: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2497: GMP_ASM_X86_MMX is expanded from... +configure.in:2133: the top level]) +m4trace:configure.in:2136: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2576: GMP_ASM_X86_SSE2 is expanded from... +configure.in:2136: the top level]) +m4trace:configure.in:2136: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2576: GMP_ASM_X86_SSE2 is expanded from... +configure.in:2136: the top level]) +m4trace:configure.in:2136: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2576: GMP_ASM_X86_SSE2 is expanded from... +configure.in:2136: the top level]) +m4trace:configure.in:2136: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2576: GMP_ASM_X86_SSE2 is expanded from... +configure.in:2136: the top level]) +m4trace:configure.in:2143: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +configure.in:2143: the top level]) +m4trace:configure.in:2166: -1- AC_DEFINE_TRACE_LITERAL([PROTOTYPES]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^PROTOTYPES$]) +m4trace:configure.in:2166: -1- AH_OUTPUT([PROTOTYPES], [/* Define to 1 if the C compiler supports function prototypes. */ @%:@undef PROTOTYPES]) -m4trace:configure.in:2076: -1- AC_DEFINE_TRACE_LITERAL([__PROTOTYPES]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^__PROTOTYPES$]) -m4trace:configure.in:2076: -1- AH_OUTPUT([__PROTOTYPES], [/* Define like PROTOTYPES; this can be used by system headers. */ +m4trace:configure.in:2166: -1- AC_DEFINE_TRACE_LITERAL([__PROTOTYPES]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^__PROTOTYPES$]) +m4trace:configure.in:2166: -1- AH_OUTPUT([__PROTOTYPES], [/* Define like PROTOTYPES; this can be used by system headers. */ @%:@undef __PROTOTYPES]) -m4trace:configure.in:2076: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.in:2076: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ +m4trace:configure.in:2166: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.in:2166: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TYPES_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_STAT_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_MEMORY_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRINGS_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INTTYPES_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDINT_H]) -m4trace:configure.in:2076: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2166: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) -m4trace:configure.in:2076: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRING_H]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^HAVE_STRING_H$]) -m4trace:configure.in:2076: -1- AC_SUBST([U]) -m4trace:configure.in:2076: -1- AC_SUBST_TRACE([U]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^U$]) -m4trace:configure.in:2076: -1- AC_SUBST([ANSI2KNR]) -m4trace:configure.in:2076: -1- AC_SUBST_TRACE([ANSI2KNR]) -m4trace:configure.in:2076: -1- m4_pattern_allow([^ANSI2KNR$]) -m4trace:configure.in:2076: -1- _AM_SUBST_NOTMAKE([ANSI2KNR]) -m4trace:configure.in:2078: -1- AC_SUBST([ASMFLAGS]) -m4trace:configure.in:2078: -1- AC_SUBST_TRACE([ASMFLAGS]) -m4trace:configure.in:2078: -1- m4_pattern_allow([^ASMFLAGS$]) -m4trace:configure.in:2080: -1- AC_SUBST([AR]) -m4trace:configure.in:2080: -1- AC_SUBST_TRACE([AR]) -m4trace:configure.in:2080: -1- m4_pattern_allow([^AR$]) -m4trace:configure.in:2081: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.], [aclocal.m4:3273: AC_PROG_NM is expanded from... -acinclude.m4:403: GMP_PROG_NM is expanded from... -configure.in:2081: the top level]) -m4trace:configure.in:2081: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.in:2081: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.in:2081: -1- AC_SUBST([ac_ct_DUMPBIN]) -m4trace:configure.in:2081: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.in:2081: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.in:2081: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.in:2081: -1- AC_SUBST([NM]) -m4trace:configure.in:2081: -1- AC_SUBST_TRACE([NM]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^NM$]) -m4trace:configure.in:2081: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. -You should run autoupdate.], [aclocal.m4:3273: AC_PROG_NM is expanded from... -acinclude.m4:403: GMP_PROG_NM is expanded from... -configure.in:2081: the top level]) -m4trace:configure.in:2081: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.in:2081: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.in:2081: -1- AC_SUBST([ac_ct_DUMPBIN]) -m4trace:configure.in:2081: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) -m4trace:configure.in:2081: -1- AC_SUBST([DUMPBIN]) -m4trace:configure.in:2081: -1- AC_SUBST_TRACE([DUMPBIN]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^DUMPBIN$]) -m4trace:configure.in:2081: -1- AC_SUBST([NM]) -m4trace:configure.in:2081: -1- AC_SUBST_TRACE([NM]) -m4trace:configure.in:2081: -1- m4_pattern_allow([^NM$]) -m4trace:configure.in:2102: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. -You should run autoupdate.], [aclocal.m4:7525: AC_LIBTOOL_WIN32_DLL is expanded from... -configure.in:2102: the top level]) -m4trace:configure.in:2102: -1- AC_SUBST([AS]) -m4trace:configure.in:2102: -1- AC_SUBST_TRACE([AS]) -m4trace:configure.in:2102: -1- m4_pattern_allow([^AS$]) -m4trace:configure.in:2102: -1- AC_SUBST([DLLTOOL]) -m4trace:configure.in:2102: -1- AC_SUBST_TRACE([DLLTOOL]) -m4trace:configure.in:2102: -1- m4_pattern_allow([^DLLTOOL$]) -m4trace:configure.in:2102: -1- AC_SUBST([OBJDUMP]) -m4trace:configure.in:2102: -1- AC_SUBST_TRACE([OBJDUMP]) -m4trace:configure.in:2102: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.in:2102: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you -put the `win32-dll' option into LT_INIT's first parameter.], [aclocal.m4:7525: AC_LIBTOOL_WIN32_DLL is expanded from... -configure.in:2102: the top level]) -m4trace:configure.in:2104: -1- AC_SUBST([LIBGMP_DLL], [0]) -m4trace:configure.in:2104: -1- AC_SUBST_TRACE([LIBGMP_DLL]) -m4trace:configure.in:2104: -1- m4_pattern_allow([^LIBGMP_DLL$]) -m4trace:configure.in:2192: -1- AC_PROG_LIBTOOL -m4trace:configure.in:2192: -1- _m4_warn([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. -You should run autoupdate.], [aclocal.m4:123: AC_PROG_LIBTOOL is expanded from... +m4trace:configure.in:2166: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRING_H]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^HAVE_STRING_H$]) +m4trace:configure.in:2166: -1- AC_SUBST([U]) +m4trace:configure.in:2166: -1- AC_SUBST_TRACE([U]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^U$]) +m4trace:configure.in:2166: -1- AC_SUBST([ANSI2KNR]) +m4trace:configure.in:2166: -1- AC_SUBST_TRACE([ANSI2KNR]) +m4trace:configure.in:2166: -1- m4_pattern_allow([^ANSI2KNR$]) +m4trace:configure.in:2166: -1- _AM_SUBST_NOTMAKE([ANSI2KNR]) +m4trace:configure.in:2168: -1- AC_SUBST([ASMFLAGS]) +m4trace:configure.in:2168: -1- AC_SUBST_TRACE([ASMFLAGS]) +m4trace:configure.in:2168: -1- m4_pattern_allow([^ASMFLAGS$]) +m4trace:configure.in:2170: -1- AC_SUBST([AR]) +m4trace:configure.in:2170: -1- AC_SUBST_TRACE([AR]) +m4trace:configure.in:2170: -1- m4_pattern_allow([^AR$]) +m4trace:configure.in:2171: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. +You should run autoupdate.], [aclocal.m4:3459: AC_PROG_NM is expanded from... +acinclude.m4:404: GMP_PROG_NM is expanded from... +configure.in:2171: the top level]) +m4trace:configure.in:2171: -1- AC_SUBST([DUMPBIN]) +m4trace:configure.in:2171: -1- AC_SUBST_TRACE([DUMPBIN]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.in:2171: -1- AC_SUBST([ac_ct_DUMPBIN]) +m4trace:configure.in:2171: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) +m4trace:configure.in:2171: -1- AC_SUBST([DUMPBIN]) +m4trace:configure.in:2171: -1- AC_SUBST_TRACE([DUMPBIN]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.in:2171: -1- AC_SUBST([NM]) +m4trace:configure.in:2171: -1- AC_SUBST_TRACE([NM]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^NM$]) +m4trace:configure.in:2171: -1- _m4_warn([obsolete], [The macro `AC_PROG_NM' is obsolete. +You should run autoupdate.], [aclocal.m4:3459: AC_PROG_NM is expanded from... +acinclude.m4:404: GMP_PROG_NM is expanded from... +configure.in:2171: the top level]) +m4trace:configure.in:2171: -1- AC_SUBST([DUMPBIN]) +m4trace:configure.in:2171: -1- AC_SUBST_TRACE([DUMPBIN]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.in:2171: -1- AC_SUBST([ac_ct_DUMPBIN]) +m4trace:configure.in:2171: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^ac_ct_DUMPBIN$]) +m4trace:configure.in:2171: -1- AC_SUBST([DUMPBIN]) +m4trace:configure.in:2171: -1- AC_SUBST_TRACE([DUMPBIN]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^DUMPBIN$]) +m4trace:configure.in:2171: -1- AC_SUBST([NM]) +m4trace:configure.in:2171: -1- AC_SUBST_TRACE([NM]) +m4trace:configure.in:2171: -1- m4_pattern_allow([^NM$]) +m4trace:configure.in:2192: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete. +You should run autoupdate.], [aclocal.m4:8000: AC_LIBTOOL_WIN32_DLL is expanded from... configure.in:2192: the top level]) -m4trace:configure.in:2192: -1- LT_INIT -m4trace:configure.in:2192: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) -m4trace:configure.in:2192: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) -m4trace:configure.in:2192: -1- AC_SUBST([LIBTOOL]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LIBTOOL]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LIBTOOL$]) -m4trace:configure.in:2192: -1- AC_SUBST([SED]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([SED]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^SED$]) -m4trace:configure.in:2192: -1- AC_SUBST([FGREP]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([FGREP]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^FGREP$]) -m4trace:configure.in:2192: -1- AC_SUBST([GREP]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([GREP]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^GREP$]) -m4trace:configure.in:2192: -1- AC_SUBST([LD]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LD]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LD$]) -m4trace:configure.in:2192: -1- AC_SUBST([LN_S], [$as_ln_s]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LN_S]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LN_S$]) -m4trace:configure.in:2192: -1- AC_SUBST([OBJDUMP]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([OBJDUMP]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.in:2192: -1- AC_SUBST([AS]) +m4trace:configure.in:2192: -1- AC_SUBST_TRACE([AS]) +m4trace:configure.in:2192: -1- m4_pattern_allow([^AS$]) +m4trace:configure.in:2192: -1- AC_SUBST([DLLTOOL]) +m4trace:configure.in:2192: -1- AC_SUBST_TRACE([DLLTOOL]) +m4trace:configure.in:2192: -1- m4_pattern_allow([^DLLTOOL$]) m4trace:configure.in:2192: -1- AC_SUBST([OBJDUMP]) m4trace:configure.in:2192: -1- AC_SUBST_TRACE([OBJDUMP]) m4trace:configure.in:2192: -1- m4_pattern_allow([^OBJDUMP$]) -m4trace:configure.in:2192: -1- AC_SUBST([AR]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([AR]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^AR$]) -m4trace:configure.in:2192: -1- AC_SUBST([STRIP]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([STRIP]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^STRIP$]) -m4trace:configure.in:2192: -1- AC_SUBST([RANLIB]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([RANLIB]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.in:2192: -1- m4_pattern_allow([LT_OBJDIR]) -m4trace:configure.in:2192: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LT_OBJDIR$]) -m4trace:configure.in:2192: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries. +m4trace:configure.in:2192: -1- _m4_warn([obsolete], [AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you +put the `win32-dll' option into LT_INIT's first parameter.], [aclocal.m4:8000: AC_LIBTOOL_WIN32_DLL is expanded from... +configure.in:2192: the top level]) +m4trace:configure.in:2194: -1- AC_SUBST([LIBGMP_DLL], [0]) +m4trace:configure.in:2194: -1- AC_SUBST_TRACE([LIBGMP_DLL]) +m4trace:configure.in:2194: -1- m4_pattern_allow([^LIBGMP_DLL$]) +m4trace:configure.in:2282: -1- AC_PROG_LIBTOOL +m4trace:configure.in:2282: -1- _m4_warn([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete. +You should run autoupdate.], [aclocal.m4:128: AC_PROG_LIBTOOL is expanded from... +configure.in:2282: the top level]) +m4trace:configure.in:2282: -1- LT_INIT +m4trace:configure.in:2282: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$]) +m4trace:configure.in:2282: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) +m4trace:configure.in:2282: -1- AC_SUBST([LIBTOOL]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([LIBTOOL]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LIBTOOL$]) +m4trace:configure.in:2282: -1- AC_SUBST([SED]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([SED]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^SED$]) +m4trace:configure.in:2282: -1- AC_SUBST([FGREP]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([FGREP]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^FGREP$]) +m4trace:configure.in:2282: -1- AC_SUBST([GREP]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([GREP]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^GREP$]) +m4trace:configure.in:2282: -1- AC_SUBST([LD]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([LD]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LD$]) +m4trace:configure.in:2282: -1- AC_SUBST([LN_S], [$as_ln_s]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([LN_S]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LN_S$]) +m4trace:configure.in:2282: -1- AC_SUBST([OBJDUMP]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([OBJDUMP]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.in:2282: -1- AC_SUBST([OBJDUMP]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([OBJDUMP]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^OBJDUMP$]) +m4trace:configure.in:2282: -1- AC_SUBST([DLLTOOL]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([DLLTOOL]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.in:2282: -1- AC_SUBST([DLLTOOL]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([DLLTOOL]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^DLLTOOL$]) +m4trace:configure.in:2282: -1- AC_SUBST([AR]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([AR]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^AR$]) +m4trace:configure.in:2282: -1- AC_SUBST([ac_ct_AR]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([ac_ct_AR]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^ac_ct_AR$]) +m4trace:configure.in:2282: -1- AC_SUBST([STRIP]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([STRIP]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^STRIP$]) +m4trace:configure.in:2282: -1- AC_SUBST([RANLIB]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([RANLIB]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.in:2282: -1- m4_pattern_allow([LT_OBJDIR]) +m4trace:configure.in:2282: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LT_OBJDIR$]) +m4trace:configure.in:2282: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries. */ @%:@undef LT_OBJDIR]) -m4trace:configure.in:2192: -1- AC_SUBST([lt_ECHO]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([lt_ECHO]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^lt_ECHO$]) -m4trace:configure.in:2192: -1- LT_SUPPORTED_TAG([CC]) -m4trace:configure.in:2192: -1- AC_SUBST([DSYMUTIL]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([DSYMUTIL]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^DSYMUTIL$]) -m4trace:configure.in:2192: -1- AC_SUBST([NMEDIT]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([NMEDIT]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^NMEDIT$]) -m4trace:configure.in:2192: -1- AC_SUBST([LIPO]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LIPO]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LIPO$]) -m4trace:configure.in:2192: -1- AC_SUBST([OTOOL]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([OTOOL]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^OTOOL$]) -m4trace:configure.in:2192: -1- AC_SUBST([OTOOL64]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([OTOOL64]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^OTOOL64$]) -m4trace:configure.in:2192: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2282: -1- LT_SUPPORTED_TAG([CC]) +m4trace:configure.in:2282: -1- AC_SUBST([MANIFEST_TOOL]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([MANIFEST_TOOL]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^MANIFEST_TOOL$]) +m4trace:configure.in:2282: -1- AC_SUBST([DSYMUTIL]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([DSYMUTIL]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^DSYMUTIL$]) +m4trace:configure.in:2282: -1- AC_SUBST([NMEDIT]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([NMEDIT]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^NMEDIT$]) +m4trace:configure.in:2282: -1- AC_SUBST([LIPO]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([LIPO]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LIPO$]) +m4trace:configure.in:2282: -1- AC_SUBST([OTOOL]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([OTOOL]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^OTOOL$]) +m4trace:configure.in:2282: -1- AC_SUBST([OTOOL64]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([OTOOL64]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^OTOOL64$]) +m4trace:configure.in:2282: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_DLFCN_H]) -m4trace:configure.in:2192: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) -m4trace:configure.in:2192: -1- LT_SUPPORTED_TAG([CXX]) -m4trace:configure.in:2192: -1- AC_SUBST([CXX]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.in:2192: -1- AC_SUBST([CXXFLAGS]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([CXXFLAGS]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXXFLAGS$]) -m4trace:configure.in:2192: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.in:2192: -1- AC_SUBST([LIBS]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.in:2192: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:2192: -1- AC_SUBST([CXX]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([CXX]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXX$]) -m4trace:configure.in:2192: -1- AC_SUBST([ac_ct_CXX]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([ac_ct_CXX]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^ac_ct_CXX$]) -m4trace:configure.in:2192: -1- AC_SUBST([CXXCPP]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.in:2192: -1- AC_SUBST([CPPFLAGS]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([CPPFLAGS]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CPPFLAGS$]) -m4trace:configure.in:2192: -1- AC_SUBST([CXXCPP]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([CXXCPP]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^CXXCPP$]) -m4trace:configure.in:2192: -1- AC_SUBST([LD]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LD]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LD$]) -m4trace:configure.in:2192: -1- LT_SUPPORTED_TAG([F77]) -m4trace:configure.in:2192: -1- AC_SUBST([F77]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([F77]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^F77$]) -m4trace:configure.in:2192: -1- AC_SUBST([FFLAGS]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([FFLAGS]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^FFLAGS$]) -m4trace:configure.in:2192: -1- AC_SUBST([LDFLAGS]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LDFLAGS]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LDFLAGS$]) -m4trace:configure.in:2192: -1- AC_SUBST([LIBS]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([LIBS]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^LIBS$]) -m4trace:configure.in:2192: -1- AC_SUBST([F77]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([F77]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^F77$]) -m4trace:configure.in:2192: -1- AC_SUBST([ac_ct_F77]) -m4trace:configure.in:2192: -1- AC_SUBST_TRACE([ac_ct_F77]) -m4trace:configure.in:2192: -1- m4_pattern_allow([^ac_ct_F77$]) -m4trace:configure.in:2206: -1- AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) -m4trace:configure.in:2206: -1- AC_SUBST([ENABLE_STATIC_TRUE]) -m4trace:configure.in:2206: -1- AC_SUBST_TRACE([ENABLE_STATIC_TRUE]) -m4trace:configure.in:2206: -1- m4_pattern_allow([^ENABLE_STATIC_TRUE$]) -m4trace:configure.in:2206: -1- AC_SUBST([ENABLE_STATIC_FALSE]) -m4trace:configure.in:2206: -1- AC_SUBST_TRACE([ENABLE_STATIC_FALSE]) -m4trace:configure.in:2206: -1- m4_pattern_allow([^ENABLE_STATIC_FALSE$]) -m4trace:configure.in:2206: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_TRUE]) -m4trace:configure.in:2206: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_FALSE]) -m4trace:configure.in:2212: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) -m4trace:configure.in:2212: -1- m4_pattern_allow([^STDC_HEADERS$]) -m4trace:configure.in:2212: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ +m4trace:configure.in:2282: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^HAVE_DLFCN_H$]) +m4trace:configure.in:2282: -1- LT_SUPPORTED_TAG([CXX]) +m4trace:configure.in:2282: -1- AC_SUBST([CXXCPP]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([CXXCPP]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.in:2282: -1- AC_SUBST([CPPFLAGS]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([CPPFLAGS]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^CPPFLAGS$]) +m4trace:configure.in:2282: -1- AC_SUBST([CXXCPP]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([CXXCPP]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^CXXCPP$]) +m4trace:configure.in:2282: -1- AC_SUBST([LD]) +m4trace:configure.in:2282: -1- AC_SUBST_TRACE([LD]) +m4trace:configure.in:2282: -1- m4_pattern_allow([^LD$]) +m4trace:configure.in:2282: -1- LT_SUPPORTED_TAG([F77]) +m4trace:configure.in:2296: -1- AM_CONDITIONAL([ENABLE_STATIC], [test "$enable_static" = yes]) +m4trace:configure.in:2296: -1- AC_SUBST([ENABLE_STATIC_TRUE]) +m4trace:configure.in:2296: -1- AC_SUBST_TRACE([ENABLE_STATIC_TRUE]) +m4trace:configure.in:2296: -1- m4_pattern_allow([^ENABLE_STATIC_TRUE$]) +m4trace:configure.in:2296: -1- AC_SUBST([ENABLE_STATIC_FALSE]) +m4trace:configure.in:2296: -1- AC_SUBST_TRACE([ENABLE_STATIC_FALSE]) +m4trace:configure.in:2296: -1- m4_pattern_allow([^ENABLE_STATIC_FALSE$]) +m4trace:configure.in:2296: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_TRUE]) +m4trace:configure.in:2296: -1- _AM_SUBST_NOTMAKE([ENABLE_STATIC_FALSE]) +m4trace:configure.in:2302: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) +m4trace:configure.in:2302: -1- m4_pattern_allow([^STDC_HEADERS$]) +m4trace:configure.in:2302: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) -m4trace:configure.in:2213: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) -m4trace:configure.in:2213: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) -m4trace:configure.in:2213: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ +m4trace:configure.in:2303: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) +m4trace:configure.in:2303: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) +m4trace:configure.in:2303: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ @%:@undef TIME_WITH_SYS_TIME]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_FCNTL_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_FLOAT_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_FLOAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_FLOAT_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_INVENT_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_INVENT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INVENT_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_LANGINFO_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_LANGINFO_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_LANGINFO_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_LOCALE_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_LOCALE_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_LOCALE_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_NL_TYPES_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_NL_TYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_NL_TYPES_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_ATTRIBUTES_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_ATTRIBUTES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_ATTRIBUTES_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_IOGRAPH_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_IOGRAPH_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_IOGRAPH_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_MMAN_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_PARAM_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_PROCESSOR_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_PROCESSOR_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_PROCESSOR_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_PSTAT_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_PSTAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_PSTAT_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_SYSINFO_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_SYSINFO_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SYSINFO_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_SYSSGI_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_SYSSGI_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SYSSGI_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_SYSTEMCFG_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_SYSTEMCFG_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SYSTEMCFG_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TIME_H]) -m4trace:configure.in:2240: -1- AH_OUTPUT([HAVE_SYS_TIMES_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2330: -1- AH_OUTPUT([HAVE_SYS_TIMES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TIMES_H]) -m4trace:configure.in:2243: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2333: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_RESOURCE_H]) -m4trace:configure.in:2243: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_RESOURCE_H]) -m4trace:configure.in:2243: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H$]) -m4trace:configure.in:2256: -1- AH_OUTPUT([HAVE_SYS_SYSCTL_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2333: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_RESOURCE_H]) +m4trace:configure.in:2333: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H$]) +m4trace:configure.in:2346: -1- AH_OUTPUT([HAVE_SYS_SYSCTL_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SYSCTL_H]) -m4trace:configure.in:2256: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_SYSCTL_H]) -m4trace:configure.in:2256: -1- m4_pattern_allow([^HAVE_SYS_SYSCTL_H$]) -m4trace:configure.in:2262: -1- AH_OUTPUT([HAVE_MACHINE_HAL_SYSINFO_H], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2346: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_SYSCTL_H]) +m4trace:configure.in:2346: -1- m4_pattern_allow([^HAVE_SYS_SYSCTL_H$]) +m4trace:configure.in:2352: -1- AH_OUTPUT([HAVE_MACHINE_HAL_SYSINFO_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_MACHINE_HAL_SYSINFO_H]) -m4trace:configure.in:2262: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MACHINE_HAL_SYSINFO_H]) -m4trace:configure.in:2262: -1- m4_pattern_allow([^HAVE_MACHINE_HAL_SYSINFO_H$]) -m4trace:configure.in:2278: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FGETC]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_FGETC$]) -m4trace:configure.in:2278: -1- AH_OUTPUT([HAVE_DECL_FGETC], [/* Define to 1 if you have the declaration of `fgetc\', and to 0 if you don\'t. +m4trace:configure.in:2352: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MACHINE_HAL_SYSINFO_H]) +m4trace:configure.in:2352: -1- m4_pattern_allow([^HAVE_MACHINE_HAL_SYSINFO_H$]) +m4trace:configure.in:2368: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FGETC]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_FGETC$]) +m4trace:configure.in:2368: -1- AH_OUTPUT([HAVE_DECL_FGETC], [/* Define to 1 if you have the declaration of `fgetc\', and to 0 if you don\'t. */ @%:@undef HAVE_DECL_FGETC]) -m4trace:configure.in:2278: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FSCANF]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_FSCANF$]) -m4trace:configure.in:2278: -1- AH_OUTPUT([HAVE_DECL_FSCANF], [/* Define to 1 if you have the declaration of `fscanf\', and to 0 if you don\'t. +m4trace:configure.in:2368: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FSCANF]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_FSCANF$]) +m4trace:configure.in:2368: -1- AH_OUTPUT([HAVE_DECL_FSCANF], [/* Define to 1 if you have the declaration of `fscanf\', and to 0 if you don\'t. */ @%:@undef HAVE_DECL_FSCANF]) -m4trace:configure.in:2278: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_OPTARG]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_OPTARG$]) -m4trace:configure.in:2278: -1- AH_OUTPUT([HAVE_DECL_OPTARG], [/* Define to 1 if you have the declaration of `optarg\', and to 0 if you don\'t. +m4trace:configure.in:2368: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_OPTARG]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_OPTARG$]) +m4trace:configure.in:2368: -1- AH_OUTPUT([HAVE_DECL_OPTARG], [/* Define to 1 if you have the declaration of `optarg\', and to 0 if you don\'t. */ @%:@undef HAVE_DECL_OPTARG]) -m4trace:configure.in:2278: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_UNGETC]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_UNGETC$]) -m4trace:configure.in:2278: -1- AH_OUTPUT([HAVE_DECL_UNGETC], [/* Define to 1 if you have the declaration of `ungetc\', and to 0 if you don\'t. +m4trace:configure.in:2368: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_UNGETC]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_UNGETC$]) +m4trace:configure.in:2368: -1- AH_OUTPUT([HAVE_DECL_UNGETC], [/* Define to 1 if you have the declaration of `ungetc\', and to 0 if you don\'t. */ @%:@undef HAVE_DECL_UNGETC]) -m4trace:configure.in:2278: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_VFPRINTF]) -m4trace:configure.in:2278: -1- m4_pattern_allow([^HAVE_DECL_VFPRINTF$]) -m4trace:configure.in:2278: -1- AH_OUTPUT([HAVE_DECL_VFPRINTF], [/* Define to 1 if you have the declaration of `vfprintf\', and to 0 if you +m4trace:configure.in:2368: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_VFPRINTF]) +m4trace:configure.in:2368: -1- m4_pattern_allow([^HAVE_DECL_VFPRINTF$]) +m4trace:configure.in:2368: -1- AH_OUTPUT([HAVE_DECL_VFPRINTF], [/* Define to 1 if you have the declaration of `vfprintf\', and to 0 if you don\'t. */ @%:@undef HAVE_DECL_VFPRINTF]) -m4trace:configure.in:2279: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SYS_ERRLIST]) -m4trace:configure.in:2279: -1- m4_pattern_allow([^HAVE_DECL_SYS_ERRLIST$]) -m4trace:configure.in:2279: -1- AH_OUTPUT([HAVE_DECL_SYS_ERRLIST], [/* Define to 1 if you have the declaration of `sys_errlist\', and to 0 if you +m4trace:configure.in:2369: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SYS_ERRLIST]) +m4trace:configure.in:2369: -1- m4_pattern_allow([^HAVE_DECL_SYS_ERRLIST$]) +m4trace:configure.in:2369: -1- AH_OUTPUT([HAVE_DECL_SYS_ERRLIST], [/* Define to 1 if you have the declaration of `sys_errlist\', and to 0 if you don\'t. */ @%:@undef HAVE_DECL_SYS_ERRLIST]) -m4trace:configure.in:2279: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SYS_NERR]) -m4trace:configure.in:2279: -1- m4_pattern_allow([^HAVE_DECL_SYS_NERR$]) -m4trace:configure.in:2279: -1- AH_OUTPUT([HAVE_DECL_SYS_NERR], [/* Define to 1 if you have the declaration of `sys_nerr\', and to 0 if you +m4trace:configure.in:2369: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SYS_NERR]) +m4trace:configure.in:2369: -1- m4_pattern_allow([^HAVE_DECL_SYS_NERR$]) +m4trace:configure.in:2369: -1- AH_OUTPUT([HAVE_DECL_SYS_NERR], [/* Define to 1 if you have the declaration of `sys_nerr\', and to 0 if you don\'t. */ @%:@undef HAVE_DECL_SYS_NERR]) -m4trace:configure.in:2283: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. +m4trace:configure.in:2373: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete. You should run autoupdate.], [../../lib/autoconf/types.m4:738: AC_TYPE_SIGNAL is expanded from... -configure.in:2283: the top level]) -m4trace:configure.in:2283: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) -m4trace:configure.in:2283: -1- m4_pattern_allow([^RETSIGTYPE$]) -m4trace:configure.in:2283: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ +configure.in:2373: the top level]) +m4trace:configure.in:2373: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE]) +m4trace:configure.in:2373: -1- m4_pattern_allow([^RETSIGTYPE$]) +m4trace:configure.in:2373: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */ @%:@undef RETSIGTYPE]) -m4trace:configure.in:2295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTMAX_T]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_INTMAX_T$]) -m4trace:configure.in:2295: -1- AH_OUTPUT([HAVE_INTMAX_T], [/* Define to 1 if the system has the type `intmax_t\'. */ +m4trace:configure.in:2385: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTMAX_T]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_INTMAX_T$]) +m4trace:configure.in:2385: -1- AH_OUTPUT([HAVE_INTMAX_T], [/* Define to 1 if the system has the type `intmax_t\'. */ @%:@undef HAVE_INTMAX_T]) -m4trace:configure.in:2295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_DOUBLE]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_LONG_DOUBLE$]) -m4trace:configure.in:2295: -1- AH_OUTPUT([HAVE_LONG_DOUBLE], [/* Define to 1 if the system has the type `long double\'. */ +m4trace:configure.in:2385: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_DOUBLE]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_LONG_DOUBLE$]) +m4trace:configure.in:2385: -1- AH_OUTPUT([HAVE_LONG_DOUBLE], [/* Define to 1 if the system has the type `long double\'. */ @%:@undef HAVE_LONG_DOUBLE]) -m4trace:configure.in:2295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_LONG_LONG$]) -m4trace:configure.in:2295: -1- AH_OUTPUT([HAVE_LONG_LONG], [/* Define to 1 if the system has the type `long long\'. */ +m4trace:configure.in:2385: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_LONG_LONG$]) +m4trace:configure.in:2385: -1- AH_OUTPUT([HAVE_LONG_LONG], [/* Define to 1 if the system has the type `long long\'. */ @%:@undef HAVE_LONG_LONG]) -m4trace:configure.in:2295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTRDIFF_T]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) -m4trace:configure.in:2295: -1- AH_OUTPUT([HAVE_PTRDIFF_T], [/* Define to 1 if the system has the type `ptrdiff_t\'. */ +m4trace:configure.in:2385: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PTRDIFF_T]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_PTRDIFF_T$]) +m4trace:configure.in:2385: -1- AH_OUTPUT([HAVE_PTRDIFF_T], [/* Define to 1 if the system has the type `ptrdiff_t\'. */ @%:@undef HAVE_PTRDIFF_T]) -m4trace:configure.in:2295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_QUAD_T]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_QUAD_T$]) -m4trace:configure.in:2295: -1- AH_OUTPUT([HAVE_QUAD_T], [/* Define to 1 if the system has the type `quad_t\'. */ +m4trace:configure.in:2385: -1- AC_DEFINE_TRACE_LITERAL([HAVE_QUAD_T]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_QUAD_T$]) +m4trace:configure.in:2385: -1- AH_OUTPUT([HAVE_QUAD_T], [/* Define to 1 if the system has the type `quad_t\'. */ @%:@undef HAVE_QUAD_T]) -m4trace:configure.in:2295: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT_LEAST32_T]) -m4trace:configure.in:2295: -1- m4_pattern_allow([^HAVE_UINT_LEAST32_T$]) -m4trace:configure.in:2295: -1- AH_OUTPUT([HAVE_UINT_LEAST32_T], [/* Define to 1 if the system has the type `uint_least32_t\'. */ +m4trace:configure.in:2385: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UINT_LEAST32_T]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_UINT_LEAST32_T$]) +m4trace:configure.in:2385: -1- AH_OUTPUT([HAVE_UINT_LEAST32_T], [/* Define to 1 if the system has the type `uint_least32_t\'. */ @%:@undef HAVE_UINT_LEAST32_T]) -m4trace:configure.in:2297: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRINGIZE]) -m4trace:configure.in:2297: -1- m4_pattern_allow([^HAVE_STRINGIZE$]) -m4trace:configure.in:2297: -1- AH_OUTPUT([HAVE_STRINGIZE], [/* Define to 1 if cpp supports the ANSI @%:@ stringizing operator. */ +m4trace:configure.in:2385: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTPTR_T]) +m4trace:configure.in:2385: -1- m4_pattern_allow([^HAVE_INTPTR_T$]) +m4trace:configure.in:2385: -1- AH_OUTPUT([HAVE_INTPTR_T], [/* Define to 1 if the system has the type `intptr_t\'. */ +@%:@undef HAVE_INTPTR_T]) +m4trace:configure.in:2388: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRINGIZE]) +m4trace:configure.in:2388: -1- m4_pattern_allow([^HAVE_STRINGIZE$]) +m4trace:configure.in:2388: -1- AH_OUTPUT([HAVE_STRINGIZE], [/* Define to 1 if cpp supports the ANSI @%:@ stringizing operator. */ @%:@undef HAVE_STRINGIZE]) -m4trace:configure.in:2302: -1- AC_DEFINE_TRACE_LITERAL([volatile]) -m4trace:configure.in:2302: -1- m4_pattern_allow([^volatile$]) -m4trace:configure.in:2302: -1- AH_OUTPUT([volatile], [/* Define to empty if the keyword `volatile\' does not work. Warning: valid +m4trace:configure.in:2393: -1- AC_DEFINE_TRACE_LITERAL([volatile]) +m4trace:configure.in:2393: -1- m4_pattern_allow([^volatile$]) +m4trace:configure.in:2393: -1- AH_OUTPUT([volatile], [/* Define to empty if the keyword `volatile\' does not work. Warning: valid code using `volatile\' can become incorrect without. Disable with care. */ @%:@undef volatile]) -m4trace:configure.in:2304: -1- AH_OUTPUT([restrict], [/* Define to the equivalent of the C99 \'restrict\' keyword, or to +m4trace:configure.in:2395: -1- AH_OUTPUT([restrict], [/* Define to the equivalent of the C99 \'restrict\' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict @@ -1999,130 +1982,130 @@ # define _Restrict # define __restrict__ #endif]) -m4trace:configure.in:2304: -1- AC_DEFINE_TRACE_LITERAL([restrict]) -m4trace:configure.in:2304: -1- m4_pattern_allow([^restrict$]) -m4trace:configure.in:2304: -1- AC_DEFINE_TRACE_LITERAL([restrict]) -m4trace:configure.in:2304: -1- m4_pattern_allow([^restrict$]) -m4trace:configure.in:2306: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3341: GMP_C_STDARG is expanded from... -configure.in:2306: the top level]) -m4trace:configure.in:2306: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDARG]) -m4trace:configure.in:2306: -1- m4_pattern_allow([^HAVE_STDARG$]) -m4trace:configure.in:2306: -1- AH_OUTPUT([HAVE_STDARG], [/* Define to 1 if exists and works */ +m4trace:configure.in:2395: -1- AC_DEFINE_TRACE_LITERAL([restrict]) +m4trace:configure.in:2395: -1- m4_pattern_allow([^restrict$]) +m4trace:configure.in:2395: -1- AC_DEFINE_TRACE_LITERAL([restrict]) +m4trace:configure.in:2395: -1- m4_pattern_allow([^restrict$]) +m4trace:configure.in:2397: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3343: GMP_C_STDARG is expanded from... +configure.in:2397: the top level]) +m4trace:configure.in:2397: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDARG]) +m4trace:configure.in:2397: -1- m4_pattern_allow([^HAVE_STDARG$]) +m4trace:configure.in:2397: -1- AH_OUTPUT([HAVE_STDARG], [/* Define to 1 if exists and works */ @%:@undef HAVE_STDARG]) -m4trace:configure.in:2307: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3011: GMP_C_ATTRIBUTE_CONST is expanded from... -configure.in:2307: the top level]) -m4trace:configure.in:2307: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_CONST]) -m4trace:configure.in:2307: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_CONST$]) -m4trace:configure.in:2307: -1- AH_OUTPUT([HAVE_ATTRIBUTE_CONST], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ +m4trace:configure.in:2398: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3013: GMP_C_ATTRIBUTE_CONST is expanded from... +configure.in:2398: the top level]) +m4trace:configure.in:2398: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_CONST]) +m4trace:configure.in:2398: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_CONST$]) +m4trace:configure.in:2398: -1- AH_OUTPUT([HAVE_ATTRIBUTE_CONST], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((const)) */ @%:@undef HAVE_ATTRIBUTE_CONST]) -m4trace:configure.in:2308: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3030: GMP_C_ATTRIBUTE_MALLOC is expanded from... -configure.in:2308: the top level]) -m4trace:configure.in:2308: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_MALLOC]) -m4trace:configure.in:2308: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MALLOC$]) -m4trace:configure.in:2308: -1- AH_OUTPUT([HAVE_ATTRIBUTE_MALLOC], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ +m4trace:configure.in:2399: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3032: GMP_C_ATTRIBUTE_MALLOC is expanded from... +configure.in:2399: the top level]) +m4trace:configure.in:2399: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_MALLOC]) +m4trace:configure.in:2399: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MALLOC$]) +m4trace:configure.in:2399: -1- AH_OUTPUT([HAVE_ATTRIBUTE_MALLOC], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((malloc)) */ @%:@undef HAVE_ATTRIBUTE_MALLOC]) -m4trace:configure.in:2309: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3060: GMP_C_ATTRIBUTE_MODE is expanded from... -configure.in:2309: the top level]) -m4trace:configure.in:2309: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_MODE]) -m4trace:configure.in:2309: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MODE$]) -m4trace:configure.in:2309: -1- AH_OUTPUT([HAVE_ATTRIBUTE_MODE], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) +m4trace:configure.in:2400: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3062: GMP_C_ATTRIBUTE_MODE is expanded from... +configure.in:2400: the top level]) +m4trace:configure.in:2400: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_MODE]) +m4trace:configure.in:2400: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_MODE$]) +m4trace:configure.in:2400: -1- AH_OUTPUT([HAVE_ATTRIBUTE_MODE], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((mode (XX))) */ @%:@undef HAVE_ATTRIBUTE_MODE]) -m4trace:configure.in:2310: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3076: GMP_C_ATTRIBUTE_NORETURN is expanded from... -configure.in:2310: the top level]) -m4trace:configure.in:2310: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_NORETURN]) -m4trace:configure.in:2310: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_NORETURN$]) -m4trace:configure.in:2310: -1- AH_OUTPUT([HAVE_ATTRIBUTE_NORETURN], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ +m4trace:configure.in:2401: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3078: GMP_C_ATTRIBUTE_NORETURN is expanded from... +configure.in:2401: the top level]) +m4trace:configure.in:2401: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ATTRIBUTE_NORETURN]) +m4trace:configure.in:2401: -1- m4_pattern_allow([^HAVE_ATTRIBUTE_NORETURN$]) +m4trace:configure.in:2401: -1- AH_OUTPUT([HAVE_ATTRIBUTE_NORETURN], [/* Define to 1 if the compiler accepts gcc style __attribute__ ((noreturn)) */ @%:@undef HAVE_ATTRIBUTE_NORETURN]) -m4trace:configure.in:2312: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler +m4trace:configure.in:2403: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler calls it, or to nothing if \'inline\' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif]) -m4trace:configure.in:2312: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -acinclude.m4:3617: GMP_H_EXTERN_INLINE is expanded from... -configure.in:2312: the top level]) -m4trace:configure.in:2315: -1- _m4_warn([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. -You should run autoupdate.], [aclocal.m4:3301: AC_CHECK_LIBM is expanded from... -configure.in:2315: the top level]) -m4trace:configure.in:2315: -1- AC_SUBST([LIBM]) -m4trace:configure.in:2315: -1- AC_SUBST_TRACE([LIBM]) -m4trace:configure.in:2315: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.in:2316: -1- AC_SUBST([LIBM]) -m4trace:configure.in:2316: -1- AC_SUBST_TRACE([LIBM]) -m4trace:configure.in:2316: -1- m4_pattern_allow([^LIBM$]) -m4trace:configure.in:2318: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2654: AC_TRY_LINK is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3386: GMP_HEADER_ALLOCA is expanded from... -acinclude.m4:3370: GMP_FUNC_ALLOCA is expanded from... -configure.in:2318: the top level]) -m4trace:configure.in:2318: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H]) -m4trace:configure.in:2318: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) -m4trace:configure.in:2318: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have and it should be used (not on Ultrix). +m4trace:configure.in:2403: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +acinclude.m4:3619: GMP_H_EXTERN_INLINE is expanded from... +configure.in:2403: the top level]) +m4trace:configure.in:2406: -1- _m4_warn([obsolete], [The macro `AC_CHECK_LIBM' is obsolete. +You should run autoupdate.], [aclocal.m4:3548: AC_CHECK_LIBM is expanded from... +configure.in:2406: the top level]) +m4trace:configure.in:2406: -1- AC_SUBST([LIBM]) +m4trace:configure.in:2406: -1- AC_SUBST_TRACE([LIBM]) +m4trace:configure.in:2406: -1- m4_pattern_allow([^LIBM$]) +m4trace:configure.in:2407: -1- AC_SUBST([LIBM]) +m4trace:configure.in:2407: -1- AC_SUBST_TRACE([LIBM]) +m4trace:configure.in:2407: -1- m4_pattern_allow([^LIBM$]) +m4trace:configure.in:2409: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3388: GMP_HEADER_ALLOCA is expanded from... +acinclude.m4:3372: GMP_FUNC_ALLOCA is expanded from... +configure.in:2409: the top level]) +m4trace:configure.in:2409: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H]) +m4trace:configure.in:2409: -1- m4_pattern_allow([^HAVE_ALLOCA_H$]) +m4trace:configure.in:2409: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have and it should be used (not on Ultrix). */ @%:@undef HAVE_ALLOCA_H]) -m4trace:configure.in:2318: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2654: AC_TRY_LINK is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3370: GMP_FUNC_ALLOCA is expanded from... -configure.in:2318: the top level]) -m4trace:configure.in:2318: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA]) -m4trace:configure.in:2318: -1- m4_pattern_allow([^HAVE_ALLOCA$]) -m4trace:configure.in:2318: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if alloca() works (via gmp-impl.h). */ +m4trace:configure.in:2409: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2688: AC_TRY_LINK is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3372: GMP_FUNC_ALLOCA is expanded from... +configure.in:2409: the top level]) +m4trace:configure.in:2409: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA]) +m4trace:configure.in:2409: -1- m4_pattern_allow([^HAVE_ALLOCA$]) +m4trace:configure.in:2409: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if alloca() works (via gmp-impl.h). */ @%:@undef HAVE_ALLOCA]) -m4trace:configure.in:2319: -1- AH_OUTPUT([WANT_TMP], [/* Define one of these to 1 for the desired temporary memory allocation +m4trace:configure.in:2410: -1- AH_OUTPUT([WANT_TMP], [/* Define one of these to 1 for the desired temporary memory allocation method, per --enable-alloca. */ #undef WANT_TMP_ALLOCA #undef WANT_TMP_REENTRANT #undef WANT_TMP_NOTREENTRANT #undef WANT_TMP_DEBUG]) -m4trace:configure.in:2319: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_ALLOCA]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^WANT_TMP_ALLOCA$]) -m4trace:configure.in:2319: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_REENTRANT]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^WANT_TMP_REENTRANT$]) -m4trace:configure.in:2319: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_NOTREENTRANT]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^WANT_TMP_NOTREENTRANT$]) -m4trace:configure.in:2319: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_DEBUG]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^WANT_TMP_DEBUG$]) -m4trace:configure.in:2319: -1- AC_SUBST([TAL_OBJECT]) -m4trace:configure.in:2319: -1- AC_SUBST_TRACE([TAL_OBJECT]) -m4trace:configure.in:2319: -1- m4_pattern_allow([^TAL_OBJECT$]) -m4trace:configure.in:2321: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2581: AC_TRY_COMPILE is expanded from... -acinclude.m4:3644: GMP_H_HAVE_FILE is expanded from... -configure.in:2321: the top level]) -m4trace:configure.in:2323: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most +m4trace:configure.in:2410: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_ALLOCA]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^WANT_TMP_ALLOCA$]) +m4trace:configure.in:2410: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_REENTRANT]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^WANT_TMP_REENTRANT$]) +m4trace:configure.in:2410: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_NOTREENTRANT]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^WANT_TMP_NOTREENTRANT$]) +m4trace:configure.in:2410: -1- AC_DEFINE_TRACE_LITERAL([WANT_TMP_DEBUG]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^WANT_TMP_DEBUG$]) +m4trace:configure.in:2410: -1- AC_SUBST([TAL_OBJECT]) +m4trace:configure.in:2410: -1- AC_SUBST_TRACE([TAL_OBJECT]) +m4trace:configure.in:2410: -1- m4_pattern_allow([^TAL_OBJECT$]) +m4trace:configure.in:2412: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2615: AC_TRY_COMPILE is expanded from... +acinclude.m4:3646: GMP_H_HAVE_FILE is expanded from... +configure.in:2412: the top level]) +m4trace:configure.in:2414: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ @@ -2133,41 +2116,41 @@ # undef WORDS_BIGENDIAN # endif #endif]) -m4trace:configure.in:2323: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIMB_BIG_ENDIAN]) -m4trace:configure.in:2323: -1- m4_pattern_allow([^HAVE_LIMB_BIG_ENDIAN$]) -m4trace:configure.in:2323: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIMB_LITTLE_ENDIAN]) -m4trace:configure.in:2323: -1- m4_pattern_allow([^HAVE_LIMB_LITTLE_ENDIAN$]) -m4trace:configure.in:2323: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD]) -m4trace:configure.in:2323: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) -m4trace:configure.in:2323: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */ +m4trace:configure.in:2414: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIMB_BIG_ENDIAN]) +m4trace:configure.in:2414: -1- m4_pattern_allow([^HAVE_LIMB_BIG_ENDIAN$]) +m4trace:configure.in:2414: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIMB_LITTLE_ENDIAN]) +m4trace:configure.in:2414: -1- m4_pattern_allow([^HAVE_LIMB_LITTLE_ENDIAN$]) +m4trace:configure.in:2414: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD]) +m4trace:configure.in:2414: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) +m4trace:configure.in:2414: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */ @%:@undef AC_APPLE_UNIVERSAL_BUILD]) -m4trace:configure.in:2329: -1- AH_OUTPUT([HAVE_LIMB], [/* Define one of these to 1 for the endianness of `mp_limb_t\'. +m4trace:configure.in:2420: -1- AH_OUTPUT([HAVE_LIMB], [/* Define one of these to 1 for the endianness of `mp_limb_t\'. If the endianness is not a simple big or little, or you don\'t know what it is, then leave both undefined. */ #undef HAVE_LIMB_BIG_ENDIAN #undef HAVE_LIMB_LITTLE_ENDIAN]) -m4trace:configure.in:2336: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3103: GMP_C_DOUBLE_FORMAT is expanded from... -configure.in:2336: the top level]) -m4trace:configure.in:2336: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3103: GMP_C_DOUBLE_FORMAT is expanded from... -configure.in:2336: the top level]) -m4trace:configure.in:2336: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3103: GMP_C_DOUBLE_FORMAT is expanded from... -configure.in:2336: the top level]) -m4trace:configure.in:2336: -1- AH_OUTPUT([HAVE_DOUBLE], [/* Define one of the following to 1 for the format of a `double\'. +m4trace:configure.in:2427: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3105: GMP_C_DOUBLE_FORMAT is expanded from... +configure.in:2427: the top level]) +m4trace:configure.in:2427: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3105: GMP_C_DOUBLE_FORMAT is expanded from... +configure.in:2427: the top level]) +m4trace:configure.in:2427: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3105: GMP_C_DOUBLE_FORMAT is expanded from... +configure.in:2427: the top level]) +m4trace:configure.in:2427: -1- AH_OUTPUT([HAVE_DOUBLE], [/* Define one of the following to 1 for the format of a `double\'. If your format is not among these choices, or you don\'t know what it is, then leave all undefined. IEEE_LITTLE_SWAPPED means little endian, but with the two 4-byte halves @@ -2178,122 +2161,126 @@ #undef HAVE_DOUBLE_VAX_D #undef HAVE_DOUBLE_VAX_G #undef HAVE_DOUBLE_CRAY_CFP]) -m4trace:configure.in:2336: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_BIG_ENDIAN]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_BIG_ENDIAN$]) -m4trace:configure.in:2336: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_LITTLE_ENDIAN]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_ENDIAN$]) -m4trace:configure.in:2336: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_LITTLE_SWAPPED]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_SWAPPED$]) -m4trace:configure.in:2336: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_VAX_D]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_D$]) -m4trace:configure.in:2336: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_VAX_G]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_G$]) -m4trace:configure.in:2336: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_CRAY_CFP]) -m4trace:configure.in:2336: -1- m4_pattern_allow([^HAVE_DOUBLE_CRAY_CFP$]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ +m4trace:configure.in:2427: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_BIG_ENDIAN]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_BIG_ENDIAN$]) +m4trace:configure.in:2427: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_LITTLE_ENDIAN]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_ENDIAN$]) +m4trace:configure.in:2427: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_IEEE_LITTLE_SWAPPED]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_IEEE_LITTLE_SWAPPED$]) +m4trace:configure.in:2427: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_VAX_D]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_D$]) +m4trace:configure.in:2427: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_VAX_G]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_VAX_G$]) +m4trace:configure.in:2427: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOUBLE_CRAY_CFP]) +m4trace:configure.in:2427: -1- m4_pattern_allow([^HAVE_DOUBLE_CRAY_CFP$]) +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_ALARM], [/* Define to 1 if you have the `alarm\' function. */ @%:@undef HAVE_ALARM]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_ATTR_GET], [/* Define to 1 if you have the `attr_get\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_ATTR_GET], [/* Define to 1 if you have the `attr_get\' function. */ @%:@undef HAVE_ATTR_GET]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_CLOCK], [/* Define to 1 if you have the `clock\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_CLOCK], [/* Define to 1 if you have the `clock\' function. */ @%:@undef HAVE_CLOCK]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_CLOCK_GETTIME], [/* Define to 1 if you have the `clock_gettime\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_CLOCK_GETTIME], [/* Define to 1 if you have the `clock_gettime\' function. */ @%:@undef HAVE_CLOCK_GETTIME]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_CPUTIME], [/* Define to 1 if you have the `cputime\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_CPUTIME], [/* Define to 1 if you have the `cputime\' function. */ @%:@undef HAVE_CPUTIME]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_GETPAGESIZE], [/* Define to 1 if you have the `getpagesize\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_GETPAGESIZE], [/* Define to 1 if you have the `getpagesize\' function. */ @%:@undef HAVE_GETPAGESIZE]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_GETRUSAGE], [/* Define to 1 if you have the `getrusage\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_GETRUSAGE], [/* Define to 1 if you have the `getrusage\' function. */ @%:@undef HAVE_GETRUSAGE]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */ @%:@undef HAVE_GETTIMEOFDAY]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_GETSYSINFO], [/* Define to 1 if you have the `getsysinfo\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_GETSYSINFO], [/* Define to 1 if you have the `getsysinfo\' function. */ @%:@undef HAVE_GETSYSINFO]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_LOCALECONV], [/* Define to 1 if you have the `localeconv\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_LOCALECONV], [/* Define to 1 if you have the `localeconv\' function. */ @%:@undef HAVE_LOCALECONV]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_MEMSET], [/* Define to 1 if you have the `memset\' function. */ @%:@undef HAVE_MEMSET]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have the `mmap\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_MMAP], [/* Define to 1 if you have the `mmap\' function. */ @%:@undef HAVE_MMAP]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_MPROTECT], [/* Define to 1 if you have the `mprotect\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_MPROTECT], [/* Define to 1 if you have the `mprotect\' function. */ @%:@undef HAVE_MPROTECT]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */ @%:@undef HAVE_NL_LANGINFO]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_OBSTACK_VPRINTF], [/* Define to 1 if you have the `obstack_vprintf\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_OBSTACK_VPRINTF], [/* Define to 1 if you have the `obstack_vprintf\' function. */ @%:@undef HAVE_OBSTACK_VPRINTF]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_POPEN], [/* Define to 1 if you have the `popen\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_POPEN], [/* Define to 1 if you have the `popen\' function. */ @%:@undef HAVE_POPEN]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_PROCESSOR_INFO], [/* Define to 1 if you have the `processor_info\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_PROCESSOR_INFO], [/* Define to 1 if you have the `processor_info\' function. */ @%:@undef HAVE_PROCESSOR_INFO]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_PSTAT_GETPROCESSOR], [/* Define to 1 if you have the `pstat_getprocessor\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_PSTAT_GETPROCESSOR], [/* Define to 1 if you have the `pstat_getprocessor\' function. */ @%:@undef HAVE_PSTAT_GETPROCESSOR]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_RAISE], [/* Define to 1 if you have the `raise\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_RAISE], [/* Define to 1 if you have the `raise\' function. */ @%:@undef HAVE_RAISE]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_READ_REAL_TIME], [/* Define to 1 if you have the `read_real_time\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_READ_REAL_TIME], [/* Define to 1 if you have the `read_real_time\' function. */ @%:@undef HAVE_READ_REAL_TIME]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the `sigaction\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the `sigaction\' function. */ @%:@undef HAVE_SIGACTION]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_SIGALTSTACK], [/* Define to 1 if you have the `sigaltstack\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_SIGALTSTACK], [/* Define to 1 if you have the `sigaltstack\' function. */ @%:@undef HAVE_SIGALTSTACK]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_SIGSTACK], [/* Define to 1 if you have the `sigstack\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_SIGSTACK], [/* Define to 1 if you have the `sigstack\' function. */ @%:@undef HAVE_SIGSTACK]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_SYSSGI], [/* Define to 1 if you have the `syssgi\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_SYSSGI], [/* Define to 1 if you have the `syssgi\' function. */ @%:@undef HAVE_SYSSGI]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_STRCHR], [/* Define to 1 if you have the `strchr\' function. */ @%:@undef HAVE_STRCHR]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ @%:@undef HAVE_STRERROR]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_STRNLEN], [/* Define to 1 if you have the `strnlen\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_STRNLEN], [/* Define to 1 if you have the `strnlen\' function. */ @%:@undef HAVE_STRNLEN]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */ @%:@undef HAVE_STRTOL]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_STRTOUL], [/* Define to 1 if you have the `strtoul\' function. */ @%:@undef HAVE_STRTOUL]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_SYSCONF], [/* Define to 1 if you have the `sysconf\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_SYSCONF], [/* Define to 1 if you have the `sysconf\' function. */ @%:@undef HAVE_SYSCONF]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_SYSCTL], [/* Define to 1 if you have the `sysctl\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_SYSCTL], [/* Define to 1 if you have the `sysctl\' function. */ @%:@undef HAVE_SYSCTL]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_SYSCTLBYNAME], [/* Define to 1 if you have the `sysctlbyname\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_SYSCTLBYNAME], [/* Define to 1 if you have the `sysctlbyname\' function. */ @%:@undef HAVE_SYSCTLBYNAME]) -m4trace:configure.in:2372: -1- AH_OUTPUT([HAVE_TIMES], [/* Define to 1 if you have the `times\' function. */ +m4trace:configure.in:2463: -1- AH_OUTPUT([HAVE_TIMES], [/* Define to 1 if you have the `times\' function. */ @%:@undef HAVE_TIMES]) -m4trace:configure.in:2374: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:2731: AC_TRY_RUN is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:3513: GMP_FUNC_VSNPRINTF is expanded from... -configure.in:2374: the top level]) -m4trace:configure.in:2374: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VSNPRINTF]) -m4trace:configure.in:2374: -1- m4_pattern_allow([^HAVE_VSNPRINTF$]) -m4trace:configure.in:2374: -1- AH_OUTPUT([HAVE_VSNPRINTF], [/* Define to 1 if you have the `vsnprintf\' function and it works properly. */ +m4trace:configure.in:2465: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:2765: AC_TRY_RUN is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:3515: GMP_FUNC_VSNPRINTF is expanded from... +configure.in:2465: the top level]) +m4trace:configure.in:2465: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VSNPRINTF]) +m4trace:configure.in:2465: -1- m4_pattern_allow([^HAVE_VSNPRINTF$]) +m4trace:configure.in:2465: -1- AH_OUTPUT([HAVE_VSNPRINTF], [/* Define to 1 if you have the `vsnprintf\' function and it works properly. */ @%:@undef HAVE_VSNPRINTF]) -m4trace:configure.in:2375: -1- AC_DEFINE_TRACE_LITERAL([SSCANF_WRITABLE_INPUT]) -m4trace:configure.in:2375: -1- m4_pattern_allow([^SSCANF_WRITABLE_INPUT$]) -m4trace:configure.in:2375: -1- AH_OUTPUT([SSCANF_WRITABLE_INPUT], [/* Define to 1 if sscanf requires writable inputs */ +m4trace:configure.in:2466: -1- AC_DEFINE_TRACE_LITERAL([SSCANF_WRITABLE_INPUT]) +m4trace:configure.in:2466: -1- m4_pattern_allow([^SSCANF_WRITABLE_INPUT$]) +m4trace:configure.in:2466: -1- AH_OUTPUT([SSCANF_WRITABLE_INPUT], [/* Define to 1 if sscanf requires writable inputs */ @%:@undef SSCANF_WRITABLE_INPUT]) -m4trace:configure.in:2380: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PSP_ITICKSPERCLKTICK]) -m4trace:configure.in:2380: -1- m4_pattern_allow([^HAVE_PSP_ITICKSPERCLKTICK$]) -m4trace:configure.in:2380: -1- AH_OUTPUT([HAVE_PSP_ITICKSPERCLKTICK], [/* Define to 1 if `struct pst_processor\' exists and contains +m4trace:configure.in:2471: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PSP_ITICKSPERCLKTICK]) +m4trace:configure.in:2471: -1- m4_pattern_allow([^HAVE_PSP_ITICKSPERCLKTICK$]) +m4trace:configure.in:2471: -1- AH_OUTPUT([HAVE_PSP_ITICKSPERCLKTICK], [/* Define to 1 if `struct pst_processor\' exists and contains `psp_iticksperclktick\'. */ @%:@undef HAVE_PSP_ITICKSPERCLKTICK]) -m4trace:configure.in:2395: -1- AH_OUTPUT([HAVE_SSTREAM], [/* Define to 1 if you have the header file. */ +m4trace:configure.in:2486: -1- AH_OUTPUT([HAVE_SSTREAM], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SSTREAM]) -m4trace:configure.in:2395: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSTREAM]) -m4trace:configure.in:2395: -1- m4_pattern_allow([^HAVE_SSTREAM$]) -m4trace:configure.in:2396: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STD__LOCALE]) -m4trace:configure.in:2396: -1- m4_pattern_allow([^HAVE_STD__LOCALE$]) -m4trace:configure.in:2396: -1- AH_OUTPUT([HAVE_STD__LOCALE], [/* Define to 1 if the system has the type `std::locale\'. */ +m4trace:configure.in:2486: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSTREAM]) +m4trace:configure.in:2486: -1- m4_pattern_allow([^HAVE_SSTREAM$]) +m4trace:configure.in:2487: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STD__LOCALE]) +m4trace:configure.in:2487: -1- m4_pattern_allow([^HAVE_STD__LOCALE$]) +m4trace:configure.in:2487: -1- AH_OUTPUT([HAVE_STD__LOCALE], [/* Define to 1 if the system has the type `std::locale\'. */ @%:@undef HAVE_STD__LOCALE]) -m4trace:configure.in:2537: -1- AC_DEFINE_TRACE_LITERAL([WANT_FAT_BINARY]) -m4trace:configure.in:2537: -1- m4_pattern_allow([^WANT_FAT_BINARY$]) -m4trace:configure.in:2537: -1- AH_OUTPUT([WANT_FAT_BINARY], [/* Define to 1 when building a fat binary. */ +m4trace:configure.in:2656: -1- AC_DEFINE_TRACE_LITERAL([WANT_FAT_BINARY]) +m4trace:configure.in:2656: -1- m4_pattern_allow([^WANT_FAT_BINARY$]) +m4trace:configure.in:2656: -1- AH_OUTPUT([WANT_FAT_BINARY], [/* Define to 1 when building a fat binary. */ @%:@undef WANT_FAT_BINARY]) -m4trace:configure.in:2831: -1- AC_CONFIG_LINKS([mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext]) -m4trace:configure.in:2879: -1- AH_OUTPUT([HAVE_NATIVE], [/* Define to 1 each of the following for which a native (ie. CPU specific) +m4trace:configure.in:2950: -1- AC_CONFIG_LINKS([mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext]) +m4trace:configure.in:2998: -1- AH_OUTPUT([HAVE_NATIVE], [/* Define to 1 each of the following for which a native (ie. CPU specific) implementation of the corresponding routine exists. */ #undef HAVE_NATIVE_mpn_add_n +#undef HAVE_NATIVE_mpn_add_n_sub_n #undef HAVE_NATIVE_mpn_add_nc +#undef HAVE_NATIVE_mpn_addaddmul_1msb0 #undef HAVE_NATIVE_mpn_addlsh1_n +#undef HAVE_NATIVE_mpn_addlsh2_n +#undef HAVE_NATIVE_mpn_addlsh_n #undef HAVE_NATIVE_mpn_addmul_1c #undef HAVE_NATIVE_mpn_addmul_2 #undef HAVE_NATIVE_mpn_addmul_3 @@ -2302,12 +2289,12 @@ #undef HAVE_NATIVE_mpn_addmul_6 #undef HAVE_NATIVE_mpn_addmul_7 #undef HAVE_NATIVE_mpn_addmul_8 -#undef HAVE_NATIVE_mpn_addsub_n -#undef HAVE_NATIVE_mpn_addaddmul_1msb0 #undef HAVE_NATIVE_mpn_and_n #undef HAVE_NATIVE_mpn_andn_n #undef HAVE_NATIVE_mpn_bdiv_dbm1c -#undef HAVE_NATIVE_mpn_com_n +#undef HAVE_NATIVE_mpn_bdiv_q_1 +#undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#undef HAVE_NATIVE_mpn_com #undef HAVE_NATIVE_mpn_copyd #undef HAVE_NATIVE_mpn_copyi #undef HAVE_NATIVE_mpn_divexact_1 @@ -2316,1119 +2303,1143 @@ #undef HAVE_NATIVE_mpn_divrem_1c #undef HAVE_NATIVE_mpn_divrem_2 #undef HAVE_NATIVE_mpn_gcd_1 +#undef HAVE_NATIVE_mpn_hamdist #undef HAVE_NATIVE_mpn_invert_limb #undef HAVE_NATIVE_mpn_ior_n #undef HAVE_NATIVE_mpn_iorn_n +#undef HAVE_NATIVE_mpn_lshift #undef HAVE_NATIVE_mpn_lshiftc +#undef HAVE_NATIVE_mpn_lshsub_n #undef HAVE_NATIVE_mpn_mod_1 +#undef HAVE_NATIVE_mpn_mod_1_1p #undef HAVE_NATIVE_mpn_mod_1c +#undef HAVE_NATIVE_mpn_mod_1s_2p +#undef HAVE_NATIVE_mpn_mod_1s_4p +#undef HAVE_NATIVE_mpn_mod_34lsub1 #undef HAVE_NATIVE_mpn_modexact_1_odd #undef HAVE_NATIVE_mpn_modexact_1c_odd +#undef HAVE_NATIVE_mpn_mul_1 #undef HAVE_NATIVE_mpn_mul_1c #undef HAVE_NATIVE_mpn_mul_2 #undef HAVE_NATIVE_mpn_mul_3 #undef HAVE_NATIVE_mpn_mul_4 +#undef HAVE_NATIVE_mpn_mul_basecase #undef HAVE_NATIVE_mpn_nand_n #undef HAVE_NATIVE_mpn_nior_n +#undef HAVE_NATIVE_mpn_popcount #undef HAVE_NATIVE_mpn_preinv_divrem_1 #undef HAVE_NATIVE_mpn_preinv_mod_1 #undef HAVE_NATIVE_mpn_redc_1 #undef HAVE_NATIVE_mpn_redc_2 +#undef HAVE_NATIVE_mpn_rsblsh1_n +#undef HAVE_NATIVE_mpn_rsblsh2_n +#undef HAVE_NATIVE_mpn_rsblsh_n #undef HAVE_NATIVE_mpn_rsh1add_n +#undef HAVE_NATIVE_mpn_rsh1add_nc #undef HAVE_NATIVE_mpn_rsh1sub_n +#undef HAVE_NATIVE_mpn_rsh1sub_nc +#undef HAVE_NATIVE_mpn_rshift #undef HAVE_NATIVE_mpn_sqr_basecase #undef HAVE_NATIVE_mpn_sqr_diagonal #undef HAVE_NATIVE_mpn_sub_n #undef HAVE_NATIVE_mpn_sub_nc #undef HAVE_NATIVE_mpn_sublsh1_n +#undef HAVE_NATIVE_mpn_sublsh2_n +#undef HAVE_NATIVE_mpn_sublsh_n #undef HAVE_NATIVE_mpn_submul_1c -#undef HAVE_NATIVE_mpn_umul_ppmm -#undef HAVE_NATIVE_mpn_umul_ppmm_r #undef HAVE_NATIVE_mpn_udiv_qrnnd #undef HAVE_NATIVE_mpn_udiv_qrnnd_r +#undef HAVE_NATIVE_mpn_umul_ppmm +#undef HAVE_NATIVE_mpn_umul_ppmm_r #undef HAVE_NATIVE_mpn_xor_n #undef HAVE_NATIVE_mpn_xnor_n]) -m4trace:configure.in:2943: -1- AC_SUBST([M4]) -m4trace:configure.in:2943: -1- AC_SUBST_TRACE([M4]) -m4trace:configure.in:2943: -1- m4_pattern_allow([^M4$]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:291: GMP_PROG_M4 is expanded from... -configure.in:2943: the top level]) -m4trace:configure.in:2943: -1- AC_SUBST([M4]) -m4trace:configure.in:2943: -1- AC_SUBST_TRACE([M4]) -m4trace:configure.in:2943: -1- m4_pattern_allow([^M4$]) -m4trace:configure.in:2944: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:359: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.in:2944: the top level]) -m4trace:configure.in:2944: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:359: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.in:2944: the top level]) -m4trace:configure.in:2944: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:359: GMP_M4_M4WRAP_SPURIOUS is expanded from... -configure.in:2944: the top level]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2955: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1875: GMP_ASM_TEXT is expanded from... -configure.in:2955: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2957: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1667: GMP_ASM_LABEL_SUFFIX is expanded from... -configure.in:2957: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2960: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1708: GMP_ASM_UNDERSCORE is expanded from... -configure.in:2960: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2961: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1925: GMP_ASM_RODATA is expanded from... -configure.in:2961: the top level]) -m4trace:configure.in:2962: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2045: GMP_ASM_TYPE is expanded from... -configure.in:2962: the top level]) -m4trace:configure.in:2962: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2045: GMP_ASM_TYPE is expanded from... -configure.in:2962: the top level]) -m4trace:configure.in:2962: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2045: GMP_ASM_TYPE is expanded from... -configure.in:2962: the top level]) -m4trace:configure.in:2962: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2045: GMP_ASM_TYPE is expanded from... -configure.in:2962: the top level]) -m4trace:configure.in:2963: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2067: GMP_ASM_SIZE is expanded from... -configure.in:2963: the top level]) -m4trace:configure.in:2963: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2067: GMP_ASM_SIZE is expanded from... -configure.in:2963: the top level]) -m4trace:configure.in:2963: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2067: GMP_ASM_SIZE is expanded from... -configure.in:2963: the top level]) -m4trace:configure.in:2963: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2067: GMP_ASM_SIZE is expanded from... -configure.in:2963: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2180: GMP_ASM_LSYM_PREFIX is expanded from... -configure.in:2964: the top level]) -m4trace:configure.in:2964: -1- AC_DEFINE_TRACE_LITERAL([LSYM_PREFIX]) -m4trace:configure.in:2964: -1- m4_pattern_allow([^LSYM_PREFIX$]) -m4trace:configure.in:2964: -1- AH_OUTPUT([LSYM_PREFIX], [/* Assembler local label prefix */ +m4trace:configure.in:3084: -1- AC_SUBST([M4]) +m4trace:configure.in:3084: -1- AC_SUBST_TRACE([M4]) +m4trace:configure.in:3084: -1- m4_pattern_allow([^M4$]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:292: GMP_PROG_M4 is expanded from... +configure.in:3084: the top level]) +m4trace:configure.in:3084: -1- AC_SUBST([M4]) +m4trace:configure.in:3084: -1- AC_SUBST_TRACE([M4]) +m4trace:configure.in:3084: -1- m4_pattern_allow([^M4$]) +m4trace:configure.in:3085: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:360: GMP_M4_M4WRAP_SPURIOUS is expanded from... +configure.in:3085: the top level]) +m4trace:configure.in:3085: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:360: GMP_M4_M4WRAP_SPURIOUS is expanded from... +configure.in:3085: the top level]) +m4trace:configure.in:3085: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:360: GMP_M4_M4WRAP_SPURIOUS is expanded from... +configure.in:3085: the top level]) +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3099: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1876: GMP_ASM_TEXT is expanded from... +configure.in:3099: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3101: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1668: GMP_ASM_LABEL_SUFFIX is expanded from... +configure.in:3101: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3104: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1709: GMP_ASM_UNDERSCORE is expanded from... +configure.in:3104: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3105: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1926: GMP_ASM_RODATA is expanded from... +configure.in:3105: the top level]) +m4trace:configure.in:3106: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2047: GMP_ASM_TYPE is expanded from... +configure.in:3106: the top level]) +m4trace:configure.in:3106: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2047: GMP_ASM_TYPE is expanded from... +configure.in:3106: the top level]) +m4trace:configure.in:3106: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2047: GMP_ASM_TYPE is expanded from... +configure.in:3106: the top level]) +m4trace:configure.in:3106: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2047: GMP_ASM_TYPE is expanded from... +configure.in:3106: the top level]) +m4trace:configure.in:3107: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2069: GMP_ASM_SIZE is expanded from... +configure.in:3107: the top level]) +m4trace:configure.in:3107: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2069: GMP_ASM_SIZE is expanded from... +configure.in:3107: the top level]) +m4trace:configure.in:3107: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2069: GMP_ASM_SIZE is expanded from... +configure.in:3107: the top level]) +m4trace:configure.in:3107: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2069: GMP_ASM_SIZE is expanded from... +configure.in:3107: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2182: GMP_ASM_LSYM_PREFIX is expanded from... +configure.in:3108: the top level]) +m4trace:configure.in:3108: -1- AC_DEFINE_TRACE_LITERAL([LSYM_PREFIX]) +m4trace:configure.in:3108: -1- m4_pattern_allow([^LSYM_PREFIX$]) +m4trace:configure.in:3108: -1- AH_OUTPUT([LSYM_PREFIX], [/* Assembler local label prefix */ @%:@undef LSYM_PREFIX]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1846: GMP_ASM_BYTE is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2965: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2239: GMP_ASM_W32 is expanded from... -configure.in:2965: the top level]) -m4trace:configure.in:2966: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1758: GMP_ASM_ALIGN_LOG is expanded from... -configure.in:2966: the top level]) -m4trace:configure.in:2966: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1758: GMP_ASM_ALIGN_LOG is expanded from... -configure.in:2966: the top level]) -m4trace:configure.in:2966: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1758: GMP_ASM_ALIGN_LOG is expanded from... -configure.in:2966: the top level]) -m4trace:configure.in:2966: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1758: GMP_ASM_ALIGN_LOG is expanded from... -configure.in:2966: the top level]) -m4trace:configure.in:2974: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2710: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.in:2974: the top level]) -m4trace:configure.in:2974: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2710: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.in:2974: the top level]) -m4trace:configure.in:2974: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2710: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.in:2974: the top level]) -m4trace:configure.in:2974: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2710: GMP_ASM_IA64_ALIGN_OK is expanded from... -configure.in:2974: the top level]) -m4trace:configure.in:2977: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2824: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.in:2977: the top level]) -m4trace:configure.in:2977: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2824: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.in:2977: the top level]) -m4trace:configure.in:2977: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2824: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.in:2977: the top level]) -m4trace:configure.in:2977: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2824: GMP_ASM_M68K_INSTRUCTION is expanded from... -configure.in:2977: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2978: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2855: GMP_ASM_M68K_ADDRESSING is expanded from... -configure.in:2978: the top level]) -m4trace:configure.in:2979: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2892: GMP_ASM_M68K_BRANCHES is expanded from... -configure.in:2979: the top level]) -m4trace:configure.in:2979: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2892: GMP_ASM_M68K_BRANCHES is expanded from... -configure.in:2979: the top level]) -m4trace:configure.in:2979: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2892: GMP_ASM_M68K_BRANCHES is expanded from... -configure.in:2979: the top level]) -m4trace:configure.in:2979: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2892: GMP_ASM_M68K_BRANCHES is expanded from... -configure.in:2979: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2982: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2931: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... -configure.in:2982: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:2983: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2968: GMP_ASM_POWERPC_R_REGISTERS is expanded from... -configure.in:2983: the top level]) -m4trace:configure.in:3016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2993: GMP_ASM_SPARC_REGISTER is expanded from... -configure.in:3016: the top level]) -m4trace:configure.in:3016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2993: GMP_ASM_SPARC_REGISTER is expanded from... -configure.in:3016: the top level]) -m4trace:configure.in:3016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2993: GMP_ASM_SPARC_REGISTER is expanded from... -configure.in:3016: the top level]) -m4trace:configure.in:3016: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2993: GMP_ASM_SPARC_REGISTER is expanded from... -configure.in:3016: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3021: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:1817: GMP_ASM_ALIGN_FILL_0x90 is expanded from... -configure.in:3021: the top level]) -m4trace:configure.in:3025: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_x86]) -m4trace:configure.in:3025: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86$]) -m4trace:configure.in:3026: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2123: GMP_ASM_COFF_TYPE is expanded from... -configure.in:3026: the top level]) -m4trace:configure.in:3026: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2123: GMP_ASM_COFF_TYPE is expanded from... -configure.in:3026: the top level]) -m4trace:configure.in:3026: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2123: GMP_ASM_COFF_TYPE is expanded from... -configure.in:3026: the top level]) -m4trace:configure.in:3026: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2123: GMP_ASM_COFF_TYPE is expanded from... -configure.in:3026: the top level]) -m4trace:configure.in:3027: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2323: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... -configure.in:3027: the top level]) -m4trace:configure.in:3027: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2323: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... -configure.in:3027: the top level]) -m4trace:configure.in:3028: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2547: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.in:3028: the top level]) -m4trace:configure.in:3028: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2547: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.in:3028: the top level]) -m4trace:configure.in:3028: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2547: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.in:3028: the top level]) -m4trace:configure.in:3028: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:1612: GMP_TRY_ASSEMBLE is expanded from... -../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from... -../../lib/autoconf/general.m4:1998: AC_CACHE_VAL is expanded from... -../../lib/autoconf/general.m4:2019: AC_CACHE_CHECK is expanded from... -acinclude.m4:2547: GMP_ASM_X86_SHLDL_CL is expanded from... -configure.in:3028: the top level]) -m4trace:configure.in:3030: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2637: GMP_ASM_X86_MCOUNT is expanded from... -configure.in:3030: the top level]) -m4trace:configure.in:3030: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. -You should run autoupdate.], [../../lib/autoconf/general.m4:377: AC_FD_CC is expanded from... -acinclude.m4:2637: GMP_ASM_X86_MCOUNT is expanded from... -configure.in:3030: the top level]) -m4trace:configure.in:3061: -1- AC_CONFIG_LINKS([gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h]) -m4trace:configure.in:3079: -1- AC_DEFINE_TRACE_LITERAL([GMP_MPARAM_H_SUGGEST]) -m4trace:configure.in:3079: -1- m4_pattern_allow([^GMP_MPARAM_H_SUGGEST$]) -m4trace:configure.in:3079: -1- AH_OUTPUT([GMP_MPARAM_H_SUGGEST], [/* The gmp-mparam.h file (a string) the tune program should suggest updating. +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1847: GMP_ASM_BYTE is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3109: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2241: GMP_ASM_W32 is expanded from... +configure.in:3109: the top level]) +m4trace:configure.in:3110: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1759: GMP_ASM_ALIGN_LOG is expanded from... +configure.in:3110: the top level]) +m4trace:configure.in:3110: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1759: GMP_ASM_ALIGN_LOG is expanded from... +configure.in:3110: the top level]) +m4trace:configure.in:3110: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1759: GMP_ASM_ALIGN_LOG is expanded from... +configure.in:3110: the top level]) +m4trace:configure.in:3110: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1759: GMP_ASM_ALIGN_LOG is expanded from... +configure.in:3110: the top level]) +m4trace:configure.in:3118: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2712: GMP_ASM_IA64_ALIGN_OK is expanded from... +configure.in:3118: the top level]) +m4trace:configure.in:3118: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2712: GMP_ASM_IA64_ALIGN_OK is expanded from... +configure.in:3118: the top level]) +m4trace:configure.in:3118: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2712: GMP_ASM_IA64_ALIGN_OK is expanded from... +configure.in:3118: the top level]) +m4trace:configure.in:3118: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2712: GMP_ASM_IA64_ALIGN_OK is expanded from... +configure.in:3118: the top level]) +m4trace:configure.in:3121: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2826: GMP_ASM_M68K_INSTRUCTION is expanded from... +configure.in:3121: the top level]) +m4trace:configure.in:3121: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2826: GMP_ASM_M68K_INSTRUCTION is expanded from... +configure.in:3121: the top level]) +m4trace:configure.in:3121: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2826: GMP_ASM_M68K_INSTRUCTION is expanded from... +configure.in:3121: the top level]) +m4trace:configure.in:3121: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2826: GMP_ASM_M68K_INSTRUCTION is expanded from... +configure.in:3121: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3122: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2857: GMP_ASM_M68K_ADDRESSING is expanded from... +configure.in:3122: the top level]) +m4trace:configure.in:3123: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2894: GMP_ASM_M68K_BRANCHES is expanded from... +configure.in:3123: the top level]) +m4trace:configure.in:3123: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2894: GMP_ASM_M68K_BRANCHES is expanded from... +configure.in:3123: the top level]) +m4trace:configure.in:3123: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2894: GMP_ASM_M68K_BRANCHES is expanded from... +configure.in:3123: the top level]) +m4trace:configure.in:3123: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2894: GMP_ASM_M68K_BRANCHES is expanded from... +configure.in:3123: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3126: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2933: GMP_ASM_POWERPC_PIC_ALWAYS is expanded from... +configure.in:3126: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3127: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2970: GMP_ASM_POWERPC_R_REGISTERS is expanded from... +configure.in:3127: the top level]) +m4trace:configure.in:3160: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2995: GMP_ASM_SPARC_REGISTER is expanded from... +configure.in:3160: the top level]) +m4trace:configure.in:3160: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2995: GMP_ASM_SPARC_REGISTER is expanded from... +configure.in:3160: the top level]) +m4trace:configure.in:3160: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2995: GMP_ASM_SPARC_REGISTER is expanded from... +configure.in:3160: the top level]) +m4trace:configure.in:3160: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2995: GMP_ASM_SPARC_REGISTER is expanded from... +configure.in:3160: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3165: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:1818: GMP_ASM_ALIGN_FILL_0x90 is expanded from... +configure.in:3165: the top level]) +m4trace:configure.in:3169: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_x86]) +m4trace:configure.in:3169: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86$]) +m4trace:configure.in:3170: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2125: GMP_ASM_COFF_TYPE is expanded from... +configure.in:3170: the top level]) +m4trace:configure.in:3170: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2125: GMP_ASM_COFF_TYPE is expanded from... +configure.in:3170: the top level]) +m4trace:configure.in:3170: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2125: GMP_ASM_COFF_TYPE is expanded from... +configure.in:3170: the top level]) +m4trace:configure.in:3170: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2125: GMP_ASM_COFF_TYPE is expanded from... +configure.in:3170: the top level]) +m4trace:configure.in:3171: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2325: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... +configure.in:3171: the top level]) +m4trace:configure.in:3171: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2325: GMP_ASM_X86_GOT_UNDERSCORE is expanded from... +configure.in:3171: the top level]) +m4trace:configure.in:3172: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2549: GMP_ASM_X86_SHLDL_CL is expanded from... +configure.in:3172: the top level]) +m4trace:configure.in:3172: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2549: GMP_ASM_X86_SHLDL_CL is expanded from... +configure.in:3172: the top level]) +m4trace:configure.in:3172: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2549: GMP_ASM_X86_SHLDL_CL is expanded from... +configure.in:3172: the top level]) +m4trace:configure.in:3172: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:1613: GMP_TRY_ASSEMBLE is expanded from... +../../lib/m4sugar/m4sh.m4:606: AS_IF is expanded from... +../../lib/autoconf/general.m4:2032: AC_CACHE_VAL is expanded from... +../../lib/autoconf/general.m4:2053: AC_CACHE_CHECK is expanded from... +acinclude.m4:2549: GMP_ASM_X86_SHLDL_CL is expanded from... +configure.in:3172: the top level]) +m4trace:configure.in:3174: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2639: GMP_ASM_X86_MCOUNT is expanded from... +configure.in:3174: the top level]) +m4trace:configure.in:3174: -1- _m4_warn([obsolete], [The macro `AC_FD_CC' is obsolete. +You should run autoupdate.], [../../lib/autoconf/general.m4:385: AC_FD_CC is expanded from... +acinclude.m4:2639: GMP_ASM_X86_MCOUNT is expanded from... +configure.in:3174: the top level]) +m4trace:configure.in:3183: -1- AC_DEFINE_TRACE_LITERAL([HAVE_HOST_CPU_FAMILY_x86_64]) +m4trace:configure.in:3183: -1- m4_pattern_allow([^HAVE_HOST_CPU_FAMILY_x86_64$]) +m4trace:configure.in:3206: -1- AC_CONFIG_LINKS([gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h]) +m4trace:configure.in:3224: -1- AC_DEFINE_TRACE_LITERAL([GMP_MPARAM_H_SUGGEST]) +m4trace:configure.in:3224: -1- m4_pattern_allow([^GMP_MPARAM_H_SUGGEST$]) +m4trace:configure.in:3224: -1- AH_OUTPUT([GMP_MPARAM_H_SUGGEST], [/* The gmp-mparam.h file (a string) the tune program should suggest updating. */ @%:@undef GMP_MPARAM_H_SUGGEST]) -m4trace:configure.in:3102: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_SHORT]) -m4trace:configure.in:3102: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_SHORT$]) -m4trace:configure.in:3102: -1- AH_OUTPUT([SIZEOF_UNSIGNED_SHORT], [/* The size of `unsigned short\', as computed by sizeof. */ +m4trace:configure.in:3247: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_VOID_P]) +m4trace:configure.in:3247: -1- m4_pattern_allow([^SIZEOF_VOID_P$]) +m4trace:configure.in:3247: -1- AH_OUTPUT([SIZEOF_VOID_P], [/* The size of `void *\', as computed by sizeof. */ +@%:@undef SIZEOF_VOID_P]) +m4trace:configure.in:3248: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_SHORT]) +m4trace:configure.in:3248: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_SHORT$]) +m4trace:configure.in:3248: -1- AH_OUTPUT([SIZEOF_UNSIGNED_SHORT], [/* The size of `unsigned short\', as computed by sizeof. */ @%:@undef SIZEOF_UNSIGNED_SHORT]) -m4trace:configure.in:3103: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED]) -m4trace:configure.in:3103: -1- m4_pattern_allow([^SIZEOF_UNSIGNED$]) -m4trace:configure.in:3103: -1- AH_OUTPUT([SIZEOF_UNSIGNED], [/* The size of `unsigned\', as computed by sizeof. */ +m4trace:configure.in:3249: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED]) +m4trace:configure.in:3249: -1- m4_pattern_allow([^SIZEOF_UNSIGNED$]) +m4trace:configure.in:3249: -1- AH_OUTPUT([SIZEOF_UNSIGNED], [/* The size of `unsigned\', as computed by sizeof. */ @%:@undef SIZEOF_UNSIGNED]) -m4trace:configure.in:3104: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_LONG]) -m4trace:configure.in:3104: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG$]) -m4trace:configure.in:3104: -1- AH_OUTPUT([SIZEOF_UNSIGNED_LONG], [/* The size of `unsigned long\', as computed by sizeof. */ +m4trace:configure.in:3250: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_LONG]) +m4trace:configure.in:3250: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG$]) +m4trace:configure.in:3250: -1- AH_OUTPUT([SIZEOF_UNSIGNED_LONG], [/* The size of `unsigned long\', as computed by sizeof. */ @%:@undef SIZEOF_UNSIGNED_LONG]) -m4trace:configure.in:3105: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_MP_LIMB_T]) -m4trace:configure.in:3105: -1- m4_pattern_allow([^SIZEOF_MP_LIMB_T$]) -m4trace:configure.in:3105: -1- AH_OUTPUT([SIZEOF_MP_LIMB_T], [/* The size of `mp_limb_t\', as computed by sizeof. */ +m4trace:configure.in:3251: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_MP_LIMB_T]) +m4trace:configure.in:3251: -1- m4_pattern_allow([^SIZEOF_MP_LIMB_T$]) +m4trace:configure.in:3251: -1- AH_OUTPUT([SIZEOF_MP_LIMB_T], [/* The size of `mp_limb_t\', as computed by sizeof. */ @%:@undef SIZEOF_MP_LIMB_T]) -m4trace:configure.in:3109: -1- AC_SUBST([BITS_PER_MP_LIMB], [`expr 8 \* $ac_cv_sizeof_mp_limb_t`]) -m4trace:configure.in:3109: -1- AC_SUBST_TRACE([BITS_PER_MP_LIMB]) -m4trace:configure.in:3109: -1- m4_pattern_allow([^BITS_PER_MP_LIMB$]) -m4trace:configure.in:3149: -1- AC_SUBST([mpn_objs_in_libmp]) -m4trace:configure.in:3149: -1- AC_SUBST_TRACE([mpn_objs_in_libmp]) -m4trace:configure.in:3149: -1- m4_pattern_allow([^mpn_objs_in_libmp$]) -m4trace:configure.in:3151: -1- AC_SUBST([mpn_objects]) -m4trace:configure.in:3151: -1- AC_SUBST_TRACE([mpn_objects]) -m4trace:configure.in:3151: -1- m4_pattern_allow([^mpn_objects$]) -m4trace:configure.in:3152: -1- AC_SUBST([mpn_objs_in_libgmp]) -m4trace:configure.in:3152: -1- AC_SUBST_TRACE([mpn_objs_in_libgmp]) -m4trace:configure.in:3152: -1- m4_pattern_allow([^mpn_objs_in_libgmp$]) -m4trace:configure.in:3153: -1- AC_SUBST([gmp_srclinks]) -m4trace:configure.in:3153: -1- AC_SUBST_TRACE([gmp_srclinks]) -m4trace:configure.in:3153: -1- m4_pattern_allow([^gmp_srclinks$]) -m4trace:configure.in:3164: -1- AC_DEFINE_TRACE_LITERAL([TUNE_SQR_KARATSUBA_MAX]) -m4trace:configure.in:3164: -1- m4_pattern_allow([^TUNE_SQR_KARATSUBA_MAX$]) -m4trace:configure.in:3164: -1- AH_OUTPUT([TUNE_SQR_KARATSUBA_MAX], [/* Maximum size the tune program can test for SQR_KARATSUBA_THRESHOLD */ -@%:@undef TUNE_SQR_KARATSUBA_MAX]) -m4trace:configure.in:3174: -1- AC_DEFINE_TRACE_LITERAL([TUNE_SQR_KARATSUBA_MAX]) -m4trace:configure.in:3174: -1- m4_pattern_allow([^TUNE_SQR_KARATSUBA_MAX$]) -m4trace:configure.in:3182: -1- AC_SUBST([TUNE_SQR_OBJ]) -m4trace:configure.in:3182: -1- AC_SUBST_TRACE([TUNE_SQR_OBJ]) -m4trace:configure.in:3182: -1- m4_pattern_allow([^TUNE_SQR_OBJ$]) -m4trace:configure.in:3187: -1- AC_CONFIG_FILES([demos/pexpr-config.h:demos/pexpr-config-h.in]) -m4trace:configure.in:3188: -1- AC_SUBST([HAVE_CLOCK_01], [1]) -m4trace:configure.in:3188: -1- AC_SUBST_TRACE([HAVE_CLOCK_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_CLOCK_01$]) -m4trace:configure.in:3188: -1- AC_SUBST([HAVE_CPUTIME_01], [1]) -m4trace:configure.in:3188: -1- AC_SUBST_TRACE([HAVE_CPUTIME_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_CPUTIME_01$]) -m4trace:configure.in:3188: -1- AC_SUBST([HAVE_GETRUSAGE_01], [1]) -m4trace:configure.in:3188: -1- AC_SUBST_TRACE([HAVE_GETRUSAGE_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_GETRUSAGE_01$]) -m4trace:configure.in:3188: -1- AC_SUBST([HAVE_GETTIMEOFDAY_01], [1]) -m4trace:configure.in:3188: -1- AC_SUBST_TRACE([HAVE_GETTIMEOFDAY_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY_01$]) -m4trace:configure.in:3188: -1- AC_SUBST([HAVE_SIGACTION_01], [1]) -m4trace:configure.in:3188: -1- AC_SUBST_TRACE([HAVE_SIGACTION_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_SIGACTION_01$]) -m4trace:configure.in:3188: -1- AC_SUBST([HAVE_SIGALTSTACK_01], [1]) -m4trace:configure.in:3188: -1- AC_SUBST_TRACE([HAVE_SIGALTSTACK_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_SIGALTSTACK_01$]) -m4trace:configure.in:3188: -1- AC_SUBST([HAVE_SIGSTACK_01], [1]) -m4trace:configure.in:3188: -1- AC_SUBST_TRACE([HAVE_SIGSTACK_01]) -m4trace:configure.in:3188: -1- m4_pattern_allow([^HAVE_SIGSTACK_01$]) -m4trace:configure.in:3189: -1- AC_SUBST([HAVE_SYS_RESOURCE_H_01], [1]) -m4trace:configure.in:3189: -1- AC_SUBST_TRACE([HAVE_SYS_RESOURCE_H_01]) -m4trace:configure.in:3189: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H_01$]) -m4trace:configure.in:3190: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STACK_T]) -m4trace:configure.in:3190: -1- m4_pattern_allow([^HAVE_STACK_T$]) -m4trace:configure.in:3190: -1- AH_OUTPUT([HAVE_STACK_T], [/* Define to 1 if the system has the type `stack_t\'. */ +m4trace:configure.in:3255: -1- AC_SUBST([GMP_LIMB_BITS], [`expr 8 \* $ac_cv_sizeof_mp_limb_t`]) +m4trace:configure.in:3255: -1- AC_SUBST_TRACE([GMP_LIMB_BITS]) +m4trace:configure.in:3255: -1- m4_pattern_allow([^GMP_LIMB_BITS$]) +m4trace:configure.in:3295: -1- AC_SUBST([mpn_objs_in_libmp]) +m4trace:configure.in:3295: -1- AC_SUBST_TRACE([mpn_objs_in_libmp]) +m4trace:configure.in:3295: -1- m4_pattern_allow([^mpn_objs_in_libmp$]) +m4trace:configure.in:3297: -1- AC_SUBST([mpn_objects]) +m4trace:configure.in:3297: -1- AC_SUBST_TRACE([mpn_objects]) +m4trace:configure.in:3297: -1- m4_pattern_allow([^mpn_objects$]) +m4trace:configure.in:3298: -1- AC_SUBST([mpn_objs_in_libgmp]) +m4trace:configure.in:3298: -1- AC_SUBST_TRACE([mpn_objs_in_libgmp]) +m4trace:configure.in:3298: -1- m4_pattern_allow([^mpn_objs_in_libgmp$]) +m4trace:configure.in:3299: -1- AC_SUBST([gmp_srclinks]) +m4trace:configure.in:3299: -1- AC_SUBST_TRACE([gmp_srclinks]) +m4trace:configure.in:3299: -1- m4_pattern_allow([^gmp_srclinks$]) +m4trace:configure.in:3310: -1- AC_DEFINE_TRACE_LITERAL([TUNE_SQR_TOOM2_MAX]) +m4trace:configure.in:3310: -1- m4_pattern_allow([^TUNE_SQR_TOOM2_MAX$]) +m4trace:configure.in:3310: -1- AH_OUTPUT([TUNE_SQR_TOOM2_MAX], [/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ +@%:@undef TUNE_SQR_TOOM2_MAX]) +m4trace:configure.in:3320: -1- AC_DEFINE_TRACE_LITERAL([TUNE_SQR_TOOM2_MAX]) +m4trace:configure.in:3320: -1- m4_pattern_allow([^TUNE_SQR_TOOM2_MAX$]) +m4trace:configure.in:3328: -1- AC_SUBST([TUNE_SQR_OBJ]) +m4trace:configure.in:3328: -1- AC_SUBST_TRACE([TUNE_SQR_OBJ]) +m4trace:configure.in:3328: -1- m4_pattern_allow([^TUNE_SQR_OBJ$]) +m4trace:configure.in:3333: -1- AC_CONFIG_FILES([demos/pexpr-config.h:demos/pexpr-config-h.in]) +m4trace:configure.in:3334: -1- AC_SUBST([HAVE_CLOCK_01], [1]) +m4trace:configure.in:3334: -1- AC_SUBST_TRACE([HAVE_CLOCK_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_CLOCK_01$]) +m4trace:configure.in:3334: -1- AC_SUBST([HAVE_CPUTIME_01], [1]) +m4trace:configure.in:3334: -1- AC_SUBST_TRACE([HAVE_CPUTIME_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_CPUTIME_01$]) +m4trace:configure.in:3334: -1- AC_SUBST([HAVE_GETRUSAGE_01], [1]) +m4trace:configure.in:3334: -1- AC_SUBST_TRACE([HAVE_GETRUSAGE_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_GETRUSAGE_01$]) +m4trace:configure.in:3334: -1- AC_SUBST([HAVE_GETTIMEOFDAY_01], [1]) +m4trace:configure.in:3334: -1- AC_SUBST_TRACE([HAVE_GETTIMEOFDAY_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY_01$]) +m4trace:configure.in:3334: -1- AC_SUBST([HAVE_SIGACTION_01], [1]) +m4trace:configure.in:3334: -1- AC_SUBST_TRACE([HAVE_SIGACTION_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_SIGACTION_01$]) +m4trace:configure.in:3334: -1- AC_SUBST([HAVE_SIGALTSTACK_01], [1]) +m4trace:configure.in:3334: -1- AC_SUBST_TRACE([HAVE_SIGALTSTACK_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_SIGALTSTACK_01$]) +m4trace:configure.in:3334: -1- AC_SUBST([HAVE_SIGSTACK_01], [1]) +m4trace:configure.in:3334: -1- AC_SUBST_TRACE([HAVE_SIGSTACK_01]) +m4trace:configure.in:3334: -1- m4_pattern_allow([^HAVE_SIGSTACK_01$]) +m4trace:configure.in:3335: -1- AC_SUBST([HAVE_SYS_RESOURCE_H_01], [1]) +m4trace:configure.in:3335: -1- AC_SUBST_TRACE([HAVE_SYS_RESOURCE_H_01]) +m4trace:configure.in:3335: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H_01$]) +m4trace:configure.in:3336: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STACK_T]) +m4trace:configure.in:3336: -1- m4_pattern_allow([^HAVE_STACK_T$]) +m4trace:configure.in:3336: -1- AH_OUTPUT([HAVE_STACK_T], [/* Define to 1 if the system has the type `stack_t\'. */ @%:@undef HAVE_STACK_T]) -m4trace:configure.in:3192: -1- AC_SUBST([HAVE_STACK_T_01]) -m4trace:configure.in:3192: -1- AC_SUBST_TRACE([HAVE_STACK_T_01]) -m4trace:configure.in:3192: -1- m4_pattern_allow([^HAVE_STACK_T_01$]) -m4trace:configure.in:3213: -1- AC_CONFIG_FILES([demos/calc/calc-config.h:demos/calc/calc-config-h.in]) -m4trace:configure.in:3219: -1- AC_SUBST([LIBCURSES]) -m4trace:configure.in:3219: -1- AC_SUBST_TRACE([LIBCURSES]) -m4trace:configure.in:3219: -1- m4_pattern_allow([^LIBCURSES$]) -m4trace:configure.in:3231: -1- AC_SUBST([WITH_READLINE_01], [1]) -m4trace:configure.in:3231: -1- AC_SUBST_TRACE([WITH_READLINE_01]) -m4trace:configure.in:3231: -1- m4_pattern_allow([^WITH_READLINE_01$]) -m4trace:configure.in:3232: -1- AC_SUBST([LIBREADLINE], [-lreadline]) -m4trace:configure.in:3232: -1- AC_SUBST_TRACE([LIBREADLINE]) -m4trace:configure.in:3232: -1- m4_pattern_allow([^LIBREADLINE$]) -m4trace:configure.in:3236: -1- AC_SUBST([YACC]) -m4trace:configure.in:3236: -1- AC_SUBST_TRACE([YACC]) -m4trace:configure.in:3236: -1- m4_pattern_allow([^YACC$]) -m4trace:configure.in:3236: -1- AC_SUBST([YACC]) -m4trace:configure.in:3236: -1- AC_SUBST_TRACE([YACC]) -m4trace:configure.in:3236: -1- m4_pattern_allow([^YACC$]) -m4trace:configure.in:3236: -1- AC_SUBST([YFLAGS]) -m4trace:configure.in:3236: -1- AC_SUBST_TRACE([YFLAGS]) -m4trace:configure.in:3236: -1- m4_pattern_allow([^YFLAGS$]) -m4trace:configure.in:3237: -1- AC_SUBST([LEX]) -m4trace:configure.in:3237: -1- AC_SUBST_TRACE([LEX]) -m4trace:configure.in:3237: -1- m4_pattern_allow([^LEX$]) -m4trace:configure.in:3237: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root]) -m4trace:configure.in:3237: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT]) -m4trace:configure.in:3237: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) -m4trace:configure.in:3237: -1- AC_SUBST([LEXLIB]) -m4trace:configure.in:3237: -1- AC_SUBST_TRACE([LEXLIB]) -m4trace:configure.in:3237: -1- m4_pattern_allow([^LEXLIB$]) -m4trace:configure.in:3237: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER]) -m4trace:configure.in:3237: -1- m4_pattern_allow([^YYTEXT_POINTER$]) -m4trace:configure.in:3237: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a +m4trace:configure.in:3338: -1- AC_SUBST([HAVE_STACK_T_01]) +m4trace:configure.in:3338: -1- AC_SUBST_TRACE([HAVE_STACK_T_01]) +m4trace:configure.in:3338: -1- m4_pattern_allow([^HAVE_STACK_T_01$]) +m4trace:configure.in:3359: -1- AC_CONFIG_FILES([demos/calc/calc-config.h:demos/calc/calc-config-h.in]) +m4trace:configure.in:3365: -1- AC_SUBST([LIBCURSES]) +m4trace:configure.in:3365: -1- AC_SUBST_TRACE([LIBCURSES]) +m4trace:configure.in:3365: -1- m4_pattern_allow([^LIBCURSES$]) +m4trace:configure.in:3377: -1- AC_SUBST([WITH_READLINE_01], [1]) +m4trace:configure.in:3377: -1- AC_SUBST_TRACE([WITH_READLINE_01]) +m4trace:configure.in:3377: -1- m4_pattern_allow([^WITH_READLINE_01$]) +m4trace:configure.in:3378: -1- AC_SUBST([LIBREADLINE], [-lreadline]) +m4trace:configure.in:3378: -1- AC_SUBST_TRACE([LIBREADLINE]) +m4trace:configure.in:3378: -1- m4_pattern_allow([^LIBREADLINE$]) +m4trace:configure.in:3382: -1- AC_SUBST([YACC]) +m4trace:configure.in:3382: -1- AC_SUBST_TRACE([YACC]) +m4trace:configure.in:3382: -1- m4_pattern_allow([^YACC$]) +m4trace:configure.in:3382: -1- AC_SUBST([YACC]) +m4trace:configure.in:3382: -1- AC_SUBST_TRACE([YACC]) +m4trace:configure.in:3382: -1- m4_pattern_allow([^YACC$]) +m4trace:configure.in:3382: -1- AC_SUBST([YFLAGS]) +m4trace:configure.in:3382: -1- AC_SUBST_TRACE([YFLAGS]) +m4trace:configure.in:3382: -1- m4_pattern_allow([^YFLAGS$]) +m4trace:configure.in:3383: -1- AC_SUBST([LEX]) +m4trace:configure.in:3383: -1- AC_SUBST_TRACE([LEX]) +m4trace:configure.in:3383: -1- m4_pattern_allow([^LEX$]) +m4trace:configure.in:3383: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root]) +m4trace:configure.in:3383: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT]) +m4trace:configure.in:3383: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) +m4trace:configure.in:3383: -1- AC_SUBST([LEXLIB]) +m4trace:configure.in:3383: -1- AC_SUBST_TRACE([LEXLIB]) +m4trace:configure.in:3383: -1- m4_pattern_allow([^LEXLIB$]) +m4trace:configure.in:3383: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER]) +m4trace:configure.in:3383: -1- m4_pattern_allow([^YYTEXT_POINTER$]) +m4trace:configure.in:3383: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a `char@<:@@:>@\'. */ @%:@undef YYTEXT_POINTER]) -m4trace:configure.in:3246: -1- AC_SUBST([RANLIB]) -m4trace:configure.in:3246: -1- AC_SUBST_TRACE([RANLIB]) -m4trace:configure.in:3246: -1- m4_pattern_allow([^RANLIB$]) -m4trace:configure.in:3256: -1- AC_CONFIG_FILES([Makefile \ +m4trace:configure.in:3392: -1- AC_SUBST([RANLIB]) +m4trace:configure.in:3392: -1- AC_SUBST_TRACE([RANLIB]) +m4trace:configure.in:3392: -1- m4_pattern_allow([^RANLIB$]) +m4trace:configure.in:3402: -1- AC_CONFIG_FILES([Makefile \ mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile \ mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile \ tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile \ @@ -3438,32 +3449,32 @@ doc/Makefile tune/Makefile \ demos/Makefile demos/calc/Makefile demos/expr/Makefile \ gmp.h:gmp-h.in mp.h:mp-h.in]) -m4trace:configure.in:3256: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. +m4trace:configure.in:3402: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. You should run autoupdate.], []) -m4trace:configure.in:3256: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) -m4trace:configure.in:3256: -1- m4_pattern_allow([^LIB@&t@OBJS$]) -m4trace:configure.in:3256: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([LTLIBOBJS]) -m4trace:configure.in:3256: -1- m4_pattern_allow([^LTLIBOBJS$]) -m4trace:configure.in:3256: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) -m4trace:configure.in:3256: -1- AC_SUBST([am__EXEEXT_TRUE]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) -m4trace:configure.in:3256: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) -m4trace:configure.in:3256: -1- AC_SUBST([am__EXEEXT_FALSE]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) -m4trace:configure.in:3256: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) -m4trace:configure.in:3256: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) -m4trace:configure.in:3256: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([top_builddir]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([top_build_prefix]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([srcdir]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([abs_srcdir]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([top_srcdir]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([abs_top_srcdir]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([builddir]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([abs_builddir]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([abs_top_builddir]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([INSTALL]) -m4trace:configure.in:3256: -1- AC_SUBST_TRACE([MKDIR_P]) -m4trace:configure.in:3256: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) +m4trace:configure.in:3402: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) +m4trace:configure.in:3402: -1- m4_pattern_allow([^LIB@&t@OBJS$]) +m4trace:configure.in:3402: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([LTLIBOBJS]) +m4trace:configure.in:3402: -1- m4_pattern_allow([^LTLIBOBJS$]) +m4trace:configure.in:3402: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"]) +m4trace:configure.in:3402: -1- AC_SUBST([am__EXEEXT_TRUE]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE]) +m4trace:configure.in:3402: -1- m4_pattern_allow([^am__EXEEXT_TRUE$]) +m4trace:configure.in:3402: -1- AC_SUBST([am__EXEEXT_FALSE]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE]) +m4trace:configure.in:3402: -1- m4_pattern_allow([^am__EXEEXT_FALSE$]) +m4trace:configure.in:3402: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE]) +m4trace:configure.in:3402: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([top_builddir]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([top_build_prefix]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([srcdir]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([abs_srcdir]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([top_srcdir]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([abs_top_srcdir]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([builddir]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([abs_builddir]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([abs_top_builddir]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([INSTALL]) +m4trace:configure.in:3402: -1- AC_SUBST_TRACE([MKDIR_P]) +m4trace:configure.in:3402: -1- AC_REQUIRE_AUX_FILE([ltmain.sh]) diff -Nru gmp-4.3.2+dfsg/ChangeLog gmp-5.0.2+dfsg/ChangeLog --- gmp-4.3.2+dfsg/ChangeLog 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/ChangeLog 2011-05-08 09:49:29.000000000 +0000 @@ -1,112 +1,2163 @@ +2011-05-07 Torbjorn Granlund + + * Version 5.0.2 released. + + * gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump. + + * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*): + Bump version info. + +2011-05-05 Torbjorn Granlund + + * mpn/x86_64/fat/fat_entry.asm: (PIC_OR_DARWIN): New symbol. Use it to + work around Darwin problems. + +2011-05-02 Marc Glisse + + * configfsf.guess: Update to version of 2011-02-02. + * configfsf.sub: Update to version of 2011-03-23. + +2011-04-30 Marc Glisse + + * gmp-h.in (mpz_cdiv_q_2exp): Use mp_bitcnt_t to match the definition + and the documentation. + (mpz_remove): Likewise. + (mpf_eq): Likewise. + + * ltmain.sh: Remove. + * .bootstrap: Let libtoolize generate ltmain.sh. + + * doc/gmp.texi (mpf_urandomb): Explicit the fact that it does not + change the precision. + +2011-04-27 Torbjorn Granlund + + * tune/speed.h (speed_cyclecounter): Always use PIC variant when + compiled with Apple's GCC. + +2011-04-26 Torbjorn Granlund + + * mpn/sparc32/sparc-defs.m4 (changecom): Don't redefine '!' as it + interferes with expressions. + +2011-04-10 Torbjorn Granlund + + * acinclude.m4 (GMP_ASM_RODATA): Make 'foo' larger to avoid clang + problems. + +2011-03-28 Torbjorn Granlund + + * mpn/x86/invert_limb.asm: Protect movzwl register parameters from + being interpreted as m4 macro parameters. + +2011-03-21 Torbjorn Granlund + + * configure.in (hppa): Under linux, treat 64-bit processors as if they + were 32-bit processors. + +2011-03-15 Marco Bodrato + + * mpn/generic/toom_interpolate_16pts.c: Remove ambiguity. + +2011-03-12 Torbjorn Granlund + + * tune/powerpc.asm: Use powerpc syntax, not power syntax. + +2011-03-09 Marc Glisse + + * doc/gmp.texi: Remove void return type from constructors. Document + explicit constructors. Document mpf_class::mpf_class(mpf_t). + +2011-02-24 Torbjorn Granlund + + * mpn/x86/p6/sse2/mod_1_4.asm: Fix typo in MULFUNC_PROLOGUE. + +2011-02-04 Torbjorn Granlund + + * mpn/x86_64/core2/popcount.asm: Add a MULFUNC_PROLOGUE. + * mpn/x86_64/pentium4/popcount.asm: Likewise. + +2011-01-25 Marco Bodrato + + * mpz/mul.c: Remove redundant size computation. + +2010-11-11 Torbjorn Granlund + + * mpn/x86_64/atom/aors_n.asm: Don't rely on ZF after 'bt' insn. + Use 64-bit 'test' to support operands of 2^32 limbs and more. + +2010-11-06 Torbjorn Granlund + + * mpn/x86_64/aors_n.asm: Rewrite not to rely on ZF after 'bt' insn. + +2010-10-04 Torbjorn Granlund + + * mpn/x86_64/gcd_1.asm: Use m4_lshift to avoid << operator. + * mpn/x86/k7/gcd_1.asm: Likewise. + +2010-08-20 Niels Möller + + Suggested by Ozkan Sezer: + * configure.in: If $M4 is already set in the environment, don't + touch it. Fixed the case that no assembler files are used, and + GMP_PROG_M4 is omitted. + +2010-05-24 Torbjorn Granlund + + * mpn/generic/mu_div_qr.c (mpn_preinv_mu_div_qr_itch): New function. + * gmp-impl.h: Declare it. + * tune/common.c (speed_mpn_mupi_div_qr): Use new itch function. + * tune/speed.h (SPEED_ROUTINE_MPN_MUPI_DIV_QR): Pass parameters right + for new itch function. + +2010-05-14 Torbjorn Granlund + + * mpn/generic/redc_2.c: Use asm code just for GNU C. + +2010-04-10 Torbjorn Granlund + + * mpn/x86/divrem_2.asm: Use "orb" instead of "or" to work around + Solaris assembler bug. + * mpn/x86_64/mpn/x86_64/divrem_2.asm: Likewise. + +2010-03-25 Torbjorn Granlund + + * mpn/generic/toom33_mul.c: Fix mpn_add_n_sub_n usage. + * mpn/generic/toom3_sqr.c: Likewise. + * mpn/generic/toom63_mul.c: Likewise. + +2010-03-19 Torbjorn Granlund + + * mpn/generic/toom_interpolate_6pts.c: Call mpn_sublsh2_n and + mpn_sublsh_n with correct args. + +2010-03-06 Torbjorn Granlund + + * tests/tests.h (TESTS_REPS): Fix typo. + +2010-02-26 Torbjorn Granlund + + * mpn/pa64/aors_n.asm: Fix typo in last change. + +2010-02-25 Torbjorn Granlund + + * tests/mpz/t-perfpow.c (check_random): Use mp_limb_t type for limb + variables. + + * tests/mpn/t-div.c: Cast a switch index to placate HP's cc. + * tests/mpn/t-bdiv.c: Likewise. + + * mpn/pa64/aors_n.asm: Fix support of the 2.0n ABI. + +2010-02-23 Torbjorn Granlund + + * mpn/generic/mod_1_3.c: Cast a switch index. + + * mpn/generic/sqrtrem.c: Use CNST_LIMB. + +2010-02-07 Torbjorn Granlund + + * tune/tuneup.c (tune_redc): Set min_size and min_is_always when + measuring REDC_1_TO_REDC_2_THRESHOLD. + (tune_mod_1): Set min_size for PREINV_MOD_1_TO_MOD_1_THRESHOLD. + + * mpn/x86_64/aorrlsh_n.asm (cnt): Fix a typo. + * mpn/x86_64/lshsub_n.asm: Likewise. + +2010-02-05 Torbjorn Granlund + + * Version 5.0.1 released. + + * mpn/generic/powm.c: Use rp target area for power table computation in + order to use less scratch. + + * mpn/generic/binvert.c (mpn_binvert_itch): Enable more economical + mpn_mulmod_bnm1_itch call. + + * mpn/generic/mu_div_qr.c: Remove always true #if. + * mpn/generic/mu_divappr_q.c: Likewise. + * mpn/generic/mu_bdiv_q.c: Likewise. + * mpn/generic/mu_bdiv_qr.c: Likewise. + +2010-02-01 Torbjorn Granlund + + * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*): + Bump version info. + + * mpn/powerpc64/mode64/gmp-mparam.h: Remove {MUL,SQR}_FFT_TABLE2. + * mpn/x86/p6/gmp-mparam.h: Likewise. + * mpn/x86/p6/mmx/gmp-mparam.h: Likewise. + * mpn/generic/mul_fft.c: Don't depend on FFT_TABLE2, it was broken. + +2010-01-29 Torbjorn Granlund + + * mpn/generic/mul_fft.c (mpn_mul_fft_internal): Remove arguments n, m, + k and rec; add argument sqr. Don't call mpn_mul_fft_decompose here, + instead do that in all callers. + (mpn_mul_fft): Trim allocation when squaring, and use TMP_ALLOC*, not + explicit alloc/free. + (mpn_fft_div_2exp_modF): Avoid a scalar division. + (mpn_fft_mul_modF_K): Replace some multiplies by K with shifting by k. + (mpn_fft_mul_2exp_modF): Make function more symmetrical. + +2010-01-27 Torbjorn Granlund + + * mpn/generic/mu_div_q.c (mpn_mu_div_q_itch): Rewrite. + * mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Re-enable + better mulmod itch estimate. + * mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise. + * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise. + * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise. + +2010-01-27 Marco Bodrato + + * mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Disabled guessed + estimate, enabled a conservative one. + * mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise. + * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise. + * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise. + +2010-01-26 Marco Bodrato + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Partial rewrite to + reduce memory usage. + * mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Likewise. + (mpn_sqrmod_bnm1_next_size): New function. + + * gmp-impl.h (mpn_mulmod_bnm1_itch): Accepts 3 parameters now. + (mpn_sqrmod_bnm1_itch): New inline function. + (mpn_sqrmod_bnm1_next_size): Declaration and mangling. + * mpn/generic/nussbaumer_mul.c: Use the new functions. + + * mpn/generic/invertappr.c (mpn_ni_invertappr): Use new syntax for + mpn_mulmod_bnm1_itch. + * mpn/generic/mu_divappr_q.c (mpn_mu_divappr_q_itch): Likewise. + * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Likewise. + * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Likewise. + * mpn/generic/mu_div_qr.c (mpn_mu_div_qr_itch): Likewise. + * mpn/generic/binvert.c (mpn_binvert_itch): Likewise. + * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL): Likewise. + (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Likewise. + + * tests/mpn/t-sqrmod_bnm1.c, tests/mpn/t-mulmod_bnm1.c: Test + reduced memory usage. + +2010-01-25 Torbjorn Granlund + + * tune/tuneup.c (INSERT_FFTTAB): New macro, like old insertion code but + also inserting a sentinel. + (fftmes): Use INSERT_FFTTAB for inserting new measurements. + Limit k range to best_k - 4 ... best_k + 4. + +2010-01-23 Torbjorn Granlund + + * gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump. + (__GMP_MP_RELEASE): New macro. + + * mpf/div.c: Rewrite to use mpn_div_q. + +2010-01-21 Torbjorn Granlund + + * Add FFT_TABLE3 tables for a basic set of machines. + + * configure.in: Use -mtune=nocona for 64-bit pentium4. + + * config.guess: Recognise many more Intel processors. + + * tune/common.c: Whitespace cleanup. + (speed_mpn_matrix22_mul): Rewrite. + +2010-01-21 Niels Möller + + * mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Take + advantage of new mpn_mulmod_bnm1 interface, to reduce allocation. + + * tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1, main): Adapted to + mpn_mulmod_bnm1 interface change. + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Interface change, + in case an + bn < rn, only write an + bn output limbs. New input + requirement, an + bn > rn/2. + * mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Corresponding + changes. + +2010-01-19 Torbjorn Granlund + + * tune/tuneup.c (fftmes): Round up initial n according to initial k. + Limit k to 24 in loop. Remove an obsolete always-true condition. + Remove a redundant trace printout. + +2010-01-18 Torbjorn Granlund + + * tune/tuneup.c (fftmes): New function + (fft): Rewrite. + (mpn_mul_fft_lcm): New function, copied from mpn/generic/mul_fft.c. + (fftfill): New function, code taken from mul_fft.c (mpn_mul_fft). + (cached_measure): New function. + + * gmp-impl.h (struct fft_table_nk): Moved from mul_fft.c. + (MUL_FFT_TABLE3, SQR_FFT_TABLE3): Provide dummy versions for tuneup + builds. + (FFT_TABLE3_SIZE): Increase value for tuneup builds. + + * mpn/generic/mul_fft.c: Handle a new FFT threshold table type ("3"). + Misc cleanups to old table type code. + +2010-01-16 Torbjorn Granlund + + * mpn/x86_64/darwin.m4: Fix typo in last change. + +2010-01-15 Torbjorn Granlund + + * gmp-h.in (__GMP_EXTERN_INLINE): Remove "extern" for newer Sun C. + + * gmp-impl.h (GMP_LIMB_BYTES): New define. + + * mpn/x86_64/darwin.m4 (LEA): New define. + + * mpn/x86/invert_limb.asm (approx_tab): Use DEF_OBJECT. + Rename and globalise it to work around Mac OS bug. + + With Philip McLaughlin: + * mpn/x86_64/gcd_1.asm (ctz_table): Don't use local prefix, but + use DEF_OBJECT...END_OBJECT. + Keep stack pointer at ABI mandated alignment over call. + +2010-01-12 Torbjorn Granlund + + * tune/speed.c (routine): Remove obsolete mpn_dc_tdiv_qr and + mpn_dc_div_qr_n. + * tune/common.c (speed_mpn_dc_tdiv_qr, speed_mpn_dcpi1_div_qr_n): + Remove now unused functions. + * tune/speed.h (SPEED_ROUTINE_MPN_DC_DIVREM_N, + SPEED_ROUTINE_MPN_DC_DIVREM_SB, SPEED_ROUTINE_MPN_DC_TDIV_QR): Remove + now unused macros. + + * mpn/x86_64/fat/fat_entry.asm (mpn_cpuid_available): Remove function. + + * ltmain.sh: Upgrade from 1.5.24 to 2.2.6b. + * ylwrap: New file. + * .bootstrap: Remove explicit versions. + + * doc/gmp.texi (Block-wise Barrett Division): New node. + + * mpn/generic/powm.c: Change some #if to plain 'if' to avoid fat build + problems. + +2010-01-11 Torbjorn Granlund + + * tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV): Accept arguments for size + restrictions. + * tune/common.c (speed_mpn_sbpi1_div_qr, speed_mpn_dcpi1_div_qr, + (speed_mpn_sbpi1_divappr_q, speed_mpn_dcpi1_divappr_q): Pass size + limits for SPEED_ROUTINE_MPN_PI1_DIV. + + * tune/speed.c (routine): Allow .r argument for mpn_sbpi1_divappr_q and + mpn_dcpi1_divappr_q. + +2010-01-08 Torbjorn Granlund + + * Version 5.0.0 released. + + * mpn/generic/div_q.c: Handle mpn_*_divappr_q returning high limb + everywhere. + 2010-01-07 Torbjorn Granlund - * Version 4.3.2 released. + * Update MUL_FFT_TABLE2 and SQR_FFT_TABLE2 for many machines. + + * mpn/generic/mu_div_q.c: Account for divisor truncation error as well + as mpn_mu_divappr_q's error. + + * mpn/generic/mu_div_q.c: Handle mpn_preinv_mu_divappr_q returning a + high limb. + + * tests/mpn/t-bdiv.c: Move a random call for debugability. + * tests/mpn/t-div.c: Likewise. + + * mpn/generic/mu_divappr_q.c: Rewrite quotient round-up code. + + * mpn/generic/mu_div_qr.c: Handle carry-out from a carry propagation + subtract. + * mpn/generic/mu_divappr_q.c: Likewise. + + * mpn/generic/mu_divappr_q.c + (mpn_preinv_mu_divappr_q, mpn_mu_divappr_q): Declare dividend constant. + * gmp-impl.h: Likewise. + + * perfpow.c (mpn_perfect_power_p): Call mpn_divexact instead of + mpn_bdiv_q (with too little scratch space!). + + From Niels Möller: + * tests/mpn/t-div.c (check_one): Get rid of the poorly managed variable + tn. + + * mpn/minithres/gmp-mparam.h: Add all lately defined thresholds. + + * mpn/generic/div_q.c: Use SB division for small quotients as well as + small divisors. Fix typo in itch call. + +2010-01-06 Niels Möller + + * tests/mpn/t-div.c (check_one): Checking based on multiplication, + refmpn_mul, rather than refmpn_tdiv_qr. + +2010-01-06 Marco Bodrato + + * mpn/generic/toom8h_mul.c: Avoid overflows of mp_size_t. + +2010-01-06 Torbjorn Granlund + + * gmp-h.in (__GNU_MP__): Bump. + (__GNU_MP_VERSION,__GNU_MP_VERSION_MINOR,__GNU_MP_VERSION_PATCHLEVEL): + Bump version info. + * mp-h.in (__GNU_MP__): Bump. + * Makefile.am (LIBGMP_LT_*, LIBGMPXX_LT_*, LIBMP_LT_*): + Bump version info. + + * doc/gmp.texi: Rewrite mpn_gcdext text. Remove some out-of-date + text in Algorithms chapter. + + * mpn/generic/div_q.c: Properly handle np=scratch. Fix critical typo + in final adjustment code. Misc cleanups. + + * mpn/generic/rootrem.c: Use mpn_div_q. + * mpz/tdiv_q.c: Likewise. + + * tests/mpn/t-div.c: Test mpn_div_q. + (SIZE_LOG): Up to 17. + + * mpn/generic/div_q.c: New file. + * configure.in (gmp_mpn_functions): Add div_q. + + * mpn/generic/mu_div_q.c: Actually declare dividend constant. + +2010-01-04 Torbjorn Granlund + + * tune/tuneup.c (fft): Separate tuning of modf and full products. + (struct fft_param_t): New field, mul_modf_function. + (tune_fft_sqr): Fix typo. + (tune_fft_mul, tune_fft_sqr): Initialise mul_modf_function field. + * tune/common.c (speed_mpn_fft_mul, speed_mpn_fft_sqr): New functions. + + * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): Clean up. + + * mpn/generic/mul.c: Simplify rational expression. + + * gmp-impl.h: Cleanup threshold variables; remove obsolete ones and + make all possibly needed definitions for existing ones. + * tune/tuneup.c (tune_mul): Write fractions-compensated values to + threshold variables. + +2010-01-03 Marco Bodrato + + * tune/common.c, tune/speed.c, tune/speed.h: Support measuring + mpn_toom43_mul. + + * mpn/generic/toom_interpolate_6pts.c: Small reorganisation. + +2010-01-03 Torbjorn Granlund + + * gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to + INV_MULMOD_BNM1_THRESHOLD/2 instead. + + * gmp-impl.h (INV_APPR_THRESHOLD, INV_MULMOD_BNM1_THRESHOLD): Default + here... + * mpn/generic/invert.c, mpn/generic/invertappr.c: ...not here. + + * tests/mpn/t-div.c: Rewrite operand generation code. + +2010-01-02 Torbjorn Granlund + + * gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to + INV_MULMOD_BNM1_THRESHOLD. + +2010-01-02 Marco Bodrato + + * mpn/generic/dcpi1_div_q.c: Handle divappr approximation problem more + efficiently. + * mpn/generic/mu_div_q.c: Likewise. + + * mpn/generic/invert.c: Remove duplicated code. + +2010-01-01 Torbjorn Granlund + + * gmp-impl.h (MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD): Default to 0. + + * mpn/generic/mu_div_qr.c: Rewrite to use mpn_mulmod_bnm1. Clean up + scratch usage. Improve itch functions. + * mpn/generic/mu_divappr_q.c: Likewise. + * mpn/generic/mu_bdiv_qr.c: Likewise. + * mpn/generic/mu_div_q.c: Likewise. + + * mpn/generic/dcpi1_bdiv_qr.c: Add parameter ASSERTs. + * mpn/generic/dcpi1_bdiv_q.c: Likewise. + + * tests/mpn/t-bdiv.c: Replace with unit testing code, based on t-div.c. + Increase COUNT to 500. + + * tests/mpn/t-div.c: Avoid generating too small test operands. + Move SB suppression limit downwards. Increase COUNT to 200. + +2009-12-31 Torbjorn Granlund + + * mpn/generic/tdiv_qr.c: Handle numerator/remainder overlap in MU case. + + * tests/tests.h (TESTS_REPS): New macro. + * tests/mpz/dive.c: Use larger operands, decrease default reps, use + TESTS_REPS. + * tests/mpz/convert.c: Likewise. + * tests/mpz/t-sqrtrem.c: Likewise. + * tests/mpz/reuse: Likewise. + * tests/mpz/t-root.c: Likewise. + * tests/mpz/t-tdiv.c: Likewise. + * tests/mpz/t-gcd.c: Likewise. + * tests/mpz/t-powm.c: Likewise. + +2009-12-31 Marco Bodrato + + * mpn/generic/toom8_sqr.c (SQR_TOOM8_MAX): Avoid overflow. + * mpn/generic/toom6_sqr.c (SQR_TOOM6_MAX): Likewise. + + * mpn/generic/mulmod_bnm1.c: Don't mention MISUSE any more, + simply consider UNLIKELY any unexpected size. + +2009-12-31 Torbjorn Granlund + + * tune/tuneup.c (speed_mpn_sbordcpi1_div_qr): New function. + (tune_mu_div): Use it. + +2009-12-30 Torbjorn Granlund + + * tune/tuneup.c (tune_mu_bdiv, tune_dc_bdiv, tune_mu_div) + (tune_dc_div): Clear global s.r to make speed functions do 2n/n. + + * tune/speed.c (routine): New entries for mpn_mu_div_qr and + mpn_mupi_div_qr. Allow .r parameter for mpn_sbpi1_div_qr, + mpn_dcpi1_div_qr. + * tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV, SPEED_ROUTINE_MPN_MU_DIV_QR) + (SPEED_ROUTINE_MPN_MUPI_DIV_QR): Handle .r parameter. + + * tests/mpz/t-tdiv.c: Increase operands size again. + + * mpn/generic/tdiv_qr.c: Attempt to choose between DC and MU cleverer. + + * mpn/generic/tdiv_qr.c: Don't overwrite rp with unnecessary temporary + alloc. + +2009-12-29 Torbjorn Granlund + + * tune/tuneup.c (tune_mu_div): Tune MUPI_DIV_QR_THRESHOLD. + * tune/speed.h (struct speed_params): Allow 3 source operands. + (SPEED_ROUTINE_MPN_MUPI_DIV_QR): New macro. + * tune/common.c (speed_mpn_mupi_div_qr): New function. + + * mpn/generic/tdiv_qr.c: Call mpn_mu_div_qr. + + * tests/mpz/t-tdiv.c: Use larger test operands. + + * mpn/generic/mu_div_qr.c (mpn_mu_div_qr2): Remove code for dn==1. + + * mpz/mul.c: Call mpn_sqr directly. Use PTR,SIZ,ALLOC. + + * tune/tuneup.c (tune_mu_div): Set min_size to 6, DC functions require + this. + + * tests/mpn/t-div.c: Call mu_div functions with operands that generate + a high quotient limb. + + * mpn/generic/mu_div_qr.c: Rewrite to return a high quotient limb, + to let dividend argument be constant, and as a general cleanup. + * mpn/generic/mu_divappr_q.c: Likewise. + * mpn/generic/mu_div_q.c: Likewise. + * gmp-impl.h: Update declarations of changed functions. + + * mpn/generic/invertappr.c (mpn_invertappr): Allocate scratch space + when caller passed NULL. + +2009-12-28 Torbjorn Granlund + + * mpn/generic/toom_couple_handling.c: Prefix name with mpn_. + * gmp-impl.h: Likewise. + * mpn/generic/toom63_mul.c: Likewise. + * mpn/generic/toom6_sqr.c: Likewise. + * mpn/generic/toom6h_mul.c: Likewise. + * mpn/generic/toom8_sqr.c: Likewise. + * mpn/generic/toom8h_mul.c: Likewise. + + * configure.in (gmp_mpn_functions_optional) Move "com" from here... + (gmp_mpn_functions): ...to here. + * mpn/generic/com.c: New file. + * (mpn_com): New name for mpn_com_n. Make public. + * (mpn_neg): Analogous changes. + + * tune/tuneup.c (tune_mu_div, tune_mu_bdiv): Set step_factor. + + * tune/common.c, tune/speed.c, tune/speed.h: Support measuring + mpn_lshiftc. + + * tests/devel/try.c: Test mpn_lshiftc. + * tests/refmpn.c (refmpn_com): New function. + (refmpn_lshiftc): Likewise. + + * configure.in (gmp_mpn_functions_optional) Move lshiftc from here... + (gmp_mpn_functions): ...to here. + * mpn/generic/lshiftc.c: New file. + * mpn/x86_64/lshiftc.asm: New file. + * mpn/x86_64/core2/lshiftc.asm: New file. + * mpn/generic/mul_fft.c (mpn_lshiftc): Remove. + + * mpn/x86_64/core2/lshift.asm: Tweak for better Core iN performance. + * mpn/x86_64/core2/rshift.asm: Likewise. + +2009-12-27 Marco Bodrato + + * mpn/generic/mul.c: Use toom6h and toom8h for almost balanced. + + * mpn/generic/mullo_n.c (mpn_dc_mullo_n): New ratio, to be used in + Toom-8 range. + +2009-12-27 Torbjorn Granlund + + * (mpn_sqr): New name for mpn_sqr_n. Many files affected. + + * tune/tuneup.c (tune_mullo): Up step_factor for MULLO_MUL_N_THRESHOLD. + (tune_invertappr, tune_invert, tune_binvert): Let max_size default. + + * tune/tuneup.c (tune_mu_div, tune_mu_bdiv) New functions. + * tune/speed.h (SPEED_ROUTINE_MPN_MU_DIV_Q): New macro. + (SPEED_ROUTINE_MPN_MU_DIV_QR): Likewise. + (SPEED_ROUTINE_MPN_MU_BDIV_Q): Likewise. + (SPEED_ROUTINE_MPN_MU_BDIV_QR): Likewise. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add bdiv_q.c and bdiv_qr.c. + * tune/common.c (speed_mpn_mu_div_qr): New function. + (speed_mpn_mu_divappr_q): Likewise. + (speed_mpn_mu_div_q): Likewise. + (speed_mpn_mu_bdiv_q): Likewise. + (speed_mpn_mu_bdiv_qr): Likewise. + + * mpn/*/gmp-mparam.h: Fix incorrect MOD_1U_TO_MOD_1_1_THRESHOLD 0 + values. + + * gmp-impl.h (MODEXACT_1_ODD_THRESHOLD): Remove. + (BMOD_1_TO_MOD_1_THRESHOLD): New parameter, with the reverse meaning of + MODEXACT_1_ODD_THRESHOLD. + (MPN_MOD_OR_MODEXACT_1_ODD): Use BMOD_1_TO_MOD_1_THRESHOLD. + * mpn/generic/divis.c, mpz/{cong.c,cong_ui.c,divis_ui.c}: Likewise. + * tune/tuneup.c (tune_modexact_1_odd): Tune BMOD_1_TO_MOD_1_THRESHOLD; + Do not assume native mpn_modexact_1_odd is faster than mpn_mod_1. + (tuned_speed_mpn_mod_1): Remove variable. + (tune_mod_1): Fix thinkos. Suppress printing of "always" etc. + (all): Measure for divrem_1, mod_1, divexact_1, etc first, since Toom + depends on some of them. + + * mpn/generic/toom22_mul.c (TOOM22_MUL_REC): New name for + TOOM22_MUL_MN_REC. + +2009-12-26 Niels Möller + + * tests/mpn/t-toom32.c (MIN_AN, MIN_BN, MAX_BN): Relax + requirements a bit. + + * mpn/generic/toom32_mul.c (mpn_toom32_mul): Relax requirement on + input sizes, to support s+t>=n (used to be s+t>=n+2). Keep high + limbs of the evaluated values in scalar variables. + + * mpn/generic/sbpi1_divappr_q.c (mpn_sbpi1_divappr_q): Remove + unused variables. + + * mpn/generic/toom32_mul.c (mpn_toom32_mul): Fixed left-over use + of mpn_addsub_n which should be mpn_add_n_sub_n. + +2009-12-26 Marco Bodrato + + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add new toom files (spotted by Torbjorn). + + * gmp-impl.h (mpn_toom6_sqr_itch): Rename to mpn_toom6_mul_n_itch and redefine. + (mpn_toom8_sqr_itch): Rename to mpn_toom8_mul_n_itch and redefine. + * mpn/generic/mul_n.c: Use renamed _itch macros. + +2009-12-25 Niels Möller + + * tests/mpn/t-toom32.c (MIN_AN, MIN_BN, MAX_BN): Tightened requirements. + * gmp-impl.h (mpn_toom32_mul_itch): Updated. Less scratch needed + by toom32 itself, and also the pointwise multiplications are + currently mpn_mul_n with no supplied scratch. + * mpn/generic/toom32_mul.c (mpn_toom32_mul): Reorganized + interpolation to use less scratch space. No longer supports the + most extreme size ratios. + +2009-12-25 Torbjorn Granlund + + * tune/tuneup.c (tune_preinv_mod_1): Purge. + (tune_mod_1): Use speed_mpn_mod_1_tune for + PREINV_MOD_1_TO_MOD_1_THRESHOLD + + * mpn/generic/dcpi1_divappr_q.c: Handle 2n/n properly. Don't use full + precision in mpn_sbpi1_divappr_q call. Misc cleanup. + + * tune/tuneup.c (tune_mod_1): Add a check_size for + PREINV_MOD_1_TO_MOD_1_THRESHOLD. + +2009-12-24 Torbjorn Granlund + + * tune/mod_1_div.c (MOD_1N_TO_MOD_1_1_THRESHOLD, + (MOD_1U_TO_MOD_1_1_THRESHOLD): Set. + * tune/mod_1_inv.c (MOD_1N_TO_MOD_1_1_THRESHOLD, + (MOD_1U_TO_MOD_1_1_THRESHOLD): Set. + + * gmp-impl.h (USE_PREINV_MOD_1): Remove. + (MPN_MOD_OR_PREINV_MOD_1): Define to choose functions dynamically in + terms of PREINV_MOD_1_TO_MOD_1_THRESHOLD (used to choose statically + using USE_PREINV_MOD_1). + * mpn/generic/perfsqr.c (PERFSQR_MOD_PP): Corresponding updates. + + * tune/tuneup.c (tune_mod_1): Rewrite. + * gmp-impl.h (MOD_1N_TO_MOD_1_1_THRESHOLD): New. + (MOD_1U_TO_MOD_1_1_THRESHOLD): New name for MOD_1_1_THRESHOLD. + (MOD_1_1_TO_MOD_1_2_THRESHOLD): Mew name for MOD_1_2_THRESHOLD. + (MOD_1_2_TO_MOD_1_4_THRESHOLD): New name for MOD_1_4_THRESHOLD. + * mpn/generic/mod_1.c: Corresponding updates. + +2009-12-24 Marco Bodrato + + * mpn/generic/mul_n.c: Use also toom6h and toom8h. + * mpn/generic/sqr_n.c: Use also toom6 and toom8. + * gmp-impl.h: Initial support for tuning of Toom-6half and Toom-8half. + * tune/tuneup.c: Tune Toom-6half and Toom-8half thresholds. + +2009-12-24 Torbjorn Granlund + + * mpn/generic/mod_1_4.c: Get ASSERT right. + * mpn/generic/mod_1_3.c: Likewise. + * mpn/generic/mod_1_2.c: Likewise. + + * mpn/generic/powm_sec.c: Use SQR_TOOM2_THRESHOLD as limit for a native + mpn_sqr_basecase, not TUNE_SQR_TOOM2_MAX. + +2009-12-23 Marco Bodrato + + * tune/common.c, tune/speed.c, tune/speed.h: Support for measuring + mpn_toom8h_mul and mpn_toom8_sqr speed. + + * mpn/generic/toom_eval_pm2exp.c: Fix ASSERTs. + + * mpn/generic/toom8h_mul.c: New file. + * mpn/generic/toom8_sqr.c: New file. + * mpn/generic/toom_interpolate_16pts.c: New file. + * gmp-impl.h: Provide corresponding declarations. + * configure.in (gmp_mpn_functions): List toom_interpolate_16pts, + toom8h_mul, and toom8h_sqr. + * tests/mpn/t-toom8h.c: New test program. + + * mpn/generic/toom6_sqr.c: New file, was part of toom6h_mul. + * mpn/generic/toom6h_mul.c: Removed _sqr. + + * mpn/generic/mulmod_bnm1.c: Nailify CRT. + * mpn/generic/sqrmod_bnm1.c: Likewise. + + * mpn/generic/mullo_n.c: Split dc_mullo_n function; + ALLOC memory at once. + + * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Update. + + * mpn/generic/toom6h_mul.c: Add prefix to toom_interpolate_12pts. + * mpn/generic/toom_interpolate_12pts.c: Likewise. + + * mpn/generic/invertappr.c (mpn_bc_invertappr): Use mpn_divrem_2. + * mpn/generic/invert.c: Faster basecase, use mpn_sbpi1_div_q. + + * mpn/generic/toom_eval_pm2exp.c: Assert support for degree 3. + * mpn/generic/toom6h_mul.c: Avoid obsolete _itch function. + +2009-12-23 Torbjorn Granlund + + * tune/common.c, tune/speed.c, tune/speed.h: Support for measuring + mpn_mod_1_1p, mpn_mod_1s_2p, mpn_mod_1s_3p, mpn_mod_1s_4p. + + * tests/mpz/t-powm.c: Test mpz_powm_sec. + + * mpz/powm_sec.c: New file. + * gmp-h.in: Declare it. + * Makefile.am, mpz/Makefile.am: Compile it. + * doc/gmp.texi: Document it. + + * mpn/generic/powm_sec.c (mpn_powm_sec_itch): New function. + (mpn_powm_sec): Use passed scratch, no local allocation. + Allow exp argument = 1. + (win_size): Start loop from 1. + + * mpn/generic/powm.c (win_size): Start loop from 1. + +2009-12-22 Torbjorn Granlund + + * tests/mpn/t-div.c: New file. + * tests/mpn/Makefile.am: Compile it. + + * mpn/generic/mu_divappr_q.c: Handle quotient overflow. + + * mpn/generic/mu_div_q.c (mpn_mu_div_q_itch): New function. + +2009-12-22 Niels Möller <> + + * mpn/generic/sbpi1_div_q.c: Use udiv_qr_3by2. Intended to change + nothing after preprocessing. + + * mpn/generic/sbpi1_divappr_q.c: For the last call to udiv_qr_3by2, + avoid using memory locations as output parameters, and revert to + explicitly copying n1 and n0 to memory. + + * gmp-impl.h (udiv_qr_3by2): Tweaked to expand to precisely the + same code as was used before the introduction of this macro. + Eliminated some local variables, instead do multiple updates to + the output parameters. + +2009-12-22 Torbjorn Granlund + + * tests/mpn/t-toom6h.c (MIN_AN): Set to MUL_TOOM6H_THRESHOLD to avoid + invalid recursive sizes. + + * tests/mpn/t-bdiv.c: Get itch function calls right. + + * mpn/generic/mu_bdiv_q.c (mpn_mu_bdiv_q_itch): Rewrite. + * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Simplify. + + * mpn/generic/bdiv_qr.c (mpn_bdiv_qr): Simplify, don't allocate. + (mpn_bdiv_qr_itch): Conditionalise on MU_BDIV_QR_THRESHOLD. + +2009-12-18 Niels Möller + + * tests/mpn/t-bdiv.c: Add red-zones. + +2009-12-21 Torbjorn Granlund + + * mpn/generic/sbpi1_div_q.c: Fix fixup code to work for qn = 0. + + * mpn/generic/dcpi1_divappr_q.c: Handle qn = 1 and qn = 2 for initial + quotient block (code block copied from dcpi1_div_qr.c). + + * mpn/generic/dcpi1_div_qr.c: Rewrite singular case giving q limb of + GMP_NUMB_MAX. Remove an impossible qn = 0 case. + + * mpn/generic/dcpi1_bdiv_q.c: Remove a spurious mpn_sub_1. + + * mpn/generic/mul.c: Put back call to mpn_mul_n. + + * tune/tuneup.c (all): Call tune_mulmod_bnm1 before tuning fft due to + dependency on mulmod_bnm1 from both mul_fft_mul and from mullo_n. + + * mpn/generic/dcpi1_divappr_q.c: ASSERT that dn >= 6 and nn > dn. + * mpn/generic/dcpi1_div_q.c: ASSERT that dn >= 6 and nn-dn >= 3. + * mpn/generic/dcpi1_div_qr.c: ASSERT that dn >= 6 and nn-dn >= 3. + + * mpn/generic/bdiv_q_1.c (mpn_pi1_bdiv_q_1): Renamed from + mpn_bdiv_q_1_pi1. + * All references changed. + + * configure.in: Add --enable-old-fft-full. + * tune/speed.c (routine): Conditionalise mpn_mul_fft_full references on + WANT_OLD_FFT_FULL. + * tune/common.c (speed_mpn_mul_fft_full) + (speed_mpn_mul_fft_full_sqr): Likewise. + * mpn/generic/mul_fft.c (mpn_mul_fft_full): Include iff + WANT_OLD_FFT_FULL. + +2009-12-21 Marco Bodrato + + * gmp-impl.h (mpn_toom6h_mul_itch): New inline function. + (MUL_TOOM6H_THRESHOLD): Default value. + (SQR_TOOM6_THRESHOLD): Default value. + * mpn/generic/toom6h_mul.c: Remove definitions moved to gmp-impl.h. + * tune/common.c, tune/speed.c, tune/speed.h: Support for measuring + mpn_toom6h_mul and mpn_toom6_sqr speed. + + * mpn/generic/toom63_mul.c: Remove unused TMP_*. + + * mpn/generic/toom_eval_pm2rexp.c: New file. + * gmp-impl.h: Provide corresponding declaration. + * configure.in (gmp_mpn_functions): List toom_eval_pm2rexp. + * mpn/generic/toom6h_mul.c: Use shared toom_eval_pm2rexp. + + * mpn/generic/toom_couple_handling.c: New file, helper function + for high degree Toom. + * gmp-impl.h: Provide corresponding declaration. + * configure.in (gmp_mpn_functions): List toom_couple_handling. + * mpn/generic/toom6h_mul.c: Use shared toom_couple_handling. + * mpn/generic/toom63_mul.c: Likewise. + + * mpn/generic/toom6h_mul.c: New file. + * mpn/generic/toom_interpolate_12pts.c: New file. + * gmp-impl.h: Provide corresponding declarations. + * configure.in (gmp_mpn_functions): List toom_interpolate_12pts, + toom6h_mul. + * tests/mpn/t-toom6h.c: New test program. + + * tests/mpn/t-mulmod_bnm1.c (ref_mulmod_bnm1): Use ref_mul. + * tests/mpn/t-sqrmod_bnm1.c (ref_sqrmod_bnm1): Likewise. + +2009-12-20 Marco Bodrato + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): New CRT. + * mpn/generic/sqrmod_bnm1.c (mpn_sqrmod_bnm1): Likewise. + +2009-12-20 Torbjorn Granlund + + * Change all bit counts for bignums to use mp_bitcnt_t. + + * mpn/generic/bdivmod.c: File removed. All references purged. + + * mpn/generic/mul_fft.c (mpn_mul_fft_full): Disable. + + * gmp-impl.h: Define mpn_fft_mul as an alias for mpn_nussbaumer_mul. + * mpn/generic/mul.c: Refer mpn_fft_mul. + * mpn/generic/mul_n.c: Likewise. + * mpn/generic/sqr_n.c: Likewise. + * mpn/generic/mullo_n.c: Likewise. + + * mpn/generic/mul.c: Loop also over mpn_nussbaumer_mul, as suggested by + Marco. Use TMP_SALLOC_LIMBS in more places. Clean up ws allocation. + +2009-12-19 Marco Bodrato + + * mpn/generic/toom_interpolate_8pts.c: Nailify. + +2009-12-19 Torbjorn Granlund + + * mpn/generic/mul.c: Major rewrite. Use toom43, toom53, toom63. + Call mpn_nussbaumer_mul for largest operands. + + * tune/speed.h (SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM43_MUL): New macro. + (SPEED_ROUTINE_MPN_TOOM43_FOR_TOOM32_MUL): New macro. + (SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM53_MUL): New macro. + (SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM32_MUL): New macro. + (SPEED_ROUTINE_MPN_TOOM42_FOR_TOOM53_MUL): New macro. + (SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM42_MUL): New macro. + * tune/common.c (speed_mpn_toom63_mul): New function. + (speed_mpn_toom32_for_toom43_mul): New function. + (speed_mpn_toom43_for_toom32_mul): New function. + (speed_mpn_toom32_for_toom53_mul): New function. + (speed_mpn_toom53_for_toom32_mul): New function. + (speed_mpn_toom42_for_toom53_mul): New function. + (speed_mpn_toom53_for_toom42_mul): New function. + * tune/tuneup.c (tune_mul_n): New name for old tune_mul. + (tune_sqr_n): New name for old tune_sqr. + (tune_mul): New function, for unbalanced multiplication. + * gmp-impl.h: Provide declarations for corresponding threshold vars. + + * gmp-impl.h (mpn_rsh1add_nc, mpn_rsh1sub_nc): Declare. + * mpn/asm-defs.m4: Likewise. + * configure.in: Add corresponding HAVE_NATIVEs. + * mpn/x86_64/rsh1aors_n.asm: Add _nc entry point. + +2009-12-18 Niels Möller + + * mpz/divexact.c: Rewrite to use mpn_divexact. + + * mpn/generic/bdiv_q_1.c (mpn_bdiv_q_1): Deleted some unused + variables. + + * mpn/generic/toom52_mul.c (mpn_toom52_mul) + [HAVE_NATIVE_mpn_add_n_sub_n]: Moved declaration of cy to avoid a + compiler warning. + + * gmp-impl.h (gmp_pi1_t): Eliminated inv21 member. + (invert_pi1): ...and don't store it here. + + * mpn/generic/toom63_mul.c (mpn_toom63_mul): Simplified + calculation of block size n. + * gmp-impl.h (mpn_toom63_mul_itch): Likewise. + + * mpn/generic/toom_eval_pm2exp.c (mpn_toom_eval_pm2exp): Fixed + output asserts. + +2009-12-18 Torbjorn Granlund + + * tests/mpn/t-toom63.c: New test program. + +2009-12-18 Marco Bodrato + + * mpn/generic/invert.c: Nailify. + * mpn/generic/invertappr.c: Nailify. + * mpn/generic/mulmod_bnm1.c: Nailify. + * mpn/generic/sqrmod_bnm1.c: Nailify. + + * tests/mpn/t-invert.c: New test program. + + * mpn/generic/toom63_mul.c: New file. + * mpn/generic/toom_interpolate_8pts.c: New file. + * gmp-impl.h: Provide corresponding declarations. + * configure.in (gmp_mpn_functions): List toom_interpolate_8pts and + toom63_mul. + +2009-12-17 Torbjorn Granlund + + * mpn/generic/mul.c: Move allocation of ws to where it is used. + Identify toom22, 32, 42, in that order (in two places). Use midline + between toom22, 32, 42. + * mpn/generic/toom22_mul.c (TOOM22_MUL_MN_REC): Call also + mpn_toom32_mul. + + * doc/gmp.texi: Update References section. Update Contributors + section. Misc updates. + + * gmp-impl.h: Renew default values for all THRESHOLDs. + +2009-12-17 Niels Möller + + * mpn/generic/divexact.c (mpn_divexact): Don't require that the + dividend is normalized. Use MPN_DIVREM_OR_PREINV_DIVREM_1. When + shifting, allocate and process only the low qn+1 limbs. Eliminated + code for the impossible case nn < qn. + + * mpn/generic/dcpi1_div_qr.c (mpn_dcpi1_div_qr): Added some input + asserts. + + * mpn/generic/dcpi1_div_qr.c (mpn_dcpi1_div_qr): In the case that + the initial quotient block is a single limb, use 3/2 division, + thereby eliminating the only use of gmp_pi1_t->inv21. + +2009-12-17 Marco Bodrato + + * mpn/generic/invert.c: Added some comment. + * mpn/generic/invertappr.c: Slightly better threshold handling. + * gmp-impl.h (INV_NEWTON_THRESHOLD): Default to 200. + + * mpn/generic/nussbaumer_mul.c: New file. + * configure.in (gmp_mpn_functions): Add nussbaumer_mul. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add nussbaumer_mul. + * gmp-impl.h (mpn_nussbaumer_mul): Added prototype and name-mangling. + * tune/speed.h (speed_mpn_nussbaumer_mul): Declare function. + * tune/common.c (speed_mpn_nussbaumer_mul): New function. + * tune/speed.c (routine): Add speed_mpn_nussbaumer_mul. + + * mpn/generic/sqrmod_bnm1.c: New file. + * configure.in (gmp_mpn_functions): Add sqrmod_bnm1. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqrmod_bnm1. + * gmp-impl.h (mpn_sqrmod_bnm1): Added prototype and name-mangling. + (SQRMOD_BNM1_THRESHOLD): support for the new threshold. + * tune/speed.h (speed_mpn_sqrmod_bnm1): Declare function. + * tune/common.c (speed_mpn_sqrmod_bnm1): New function. + * tune/speed.c (routine): Add speed_mpn_sqrmod_bnm1. + * tests/mpn/t-mulmod_bnm1.c: Attribution. + * tests/mpn/t-sqrmod_bnm1.c: New test file. + * tests/mpn/Makefile.am (check_PROGRAMS): Add t-sqrmod_bnm1. + + * tune/tuneup.c: Tune SQRMOD_BNM1_THRESHOLD. + + * mpn/generic/nussbaumer_mul.c (mpn_nussbaumer_mul): Mimic fft_mul, + use squaring if operands coincide. + * tune/speed.h (speed_mpn_nussbaumer_mul_sqr): Declare function. + * tune/common.c (speed_mpn_nussbaumer_mul_sqr): New function. + * tune/speed.c (routine): Add speed_mpn_nussbaumer_mul_sqr. + +2009-12-17 Torbjorn Granlund + + * mpn/generic/bdiv_q.c (mpn_bdiv_q_itch): Rewrite. + +2009-12-16 Torbjorn Granlund + + * tests/mpn/t-bdiv.c (bdiv_q_valid_p, bdiv_qr_valid_p): Call refmpn_mul + instead of refmpn_mul_basecase. + * tests/mpn/toom-shared.h: Likewise. + * tests/refmpn.c (refmpn_mullo_n,refmpn_sqr,refmpn_mul_any): Likewise. + + * minithres/gmp-mparam.h: Add new thresholds, trim old values. + + * mpn/generic/powm.c: Use mp_bitcnt_t for bit counts. + Handle REDC_1_TO_REDC_N_THRESHOLD < MUL_TOOM22_THRESHOLD in + non-WANT_REDC_2 INNERLOOP expansion code. + * mpn/generic/powm_sec.c: Use mp_bitcnt_t for bit counts. + +2009-12-16 Niels Möller + + * tests/mpz/t-gcd.c (main): Added test case to exercise the + unlikely u0 == u1 case in mpn_gcdext_lehmer_n. + + * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Get ASSERT + right. + +2009-12-16 Torbjorn Granlund + + * tests/mpz/t-mul.c: Misc cleanups. + (mul_basecase): Remove. + (ref_mpn_mul): Remove. + * tests/refmpn.c (refmpn_mul): New function, mainly from t-mul.c's + ref_mpn_mul. + (refmpn_mullo_n): Add a missing free. + + * tune/speed.c (routine): Measure speed_mpn_{sb,dc}pi1_div_qr, + mpn_{sb,dc}pi1_divappr_q, mpn_{sb,dc}pi1_bdiv_qr, and + mpn_{sb,dc}pi1_bdiv_q. + + * mpn/generic/invertappr.c: New file, meat from invert.c. + * mpn/generic/invert.c: Leave just mpn_invert.c. + * configure.in (gmp_mpn_functions): Add invertappr. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add invertappr.c. + * gmp-impl.h (mpn_invert_itch, mpn_invertappr_itch): New macros. + +2009-12-15 Torbjorn Granlund + + * mpn/generic/gcdext_subdiv_step.c: Get an ASSERT right. + +2009-12-15 Niels Möller + + * mpn/generic/sbpi1_div_qr.c (mpn_sbpi1_div_qr): A very small step + towards nail support. + +2009-12-15 Marco Bodrato + + * gmp-impl.h (mpn_ni_invertappr): Added prototype and name-mangling. + * mpn/generic/mulmod_bnm1.c: Comment representation of class [0]. + +2009-12-14 Niels Möller + + * mpn/generic/sbpi1_divappr_q.c (mpn_sbpi1_divappr_q): Use + udiv_qr_3by2. + +2009-12-14 Torbjorn Granlund + + * tune/tuneup.c (tune_binvert): Remove BINV_MULMOD_BNM1_THRESHOLD + tuning, it was always zero and caused BINV_NEWTON_THRESHOLD to be + wrong (as pointed out by Marco). + * (BINV_MULMOD_BNM1_THRESHOLD): Clean from other files too. + +2009-12-14 Marco Bodrato + + * mpn/generic/invert.c: Improved comments. + (mpn_bc_invertappr): Conditionally re-enable mpn_dcpi1_divappr_q. + +2009-12-14 Niels Möller + + * gmp-impl.h (udiv_qr_3by2): Fix typo in argument list. + +2009-12-13 Niels Möller + + * gmp-impl.h (udiv_qr_3by2): New macro. + * mpn/generic/sbpi1_div_qr.c (mpn_sbpi1_div_qr): Use udiv_qr_3by2. + +2009-12-13 Torbjorn Granlund + + * mpn/generic/dcpi1_divappr_q.c (mpn_dcpi1_divappr_q): Avoid a buffer + overrun. + + * mpn/generic/mul_fft.c (mpn_mul_fft_full): Handle carry-out from 2nd + mpn_mul_fft, add an ASSERT for the 1st mpn_mul_fft. Replace some + comments on cc's range with ASSERTs. + + * mpn/generic/gcdext.c (compute_v): Normalise tp[] after mpn_mul. + + * mpz/powm.c: Rework buffer handling. + +2009-12-13 Niels Möller + + * tests/mpn/toom-shared.h (main): Use refmpn_mul_basecase to check + results (slow!). Iteration counts of all toom tests reduced + considerably. + +2009-12-13 Marco Bodrato + + * mpn/generic/invert.c (mpn_invertapp): Split in _bc and _ni. + (mpn_bc_invertappr): New function, the basecase. + (mpn_ni_invertapp): New function, Newton iteration. + (mpn_invert): Use mpn_ni_invertapp. + * tune/tuneup.c (tune_invert): Min for INV_APPR_THRESHOLD. + (tune_invertappr): Min for INV_NEWTON_THRESHOLD. + + * tune/speed.h (SPEED_ROUTINE_MPN_NI_INVERTAPPR): New macro. + (speed_mpn_ni_invertappr): Declare function. + * tune/common.c (speed_mpn_ni_invertappr): New function. + * tune/speed.c (routine): Add speed_mpn_ni_invertappr. + + * tune/tuneup.c (tune_invertappr): Use speed_mpn_ni_invertappr to + tune INV_MULMOD_BNM1_THRESHOLD. + +2009-12-12 Torbjorn Granlund + + * mpn/generic/mu_bdiv_qr.c (mpn_mu_bdiv_qr_itch): Rewrite. + +2009-12-12 Marco Bodrato + + * tests/mpn/t-mulmod_bnm1.c (main): Disable B^n+1 stressing test + for odd sizes. + + * mpn/generic/invert.c: Complete rewrite. Uses Newton iterations. + * gmp-impl.h (mpn_invertappr): Added prototype and name-mangling. + (mpn_invertappr_itch): Added prototype and name-mangling. + (INV_APPR_THRESHOLD): Support for a new tunable const. + * tune/speed.h (SPEED_ROUTINE_MPN_INVERTAPPR): New macro. + (speed_mpn_invertappr): Declare function. + * tune/common.c (speed_mpn_invertappr): New function. + * tune/speed.c (routine): Add speed_mpn_invertappr. + * tune/tuneup.c (tune_invertappr): New function: was tune_invert. + (tune_invert): Now tune only INV_APPR_THRESHOLD. + (all): Enable call to tune_invert and tune_invertappr. + +2009-12-11 Torbjorn Granlund + + * mpn/generic/binvert.c: Use mpn_mulmod_bnm1 instead of FFT wrapping. + Old, evidently broken wrapping code removed. + * tune/tuneup.c (tune_binvert): Tune BINV_MULMOD_BNM1_THRESHOLD. + * gmp-impl.h: Provide declarations for corresponding threshold var. + + * tests/mpn/t-bdiv.c (COUNT): Decrease to keep run time reasonable. + + * tune/tuneup.c (tune_invert): Tune INV_MULMOD_BNM1_THRESHOLD. + * gmp-impl.h: Provide declarations for corresponding threshold var. + + * tests/mpn/t-mulmod_bnm1.c: Avoid a division by zero. + + * configure.in: Set up different paths for different 64-bit sparc + processors. + * mpn/sparc64/ultrasparc34/gmp-mparam.h: New file. + +2009-12-10 Torbjorn Granlund + + * mpn/*/gmp-mparam.h: Regenerate many of these files. + +2009-12-10 Niels Möller + + * gmp-impl.h (mpn_divexact): Removed scratch pointer from + prototype. + * mpn/generic/gcdext.c (divexact): Deleted, moved to... + * mpn/generic/divexact.c (mpn_divexact): New implementation (moved + from gcdext.c). The bidirectional divexact is kept but #if:ed out. + Interface change, since the new code doesn't take a scratch + argument. + + * tests/mpn/t-mulmod_bnm1.c (main): Ensure that an >= bn. Lowered + MIN_N to 1. Various fixes to handle n == 1 properly. + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Small interface + change, require an >= bn. + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Fixed non-recursive + case to not write beyond end of result area. + +2009-12-09 Torbjorn Granlund + + * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL): New macro, made + from now deleted SPEED_ROUTINE_MPN_MULMOD_BNM1. + * tune/common.c (speed_mpn_bc_mulmod_bnm1): New function. + (speed_mpn_mulmod_bnm1): Use SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL. + * tune/speed.c (routine): Add mpn_bc_mulmod_bnm1. + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): Rewrite. + + * tune/tuneup.c (tune_mulmod_bnm1): Rewrite. + +2009-12-08 Marco Bodrato + + * mpn/generic/mulmod_bnm1.c (mpn_bc_mulmod_bnm1, + mpn_bc_mulmod_bnp1): Added a parameter for scratch area, possibly + same as result area (as suggested by Niels Möller). + (mpn_mulmod_bnm1): Calls changed accordingly. + +2009-12-08 Niels Möller + + * mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]: Use + table lookup for count_trailing_zeros. Binary algorithm still + disabled by default. + + * mpn/generic/gcdext.c (divexact): Local definition of divexact, + using mpn_bdiv_q. + (compute_v): Use it. + + * tests/mpn/Makefile.am (check_PROGRAMS): Added t-bdiv. + + * tests/mpn/t-bdiv.c: New file. + + * mpn/generic/bdiv_q.c (mpn_bdiv_q): Fixed bad quotient length, + should have qn == nn. + + * mpn/generic/bdiv_qr.c (mpn_bdiv_qr): Pass correct nn length to + the lower-level functions. + +2009-12-08 Torbjorn Granlund + + * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED): New define. + * tune/common.c (speed_mpn_mulmod_bnm1_rounded): New function. + * tune/speed.c (routine): Add mpn_mulmod_bnm1_rounded for measuring + mpn_mulmod_bnm1 at recommended sizes. + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): Rewrite. + (mpn_bc_mulmod_bnm1): Use mpn_add_n instead of mpn_add. + + * tune/speed.c (routine): Add mpn_invert. + + * tune/tuneup.c (tune_invert): New function. + * tune/speed.h (SPEED_ROUTINE_MPN_INVERT): New macro. + * tune/common.c (speed_mpn_invert): New function. + * gmp-impl.h: Provide declarations for corresponding threshold var. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add invert.c. + +2009-12-08 Marco Bodrato + + * tests/devel/try.c: Test mpn_addlsh2_n and mpn_{add,sub}lsh_n; + mpn_rsblsh_n now tests all shift values. + * tests/refmpn.c (refmpn_addlsh_n, refmpn_sublsh_n): New functions. + (refmpn_addlsh1_n): Use generic refmpn_addlsh_n. + (refmpn_sublsh1_n): Use generic refmpn_sublsh_n. + (refmpn_addlsh2_n): New function. + * tests/tests.h: Declare new functions. + +2009-12-06 Torbjorn Granlund + + * tune/tuneup.c (tune_mulmod_bnm1): Up min_size to 12. + + * Globally: Rename *mullow* to *mullo*, *MULLOW* to *MULLO*. + + * configure.in: Don't include ev5 directory for ev6* and ev7. Misc + alpha path cleanups. + * mpn/alpha/add_n.asm: Replaced by mpn/alpha/ev5/add_n.asm. + * mpn/alpha/sub_n.asm: Replaced by mpn/alpha/ev5/sub_n.asm. + * mpn/alpha/lshift.asm: Replaced by mpn/alpha/ev5/lshift.asm. + * mpn/alpha/rshift.asm: Replaced by mpn/alpha/ev5/rshift.asm. + * mpn/alpha/com_n.asm: New, moved from mpn/alpha/ev5/rshift.asm. + * mpn/alpha/ev5/diveby3.asm: New, moved from mpn/alpha/diveby3.asm. + + * mpn/powerpc64/mode64/diveby3.asm: Remove, it is slower than + mpn_bdiv_dbm1c on all hardware. + + * mpn/generic/powm_sec.c: Rework logic for mpn_sqr_basecase size limit. + + * gmp-impl.h (mpn_redc_1_sec): Declare. + * configure.in (gmp_mpn_functions): Add redc_1_sec. + +2009-12-06 Marco Bodrato + + * tests/devel/try.c (try_one): DATA_SRC0_HIGHBIT sets the high bit. + +2009-12-05 Marco Bodrato + + * mpn/generic/toom_eval_dgr3_pm1.c: Change return value: 0 or ~0. + * mpn/generic/toom_eval_dgr3_pm2.c: Likewise. + * mpn/generic/toom_eval_pm1.c: Likewise. + * mpn/generic/toom_eval_pm2exp.c: Likewise. + * mpn/generic/toom_eval_pm2.c: Rewrite to use mpn_addlsh2_n. + + * mpn/generic/toom_interpolate_5pts.c: Param sa is a flag, not a sign. + + * mpn/generic/toom33_mul.c: Adapt to changes above. + * mpn/generic/toom3_sqr.c: Likewise. + * mpn/generic/toom42_mul.c: Likewise. + * mpn/generic/toom43_mul.c: Reduce branches. + * mpn/generic/toom44_mul.c: Likewise. + * mpn/generic/toom53_mul.c: Likewise. + * mpn/generic/toom62_mul.c: Likewise. + + * mpn/generic/toom52_mul.c: Use toom_eval_ functions. + + * mpn/generic/toom4_sqr.c: Avoid C99 construct. + * mpn/generic/toom_interpolate_7pts.c: Likewise. + +2009-12-05 Torbjorn Granlund + + * mpn/generic/redc_1_sec.c: New file. + * mpn/generic/powm_sec.c: Use redc_1_sec. Use dummy full subtract + instead of mpn_cmp since the latter leaks to the side channel. + (mpn_local_sqr_n): New function, with associated macros. + (mpn_powm_sec): Use mpn_local_sqr_n. + + * configure.in (HAVE_NATIVE): Add missing functions, then sort. + +2009-12-04 Torbjorn Granlund + + * tune/tuneup.c (tune_dc_div): Up min_size to 6. + (tune_mod_1): Set MOD_1_1_THRESHOLD min_size to 2. + + * tune/speed.h: Negate "binvert"-type inverses, as required. + + * mpn/generic/redc_1.c: Add ASSERTs. + * mpn/generic/redc_2.c: Likewise. + + * mpn/generic/sbpi1_bdiv_q.c: Simplify loops, indexing. + +2009-12-03 Yann Droneaud + + * acinclude.m4 ([long long reliability test 1]): Add a "static" for C99 + inline semantics compatibility. + +2009-12-03 Torbjorn Granlund + + * configure.in: Move intptr_t test into common AC_CHECK_TYPES. + + * mpn/generic/gcdext.c: Add a TMP_FREE. + +2009-12-03 Niels Möller + + * mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]: + Added various masking tricks. + + * mpn/generic/gcdext_1.c (mpn_gcdext_1) [GCDEXT_1_USE_BINARY]: + Reimplemented binary gcdext, with proper canonicalization. + + * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Handle v == 0 + from mpn_gcdext_1. + * mpn/generic/gcdext_1.c (mpn_gcdext_1): Allow inputs with a < b, + assertions fixed accordingly. + +2009-12-03 Torbjorn Granlund + + * tune/tuneup.c: Tune DC_DIVAPPR_Q_THRESHOLD. Rewrite + DC_DIV_QR_THRESHOLD tuning code. + (tune_dc_div): Rewrite. + * tune/speed.h (SPEED_ROUTINE_MPN_PI1_DIV): New macro. + * tune/common.c (speed_mpn_sbpi1_div_qr, speed_mpn_dcpi1_div_qr, + speed_mpn_sbpi1_divappr_q, speed_mpn_sbpi1_bdiv_qr): New functions. + * gmp-impl.h: Provide declarations for corresponding threshold vars. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add dcpi1_divappr_q.c. + + * tune/tuneup.c (tune_binvert): Up max_size. + +2009-12-02 Marco Bodrato + + * tests/devel/try.c: Test mpn_rsblsh2_n and mpn_rsblsh_n. + * tests/refmpn.c (refmpn_rsblsh_n, refmpn_rsblsh2_n): New functions. + (refmpn_rsblsh1_n): Use generic refmpn_rsblsh_n. + * tests/tests.h: Declare new functions. + +2009-12-03 Niels Möller + + * mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step): + Select the right cofactor in the cases A == B or A == 2B. + + * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Deleted + handling of ap[0] == 0 and bp[0] == 0; these cases don't happen. + Select the right cofactor in the case ap[0] == bp[0]. + * mpn/generic/gcdext.c (mpn_gcdext): Analogous changes. + +2009-12-02 Niels Möller + + * gmp-h.in (mpn_gcdext_1): Updated prototype. + * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Updated for + signed cofactors from gcdext_1. + * mpn/generic/gcdext_1.c (mpn_gcdext_1): Use Euclid's algorithm, + and return signed cofactors. + +2009-12-02 Torbjorn Granlund + + * doc/gmp.texi (Low-level Functions): Document mpn_sqr_n. + + * tune/speed.c (routine): Add mpn_binvert. + + * tune/tuneup.c: Tune BINV_NEWTON_THRESHOLD. + (tune_binvert): New function. + * tune/speed.h (SPEED_ROUTINE_MPN_BINVERT): New macro. + * tune/common.c (speed_mpn_binvert): New function. + * gmp-impl.h: Provide declarations for corresponding threshold var. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add binvert.c. + + * tune/tuneup.c: Tune DC_BDIV_QR_THRESHOLD and DC_BDIV_Q_THRESHOLD. + (tune_dc_bdiv): New function. + (tune_dc_div): New name for tune_dc. + * tune/speed.h (SPEED_ROUTINE_MPN_PI1_BDIV_QR, + SPEED_ROUTINE_MPN_PI1_BDIV_Q): New macros. + * tune/common.c (speed_mpn_sbpi1_bdiv_qr, speed_mpn_dcpi1_bdiv_qr, + speed_mpn_sbpi1_bdiv_q, speed_mpn_dcpi1_bdiv_q): New functions. + * gmp-impl.h: Provide declarations for corresponding threshold vars. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add dcpi1_bdiv_qr.c and + dcpi1_bdiv_q.c. + +2009-12-01 Marco Bodrato + + * mpn/generic/toom53_mul.c: Removed double computation of vinf. + + * mpn/x86_64/aorrlsh_n.asm: Correct return value for rsblsh_n. + * mpn/asm-defs.m4 (define_mpn): Add rsblsh_n. + * gmp-impl.h (mpn_rsblsh_n): Added prototype and name-mangling. + + * mpn/generic/fib2_ui.c: Reduce the amount of temporary storage. + Use mpn_rsblsh_n. + +2009-12-01 Torbjorn Granlund + + * mpn/generic/redc_n.c: Rework temp allocation. + + * mpn/generic/dcpi1_bdiv_qr.c (mpn_dcpi1_bdiv_qr_n_itch): Add pi1 also + to this function. + + * mpn/generic/dcpi1_bdiv_q.c: Get the mpn_sbpi1_bdiv_q call right. + Misc cleanups. + + * tune/speed.c (routine): Fix typo in last change. + Add mpn_redc_2. + + * tune/speed.h (SPEED_ROUTINE_REDC_N): Set min size properly. + +2009-12-01 Niels Möller + + * tune/speed.c (routine): Added mpn_toom42_mul and mpn_redc_n. + * tune/speed.h (SPEED_ROUTINE_MPN_TOOM42_MUL): New macro. + (speed_mpn_toom42_mul): Declare function. + * tune/common.c (speed_mpn_toom42_mul): New function. + * gmp-impl.h (MPN_TOOM42_MUL_MINSIZE): New constant. + +2009-11-30 Marco Bodrato + + * mpn/generic/fib2_ui.c: Use mpn_rsblsh2_n. + +2009-11-29 Torbjorn Granlund + + * mpn/x86_64/pentium4/gmp-mparam.h + (HAVE_NATIVE_mpn_addlsh1_n, HAVE_NATIVE_mpn_sublsh1_n): Don't undef. + + * Makefile.am (EXTRA_DIST): Remove macos. + +2009-11-28 Torbjorn Granlund + + * tune/tuneup.c (tune_redc): Set min_size to 16 for redc_n tuning. + + * mpn/x86_64/sqr_basecase.asm (SQR_TOOM2_THRESHOLD_MAX): Avoid quoting + to allow configure.in parse it more easily. Trim from 120 to 80. + +2009-11-28 Marco Bodrato + + * mpn/generic/mulmod_bnm1.c: Basecases made simpler, this also corrects + a bug affecting previous version. + +2009-11-28 Torbjorn Granlund + + * configure.in: Handle atom also in 32-bit mode. + * mpn/x86/atom/gmp-mparam.h: New file. + + * gmp-impl.h (MULMOD_BNM1_THRESHOLD): Default. + + * mpn/generic/redc_n.c: Use mpn_mulmod_bnm1 instead of mpn_mul_n. + + * Use TMP_ALLOC_LIMBS consistently. + * Finish renaming BITS_PER_MP_LIMB to GMP_LIMB_BITS. + + * macos: Remove entire directory. + +2009-11-27 Torbjorn Granlund + + * mpn/x86_64/corei/gmp-mparam.h: New file. + * mpn/x86_64/core2/gmp-mparam.h: Now for just core2. + * mpn/powerpc64/mode64/p3/gmp-mparam.h: New file. + * mpn/powerpc64/mode64/p4/gmp-mparam.h: New file. + * mpn/powerpc64/mode64/p5/gmp-mparam.h: New file. + + * config.guess: Return "corei" for core i7 and core i5. + * config.sub: Recognise "corei". + * acinclude.m4 (X86_64_PATTERN): Add corei. + * configure.in (powerpc): Set up more CPU-specific paths. + (x86): Handle corei. + + * mpz/powm.c: Allow input operand overlap also when exponent = 1. + Misc cleanups. + +2009-11-26 Marco Bodrato + + * tests/mpn/t-mulmod_bnm1.c: New test file. + * tests/mpn/Makefile.am (check_PROGRAMS): Add t-mulmod_bnm1. + + * mpn/generic/mullow_n.c: Comments on Mulders' trick implementation. + +2009-11-26 Torbjorn Granlund + + * mpn/generic/powm.c: Make comments reflect current code state. + + * tests/devel/try.c: Make mpn_mullow_n testing actually work. + +2009-11-25 Torbjorn Granlund + + * mpz/powm.c: Clean up unused defs. + +2009-11-24 Torbjorn Granlund + + * tune/tuneup.c (tune_redc): Rewrite. + * mpn/generic/powm.c: Use REDC_1_TO_REDC_2_THRESHOLD, + REDC_1_TO_REDC_N_THRESHOLD, and REDC_2_TO_REDC_N_THRESHOLD. + Get rid of previous REDC params, including LOCAL_REDC_N_THRESHOLD. + (WANT_REDC_2): Define. + * gmp-impl.h: Corresponding changes. + +2009-11-23 Torbjorn Granlund + + * mpn/generic/powm.c: Fix typo. + Define LOCAL_REDC_N_THRESHOLD, use in REDC_2_THRESHOLD... + REDC_N_THRESHOLD chain. + +2009-11-22 Torbjorn Granlund + + * tune/tuneup.c (tune_mullow): Set min_size to 1. + + * mpn/generic/powm_sec.c: Use just mpn_mul_basecase and + mpn_sqr_basecase for multiplication and squaring. + + * tune/tuneup.c: Tune REDC_2_THRESHOLD and REDC_N_THRESHOLD. + (tune_redc): New function. + (tune_powm): Remove function. + * tune/speed.h (SPEED_ROUTINE_REDC_2, SPEED_ROUTINE_REDC_N): New. + * tune/common.c (speed_mpn_redc_2, speed_mpn_redc_n): New. + + * mpz/powm.c: Complete rewrite. Use mpn_powm and mpn_powlo. + * mpn/generic/powm.c: Rewrite. + * mpn/generic/redc_n.c: New file. + * configure.in (gmp_mpn_functions): Add redc_n. + * gmp-impl.h (REDC_2_THRESHOLD, REDC_N_THRESHOLD): Default, and define + for tuneup. + +2009-11-21 Marco Bodrato + + * mpn/generic/mullow_n.c: Disable Mulders' trick for small operands, + use fft for bigger ones. + * tests/mpn/t-mullo.c: New test file. + +2009-11-22 Torbjorn Granlund + + * tune/tuneup.c (tune_mullow): Rewrite. + +2009-11-21 Marco Bodrato + + * gmp-impl.h: Removed unused macros (CACHED_ABOVE_THRESHOLD and + CACHED_BELOW_THRESHOLD). + + * mpn/generic/mullow_n.c: Use Mulders' trick. + * tune/tuneup.c (tune_mullow): MULLOW_MUL_N_THRESHOLD range of + search depends on FFT tuning; + (all): Anticipate tune_fft_{mul,sqr}. + + * tune/speed.c (routine): Add entry related to mpn_mulmod_bnm1. + +2009-11-19 Niels Möller + + * mpn/generic/toom_eval_dgr3_pm2.c (mpn_toom_eval_dgr3_pm2) + [HAVE_NATIVE_mpn_add_n_sub_n]: Fixed typo in mpn_add_n_sub_n call + (spotted by Marco Bodrato). + * mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2): Likewise. + * mpn/generic/toom_eval_pm2exp.c (mpn_toom_eval_pm2exp): Likewise. + + * mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2) [HAVE_NATIVE_mpn_addlsh_n]: + Fixed missing declaration. + + * mpn/asm-defs.m4 (define_mpn): Add addlsh_n. + * gmp-impl.h (mpn_addlsh_n): Added prototype and name-mangling. + +2009-11-19 Niels Möller + + * mpn/generic/toom_eval_pm2.c (mpn_toom_eval_pm2): New file. + * mpn/generic/toom53_mul.c (mpn_toom53_mul): Use mpn_toom_eval_pm2. + * mpn/generic/toom62_mul.c (mpn_toom62_mul): Likewise. + * configure.in (gmp_mpn_functions): Added toom_eval_dgr3_pm2. + +2009-11-18 Torbjorn Granlund + + * gmp-impl.h (mpn_and_n, etc): Adapt to now-public logic functions. + + * config.guess: Recognise VIA nano. + * config.sub: Likewise. + * configure.in: Generalise x86_64 support; recognise VIA nano. + +2009-11-16 Torbjorn Granlund + + * tune/speed.c (routine): Add measurement of mpn_addlsh2_n, + mpn_sublsh2_n, mpn_rsblsh2_n. + * tune/common.c: Add speed routines for lsh2 functions. + + * mpn/generic/divis.c: Use MU_BDIV_QR_THRESHOLD. + + * configure.in (gmp_mpn_functions_optional): Add *lsh_n functions. + + * mpn/generic/toom_eval_pm2exp.c: Make HAVE_NATIVE_mpn_addlsh_n code + work. + + * mpn/x86_64/aorrlsh2_n.asm: Optimise inner loop. + + * configure.in (gmp_mpn_functions_optional): Remove copyi,copyd, they + are now in gmp_mpn_functions. Analogously move logical functions. + +2009-11-16 Marco Bodrato + + * mpn/generic/toom53_mul.c: Use addlsh2 for evaluation (and fix typo). + * mpn/generic/toom_eval_dgr3_pm2.c: Likewise (affects toom44 and 43). + + * mpn/asm-defs.m4: Fix comments for op_lsh2 new functions. + * gmp-impl.h: Likewise. + * tests/mpz/t-fac_ui.c: Fix a comment. + +2009-11-15 Torbjorn Granlund + + * mpn/x86_64/aorrlsh2_n.asm: New file. + * configure.in: Add support for addlsh2_n, sublsh2_n, and rsblsh2_n, + including mulfuncs. + * gmp-impl.h (mpn_addlsh2_n, mpn_sublsh2_n, mpn_rsblsh2_n): Declare. + * mpn/asm-defs.m4: Likewise. + + * mpn/generic/copyi.c: New file. + * mpn/generic/copyd.c: Likewise. + * mpn/generic/zero.c: Likewise. + * gmp-h.in: Declare new functions. + * configure.in (gmp_mpn_functions): Add new functions. + +2009-11-15 Marco Bodrato + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1_next_size): fix typo + + * mpn/generic/toom33_mul.c: Use rsblsh1 for evaluation. + * mpn/generic/toom3_sqr.c: Likewise. + +2009-11-14 Torbjorn Granlund + + * mpn/generic/toom52_mul.c: Use mpn_addlsh1_n. + + * mpn/generic/toom52_mul.c: Toggle the right flag bit in an + HAVE_NATIVE_mpn_add_n_sub_n arm. + + * tests/mpz/t-remove.c: New file. + + * mpn/generic/remove.c: Major overhaul. Add parameter 'cap'. + + * mpn/generic/binvert.c: Fix typo in last change. + + * mpn/generic/bdiv_qr.c: Make it actually work. Also use passed-in + scratch space. -2009-12-27 Torbjorn Granlund + * mpn/generic/mu_bdiv_qr.c: Reset FFT parameters for each call. - * (mpn_sqr): New name for mpn_sqr_n. Make minimal changes, - leaving internal references still to old name. +2009-11-12 Torbjorn Granlund - * gmp-impl.h: Update mpn_mul_fft declaration. + * mpn/x86/k7/gcd_1.asm (MASK): Compute from MAXSHIFT. -2009-12-21 Torbjorn Granlund +2009-11-11 Torbjorn Granlund - * gmp-h.in (__GNU_MP_VERSION_PATCHLEVEL): Bump. + * mpn/generic/binvert.c: Simplify, fix comments. -2009-12-17 Torbjorn Granlund + * tests/devel/try.c: Test mpn_invert and mpn_binvert. - * doc/gmp.texi: Update References section. Update Contributors - section. Misc updates. + * tests/refmpn.c (refmpn_invert, refmpn_binvert): New functions. + * tests/tests.h: Declare new functions. -2009-12-16 Niels Möller +2009-11-10 Torbjorn Granlund - * tests/mpz/t-gcd.c (main): Added test case to exercise the - unlikely u0 == u1 case in mpn_gcdext_lehmer_n. + * configure.in: Supply compiler options for atom in 32-bit mode. - * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Get ASSERT - right. + * acinclude.m4 (X86_64_PATTERN): New. + * configure.in: Setup and use X86_64_PATTERN. -2009-12-15 Torbjorn Granlund + * mpn/x86_64/fat/fat.c: New file. + * mpn/x86_64/fat/fat_entry.asm: New file. + * mpn/x86_64/fat: Copy C placeholder files from mpn/x86/fat. + * mpn/x86_64/x86_64-defs.m4 (CPUVEC_FUNCS_LIST): New, copied from + mpn/x86/x86-defs.m4. + * configure.in: Move down x86 fat setup code until after ABI has been + determined; generalise to handle x86_64. - * mpn/generic/gcdext_subdiv_step.c: Get an ASSERT right. +2009-11-09 Torbjorn Granlund -2009-12-13 Torbjorn Granlund + * mpn/x86/fat/mod_1.c: New file. - * mpn/generic/mul_fft.c (mpn_mul_fft_full): Handle carry-out from 2nd - mpn_mul_fft, add an ASSERT for the 1st mpn_mul_fft. Replace some - comments on cc's range with ASSERTs. + * acinclude.m4 (GMP_C_FOR_BUILD_ANSI): Avoid poor quoting. -2009-12-03 Yann Droneaud +2009-11-08 Torbjorn Granlund - * acinclude.m4 ([long long reliability test 1]): Add a "static" for C99 - inline semantics compatibility. + * gmp-impl.h (MPN_LOGOPS_N_INLINE): Rewrite, update interface. Callers + updated. + * mpn/generic/logops_n.c: New file. + * doc/gmp.texi (Low-level Functions): Document logical mpn functions. -2009-12-03 Torbjorn Granlund +2009-11-07 Torbjorn Granlund - * mpn/generic/gcdext.c: Add a TMP_FREE. + * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1): Adapt to new + mpn_mulmod_bnm1 interface. -2009-12-03 Niels Möller +2009-11-07 Marco Bodrato - * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Handle v == 0 - from mpn_gcdext_1. - * mpn/generic/gcdext_1.c (mpn_gcdext_1): Allow inputs with a < b, - assertions fixed accordingly. + * mpn/generic/mulmod_bnm1.c: New interface, with size + specified for all operands in mpn_mulmod_bnm1. + * gmp-impl.h: Changed mpn_mulmod_bnm1 prototype. -2009-12-03 Niels Möller +2009-11-05 Torbjorn Granlund - * mpn/generic/gcdext_subdiv_step.c (mpn_gcdext_subdiv_step): - Select the right cofactor in the cases A == B or A == 2B. + * mpn/x86/k7/gcd_1.asm: Actually use div-reduced value. + Mnemonic cleanup. - * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Deleted - handling of ap[0] == 0 and bp[0] == 0; these cases don't happen. - Select the right cofactor in the case ap[0] == bp[0]. - * mpn/generic/gcdext.c (mpn_gcdext): Analogous changes. + * mpn/x86_64/gcd_1.asm: New file. -2009-12-02 Niels Möller +2009-11-03 Torbjorn Granlund - * gmp-h.in (mpn_gcdext_1): Updated prototype. - * mpn/generic/gcdext_lehmer.c (mpn_gcdext_lehmer_n): Updated for - signed cofactors from gcdext_1. - * mpn/generic/gcdext_1.c (mpn_gcdext_1): Use Euclid's algorithm, - and return signed cofactors. + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add sqr_n.c. -2009-12-02 Torbjorn Granlund +2009-11-03 Marco Bodrato - * doc/gmp.texi (Low-level Functions): Document mpn_sqr_n. + * mpn/generic/toom_interpolate_6pts.c: removed an addmul_1 and cleanup. -2009-11-09 Torbjorn Granlund +2009-11-02 Torbjorn Granlund - * acinclude.m4 (GMP_C_FOR_BUILD_ANSI): Avoid poor quoting. + * configure.in (gmp_mpn_functions): Remove obsolete functions + dc_divrem_n and sb_divrem_mn. + * gmp-impl.h: Misc cleanup. + (mpn_sb_divrem_mn, mpn_dc_divrem_n): Remove. + (DIV_DC_THRESHOLD): Remove. + * mpn/generic/dc_divrem_n.c: Remove. + * mpn/generic/sb_divrem_mn.c: Remove. + * mpn/generic/tdiv_qr.c: Use DC_DIV_QR_THRESHOLD, not DIV_DC_THRESHOLD. + + * tests/devel/try.c: Replace mpn_sb_divrem_mn by mpn_sbpi1_div_qr. + * tests/refmpn.c (refmpn_sb_div_qr): New name for refmpn_sb_divrem_mn. + + * tune/Makefile.am (libspeed_la_SOURCES): Remove sb_div.c and sb_inv.c. + (TUNE_MPN_SRCS_BASIC): Remove sb_divrem_mn.c. + * tune/common.c (speed_mpn_dcpi1_div_qr_n): New function. + Remove mpn_sb_divrem_mn related functions. + * tune/speed.c (routine): Remove entries related to mpn_dc_divrem and + mpn_sb_divrem. + (routine): New entry for mpn_dc_div_qr_n. + * tune/speed.h (SPEED_ROUTINE_MPN_DC_DIVREM_CALL): Compute inverse + needed by pi1 calls. + (SPEED_ROUTINE_MPN_SB_DIVREM_M3): Remove. + * tune/tuneup.c (tune_sb_preinv): Remove. + (tune_dc): Update to measure DC_DIV_QR_THRESHOLD. + + * mpn/generic/sb_divappr_q.c: Remove. + +2009-11-01 Torbjorn Granlund + + * gmp-impl.h: Misc minor cleanups. + +2009-10-31 Torbjorn Granlund + + * gmp-impl.h (toom itch functions): Simplify, make some into macros. + (MPN_KARA_MUL_N_TSIZE, MPN_KARA_SQR_N_TSIZE): Remove. + * mpn/generic/mul_n.c (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove. + * mpn/generic/mul_n.c (mpn_sqr_n): Move from here... + * mpn/generic/sqr_n.c: ...to this new file. + * configure.in (gmp_mpn_functions): Add sqr_n. + + * Globally change + MUL_TOOM3_THRESHOLD => MUL_TOOM33_THRESHOLD, + MUL_KARATSUBA_THRESHOLD => MUL_TOOM22_THRESHOLD, + SQR_KARATSUBA_THRESHOLD => SQR_TOOM2_THRESHOLD, + and associated names analogously. + +2009-10-31 Niels Möller + + * mpn/generic/toom_interpolate_7pts.c: Changed evaluation points, + replacing -1/2 by -2. + * mpn/generic/toom44_mul.c: Updated to use new evaluation points, + and use mpn_toom_eval_dgr3_pm2. + * mpn/generic/toom4_sqr.c (mpn_toom4_sqr): Likewise. + * mpn/generic/toom53_mul.c (mpn_toom53_mul): Updated to use new + evaluation points, and use mpn_toom_eval_pm1 and + mpn_toom_eval_pm2exp. + * mpn/generic/toom62_mul.c (mpn_toom62_mul): Likewise. + + * mpn/generic/toom_eval_pm2exp.c: New file. + * mpn/generic/toom_eval_pm1.c: New file. + + * mpn/generic/toom43_mul.c (mpn_toom43_mul): Use + mpn_toom_eval_dgr3_pm2. + +2009-10-30 Torbjorn Granlund + + * tune/Makefile.am (TUNE_MPN_SRCS_BASIC): Add toom2* and toom3* files. + +2009-10-30 Niels Möller + + * configure.in (gmp_mpn_functions): Added toom_eval_dgr3_pm2. + * gmp-impl.h: Added prototype for mpn_toom_eval_dgr3_pm2. + * mpn/generic/toom_eval_dgr3_pm2.c: New file. + +2009-10-29 Niels Möller + + * mpn/generic/toom43_mul.c (mpn_toom43_mul): Use + mpn_toom_eval_dgr3_pm1. + * mpn/generic/toom42_mul.c (mpn_toom42_mul): Likewise. 2009-10-29 Torbjorn Granlund + * mpn/generic/mulmod_bnm1.c: Replace some add_1 by INCR. + + * gmp-impl.h (mpn_mulmod_bnm1_itch): New macro. + + * mpn/generic/mulmod_bnm1.c (mpn_mulmod_bnm1): Call mpn_mul_fft. + (mpn_mulmod_bnm1_next_size): Adopt to SS FFT. + * mpn/generic/mul_fft.c (mpn_mul_fft): Make it return high limb. (mpn_mul_fft_internal): Likewise. + * mpn/generic/mulmod_bnm1.c: New file, by Niels Möller. + * configure.in (gmp_mpn_functions): Add mulmod_bnm1. + * gmp-impl.h: Add related declarations. + * tune/tuneup.c: Tune MULMOD_BNM1_THRESHOLD. + * tune/speed.h (SPEED_ROUTINE_MPN_MULMOD_BNM1): New macro. + * tune/common.c (speed_mpn_mulmod_bnm1): New function. + * Makefile.am (TUNE_MPN_SRCS_BASIC): Add mulmod_bnm1.c. + + * gmp-impl.h (mpn_kara_mul_n, mpn_kara_sqr_n): Remove declarations. + * tune/common.c: Remove/rename kara functions. + * tune/speed.h: Likewise. + + * tests/devel/try.c: Clean up usage of %p printf arguments. + + * gmp-impl.h: Update MUL/SQR MINSIZE macros to reflect new function + names and limitations + * tune/tuneup.c: Use updated macro names. + * tune/speed.h: Likewise. + * tests/devel/try.c: Test new mul/sqr functions, remove old tests. + +2009-10-29 Niels Möller + + * tune/speed.c: Added support for mpn_toom4_sqr, + + * tune/speed.h (SPEED_ROUTINE_MPN_TOOM4_SQR): New macro. + (SPEED_ROUTINE_MPN_KARA_MUL_N): Deleted. + (SPEED_ROUTINE_MPN_TOOM3_MUL_N): Deleted. + (SPEED_ROUTINE_MPN_TOOM2_SQR): Use mpn_toom2_sqr_itch. + + * gmp-impl.h (mpn_toom3_mul_n, mpn_toom3_sqr_n): Remove + declarations. + (mpn_toom2_sqr_itch): Add margin for recursive calls. + +2009-10-28 Niels Möller + + * mpn/generic/mul_n.c (mpn_kara_mul_n): Deleted old Karatsuba + implementation. + (mpn_kara_sqr_n): Likewise deleted. + + * mpn/generic/mul_n.c (mpn_sqr_n): Use mpn_toom2_sqr and + mpn_toom3_sqr, not the old implementations. + + * gmp-impl.h (MPN_TOOM3_MUL_N_TSIZE): Deleted, replaced by + mpn_toom33_mul_itch. + (MPN_TOOM3_SQR_N_TSIZE): Deleted, replaced by + mpn_toom3_sqr_itch. + (mpn_toom33_mul_itch): Needs more scratch. + (mpn_toom3_sqr_itch): Likewise. + * tune/speed.h (SPEED_ROUTINE_MPN_TOOM3_MUL_N): Use + mpn_toom33_mul_itch. + (SPEED_ROUTINE_MPN_TOOM3_SQR_N): Use mpn_toom3_sqr_itch. + * mpn/generic/mul_n.c (mpn_mul_n): Use mpn_toom33_mul_itch. + (mpn_sqr_n): Use mpn_toom3_sqr_itch. + + * mpn/generic/toom33_mul.c (mpn_toom33_mul): Avoid TMP_ALLOC. Needs + some more supplied scratch instead. + * mpn/generic/toom3_sqr.c (mpn_toom3_sqr): Likewise. + +2009-10-26 Torbjorn Granlund + + * gmp-impl.h (invert_pi1): Streamline, as suggested by Niels. + +2009-10-24 Torbjorn Granlund + + * mpn/generic/bdiv_q.c: Update to call new functions. + * mpn/generic/bdiv_qr.c: Likewise. + * mpn/generic/binvert.c: Likewise. + * mpn/generic/divexact.c: Likewise. + * mpn/generic/divis.c: Likewise. + * mpn/generic/perfpow.c: Likewise. + * mpn/generic/tdiv_qr.c: Likewise. + * mpn/generic/dcpi1_bdiv_q.c: New file. + * mpn/generic/dcpi1_bdiv_qr.c: New file. + * mpn/generic/dcpi1_div_q.c: New file. + * mpn/generic/dcpi1_div_qr.c: New file. + * mpn/generic/dcpi1_divappr_q.c: New file. + * mpn/generic/sbpi1_bdiv_q.c: New file. + * mpn/generic/sbpi1_bdiv_qr.c: New file. + * mpn/generic/sbpi1_div_q.c: New file. + * mpn/generic/sbpi1_div_qr.c: New file. + * mpn/generic/sbpi1_divappr_q.c: New file. + * mpn/generic/dc_bdiv_q.c: Removed. + * mpn/generic/dc_bdiv_qr.c: Removed. + * mpn/generic/dc_div_q.c: Removed. + * mpn/generic/dc_div_qr.c: Removed. + * mpn/generic/dc_divappr_q.c: Removed. + * mpn/generic/sb_bdiv_q.c: Removed. + * mpn/generic/sb_bdiv_qr.c: Removed. + * mpn/generic/sb_div_q.c: Removed. + * mpn/generic/sb_div_qr.c: Removed. + + * configure.in (gmp_mpn_functions): Add new division functions, remove + obsolete division functions. + + * gmp-impl.h: Add declarations of new division functions, remove + corresponding obsolete declarations. + (gmp_pi1_t, gmp_pi2_t): New types. + (invert_pi1): New macro for computing 2/1 and 3/2 inverses. + +2009-10-23 Niels Möller + + * gmp-impl.h (mpn_toom62_mul_itch): New function. + + * tests/mpn/t-toom53.c: New test program. + * tests/mpn/t-toom62.c: New test program. + 2009-10-23 Torbjorn Granlund * mpn/generic/get_d.c: Fix code handling denorms for 64-bit machines. * tests/mpf/t-get_d.c (test_denorms): New function. +2009-10-23 Niels Möller + + * mpn/generic/toom52_mul.c (mpn_toom52_mul): Use supplied scratch + space, not TMP_ALLOC. Interface change, now requires input sizes + such that s + t >= 5. + + * gmp-impl.h (mpn_toom52_mul_itch): New function. + + * tests/mpn/t-toom52.c: New test program. + +2009-10-22 Torbjorn Granlund + + * mpn/x86_64/sqr_basecase.asm: Tune for speed and a 7% size decrease. + +2009-10-22 Niels Möller + + * tests/mpn/t-toom44.c: New test program. + * tests/mpn/t-toom33.c: New test program. + + * tests/mpn/toom-shared.h (main): Reorganized input generation. + Users are now supposed to define macros MAX_AN, MIN_BN and MAX_BN. + Updated existing toom test programs. + +2009-10-22 Torbjorn Granlund + + * tests/devel/try.c: Fix typos in last change. + +2009-10-21 Torbjorn Granlund + + * mpn/asm-defs.m4 (define_mpn): Add mullow_basecase. + + * tests/devel/try.c: Test mpn_mullow_n. + + * tests/refmpn.c (refmpn_mullow_n): New function. + * tests/tests.h: Declare it. + +2009-10-21 Niels Möller + + * tests/mpn/toom-shared.h (main): Check for writes outside of the + product or scratch area. + + * gmp-impl.h (mpn_toom43_mul_itch): New function. + + * mpn/generic/toom43_mul.c (mpn_toom43_mul): Use supplied scratch + space, not TMP_ALLOC. Interface change, now requires input sizes + such that s + t >= 5. + +2009-10-20 Niels Möller + + * tests/mpn/toom-shared.h (MIN_BLOCK): New constant, which can be + overridden by users. Needed by t-toom42 and t-toom43. + + * tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom32, + t-toom42 and t-toom43. + * tests/mpn/t-toom43.c: New test program. + * tests/mpn/t-toom42.c: New test program. + * tests/mpn/t-toom32.c: New test program. + + * tests/mpn/Makefile.am (check_PROGRAMS): Added t-toom22. + * tests/mpn/t-toom22.c: New test file. + * tests/mpn/toom-shared.h: New file. Test framework for Toom + functions. + +2009-10-14 Niels Möller + + * mpn/generic/hgcd.c (mpn_hgcd_itch): Thanks to the new + mpn_matrix22_mul_strassen, the scratch need is reduced by 16%. + +2009-10-14 Marco Bodrato + + * mpn/generic/matrix22_mul.c (mpn_matrix22_mul_strassen): New + Strassen-like algorithm, to reduce the amount of temporary + storage. + (mpn_matrix22_mul_itch): Updated to reflect the reduced storage + need. + +2009-10-03 Torbjorn Granlund + + * Rename mpn_addsub_n to mpn_add_n_sub_n. + +2009-10-01 Torbjorn Granlund + + * mpn/generic/tdiv_qr.c: Call mpn_divrem_1 and mpn_dc_div_qr instead of + old functions. + + * mpn/generic/mul_n.c: Call toom22 and toom33 instead of old functions. + + * mpn/generic/toom42_mul.c (TOOM42_MUL_N_REC): Renamed from + TOOM22_MUL_N_REC. Unconditionally call the generic mpn_mul_n. + * mpn/generic/toom32_mul.c: Analogous changes. + +2009-09-28 Niels Möller + + * mpn/x86_64/invert_limb.asm: Rewrite. Exploit cancellation in the + Newton iteration. + +2009-09-27 Niels Möller + + * mpn/x86/invert_limb.asm: Reduce register usage. Eliminated $1 + arguments to add, sub and shift. + +2009-09-25 Niels Möller + + * mpn/x86/invert_limb.asm: New file. + +2009-09-24 Torbjorn Granlund + + * mpn/generic/toom33_mul.c: Use new toom functions for all recursive + products. + * mpn/generic/toom3_sqr.c: Likewise. + * mpn/generic/toom44_mul.c: Likewise. + * mpn/generic/toom4_sqr.c: Likewise. + + * mpn/generic/add_n.c: Relax operand overlap ASSERTs. + * mpn/generic/sub_n.c: Likewise. + 2009-09-15 Torbjorn Granlund Suggested by Uwe Mueller: * printf/doprnt.c: Use "%ld" for exponent printing. * printf/doprntf.c (__gmp_doprnt_mpf): Make expval "long". +2009-09-14 Torbjorn Granlund + + * configure.in: Handle mingw64. + * gmp-impl.h (gmp_intptr_t): Declare. + * tests/amd64check.c (calling_conventions_values): Use CNST_LIMB. + * tests/memory.c: Use gmp_intptr_t; print pointers using C90 "%p". + * tests/misc.c: Use gmp_intptr_t. + * tests/mpq/t-get_str.c: Print pointers using C90 "%p". + +2009-08-12 Torbjorn Granlund + + * mpn/generic/mod_1_1.c (mpn_mod_1_1p_cps): Remove silly ASSERT code. + + * mpn/asm-defs.m4 (define_mpn): Remove mod_1s_1p, add mod_1_1p. + + * mpn/arm/invert_limb.asm: Complete rewrite. + + * longlong.h: Document LONGLONG_STANDALONE and NO_ASM. + 2009-08-05 Torbjorn Granlund * tests/mpz/dive_ui.c (check_random): Avoid zero divisors. +2009-07-31 Torbjorn Granlund + + * mpn/generic/mod_1_1.c: Tweak to handle any modulus (possibility + pointed out by Per Austrin). + (mpn_mod_1_1p): Renamed from mpn_mod_1s_1p. + (mpn_mod_1_1p_cps): Renamed from mpn_mod_1s_1p_cps. + *mpn/generic/mod_1.c (mpn_mod_1): Reorganise to call mpn_mod_1_1p for + any modulus. + +2009-07-28 Torbjorn Granlund + + * configure.in: Pass arch for x86 also in 64-bit mode. + 2009-07-26 Torbjorn Granlund - * config.guess (_cpuid): Recognize more Intel "Core" processors. + * config.guess (_cpuid): Recognise more Intel "Core" processors. 2009-07-13 Torbjorn Granlund * mpf/eq.c: Rewrite. -2009-07-05 Torbjorn Granlund + * tests/mpf/t-eq.c: New test. + +2009-07-06 Torbjorn Granlund + + * gmp-impl.h (__mp_bases): Remove this alias. * mpf/get_str.c: Use less overflow prone expression for computing limb allocation. @@ -114,13 +2165,176 @@ * mpf/set_str.c: Likewise. * mpz/set_str.c: Likewise. +2009-07-03 Niels Möller + + * mpn/generic/gcd_1.c (mpn_gcd_1): Use masking tricks to reduce + the number of branches in the loop. + +2009-06-28 Torbjorn Granlund + + * demos/factorize.c (factor_using_pollard_rho): Rewrite. + + * mpz/clears.c: New file. + * mpq/clears.c: New file. + * mpf/clears.c: New file. + * gmp-h.in (mpz_clears, mpq_clears, mpf_clears): Declare. + * mpz/Makefile.am: Add clears.c. + * mpq/Makefile.am: Add clears.c. + * mpf/Makefile.am: Add clears.c. + * Makefile.am: Add these also to respective OBJECTS variables. + * doc/gmp.texi: Document inits function and clears functions. + +2009-06-20 Torbjorn Granlund + + * mp-h.in (mp_bitcnt_t): Declare here too. + +2009-06-19 Torbjorn Granlund + + * mpq/inits.c: New file. + * mpf/inits.c: New file. + * gmp-h.in (mpz_inits, mpq_inits, mpf_inits): Declare . + + * mpn/generic/remove.c: New file. + * configure.in (gmp_mpn_functions): Add remove. + * gmp-impl.h (mpn_remove): Declare. + + * gmp-h.in (mp_bitcnt_t): New basic type. + * mpn/generic/perfpow.c (mp_bitcnt_t): Remove private definition. + + * mpn/generic/bdiv_qr.c: Make it actually work. + + * mpn/x86_64/core2/aorsmul_1.asm: Rewrite to use shorter pipeline and + to need fewer registers. + 2009-06-17 Torbjorn Granlund - * mpn/generic/toom44_mul.c: Use TMP_ALLOC for unbounded allocations. + * mpn/x86_64/rsh1aors_n.asm: New file. + * mpn/x86_64/rsh1add_n.asm: Remove. + * mpn/x86_64/rsh1sub_n.asm: Remove. + + * mpz/inits.c: New file. + + * gen-trialdivtab.c: Wrap limb constants into CNST_LIMB. + + With Martin Boij: + * mpn/generic/perfpow.c (binv_root, binv_sqroot): Change from being + recursive to being iterative. + (mpn_perfect_power_p): Reorganise temp memory usage to avoid a buffer + overrun. Trim allocation of next and prev. Never create oversize + products in the multiplicity binary search. + + * mpn/generic/dc_div_q.c: Add missing TMP_FREE. + +2009-06-16 Torbjorn Granlund + + Revert: + * mpn/generic/perfpow.c (perfpow): Test exponents up to ub, inclusive. + +2009-06-16 Martin Boij + + * mpn/generic/perfpow.c (logs): Use more conservative table. + +2009-06-15 Torbjorn Granlund + + * mpn/pa64/aors_n.asm: New file. + * mpn/pa64/add_n.asm: Remove. + * mpn/pa64/sub_n.asm: Remove. + + * mpn/generic/perfpow.c (perfpow): Test exponents up to ub, inclusive. + +2009-06-14 Torbjorn Granlund + + * mpn/x86_64/bdiv_q_1.asm: Optimise away a mov insn. + * mpn/x86_64/dive_1.asm: Likewise. + + * mpn/generic/perfpow.c (binv_root): Use mpn_bdiv_q_1, not + mpn_divexact_itch for 2-adic division. + (all functions): Micro optimise. + + * Makefile.am (libmp_la_SOURCES): Add nextprime.c. + +2009-06-13 Torbjorn Granlund + + * gmp-h.in (mpn_perfect_power_p): Declare. + * configure.in (gmp_mpn_functions): Add perfpow. + * mpz/perfpow.c: Now trivial, simply calls mpn_perfect_power_p. + +2009-06-13 Martin Boij + + * mpn/generic/perfpow.c: New file. + * tests/mpz/t-perfpow.c: Rewrite. 2009-06-12 Torbjorn Granlund - * mpn/generic/mul.c: Use TMP_ALLOC_LIMBS for unbounded allocations. + * mpn/generic/bdiv_qr.c: New file. + * mpn/generic/bdiv_q.c: New file. + * configure.in (gmp_mpn_functions): Add bdiv_qr and bdiv_q. + * gmp-impl.h: Declare new functions. + + * nextprime.c: New file. + * gmp-impl.h (gmp_primesieve_t, gmp_init_primesieve, gmp_nextprime): + Declare + * Makefile.am (libgmp_la_SOURCES): Add nextprime.c. + +2009-06-11 Torbjorn Granlund + + * mpn/generic/trialdiv.c: New file. + * gen-trialdivtab.c: New file. + * configure.in (gmp_mpn_functions): Add trialdiv. + * gmp-impl.h (mpn_trialdiv): Declare + * Makefile.am: Add rules for gen-trialdivtab and trialdiv. + + * longlong.h (arm count_leading_zeros): Define for armv5. + + * gmp-impl.h: Move down toom itch functions to after we've #defined + all THRESHOLDs. + + * dumbmp.c (isprime): Replace with slightly less inefficient code. + (mpz_tdiv_r): New function. + +2009-06-11 Niels Möller + + Support for mpn_toom32_mul in speed: + * tune/speed.c (routine): Added mpn_toom32_mul. + * tune/speed.h (SPEED_ROUTINE_MPN_TOOM32_MUL): New macro. + * tune/common.c (speed_mpn_toom32_mul): New function. + + * gmp-impl.h (mpn_toom32_mul_itch): Count scratch space needed + for the calls to mpn_toom22_mul. + (ABOVE_THRESHOLD): Moved this and related macros so it can be used + by mpn_toom32_mul_itch. + (mpn_toom22_mul_itch): Count scratch space for recursive calls. + +2009-06-11 Torbjorn Granlund + + * mpn/x86/k7/mod_1_4.asm: New file, mainly for k7, but perhaps useful + also for k6 and non-sse p6. + +2009-06-10 Torbjorn Granlund + + * mpn/x86_64/mod_1_4.asm: Minor size reducing tweaks. + + * mpn/x86/mod_1.asm: Remove obsolete file. + * mpn/x86/k7/mmx/mod_1.asm: Likewise. + * mpn/x86/pentium4/sse2/mod_1.asm: Likewise. + * mpn/x86/p6/mod_1.asm: Likewise. + * mpn/x86/pentium/mod_1.asm: Likewise. + +2009-06-08 Niels Möller + + * mpn/generic/toom4_sqr.c (mpn_toom4_sqr): Reorganized, to reduce + the need for scratch space, and get rid of TMP_ALLOC. Also use + mpn_toom_eval_dgr3_pm1. + + * mpn/generic/toom_interpolate_6pts.c (mpn_toom_interpolate_6pts): + Stricter ASSERTs based on maximum size of polynomial coefficients. + Improved comments on the signedness of intermediate values. + +2009-06-07 Torbjorn Granlund + + * mpn/generic/toom2_sqr.c: Make it actually work. + + * mpn/generic/toom3_sqr.c: Reduce local scratch space. 2009-06-05 Torbjorn Granlund @@ -129,16 +2343,187 @@ FFT_TABLE2_SIZE if they are defined. (struct nk): Use bit field. +2009-06-05 Niels Möller + + * mpn/generic/toom44_mul.c (mpn_toom44_mult): Use + mpn_toom_eval_dgr3_pm1. + + * mpn/generic/toom_eval_dgr3_pm1.c: New file. + + * mpn/generic/toom_interpolate_7pts.c (mpn_toom_interpolate_7pts): + Minor cleanup, use mpn_add rather than mpn_add_n + MPN_INCR_U. + + * mpn/generic/toom44_mul.c (mpn_toom44_mul): Reorganized, to + reduce the need for scratch space, and get rid of TMP_ALLOC. + +2009-06-05 Torbjorn Granlund + + * mpn/generic/toom_interpolate_7pts.c: Fall back mpn_divexact_byN to + mpn_bdiv_q_1_pi1, if the latter is NATIVE. + +2009-06-04 Torbjorn Granlund + + * mpn/x86_64/bdiv_q_1.asm: New file. + + * configure.in (HAVE_NATIVE): Add recently added functions. + (GMP_MULFUNC_CHOICES): Handle addlsh_n, sublsh_n, rsblsh_n. + + * tune/common.c (speed_mpn_bdiv_q_1, speed_mpn_bdiv_q_1_pi1): + New functions. + * tune/speed.c (routine): Add mpn_bdiv_q_1 and mpn_bdiv_q_1_pi1. + * tune/speed.h (SPEED_ROUTINE_MPN_BDIV_Q_1_PI1): New #define. + (SPEED_ROUTINE_MPN_BDIV_Q_1): Mew #define. + + * configure.in (gmp_mpn_functions): Add bdiv_q_1. + * mpn/generic/bdiv_q_1.c: New file. + * mpn/asm-defs.m4 (define_mpn): Add mpn_bdiv_q_1 and mpn_bdiv_q_1_pi1. + * gmp-impl.h (mpn_bdiv_q_1, mpn_bdiv_q_1_pi1): Declare. + + * mpn/x86_64/lshift.asm: Cleanup. + * mpn/x86_64/rshift.asm: Cleanup. + + * mpn/x86_64/addlsh1_n.asm: Removed. + * mpn/x86_64/aorrlsh1_n.asm: Generalised addlsh1_n.asm to handle + addlsh1_n and rsblsh1_n functionality. + + * tests/refmpn.c (refmpn_rsblsh1_n): New function. + * tests/devel/try.c: Test mpn_rsblsh1_n. + * tests/tests.h: Declare refmpn_rsblsh1_n. + * tune/common.c (speed_mpn_rsblsh1_n): New function. + * tune/speed.c (routine): Add mpn_rsblsh1_n. + * tune/speed.h (mpn_rsblsh1_n): Declare. + + * configure.in (gmp_mpn_functions_optional): Add rsblsh1_n. + (GMP_MULFUNC_CHOICES): Handle rsblsh1_n defined with a mulfunc. + * mpn/asm-defs.m4 (define_mpn): Add rsblsh1_n. + * gmp-impl.h (mpn_rsblsh1_n): Declare. + + * mpn/generic/toom32_mul.c: Consistently use TOOM22_MUL_N_REC. + +2009-06-03 Marco Bodrato + + * mpn/generic/toom43_mul.c: New file. + * mpn/generic/toom52_mul.c: New file. + * mpn/generic/toom_interpolate_6pts.c: New file. + +2009-06-03 Torbjorn Granlund + + * configure.in (gmp_mpn_functions): Add toom43_mul, toom52_mul, and + toom_interpolate_6pts, but also some previously forgotten functions. + * mpn/Makefile.am (nodist_EXTRA_libmpn_la_SOURCES): Likewise. + * gmp-impl.h: Declare new functions. Sort toom function declarations. + + * gmp-impl.h: Rename toom4_* flags enum to toom7_*. Relevant C files + updated. + + * mpn/generic/toom_interpolate_7pts (divexact_2exp): Remove. + +2009-06-02 Torbjorn Granlund + + * demos/factorize.c: Add -q command line option. + +2009-06-02 Marco Bodrato + + * mpn/generic/toom_interpolate_7pts.c: Streamline, resulting in speed + improvements. + + * mpn/generic/toom_interpolate_5pts.c: Likewise, but also completely + do away with explicit scratch space. + * gmp-impl.h (mpn_toom_interpolate_5pts): Update prototype. + + * mpn/generic/mul_n.c (mpn_toom3_sqr_n, mpn_toom3_mul_n): + Update toom_interpolate_5pts call without scratch space parameter. + * mpn/generic/toom3_sqr.c: Likewise. + * mpn/generic/toom42_mul.c: Likewise. + * mpn/generic/toom33_mul.c: Likewise. + + * mpn/generic/toom33_mul.c: Reduce local scratch space. + * mpn/generic/toom32_mul.c: Rewrite to not use local scratch space. + +2009-06-02 Torbjorn Granlund + + * mpn/generic/toom22_mul.c (TOOM22_MUL_MN_REC): New macro, use it for + oo point. + 2009-06-01 Torbjorn Granlund + * mpn/generic/mul.c: Loop to avoid excessive recursion in toom33 and + toom44 slicing code. + * mpz/remove.c: Correctly handle multiplicity that does not fit an int. * Makefile.am (dist-hook): Check library version consistency. + * mpn/generic/mul.c: Rewrite. + +2009-05-29 Torbjorn Granlund + + * tests/mpz/t-divis.c (check_random): Create huge test operands. + + * mpn/generic/toom44_mul.c: Allocate temp space using one TMP_ALLOC + call, not multiple TMP_SALLOC. + * mpn/generic/toom4_sqr.c: Likewise. + + * gmp-impl.h (mpn_toom22_mul_itch): Replace totally wrong code. + + * mpn/generic/mullow_n.c: Relax overlap requirement implied by ASSERT. + + * mpn/generic/divis.c: Rewrite. + + * gmp-impl.h (mpn_mu_bdiv_qr): Now returns mp_limb_t. + (mpn_toom2_sqr_itch): Simplify. + + * mpn/generic/mu_bdiv_qr.c: Implement properly. + +2009-05-27 Torbjorn Granlund + + * mpn/generic/mod_1_1.c: Add proper ASSERT functionality cps function. + * mpn/generic/mod_1_2.c: Likewise. + * mpn/generic/mod_1_3.c: Likewise. + * mpn/generic/mod_1_4.c: Likewise. + + * tune: Add speed measuring of toom22, toom33, and toom44. + + * mpn/generic/toom22_mul.c: Handle potentially unbalanced coefficient + product better. + +2009-05-26 Torbjorn Granlund + + * tests/mpz/t-mul.c (ref_mpn_mul): Use mpn_toom44_mul in FFT range for + better huge-operands performance. + 2009-05-24 Torbjorn Granlund * acinclude.m4 (GMP_ASM_LSYM_PREFIX): Try "$L" too, before "$". +2009-05-23 Torbjorn Granlund + + * gmp-impl.h (mpn_mod_1s_1p,mpn_mod_1s_2p,mpn_mod_1s_3p,mpn_mod_1s_4p): + Declare using __GMP_ATTRIBUTE_PURE. + + * tune/tuneup.c (tune_mod_1): Specify check_size for measuring mod_1_N + functions. + (one): Remove redundant size loop exit condition. + +2009-05-20 Torbjorn Granlund + + * mpn/x86/pentium4/sse2/mod_1_4.asm: New file. + * mpn/x86/p6/sse2/mod_1_4.asm: New file (grabbing pentium4 code). + +2009-05-18 Torbjorn Granlund + + * gmp-h.in (__GNU_MP_VERSION_MINOR): Bump to 4. + (__GNU_MP_VERSION_PATCHLEVEL): Set to -1. + + * mpn/x86_64/mod_1_4.asm: New file. + + * mpn/asm-defs.m4: Correct names for mod_1_N functions. + Add defines for corresponding cps functions. + + * mpn/generic/mod_1_2.c: Support any sizes > 1. + * mpn/generic/mod_1_3.c: Likewise. + * mpn/generic/mod_1_4.c: Likewise. + 2009-05-12 Torbjorn Granlund * Version 4.3.1 released. @@ -208,7 +2593,7 @@ 2009-04-26 Torbjorn Granlund - * config.guess: Recognize more POWER processor types. + * config.guess: Recognise more POWER processor types. 2009-04-25 Torbjorn Granlund @@ -231,6 +2616,9 @@ * mpn/x86_64/darwin.m4: Likewise. * mpn/x86_64/sqr_basecase.asm: Rework switch code using JUMPTABSECT. + * tune/common.c (speed_mpn_hgcd, speed_mpn_hgcd_lehmer): + Remove an unused variable. + * mpn/x86/x86-defs.m4 (LEA): Get SIZE arguments right. 2009-04-14 Torbjorn Granlund @@ -271,7 +2659,7 @@ 2009-03-09 Torbjorn Granlund - * mpn/x86_64/divrem_1.asm: Add a nop to save a cycle in unnormalized + * mpn/x86_64/divrem_1.asm: Add a nop to save a cycle in unnormalised case. 2009-03-05 Torbjorn Granlund @@ -331,7 +2719,7 @@ * tune/tuneup.c (tune_mod_1): Run MOD_1_x_THRESHOLD tests also when longlong.h specified UDIV_PREINV_ALWAYS. - * mpn/generic/mod_1.c (mpn_mod_1): Properly check for normalization + * mpn/generic/mod_1.c (mpn_mod_1): Properly check for normalisation divisor. 2009-01-13 Torbjorn Granlund @@ -1440,7 +3828,6 @@ usable for local symbols. (LEA): Replace with code for external references. - * mpn/powerpc32/vmx/mod_34lsub1.asm: Use LEAL. 2007-10-07 Torbjorn Granlund @@ -1458,7 +3845,7 @@ * mpn/x86/p6/aors_n.asm: Table cycle counts. - * mpn/x86/k7/mod_34lsub1.asm: Fix over-optimisitc cycle count claims. + * mpn/x86/k7/mod_34lsub1.asm: Fix over-optimistic cycle count claims. * mpn/x86/x86-defs.m4 (DEF_OBJECT, END_OBJECT): New define's. @@ -1503,12 +3890,12 @@ * mpz/get_str.c: Cast a char index to int to shut up compilers. - * dc_div_qr.c: Pass dummy scratch argument to mpn_invert. - * dc_divappr_q.c: Likewise. - * mu_div_qr.c: Likewise. - * mu_divappr_q.c: Likewise. - * mu_div_q.c: Likewise. - * divexact.c: Likewise. + * mpn/generic/dc_div_qr.c: Pass dummy scratch argument to mpn_invert. + * mpn/generic/dc_divappr_q.c: Likewise. + * mpn/generic/mu_div_qr.c: Likewise. + * mpn/generic/mu_divappr_q.c: Likewise. + * mpn/generic/mu_div_q.c: Likewise. + * mpn/generic/divexact.c: Likewise. * mpn/generic/invert.c: New file, placeholder for now. @@ -3355,7 +5742,7 @@ (what_objects): Only demand 9 object files, as for instance occurs in the scanf directory. (asm files): Transform labels L(foo) -> Lfoo. Take func name from - PROLOGUE to support empty "EPILOGUE()". Recognise and subsitute + PROLOGUE to support empty "EPILOGUE()". Recognise and substitute register name "define()"s. * macos/Makefile.in (CmnObjs): Add tal-notreent.o. @@ -3778,7 +6165,7 @@ * tests/mpn/t-hgcd.c: Remove unused variables. * mpn/ia64/hamdist.asm: Remove bundling incompatible with HP-UX - assember. Misc HP-UX changes. + assembler. Misc HP-UX changes. * mpn/ia64/gcd_1.asm: Add some syntax to placid the HP-UX assembler. 2004-02-11 Kevin Ryde @@ -3931,7 +6318,7 @@ * tune/common.c (speed_mpn_hgcd_lehmer): Disabled function. * mpn/generic/hgcd.c (mpn_hgcd_lehmer_itch, mpn_hgcd_lehmer) - (mpn_hgcd_equal): Deleted functions. + (mpn_hgcd_equal): Deleted functions. * mpn/generic/gcd.c (hgcd_start_row_p): Deleted function. (gcd_schoenhage): Deleted assertion code using mpn_hgcd_lehmer. @@ -4996,7 +7383,7 @@ 2003-10-21 Torbjorn Granlund - * mpn/ia64/submul_1.asm: Slightly reschedule loop to accomodate + * mpn/ia64/submul_1.asm: Slightly reschedule loop to accommodate Itanium 2 getf.sig latency. 2003-10-21 Kevin Ryde @@ -7617,7 +10004,7 @@ * tune/tuneup.c (sqr_karatsuba_threshold): Initialize to TUNE_SQR_KARATSUBA_MAX so mpn_sqr_n works for randmt initialization. - * gmp.texi (Integer Comparisons): Remove mention of non-existant + * gmp.texi (Integer Comparisons): Remove mention of non-existent mpz_cmpabs_si, reported by Conrad Curry. * tune/speed.c, tune/speed.h, tune/common.c: Add gmp_randseed, @@ -15469,7 +17856,7 @@ * mp.h (mp_set_memory_functions): Add missing #define. * mpbsd/tests/allfuns.c (mp_set_memory_functions): Verify its - existance. + existence. * mpf/tests/t-misc.c (check_mpf_getset_prec): New test, verifying reverted behaviour of mpf_get_prec. @@ -16776,7 +19163,7 @@ * mpn/powerpc32: Use dnl/C instead of `#' for comments. * config.guess: Get "model" limit between pentium 2 and pentium3 right. - Get rid of code determining `_' prefix; use double labels instead. + Get rid of code determining `_' prefix; use double labels instead. * config.guess: Partially merge with FSF version of April 22. (Don't bring over NetBSD changes for now.) @@ -17582,7 +19969,7 @@ * randraw.c (gmp_rand_getraw): Handle the case where (1) the LC scheme doesn't generate even limbs and (2) more than one LC - invokation is necessary to produce the requested number of bits. + invocation is necessary to produce the requested number of bits. 2000-04-05 Torbjorn Granlund @@ -19634,7 +22021,7 @@ * configure.in (i[3456]86* etc): Check if using gcc before choosing mt-x86. - * configure.in (m68*-*-*): New alterantive. + * configure.in (m68*-*-*): New alternative. * config/mt-m68k: New file. * mpn/alpha/invert-limb.s: Put tables in text segment, @@ -19958,7 +22345,7 @@ * mpn/x86/pentium/[lr]shift.S: Likewise. * mpn/config/t-oldgas (SFLAGS): Pass -DOLD_GAS. - * gmp-impl.h: In code for determining endianess, test also + * gmp-impl.h: In code for determining endianness, test also __BIG_ENDIAN__ and __hppa__. Remove test of __NeXT__. Wed Oct 16 03:50:34 1996 Torbjorn Granlund @@ -23234,7 +25621,7 @@ * dist-Makefile: Go via tmp- files for cre* redirection. * dist-Makefile: Add tmp* to "clean" target. - * dist-Makefile: Use LOCAL_CC for cre*, to simplyfy cross + * dist-Makefile: Use LOCAL_CC for cre*, to simplify cross compilation. * gmp.h, mp.h: Don't define NULL here. @@ -23472,7 +25859,7 @@ Sat Apr 27 21:03:11 1991 Torbjorn Granlund (tege@zevs.sics.se) - * Install multplication using Karatsuba's algorithm as default. + * Install multiplication using Karatsuba's algorithm as default. Fri Apr 26 01:03:57 1991 Torbjorn Granlund (tege@zevs.sics.se) @@ -23490,7 +25877,7 @@ Mon Apr 22 01:31:57 1991 Torbjorn Granlund (tege@zevs.sics.se) - * karatsuba.c: New file for Karatsuba's multplication algorithm. + * karatsuba.c: New file for Karatsuba's multiplication algorithm. * mpz_random, mpz_init, mpz_mod_2exp: New files and functions. @@ -23585,7 +25972,7 @@ Thu Mar 14 18:45:28 1991 Torbjorn Granlund (tege@musta.nada.kth.se) - * mpq_mul.c: New file for rational multplication. + * mpq_mul.c: New file for rational multiplication. * gmp.h: Add definitions for rational arithmetics. diff -Nru gmp-4.3.2+dfsg/configfsf.guess gmp-5.0.2+dfsg/configfsf.guess --- gmp-4.3.2+dfsg/configfsf.guess 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/configfsf.guess 2011-05-08 09:49:29.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2008-04-14' +timestamp='2011-02-02' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +56,9 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -170,7 +171,7 @@ arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ - | grep __ELF__ >/dev/null + | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? @@ -180,7 +181,7 @@ fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -223,7 +224,7 @@ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +270,10 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -295,7 +299,7 @@ echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -324,14 +328,33 @@ case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; + s390x:SunOS:*:*) + echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + eval $set_cc_for_build + SUN_ARCH="i386" + # If there is a compiler, see if it is configured for 64-bit objects. + # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. + # This test works for both compilers. + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + SUN_ARCH="x86_64" + fi + fi + echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize @@ -375,23 +398,23 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -461,8 +484,8 @@ echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -475,7 +498,7 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -532,7 +555,7 @@ echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -575,52 +598,52 @@ 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -640,7 +663,7 @@ # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null + grep -q __LP64__ then HP_ARCH="hppa2.0w" else @@ -711,22 +734,22 @@ exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -750,14 +773,14 @@ exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -785,18 +808,18 @@ echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in + *:Interix*:*) + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -806,6 +829,9 @@ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; + 8664:Windows_NT:*) + echo x86_64-pc-mks + exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we @@ -835,6 +861,20 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -855,7 +895,18 @@ echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -866,74 +917,33 @@ m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - mips:Linux:*:*) + mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU - #undef mips - #undef mipsel + #undef ${UNAME_MACHINE} + #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mipsel + CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips + CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - mips64:Linux:*:*) - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #undef CPU - #undef mips64 - #undef mips64el - #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) - CPU=mips64el - #else - #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) - CPU=mips64 - #else - CPU= - #endif - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu + padre:Linux:*:*) + echo sparc-unknown-linux-gnu exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level @@ -943,14 +953,17 @@ *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -958,6 +971,9 @@ sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-tilera-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; @@ -965,68 +981,8 @@ echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - a.out-i386-linux) - echo "${UNAME_MACHINE}-pc-linux-gnuaout" - exit ;; - "") - # Either a pre-BFD a.out linker (linux-gnuoldld) or - # one that does not give us useful --help. - echo "${UNAME_MACHINE}-pc-linux-gnuoldld" - exit ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1034,11 +990,11 @@ echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1055,7 +1011,7 @@ i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) @@ -1070,7 +1026,7 @@ fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1098,10 +1054,13 @@ exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i386. - echo i386-pc-msdosdjgpp - exit ;; + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. + # Note: whatever this is, it MUST be the same as what config.sub + # prints for the "djgpp" host, or else GDB configury will decide that + # this is a cross-build. + echo i586-pc-msdosdjgpp + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1136,8 +1095,18 @@ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; + NCR*:*:4.2:* | MPRAS*:*:4.2:*) + OS_REL='.3' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } + /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ + && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; @@ -1150,7 +1119,7 @@ rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) @@ -1170,10 +1139,10 @@ echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1199,11 +1168,11 @@ exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1243,6 +1212,16 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1258,6 +1237,9 @@ *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1303,13 +1285,13 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1324,6 +1306,9 @@ i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; + i*86:AROS:*:*) + echo ${UNAME_MACHINE}-pc-aros + exit ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 @@ -1346,11 +1331,11 @@ #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff -Nru gmp-4.3.2+dfsg/configfsf.sub gmp-5.0.2+dfsg/configfsf.sub --- gmp-4.3.2+dfsg/configfsf.sub 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/configfsf.sub 2011-05-08 09:49:29.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2008-06-16' +timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -72,8 +75,9 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,8 +124,10 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ + kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` @@ -148,10 +154,13 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; + -bluegene*) + os=-cnk + ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 @@ -166,10 +175,10 @@ os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -249,6 +258,7 @@ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ + | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ @@ -270,28 +280,42 @@ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ + | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | rx \ | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ + | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ - | z8k) + | x86 | xc16x | xstormy16 | xtensa \ + | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -302,6 +326,18 @@ basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -322,7 +358,7 @@ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ @@ -331,9 +367,10 @@ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ + | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -355,27 +392,31 @@ | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ + | romp-* | rs6000-* | rx-* \ + | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ - | z8k-*) + | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) @@ -397,7 +438,7 @@ basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -443,6 +484,10 @@ basic_machine=m68k-apollo os=-bsd ;; + aros) + basic_machine=i386-pc + os=-aros + ;; aux) basic_machine=m68k-apple os=-aux @@ -459,11 +504,24 @@ basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; + bluegene*) + basic_machine=powerpc-ibm + os=-cnk + ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -495,7 +553,7 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -711,6 +769,9 @@ basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -815,6 +876,12 @@ np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -897,9 +964,10 @@ ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -993,6 +1061,9 @@ basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1049,17 +1120,10 @@ basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu ;; tile*) basic_machine=tile-unknown @@ -1132,6 +1196,9 @@ xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1140,6 +1207,10 @@ basic_machine=z8k-unknown os=-sim ;; + z80-*-coff) + basic_machine=z80-unknown + os=-sim + ;; none) basic_machine=none-none os=-none @@ -1178,7 +1249,7 @@ we32k) basic_machine=we32k-att ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) + sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) @@ -1225,9 +1296,12 @@ if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1248,10 +1322,11 @@ # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ + | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ @@ -1262,7 +1337,8 @@ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1270,7 +1346,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1309,7 +1385,7 @@ -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1358,7 +1434,7 @@ -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1403,6 +1479,8 @@ -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) @@ -1425,10 +1503,10 @@ # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1440,8 +1518,17 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1468,7 +1555,7 @@ m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1495,7 +1582,7 @@ *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) @@ -1600,7 +1687,7 @@ -sunos*) vendor=sun ;; - -aix*) + -cnk*|-aix*) vendor=ibm ;; -beos*) diff -Nru gmp-4.3.2+dfsg/config.guess gmp-5.0.2+dfsg/config.guess --- gmp-4.3.2+dfsg/config.guess 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/config.guess 2011-08-30 01:19:39.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2009-06-10' +timestamp='2011-05-11' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -27,16 +27,16 @@ # the same distribution terms that you use for the rest of that program. -# Originally written by Per Bothner . -# Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# Originally written by Per Bothner. Please send patches (context +# diff format) to and include a ChangeLog +# entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # -# The plan is that this can be called by configure scripts if you -# don't specify an explicit build system type. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD me=`echo "$0" | sed -e 's,.*/,,'` @@ -56,8 +56,9 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -180,7 +181,7 @@ fi ;; *) - os=netbsd + os=netbsd ;; esac # The OS release @@ -223,7 +224,7 @@ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on @@ -269,7 +270,10 @@ # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; + # Reset EXIT trap before exiting to avoid spurious non-zero exit code. + exitcode=$? + trap '' 0 + exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead @@ -295,7 +299,7 @@ echo s390-ibm-zvmoe exit ;; *:OS400:*:*) - echo powerpc-ibm-os400 + echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} @@ -333,6 +337,9 @@ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; + i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) + echo i386-pc-auroraux${UNAME_RELEASE} + exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" @@ -391,23 +398,23 @@ # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} - exit ;; + exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} + echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; + echo m68k-milan-mint${UNAME_RELEASE} + exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; + echo m68k-hades-mint${UNAME_RELEASE} + exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; + echo m68k-unknown-mint${UNAME_RELEASE} + exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; @@ -477,8 +484,8 @@ echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) - # DG/UX returns AViiON for all architectures - UNAME_PROCESSOR=`/usr/bin/uname -p` + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ @@ -491,7 +498,7 @@ else echo i586-dg-dgux${UNAME_RELEASE} fi - exit ;; + exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; @@ -548,7 +555,7 @@ echo rs6000-ibm-aix3.2 fi exit ;; - *:AIX:*:[456]) + *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 @@ -591,52 +598,52 @@ 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` - sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` - case "${sc_cpu_version}" in - 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 - 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 - 532) # CPU_PA_RISC2_0 - case "${sc_kernel_bits}" in - 32) HP_ARCH="hppa2.0n" ;; - 64) HP_ARCH="hppa2.0w" ;; + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 - esac ;; - esac + esac ;; + esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include - #define _HPUX_SOURCE - #include - #include - - int main () - { - #if defined(_SC_KERNEL_BITS) - long bits = sysconf(_SC_KERNEL_BITS); - #endif - long cpu = sysconf (_SC_CPU_VERSION); - - switch (cpu) - { - case CPU_PA_RISC1_0: puts ("hppa1.0"); break; - case CPU_PA_RISC1_1: puts ("hppa1.1"); break; - case CPU_PA_RISC2_0: - #if defined(_SC_KERNEL_BITS) - switch (bits) - { - case 64: puts ("hppa2.0w"); break; - case 32: puts ("hppa2.0n"); break; - default: puts ("hppa2.0"); break; - } break; - #else /* !defined(_SC_KERNEL_BITS) */ - puts ("hppa2.0"); break; - #endif - default: puts ("hppa1.0"); break; - } - exit (0); - } + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa @@ -727,22 +734,22 @@ exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd - exit ;; + exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi - exit ;; + exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd - exit ;; + exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd - exit ;; + exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd - exit ;; + exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; @@ -766,14 +773,14 @@ exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` - echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" - exit ;; + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit ;; 5000:UNIX_System_V:4.*:*) - FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` - FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` - echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} @@ -801,18 +808,18 @@ echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 + # uname -m includes "-pc" on this system. + echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; - *:Interix*:[3456]*) - case ${UNAME_MACHINE} in + *:Interix*:*) + case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; - EM64T | authenticamd | genuineintel) + authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) @@ -854,6 +861,20 @@ i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep -q ld.so.1 + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ @@ -861,7 +882,13 @@ then echo ${UNAME_MACHINE}-unknown-linux-gnu else - echo ${UNAME_MACHINE}-unknown-linux-gnueabi + if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep -q __ARM_PCS_VFP + then + echo ${UNAME_MACHINE}-unknown-linux-gnueabi + else + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf + fi fi exit ;; avr32*:Linux:*:*) @@ -874,7 +901,18 @@ echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) - echo frv-unknown-linux-gnu + echo frv-unknown-linux-gnu + exit ;; + i*86:Linux:*:*) + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -901,39 +939,18 @@ #endif #endif EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^CPU/{ - s: ::g - p - }'`" + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - alpha:Linux:*:*) - case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in - EV5) UNAME_MACHINE=alphaev5 ;; - EV56) UNAME_MACHINE=alphaev56 ;; - PCA56) UNAME_MACHINE=alphapca56 ;; - PCA57) UNAME_MACHINE=alphapca56 ;; - EV6) UNAME_MACHINE=alphaev6 ;; - EV67) UNAME_MACHINE=alphaev67 ;; - EV68*) UNAME_MACHINE=alphaev68 ;; - esac - objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} - exit ;; padre:Linux:*:*) echo sparc-unknown-linux-gnu exit ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in @@ -942,14 +959,17 @@ *) echo hppa-unknown-linux-gnu ;; esac exit ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu @@ -957,6 +977,9 @@ sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; + tile*:Linux:*:*) + echo ${UNAME_MACHINE}-tilera-linux-gnu + exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; @@ -964,60 +987,8 @@ echo x86_64-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; - i*86:Linux:*:*) - # The BFD linker knows what the default object file format is, so - # first see if it will tell us. cd to the root directory to prevent - # problems with other programs or directories called `ld' in the path. - # Set LC_ALL=C to ensure ld outputs messages in English. - ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ - | sed -ne '/supported targets:/!d - s/[ ][ ]*/ /g - s/.*supported targets: *// - s/ .*// - p'` - case "$ld_supported_targets" in - elf32-i386) - TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" - ;; - esac - # Determine whether the default compiler is a.out or elf - eval $set_cc_for_build - sed 's/^ //' << EOF >$dummy.c - #include - #ifdef __ELF__ - # ifdef __GLIBC__ - # if __GLIBC__ >= 2 - LIBC=gnu - # else - LIBC=gnulibc1 - # endif - # else - LIBC=gnulibc1 - # endif - #else - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both @@ -1025,11 +996,11 @@ echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) - # Unixware is an offshoot of SVR4, but it has its own version - # number series starting with 2... - # I am not positive that other SVR4 systems won't match this, + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. - # Use sysv4.2uw... so that sysv4* matches it. + # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) @@ -1061,7 +1032,7 @@ fi exit ;; i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. + # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; @@ -1089,13 +1060,13 @@ exit ;; pc:*:*:*) # Left here for compatibility: - # uname -m prints for DJGPP always 'pc', but it prints nothing about - # the processor, so we play safe by assuming i586. + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp - exit ;; + exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; @@ -1130,8 +1101,8 @@ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ @@ -1174,10 +1145,10 @@ echo ns32k-sni-sysv fi exit ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm @@ -1203,11 +1174,11 @@ exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then - echo mips-nec-sysv${UNAME_RELEASE} + echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-unknown-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi - exit ;; + exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; @@ -1247,6 +1218,16 @@ *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; unknown) UNAME_PROCESSOR=powerpc ;; esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} @@ -1262,6 +1243,9 @@ *:QNX:*:4*) echo i386-pc-qnx exit ;; + NEO-?:NONSTOP_KERNEL:*:*) + echo neo-tandem-nsk${UNAME_RELEASE} + exit ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; @@ -1307,13 +1291,13 @@ echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} + echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` + UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; @@ -1353,11 +1337,11 @@ #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 - "4" + "4" #else - "" + "" #endif - ); exit (0); + ); exit (0); #endif #endif diff -Nru gmp-4.3.2+dfsg/config.in gmp-5.0.2+dfsg/config.in --- gmp-4.3.2+dfsg/config.in 2010-01-09 06:26:20.000000000 +0000 +++ gmp-5.0.2+dfsg/config.in 2011-08-30 01:19:39.000000000 +0000 @@ -3,7 +3,7 @@ /* Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007 Free Software Foundation, Inc. +2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -136,6 +136,7 @@ #undef HAVE_HOST_CPU_FAMILY_power #undef HAVE_HOST_CPU_FAMILY_powerpc #undef HAVE_HOST_CPU_FAMILY_x86 +#undef HAVE_HOST_CPU_FAMILY_x86_64 /* Define one of the following to 1 for the host CPU, as per the output of ./config.guess. If your CPU is not listed here, leave all undefined. */ @@ -164,6 +165,9 @@ /* Define to 1 if the system has the type `intmax_t'. */ #undef HAVE_INTMAX_T +/* Define to 1 if the system has the type `intptr_t'. */ +#undef HAVE_INTPTR_T + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -209,8 +213,12 @@ /* Define to 1 each of the following for which a native (ie. CPU specific) implementation of the corresponding routine exists. */ #undef HAVE_NATIVE_mpn_add_n +#undef HAVE_NATIVE_mpn_add_n_sub_n #undef HAVE_NATIVE_mpn_add_nc +#undef HAVE_NATIVE_mpn_addaddmul_1msb0 #undef HAVE_NATIVE_mpn_addlsh1_n +#undef HAVE_NATIVE_mpn_addlsh2_n +#undef HAVE_NATIVE_mpn_addlsh_n #undef HAVE_NATIVE_mpn_addmul_1c #undef HAVE_NATIVE_mpn_addmul_2 #undef HAVE_NATIVE_mpn_addmul_3 @@ -219,12 +227,12 @@ #undef HAVE_NATIVE_mpn_addmul_6 #undef HAVE_NATIVE_mpn_addmul_7 #undef HAVE_NATIVE_mpn_addmul_8 -#undef HAVE_NATIVE_mpn_addsub_n -#undef HAVE_NATIVE_mpn_addaddmul_1msb0 #undef HAVE_NATIVE_mpn_and_n #undef HAVE_NATIVE_mpn_andn_n #undef HAVE_NATIVE_mpn_bdiv_dbm1c -#undef HAVE_NATIVE_mpn_com_n +#undef HAVE_NATIVE_mpn_bdiv_q_1 +#undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#undef HAVE_NATIVE_mpn_com #undef HAVE_NATIVE_mpn_copyd #undef HAVE_NATIVE_mpn_copyi #undef HAVE_NATIVE_mpn_divexact_1 @@ -233,36 +241,54 @@ #undef HAVE_NATIVE_mpn_divrem_1c #undef HAVE_NATIVE_mpn_divrem_2 #undef HAVE_NATIVE_mpn_gcd_1 +#undef HAVE_NATIVE_mpn_hamdist #undef HAVE_NATIVE_mpn_invert_limb #undef HAVE_NATIVE_mpn_ior_n #undef HAVE_NATIVE_mpn_iorn_n +#undef HAVE_NATIVE_mpn_lshift #undef HAVE_NATIVE_mpn_lshiftc +#undef HAVE_NATIVE_mpn_lshsub_n #undef HAVE_NATIVE_mpn_mod_1 +#undef HAVE_NATIVE_mpn_mod_1_1p #undef HAVE_NATIVE_mpn_mod_1c +#undef HAVE_NATIVE_mpn_mod_1s_2p +#undef HAVE_NATIVE_mpn_mod_1s_4p +#undef HAVE_NATIVE_mpn_mod_34lsub1 #undef HAVE_NATIVE_mpn_modexact_1_odd #undef HAVE_NATIVE_mpn_modexact_1c_odd +#undef HAVE_NATIVE_mpn_mul_1 #undef HAVE_NATIVE_mpn_mul_1c #undef HAVE_NATIVE_mpn_mul_2 #undef HAVE_NATIVE_mpn_mul_3 #undef HAVE_NATIVE_mpn_mul_4 +#undef HAVE_NATIVE_mpn_mul_basecase #undef HAVE_NATIVE_mpn_nand_n #undef HAVE_NATIVE_mpn_nior_n +#undef HAVE_NATIVE_mpn_popcount #undef HAVE_NATIVE_mpn_preinv_divrem_1 #undef HAVE_NATIVE_mpn_preinv_mod_1 #undef HAVE_NATIVE_mpn_redc_1 #undef HAVE_NATIVE_mpn_redc_2 +#undef HAVE_NATIVE_mpn_rsblsh1_n +#undef HAVE_NATIVE_mpn_rsblsh2_n +#undef HAVE_NATIVE_mpn_rsblsh_n #undef HAVE_NATIVE_mpn_rsh1add_n +#undef HAVE_NATIVE_mpn_rsh1add_nc #undef HAVE_NATIVE_mpn_rsh1sub_n +#undef HAVE_NATIVE_mpn_rsh1sub_nc +#undef HAVE_NATIVE_mpn_rshift #undef HAVE_NATIVE_mpn_sqr_basecase #undef HAVE_NATIVE_mpn_sqr_diagonal #undef HAVE_NATIVE_mpn_sub_n #undef HAVE_NATIVE_mpn_sub_nc #undef HAVE_NATIVE_mpn_sublsh1_n +#undef HAVE_NATIVE_mpn_sublsh2_n +#undef HAVE_NATIVE_mpn_sublsh_n #undef HAVE_NATIVE_mpn_submul_1c -#undef HAVE_NATIVE_mpn_umul_ppmm -#undef HAVE_NATIVE_mpn_umul_ppmm_r #undef HAVE_NATIVE_mpn_udiv_qrnnd #undef HAVE_NATIVE_mpn_udiv_qrnnd_r +#undef HAVE_NATIVE_mpn_umul_ppmm +#undef HAVE_NATIVE_mpn_umul_ppmm_r #undef HAVE_NATIVE_mpn_xor_n #undef HAVE_NATIVE_mpn_xnor_n @@ -469,6 +495,9 @@ /* The size of `unsigned short', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_SHORT +/* The size of `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + /* Define to 1 if sscanf requires writable inputs */ #undef SSCANF_WRITABLE_INPUT @@ -478,8 +507,8 @@ /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME -/* Maximum size the tune program can test for SQR_KARATSUBA_THRESHOLD */ -#undef TUNE_SQR_KARATSUBA_MAX +/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ +#undef TUNE_SQR_TOOM2_MAX /* Version number of package */ #undef VERSION @@ -493,6 +522,10 @@ /* Define to 1 to enable FFTs for multiplication, per --enable-fft */ #undef WANT_FFT +/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per + --enable-old-fft-full */ +#undef WANT_OLD_FFT_FULL + /* Define to 1 if --enable-profiling=gprof */ #undef WANT_PROFILING_GPROF diff -Nru gmp-4.3.2+dfsg/config.in~ gmp-5.0.2+dfsg/config.in~ --- gmp-4.3.2+dfsg/config.in~ 2010-01-07 20:09:40.000000000 +0000 +++ gmp-5.0.2+dfsg/config.in~ 2011-05-08 09:49:33.000000000 +0000 @@ -3,7 +3,7 @@ /* Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007 Free Software Foundation, Inc. +2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -21,6 +21,9 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ +/* Define if building universal (internal helper macro) */ +#undef AC_APPLE_UNIVERSAL_BUILD + /* The gmp-mparam.h file (a string) the tune program should suggest updating. */ #undef GMP_MPARAM_H_SUGGEST @@ -133,6 +136,7 @@ #undef HAVE_HOST_CPU_FAMILY_power #undef HAVE_HOST_CPU_FAMILY_powerpc #undef HAVE_HOST_CPU_FAMILY_x86 +#undef HAVE_HOST_CPU_FAMILY_x86_64 /* Define one of the following to 1 for the host CPU, as per the output of ./config.guess. If your CPU is not listed here, leave all undefined. */ @@ -161,6 +165,9 @@ /* Define to 1 if the system has the type `intmax_t'. */ #undef HAVE_INTMAX_T +/* Define to 1 if the system has the type `intptr_t'. */ +#undef HAVE_INTPTR_T + /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H @@ -206,8 +213,12 @@ /* Define to 1 each of the following for which a native (ie. CPU specific) implementation of the corresponding routine exists. */ #undef HAVE_NATIVE_mpn_add_n +#undef HAVE_NATIVE_mpn_add_n_sub_n #undef HAVE_NATIVE_mpn_add_nc +#undef HAVE_NATIVE_mpn_addaddmul_1msb0 #undef HAVE_NATIVE_mpn_addlsh1_n +#undef HAVE_NATIVE_mpn_addlsh2_n +#undef HAVE_NATIVE_mpn_addlsh_n #undef HAVE_NATIVE_mpn_addmul_1c #undef HAVE_NATIVE_mpn_addmul_2 #undef HAVE_NATIVE_mpn_addmul_3 @@ -216,12 +227,12 @@ #undef HAVE_NATIVE_mpn_addmul_6 #undef HAVE_NATIVE_mpn_addmul_7 #undef HAVE_NATIVE_mpn_addmul_8 -#undef HAVE_NATIVE_mpn_addsub_n -#undef HAVE_NATIVE_mpn_addaddmul_1msb0 #undef HAVE_NATIVE_mpn_and_n #undef HAVE_NATIVE_mpn_andn_n #undef HAVE_NATIVE_mpn_bdiv_dbm1c -#undef HAVE_NATIVE_mpn_com_n +#undef HAVE_NATIVE_mpn_bdiv_q_1 +#undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#undef HAVE_NATIVE_mpn_com #undef HAVE_NATIVE_mpn_copyd #undef HAVE_NATIVE_mpn_copyi #undef HAVE_NATIVE_mpn_divexact_1 @@ -230,36 +241,54 @@ #undef HAVE_NATIVE_mpn_divrem_1c #undef HAVE_NATIVE_mpn_divrem_2 #undef HAVE_NATIVE_mpn_gcd_1 +#undef HAVE_NATIVE_mpn_hamdist #undef HAVE_NATIVE_mpn_invert_limb #undef HAVE_NATIVE_mpn_ior_n #undef HAVE_NATIVE_mpn_iorn_n +#undef HAVE_NATIVE_mpn_lshift #undef HAVE_NATIVE_mpn_lshiftc +#undef HAVE_NATIVE_mpn_lshsub_n #undef HAVE_NATIVE_mpn_mod_1 +#undef HAVE_NATIVE_mpn_mod_1_1p #undef HAVE_NATIVE_mpn_mod_1c +#undef HAVE_NATIVE_mpn_mod_1s_2p +#undef HAVE_NATIVE_mpn_mod_1s_4p +#undef HAVE_NATIVE_mpn_mod_34lsub1 #undef HAVE_NATIVE_mpn_modexact_1_odd #undef HAVE_NATIVE_mpn_modexact_1c_odd +#undef HAVE_NATIVE_mpn_mul_1 #undef HAVE_NATIVE_mpn_mul_1c #undef HAVE_NATIVE_mpn_mul_2 #undef HAVE_NATIVE_mpn_mul_3 #undef HAVE_NATIVE_mpn_mul_4 +#undef HAVE_NATIVE_mpn_mul_basecase #undef HAVE_NATIVE_mpn_nand_n #undef HAVE_NATIVE_mpn_nior_n +#undef HAVE_NATIVE_mpn_popcount #undef HAVE_NATIVE_mpn_preinv_divrem_1 #undef HAVE_NATIVE_mpn_preinv_mod_1 #undef HAVE_NATIVE_mpn_redc_1 #undef HAVE_NATIVE_mpn_redc_2 +#undef HAVE_NATIVE_mpn_rsblsh1_n +#undef HAVE_NATIVE_mpn_rsblsh2_n +#undef HAVE_NATIVE_mpn_rsblsh_n #undef HAVE_NATIVE_mpn_rsh1add_n +#undef HAVE_NATIVE_mpn_rsh1add_nc #undef HAVE_NATIVE_mpn_rsh1sub_n +#undef HAVE_NATIVE_mpn_rsh1sub_nc +#undef HAVE_NATIVE_mpn_rshift #undef HAVE_NATIVE_mpn_sqr_basecase #undef HAVE_NATIVE_mpn_sqr_diagonal #undef HAVE_NATIVE_mpn_sub_n #undef HAVE_NATIVE_mpn_sub_nc #undef HAVE_NATIVE_mpn_sublsh1_n +#undef HAVE_NATIVE_mpn_sublsh2_n +#undef HAVE_NATIVE_mpn_sublsh_n #undef HAVE_NATIVE_mpn_submul_1c -#undef HAVE_NATIVE_mpn_umul_ppmm -#undef HAVE_NATIVE_mpn_umul_ppmm_r #undef HAVE_NATIVE_mpn_udiv_qrnnd #undef HAVE_NATIVE_mpn_udiv_qrnnd_r +#undef HAVE_NATIVE_mpn_umul_ppmm +#undef HAVE_NATIVE_mpn_umul_ppmm_r #undef HAVE_NATIVE_mpn_xor_n #undef HAVE_NATIVE_mpn_xnor_n @@ -423,6 +452,10 @@ /* Assembler local label prefix */ #undef LSYM_PREFIX +/* Define to the sub-directory in which libtool stores uninstalled libraries. + */ +#undef LT_OBJDIR + /* Name of package */ #undef PACKAGE @@ -438,6 +471,9 @@ /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME +/* Define to the home page for this package. */ +#undef PACKAGE_URL + /* Define to the version of this package. */ #undef PACKAGE_VERSION @@ -459,6 +495,9 @@ /* The size of `unsigned short', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_SHORT +/* The size of `void *', as computed by sizeof. */ +#undef SIZEOF_VOID_P + /* Define to 1 if sscanf requires writable inputs */ #undef SSCANF_WRITABLE_INPUT @@ -468,8 +507,8 @@ /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME -/* Maximum size the tune program can test for SQR_KARATSUBA_THRESHOLD */ -#undef TUNE_SQR_KARATSUBA_MAX +/* Maximum size the tune program can test for SQR_TOOM2_THRESHOLD */ +#undef TUNE_SQR_TOOM2_MAX /* Version number of package */ #undef VERSION @@ -483,6 +522,10 @@ /* Define to 1 to enable FFTs for multiplication, per --enable-fft */ #undef WANT_FFT +/* Define to 1 to enable old mpn_mul_fft_full for multiplication, per + --enable-old-fft-full */ +#undef WANT_OLD_FFT_FULL + /* Define to 1 if --enable-profiling=gprof */ #undef WANT_PROFILING_GPROF @@ -499,6 +542,18 @@ #undef WANT_TMP_NOTREENTRANT #undef WANT_TMP_DEBUG +/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most + significant byte first (like Motorola and SPARC, unlike Intel). */ +#if defined AC_APPLE_UNIVERSAL_BUILD +# if defined __BIG_ENDIAN__ +# define WORDS_BIGENDIAN 1 +# endif +#else +# ifndef WORDS_BIGENDIAN +# undef WORDS_BIGENDIAN +# endif +#endif + /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER @@ -512,9 +567,19 @@ #undef inline #endif -/* Define to equivalent of C99 restrict keyword, or to nothing if this is not - supported. Do not define if restrict is supported directly. */ +/* Define to the equivalent of the C99 'restrict' keyword, or to + nothing if this is not supported. Do not define if restrict is + supported directly. */ #undef restrict +/* Work around a bug in Sun C++: it does not support _Restrict or + __restrict__, even though the corresponding Sun C compiler ends up with + "#define restrict _Restrict" or "#define restrict __restrict__" in the + previous line. Perhaps some future version of Sun C++ will work with + restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ +#if defined __SUNPRO_CC && !defined __RESTRICT +# define _Restrict +# define __restrict__ +#endif /* Define to empty if the keyword `volatile' does not work. Warning: valid code using `volatile' can become incorrect without. Disable with care. */ diff -Nru gmp-4.3.2+dfsg/config.sub gmp-5.0.2+dfsg/config.sub --- gmp-4.3.2+dfsg/config.sub 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/config.sub 2011-08-30 01:19:39.000000000 +0000 @@ -1,10 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 -# Free Software Foundation, Inc. +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011 Free Software Foundation, Inc. -timestamp='2009-06-11' +timestamp='2011-03-23' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software @@ -32,13 +32,16 @@ # Please send patches to . Submit a context -# diff and a properly formatted ChangeLog entry. +# diff and a properly formatted GNU ChangeLog entry. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. +# You can get the latest version of this script from: +# http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD + # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. @@ -72,8 +75,9 @@ version="\ GNU config.sub ($timestamp) -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free +Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,8 +124,9 @@ # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in - nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \ - uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ + nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ + linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ + knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os @@ -149,12 +154,12 @@ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ - -apple | -axis | -knuth | -cray) + -apple | -axis | -knuth | -cray | -microblaze) os= basic_machine=$1 ;; - -bluegene*) - os=-cnk + -bluegene*) + os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= @@ -170,10 +175,10 @@ os=-chorusos basic_machine=$1 ;; - -chorusrdb) - os=-chorusrdb + -chorusrdb) + os=-chorusrdb basic_machine=$1 - ;; + ;; -hiux*) os=-hiuxwe2 ;; @@ -278,26 +283,39 @@ | moxie \ | mt \ | msp430 \ + | nds32 | nds32le | nds32be \ | nios | nios2 \ | ns16k | ns32k \ + | open8 \ | or32 \ | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ + | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ + | spu \ + | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ + | ubicom32 \ | v850 | v850e \ | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ + | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12) + c54x) + basic_machine=tic54x-unknown + ;; + c55x) + basic_machine=tic55x-unknown + ;; + c6x) + basic_machine=tic6x-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12 | picochip) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none @@ -308,6 +326,18 @@ basic_machine=mt-unknown ;; + strongarm | thumb | xscale) + basic_machine=arm-unknown + ;; + + xscaleeb) + basic_machine=armeb-unknown + ;; + + xscaleel) + basic_machine=armel-unknown + ;; + # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. @@ -328,7 +358,7 @@ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ @@ -340,7 +370,7 @@ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ + | m88110-* | m88k-* | maxq-* | mcore-* | metag-* | microblaze-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ @@ -362,24 +392,28 @@ | mmix-* \ | mt-* \ | msp430-* \ + | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ + | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ - | romp-* | rs6000-* \ + | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \ + | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ + | tahoe-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tile-* | tilegx-* \ | tron-* \ + | ubicom32-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ + | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) @@ -404,7 +438,7 @@ basic_machine=a29k-amd os=-udi ;; - abacus) + abacus) basic_machine=abacus-unknown ;; adobe68k) @@ -474,11 +508,20 @@ basic_machine=powerpc-ibm os=-cnk ;; + c54x-*) + basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c55x-*) + basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + c6x-*) + basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; c90) basic_machine=c90-cray os=-unicos ;; - cegcc) + cegcc) basic_machine=arm-unknown os=-cegcc ;; @@ -510,7 +553,7 @@ basic_machine=craynv-cray os=-unicosmp ;; - cr16) + cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; @@ -726,6 +769,9 @@ basic_machine=ns32k-utek os=-sysv ;; + microblaze) + basic_machine=microblaze-xilinx + ;; mingw32) basic_machine=i386-pc os=-mingw32 @@ -830,6 +876,12 @@ np1) basic_machine=np1-gould ;; + neo-tandem) + basic_machine=neo-tandem + ;; + nse-tandem) + basic_machine=nse-tandem + ;; nsr-tandem) basic_machine=nsr-tandem ;; @@ -912,9 +964,10 @@ ;; power) basic_machine=power-ibm ;; - ppc) basic_machine=powerpc-unknown + ppc | ppcbe) basic_machine=powerpc-unknown ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc-* | ppcbe-*) + basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown @@ -1008,6 +1061,9 @@ basic_machine=i860-stratus os=-sysv4 ;; + strongarm-* | thumb-*) + basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; sun2) basic_machine=m68000-sun ;; @@ -1064,17 +1120,10 @@ basic_machine=t90-cray os=-unicos ;; - tic54x | c54x*) - basic_machine=tic54x-unknown - os=-coff - ;; - tic55x | c55x*) - basic_machine=tic55x-unknown - os=-coff - ;; - tic6x | c6x*) - basic_machine=tic6x-unknown - os=-coff + # This must be matched before tile*. + tilegx*) + basic_machine=tilegx-unknown + os=-linux-gnu ;; tile*) basic_machine=tile-unknown @@ -1147,6 +1196,9 @@ xps | xps100) basic_machine=xps100-honeywell ;; + xscale-* | xscalee[bl]-*) + basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` + ;; ymp) basic_machine=ymp-cray os=-unicos @@ -1244,9 +1296,12 @@ if [ x"$os" != x"" ] then case $os in - # First match some system type aliases - # that might get confused with valid system types. + # First match some system type aliases + # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. + -auroraux) + os=-auroraux + ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; @@ -1268,8 +1323,8 @@ # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -kopensolaris* \ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1282,7 +1337,8 @@ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ - | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ + | -mingw32* | -linux-gnu* | -linux-android* \ + | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ @@ -1290,7 +1346,7 @@ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ - | -skyos* | -haiku* | -rdos* | -toppers* | -drops*) + | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) @@ -1329,7 +1385,7 @@ -opened*) os=-openedition ;; - -os400*) + -os400*) os=-os400 ;; -wince*) @@ -1378,7 +1434,7 @@ -sinix*) os=-sysv4 ;; - -tpf*) + -tpf*) os=-tpf ;; -triton*) @@ -1423,6 +1479,8 @@ -dicos*) os=-dicos ;; + -nacl*) + ;; -none) ;; *) @@ -1445,10 +1503,10 @@ # system, and we'll never get to this point. case $basic_machine in - score-*) + score-*) os=-elf ;; - spu-*) + spu-*) os=-elf ;; *-acorn) @@ -1460,8 +1518,17 @@ arm*-semi) os=-aout ;; - c4x-* | tic4x-*) - os=-coff + c4x-* | tic4x-*) + os=-coff + ;; + tic54x-*) + os=-coff + ;; + tic55x-*) + os=-coff + ;; + tic6x-*) + os=-coff ;; # This must come before the *-dec entry. pdp10-*) @@ -1488,7 +1555,7 @@ m68*-cisco) os=-aout ;; - mep-*) + mep-*) os=-elf ;; mips*-cisco) @@ -1515,7 +1582,7 @@ *-ibm) os=-aix ;; - *-knuth) + *-knuth) os=-mmixware ;; *-wec) diff -Nru gmp-4.3.2+dfsg/configure gmp-5.0.2+dfsg/configure --- gmp-4.3.2+dfsg/configure 2010-01-09 06:26:19.000000000 +0000 +++ gmp-5.0.2+dfsg/configure 2011-08-30 01:19:38.000000000 +0000 @@ -1,14 +1,14 @@ #! /bin/sh # From configure.in Revision. # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for GNU MP 4.3.2. +# Generated by GNU Autoconf 2.68 for GNU MP 5.0.2. # # Report bugs to . # # # # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -# 2007 Free Software Foundation, Inc. +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # # This file is part of the GNU MP Library. # @@ -28,8 +28,8 @@ # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, -# Inc. +# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software +# Foundation, Inc. # # # This configure script is free software; the Free Software Foundation @@ -113,6 +113,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -195,7 +196,15 @@ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 -test \$(( 1 + 1 )) = 2 || exit 1" +test \$(( 1 + 1 )) = 2 || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else @@ -238,11 +247,18 @@ # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. + # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} + case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; + esac + exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"} fi if test x$as_have_required = xno; then : @@ -341,7 +357,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -381,19 +397,19 @@ fi # as_fn_arith -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -550,161 +566,14 @@ # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" - - -# Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} -case X$lt_ECHO in -X*--fallback-echo) - # Remove one level of quotation (which was required for Make). - ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','` - ;; -esac - -ECHO=${lt_ECHO-echo} -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell. - exec $SHELL "$0" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <<_LT_EOF -$* -_LT_EOF - exit 0 -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -if test -z "$lt_ECHO"; then - if test "X${echo_test_string+set}" != Xset; then - # find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if { echo_test_string=`eval $cmd`; } 2>/dev/null && - { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null - then - break - fi - done - fi - - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - : - else - # The Solaris, AIX, and Digital Unix default echo programs unquote - # backslashes. This makes it impossible to quote backslashes using - # echo "$something" | sed 's/\\/\\\\/g' - # - # So, first we look for a working echo in the user's PATH. - - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for dir in $PATH /usr/ucb; do - IFS="$lt_save_ifs" - if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && - test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && - echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$dir/echo" - break - fi - done - IFS="$lt_save_ifs" - - if test "X$ECHO" = Xecho; then - # We didn't find a better echo, so look for alternatives. - if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # This shell has a builtin print -r that does the trick. - ECHO='print -r' - elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } && - test "X$CONFIG_SHELL" != X/bin/ksh; then - # If we have ksh, try running configure again with it. - ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} - export ORIGINAL_CONFIG_SHELL - CONFIG_SHELL=/bin/ksh - export CONFIG_SHELL - exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} - else - # Try using printf. - ECHO='printf %s\n' - if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' && - echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - # Cool, printf works - : - elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL - export CONFIG_SHELL - SHELL="$CONFIG_SHELL" - export SHELL - ECHO="$CONFIG_SHELL $0 --fallback-echo" - elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && - test "X$echo_testing_string" = 'X\t' && - echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && - test "X$echo_testing_string" = "X$echo_test_string"; then - ECHO="$CONFIG_SHELL $0 --fallback-echo" - else - # maybe with a smaller string... - prev=: - - for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do - if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null - then - break - fi - prev="$cmd" - done - - if test "$prev" != 'sed 50q "$0"'; then - echo_test_string=`eval $prev` - export echo_test_string - exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} - else - # Oops. We lost completely, so just stick with echo. - ECHO=echo - fi - fi - fi - fi - fi -fi - -# Copy echo and quote the copy suitably for passing to libtool from -# the Makefile, instead of quoting the original, which is used later. -lt_ECHO=$ECHO -if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then - lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" -fi - - - test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. -# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` @@ -723,8 +592,8 @@ # Identity of this package. PACKAGE_NAME='GNU MP' PACKAGE_TARNAME='gmp' -PACKAGE_VERSION='4.3.2' -PACKAGE_STRING='GNU MP 4.3.2' +PACKAGE_VERSION='5.0.2' +PACKAGE_STRING='GNU MP 5.0.2' PACKAGE_BUGREPORT='gmp-bugs@gmplib.org' PACKAGE_URL='http://www.gnu.org/software/gmp/' @@ -791,22 +660,20 @@ mpn_objs_in_libgmp mpn_objects mpn_objs_in_libmp -BITS_PER_MP_LIMB +GMP_LIMB_BITS M4 TAL_OBJECT LIBM ENABLE_STATIC_FALSE ENABLE_STATIC_TRUE -ac_ct_F77 -FFLAGS -F77 OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL -lt_ECHO +MANIFEST_TOOL RANLIB +ac_ct_AR LN_S LD FGREP @@ -937,6 +804,7 @@ enable_alloca enable_cxx enable_fft +enable_old_fft_full enable_mpbsd enable_nails enable_profiling @@ -948,6 +816,7 @@ with_pic enable_fast_install with_gnu_ld +with_sysroot enable_libtool_lock ' ac_precious_vars='build_alias @@ -966,8 +835,6 @@ CXXFLAGS CCC CXXCPP -F77 -FFLAGS M4 YACC YFLAGS' @@ -1033,8 +900,9 @@ fi case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; + *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; + *=) ac_optarg= ;; + *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. @@ -1079,7 +947,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1105,7 +973,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid feature name: $ac_useropt" + as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1309,7 +1177,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1325,7 +1193,7 @@ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && - as_fn_error "invalid package name: $ac_useropt" + as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in @@ -1355,8 +1223,8 @@ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; - -*) as_fn_error "unrecognized option: \`$ac_option' -Try \`$0 --help' for more information." + -*) as_fn_error $? "unrecognized option: \`$ac_option' +Try \`$0 --help' for more information" ;; *=*) @@ -1364,7 +1232,7 @@ # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) - as_fn_error "invalid variable name: \`$ac_envvar'" ;; + as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; @@ -1374,7 +1242,7 @@ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 - : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac @@ -1382,13 +1250,13 @@ if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` - as_fn_error "missing argument to $ac_option" + as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; - fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;; + fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi @@ -1411,7 +1279,7 @@ [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac - as_fn_error "expected an absolute directory name for --$ac_var: $ac_val" + as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' @@ -1425,8 +1293,8 @@ if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe - $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. - If a cross compiler is detected then cross compile mode will be used." >&2 + $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used" >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi @@ -1441,9 +1309,9 @@ ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - as_fn_error "working directory cannot be determined" + as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - as_fn_error "pwd does not report name of working directory" + as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. @@ -1482,11 +1350,11 @@ fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - as_fn_error "cannot find sources ($ac_unique_file) in $srcdir" + as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg" + cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then @@ -1512,7 +1380,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures GNU MP 4.3.2 to adapt to many kinds of systems. +\`configure' configures GNU MP 5.0.2 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1526,7 +1394,7 @@ --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit - -q, --quiet, --silent do not print \`checking...' messages + -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files @@ -1582,7 +1450,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of GNU MP 4.3.2:";; + short | recursive ) echo "Configuration of GNU MP 5.0.2:";; esac cat <<\_ACEOF @@ -1596,6 +1464,8 @@ --enable-alloca how to get temp memory [[default=reentrant]] --enable-cxx enable C++ support [[default=no]] --enable-fft enable FFTs for multiplication [[default=yes]] + --enable-old-fft-full enable old mpn_mul_fft_full for multiplication + [[default=no]] --enable-mpbsd build Berkeley MP compatibility library [[default=no]] --enable-nails use nails on limbs [[default=no]] @@ -1617,6 +1487,8 @@ --with-pic try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-sysroot=DIR Search for dependent libraries within DIR + (or the compiler's sysroot if not specified). Some influential environment variables: ABI desired ABI (for processors supporting more than one ABI) @@ -1635,11 +1507,10 @@ CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor - F77 Fortran 77 compiler command - FFLAGS Fortran 77 compiler flags M4 m4 macro processor - YACC The `Yet Another C Compiler' implementation to use. Defaults to - the first program found out of: `bison -y', `byacc', `yacc'. + YACC The `Yet Another Compiler Compiler' implementation to use. + Defaults to the first program found out of: `bison -y', `byacc', + `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. @@ -1712,17 +1583,17 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -GNU MP configure 4.3.2 -generated by GNU Autoconf 2.65 +GNU MP configure 5.0.2 +generated by GNU Autoconf 2.68 -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007 Free Software Foundation, Inc. +2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -1780,7 +1651,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile @@ -1806,7 +1677,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : @@ -1817,7 +1688,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp @@ -1855,7 +1726,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile @@ -1881,7 +1752,7 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } >/dev/null && { + test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : @@ -1892,7 +1763,7 @@ ac_retval=1 fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp @@ -1934,7 +1805,7 @@ ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run @@ -1947,10 +1818,10 @@ ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -1986,7 +1857,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2009,17 +1880,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ---------------------------------- ## +( $as_echo "## ---------------------------------- ## ## Report this to gmp-bugs@gmplib.org ## -## ---------------------------------- ## -_ASBOX +## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2028,7 +1897,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel @@ -2041,7 +1910,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2059,7 +1928,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile @@ -2104,7 +1973,7 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link @@ -2117,7 +1986,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2172,7 +2041,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func @@ -2217,49 +2086,11 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link -# ac_fn_f77_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_f77_try_compile () -{ - as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - grep -v '^ *+' conftest.err >conftest.er1 - cat conftest.er1 >&5 - mv -f conftest.er1 conftest.err - fi - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then : - ac_retval=0 -else - $as_echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_retval=1 -fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} - as_fn_set_status $ac_retval - -} # ac_fn_f77_try_compile - # ac_fn_f77_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. @@ -2301,20 +2132,23 @@ # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_f77_try_link -# ac_fn_c_check_decl LINENO SYMBOL VAR -# ------------------------------------ -# Tests whether SYMBOL is declared, setting cache variable VAR accordingly. +# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES +# --------------------------------------------- +# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR +# accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $2 is declared" >&5 -$as_echo_n "checking whether $2 is declared... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + as_decl_name=`echo $2|sed 's/ *(.*//'` + as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 +$as_echo_n "checking whether $as_decl_name is declared... " >&6; } +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2323,8 +2157,12 @@ int main () { -#ifndef $2 - (void) $2; +#ifndef $as_decl_name +#ifdef __cplusplus + (void) $as_decl_use; +#else + (void) $as_decl_name; +#endif #endif ; @@ -2341,7 +2179,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl @@ -2354,7 +2192,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2395,7 +2233,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type @@ -2408,7 +2246,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } -if { as_var=$4; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -2452,7 +2290,7 @@ eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_member @@ -2464,10 +2302,10 @@ ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : + if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 @@ -2503,7 +2341,7 @@ else ac_header_preproc=no fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } @@ -2526,17 +2364,15 @@ $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} -( cat <<\_ASBOX -## ---------------------------------- ## +( $as_echo "## ---------------------------------- ## ## Report this to gmp-bugs@gmplib.org ## -## ---------------------------------- ## -_ASBOX +## ---------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" @@ -2545,7 +2381,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel @@ -2558,7 +2394,7 @@ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } -if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" @@ -2599,7 +2435,7 @@ eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_type @@ -2776,7 +2612,7 @@ rm -f conftest.val fi - eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} + eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_compute_int @@ -2784,8 +2620,8 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by GNU MP $as_me 4.3.2, which was -generated by GNU Autoconf 2.65. Invocation command line was +It was created by GNU MP $as_me 5.0.2, which was +generated by GNU Autoconf 2.68. Invocation command line was $ $0 $@ @@ -2895,11 +2731,9 @@ { echo - cat <<\_ASBOX -## ---------------- ## + $as_echo "## ---------------- ## ## Cache variables. ## -## ---------------- ## -_ASBOX +## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( @@ -2933,11 +2767,9 @@ ) echo - cat <<\_ASBOX -## ----------------- ## + $as_echo "## ----------------- ## ## Output variables. ## -## ----------------- ## -_ASBOX +## ----------------- ##" echo for ac_var in $ac_subst_vars do @@ -2950,11 +2782,9 @@ echo if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## + $as_echo "## ------------------- ## ## File substitutions. ## -## ------------------- ## -_ASBOX +## ------------------- ##" echo for ac_var in $ac_subst_files do @@ -2968,11 +2798,9 @@ fi if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## + $as_echo "## ----------- ## ## confdefs.h. ## -## ----------- ## -_ASBOX +## ----------- ##" echo cat confdefs.h echo @@ -3027,7 +2855,12 @@ ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then - ac_site_file1=$CONFIG_SITE + # We do not want a PATH search for config.site. + case $CONFIG_SITE in #(( + -*) ac_site_file1=./$CONFIG_SITE;; + */*) ac_site_file1=$CONFIG_SITE;; + *) ac_site_file1=./$CONFIG_SITE;; + esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site @@ -3042,7 +2875,11 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 - . "$ac_site_file" + . "$ac_site_file" \ + || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "failed to load site script $ac_site_file +See \`config.log' for more details" "$LINENO" 5; } fi done @@ -3118,7 +2955,7 @@ $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} - as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 + as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## @@ -3145,7 +2982,7 @@ # "athlon-pc-freebsd3.5". # if test -n "$target_alias" && test "$target_alias" != "$host_alias"; then - as_fn_error "--target is not appropriate for GMP + as_fn_error $? "--target is not appropriate for GMP Use --build=CPU-VENDOR-OS if you need to specify your CPU and/or system explicitly. Use --host if cross-compiling (see \"Installing GMP\" in the manual for more on this)." "$LINENO" 5 @@ -3172,16 +3009,22 @@ ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do - for ac_t in install-sh install.sh shtool; do - if test -f "$ac_dir/$ac_t"; then - ac_aux_dir=$ac_dir - ac_install_sh="$ac_aux_dir/$ac_t -c" - break 2 - fi - done + if test -f "$ac_dir/install-sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f "$ac_dir/install.sh"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f "$ac_dir/shtool"; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi done if test -z "$ac_aux_dir"; then - as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 + as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, @@ -3195,27 +3038,27 @@ # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 + as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } -if test "${ac_cv_build+set}" = set; then : +if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && - as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5 + as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; -*) as_fn_error "invalid value of canonical build" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' @@ -3233,14 +3076,14 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } -if test "${ac_cv_host+set}" = set; then : +if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - as_fn_error "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 + as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi @@ -3248,7 +3091,7 @@ $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; -*) as_fn_error "invalid value of canonical host" "$LINENO" 5;; +*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' @@ -3284,7 +3127,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then -if test "${ac_cv_path_install+set}" = set; then : +if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3371,11 +3214,11 @@ ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) - as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; + as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) - as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; + as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's @@ -3397,7 +3240,7 @@ # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". - as_fn_error "ls -t appears to fail. Make sure there is not a broken + as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi @@ -3407,7 +3250,7 @@ # Ok. : else - as_fn_error "newly created file is older than distributed files! + as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 @@ -3461,7 +3304,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -3501,7 +3344,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -3554,7 +3397,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then : + if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -3605,7 +3448,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AWK+set}" = set; then : +if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then @@ -3645,7 +3488,7 @@ $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : +if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF @@ -3653,7 +3496,7 @@ all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; @@ -3687,7 +3530,7 @@ am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then - as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 + as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi @@ -3703,7 +3546,7 @@ # Define the identity of the package. PACKAGE='gmp' - VERSION='4.3.2' + VERSION='5.0.2' cat >>confdefs.h <<_ACEOF @@ -3774,7 +3617,7 @@ if test "${enable_assert+set}" = set; then : enableval=$enable_assert; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-assert, need yes or no" "$LINENO" 5 ;; esac else enable_assert=no @@ -3801,7 +3644,7 @@ yes|no|reentrant|notreentrant) ;; debug) ;; *) - as_fn_error "bad value $enableval for --enable-alloca, need one of: + as_fn_error $? "bad value $enableval for --enable-alloca, need one of: yes no reentrant notreentrant alloca malloc-reentrant malloc-notreentrant debug" "$LINENO" 5 ;; esac else @@ -3826,7 +3669,7 @@ if test "${enable_cxx+set}" = set; then : enableval=$enable_cxx; case $enableval in yes|no|detect) ;; -*) as_fn_error "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-cxx, need yes/no/detect" "$LINENO" 5 ;; esac else enable_cxx=no @@ -3838,7 +3681,7 @@ if test "${enable_fft+set}" = set; then : enableval=$enable_fft; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-fft, need yes or no" "$LINENO" 5 ;; esac else enable_fft=yes @@ -3852,11 +3695,29 @@ fi +# Check whether --enable-old-fft-full was given. +if test "${enable_old_fft_full+set}" = set; then : + enableval=$enable_old_fft_full; case $enableval in +yes|no) ;; +*) as_fn_error $? "bad value $enableval for --enable-old-fft-full, need yes or no" "$LINENO" 5 ;; +esac +else + enable_old_fft_full=no +fi + + +if test "$enable_old_fft_full" = "yes"; then + +$as_echo "#define WANT_OLD_FFT_FULL 1" >>confdefs.h + +fi + + # Check whether --enable-mpbsd was given. if test "${enable_mpbsd+set}" = set; then : enableval=$enable_mpbsd; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-mpbsd, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-mpbsd, need yes or no" "$LINENO" 5 ;; esac else enable_mpbsd=no @@ -3877,9 +3738,9 @@ enableval=$enable_nails; case $enableval in yes|no|[02468]|[0-9][02468]) ;; *[13579]) - as_fn_error "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-nails, only even nail sizes supported" "$LINENO" 5 ;; *) - as_fn_error "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;; + as_fn_error $? "bad value $enableval for --enable-nails, need yes/no/number" "$LINENO" 5 ;; esac else enable_nails=no @@ -3898,7 +3759,7 @@ if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; case $enableval in no|prof|gprof|instrument) ;; -*) as_fn_error "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-profiling, need no/prof/gprof/instrument" "$LINENO" 5 ;; esac else enable_profiling=no @@ -3940,7 +3801,7 @@ if test "${with_readline+set}" = set; then : withval=$with_readline; case $withval in yes|no|detect) ;; -*) as_fn_error "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $withval for --with-readline, need yes/no/detect" "$LINENO" 5 ;; esac else with_readline=detect @@ -3952,7 +3813,7 @@ if test "${enable_fat+set}" = set; then : enableval=$enable_fat; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-fat, need yes or no" "$LINENO" 5 ;; esac else enable_fat=no @@ -3964,7 +3825,7 @@ if test "${enable_minithres+set}" = set; then : enableval=$enable_minithres; case $enableval in yes|no) ;; -*) as_fn_error "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;; +*) as_fn_error $? "bad value $enableval for --enable-minithres, need yes or no" "$LINENO" 5 ;; esac else enable_minithres=no @@ -4119,11 +3980,14 @@ $as_echo "#define HAVE_HOST_CPU_FAMILY_alpha 1" >>confdefs.h case $host_cpu in - alphaev5* | alphapca5*) path="alpha/ev5 alpha" ;; + alphaev5* | alphapca5*) + path="alpha/ev5 alpha" ;; alphaev67 | alphaev68 | alphaev7*) - path="alpha/ev67 alpha/ev6 alpha/ev5 alpha" ;; - alphaev6* | alphaev7*) path="alpha/ev6 alpha/ev5 alpha" ;; - *) path="alpha" ;; + path="alpha/ev67 alpha/ev6 alpha" ;; + alphaev6) + path="alpha/ev6 alpha" ;; + *) + path="alpha" ;; esac extra_functions="cntlz" gcc_cflags_optlist="asm cpu oldas" # need asm ahead of cpu, see below @@ -4291,7 +4155,6 @@ # checking sizeof(long), either 4 or 8 bytes respectively. Do this in # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc. # - gcc_cflags="-O2" gcc_cflags_optlist="arch" gcc_testlist="sizeof-long-4" SPEED_CYCLECOUNTER_OBJ=hppa.lo @@ -4362,6 +4225,7 @@ # systems (GNU/Linux for instance), but lets assume they're ok. case $host in *-*-hpux[1-9] | *-*-hpux[1-9].* | *-*-hpux10 | *-*-hpux10.*) ;; + *-*-linux*) abilist="1.0" ;; # due to linux permanent kernel bug *) abilist="2.0w $abilist" ;; esac @@ -4582,6 +4446,7 @@ gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin gcc_cflags_asm="" gcc_cflags_cpu="" + vmx_path="" # grab this object, though it's not a true cycle counter routine SPEED_CYCLECOUNTER_OBJ=powerpc.lo @@ -4623,7 +4488,8 @@ powerpc604) gcc_cflags_cpu="-mcpu=604" ;; powerpc604e) gcc_cflags_cpu="-mcpu=604e -mcpu=604" ;; powerpc620) gcc_cflags_cpu="-mcpu=620" ;; - powerpc630) gcc_cflags_cpu="-mcpu=630" ;; + powerpc630) gcc_cflags_cpu="-mcpu=630" + cpu_path="p3" ;; powerpc740) gcc_cflags_cpu="-mcpu=740" ;; powerpc7400 | powerpc7410) gcc_cflags_asm="-Wa,-maltivec" @@ -4636,7 +4502,15 @@ powerpc821) gcc_cflags_cpu="-mcpu=821" ;; powerpc823) gcc_cflags_cpu="-mcpu=823" ;; powerpc860) gcc_cflags_cpu="-mcpu=860" ;; - powerpc970) gcc_cflags_cpu="-mcpu=970" ;; + powerpc970) gcc_cflags_cpu="-mtune=970" + vmx_path="powerpc64/vmx" + cpu_path="p4" ;; + power4) gcc_cflags_cpu="-mtune=power4" + cpu_path="p4" ;; + power5) gcc_cflags_cpu="-mtune=power5 -mtune=power4" + cpu_path="p5 p4" ;; + power6) gcc_cflags_cpu="-mtune=power6" + cpu_path="p6" ;; esac case $host in @@ -4664,11 +4538,21 @@ esac case $host in + *-*-aix*) + cclist="gcc xlc cc" + gcc_32_cflags_maybe="-maix32" + xlc_cflags="-O2 -qmaxmem=20000" + xlc_cflags_optlist="arch" + xlc_32_cflags_maybe="-q32" + cc_cflags="-O2 -qmaxmem=20000" + cc_cflags_optlist="arch" + cc_32_cflags_maybe="-q32" + ar_32_flags="-X32" + nm_32_flags="-X32" + esac + + case $host in powerpc64-*-* | powerpc64le-*-* | powerpc620-*-* | powerpc630-*-* | powerpc970-*-* | power[3-9]-*-*) - case $host_cpu in - powerpc970) vmx_path="powerpc64/vmx" ;; - *) vmx_path="" ;; - esac case $host in *-*-aix*) # On AIX a true 64-bit ABI is available. @@ -4683,7 +4567,9 @@ # Must indicate object type to ar and nm ar_aix64_flags="-X64" nm_aix64_flags="-X64" - path_aix64="powerpc64/mode64 $vmx_path powerpc64" + path_aix64="" + for i in $cpu_path; do path_aix64="${path_aix64}powerpc64/mode64/$i "; done + path_aix64="${path_aix64}powerpc64/mode64 $vmx_path powerpc64" # grab this object, though it's not a true cycle counter routine SPEED_CYCLECOUNTER_OBJ_aix64=powerpc64.lo cyclecounter_size_aix64=0 @@ -4698,7 +4584,7 @@ # longlong.h macros expect limb operands in a single 64-bit # register, not two 32-bit registers as would be given for a # long long without -mpowerpc64. In theory we could detect and - # accomodate both styles, but the proper 64-bit registers will + # accommodate both styles, but the proper 64-bit registers will # be fastest and are what we really want to use. # # One would think -mpowerpc64 would set the assembler in the right @@ -4721,7 +4607,9 @@ gcc_mode64_cflags="-m64" gcc_mode64_cflags_optlist="cpu opt" gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="powerpc64/mode64 $vmx_path powerpc64" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo cyclecounter_size_mode64=0 any_mode64_testlist="sizeof-long-8" @@ -4752,7 +4640,9 @@ gcc_mode64_cflags_maybe="-m64" gcc_mode64_cflags_optlist="cpu opt" gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="powerpc64/mode64 $vmx_path powerpc64" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo cyclecounter_size_mode64=0 any_mode64_testlist="sizeof-long-8" @@ -4798,8 +4688,13 @@ ;; - # IBM s/370 and similar - s3[6-9]0*-*-*) + # IBM S/390 64 bit + s390x-*-*) + gcc_cflags="-g -O2 $fomit_frame_pointer" + path="s390x" + ;; + # IBM S/390 32 bit + s390-*-*) gcc_cflags="$gcc_cflags $fomit_frame_pointer" path="s390" extra_functions="udiv_w_sdiv" @@ -4945,7 +4840,15 @@ *) abilist="64 32" ;; esac - path_64="sparc64" + case $host_cpu in + ultrasparc | ultrasparc2 | ultrasparc2i) + path_64="sparc64/ultrasparc12 sparc64" ;; + ultrasparc3) + path_64="sparc64/ultrasparc34 sparc64/ultrasparc12 sparc64" ;; + *) + path_64="sparc64" + esac + cclist_64="gcc" any_64_testlist="sizeof-long-8" @@ -5015,7 +4918,7 @@ # mode, in case -m32 has failed not because it's an old gcc, but because # it's a dual 32/64-bit gcc without a 32-bit libc, or whatever. # - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) abilist="32" cclist="gcc icc cc" gcc_cflags="$gcc_cflags $fomit_frame_pointer" @@ -5123,6 +5026,7 @@ # gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486" gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium" + gcc_64_cflags_cpu="-mtune=nocona" ;; viac32) # Not sure of the best fallbacks here for -mcpu. @@ -5139,10 +5043,14 @@ gcc_cflags_cpu="-mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" gcc_cflags_arch="-march=k8 -march=k8~-mno-sse2 -march=athlon -march=pentiumpro -march=pentium" ;; - core2) + core2 | corei) gcc_cflags_cpu="-mtune=core2 -mtune=k8" gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" ;; + atom) + gcc_cflags_cpu="-mtune=atom -mtune=pentium3" + gcc_cflags_arch="-march=atom -march=pentium3" + ;; *) gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" gcc_cflags_arch="-march=i486" @@ -5157,7 +5065,8 @@ i686 | pentiumpro) path="x86/p6 x86" ;; pentium2) path="x86/p6/mmx x86/p6 x86" ;; pentium3) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; - pentiumm | core2) path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; + pentiumm | core2 | corei) + path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; k6[23]) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; k6) path="x86/k6/mmx x86/k6 x86" ;; geode) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; @@ -5168,64 +5077,55 @@ # VIA/Centaur processors, sold as CyrixIII and C3. viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; viac3*) path="x86/pentium/mmx x86/pentium x86";; + atom) path="x86/atom x86" ;; *) path="x86" ;; esac - # If the user asked for a fat build, override the path and flags set above - if test $enable_fat = yes; then - gcc_cflags_cpu="" - gcc_cflags_arch="" - extra_functions="$extra_functions fat fat_entry" - path="x86/fat x86" - fat_path="x86 x86/fat x86/i486 - x86/k6 x86/k6/mmx x86/k6/k62mmx - x86/k7 x86/k7/mmx - x86/pentium x86/pentium/mmx - x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 - x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2" - fat_functions="add_n addmul_1 copyd copyi - dive_1 diveby3 divrem_1 gcd_1 lshift - mod_1 mod_34lsub1 mode1o mul_1 mul_basecase - pre_divrem_1 pre_mod_1 rshift - sqr_basecase sub_n submul_1" - fat_thresholds="MUL_KARATSUBA_THRESHOLD MUL_TOOM3_THRESHOLD - SQR_KARATSUBA_THRESHOLD SQR_TOOM3_THRESHOLD" - fi - - case $host_cpu in - athlon64 | atom | core2 | pentium4 | x86_64) - cclist_64="gcc" - gcc_64_cflags="$gcc_64_cflags -m64" - gcc_64_cflags_optlist="cpu" - CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' - SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo - cyclecounter_size_64=2 - - case $host in - *-*-solaris*) - # Sun cc. - cclist_64="$cclist_64 cc" - cc_64_cflags="-xO3 -m64" - ;; - esac + case $host in + athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) + cclist_64="gcc" + gcc_64_cflags="$gcc_64_cflags -m64" + gcc_64_cflags_optlist="cpu arch" + CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' + SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo + cyclecounter_size_64=2 + abilist="64 32" + path_64="x86_64" case $host_cpu in - athlon64 | x86_64) - abilist="64 32" - path_64="x86_64" + x86_64) + ;; + athlon64) + path_64="x86_64/k8 $path_64" ;; pentium4) - abilist="64 32" - path_64="x86_64/pentium4 x86_64" + path_64="x86_64/pentium4 $path_64" ;; core2) - abilist="64 32" - path_64="x86_64/core2 x86_64" + path_64="x86_64/core2 $path_64" + ;; + corei) + path_64="x86_64/corei x86_64/core2 $path_64" ;; atom) - # The AMD K8/K9/K10 code seems best for Intel Atom - abilist="64 32" - path_64="x86_64/atom x86_64" + path_64="x86_64/atom $path_64" + ;; + nano) + path_64="x86_64/nano $path_64" + ;; + esac + + case $host in + *-*-solaris*) + # Sun cc. + cclist_64="$cclist_64 cc" + cc_64_cflags="-xO3 -m64" + ;; + *-*-mingw*) + limb_64=longlong + path_64="" # Windows amd64 calling conventions are *different* + # Silence many pedantic warnings for w64. FIXME. + gcc_64_cflags="$gcc_64_cflags -std=gnu99" ;; esac ;; @@ -5309,7 +5209,7 @@ if test $abi = "$ABI"; then found=yes; break; fi done if test $found = no; then - as_fn_error "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5 + as_fn_error $? "ABI=$ABI is not among the following valid choices: $abilist" "$LINENO" 5 fi abilist="$ABI" fi @@ -5461,10 +5361,10 @@ cflags="$cflags_maybe $cflags" fi - # Any user CFLAGS, even an empty string, takes precendence + # Any user CFLAGS, even an empty string, takes precedence if test "$test_CFLAGS" = set; then cflags=$CFLAGS; fi - # Any user CPPFLAGS, even an empty string, takes precendence + # Any user CPPFLAGS, even an empty string, takes precedence eval cppflags=\"\$${ccbase}${abi1}_cppflags\" test -n "$cppflags" || eval cppflags=\"\$${ccbase}${abi2}_cppflags\" if test "$test_CPPFLAGS" = set; then cppflags=$CPPFLAGS; fi @@ -6407,7 +6307,7 @@ # if test "$gmp_prog_cc_works" = yes; then case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) # this problem only arises in PIC code, so don't need to test when # --disable-shared. We don't necessarily have $enable_shared set to # yes at this point, it will still be unset for the default (which is @@ -6756,9 +6656,45 @@ # C on MS-DOS systems). # if test $found_compiler = no && test -n "$path"; then - as_fn_error "could not find a working compiler, see config.log for details" "$LINENO" 5 + as_fn_error $? "could not find a working compiler, see config.log for details" "$LINENO" 5 fi +case $host in + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) + # If the user asked for a fat build, override the path and flags set above + if test $enable_fat = yes; then + gcc_cflags_cpu="" + gcc_cflags_arch="" + + if test "$abi" = 32; then + extra_functions="$extra_functions fat fat_entry" + path="x86/fat x86" + fat_path="x86 x86/fat x86/i486 + x86/k6 x86/k6/mmx x86/k6/k62mmx + x86/k7 x86/k7/mmx + x86/pentium x86/pentium/mmx + x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 + x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2" + fi + + if test "$abi" = 64; then + gcc_64_cflags="" + extra_functions_64="$extra_functions_64 fat fat_entry" + path_64="x86_64/fat x86_64" + fat_path="x86_64 x86_64/fat x86_64/pentium4 x86_64/core2 x86_64/corei x86_64/atom x86_64/nano" + fi + + fat_functions="add_n addmul_1 copyd copyi + dive_1 diveby3 divrem_1 gcd_1 lshift + mod_1 mod_34lsub1 mode1o mul_1 mul_basecase + pre_divrem_1 pre_mod_1 rshift + sqr_basecase sub_n submul_1" + fat_thresholds="MUL_TOOM22_THRESHOLD MUL_TOOM33_THRESHOLD + SQR_TOOM2_THRESHOLD SQR_TOOM3_THRESHOLD" + fi + ;; +esac + if test $found_compiler = yes; then @@ -6809,7 +6745,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the operating system supports XMM registers" >&5 $as_echo_n "checking whether the operating system supports XMM registers... " >&6; } -if test "${gmp_cv_os_x86_xmm+set}" = set; then : +if ${gmp_cv_os_x86_xmm+:} false; then : $as_echo_n "(cached) " >&6 else if test "$build" = "$host"; then @@ -7914,7 +7850,7 @@ # if test "$gmp_prog_cc_works" = yes; then case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-*) # this problem only arises in PIC code, so don't need to test when # --disable-shared. We don't necessarily have $enable_shared set to # yes at this point, it will still be unset for the default (which is @@ -8136,7 +8072,7 @@ set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8176,7 +8112,7 @@ set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -8229,7 +8165,7 @@ set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8269,7 +8205,7 @@ set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8328,7 +8264,7 @@ set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CC+set}" = set; then : +if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then @@ -8372,7 +8308,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CC+set}" = set; then : +if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then @@ -8426,8 +8362,8 @@ test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "no acceptable C compiler found in \$PATH -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "no acceptable C compiler found in \$PATH +See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 @@ -8541,9 +8477,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "C compiler cannot create executables -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "C compiler cannot create executables +See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -8585,8 +8520,8 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of executables: cannot compile and link -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 @@ -8643,9 +8578,9 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot run C compiled programs. +as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. -See \`config.log' for more details." "$LINENO" 5; } +See \`config.log' for more details" "$LINENO" 5; } fi fi fi @@ -8656,7 +8591,7 @@ ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } -if test "${ac_cv_objext+set}" = set; then : +if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8696,8 +8631,8 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "cannot compute suffix of object files: cannot compile -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "cannot compute suffix of object files: cannot compile +See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi @@ -8707,7 +8642,7 @@ ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if test "${ac_cv_c_compiler_gnu+set}" = set; then : +if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -8744,7 +8679,7 @@ ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } -if test "${ac_cv_prog_cc_g+set}" = set; then : +if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag @@ -8822,7 +8757,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -8923,7 +8858,7 @@ *) : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; } -if test "${ac_cv_prog_cc_c99+set}" = set; then : +if ${ac_cv_prog_cc_c99+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c99=no @@ -9098,7 +9033,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then : +if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no @@ -9194,7 +9129,7 @@ esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } - if test "${ac_cv_prog_cc_stdc+set}" = set; then : + if ${ac_cv_prog_cc_stdc+:} false; then : $as_echo_n "(cached) " >&6 fi @@ -9222,7 +9157,7 @@ CPP= fi if test -z "$CPP"; then - if test "${ac_cv_prog_CPP+set}" = set; then : + if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded @@ -9252,7 +9187,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -9268,11 +9203,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -9311,7 +9246,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -9327,18 +9262,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C preprocessor \"$CPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -9357,7 +9292,6 @@ /* end confdefs.h. */ #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -9417,7 +9351,7 @@ if test "$cc_for_build_works" = yes; then : else - as_fn_error "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Specified CC_FOR_BUILD doesn't seem to work" "$LINENO" 5 fi elif test -n "$HOST_CC"; then @@ -9449,7 +9383,7 @@ if test "$cc_for_build_works" = yes; then CC_FOR_BUILD=$HOST_CC else - as_fn_error "Specified HOST_CC doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Specified HOST_CC doesn't seem to work" "$LINENO" 5 fi else @@ -9488,7 +9422,7 @@ done if test -z "$CC_FOR_BUILD"; then - as_fn_error "Cannot find a build system compiler" "$LINENO" 5 + as_fn_error $? "Cannot find a build system compiler" "$LINENO" 5 fi fi @@ -9499,7 +9433,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build system preprocessor" >&5 $as_echo_n "checking for build system preprocessor... " >&6; } if test -z "$CPP_FOR_BUILD"; then - if test "${gmp_cv_prog_cpp_for_build+set}" = set; then : + if ${gmp_cv_prog_cpp_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for build system executable suffix... " >&6; } -if test "${gmp_cv_prog_exeext_for_build+set}" = set; then : +if ${gmp_cv_prog_exeext_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking whether build system compiler is ANSI... " >&6; } -if test "${gmp_cv_c_for_build_ansi+set}" = set; then : +if ${gmp_cv_c_for_build_ansi+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for build system compiler math library... " >&6; } -if test "${gmp_cv_check_libm_for_build+set}" = set; then : +if ${gmp_cv_check_libm_for_build+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then @@ -9718,7 +9652,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then @@ -9796,7 +9730,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -9833,7 +9767,7 @@ ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag @@ -10087,7 +10021,7 @@ # If --enable-cxx=yes but a C++ compiler can't be found, then abort. if test $want_cxx = no && test $enable_cxx = yes; then - as_fn_error "C++ compiler not available, see config.log for details" "$LINENO" 5 + as_fn_error $? "C++ compiler not available, see config.log for details" "$LINENO" 5 fi fi @@ -10114,7 +10048,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : + if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded @@ -10144,7 +10078,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -10160,11 +10094,11 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi @@ -10203,7 +10137,7 @@ # Broken: fails on valid input. continue fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. @@ -10219,18 +10153,18 @@ ac_preproc_ok=: break fi -rm -f conftest.err conftest.$ac_ext +rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext +rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error "C++ preprocessor \"$CXXCPP\" fails sanity check -See \`config.log' for more details." "$LINENO" 5; } +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c @@ -10248,7 +10182,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } -if test "${ac_cv_path_GREP+set}" = set; then : +if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then @@ -10297,7 +10231,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then - as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP @@ -10311,7 +10245,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } -if test "${ac_cv_path_EGREP+set}" = set; then : +if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 @@ -10363,7 +10297,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then - as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP @@ -10435,12 +10369,12 @@ # enough assembler. # case $host in - i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | athlon64-*-* | pentium4-*-* | atom-*-* | core2-*-* | corei-*-* | x86_64-*-* | nano-*-*) if test "$ABI" = 32; then case "$path $fat_path" in *mmx*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler knows about MMX instructions" >&5 $as_echo_n "checking if the assembler knows about MMX instructions... " >&6; } -if test "${gmp_cv_asm_x86_mmx+set}" = set; then : +if ${gmp_cv_asm_x86_mmx+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if the assembler knows about SSE2 instructions... " >&6; } -if test "${gmp_cv_asm_x86_sse2+set}" = set; then : +if ${gmp_cv_asm_x86_sse2+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -10776,8 +10710,7 @@ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -10798,7 +10731,7 @@ for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" -if test "x$ac_cv_header_string_h" = x""yes; then : +if test "x$ac_cv_header_string_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF @@ -10812,7 +10745,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler supports --noexecstack option" >&5 $as_echo_n "checking whether assembler supports --noexecstack option... " >&6; } -if test "${cl_cv_as_noexecstack+set}" = set; then : +if ${cl_cv_as_noexecstack+:} false; then : $as_echo_n "(cached) " >&6 else cat > conftest.c <&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -10895,7 +10828,7 @@ set dummy ar; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -10963,7 +10896,7 @@ gmp_user_NM=$NM { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -11016,14 +10949,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -11061,13 +10997,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -11116,6 +11052,15 @@ fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -11130,18 +11075,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:11138: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:11141: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:11144: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -11166,7 +11111,7 @@ NM= { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } -if test "${lt_cv_path_NM+set}" = set; then : +if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then @@ -11219,14 +11164,17 @@ NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. - if test -n "$ac_tool_prefix"; then - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + if test -n "$DUMPBIN"; then : + # Let the user override the test. + else + if test -n "$ac_tool_prefix"; then + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then @@ -11264,13 +11212,13 @@ fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN - for ac_prog in "dumpbin -symbols" "link -dump -symbols" + for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then : +if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then @@ -11319,6 +11267,15 @@ fi fi + case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in + *COFF*) + DUMPBIN="$DUMPBIN -symbols" + ;; + *) + DUMPBIN=: + ;; + esac + fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" @@ -11330,18 +11287,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } -if test "${lt_cv_nm_interface+set}" = set; then : +if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext - (eval echo "\"\$as_me:11338: $ac_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:11341: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:11344: output\"" >&5) + (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -11389,13 +11346,13 @@ enable_win32_dll=yes case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*) +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AS+set}" = set; then : +if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then @@ -11435,7 +11392,7 @@ set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AS+set}" = set; then : +if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then @@ -11487,7 +11444,7 @@ set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DLLTOOL+set}" = set; then : +if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then @@ -11527,7 +11484,7 @@ set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then @@ -11579,7 +11536,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -11619,7 +11576,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -11700,7 +11657,7 @@ fi # Don't allow both static and DLL. if test "$enable_shared" != no && test "$enable_static" != no; then - as_fn_error "cannot build both static and DLL, since gmp.h is different for each. + as_fn_error $? "cannot build both static and DLL, since gmp.h is different for each. Use \"--disable-static --enable-shared\" to build just a DLL." "$LINENO" 5 fi @@ -11787,8 +11744,8 @@ -macro_version='2.2.6b' -macro_revision='1.3017' +macro_version='2.4' +macro_revision='1.3293' @@ -11804,9 +11761,78 @@ ltmain="$ac_aux_dir/ltmain.sh" +# Backslashify metacharacters that are still active within +# double-quoted strings. +sed_quote_subst='s/\(["`$\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\(["`\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to delay expansion of an escaped single quote. +delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO +ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 +$as_echo_n "checking how to print strings... " >&6; } +# Test print first, because it will be a builtin if present. +if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ + test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='print -r --' +elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then + ECHO='printf %s\n' +else + # Use this function as a fallback that always works. + func_fallback_echo () + { + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' + } + ECHO='func_fallback_echo' +fi + +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "" +} + +case "$ECHO" in + printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 +$as_echo "printf" >&6; } ;; + print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 +$as_echo "print -r" >&6; } ;; + *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 +$as_echo "cat" >&6; } ;; +esac + + + + + + + + + + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } -if test "${ac_cv_path_SED+set}" = set; then : +if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ @@ -11861,7 +11887,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then - as_fn_error "no acceptable sed could be found in \$PATH" "$LINENO" 5 + as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED @@ -11888,7 +11914,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } -if test "${ac_cv_path_FGREP+set}" = set; then : +if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 @@ -11940,7 +11966,7 @@ done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then - as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 + as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP @@ -12019,7 +12045,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -12056,10 +12082,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -12098,7 +12124,7 @@ # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } -if test "${lt_cv_sys_max_cmd_len+set}" = set; then : +if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 @@ -12131,6 +12157,11 @@ lt_cv_sys_max_cmd_len=8192; ;; + mint*) + # On MiNT this can take a long time and run out of memory. + lt_cv_sys_max_cmd_len=8192; + ;; + amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. @@ -12195,8 +12226,8 @@ # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. - while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \ - = "XX$teststring$teststring"; } >/dev/null 2>&1 && + while { test "X"`func_fallback_echo "$teststring$teststring" 2>/dev/null` \ + = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` @@ -12238,8 +12269,8 @@ # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" - test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \ - = c,a/b,, \ + test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ + = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes @@ -12288,24 +12319,103 @@ -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 -$as_echo_n "checking for $LD option to reload object files... " >&6; } -if test "${lt_cv_ld_reload_flag+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 +$as_echo_n "checking how to convert $build file names to $host format... " >&6; } +if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else - lt_cv_ld_reload_flag='-r' -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 -$as_echo "$lt_cv_ld_reload_flag" >&6; } -reload_flag=$lt_cv_ld_reload_flag -case $reload_flag in -"" | " "*) ;; -*) reload_flag=" $reload_flag" ;; -esac -reload_cmds='$LD$reload_flag -o $output$reload_objs' -case $host_os in - darwin*) - if test "$GCC" = yes; then + case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 + ;; + esac + ;; + *-*-cygwin* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin + ;; + *-*-cygwin* ) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; + * ) # otherwise, assume *nix + lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin + ;; + esac + ;; + * ) # unhandled hosts (and "normal" native builds) + lt_cv_to_host_file_cmd=func_convert_file_noop + ;; +esac + +fi + +to_host_file_cmd=$lt_cv_to_host_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 +$as_echo "$lt_cv_to_host_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 +$as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } +if ${lt_cv_to_tool_file_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + #assume ordinary cross tools, or native build. +lt_cv_to_tool_file_cmd=func_convert_file_noop +case $host in + *-*-mingw* ) + case $build in + *-*-mingw* ) # actually msys + lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 + ;; + esac + ;; +esac + +fi + +to_tool_file_cmd=$lt_cv_to_tool_file_cmd +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 +$as_echo "$lt_cv_to_tool_file_cmd" >&6; } + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 +$as_echo_n "checking for $LD option to reload object files... " >&6; } +if ${lt_cv_ld_reload_flag+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ld_reload_flag='-r' +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 +$as_echo "$lt_cv_ld_reload_flag" >&6; } +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' +case $host_os in + cygwin* | mingw* | pw32* | cegcc*) + if test "$GCC" != yes; then + reload_cmds=false + fi + ;; + darwin*) + if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' @@ -12326,7 +12436,7 @@ set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then @@ -12366,7 +12476,7 @@ set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then : +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then @@ -12422,7 +12532,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } -if test "${lt_cv_deplibs_check_method+set}" = set; then : +if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' @@ -12464,16 +12574,18 @@ # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. - if ( file / ) >/dev/null 2>&1; then + # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. + if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else - lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + # Keep this pattern in sync with the one in func_win32_libid. + lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; -cegcc) +cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' @@ -12503,6 +12615,10 @@ lt_cv_deplibs_check_method=pass_all ;; +haiku*) + lt_cv_deplibs_check_method=pass_all + ;; + hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in @@ -12511,11 +12627,11 @@ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) - lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac @@ -12618,6 +12734,21 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } + +file_magic_glob= +want_nocaseglob=no +if test "$build" = "$host"; then + case $host_os in + mingw* | pw32*) + if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then + want_nocaseglob=yes + else + file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` + fi + ;; + esac +fi + file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown @@ -12633,12 +12764,162 @@ + + + + + + + + + + if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. -set dummy ${ac_tool_prefix}ar; ac_word=$2 + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 +$as_echo_n "checking how to associate runtime and link libraries... " >&6; } +if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_sharedlib_from_linklib_cmd='unknown' + +case $host_os in +cygwin* | mingw* | pw32* | cegcc*) + # two different shell functions defined in ltmain.sh + # decide which to use based on capabilities of $DLLTOOL + case `$DLLTOOL --help 2>&1` in + *--identify-strict*) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib + ;; + *) + lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback + ;; + esac + ;; +*) + # fallback: assume linklib IS sharedlib + lt_cv_sharedlib_from_linklib_cmd="$ECHO" + ;; +esac + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 +$as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } +sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd +test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO + + + + + + + +if test -n "$ac_tool_prefix"; then + for ac_prog in ar + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_AR+set}" = set; then : +if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then @@ -12651,7 +12932,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_AR="${ac_tool_prefix}ar" + ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12671,14 +12952,18 @@ fi + test -n "$AR" && break + done fi -if test -z "$ac_cv_prog_AR"; then +if test -z "$AR"; then ac_ct_AR=$AR - # Extract the first word of "ar", so it can be a program name with args. -set dummy ar; ac_word=$2 + for ac_prog in ar +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_AR+set}" = set; then : +if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then @@ -12691,7 +12976,7 @@ test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_AR="ar" + ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -12710,6 +12995,10 @@ $as_echo "no" >&6; } fi + + test -n "$ac_ct_AR" && break +done + if test "x$ac_ct_AR" = x; then AR="false" else @@ -12721,16 +13010,72 @@ esac AR=$ac_ct_AR fi -else - AR="$ac_cv_prog_AR" fi -test -z "$AR" && AR=ar -test -z "$AR_FLAGS" && AR_FLAGS=cru +: ${AR=ar} +: ${AR_FLAGS=cru} + + + + + + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 +$as_echo_n "checking for archiver @FILE support... " >&6; } +if ${lt_cv_ar_at_file+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_ar_at_file=no + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + echo conftest.$ac_objext > conftest.lst + lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -eq 0; then + # Ensure the archiver fails upon bogus file names. + rm -f conftest.$ac_objext libconftest.a + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 + (eval $lt_ar_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } + if test "$ac_status" -ne 0; then + lt_cv_ar_at_file=@ + fi + fi + rm -f conftest.* libconftest.a + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 +$as_echo "$lt_cv_ar_at_file" >&6; } + +if test "x$lt_cv_ar_at_file" = xno; then + archiver_list_spec= +else + archiver_list_spec=$lt_cv_ar_at_file +fi @@ -12743,7 +13088,7 @@ set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_STRIP+set}" = set; then : +if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then @@ -12783,7 +13128,7 @@ set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : +if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then @@ -12842,7 +13187,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -12882,7 +13227,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -12953,6 +13298,20 @@ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi +case $host_os in + darwin*) + lock_old_archive_extraction=yes ;; + *) + lock_old_archive_extraction=no ;; +esac + + + + + + + + @@ -12984,8 +13343,6 @@ - - # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} @@ -12999,7 +13356,7 @@ # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } -if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then : +if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else @@ -13060,8 +13417,8 @@ lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address -lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= @@ -13097,6 +13454,7 @@ else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi + lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no @@ -13122,8 +13480,8 @@ test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5 - (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 + (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then @@ -13138,6 +13496,18 @@ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + #ifdef __cplusplus extern "C" { #endif @@ -13149,7 +13519,7 @@ cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ -const struct { +LT_DLSYM_CONST struct { const char *name; void *address; } @@ -13175,8 +13545,8 @@ _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext - lt_save_LIBS="$LIBS" - lt_save_CFLAGS="$CFLAGS" + lt_globsym_save_LIBS=$LIBS + lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 @@ -13186,8 +13556,8 @@ test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi - LIBS="$lt_save_LIBS" - CFLAGS="$lt_save_CFLAGS" + LIBS=$lt_globsym_save_LIBS + CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi @@ -13224,6 +13594,20 @@ $as_echo "ok" >&6; } fi +# Response file support. +if test "$lt_cv_nm_interface" = "MS dumpbin"; then + nm_file_list_spec='@' +elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then + nm_file_list_spec='@' +fi + + + + + + + + @@ -13243,6 +13627,41 @@ +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 +$as_echo_n "checking for sysroot... " >&6; } + +# Check whether --with-sysroot was given. +if test "${with_sysroot+set}" = set; then : + withval=$with_sysroot; +else + with_sysroot=no +fi + + +lt_sysroot= +case ${with_sysroot} in #( + yes) + if test "$GCC" = yes; then + lt_sysroot=`$CC --print-sysroot 2>/dev/null` + fi + ;; #( + /*) + lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` + ;; #( + no|'') + ;; #( + *) + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 +$as_echo "${with_sysroot}" >&6; } + as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 + ;; +esac + + { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 +$as_echo "${lt_sysroot:-no}" >&6; } + + + # Check whether --enable-libtool-lock was given. @@ -13276,7 +13695,7 @@ ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 13279 "configure"' > conftest.$ac_ext + echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -13370,7 +13789,7 @@ CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } -if test "${lt_cv_cc_needs_belf+set}" = set; then : +if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c @@ -13438,6 +13857,123 @@ need_locks="$enable_libtool_lock" +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. +set dummy ${ac_tool_prefix}mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$MANIFEST_TOOL"; then + ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL +if test -n "$MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 +$as_echo "$MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_MANIFEST_TOOL"; then + ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL + # Extract the first word of "mt", so it can be a program name with args. +set dummy mt; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_MANIFEST_TOOL"; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then + ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL +if test -n "$ac_ct_MANIFEST_TOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 +$as_echo "$ac_ct_MANIFEST_TOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_MANIFEST_TOOL" = x; then + MANIFEST_TOOL=":" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL + fi +else + MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" +fi + +test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 +$as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } +if ${lt_cv_path_mainfest_tool+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_path_mainfest_tool=no + echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 + $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out + cat conftest.err >&5 + if $GREP 'Manifest Tool' conftest.out > /dev/null; then + lt_cv_path_mainfest_tool=yes + fi + rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 +$as_echo "$lt_cv_path_mainfest_tool" >&6; } +if test "x$lt_cv_path_mainfest_tool" != xyes; then + MANIFEST_TOOL=: +fi + + + + + case $host_os in rhapsody* | darwin*) @@ -13446,7 +13982,7 @@ set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then @@ -13486,7 +14022,7 @@ set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then : +if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then @@ -13538,7 +14074,7 @@ set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_NMEDIT+set}" = set; then : +if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then @@ -13578,7 +14114,7 @@ set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then : +if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then @@ -13630,7 +14166,7 @@ set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LIPO+set}" = set; then : +if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then @@ -13670,7 +14206,7 @@ set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then : +if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then @@ -13722,7 +14258,7 @@ set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL+set}" = set; then : +if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then @@ -13762,7 +14298,7 @@ set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then @@ -13814,7 +14350,7 @@ set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_OTOOL64+set}" = set; then : +if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then @@ -13854,7 +14390,7 @@ set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then : +if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then @@ -13924,735 +14460,162 @@ - - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 -$as_echo_n "checking for -single_module linker flag... " >&6; } -if test "${lt_cv_apple_cc_single_mod+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_apple_cc_single_mod=no - if test -z "${LT_MULTI_MODULE}"; then - # By default we will add the -single_module flag. You can override - # by either setting the environment variable LT_MULTI_MODULE - # non-empty at configure time, or by adding -multi_module to the - # link flags. - rm -rf libconftest.dylib* - echo "int foo(void){return 1;}" > conftest.c - echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ --dynamiclib -Wl,-single_module conftest.c" >&5 - $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ - -dynamiclib -Wl,-single_module conftest.c 2>conftest.err - _lt_result=$? - if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then - lt_cv_apple_cc_single_mod=yes - else - cat conftest.err >&5 - fi - rm -rf libconftest.dylib* - rm -f conftest.* - fi -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 -$as_echo "$lt_cv_apple_cc_single_mod" >&6; } - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 -$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } -if test "${lt_cv_ld_exported_symbols_list+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - lt_cv_ld_exported_symbols_list=no - save_LDFLAGS=$LDFLAGS - echo "_main" > conftest.sym - LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - lt_cv_ld_exported_symbols_list=yes -else - lt_cv_ld_exported_symbols_list=no -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 -$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } - case $host_os in - rhapsody* | darwin1.[012]) - _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; - darwin1.*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[91]*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) - _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; - 10.*) - _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - esac - ;; - esac - if test "$lt_cv_apple_cc_single_mod" = "yes"; then - _lt_dar_single_mod='$single_module' - fi - if test "$lt_cv_ld_exported_symbols_list" = "yes"; then - _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' - else - _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' - fi - if test "$DSYMUTIL" != ":"; then - _lt_dsymutil='~$DSYMUTIL $lib || :' - else - _lt_dsymutil= - fi - ;; - esac - -for ac_header in dlfcn.h -do : - ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default -" -if test "x$ac_cv_header_dlfcn_h" = x""yes; then : - cat >>confdefs.h <<_ACEOF -#define HAVE_DLFCN_H 1 -_ACEOF - -fi - -done - - - -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -if test -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CXX"; then - ac_cv_prog_CXX="$CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -CXX=$ac_cv_prog_CXX -if test -n "$CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 -$as_echo "$CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CXX" && break - done -fi -if test -z "$CXX"; then - ac_ct_CXX=$CXX - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CXX"; then - ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_CXX="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_CXX=$ac_cv_prog_ac_ct_CXX -if test -n "$ac_ct_CXX"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 -$as_echo "$ac_ct_CXX" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CXX" && break -done - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -fi -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 -$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } -if test "${ac_cv_cxx_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ -#ifndef __GNUC__ - choke me -#endif - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_cxx_compiler_gnu=$ac_compiler_gnu - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 -$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } -if test $ac_compiler_gnu = yes; then - GXX=yes -else - GXX= -fi -ac_test_CXXFLAGS=${CXXFLAGS+set} -ac_save_CXXFLAGS=$CXXFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 -$as_echo_n "checking whether $CXX accepts -g... " >&6; } -if test "${ac_cv_prog_cxx_g+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -else - CXXFLAGS="" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - -else - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF -if ac_fn_cxx_try_compile "$LINENO"; then : - ac_cv_prog_cxx_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 -$as_echo "$ac_cv_prog_cxx_g" >&6; } -if test "$ac_test_CXXFLAGS" = set; then - CXXFLAGS=$ac_save_CXXFLAGS -elif test $ac_cv_prog_cxx_g = yes; then - if test "$GXX" = yes; then - CXXFLAGS="-g -O2" - else - CXXFLAGS="-g" - fi -else - if test "$GXX" = yes; then - CXXFLAGS="-O2" - else - CXXFLAGS= - fi -fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 -$as_echo_n "checking how to run the C++ preprocessor... " >&6; } -if test -z "$CXXCPP"; then - if test "${ac_cv_prog_CXXCPP+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - # Double quotes because CXXCPP needs to be expanded - for CXXCPP in "$CXX -E" "/lib/cpp" - do - ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - break -fi - - done - ac_cv_prog_CXXCPP=$CXXCPP - -fi - CXXCPP=$ac_cv_prog_CXXCPP -else - ac_cv_prog_CXXCPP=$CXXCPP -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 -$as_echo "$CXXCPP" >&6; } -ac_preproc_ok=false -for ac_cxx_preproc_warn_flag in '' yes -do - # Use a header file that comes with gcc, so configuring glibc - # with a fresh cross-compiler works. - # Prefer to if __STDC__ is defined, since - # exists even on freestanding compilers. - # On the NeXT, cc -E runs the code through the compiler's parser, - # not just through cpp. "Syntax error" is here to catch this case. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#ifdef __STDC__ -# include -#else -# include -#endif - Syntax error -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - -else - # Broken: fails on valid input. -continue -fi -rm -f conftest.err conftest.$ac_ext - - # OK, works on sane cases. Now check whether nonexistent headers - # can be detected and how. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -_ACEOF -if ac_fn_cxx_try_cpp "$LINENO"; then : - # Broken: success on invalid input. -continue -else - # Passes both tests. -ac_preproc_ok=: -break -fi -rm -f conftest.err conftest.$ac_ext - -done -# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. -rm -f conftest.err conftest.$ac_ext -if $ac_preproc_ok; then : - -else - { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -_lt_caught_CXX_error=yes; } -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -else - _lt_caught_CXX_error=yes -fi - - - - - -ac_ext=f -ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' -ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_f77_compiler_gnu -if test -n "$ac_tool_prefix"; then - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_F77+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$F77"; then - ac_cv_prog_F77="$F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_F77="$ac_tool_prefix$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -F77=$ac_cv_prog_F77 -if test -n "$F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $F77" >&5 -$as_echo "$F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$F77" && break - done -fi -if test -z "$F77"; then - ac_ct_F77=$F77 - for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_F77+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_F77"; then - ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then - ac_cv_prog_ac_ct_F77="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_F77=$ac_cv_prog_ac_ct_F77 -if test -n "$ac_ct_F77"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_F77" >&5 -$as_echo "$ac_ct_F77" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_F77" && break -done - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for Fortran 77 compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done -rm -f a.out - -# If we don't use `.F' as extension, the preprocessor is not run on the -# input file. (Note that this only needs to work for GNU compilers.) -ac_save_ext=$ac_ext -ac_ext=F -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU Fortran 77 compiler" >&5 -$as_echo_n "checking whether we are using the GNU Fortran 77 compiler... " >&6; } -if test "${ac_cv_f77_compiler_gnu+set}" = set; then : - $as_echo_n "(cached) " >&6 -else - cat > conftest.$ac_ext <<_ACEOF - program main -#ifndef __GNUC__ - choke me -#endif - - end -_ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_compiler_gnu=yes -else - ac_compiler_gnu=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_f77_compiler_gnu=$ac_compiler_gnu - + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 +$as_echo_n "checking for -single_module linker flag... " >&6; } +if ${lt_cv_apple_cc_single_mod+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_apple_cc_single_mod=no + if test -z "${LT_MULTI_MODULE}"; then + # By default we will add the -single_module flag. You can override + # by either setting the environment variable LT_MULTI_MODULE + # non-empty at configure time, or by adding -multi_module to the + # link flags. + rm -rf libconftest.dylib* + echo "int foo(void){return 1;}" > conftest.c + echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ +-dynamiclib -Wl,-single_module conftest.c" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ + -dynamiclib -Wl,-single_module conftest.c 2>conftest.err + _lt_result=$? + if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then + lt_cv_apple_cc_single_mod=yes + else + cat conftest.err >&5 + fi + rm -rf libconftest.dylib* + rm -f conftest.* + fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_f77_compiler_gnu" >&5 -$as_echo "$ac_cv_f77_compiler_gnu" >&6; } -ac_ext=$ac_save_ext -ac_test_FFLAGS=${FFLAGS+set} -ac_save_FFLAGS=$FFLAGS -FFLAGS= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $F77 accepts -g" >&5 -$as_echo_n "checking whether $F77 accepts -g... " >&6; } -if test "${ac_cv_prog_f77_g+set}" = set; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 +$as_echo "$lt_cv_apple_cc_single_mod" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 +$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } +if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else - FFLAGS=-g -cat > conftest.$ac_ext <<_ACEOF - program main + lt_cv_ld_exported_symbols_list=no + save_LDFLAGS=$LDFLAGS + echo "_main" > conftest.sym + LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - end +int +main () +{ + + ; + return 0; +} _ACEOF -if ac_fn_f77_try_compile "$LINENO"; then : - ac_cv_prog_f77_g=yes +if ac_fn_c_try_link "$LINENO"; then : + lt_cv_ld_exported_symbols_list=yes else - ac_cv_prog_f77_g=no + lt_cv_ld_exported_symbols_list=no fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$save_LDFLAGS" fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_f77_g" >&5 -$as_echo "$ac_cv_prog_f77_g" >&6; } -if test "$ac_test_FFLAGS" = set; then - FFLAGS=$ac_save_FFLAGS -elif test $ac_cv_prog_f77_g = yes; then - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-g -O2" - else - FFLAGS="-g" - fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 +$as_echo "$lt_cv_ld_exported_symbols_list" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 +$as_echo_n "checking for -force_load linker flag... " >&6; } +if ${lt_cv_ld_force_load+:} false; then : + $as_echo_n "(cached) " >&6 else - if test "x$ac_cv_f77_compiler_gnu" = xyes; then - FFLAGS="-O2" - else - FFLAGS= - fi -fi + lt_cv_ld_force_load=no + cat > conftest.c << _LT_EOF +int forced_loaded() { return 2;} +_LT_EOF + echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 + $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 + echo "$AR cru libconftest.a conftest.o" >&5 + $AR cru libconftest.a conftest.o 2>&5 + echo "$RANLIB libconftest.a" >&5 + $RANLIB libconftest.a 2>&5 + cat > conftest.c << _LT_EOF +int main() { return 0;} +_LT_EOF + echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 + $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err + _lt_result=$? + if test -f conftest && test ! -s conftest.err && test $_lt_result = 0 && $GREP forced_load conftest 2>&1 >/dev/null; then + lt_cv_ld_force_load=yes + else + cat conftest.err >&5 + fi + rm -f conftest.err libconftest.a conftest conftest.c + rm -rf conftest.dSYM -if test $ac_compiler_gnu = yes; then - G77=yes -else - G77= fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 +$as_echo "$lt_cv_ld_force_load" >&6; } + case $host_os in + rhapsody* | darwin1.[012]) + _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; + darwin1.*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + darwin*) # darwin 5.x on + # if running on 10.5 or later, the deployment target defaults + # to the OS version, if on x86, and 10.4, the deployment + # target defaults to 10.4. Don't you love it? + case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in + 10.0,*86*-darwin8*|10.0,*-darwin[91]*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + 10.[012]*) + _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; + 10.*) + _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; + esac + ;; + esac + if test "$lt_cv_apple_cc_single_mod" = "yes"; then + _lt_dar_single_mod='$single_module' + fi + if test "$lt_cv_ld_exported_symbols_list" = "yes"; then + _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' + else + _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then + _lt_dsymutil='~$DSYMUTIL $lib || :' + else + _lt_dsymutil= + fi + ;; + esac + +for ac_header in dlfcn.h +do : + ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default +" +if test "x$ac_cv_header_dlfcn_h" = xyes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_DLFCN_H 1 +_ACEOF -if test -z "$F77" || test "X$F77" = "Xno"; then - _lt_disable_F77=yes fi +done + + + + +func_stripname_cnf () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname_cnf + + @@ -14807,6 +14770,7 @@ + test -z "$LN_S" && LN_S="ln -s" @@ -14828,7 +14792,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } -if test "${lt_cv_objdir+set}" = set; then : +if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null @@ -14856,19 +14820,6 @@ - - - - - - - - - - - - - case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some @@ -14881,23 +14832,6 @@ ;; esac -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -sed_quote_subst='s/\(["`$\\]\)/\\\1/g' - -# Same as above, but do not quote variable references. -double_quote_subst='s/\(["`\\]\)/\\\1/g' - -# Sed substitution to delay expansion of an escaped shell variable in a -# double_quote_subst'ed string. -delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' - -# Sed substitution to delay expansion of an escaped single quote. -delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' - -# Sed substitution to avoid accidental globbing in evaled expressions -no_glob_subst='s/\*/\\\*/g' - # Global variables: ofile=libtool can_build_shared=yes @@ -14926,7 +14860,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it @@ -14936,7 +14870,7 @@ if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -15002,7 +14936,7 @@ if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } -if test "${lt_cv_path_MAGIC_CMD+set}" = set; then : +if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in @@ -15131,11 +15065,16 @@ lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then - lt_prog_compiler_no_builtin_flag=' -fno-builtin' + case $cc_basename in + nvcc*) + lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; + *) + lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; + esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } -if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then : +if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no @@ -15151,15 +15090,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15154: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15158: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes @@ -15188,8 +15127,6 @@ lt_prog_compiler_pic= lt_prog_compiler_static= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' @@ -15237,6 +15174,12 @@ lt_prog_compiler_pic='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -15279,6 +15222,13 @@ lt_prog_compiler_pic='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl='-Xlinker ' + lt_prog_compiler_pic='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -15341,7 +15291,13 @@ lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl='-Wl,-Wl,,' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' @@ -15353,25 +15309,25 @@ # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_wl='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' - lt_prog_compiler_wl='' + lt_prog_compiler_wl='-Wl,' ;; esac ;; @@ -15403,7 +15359,7 @@ lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; @@ -15460,13 +15416,17 @@ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5 -$as_echo "$lt_prog_compiler_pic" >&6; } - - - - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic=$lt_prog_compiler_pic +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 +$as_echo "$lt_cv_prog_compiler_pic" >&6; } +lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. @@ -15474,7 +15434,7 @@ if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no @@ -15490,15 +15450,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15493: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:15497: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes @@ -15527,13 +15487,18 @@ + + + + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works+set}" = set; then : +if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no @@ -15546,7 +15511,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes @@ -15576,7 +15541,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -15595,16 +15560,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15598: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15602: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -15631,7 +15596,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o+set}" = set; then : +if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no @@ -15650,16 +15615,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15653: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:15657: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes @@ -15769,13 +15734,39 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -15809,11 +15800,12 @@ ld_shlibs=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -15849,10 +15841,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' + export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes - export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -15870,6 +15864,11 @@ fi ;; + haiku*) + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs=yes + ;; + interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no @@ -15895,15 +15894,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -15914,13 +15914,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -15936,17 +15940,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld='-rpath $libdir' - archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -15960,8 +15964,8 @@ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -15979,8 +15983,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -16026,8 +16030,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi @@ -16067,8 +16071,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -16156,7 +16162,13 @@ allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -16169,25 +16181,32 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' @@ -16196,7 +16215,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath_+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -16209,30 +16234,42 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath_"; then + lt_cv_aix_libpath_="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath_ +fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec='$convenience' + fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -16264,20 +16301,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec=' ' - allow_undefined_flag=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + always_export_symbols=yes + file_list_spec='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, )='true' + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds='chmod 644 $oldlib' + postlink_cmds='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes=yes + ;; + esac ;; darwin* | rhapsody*) @@ -16287,7 +16367,11 @@ hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec='' + fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in @@ -16295,7 +16379,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -16338,7 +16422,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no @@ -16346,7 +16430,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -16361,8 +16445,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -16380,16 +16464,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -16401,7 +16485,46 @@ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + + # Older versions of the 11.00 compiler do not understand -b yet + # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 +$as_echo_n "checking if $CC understands -b... " >&6; } +if ${lt_cv_prog_compiler__b+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler__b=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -b" + echo "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The linker can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp + $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 + if diff conftest.exp conftest.er2 >/dev/null; then + lt_cv_prog_compiler__b=yes + fi + else + lt_cv_prog_compiler__b=yes + fi + fi + $RM -r conftest* + LDFLAGS="$save_LDFLAGS" + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 +$as_echo "$lt_cv_prog_compiler__b" >&6; } + +if test x"$lt_cv_prog_compiler__b" = xyes; then + archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' +else + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' +fi + ;; esac fi @@ -16429,26 +16552,39 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -int foo(void) {} +int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -16510,17 +16646,17 @@ hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported - archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' @@ -16530,13 +16666,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' - archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' @@ -16549,9 +16685,9 @@ no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -16739,44 +16875,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl - pic_flag=$lt_prog_compiler_pic - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag - allow_undefined_flag= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + pic_flag=$lt_prog_compiler_pic + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc=no - else - archive_cmds_need_lc=yes - fi - allow_undefined_flag=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5 -$as_echo "$archive_cmds_need_lc" >&6; } + then + lt_cv_archive_cmds_need_lc=no + else + lt_cv_archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc" >&6; } + archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi @@ -16947,16 +17089,23 @@ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac - lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then + case $host_os in + mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; + *) lt_sed_strip_eq="s,=/,/,g" ;; + esac + lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` + case $lt_search_path_spec in + *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'` - else - lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` + ;; + *) + lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` + ;; + esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= @@ -16969,7 +17118,7 @@ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done - lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk ' + lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; @@ -16989,7 +17138,13 @@ if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` - sys_lib_search_path_spec=`$ECHO $lt_search_path_spec` + # AWK program above erroneously prepends '/' to C:/dos/paths + # for these hosts. + case $host_os in + mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ + $SED 's,/\([A-Za-z]:\),\1,g'` ;; + esac + sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi @@ -17077,7 +17232,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -17108,8 +17263,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -17130,36 +17286,83 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + + sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -17243,6 +17446,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -17288,8 +17505,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -17356,12 +17575,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -17374,13 +17598,17 @@ _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -17389,7 +17617,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -17704,6 +17932,11 @@ + + + + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= @@ -17776,7 +18009,7 @@ # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17810,7 +18043,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else @@ -17824,12 +18057,12 @@ *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" -if test "x$ac_cv_func_shl_load" = x""yes; then : +if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } -if test "${ac_cv_lib_dld_shl_load+set}" = set; then : +if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17863,16 +18096,16 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } -if test "x$ac_cv_lib_dld_shl_load" = x""yes; then : +if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" -if test "x$ac_cv_func_dlopen" = x""yes; then : +if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } -if test "${ac_cv_lib_dl_dlopen+set}" = set; then : +if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17906,12 +18139,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } -if test "x$ac_cv_lib_dl_dlopen" = x""yes; then : +if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } -if test "${ac_cv_lib_svld_dlopen+set}" = set; then : +if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17945,12 +18178,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } -if test "x$ac_cv_lib_svld_dlopen" = x""yes; then : +if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } -if test "${ac_cv_lib_dld_dld_link+set}" = set; then : +if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -17984,7 +18217,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } -if test "x$ac_cv_lib_dld_dld_link" = x""yes; then : +if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi @@ -18025,7 +18258,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self+set}" = set; then : +if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -18034,7 +18267,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18037 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18075,7 +18308,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -18084,7 +18323,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -18121,7 +18364,7 @@ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } -if test "${lt_cv_dlopen_self_static+set}" = set; then : +if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : @@ -18130,7 +18373,7 @@ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18133 "configure" +#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18171,7 +18414,13 @@ # endif #endif -void fnord() { int i=42;} +/* When -fvisbility=hidden is used, assume the code has been annotated + correspondingly for the symbols needed. */ +#if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) +int fnord () __attribute__((visibility("default"))); +#endif + +int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); @@ -18180,7 +18429,11 @@ if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; - else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else + { + if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + else puts (dlerror ()); + } /* dlclose (self); */ } else @@ -18337,6 +18590,145 @@ CC="$lt_save_CC" + if test -n "$CXX" && ( test "X$CXX" != "Xno" && + ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || + (test "X$CXX" != "Xg++"))) ; then + ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 +$as_echo_n "checking how to run the C++ preprocessor... " >&6; } +if test -z "$CXXCPP"; then + if ${ac_cv_prog_CXXCPP+:} false; then : + $as_echo_n "(cached) " >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 +$as_echo "$CXXCPP" >&6; } +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + +else + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.i conftest.$ac_ext + + # OK, works on sane cases. Now check whether nonexistent headers + # can be detected and how. + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include +_ACEOF +if ac_fn_cxx_try_cpp "$LINENO"; then : + # Broken: success on invalid input. +continue +else + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.i conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.i conftest.err conftest.$ac_ext +if $ac_preproc_ok; then : + +else + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details" "$LINENO" 5; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +else + _lt_caught_CXX_error=yes +fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' @@ -18363,6 +18755,8 @@ module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds +reload_flag_CXX=$reload_flag +reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no @@ -18418,6 +18812,7 @@ # Allow CC to be a program name with arguments. lt_save_CC=$CC + lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX @@ -18435,6 +18830,7 @@ fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} + CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do @@ -18445,7 +18841,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` if test -n "$compiler"; then @@ -18508,7 +18904,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi -if test "${lt_cv_path_LD+set}" = set; then : +if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then @@ -18545,10 +18941,10 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi -test -z "$LD" && as_fn_error "no acceptable ld found in \$PATH" "$LINENO" 5 +test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } -if test "${lt_cv_prog_gnu_ld+set}" = set; then : +if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. @@ -18574,8 +18970,8 @@ # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -18607,7 +19003,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no @@ -18717,7 +19113,13 @@ allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty # executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -18730,26 +19132,33 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' @@ -18758,7 +19167,13 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -18771,30 +19186,42 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__CXX"; then + lt_cv_aix_libpath__CXX="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__CXX +fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX='$convenience' + fi archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared # libraries. @@ -18824,28 +19251,75 @@ ;; cygwin* | mingw* | pw32* | cegcc*) - # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, - # as there is no search path for DLLs. - hardcode_libdir_flag_spec_CXX='-L$libdir' - allow_undefined_flag_CXX=unsupported - always_export_symbols_CXX=no - enable_shared_with_static_runtimes_CXX=yes - - if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - # If the export-symbols file already is a .def file (1st line - # is EXPORTS), use it as is; otherwise, prepend... - archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then - cp $export_symbols $output_objdir/$soname.def; - else - echo EXPORTS > $output_objdir/$soname.def; - cat $export_symbols >> $output_objdir/$soname.def; - fi~ - $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; + case $GXX,$cc_basename in + ,cl* | no,cl*) + # Native MSVC + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_CXX=' ' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=yes + file_list_spec_CXX='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' + enable_shared_with_static_runtimes_CXX=yes + # Don't use ranlib + old_postinstall_cmds_CXX='chmod 644 $oldlib' + postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + func_to_tool_file "$lt_outputfile"~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # g++ + # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-all-symbols' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' + else + ld_shlibs_CXX=no + fi + ;; + esac + ;; darwin* | rhapsody*) @@ -18853,7 +19327,11 @@ hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_CXX='' + fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX="$_lt_dar_allow_undefined" case $cc_basename in @@ -18861,7 +19339,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_CXX="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -18914,6 +19392,11 @@ gnu*) ;; + haiku*) + archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_CXX=yes + ;; + hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: @@ -18938,11 +19421,11 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then - archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no @@ -19003,7 +19486,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then @@ -19013,10 +19496,10 @@ archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_cmds_CXX='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi @@ -19046,7 +19529,7 @@ case $cc_basename in CC*) # SGI C++ - archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is @@ -19057,9 +19540,9 @@ *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes @@ -19088,7 +19571,7 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -19125,26 +19608,26 @@ pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in - *pgCC\ [1-5]* | *pgcpp\ [1-5]*) + *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ - compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"' + compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ - $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~ + $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ - $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' + $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; - *) # Version 6 will use weak symbols + *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; @@ -19152,7 +19635,7 @@ hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ @@ -19171,9 +19654,9 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; - xl*) + xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -19193,13 +19676,13 @@ archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' - whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_CXX='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -19268,7 +19751,7 @@ export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi @@ -19303,15 +19786,15 @@ case $host in osf3*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' - archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ - $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; @@ -19327,17 +19810,17 @@ # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. - output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed' + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) - archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac @@ -19347,7 +19830,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support @@ -19383,7 +19866,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' @@ -19404,7 +19887,7 @@ esac link_all_deplibs_CXX=yes - output_verbose_link_cmd='echo' + output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is @@ -19424,14 +19907,14 @@ if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then - archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. @@ -19442,7 +19925,7 @@ # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. - output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"' + output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' @@ -19496,6 +19979,10 @@ CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' + old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ + '"$old_archive_cmds_CXX" + reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ + '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' @@ -19557,6 +20044,13 @@ }; _LT_EOF + +_lt_libdeps_save_CFLAGS=$CFLAGS +case "$CC $CFLAGS " in #( +*\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; +*\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; +esac + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -19570,7 +20064,7 @@ pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do - case $p in + case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. @@ -19579,13 +20073,22 @@ test $p = "-R"; then prev=$p continue - else - prev= fi + # Expand the sysroot to ease extracting the directories later. + if test -z "$prev"; then + case $p in + -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; + -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; + -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; + esac + fi + case $p in + =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; + esac if test "$pre_test_object_deps_done" = no; then - case $p in - -L* | -R*) + case ${prev} in + -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. @@ -19605,8 +20108,10 @@ postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi + prev= ;; + *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. @@ -19642,6 +20147,7 @@ fi $RM -f confest.$objext +CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in @@ -19677,7 +20183,7 @@ solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as @@ -19742,8 +20248,6 @@ lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then @@ -19793,6 +20297,11 @@ # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_CXX= + ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. @@ -19842,6 +20351,11 @@ ;; esac ;; + mingw* | cygwin* | os2* | pw32* | cegcc*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; dgux*) case $cc_basename in ec++*) @@ -19931,8 +20445,8 @@ lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; - xlc* | xlC*) - # IBM XL 8.0 on PPC + xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) + # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' @@ -19994,7 +20508,7 @@ ;; solaris*) case $cc_basename in - CC*) + CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' @@ -20059,10 +20573,17 @@ lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_CXX" >&5 -$as_echo "$lt_prog_compiler_pic_CXX" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 +$as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } +lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. @@ -20070,7 +20591,7 @@ if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no @@ -20086,15 +20607,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:20089: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:20093: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes @@ -20120,13 +20641,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no @@ -20139,7 +20662,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes @@ -20166,7 +20689,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -20185,16 +20708,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:20188: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:20192: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -20218,7 +20741,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no @@ -20237,16 +20760,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:20240: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:20244: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes @@ -20297,30 +20820,38 @@ $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global defined + # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" - ;; + ;; cygwin* | mingw* | cegcc*) - export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;/^.*[ ]__nm__/s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' - ;; - linux* | k*bsd*-gnu) + case $cc_basename in + cl*) ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' + ;; + esac + ;; + linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no - ;; + ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' - ;; + ;; esac - exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } @@ -20352,44 +20883,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_CXX - pic_flag=$lt_prog_compiler_pic_CXX - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_CXX - allow_undefined_flag_CXX= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + pic_flag=$lt_prog_compiler_pic_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } - then - archive_cmds_need_lc_CXX=no - else - archive_cmds_need_lc_CXX=yes - fi - allow_undefined_flag_CXX=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_CXX" >&5 -$as_echo "$archive_cmds_need_lc_CXX" >&6; } + then + lt_cv_archive_cmds_need_lc_CXX=no + else + lt_cv_archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } + archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi @@ -20546,7 +21083,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -20577,8 +21114,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -20599,36 +21137,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -20711,6 +21295,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -20756,8 +21354,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -20824,12 +21424,17 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" - cat confdefs.h - <<_ACEOF >conftest.$ac_ext + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int @@ -20842,13 +21447,17 @@ _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -20857,7 +21466,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -21121,6 +21730,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= @@ -21168,6 +21779,7 @@ fi # test -n "$compiler" CC=$lt_save_CC + CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC @@ -21191,6 +21803,9 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -z "$F77" || test "X$F77" = "Xno"; then + _lt_disable_F77=yes +fi archive_cmds_need_lc_F77=no allow_undefined_flag_F77= @@ -21209,6 +21824,8 @@ module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds +reload_flag_F77=$reload_flag +reload_cmds_F77=$reload_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no @@ -21272,7 +21889,9 @@ # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC + lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} + CFLAGS=$FFLAGS compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do @@ -21283,7 +21902,7 @@ *) break;; esac done -cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` +cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` GCC=$G77 if test -n "$compiler"; then @@ -21333,8 +21952,6 @@ lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 -$as_echo_n "checking for $compiler option to produce PIC... " >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' @@ -21382,6 +21999,12 @@ lt_prog_compiler_pic_F77='-fno-common' ;; + haiku*) + # PIC is the default for Haiku. + # The "-static" flag exists, but is broken. + lt_prog_compiler_static_F77= + ;; + hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag @@ -21424,6 +22047,13 @@ lt_prog_compiler_pic_F77='-fPIC' ;; esac + + case $cc_basename in + nvcc*) # Cuda Compiler Driver 2.2 + lt_prog_compiler_wl_F77='-Xlinker ' + lt_prog_compiler_pic_F77='-Xcompiler -fPIC' + ;; + esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in @@ -21486,7 +22116,13 @@ lt_prog_compiler_pic_F77='--shared' lt_prog_compiler_static_F77='--static' ;; - pgcc* | pgf77* | pgf90* | pgf95*) + nagfor*) + # NAG Fortran compiler + lt_prog_compiler_wl_F77='-Wl,-Wl,,' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' @@ -21498,25 +22134,25 @@ # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; - xl*) - # IBM XL C 8.0/Fortran 10.1 on PPC + xl* | bgxl* | bgf* | mpixl*) + # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-qpic' lt_prog_compiler_static_F77='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in - *Sun\ C*) - # Sun C 5.9 + *Sun\ F* | *Sun*Fortran*) + # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_wl_F77='' ;; - *Sun\ F*) - # Sun Fortran 8.3 passes all unrecognized flags to the linker + *Sun\ C*) + # Sun C 5.9 lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' - lt_prog_compiler_wl_F77='' + lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; @@ -21548,7 +22184,7 @@ lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in - f77* | f90* | f95*) + f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; @@ -21605,10 +22241,17 @@ lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic_F77" >&5 -$as_echo "$lt_prog_compiler_pic_F77" >&6; } - +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 +$as_echo_n "checking for $compiler option to produce PIC... " >&6; } +if ${lt_cv_prog_compiler_pic_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_prog_compiler_pic_F77=$lt_prog_compiler_pic_F77 +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_F77" >&5 +$as_echo "$lt_cv_prog_compiler_pic_F77" >&6; } +lt_prog_compiler_pic_F77=$lt_cv_prog_compiler_pic_F77 # # Check to make sure the PIC flag actually works. @@ -21616,7 +22259,7 @@ if test -n "$lt_prog_compiler_pic_F77"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... " >&6; } -if test "${lt_cv_prog_compiler_pic_works_F77+set}" = set; then : +if ${lt_cv_prog_compiler_pic_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_F77=no @@ -21632,15 +22275,15 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21635: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:21639: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_F77=yes @@ -21666,13 +22309,15 @@ + + # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } -if test "${lt_cv_prog_compiler_static_works_F77+set}" = set; then : +if ${lt_cv_prog_compiler_static_works_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_F77=no @@ -21685,7 +22330,7 @@ if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 - $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp + $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_F77=yes @@ -21712,7 +22357,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no @@ -21731,16 +22376,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21734: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21738: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes @@ -21764,7 +22409,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } -if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then : +if ${lt_cv_prog_compiler_c_o_F77+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_F77=no @@ -21783,16 +22428,16 @@ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:21786: $lt_compile\"" >&5) + (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:21790: \$? = $ac_status" >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings - $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp + $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes @@ -21899,13 +22544,39 @@ openbsd*) with_gnu_ld=no ;; - linux* | k*bsd*-gnu) + linux* | k*bsd*-gnu | gnu*) link_all_deplibs_F77=no ;; esac ld_shlibs_F77=yes + + # On some targets, GNU ld is compatible enough with the native linker + # that we're better off using the native interface for both. + lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then + case $host_os in + aix*) + # The AIX port of GNU ld has always aspired to compatibility + # with the native linker. However, as the warning in the GNU ld + # block says, versions before 2.19.5* couldn't really create working + # shared libraries, regardless of the interface used. + case `$LD -v 2>&1` in + *\ \(GNU\ Binutils\)\ 2.19.5*) ;; + *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; + *\ \(GNU\ Binutils\)\ [3-9]*) ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + ;; + *) + lt_use_gnu_ld_interface=yes + ;; + esac + fi + + if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' @@ -21939,11 +22610,12 @@ ld_shlibs_F77=no cat <<_LT_EOF 1>&2 -*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you -*** really care for shared libraries, you may want to modify your PATH -*** so that a non-GNU linker is found, and then restart. +*** really care for shared libraries, you may want to install binutils +*** 2.20 or above, or modify your PATH so that a non-GNU linker is found. +*** You will then need to restart the configuration process. _LT_EOF fi @@ -21979,10 +22651,12 @@ # _LT_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' + export_dynamic_flag_spec_F77='${wl}--export-all-symbols' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes - export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' + exclude_expsyms_F77='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' @@ -22000,6 +22674,11 @@ fi ;; + haiku*) + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + link_all_deplibs_F77=yes + ;; + interix[3-9]*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no @@ -22025,15 +22704,16 @@ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + pgf77* | pgf90* | pgf95* | pgfortran*) + # Portland Group f77 and f90 compilers + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; @@ -22044,13 +22724,17 @@ lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec_F77= tmp_sharedflag='--shared' ;; - xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) + xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; + nvcc*) # Cuda Compiler Driver 2.2 + whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' + compiler_needs_object_F77=yes + ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 - whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive' + whole_archive_flag_spec_F77='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object_F77=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 @@ -22066,17 +22750,17 @@ fi case $cc_basename in - xlf*) + xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec_F77='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' - archive_cmds_F77='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib' + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds_F77='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ - $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' + $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac @@ -22090,8 +22774,8 @@ archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; @@ -22109,8 +22793,8 @@ _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -22156,8 +22840,8 @@ *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi @@ -22197,8 +22881,10 @@ else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm + # Also, AIX nm treats weak defined symbols like other global + # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then - export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi @@ -22286,32 +22972,45 @@ allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" - archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" + archive_expsym_cmds_F77='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' @@ -22320,37 +23019,55 @@ else # Determine the default libpath from the value encoded in an # empty executable. - cat > conftest.$ac_ext <<_ACEOF + if test "${lt_cv_aix_libpath+set}" = set; then + aix_libpath=$lt_cv_aix_libpath +else + if ${lt_cv_aix_libpath__F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : -lt_aix_libpath_sed=' - /Import File Strings/,/^$/ { - /^0/ { - s/^0 *\(.*\)$/\1/ - p - } - }' -aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -# Check for a 64-bit object if we didn't find anything. -if test -z "$aix_libpath"; then - aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` -fi + lt_aix_libpath_sed=' + /Import File Strings/,/^$/ { + /^0/ { + s/^0 *\([^ ]*\) *$/\1/ + p + } + }' + lt_cv_aix_libpath__F77=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + # Check for a 64-bit object if we didn't find anything. + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` + fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext -if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + if test -z "$lt_cv_aix_libpath__F77"; then + lt_cv_aix_libpath__F77="/usr/lib:/lib" + fi + +fi + + aix_libpath=$lt_cv_aix_libpath__F77 +fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' + if test "$with_gnu_ld" = yes; then + # We only use this code for GNU lds that support --whole-archive. + whole_archive_flag_spec_F77='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + else + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77='$convenience' + fi archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' @@ -22382,20 +23099,63 @@ # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. - hardcode_libdir_flag_spec_F77=' ' - allow_undefined_flag_F77=unsupported - # Tell ltmain to make .lib files, not .a files. - libext=lib - # Tell ltmain to make .dll files, not .so files. - shrext_cmds=".dll" - # FIXME: Setting linknames here is a bad hack. - archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames=' - # The linker will automatically build a .lib file if we build a DLL. - old_archive_from_new_cmds_F77='true' - # FIXME: Should let the user specify the lib program. - old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' - fix_srcfile_path_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes + case $cc_basename in + cl*) + # Native MSVC + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + file_list_spec_F77='@' + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; + else + sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; + fi~ + $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ + linknames=' + # The linker will not automatically build a static lib if we build a DLL. + # _LT_TAGVAR(old_archive_from_new_cmds, F77)='true' + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' + # Don't use ranlib + old_postinstall_cmds_F77='chmod 644 $oldlib' + postlink_cmds_F77='lt_outputfile="@OUTPUT@"~ + lt_tool_outputfile="@TOOL_OUTPUT@"~ + case $lt_outputfile in + *.exe|*.EXE) ;; + *) + lt_outputfile="$lt_outputfile.exe" + lt_tool_outputfile="$lt_tool_outputfile.exe" + ;; + esac~ + if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then + $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; + $RM "$lt_outputfile.manifest"; + fi' + ;; + *) + # Assume MSVC wrapper + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext_cmds=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_from_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib -OUT:$oldlib$oldobjs$old_deplibs' + enable_shared_with_static_runtimes_F77=yes + ;; + esac ;; darwin* | rhapsody*) @@ -22405,7 +23165,11 @@ hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' + if test "$lt_cv_ld_force_load" = "yes"; then + whole_archive_flag_spec_F77='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' + else + whole_archive_flag_spec_F77='' + fi link_all_deplibs_F77=yes allow_undefined_flag_F77="$_lt_dar_allow_undefined" case $cc_basename in @@ -22413,7 +23177,7 @@ *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then - output_verbose_link_cmd=echo + output_verbose_link_cmd=func_echo_all archive_cmds_F77="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds_F77="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds_F77="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" @@ -22456,7 +23220,7 @@ # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) - archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no @@ -22464,7 +23228,7 @@ hpux9*) if test "$GCC" = yes; then - archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + archive_cmds_F77='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi @@ -22479,8 +23243,8 @@ ;; hpux10*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + if test "$GCC" = yes && test "$with_gnu_ld" = no; then + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi @@ -22498,16 +23262,16 @@ ;; hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then + if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else @@ -22519,7 +23283,7 @@ archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi @@ -22547,25 +23311,40 @@ irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" - cat > conftest.$ac_ext <<_ACEOF -int foo(void) {} + # This should be the same for all languages, so no per-tag cache variable. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 +$as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } +if ${lt_cv_irix_exported_symbol+:} false; then : + $as_echo_n "(cached) " >&6 +else + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" + cat > conftest.$ac_ext <<_ACEOF + + subroutine foo + end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' - + lt_cv_irix_exported_symbol=yes +else + lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS="$save_LDFLAGS" + LDFLAGS="$save_LDFLAGS" +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 +$as_echo "$lt_cv_irix_exported_symbol" >&6; } + if test "$lt_cv_irix_exported_symbol" = yes; then + archive_expsym_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' + fi else - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' @@ -22627,17 +23406,17 @@ hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported - archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + archive_cmds_F77='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc_F77='no' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' @@ -22647,13 +23426,13 @@ osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' - archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ - $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' + $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' @@ -22666,9 +23445,9 @@ no_undefined_flag_F77=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' - archive_cmds_F77='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_cmds_F77='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ - $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' + $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) @@ -22847,44 +23626,50 @@ # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } - $RM conftest* - echo "$lt_simple_compile_test_code" > conftest.$ac_ext +if ${lt_cv_archive_cmds_need_lc_F77+:} false; then : + $as_echo_n "(cached) " >&6 +else + $RM conftest* + echo "$lt_simple_compile_test_code" > conftest.$ac_ext - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then - soname=conftest - lib=conftest - libobjs=conftest.$ac_objext - deplibs= - wl=$lt_prog_compiler_wl_F77 - pic_flag=$lt_prog_compiler_pic_F77 - compiler_flags=-v - linker_flags=-v - verstring= - output_objdir=. - libname=conftest - lt_save_allow_undefined_flag=$allow_undefined_flag_F77 - allow_undefined_flag_F77= - if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + pic_flag=$lt_prog_compiler_pic_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_F77 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } - then - archive_cmds_need_lc_F77=no - else - archive_cmds_need_lc_F77=yes - fi - allow_undefined_flag_F77=$lt_save_allow_undefined_flag - else - cat conftest.err 1>&5 - fi - $RM conftest* - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc_F77" >&5 -$as_echo "$archive_cmds_need_lc_F77" >&6; } + test $ac_status = 0; } + then + lt_cv_archive_cmds_need_lc_F77=no + else + lt_cv_archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $RM conftest* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_F77" >&5 +$as_echo "$lt_cv_archive_cmds_need_lc_F77" >&6; } + archive_cmds_need_lc_F77=$lt_cv_archive_cmds_need_lc_F77 ;; esac fi @@ -23041,7 +23826,7 @@ m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. - finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; @@ -23072,8 +23857,9 @@ need_version=no need_lib_prefix=no - case $GCC,$host_os in - yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*) + case $GCC,$cc_basename in + yes,*) + # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ @@ -23094,36 +23880,82 @@ cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' - sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` - if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then - # It is most probably a Windows format PATH printed by - # mingw gcc, but we are running on Cygwin. Gcc prints its search - # path with ; separators, and with drive letters. We can handle the - # drive letters (cygwin fileutils understands them), so leave them, - # especially as we might pass files found there to a mingw objdump, - # which wouldn't understand a cygwinified path. Ahh. - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` - else - sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` - fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac + dynamic_linker='Win32 ld.exe' + ;; + + *,cl*) + # Native MSVC + libname_spec='$name' + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + library_names_spec='${libname}.dll.lib' + + case $build_os in + mingw*) + sys_lib_search_path_spec= + lt_save_ifs=$IFS + IFS=';' + for lt_path in $LIB + do + IFS=$lt_save_ifs + # Let DOS variable expansion print the short 8.3 style file name. + lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` + sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" + done + IFS=$lt_save_ifs + # Convert to MSYS style. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` + ;; + cygwin*) + # Convert to unix form, then to dos form, then back to unix form + # but this time dos style (no spaces!) so that the unix form looks + # like /cygdrive/c/PROGRA~1:/cygdr... + sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` + sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` + sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + ;; + *) + sys_lib_search_path_spec="$LIB" + if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH. + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + # FIXME: find the short name or the path components, as spaces are + # common. (e.g. "Program Files" -> "PROGRA~1") + ;; + esac + + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $RM \$dlpath' + shlibpath_overrides_runpath=yes + dynamic_linker='Win32 link.exe' ;; *) + # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + dynamic_linker='Win32 ld.exe' ;; esac - dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; @@ -23206,6 +24038,20 @@ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + +haiku*) + version_type=linux + need_lib_prefix=no + need_version=no + dynamic_linker="$host_os runtime_loader" + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LIBRARY_PATH + shlibpath_overrides_runpath=yes + sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; @@ -23251,8 +24097,10 @@ soname_spec='${libname}${release}${shared_ext}$major' ;; esac - # HP-UX runs *really* slowly unless shared libraries are mode 555. + # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' + # or fails outright, so override atomically: + install_override_mode=555 ;; interix[3-9]*) @@ -23319,25 +24167,34 @@ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no + # Some binutils ld are patched to set DT_RUNPATH - save_LDFLAGS=$LDFLAGS - save_libdir=$libdir - eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ - LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" - cat > conftest.$ac_ext <<_ACEOF + if ${lt_cv_shlibpath_overrides_runpath+:} false; then : + $as_echo_n "(cached) " >&6 +else + lt_cv_shlibpath_overrides_runpath=no + save_LDFLAGS=$LDFLAGS + save_libdir=$libdir + eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_F77\"; \ + LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_F77\"" + cat > conftest.$ac_ext <<_ACEOF program main end _ACEOF if ac_fn_f77_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : - shlibpath_overrides_runpath=yes + lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext - LDFLAGS=$save_LDFLAGS - libdir=$save_libdir + LDFLAGS=$save_LDFLAGS + libdir=$save_libdir + +fi + + shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install @@ -23346,7 +24203,7 @@ # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` + lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi @@ -23610,6 +24467,8 @@ + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_F77= @@ -23658,6 +24517,7 @@ GCC=$lt_save_GCC CC="$lt_save_CC" + CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes ac_ext=c @@ -23692,7 +24552,7 @@ if test "$enable_shared" = yes && test "$enable_static" = yes; then case $library_names_spec in *libname.a*) - as_fn_error "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5 + as_fn_error $? "cannot create both shared and static libraries on this system, --disable one of the two" "$LINENO" 5 ;; esac fi @@ -23712,7 +24572,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } -if test "${ac_cv_header_stdc+set}" = set; then : +if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23824,7 +24684,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } -if test "${ac_cv_header_time+set}" = set; then : +if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -23887,8 +24747,7 @@ do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" -eval as_val=\$$as_ac_Header - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF @@ -23912,7 +24771,7 @@ # endif #endif " -if test "x$ac_cv_header_sys_resource_h" = x""yes; then : +if test "x$ac_cv_header_sys_resource_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_RESOURCE_H 1 _ACEOF @@ -23929,7 +24788,7 @@ # include #endif " -if test "x$ac_cv_header_sys_sysctl_h" = x""yes; then : +if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SYSCTL_H 1 _ACEOF @@ -23946,7 +24805,7 @@ # include #endif " -if test "x$ac_cv_header_machine_hal_sysinfo_h" = x""yes; then : +if test "x$ac_cv_header_machine_hal_sysinfo_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MACHINE_HAL_SYSINFO_H 1 _ACEOF @@ -23968,7 +24827,7 @@ # to the man page (but aren't), in glibc they're in stdio.h. # ac_fn_c_check_decl "$LINENO" "fgetc" "ac_cv_have_decl_fgetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_fgetc" = x""yes; then : +if test "x$ac_cv_have_decl_fgetc" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23978,7 +24837,7 @@ #define HAVE_DECL_FGETC $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "fscanf" "ac_cv_have_decl_fscanf" "$ac_includes_default" -if test "x$ac_cv_have_decl_fscanf" = x""yes; then : +if test "x$ac_cv_have_decl_fscanf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23988,7 +24847,7 @@ #define HAVE_DECL_FSCANF $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "optarg" "ac_cv_have_decl_optarg" "$ac_includes_default" -if test "x$ac_cv_have_decl_optarg" = x""yes; then : +if test "x$ac_cv_have_decl_optarg" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -23998,7 +24857,7 @@ #define HAVE_DECL_OPTARG $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "ungetc" "ac_cv_have_decl_ungetc" "$ac_includes_default" -if test "x$ac_cv_have_decl_ungetc" = x""yes; then : +if test "x$ac_cv_have_decl_ungetc" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24008,7 +24867,7 @@ #define HAVE_DECL_UNGETC $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "vfprintf" "ac_cv_have_decl_vfprintf" "$ac_includes_default" -if test "x$ac_cv_have_decl_vfprintf" = x""yes; then : +if test "x$ac_cv_have_decl_vfprintf" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24021,7 +24880,7 @@ ac_fn_c_check_decl "$LINENO" "sys_errlist" "ac_cv_have_decl_sys_errlist" "#include #include " -if test "x$ac_cv_have_decl_sys_errlist" = x""yes; then : +if test "x$ac_cv_have_decl_sys_errlist" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24033,7 +24892,7 @@ ac_fn_c_check_decl "$LINENO" "sys_nerr" "ac_cv_have_decl_sys_nerr" "#include #include " -if test "x$ac_cv_have_decl_sys_nerr" = x""yes; then : +if test "x$ac_cv_have_decl_sys_nerr" = xyes; then : ac_have_decl=1 else ac_have_decl=0 @@ -24046,7 +24905,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } -if test "${ac_cv_type_signal+set}" = set; then : +if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24089,7 +24948,7 @@ # the default includes are sufficient for all these types # ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" -if test "x$ac_cv_type_intmax_t" = x""yes; then : +if test "x$ac_cv_type_intmax_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INTMAX_T 1 @@ -24098,7 +24957,7 @@ fi ac_fn_c_check_type "$LINENO" "long double" "ac_cv_type_long_double" "$ac_includes_default" -if test "x$ac_cv_type_long_double" = x""yes; then : +if test "x$ac_cv_type_long_double" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_DOUBLE 1 @@ -24107,7 +24966,7 @@ fi ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" -if test "x$ac_cv_type_long_long" = x""yes; then : +if test "x$ac_cv_type_long_long" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LONG_LONG 1 @@ -24116,7 +24975,7 @@ fi ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" -if test "x$ac_cv_type_ptrdiff_t" = x""yes; then : +if test "x$ac_cv_type_ptrdiff_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTRDIFF_T 1 @@ -24125,7 +24984,7 @@ fi ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default" -if test "x$ac_cv_type_quad_t" = x""yes; then : +if test "x$ac_cv_type_quad_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_QUAD_T 1 @@ -24134,7 +24993,7 @@ fi ac_fn_c_check_type "$LINENO" "uint_least32_t" "ac_cv_type_uint_least32_t" "$ac_includes_default" -if test "x$ac_cv_type_uint_least32_t" = x""yes; then : +if test "x$ac_cv_type_uint_least32_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UINT_LEAST32_T 1 @@ -24142,11 +25001,20 @@ fi +ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" +if test "x$ac_cv_type_intptr_t" = xyes; then : + +cat >>confdefs.h <<_ACEOF +#define HAVE_INTPTR_T 1 +_ACEOF + + +fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for preprocessor stringizing operator" >&5 $as_echo_n "checking for preprocessor stringizing operator... " >&6; } -if test "${ac_cv_c_stringize+set}" = set; then : +if ${ac_cv_c_stringize+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24178,7 +25046,7 @@ # But we don't use it in C++ currently. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 $as_echo_n "checking for working volatile... " >&6; } -if test "${ac_cv_c_volatile+set}" = set; then : +if ${ac_cv_c_volatile+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24213,7 +25081,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } -if test "${ac_cv_c_restrict+set}" = set; then : +if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no @@ -24260,7 +25128,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether exists and works" >&5 $as_echo_n "checking whether exists and works... " >&6; } -if test "${gmp_cv_c_stdarg+set}" = set; then : +if ${gmp_cv_c_stdarg+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24301,7 +25169,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((const)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((const)) works... " >&6; } -if test "${gmp_cv_c_attribute_const+set}" = set; then : +if ${gmp_cv_c_attribute_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24333,7 +25201,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((malloc)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((malloc)) works... " >&6; } -if test "${gmp_cv_c_attribute_malloc+set}" = set; then : +if ${gmp_cv_c_attribute_malloc+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.c <&5 $as_echo_n "checking whether gcc __attribute__ ((mode (XX))) works... " >&6; } -if test "${gmp_cv_c_attribute_mode+set}" = set; then : +if ${gmp_cv_c_attribute_mode+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24399,7 +25267,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gcc __attribute__ ((noreturn)) works" >&5 $as_echo_n "checking whether gcc __attribute__ ((noreturn)) works... " >&6; } -if test "${gmp_cv_c_attribute_noreturn+set}" = set; then : +if ${gmp_cv_c_attribute_noreturn+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24432,7 +25300,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } -if test "${ac_cv_c_inline+set}" = set; then : +if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no @@ -24481,7 +25349,6 @@ #define __GMP_WITHIN_CONFIGURE_INLINE 1 #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24516,13 +25383,13 @@ # from libtool LIBM= case $host in -*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) +*-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _mwvalidcheckl in -lmw" >&5 $as_echo_n "checking for _mwvalidcheckl in -lmw... " >&6; } -if test "${ac_cv_lib_mw__mwvalidcheckl+set}" = set; then : +if ${ac_cv_lib_mw__mwvalidcheckl+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24556,13 +25423,13 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mw__mwvalidcheckl" >&5 $as_echo "$ac_cv_lib_mw__mwvalidcheckl" >&6; } -if test "x$ac_cv_lib_mw__mwvalidcheckl" = x""yes; then : +if test "x$ac_cv_lib_mw__mwvalidcheckl" = xyes; then : LIBM="-lmw" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } -if test "${ac_cv_lib_m_cos+set}" = set; then : +if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24596,7 +25463,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = x""yes; then : +if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="$LIBM -lm" fi @@ -24604,7 +25471,7 @@ *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } -if test "${ac_cv_lib_m_cos+set}" = set; then : +if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -24638,7 +25505,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } -if test "x$ac_cv_lib_m_cos" = x""yes; then : +if test "x$ac_cv_lib_m_cos" = xyes; then : LIBM="-lm" fi @@ -24652,7 +25519,7 @@ # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } -if test "${gmp_cv_header_alloca+set}" = set; then : +if ${gmp_cv_header_alloca+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -24685,14 +25552,13 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca (via gmp-impl.h)" >&5 $as_echo_n "checking for alloca (via gmp-impl.h)... " >&6; } -if test "${gmp_cv_func_alloca+set}" = set; then : +if ${gmp_cv_func_alloca+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24726,7 +25592,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to allocate temporary memory" >&5 $as_echo_n "checking how to allocate temporary memory... " >&6; } -if test "${gmp_cv_option_alloca+set}" = set; then : +if ${gmp_cv_option_alloca+:} false; then : $as_echo_n "(cached) " >&6 else case $enable_alloca in @@ -24756,7 +25622,7 @@ case $gmp_cv_option_alloca in alloca) if test $gmp_cv_func_alloca = no; then - as_fn_error "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5 + as_fn_error $? "--enable-alloca=alloca specified, but alloca not available" "$LINENO" 5 fi $as_echo "#define WANT_TMP_ALLOCA 1" >>confdefs.h @@ -24779,7 +25645,7 @@ ;; *) # checks at the start of configure.in should protect us - as_fn_error "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5 + as_fn_error $? "unrecognised --enable-alloca=$gmp_cv_option_alloca" "$LINENO" 5 ;; esac @@ -24790,7 +25656,6 @@ #include #define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include "$srcdir/gmp-h.in" @@ -24818,7 +25683,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } -if test "${ac_cv_c_bigendian+set}" = set; then : +if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown @@ -25053,7 +25918,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking format of \`double' floating point" >&5 $as_echo_n "checking format of \`double' floating point... " >&6; } -if test "${gmp_cv_c_double_format+set}" = set; then : +if ${gmp_cv_c_double_format+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_c_double_format=unknown @@ -25324,8 +26189,7 @@ do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" -eval as_val=\$$as_ac_var - if test "x$as_val" = x""yes; then : +if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF @@ -25336,7 +26200,7 @@ ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" -if test "x$ac_cv_func_vsnprintf" = x""yes; then : +if test "x$ac_cv_func_vsnprintf" = xyes; then : gmp_vsnprintf_exists=yes else gmp_vsnprintf_exists=no @@ -25347,7 +26211,7 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf works" >&5 $as_echo_n "checking whether vsnprintf works... " >&6; } -if test "${gmp_cv_func_vsnprintf+set}" = set; then : +if ${gmp_cv_func_vsnprintf+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_func_vsnprintf=yes @@ -25434,7 +26298,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sscanf needs writable input" >&5 $as_echo_n "checking whether sscanf needs writable input... " >&6; } -if test "${gmp_cv_func_sscanf_writable_input+set}" = set; then : +if ${gmp_cv_func_sscanf_writable_input+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -25451,7 +26315,7 @@ $as_echo "#define SSCANF_WRITABLE_INPUT 1" >>confdefs.h ;; no) ;; - *) as_fn_error "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;; + *) as_fn_error $? "unrecognised \$gmp_cv_func_sscanf_writable_input" "$LINENO" 5 ;; esac @@ -25460,7 +26324,7 @@ # ac_fn_c_check_member "$LINENO" "struct pst_processor" "psp_iticksperclktick" "ac_cv_member_struct_pst_processor_psp_iticksperclktick" "#include " -if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = x""yes; then : +if test "x$ac_cv_member_struct_pst_processor_psp_iticksperclktick" = xyes; then : $as_echo "#define HAVE_PSP_ITICKSPERCLKTICK 1" >>confdefs.h @@ -25485,7 +26349,7 @@ for ac_header in sstream do : ac_fn_cxx_check_header_mongrel "$LINENO" "sstream" "ac_cv_header_sstream" "$ac_includes_default" -if test "x$ac_cv_header_sstream" = x""yes; then : +if test "x$ac_cv_header_sstream" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SSTREAM 1 _ACEOF @@ -25496,7 +26360,7 @@ ac_fn_cxx_check_type "$LINENO" "std::locale" "ac_cv_type_std__locale" "#include " -if test "x$ac_cv_type_std__locale" = x""yes; then : +if test "x$ac_cv_type_std__locale" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STD__LOCALE 1 @@ -25523,43 +26387,55 @@ # can provide some functions too. (mpn/Makefile.am passes # -DOPERATION_ to get them to generate the right code.) -# Note: The following lines defining $gmp_mpn_functions_optional -# and $gmp_mpn_functions are parsed by the "macos/configure" -# Perl script. So if you change the lines in a major way -# make sure to run and examine the output from -# -# % (cd macos; perl configure) -# # Note: $gmp_mpn_functions must have mod_1 before pre_mod_1 so the former # can optionally provide the latter as an extra entrypoint. Likewise # divrem_1 and pre_divrem_1. -gmp_mpn_functions_optional="umul udiv copyi copyd com_n - and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ +gmp_mpn_functions_optional="umul udiv \ invert_limb sqr_diagonal \ mul_2 mul_3 mul_4 \ addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8 \ - addlsh1_n sublsh1_n rsh1add_n rsh1sub_n addsub_n addaddmul_1msb0 lshiftc" + addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n \ + addlsh2_n sublsh2_n rsblsh2_n \ + addlsh_n sublsh_n rsblsh_n \ + add_n_sub_n addaddmul_1msb0" gmp_mpn_functions="$extra_functions \ - add add_1 add_n sub sub_1 sub_n neg_n mul_1 addmul_1 \ + add add_1 add_n sub sub_1 sub_n neg com mul_1 addmul_1 \ submul_1 lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2 \ fib2_ui mod_1 mod_34lsub1 mode1o pre_divrem_1 pre_mod_1 dump \ - mod_1_1 mod_1_2 mod_1_3 mod_1_4 \ - mul mul_fft mul_n mul_basecase sqr_basecase random random2 pow_1 \ - rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp perfsqr \ - bdivmod gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ + mod_1_1 mod_1_2 mod_1_3 mod_1_4 lshiftc \ + mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \ + random random2 pow_1 \ + rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp \ + perfsqr perfpow \ + gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ gcdext_lehmer gcdext_subdiv_step \ - tdiv_qr dc_divrem_n sb_divrem_mn jacbase get_d \ - matrix22_mul hgcd2 hgcd mullow_n mullow_basecase \ - toom22_mul toom33_mul toom44_mul \ - toom32_mul toom42_mul toom62_mul toom53_mul \ + div_q tdiv_qr jacbase get_d \ + matrix22_mul hgcd2 hgcd mullo_n mullo_basecase \ + toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \ + toom33_mul toom43_mul toom53_mul toom63_mul \ + toom44_mul \ + toom6h_mul toom6_sqr toom8h_mul toom8_sqr \ + toom_couple_handling \ toom2_sqr toom3_sqr toom4_sqr \ - toom_interpolate_5pts toom_interpolate_7pts invert binvert \ - sb_div_qr sb_divappr_q sb_div_q dc_div_qr dc_divappr_q dc_div_q \ + toom_eval_dgr3_pm1 toom_eval_dgr3_pm2 \ + toom_eval_pm1 toom_eval_pm2 toom_eval_pm2exp toom_eval_pm2rexp \ + toom_interpolate_5pts toom_interpolate_6pts toom_interpolate_7pts \ + toom_interpolate_8pts toom_interpolate_12pts toom_interpolate_16pts \ + invertappr invert binvert mulmod_bnm1 sqrmod_bnm1 \ + sbpi1_div_q sbpi1_div_qr sbpi1_divappr_q \ + dcpi1_div_q dcpi1_div_qr dcpi1_divappr_q \ mu_div_qr mu_divappr_q mu_div_q \ - sb_bdiv_q sb_bdiv_qr dc_bdiv_q dc_bdiv_qr mu_bdiv_q mu_bdiv_qr \ - divexact bdiv_dbm1c redc_1 redc_2 powm powlo powm_sec subcnd_n \ + bdiv_q_1 \ + sbpi1_bdiv_q sbpi1_bdiv_qr \ + dcpi1_bdiv_q dcpi1_bdiv_qr \ + mu_bdiv_q mu_bdiv_qr \ + bdiv_q bdiv_qr \ + divexact bdiv_dbm1c redc_1 redc_2 redc_n powm powlo powm_sec subcnd_n \ + redc_1_sec trialdiv remove \ + and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ + copyi copyd zero \ $gmp_mpn_functions_optional" @@ -25601,10 +26477,10 @@ # setup that structure, on a per-directory basis ready for # mpn//fat/fat.c. # -# fat.h includes thesholds listed in $fat_thresholds, extracted from +# fat.h includes thresholds listed in $fat_thresholds, extracted from # gmp-mparam.h in each directory. An overall maximum for each threshold is # established, for use in making fixed size arrays of temporary space. -# (Eg. MUL_TOOM3_THRESHOLD_LIMIT used by mpn/generic/mul.c.) +# (Eg. MUL_TOOM33_THRESHOLD_LIMIT used by mpn/generic/mul.c.) # # It'd be possible to do some of this manually, but when there's more than a # few functions and a few directories it becomes very tedious, and very @@ -25683,7 +26559,7 @@ echo " /* Copy all fields into __gmpn_cpuvec. memcpy is not used because it might operate byte-wise (depending on its - implemenation), and we need the function pointer writes to be atomic. + implementation), and we need the function pointer writes to be atomic. "volatile" discourages the compiler from trying to optimize this. */ #define CPUVEC_INSTALL(vec) \\ do { \\ @@ -25761,7 +26637,7 @@ esac # Extract desired thresholds from gmp-mparam.h file in this directory, - # if prsent. + # if present. tmp_mparam=$srcdir/mpn/$tmp_dir/gmp-mparam.h if test -f $tmp_mparam; then for tmp_tn in $fat_thresholds; do @@ -25792,8 +26668,24 @@ and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) tmp_mulfunc="logops_n" ;; lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n|sublsh1_n) - tmp_mulfunc="aorslsh1_n";; + addlsh1_n) + tmp_mulfunc="aorslsh1_n aorrlsh1_n";; + sublsh1_n) + tmp_mulfunc="aorslsh1_n sorrlsh1_n";; + rsblsh1_n) + tmp_mulfunc="aorrlsh1_n sorrlsh1_n";; + addlsh2_n) + tmp_mulfunc="aorslsh2_n aorrlsh2_n";; + sublsh2_n) + tmp_mulfunc="aorslsh2_n sorrlsh2_n";; + rsblsh2_n) + tmp_mulfunc="aorrlsh2_n sorrlsh2_n";; + addlsh_n) + tmp_mulfunc="aorslsh_n aorrlsh_n";; + sublsh_n) + tmp_mulfunc="aorslsh_n sorrlsh_n";; + rsblsh_n) + tmp_mulfunc="aorrlsh_n sorrlsh_n";; rsh1add_n|rsh1sub_n) tmp_mulfunc="rsh1aors_n";; esac @@ -25927,8 +26819,24 @@ and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) tmp_mulfunc="logops_n" ;; lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n|sublsh1_n) - tmp_mulfunc="aorslsh1_n";; + addlsh1_n) + tmp_mulfunc="aorslsh1_n aorrlsh1_n";; + sublsh1_n) + tmp_mulfunc="aorslsh1_n sorrlsh1_n";; + rsblsh1_n) + tmp_mulfunc="aorrlsh1_n sorrlsh1_n";; + addlsh2_n) + tmp_mulfunc="aorslsh2_n aorrlsh2_n";; + sublsh2_n) + tmp_mulfunc="aorslsh2_n sorrlsh2_n";; + rsblsh2_n) + tmp_mulfunc="aorrlsh2_n sorrlsh2_n";; + addlsh_n) + tmp_mulfunc="aorslsh_n aorrlsh_n";; + sublsh_n) + tmp_mulfunc="aorslsh_n sorrlsh_n";; + rsblsh_n) + tmp_mulfunc="aorrlsh_n sorrlsh_n";; rsh1add_n|rsh1sub_n) tmp_mulfunc="rsh1aors_n";; esac @@ -26036,7 +26944,7 @@ fi done if test $found = no; then - as_fn_error "no version of $tmp_fn found in path: $path" "$LINENO" 5 + as_fn_error $? "no version of $tmp_fn found in path: $path" "$LINENO" 5 fi fi done @@ -26055,7 +26963,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suitable m4" >&5 $as_echo_n "checking for suitable m4... " >&6; } -if test "${gmp_cv_prog_m4+set}" = set; then : +if ${gmp_cv_prog_m4+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$M4"; then @@ -26089,7 +26997,7 @@ done IFS="$ac_save_ifs" if test -z "$gmp_cv_prog_m4"; then - as_fn_error "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5 + as_fn_error $? "No usable m4 in \$PATH or /usr/5bin (see config.log for reasons)." "$LINENO" 5 fi fi rm -f conftest.m4 @@ -26103,7 +27011,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if m4wrap produces spurious output" >&5 $as_echo_n "checking if m4wrap produces spurious output... " >&6; } -if test "${gmp_cv_m4_m4wrap_spurious+set}" = set; then : +if ${gmp_cv_m4_m4wrap_spurious+:} false; then : $as_echo_n "(cached) " >&6 else # hide the d-n-l from autoconf's error checking @@ -26130,7 +27038,10 @@ else - M4=m4-not-needed + # In case the user has set M4 in the environment, don't touch it. + if test -z "$M4" ; then + M4=m4-not-needed + fi fi # Only do the GMP_ASM checks if there's a .S or .asm wanting them. @@ -26141,7 +27052,7 @@ if test "$gmp_asm_syntax_testing" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to text section" >&5 $as_echo_n "checking how to switch to text section... " >&6; } -if test "${gmp_cv_asm_text+set}" = set; then : +if ${gmp_cv_asm_text+:} false; then : $as_echo_n "(cached) " >&6 else for i in ".text" ".code" ".csect .text[PR]"; do @@ -26169,7 +27080,7 @@ done if test -z "$gmp_cv_asm_text"; then - as_fn_error "Cannot determine text section directive" "$LINENO" 5 + as_fn_error $? "Cannot determine text section directive" "$LINENO" 5 fi fi @@ -26179,7 +27090,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to data section" >&5 $as_echo_n "checking how to switch to data section... " >&6; } -if test "${gmp_cv_asm_data+set}" = set; then : +if ${gmp_cv_asm_data+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26195,7 +27106,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler label suffix" >&5 $as_echo_n "checking for assembler label suffix... " >&6; } -if test "${gmp_cv_asm_label_suffix+set}" = set; then : +if ${gmp_cv_asm_label_suffix+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_label_suffix=unknown @@ -26225,7 +27136,7 @@ done if test "$gmp_cv_asm_label_suffix" = "unknown"; then - as_fn_error "Cannot determine label suffix" "$LINENO" 5 + as_fn_error $? "Cannot determine label suffix" "$LINENO" 5 fi fi @@ -26236,7 +27147,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive" >&5 $as_echo_n "checking for assembler global directive... " >&6; } -if test "${gmp_cv_asm_globl+set}" = set; then : +if ${gmp_cv_asm_globl+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26253,7 +27164,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler global directive attribute" >&5 $as_echo_n "checking for assembler global directive attribute... " >&6; } -if test "${gmp_cv_asm_globl_attr+set}" = set; then : +if ${gmp_cv_asm_globl_attr+:} false; then : $as_echo_n "(cached) " >&6 else case $gmp_cv_asm_globl in @@ -26269,7 +27180,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if globals are prefixed by underscore" >&5 $as_echo_n "checking if globals are prefixed by underscore... " >&6; } -if test "${gmp_cv_asm_underscore+set}" = set; then : +if ${gmp_cv_asm_underscore+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_underscore="unknown" @@ -26340,19 +27251,20 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to switch to read-only data section" >&5 $as_echo_n "checking how to switch to read-only data section... " >&6; } -if test "${gmp_cv_asm_rodata+set}" = set; then : +if ${gmp_cv_asm_rodata+:} false; then : $as_echo_n "(cached) " >&6 else case $host in -i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | x86_64-*-*) +i?86*-*-* | k[5-8]*-*-* | pentium*-*-* | athlon-*-* | viac3*-*-* | geode*-*-* | atom-*-* | x86_64-*-*) gmp_cv_asm_rodata="$gmp_cv_asm_data" ;; *) gmp_cv_asm_rodata="$gmp_cv_asm_text" ;; esac cat >conftest.c <&5 cat conftest.c >&5 @@ -26397,7 +27309,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .type directive" >&5 $as_echo_n "checking for assembler .type directive... " >&6; } -if test "${gmp_cv_asm_type+set}" = set; then : +if ${gmp_cv_asm_type+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_type= @@ -26435,7 +27347,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler .size directive" >&5 $as_echo_n "checking for assembler .size directive... " >&6; } -if test "${gmp_cv_asm_size+set}" = set; then : +if ${gmp_cv_asm_size+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_size= @@ -26472,7 +27384,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler local label prefix" >&5 $as_echo_n "checking for assembler local label prefix... " >&6; } -if test "${gmp_cv_asm_lsym_prefix+set}" = set; then : +if ${gmp_cv_asm_lsym_prefix+:} false; then : $as_echo_n "(cached) " >&6 else gmp_tmp_pre_appears=yes @@ -26546,7 +27458,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler byte directive" >&5 $as_echo_n "checking for assembler byte directive... " >&6; } -if test "${gmp_cv_asm_byte+set}" = set; then : +if ${gmp_cv_asm_byte+:} false; then : $as_echo_n "(cached) " >&6 else for i in .byte data1; do @@ -26576,7 +27488,7 @@ done if test -z "$gmp_cv_asm_byte"; then - as_fn_error "Cannot determine how to emit a data byte" "$LINENO" 5 + as_fn_error $? "Cannot determine how to emit a data byte" "$LINENO" 5 fi fi @@ -26590,7 +27502,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to define a 32-bit word" >&5 $as_echo_n "checking how to define a 32-bit word... " >&6; } -if test "${gmp_cv_asm_w32+set}" = set; then : +if ${gmp_cv_asm_w32+:} false; then : $as_echo_n "(cached) " >&6 else case $host in @@ -26638,7 +27550,7 @@ ;; esac if test -z "$gmp_cv_asm_w32"; then - as_fn_error "cannot determine how to define a 32-bit word" "$LINENO" 5 + as_fn_error $? "cannot determine how to define a 32-bit word" "$LINENO" 5 fi fi @@ -26653,7 +27565,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if .align assembly directive is logarithmic" >&5 $as_echo_n "checking if .align assembly directive is logarithmic... " >&6; } -if test "${gmp_cv_asm_align_log+set}" = set; then : +if ${gmp_cv_asm_align_log+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "cannot assemble alignment test" "$LINENO" 5 + as_fn_error $? "cannot assemble alignment test" "$LINENO" 5 fi rm -f conftest* @@ -26706,7 +27618,7 @@ ia64*-*-* | itanium-*-* | itanium2-*-*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether assembler .align padding is good" >&5 $as_echo_n "checking whether assembler .align padding is good... " >&6; } -if test "${gmp_cv_asm_ia64_align_ok+set}" = set; then : +if ${gmp_cv_asm_ia64_align_ok+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.awk <<\EOF @@ -26832,7 +27744,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler instruction and register style" >&5 $as_echo_n "checking assembler instruction and register style... " >&6; } -if test "${gmp_cv_asm_m68k_instruction+set}" = set; then : +if ${gmp_cv_asm_m68k_instruction+:} false; then : $as_echo_n "(cached) " >&6 else for i in "addl %d0,%d1" "add.l %d0,%d1" "addl d0,d1" "add.l d0,d1"; do @@ -26860,7 +27772,7 @@ done if test -z "$gmp_cv_asm_m68k_instruction"; then - as_fn_error "cannot determine assembler instruction and register style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler instruction and register style" "$LINENO" 5 fi fi @@ -26871,7 +27783,7 @@ "addl %d0,%d1") want_dot_size=no; want_register_percent=yes ;; "add.l d0,d1") want_dot_size=yes; want_register_percent=no ;; "add.l %d0,%d1") want_dot_size=yes; want_register_percent=yes ;; -*) as_fn_error "oops, unrecognised instruction and register style" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised instruction and register style" "$LINENO" 5 ;; esac echo "define(, <\`$want_register_percent'>)" >> $gmp_tmpconfigm4 @@ -26884,18 +27796,18 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler addressing style" >&5 $as_echo_n "checking assembler addressing style... " >&6; } -if test "${gmp_cv_asm_m68k_addressing+set}" = set; then : +if ${gmp_cv_asm_m68k_addressing+:} false; then : $as_echo_n "(cached) " >&6 else case $gmp_cv_asm_m68k_instruction in addl*) movel=movel ;; add.l*) movel=move.l ;; -*) as_fn_error "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; esac case $gmp_cv_asm_m68k_instruction in *"%d0,%d1") dreg=%d0; areg=%a0 ;; *"d0,d1") dreg=d0; areg=a0 ;; -*) as_fn_error "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; +*) as_fn_error $? "oops, unrecognised gmp_cv_asm_m68k_instruction" "$LINENO" 5 ;; esac cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "cannot determine assembler addressing style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler addressing style" "$LINENO" 5 fi rm -f conftest* @@ -26947,7 +27859,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking assembler shortest branches" >&5 $as_echo_n "checking assembler shortest branches... " >&6; } -if test "${gmp_cv_asm_m68k_branches+set}" = set; then : +if ${gmp_cv_asm_m68k_branches+:} false; then : $as_echo_n "(cached) " >&6 else for i in jra jbra bra; do @@ -26976,7 +27888,7 @@ done if test -z "$gmp_cv_asm_m68k_branches"; then - as_fn_error "cannot determine assembler branching style" "$LINENO" 5 + as_fn_error $? "cannot determine assembler branching style" "$LINENO" 5 fi fi @@ -26991,7 +27903,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether compiler output is PIC by default" >&5 $as_echo_n "checking whether compiler output is PIC by default... " >&6; } -if test "${gmp_cv_asm_powerpc_pic+set}" = set; then : +if ${gmp_cv_asm_powerpc_pic+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_powerpc_pic=yes @@ -27028,7 +27940,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler needs r on registers" >&5 $as_echo_n "checking if the assembler needs r on registers... " >&6; } -if test "${gmp_cv_asm_powerpc_r_registers+set}" = set; then : +if ${gmp_cv_asm_powerpc_r_registers+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 echo "configure: failed program was:" >&5 cat conftest.s >&5 - as_fn_error "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5 + as_fn_error $? "neither \"mtctr 6\" nor \"mtctr r6\" works" "$LINENO" 5 fi rm -f conftest* @@ -27131,7 +28043,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler accepts \".register\"" >&5 $as_echo_n "checking if the assembler accepts \".register\"... " >&6; } -if test "${gmp_cv_asm_sparc_register+set}" = set; then : +if ${gmp_cv_asm_sparc_register+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if the .align directive accepts an 0x90 fill in .text... " >&6; } -if test "${gmp_cv_asm_align_fill_0x90+set}" = set; then : +if ${gmp_cv_asm_align_fill_0x90+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking for assembler COFF type directives... " >&6; } -if test "${gmp_cv_asm_x86_coff_type+set}" = set; then : +if ${gmp_cv_asm_x86_coff_type+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <&5 $as_echo_n "checking if _GLOBAL_OFFSET_TABLE_ is prefixed by underscore... " >&6; } -if test "${gmp_cv_asm_x86_got_underscore+set}" = set; then : +if ${gmp_cv_asm_x86_got_underscore+:} false; then : $as_echo_n "(cached) " >&6 else gmp_cv_asm_x86_got_underscore="not applicable" @@ -27314,7 +28226,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the assembler takes cl with shldl" >&5 $as_echo_n "checking if the assembler takes cl with shldl... " >&6; } -if test "${gmp_cv_asm_x86_shldl_cl+set}" = set; then : +if ${gmp_cv_asm_x86_shldl_cl+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.s <> $gmp_tmpconfigm4i + $as_echo "#define HAVE_HOST_CPU_FAMILY_x86_64 1" >>confdefs.h + case $host in *-*-darwin*) @@ -27499,7 +28413,7 @@ fi done if test -z "$gmp_mparam_source"; then - as_fn_error "no version of gmp-mparam.h found in path: $path" "$LINENO" 5 + as_fn_error $? "no version of gmp-mparam.h found in path: $path" "$LINENO" 5 fi # For a helpful message from tune/tuneup.c @@ -27517,15 +28431,15 @@ -# Copy any SQR_KARATSUBA_THRESHOLD from gmp-mparam.h to config.m4. +# Copy any SQR_TOOM2_THRESHOLD from gmp-mparam.h to config.m4. # Some versions of sqr_basecase.asm use this. # Fat binaries do this on a per-file basis, so skip in that case. # if test -z "$fat_path"; then - tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_KARATSUBA_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` + tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_TOOM2_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` if test -n "$tmp_gmp_karatsuba_sqr_threshold"; then -echo "define(,<$tmp_gmp_karatsuba_sqr_threshold>)" >> $gmp_tmpconfigm4 +echo "define(,<$tmp_gmp_karatsuba_sqr_threshold>)" >> $gmp_tmpconfigm4 fi fi @@ -27533,8 +28447,8 @@ # Sizes of some types, needed at preprocessing time. # -# FIXME: The assumption that BITS_PER_MP_LIMB is 8*sizeof(mp_limb_t) might -# be slightly rash, but it's true everwhere we know of and ought to be true +# FIXME: The assumption that GMP_LIMB_BITS is 8*sizeof(mp_limb_t) might +# be slightly rash, but it's true everywhere we know of and ought to be true # of any sensible system. In a generic C build, grepping LONG_BIT out of # might be an alternative, for maximum portability. # @@ -27542,9 +28456,42 @@ # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of void *" >&5 +$as_echo_n "checking size of void *... " >&6; } +if ${ac_cv_sizeof_void_p+:} false; then : + $as_echo_n "(cached) " >&6 +else + if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (void *))" "ac_cv_sizeof_void_p" "$ac_includes_default"; then : + +else + if test "$ac_cv_type_void_p" = yes; then + { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 +$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} +as_fn_error 77 "cannot compute sizeof (void *) +See \`config.log' for more details" "$LINENO" 5; } + else + ac_cv_sizeof_void_p=0 + fi +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_void_p" >&5 +$as_echo "$ac_cv_sizeof_void_p" >&6; } + + + +cat >>confdefs.h <<_ACEOF +#define SIZEOF_VOID_P $ac_cv_sizeof_void_p +_ACEOF + + +# The cast to long int works around a bug in the HP C Compiler +# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects +# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. +# This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned short" >&5 $as_echo_n "checking size of unsigned short... " >&6; } -if test "${ac_cv_sizeof_unsigned_short+set}" = set; then : +if ${ac_cv_sizeof_unsigned_short+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned short))" "ac_cv_sizeof_unsigned_short" "$ac_includes_default"; then : @@ -27553,9 +28500,8 @@ if test "$ac_cv_type_unsigned_short" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned short) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned short) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_short=0 fi @@ -27578,7 +28524,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned" >&5 $as_echo_n "checking size of unsigned... " >&6; } -if test "${ac_cv_sizeof_unsigned+set}" = set; then : +if ${ac_cv_sizeof_unsigned+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned))" "ac_cv_sizeof_unsigned" "$ac_includes_default"; then : @@ -27587,9 +28533,8 @@ if test "$ac_cv_type_unsigned" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned=0 fi @@ -27612,7 +28557,7 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 $as_echo_n "checking size of unsigned long... " >&6; } -if test "${ac_cv_sizeof_unsigned_long+set}" = set; then : +if ${ac_cv_sizeof_unsigned_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : @@ -27621,9 +28566,8 @@ if test "$ac_cv_type_unsigned_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (unsigned long) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (unsigned long) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long=0 fi @@ -27646,12 +28590,11 @@ # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of mp_limb_t" >&5 $as_echo_n "checking size of mp_limb_t... " >&6; } -if test "${ac_cv_sizeof_mp_limb_t+set}" = set; then : +if ${ac_cv_sizeof_mp_limb_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (mp_limb_t))" "ac_cv_sizeof_mp_limb_t" "#define __GMP_WITHIN_CONFIGURE 1 /* ignore template stuff */ #define GMP_NAIL_BITS $GMP_NAIL_BITS -#define __GMP_BITS_PER_MP_LIMB 123 /* dummy for GMP_NUMB_BITS etc */ #define GMP_LIMB_BITS 123 $DEFN_LONG_LONG_LIMB #include \"$srcdir/gmp-h.in\" @@ -27662,9 +28605,8 @@ if test "$ac_cv_type_mp_limb_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -{ as_fn_set_status 77 -as_fn_error "cannot compute sizeof (mp_limb_t) -See \`config.log' for more details." "$LINENO" 5; }; } +as_fn_error 77 "cannot compute sizeof (mp_limb_t) +See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_mp_limb_t=0 fi @@ -27682,9 +28624,9 @@ if test "$ac_cv_sizeof_mp_limb_t" = 0; then - as_fn_error "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5 + as_fn_error $? "Oops, mp_limb_t doesn't seem to work" "$LINENO" 5 fi -BITS_PER_MP_LIMB=`expr 8 \* $ac_cv_sizeof_mp_limb_t` +GMP_LIMB_BITS=`expr 8 \* $ac_cv_sizeof_mp_limb_t` echo "define(,<$ac_cv_sizeof_unsigned>)" >> $gmp_tmpconfigm4 @@ -27697,21 +28639,21 @@ # probably wouldn't want to be fatal, none of the libgmp assembler code # depends on ulong. # -mparam_bits=`sed -n 's/^#define BITS_PER_MP_LIMB[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source` -if test -n "$mparam_bits" && test "$mparam_bits" -ne $BITS_PER_MP_LIMB; then +mparam_bits=`sed -n 's/^#define GMP_LIMB_BITS[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source` +if test -n "$mparam_bits" && test "$mparam_bits" -ne $GMP_LIMB_BITS; then if test "$test_CFLAGS" = set; then - as_fn_error "Oops, mp_limb_t is $BITS_PER_MP_LIMB bits, but the assembler code + as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code in this configuration expects $mparam_bits bits. You appear to have set \$CFLAGS, perhaps you also need to tell GMP the intended ABI, see \"ABI and ISA\" in the manual." "$LINENO" 5 else - as_fn_error "Oops, mp_limb_t is $BITS_PER_MP_LIMB bits, but the assembler code + as_fn_error $? "Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code in this configuration expects $mparam_bits bits." "$LINENO" 5 fi fi -echo "define(,$BITS_PER_MP_LIMB)" >> $gmp_tmpconfigm4 +echo "define(,$GMP_LIMB_BITS)" >> $gmp_tmpconfigm4 echo "define(,$GMP_NAIL_BITS)" >> $gmp_tmpconfigm4 @@ -27745,12 +28687,12 @@ test -d tune || mkdir tune case $sqr_basecase_source in *.asm) - sqr_max=`sed -n 's/^def...(SQR_KARATSUBA_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source` + sqr_max=`sed -n 's/^def...(SQR_TOOM2_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source` if test -n "$sqr_max"; then TUNE_SQR_OBJ=sqr_asm.o cat >>confdefs.h <<_ACEOF -#define TUNE_SQR_KARATSUBA_MAX $sqr_max +#define TUNE_SQR_TOOM2_MAX $sqr_max _ACEOF fi @@ -27761,7 +28703,7 @@ ;; *.c) TUNE_SQR_OBJ= - $as_echo "#define TUNE_SQR_KARATSUBA_MAX SQR_KARATSUBA_MAX_GENERIC" >>confdefs.h + $as_echo "#define TUNE_SQR_TOOM2_MAX SQR_TOOM2_MAX_GENERIC" >>confdefs.h cat >tune/sqr_basecase.c < " -if test "x$ac_cv_type_stack_t" = x""yes; then : +if test "x$ac_cv_type_stack_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STACK_T 1 @@ -27867,7 +28809,7 @@ if test $with_readline != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lncurses" >&5 $as_echo_n "checking for tputs in -lncurses... " >&6; } -if test "${ac_cv_lib_ncurses_tputs+set}" = set; then : +if ${ac_cv_lib_ncurses_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27901,12 +28843,12 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tputs" >&5 $as_echo "$ac_cv_lib_ncurses_tputs" >&6; } -if test "x$ac_cv_lib_ncurses_tputs" = x""yes; then : +if test "x$ac_cv_lib_ncurses_tputs" = xyes; then : LIBCURSES=-lncurses else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tputs in -lcurses" >&5 $as_echo_n "checking for tputs in -lcurses... " >&6; } -if test "${ac_cv_lib_curses_tputs+set}" = set; then : +if ${ac_cv_lib_curses_tputs+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27940,7 +28882,7 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tputs" >&5 $as_echo "$ac_cv_lib_curses_tputs" >&6; } -if test "x$ac_cv_lib_curses_tputs" = x""yes; then : +if test "x$ac_cv_lib_curses_tputs" = xyes; then : LIBCURSES=-lcurses fi @@ -27953,7 +28895,7 @@ use_readline=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for readline in -lreadline" >&5 $as_echo_n "checking for readline in -lreadline... " >&6; } -if test "${ac_cv_lib_readline_readline+set}" = set; then : +if ${ac_cv_lib_readline_readline+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS @@ -27987,11 +28929,11 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_readline_readline" >&5 $as_echo "$ac_cv_lib_readline_readline" >&6; } -if test "x$ac_cv_lib_readline_readline" = x""yes; then : +if test "x$ac_cv_lib_readline_readline" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/readline.h" "ac_cv_header_readline_readline_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_readline_h" = x""yes; then : +if test "x$ac_cv_header_readline_readline_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "readline/history.h" "ac_cv_header_readline_history_h" "$ac_includes_default" -if test "x$ac_cv_header_readline_history_h" = x""yes; then : +if test "x$ac_cv_header_readline_history_h" = xyes; then : use_readline=yes fi @@ -28020,7 +28962,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_YACC+set}" = set; then : +if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then @@ -28063,7 +29005,7 @@ set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_LEX+set}" = set; then : +if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then @@ -28133,7 +29075,7 @@ test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } -if test "${ac_cv_prog_lex_root+set}" = set; then : +if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else @@ -28142,7 +29084,7 @@ elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else - as_fn_error "cannot find output from $LEX; giving up" "$LINENO" 5 + as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 @@ -28152,7 +29094,7 @@ if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } -if test "${ac_cv_lib_lex+set}" = set; then : +if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else @@ -28182,7 +29124,7 @@ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } -if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then : +if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the @@ -28193,7 +29135,8 @@ LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ -#define YYTEXT_POINTER 1 + + #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : @@ -28230,7 +29173,7 @@ set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_RANLIB+set}" = set; then : +if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then @@ -28270,7 +29213,7 @@ set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then : +if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then @@ -28414,10 +29357,21 @@ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then - test "x$cache_file" != "x/dev/null" && + if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file + if test ! -f "$cache_file" || test -h "$cache_file"; then + cat confcache >"$cache_file" + else + case $cache_file in #( + */* | ?:*) + mv -f confcache "$cache_file"$$ && + mv -f "$cache_file"$$ "$cache_file" ;; #( + *) + mv -f confcache "$cache_file" ;; + esac + fi + fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} @@ -28456,24 +29410,24 @@ fi if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then - as_fn_error "conditional \"MAINTAINER_MODE\" was never defined. + as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WANT_MPBSD_TRUE}" && test -z "${WANT_MPBSD_FALSE}"; then - as_fn_error "conditional \"WANT_MPBSD\" was never defined. + as_fn_error $? "conditional \"WANT_MPBSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WANT_CXX_TRUE}" && test -z "${WANT_CXX_FALSE}"; then - as_fn_error "conditional \"WANT_CXX\" was never defined. + as_fn_error $? "conditional \"WANT_CXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then - as_fn_error "conditional \"ENABLE_STATIC\" was never defined. + as_fn_error $? "conditional \"ENABLE_STATIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -: ${CONFIG_STATUS=./config.status} +: "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" @@ -28574,6 +29528,7 @@ IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. +as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR @@ -28619,19 +29574,19 @@ (unset CDPATH) >/dev/null 2>&1 && unset CDPATH -# as_fn_error ERROR [LINENO LOG_FD] -# --------------------------------- +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the -# script with status $?, using 1 if that was 0. +# script with STATUS, using 1 if that was 0. as_fn_error () { - as_status=$?; test $as_status -eq 0 && as_status=1 - if test "$3"; then - as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi - $as_echo "$as_me: error: $1" >&2 + $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error @@ -28827,7 +29782,7 @@ test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p @@ -28880,8 +29835,8 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by GNU MP $as_me 4.3.2, which was -generated by GNU Autoconf 2.65. Invocation command line was +This file was extended by GNU MP $as_me 5.0.2, which was +generated by GNU Autoconf 2.68. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS @@ -28952,11 +29907,11 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -GNU MP config.status 4.3.2 -configured by $0, generated by GNU Autoconf 2.65, +GNU MP config.status 5.0.2 +configured by $0, generated by GNU Autoconf 2.68, with options \\"\$ac_cs_config\\" -Copyright (C) 2009 Free Software Foundation, Inc. +Copyright (C) 2010 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." @@ -28974,11 +29929,16 @@ while test $# != 0 do case $1 in - --*=*) + --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; + --*=) + ac_option=`expr "X$1" : 'X\([^=]*\)='` + ac_optarg= + ac_shift=: + ;; *) ac_option=$1 ac_optarg=$2 @@ -29000,6 +29960,7 @@ $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; + '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; @@ -29012,7 +29973,7 @@ ac_need_defaults=false;; --he | --h) # Conflict between --help and --header - as_fn_error "ambiguous option: \`$1' + as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; @@ -29021,7 +29982,7 @@ ac_cs_silent=: ;; # This is an error. - -*) as_fn_error "unrecognized option: \`$1' + -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" @@ -29074,233 +30035,261 @@ sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' -NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`' -AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`' -macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`' -macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`' -enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`' -pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`' -enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`' -host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`' -host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`' -host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`' -build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`' -build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`' -build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`' -SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`' -Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`' -GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`' -EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`' -FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`' -LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`' -LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`' -max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`' -ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`' -exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`' -lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`' -lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`' -lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`' -reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`' -reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`' -deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`' -file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`' -AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`' -AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`' -STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`' -RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`' -old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`' -CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`' -compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`' -GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`' -SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`' -ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`' -MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`' -need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`' -DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`' -NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`' -LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`' -OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`' -libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`' -shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`' -extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`' -variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`' -need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`' -need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`' -version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`' -runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`' -shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`' -libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`' -library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`' -soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`' -postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`' -finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`' -enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`' -old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`' -striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs='`$ECHO "X$compiler_lib_search_dirs" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects='`$ECHO "X$predep_objects" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects='`$ECHO "X$postdep_objects" | $Xsed -e "$delay_single_quote_subst"`' -predeps='`$ECHO "X$predeps" | $Xsed -e "$delay_single_quote_subst"`' -postdeps='`$ECHO "X$postdeps" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path='`$ECHO "X$compiler_lib_search_path" | $Xsed -e "$delay_single_quote_subst"`' -LD_CXX='`$ECHO "X$LD_CXX" | $Xsed -e "$delay_single_quote_subst"`' -LD_F77='`$ECHO "X$LD_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_CXX='`$ECHO "X$old_archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_cmds_F77='`$ECHO "X$old_archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_CXX='`$ECHO "X$compiler_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_F77='`$ECHO "X$compiler_F77" | $Xsed -e "$delay_single_quote_subst"`' -GCC_CXX='`$ECHO "X$GCC_CXX" | $Xsed -e "$delay_single_quote_subst"`' -GCC_F77='`$ECHO "X$GCC_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "X$lt_prog_compiler_no_builtin_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_no_builtin_flag_F77='`$ECHO "X$lt_prog_compiler_no_builtin_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_CXX='`$ECHO "X$lt_prog_compiler_wl_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_wl_F77='`$ECHO "X$lt_prog_compiler_wl_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_CXX='`$ECHO "X$lt_prog_compiler_pic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_pic_F77='`$ECHO "X$lt_prog_compiler_pic_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_CXX='`$ECHO "X$lt_prog_compiler_static_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_prog_compiler_static_F77='`$ECHO "X$lt_prog_compiler_static_F77" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_CXX='`$ECHO "X$lt_cv_prog_compiler_c_o_CXX" | $Xsed -e "$delay_single_quote_subst"`' -lt_cv_prog_compiler_c_o_F77='`$ECHO "X$lt_cv_prog_compiler_c_o_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_CXX='`$ECHO "X$archive_cmds_need_lc_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_need_lc_F77='`$ECHO "X$archive_cmds_need_lc_F77" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_CXX='`$ECHO "X$enable_shared_with_static_runtimes_CXX" | $Xsed -e "$delay_single_quote_subst"`' -enable_shared_with_static_runtimes_F77='`$ECHO "X$enable_shared_with_static_runtimes_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_CXX='`$ECHO "X$export_dynamic_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_dynamic_flag_spec_F77='`$ECHO "X$export_dynamic_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_CXX='`$ECHO "X$whole_archive_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -whole_archive_flag_spec_F77='`$ECHO "X$whole_archive_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_CXX='`$ECHO "X$compiler_needs_object_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_needs_object_F77='`$ECHO "X$compiler_needs_object_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_CXX='`$ECHO "X$old_archive_from_new_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_new_cmds_F77='`$ECHO "X$old_archive_from_new_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_CXX='`$ECHO "X$old_archive_from_expsyms_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -old_archive_from_expsyms_cmds_F77='`$ECHO "X$old_archive_from_expsyms_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_CXX='`$ECHO "X$archive_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_cmds_F77='`$ECHO "X$archive_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_CXX='`$ECHO "X$archive_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -archive_expsym_cmds_F77='`$ECHO "X$archive_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_CXX='`$ECHO "X$module_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_cmds_F77='`$ECHO "X$module_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_CXX='`$ECHO "X$module_expsym_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -module_expsym_cmds_F77='`$ECHO "X$module_expsym_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_CXX='`$ECHO "X$with_gnu_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -with_gnu_ld_F77='`$ECHO "X$with_gnu_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_CXX='`$ECHO "X$allow_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -allow_undefined_flag_F77='`$ECHO "X$allow_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_CXX='`$ECHO "X$no_undefined_flag_CXX" | $Xsed -e "$delay_single_quote_subst"`' -no_undefined_flag_F77='`$ECHO "X$no_undefined_flag_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_CXX='`$ECHO "X$hardcode_libdir_flag_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_F77='`$ECHO "X$hardcode_libdir_flag_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_CXX='`$ECHO "X$hardcode_libdir_flag_spec_ld_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_flag_spec_ld_F77='`$ECHO "X$hardcode_libdir_flag_spec_ld_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_CXX='`$ECHO "X$hardcode_libdir_separator_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_libdir_separator_F77='`$ECHO "X$hardcode_libdir_separator_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_CXX='`$ECHO "X$hardcode_direct_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_F77='`$ECHO "X$hardcode_direct_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_CXX='`$ECHO "X$hardcode_direct_absolute_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_direct_absolute_F77='`$ECHO "X$hardcode_direct_absolute_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_CXX='`$ECHO "X$hardcode_minus_L_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_minus_L_F77='`$ECHO "X$hardcode_minus_L_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_CXX='`$ECHO "X$hardcode_shlibpath_var_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_shlibpath_var_F77='`$ECHO "X$hardcode_shlibpath_var_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_CXX='`$ECHO "X$hardcode_automatic_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_automatic_F77='`$ECHO "X$hardcode_automatic_F77" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_CXX='`$ECHO "X$inherit_rpath_CXX" | $Xsed -e "$delay_single_quote_subst"`' -inherit_rpath_F77='`$ECHO "X$inherit_rpath_F77" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_CXX='`$ECHO "X$link_all_deplibs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -link_all_deplibs_F77='`$ECHO "X$link_all_deplibs_F77" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_CXX='`$ECHO "X$fix_srcfile_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -fix_srcfile_path_F77='`$ECHO "X$fix_srcfile_path_F77" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_CXX='`$ECHO "X$always_export_symbols_CXX" | $Xsed -e "$delay_single_quote_subst"`' -always_export_symbols_F77='`$ECHO "X$always_export_symbols_F77" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_CXX='`$ECHO "X$export_symbols_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -export_symbols_cmds_F77='`$ECHO "X$export_symbols_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_CXX='`$ECHO "X$exclude_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -exclude_expsyms_F77='`$ECHO "X$exclude_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_CXX='`$ECHO "X$include_expsyms_CXX" | $Xsed -e "$delay_single_quote_subst"`' -include_expsyms_F77='`$ECHO "X$include_expsyms_F77" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_CXX='`$ECHO "X$prelink_cmds_CXX" | $Xsed -e "$delay_single_quote_subst"`' -prelink_cmds_F77='`$ECHO "X$prelink_cmds_F77" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_CXX='`$ECHO "X$file_list_spec_CXX" | $Xsed -e "$delay_single_quote_subst"`' -file_list_spec_F77='`$ECHO "X$file_list_spec_F77" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_CXX='`$ECHO "X$hardcode_action_CXX" | $Xsed -e "$delay_single_quote_subst"`' -hardcode_action_F77='`$ECHO "X$hardcode_action_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_CXX='`$ECHO "X$compiler_lib_search_dirs_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_dirs_F77='`$ECHO "X$compiler_lib_search_dirs_F77" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_CXX='`$ECHO "X$predep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predep_objects_F77='`$ECHO "X$predep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_CXX='`$ECHO "X$postdep_objects_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdep_objects_F77='`$ECHO "X$postdep_objects_F77" | $Xsed -e "$delay_single_quote_subst"`' -predeps_CXX='`$ECHO "X$predeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -predeps_F77='`$ECHO "X$predeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_CXX='`$ECHO "X$postdeps_CXX" | $Xsed -e "$delay_single_quote_subst"`' -postdeps_F77='`$ECHO "X$postdeps_F77" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_CXX='`$ECHO "X$compiler_lib_search_path_CXX" | $Xsed -e "$delay_single_quote_subst"`' -compiler_lib_search_path_F77='`$ECHO "X$compiler_lib_search_path_F77" | $Xsed -e "$delay_single_quote_subst"`' +NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' +macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' +macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' +pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' +SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' +ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' +host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' +host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' +host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' +build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' +build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' +build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' +SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' +Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' +GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' +EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' +FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' +LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' +LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' +max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' +ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' +exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' +lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' +lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' +lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' +lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' +lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' +reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' +reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' +deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' +file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' +file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' +want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' +sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' +AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' +AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' +archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' +STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' +RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' +old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' +old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' +lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' +CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' +CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' +compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' +GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' +lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' +nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' +lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' +objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' +MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' +need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' +MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' +DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' +NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' +LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' +OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' +OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' +libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' +shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' +extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' +compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' +archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' +module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' +with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' +no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld='`$ECHO "$hardcode_libdir_flag_spec_ld" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' +hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' +hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' +inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' +link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' +always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' +exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' +include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' +prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' +postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' +file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' +variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' +need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' +need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' +version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' +runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' +shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' +libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' +library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' +soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' +install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' +postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' +postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' +finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' +finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' +hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' +sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' +sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' +hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' +enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' +enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' +old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' +striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' +predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' +postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' +predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' +postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' +LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' +LD_F77='`$ECHO "$LD_F77" | $SED "$delay_single_quote_subst"`' +reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' +reload_flag_F77='`$ECHO "$reload_flag_F77" | $SED "$delay_single_quote_subst"`' +reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' +reload_cmds_F77='`$ECHO "$reload_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_cmds_F77='`$ECHO "$old_archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' +compiler_F77='`$ECHO "$compiler_F77" | $SED "$delay_single_quote_subst"`' +GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' +GCC_F77='`$ECHO "$GCC_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_no_builtin_flag_F77='`$ECHO "$lt_prog_compiler_no_builtin_flag_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_pic_F77='`$ECHO "$lt_prog_compiler_pic_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_wl_F77='`$ECHO "$lt_prog_compiler_wl_F77" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' +lt_prog_compiler_static_F77='`$ECHO "$lt_prog_compiler_static_F77" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' +lt_cv_prog_compiler_c_o_F77='`$ECHO "$lt_cv_prog_compiler_c_o_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_need_lc_F77='`$ECHO "$archive_cmds_need_lc_F77" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' +enable_shared_with_static_runtimes_F77='`$ECHO "$enable_shared_with_static_runtimes_F77" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +export_dynamic_flag_spec_F77='`$ECHO "$export_dynamic_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +whole_archive_flag_spec_F77='`$ECHO "$whole_archive_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' +compiler_needs_object_F77='`$ECHO "$compiler_needs_object_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_new_cmds_F77='`$ECHO "$old_archive_from_new_cmds_F77" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' +old_archive_from_expsyms_cmds_F77='`$ECHO "$old_archive_from_expsyms_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_cmds_F77='`$ECHO "$archive_cmds_F77" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +archive_expsym_cmds_F77='`$ECHO "$archive_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_cmds_F77='`$ECHO "$module_cmds_F77" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' +module_expsym_cmds_F77='`$ECHO "$module_expsym_cmds_F77" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' +with_gnu_ld_F77='`$ECHO "$with_gnu_ld_F77" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +allow_undefined_flag_F77='`$ECHO "$allow_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' +no_undefined_flag_F77='`$ECHO "$no_undefined_flag_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_F77='`$ECHO "$hardcode_libdir_flag_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_CXX='`$ECHO "$hardcode_libdir_flag_spec_ld_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_flag_spec_ld_F77='`$ECHO "$hardcode_libdir_flag_spec_ld_F77" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_libdir_separator_F77='`$ECHO "$hardcode_libdir_separator_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_F77='`$ECHO "$hardcode_direct_F77" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_direct_absolute_F77='`$ECHO "$hardcode_direct_absolute_F77" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_minus_L_F77='`$ECHO "$hardcode_minus_L_F77" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_shlibpath_var_F77='`$ECHO "$hardcode_shlibpath_var_F77" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_automatic_F77='`$ECHO "$hardcode_automatic_F77" | $SED "$delay_single_quote_subst"`' +inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' +inherit_rpath_F77='`$ECHO "$inherit_rpath_F77" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' +link_all_deplibs_F77='`$ECHO "$link_all_deplibs_F77" | $SED "$delay_single_quote_subst"`' +always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' +always_export_symbols_F77='`$ECHO "$always_export_symbols_F77" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' +export_symbols_cmds_F77='`$ECHO "$export_symbols_cmds_F77" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +exclude_expsyms_F77='`$ECHO "$exclude_expsyms_F77" | $SED "$delay_single_quote_subst"`' +include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' +include_expsyms_F77='`$ECHO "$include_expsyms_F77" | $SED "$delay_single_quote_subst"`' +prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +prelink_cmds_F77='`$ECHO "$prelink_cmds_F77" | $SED "$delay_single_quote_subst"`' +postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' +postlink_cmds_F77='`$ECHO "$postlink_cmds_F77" | $SED "$delay_single_quote_subst"`' +file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' +file_list_spec_F77='`$ECHO "$file_list_spec_F77" | $SED "$delay_single_quote_subst"`' +hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' +hardcode_action_F77='`$ECHO "$hardcode_action_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_dirs_F77='`$ECHO "$compiler_lib_search_dirs_F77" | $SED "$delay_single_quote_subst"`' +predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' +predep_objects_F77='`$ECHO "$predep_objects_F77" | $SED "$delay_single_quote_subst"`' +postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' +postdep_objects_F77='`$ECHO "$postdep_objects_F77" | $SED "$delay_single_quote_subst"`' +predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' +predeps_F77='`$ECHO "$predeps_F77" | $SED "$delay_single_quote_subst"`' +postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' +postdeps_F77='`$ECHO "$postdeps_F77" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' +compiler_lib_search_path_F77='`$ECHO "$compiler_lib_search_path_F77" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + # Quote evaled strings. for var in NM \ +AS \ +DLLTOOL \ +OBJDUMP \ +SHELL \ +ECHO \ SED \ GREP \ EGREP \ @@ -29312,8 +30301,12 @@ reload_flag \ deplibs_check_method \ file_magic_cmd \ +file_magic_glob \ +want_nocaseglob \ +sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ +archiver_list_spec \ STRIP \ RANLIB \ CC \ @@ -29323,14 +30316,14 @@ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ -SHELL \ -ECHO \ +nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ -lt_prog_compiler_wl \ lt_prog_compiler_pic \ +lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ +MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ @@ -29346,7 +30339,6 @@ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ -fix_srcfile_path \ exclude_expsyms \ include_expsyms \ file_list_spec \ @@ -29354,6 +30346,7 @@ libname_spec \ library_names_spec \ soname_spec \ +install_override_mode \ finish_eval \ old_striplib \ striplib \ @@ -29365,14 +30358,16 @@ compiler_lib_search_path \ LD_CXX \ LD_F77 \ +reload_flag_CXX \ +reload_flag_F77 \ compiler_CXX \ compiler_F77 \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_no_builtin_flag_F77 \ -lt_prog_compiler_wl_CXX \ -lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_pic_F77 \ +lt_prog_compiler_wl_CXX \ +lt_prog_compiler_wl_F77 \ lt_prog_compiler_static_CXX \ lt_prog_compiler_static_F77 \ lt_cv_prog_compiler_c_o_CXX \ @@ -29395,8 +30390,6 @@ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_CXX \ hardcode_libdir_separator_F77 \ -fix_srcfile_path_CXX \ -fix_srcfile_path_F77 \ exclude_expsyms_CXX \ exclude_expsyms_F77 \ include_expsyms_CXX \ @@ -29415,9 +30408,9 @@ postdeps_F77 \ compiler_lib_search_path_CXX \ compiler_lib_search_path_F77; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -29439,11 +30432,14 @@ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ +postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec \ +reload_cmds_CXX \ +reload_cmds_F77 \ old_archive_cmds_CXX \ old_archive_cmds_F77 \ old_archive_from_new_cmds_CXX \ @@ -29461,10 +30457,12 @@ export_symbols_cmds_CXX \ export_symbols_cmds_F77 \ prelink_cmds_CXX \ -prelink_cmds_F77; do - case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in +prelink_cmds_F77 \ +postlink_cmds_CXX \ +postlink_cmds_F77; do + case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) - eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" + eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" @@ -29472,12 +30470,6 @@ esac done -# Fix-up fallback echo if it was mangled by the above quoting rules. -case \$lt_ECHO in -*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\` - ;; -esac - ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' @@ -29543,7 +30535,7 @@ "gmp.h") CONFIG_FILES="$CONFIG_FILES gmp.h:gmp-h.in" ;; "mp.h") CONFIG_FILES="$CONFIG_FILES mp.h:mp-h.in" ;; - *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; + *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done @@ -29567,9 +30559,10 @@ # after its creation but before its name has been assigned to `$tmp'. $debug || { - tmp= + tmp= ac_tmp= trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status + : "${ac_tmp:=$tmp}" + { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } @@ -29577,12 +30570,13 @@ { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" + test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") -} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5 +} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 +ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. @@ -29599,12 +30593,12 @@ fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then - ac_cs_awk_cr='\r' + ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi -echo 'BEGIN {' >"$tmp/subs1.awk" && +echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF @@ -29613,18 +30607,18 @@ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 -ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'` + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 +ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -29632,7 +30626,7 @@ rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 -cat >>"\$tmp/subs1.awk" <<\\_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h @@ -29680,7 +30674,7 @@ rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK -cat >>"\$tmp/subs1.awk" <<_ACAWK && +cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" @@ -29712,21 +30706,29 @@ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat -fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \ - || as_fn_error "could not setup config files machinery" "$LINENO" 5 +fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ + || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF -# VPATH may cause trouble with some makes, so we remove $(srcdir), -# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# VPATH may cause trouble with some makes, so we remove sole $(srcdir), +# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then - ac_vpsub='/^[ ]*VPATH[ ]*=/{ -s/:*\$(srcdir):*/:/ -s/:*\${srcdir}:*/:/ -s/:*@srcdir@:*/:/ -s/^\([^=]*=[ ]*\):*/\1/ + ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ +h +s/// +s/^/:/ +s/[ ]*$/:/ +s/:\$(srcdir):/:/g +s/:\${srcdir}:/:/g +s/:@srcdir@:/:/g +s/^:*// s/:*$// +x +s/\(=[ ]*\).*/\1/ +G +s/\n// s/^[^=]*=[ ]*$// }' fi @@ -29738,7 +30740,7 @@ # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then -cat >"$tmp/defines.awk" <<\_ACAWK || +cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF @@ -29750,11 +30752,11 @@ # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do - ac_t=`sed -n "/$ac_delim/p" confdefs.h` - if test -z "$ac_t"; then + ac_tt=`sed -n "/$ac_delim/p" confdefs.h` + if test -z "$ac_tt"; then break elif $ac_last_try; then - as_fn_error "could not make $CONFIG_HEADERS" "$LINENO" 5 + as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi @@ -29839,7 +30841,7 @@ _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 - as_fn_error "could not setup config headers machinery" "$LINENO" 5 + as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" @@ -29852,7 +30854,7 @@ esac case $ac_mode$ac_tag in :[FHL]*:*);; - :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; + :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac @@ -29871,7 +30873,7 @@ for ac_f do case $ac_f in - -) ac_f="$tmp/stdin";; + -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. @@ -29880,7 +30882,7 @@ [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || - as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;; + as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" @@ -29906,8 +30908,8 @@ esac case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 ;; + *:-:* | *:-) cat >"$ac_tmp/stdin" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac @@ -30043,23 +31045,24 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " -eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 +eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ + >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && + { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && + { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ + "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 +which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} +which seems to be undefined. Please make sure it is defined" >&2;} - rm -f "$tmp/stdin" + rm -f "$ac_tmp/stdin" case $ac_file in - -) cat "$tmp/out" && rm -f "$tmp/out";; - *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";; + -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; + *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # @@ -30068,21 +31071,21 @@ if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" - } >"$tmp/config.h" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 - if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" + } >"$ac_tmp/config.h" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 + if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" - mv "$tmp/config.h" "$ac_file" \ - || as_fn_error "could not create $ac_file" "$LINENO" 5 + mv "$ac_tmp/config.h" "$ac_file" \ + || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ - && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \ - || as_fn_error "could not create -" "$LINENO" 5 + && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ + || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" @@ -30136,19 +31139,19 @@ $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then - as_fn_error "$ac_source: file not found" "$LINENO" 5 + as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. - case $srcdir in + case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || - as_fn_error "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 + as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 @@ -30179,7 +31182,8 @@ # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, -# 2006, 2007, 2008 Free Software Foundation, Inc. +# 2006, 2007, 2008, 2009, 2010 Free Software Foundation, +# Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. @@ -30215,13 +31219,13 @@ NM=$lt_NM # Assembler program. -AS=$AS +AS=$lt_AS # DLL creation program. -DLLTOOL=$DLLTOOL +DLLTOOL=$lt_DLLTOOL # Object dumper program. -OBJDUMP=$OBJDUMP +OBJDUMP=$lt_OBJDUMP # Which release of libtool.m4 was used? macro_version=$macro_version @@ -30239,6 +31243,12 @@ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# An echo program that protects backslashes. +ECHO=$lt_ECHO + # The host system. host_alias=$host_alias host=$host @@ -30285,20 +31295,36 @@ # turn newlines into spaces. NL2SP=$lt_lt_NL2SP -# How to create reloadable object files. -reload_flag=$lt_reload_flag -reload_cmds=$lt_reload_cmds +# convert \$build file names to \$host format. +to_host_file_cmd=$lt_cv_to_host_file_cmd + +# convert \$build files to toolchain format. +to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method -# Command to use when deplibs_check_method == "file_magic". +# Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd +# How to find potential files when deplibs_check_method = "file_magic". +file_magic_glob=$lt_file_magic_glob + +# Find potential files using nocaseglob when deplibs_check_method = "file_magic". +want_nocaseglob=$lt_want_nocaseglob + +# Command to associate shared and link libraries. +sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd + # The archiver. AR=$lt_AR + +# Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS +# How to feed a file listing to the archiver. +archiver_list_spec=$lt_archiver_list_spec + # A symbol stripping program. STRIP=$lt_STRIP @@ -30307,6 +31333,9 @@ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds +# Whether to use a lock for old archive extraction. +lock_old_archive_extraction=$lock_old_archive_extraction + # A C compiler. LTCC=$lt_CC @@ -30325,14 +31354,14 @@ # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix -# The name of the directory that contains temporary libtool files. -objdir=$objdir +# Specify filename containing input files for \$NM. +nm_file_list_spec=$lt_nm_file_list_spec -# Shell to use when invoking shell scripts. -SHELL=$lt_SHELL +# The root where to search for dependent libraries,and in which our libraries should be installed. +lt_sysroot=$lt_sysroot -# An echo program that does not interpret backslashes. -ECHO=$lt_ECHO +# The name of the directory that contains temporary libtool files. +objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD @@ -30340,6 +31369,9 @@ # Must we lock files when doing compilation? need_locks=$lt_need_locks +# Manifest tool. +MANIFEST_TOOL=$lt_MANIFEST_TOOL + # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL @@ -30396,6 +31428,9 @@ # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec +# Permission mode override for installation of shared libraries. +install_override_mode=$lt_install_override_mode + # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds @@ -30435,6 +31470,10 @@ # The linker used to build libraries. LD=$lt_LD +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds @@ -30447,12 +31486,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static @@ -30539,9 +31578,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols @@ -30557,6 +31593,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds + # Specify filename containing input files. file_list_spec=$lt_file_list_spec @@ -30603,212 +31642,169 @@ # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? - sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - - case $xsi_shell in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac -} - -# func_basename file -func_basename () -{ - func_basename_result="${1##*/}" -} - -# func_dirname_and_basename file append nondir_replacement -# perform func_basename and func_dirname in a single function -# call: -# dirname: Compute the dirname of FILE. If nonempty, -# add APPEND to the result, otherwise set result -# to NONDIR_REPLACEMENT. -# value returned in "$func_dirname_result" -# basename: Compute filename of FILE. -# value retuned in "$func_basename_result" -# Implementation must be kept synchronized with func_dirname -# and func_basename. For efficiency, we do not delegate to -# those functions but instead duplicate the functionality here. -func_dirname_and_basename () -{ - case ${1} in - */*) func_dirname_result="${1%/*}${2}" ;; - * ) func_dirname_result="${3}" ;; - esac - func_basename_result="${1##*/}" -} - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -func_stripname () -{ - # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are - # positional parameters, so assign one to ordinary parameter first. - func_stripname_result=${3} - func_stripname_result=${func_stripname_result#"${1}"} - func_stripname_result=${func_stripname_result%"${2}"} -} - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=${1%%=*} - func_opt_split_arg=${1#*=} -} - -# func_lo2o object -func_lo2o () -{ - case ${1} in - *.lo) func_lo2o_result=${1%.lo}.${objext} ;; - *) func_lo2o_result=${1} ;; - esac -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=${1%.*}.lo -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=$(( $* )) -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=${#1} -} - -_LT_EOF - ;; - *) # Bourne compatible functions. - cat << \_LT_EOF >> "$cfgfile" - -# func_dirname file append nondir_replacement -# Compute the dirname of FILE. If nonempty, add APPEND to the result, -# otherwise set result to NONDIR_REPLACEMENT. -func_dirname () -{ - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi -} - -# func_basename file -func_basename () -{ - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` -} - - -# func_stripname prefix suffix name -# strip PREFIX and SUFFIX off of NAME. -# PREFIX and SUFFIX must not contain globbing or regex special -# characters, hashes, percent signs, but SUFFIX may contain a leading -# dot (in which case that matches only a dot). -# func_strip_suffix prefix name -func_stripname () -{ - case ${2} in - .*) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;; - *) func_stripname_result=`$ECHO "X${3}" \ - | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;; - esac -} - -# sed scripts: -my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q' -my_sed_long_arg='1s/^-[^=]*=//' - -# func_opt_split -func_opt_split () -{ - func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"` - func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"` -} - -# func_lo2o object -func_lo2o () -{ - func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"` -} - -# func_xform libobj-or-source -func_xform () -{ - func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'` -} - -# func_arith arithmetic-term... -func_arith () -{ - func_arith_result=`expr "$@"` -} - -# func_len string -# STRING may not start with a hyphen. -func_len () -{ - func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` -} - -_LT_EOF -esac - -case $lt_shell_append in - yes) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1+=\$2" -} -_LT_EOF - ;; - *) - cat << \_LT_EOF >> "$cfgfile" - -# func_append var value -# Append VALUE to the end of shell variable VAR. -func_append () -{ - eval "$1=\$$1\$2" -} - -_LT_EOF - ;; - esac + sed '$q' "$ltmain" >> "$cfgfile" \ + || (rm -f "$cfgfile"; exit 1) + if test x"$xsi_shell" = xyes; then + sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ +func_dirname ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +} # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_basename ()$/,/^} # func_basename /c\ +func_basename ()\ +{\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ +func_dirname_and_basename ()\ +{\ +\ case ${1} in\ +\ */*) func_dirname_result="${1%/*}${2}" ;;\ +\ * ) func_dirname_result="${3}" ;;\ +\ esac\ +\ func_basename_result="${1##*/}"\ +} # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ +func_stripname ()\ +{\ +\ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ +\ # positional parameters, so assign one to ordinary parameter first.\ +\ func_stripname_result=${3}\ +\ func_stripname_result=${func_stripname_result#"${1}"}\ +\ func_stripname_result=${func_stripname_result%"${2}"}\ +} # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ +func_split_long_opt ()\ +{\ +\ func_split_long_opt_name=${1%%=*}\ +\ func_split_long_opt_arg=${1#*=}\ +} # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ +func_split_short_opt ()\ +{\ +\ func_split_short_opt_arg=${1#??}\ +\ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ +} # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ +func_lo2o ()\ +{\ +\ case ${1} in\ +\ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ +\ *) func_lo2o_result=${1} ;;\ +\ esac\ +} # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_xform ()$/,/^} # func_xform /c\ +func_xform ()\ +{\ + func_xform_result=${1%.*}.lo\ +} # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_arith ()$/,/^} # func_arith /c\ +func_arith ()\ +{\ + func_arith_result=$(( $* ))\ +} # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_len ()$/,/^} # func_len /c\ +func_len ()\ +{\ + func_len_result=${#1}\ +} # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + +fi + +if test x"$lt_shell_append" = xyes; then + sed -e '/^func_append ()$/,/^} # func_append /c\ +func_append ()\ +{\ + eval "${1}+=\\${2}"\ +} # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ +func_append_quoted ()\ +{\ +\ func_quote_for_eval "${2}"\ +\ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ +} # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") +test 0 -eq $? || _lt_function_replace_fail=: + + + # Save a `func_append' function call where possible by direct use of '+=' + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +else + # Save a `func_append' function call even when '+=' is not available + sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ + && mv -f "$cfgfile.tmp" "$cfgfile" \ + || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") + test 0 -eq $? || _lt_function_replace_fail=: +fi + +if test x"$_lt_function_replace_fail" = x":"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 +$as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} +fi - sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \ - || (rm -f "$cfgfile"; exit 1) - mv -f "$cfgfile" "$ofile" || + mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" @@ -30820,6 +31816,10 @@ # The linker used to build libraries. LD=$lt_LD_CXX +# How to create reloadable object files. +reload_flag=$lt_reload_flag_CXX +reload_cmds=$lt_reload_cmds_CXX + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX @@ -30832,12 +31832,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_CXX - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX @@ -30924,9 +31924,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_CXX - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX @@ -30942,6 +31939,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_CXX + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX @@ -30973,6 +31973,10 @@ # The linker used to build libraries. LD=$lt_LD_F77 +# How to create reloadable object files. +reload_flag=$lt_reload_flag_F77 +reload_cmds=$lt_reload_cmds_F77 + # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_F77 @@ -30985,12 +31989,12 @@ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 -# How to pass a linker flag through the compiler. -wl=$lt_lt_prog_compiler_wl_F77 - # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 @@ -31077,9 +32081,6 @@ # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 -# Fix the shell variable \$srcfile for the compiler. -fix_srcfile_path=$lt_fix_srcfile_path_F77 - # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_F77 @@ -31095,6 +32096,9 @@ # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_F77 +# Commands necessary for finishing linking programs. +postlink_cmds=$lt_postlink_cmds_F77 + # Specify filename containing input files. file_list_spec=$lt_file_list_spec_F77 @@ -31129,7 +32133,7 @@ ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || - as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5 + as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. @@ -31150,7 +32154,7 @@ exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. - $ac_cs_success || as_fn_exit $? + $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 diff -Nru gmp-4.3.2+dfsg/configure.in gmp-5.0.2+dfsg/configure.in --- gmp-4.3.2+dfsg/configure.in 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/configure.in 2011-08-30 01:19:20.000000000 +0000 @@ -4,7 +4,7 @@ define(GMP_COPYRIGHT,[[ Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007 Free Software Foundation, Inc. +2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -136,6 +136,20 @@ fi +AC_ARG_ENABLE(old-fft-full, +AC_HELP_STRING([--enable-old-fft-full],[enable old mpn_mul_fft_full for multiplication [[default=no]]]), +[case $enableval in +yes|no) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-old-fft-full, need yes or no]) ;; +esac], +[enable_old_fft_full=no]) + +if test "$enable_old_fft_full" = "yes"; then + AC_DEFINE(WANT_OLD_FFT_FULL,1, + [Define to 1 to enable old mpn_mul_fft_full for multiplication, per --enable-old-fft-full]) +fi + + AC_ARG_ENABLE(mpbsd, AC_HELP_STRING([--enable-mpbsd], [build Berkeley MP compatibility library [[default=no]]]), @@ -250,6 +264,7 @@ #undef HAVE_HOST_CPU_FAMILY_power #undef HAVE_HOST_CPU_FAMILY_powerpc #undef HAVE_HOST_CPU_FAMILY_x86 +#undef HAVE_HOST_CPU_FAMILY_x86_64 /* Define one of the following to 1 for the host CPU, as per the output of ./config.guess. If your CPU is not listed here, leave all undefined. */ @@ -406,11 +421,14 @@ alpha*-*-*) AC_DEFINE(HAVE_HOST_CPU_FAMILY_alpha) case $host_cpu in - alphaev5* | alphapca5*) path="alpha/ev5 alpha" ;; + alphaev5* | alphapca5*) + path="alpha/ev5 alpha" ;; alphaev67 | alphaev68 | alphaev7*) - path="alpha/ev67 alpha/ev6 alpha/ev5 alpha" ;; - alphaev6* | alphaev7*) path="alpha/ev6 alpha/ev5 alpha" ;; - *) path="alpha" ;; + path="alpha/ev67 alpha/ev6 alpha" ;; + alphaev6) + path="alpha/ev6 alpha" ;; + *) + path="alpha" ;; esac extra_functions="cntlz" gcc_cflags_optlist="asm cpu oldas" # need asm ahead of cpu, see below @@ -568,7 +586,6 @@ # checking sizeof(long), either 4 or 8 bytes respectively. Do this in # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc. # - gcc_cflags="-O2" gcc_cflags_optlist="arch" gcc_testlist="sizeof-long-4" SPEED_CYCLECOUNTER_OBJ=hppa.lo @@ -639,6 +656,7 @@ # systems (GNU/Linux for instance), but lets assume they're ok. case $host in [*-*-hpux[1-9] | *-*-hpux[1-9].* | *-*-hpux10 | *-*-hpux10.*]) ;; + [*-*-linux*]) abilist="1.0" ;; # due to linux permanent kernel bug *) abilist="2.0w $abilist" ;; esac @@ -851,6 +869,7 @@ gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin gcc_cflags_asm="" gcc_cflags_cpu="" + vmx_path="" # grab this object, though it's not a true cycle counter routine SPEED_CYCLECOUNTER_OBJ=powerpc.lo @@ -892,7 +911,8 @@ powerpc604) gcc_cflags_cpu="-mcpu=604" ;; powerpc604e) gcc_cflags_cpu="-mcpu=604e -mcpu=604" ;; powerpc620) gcc_cflags_cpu="-mcpu=620" ;; - powerpc630) gcc_cflags_cpu="-mcpu=630" ;; + powerpc630) gcc_cflags_cpu="-mcpu=630" + cpu_path="p3" ;; powerpc740) gcc_cflags_cpu="-mcpu=740" ;; powerpc7400 | powerpc7410) gcc_cflags_asm="-Wa,-maltivec" @@ -905,7 +925,15 @@ powerpc821) gcc_cflags_cpu="-mcpu=821" ;; powerpc823) gcc_cflags_cpu="-mcpu=823" ;; powerpc860) gcc_cflags_cpu="-mcpu=860" ;; - powerpc970) gcc_cflags_cpu="-mcpu=970" ;; + powerpc970) gcc_cflags_cpu="-mtune=970" + vmx_path="powerpc64/vmx" + cpu_path="p4" ;; + power4) gcc_cflags_cpu="-mtune=power4" + cpu_path="p4" ;; + power5) gcc_cflags_cpu="-mtune=power5 -mtune=power4" + cpu_path="p5 p4" ;; + power6) gcc_cflags_cpu="-mtune=power6" + cpu_path="p6" ;; esac case $host in @@ -933,11 +961,21 @@ esac case $host in + *-*-aix*) + cclist="gcc xlc cc" + gcc_32_cflags_maybe="-maix32" + xlc_cflags="-O2 -qmaxmem=20000" + xlc_cflags_optlist="arch" + xlc_32_cflags_maybe="-q32" + cc_cflags="-O2 -qmaxmem=20000" + cc_cflags_optlist="arch" + cc_32_cflags_maybe="-q32" + ar_32_flags="-X32" + nm_32_flags="-X32" + esac + + case $host in POWERPC64_PATTERN) - case $host_cpu in - powerpc970) vmx_path="powerpc64/vmx" ;; - *) vmx_path="" ;; - esac case $host in *-*-aix*) # On AIX a true 64-bit ABI is available. @@ -952,7 +990,9 @@ # Must indicate object type to ar and nm ar_aix64_flags="-X64" nm_aix64_flags="-X64" - path_aix64="powerpc64/mode64 $vmx_path powerpc64" + path_aix64="" + for i in $cpu_path; do path_aix64="${path_aix64}powerpc64/mode64/$i "; done + path_aix64="${path_aix64}powerpc64/mode64 $vmx_path powerpc64" # grab this object, though it's not a true cycle counter routine SPEED_CYCLECOUNTER_OBJ_aix64=powerpc64.lo cyclecounter_size_aix64=0 @@ -967,7 +1007,7 @@ # longlong.h macros expect limb operands in a single 64-bit # register, not two 32-bit registers as would be given for a # long long without -mpowerpc64. In theory we could detect and - # accomodate both styles, but the proper 64-bit registers will + # accommodate both styles, but the proper 64-bit registers will # be fastest and are what we really want to use. # # One would think -mpowerpc64 would set the assembler in the right @@ -990,7 +1030,9 @@ gcc_mode64_cflags="-m64" gcc_mode64_cflags_optlist="cpu opt" gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="powerpc64/mode64 $vmx_path powerpc64" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo cyclecounter_size_mode64=0 any_mode64_testlist="sizeof-long-8" @@ -1021,7 +1063,9 @@ gcc_mode64_cflags_maybe="-m64" gcc_mode64_cflags_optlist="cpu opt" gcc_mode64_cflags_opt="-O3 -O2 -O1" - path_mode64="powerpc64/mode64 $vmx_path powerpc64" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo cyclecounter_size_mode64=0 any_mode64_testlist="sizeof-long-8" @@ -1066,8 +1110,13 @@ ;; - # IBM s/370 and similar - [s3[6-9]0*-*-*]) + # IBM S/390 64 bit + s390x-*-*) + gcc_cflags="-g -O2 $fomit_frame_pointer" + path="s390x" + ;; + # IBM S/390 32 bit + s390-*-*) gcc_cflags="$gcc_cflags $fomit_frame_pointer" path="s390" extra_functions="udiv_w_sdiv" @@ -1211,7 +1260,15 @@ *) abilist="64 32" ;; esac - path_64="sparc64" + case $host_cpu in + ultrasparc | ultrasparc2 | ultrasparc2i) + path_64="sparc64/ultrasparc12 sparc64" ;; + ultrasparc3) + path_64="sparc64/ultrasparc34 sparc64/ultrasparc12 sparc64" ;; + *) + path_64="sparc64" + esac + cclist_64="gcc" any_64_testlist="sizeof-long-8" @@ -1281,7 +1338,7 @@ # mode, in case -m32 has failed not because it's an old gcc, but because # it's a dual 32/64-bit gcc without a 32-bit libc, or whatever. # - X86_PATTERN | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + X86_PATTERN | X86_64_PATTERN) abilist="32" cclist="gcc icc cc" gcc_cflags="$gcc_cflags $fomit_frame_pointer" @@ -1389,6 +1446,7 @@ # gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486" gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium" + gcc_64_cflags_cpu="-mtune=nocona" ;; viac32) # Not sure of the best fallbacks here for -mcpu. @@ -1405,10 +1463,14 @@ gcc_cflags_cpu="-mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" gcc_cflags_arch="-march=k8 -march=k8~-mno-sse2 -march=athlon -march=pentiumpro -march=pentium" ;; - core2) + core2 | corei) gcc_cflags_cpu="-mtune=core2 -mtune=k8" gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" ;; + atom) + gcc_cflags_cpu="-mtune=atom -mtune=pentium3" + gcc_cflags_arch="-march=atom -march=pentium3" + ;; *) gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" gcc_cflags_arch="-march=i486" @@ -1423,7 +1485,8 @@ i686 | pentiumpro) path="x86/p6 x86" ;; pentium2) path="x86/p6/mmx x86/p6 x86" ;; pentium3) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; - pentiumm | core2) path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; + pentiumm | core2 | corei) + path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; [k6[23]]) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; k6) path="x86/k6/mmx x86/k6 x86" ;; geode) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; @@ -1434,64 +1497,55 @@ # VIA/Centaur processors, sold as CyrixIII and C3. viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; viac3*) path="x86/pentium/mmx x86/pentium x86";; + atom) path="x86/atom x86" ;; *) path="x86" ;; esac - # If the user asked for a fat build, override the path and flags set above - if test $enable_fat = yes; then - gcc_cflags_cpu="" - gcc_cflags_arch="" - extra_functions="$extra_functions fat fat_entry" - path="x86/fat x86" - fat_path="x86 x86/fat x86/i486 - x86/k6 x86/k6/mmx x86/k6/k62mmx - x86/k7 x86/k7/mmx - x86/pentium x86/pentium/mmx - x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 - x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2" - fat_functions="add_n addmul_1 copyd copyi - dive_1 diveby3 divrem_1 gcd_1 lshift - mod_1 mod_34lsub1 mode1o mul_1 mul_basecase - pre_divrem_1 pre_mod_1 rshift - sqr_basecase sub_n submul_1" - fat_thresholds="MUL_KARATSUBA_THRESHOLD MUL_TOOM3_THRESHOLD - SQR_KARATSUBA_THRESHOLD SQR_TOOM3_THRESHOLD" - fi - - case $host_cpu in - athlon64 | atom | core2 | pentium4 | x86_64) - cclist_64="gcc" - gcc_64_cflags="$gcc_64_cflags -m64" - gcc_64_cflags_optlist="cpu" - CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' - SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo - cyclecounter_size_64=2 - - case $host in - *-*-solaris*) - # Sun cc. - cclist_64="$cclist_64 cc" - cc_64_cflags="-xO3 -m64" - ;; - esac + case $host in + X86_64_PATTERN) + cclist_64="gcc" + gcc_64_cflags="$gcc_64_cflags -m64" + gcc_64_cflags_optlist="cpu arch" + CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' + SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo + cyclecounter_size_64=2 + abilist="64 32" + path_64="x86_64" case $host_cpu in - athlon64 | x86_64) - abilist="64 32" - path_64="x86_64" + x86_64) + ;; + athlon64) + path_64="x86_64/k8 $path_64" ;; pentium4) - abilist="64 32" - path_64="x86_64/pentium4 x86_64" + path_64="x86_64/pentium4 $path_64" ;; core2) - abilist="64 32" - path_64="x86_64/core2 x86_64" + path_64="x86_64/core2 $path_64" + ;; + corei) + path_64="x86_64/corei x86_64/core2 $path_64" ;; atom) - # The AMD K8/K9/K10 code seems best for Intel Atom - abilist="64 32" - path_64="x86_64/atom x86_64" + path_64="x86_64/atom $path_64" + ;; + nano) + path_64="x86_64/nano $path_64" + ;; + esac + + case $host in + *-*-solaris*) + # Sun cc. + cclist_64="$cclist_64 cc" + cc_64_cflags="-xO3 -m64" + ;; + *-*-mingw*) + limb_64=longlong + path_64="" # Windows amd64 calling conventions are *different* + # Silence many pedantic warnings for w64. FIXME. + gcc_64_cflags="$gcc_64_cflags -std=gnu99" ;; esac ;; @@ -1692,10 +1746,10 @@ cflags="$cflags_maybe $cflags" fi - # Any user CFLAGS, even an empty string, takes precendence + # Any user CFLAGS, even an empty string, takes precedence if test "$test_CFLAGS" = set; then cflags=$CFLAGS; fi - # Any user CPPFLAGS, even an empty string, takes precendence + # Any user CPPFLAGS, even an empty string, takes precedence eval cppflags=\"\$${ccbase}${abi1}_cppflags\" test -n "$cppflags" || eval cppflags=\"\$${ccbase}${abi2}_cppflags\" if test "$test_CPPFLAGS" = set; then cppflags=$CPPFLAGS; fi @@ -1770,6 +1824,42 @@ AC_MSG_ERROR([could not find a working compiler, see config.log for details]) fi +case $host in + X86_PATTERN | X86_64_PATTERN) + # If the user asked for a fat build, override the path and flags set above + if test $enable_fat = yes; then + gcc_cflags_cpu="" + gcc_cflags_arch="" + + if test "$abi" = 32; then + extra_functions="$extra_functions fat fat_entry" + path="x86/fat x86" + fat_path="x86 x86/fat x86/i486 + x86/k6 x86/k6/mmx x86/k6/k62mmx + x86/k7 x86/k7/mmx + x86/pentium x86/pentium/mmx + x86/p6 x86/p6/mmx x86/p6/p3mmx x86/p6/sse2 + x86/pentium4 x86/pentium4/mmx x86/pentium4/sse2" + fi + + if test "$abi" = 64; then + gcc_64_cflags="" + extra_functions_64="$extra_functions_64 fat fat_entry" + path_64="x86_64/fat x86_64" + fat_path="x86_64 x86_64/fat x86_64/pentium4 x86_64/core2 x86_64/corei x86_64/atom x86_64/nano" + fi + + fat_functions="add_n addmul_1 copyd copyi + dive_1 diveby3 divrem_1 gcd_1 lshift + mod_1 mod_34lsub1 mode1o mul_1 mul_basecase + pre_divrem_1 pre_mod_1 rshift + sqr_basecase sub_n submul_1" + fat_thresholds="MUL_TOOM22_THRESHOLD MUL_TOOM33_THRESHOLD + SQR_TOOM2_THRESHOLD SQR_TOOM3_THRESHOLD" + fi + ;; +esac + if test $found_compiler = yes; then @@ -2037,7 +2127,7 @@ # enough assembler. # case $host in - X86_PATTERN | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + X86_PATTERN | X86_64_PATTERN) if test "$ABI" = 32; then case "$path $fat_path" in *mmx*) GMP_ASM_X86_MMX( , [GMP_STRIP_PATH(*mmx*)]) ;; @@ -2292,7 +2382,8 @@ # # the default includes are sufficient for all these types # -AC_CHECK_TYPES([intmax_t, long double, long long, ptrdiff_t, quad_t, uint_least32_t]) +AC_CHECK_TYPES([intmax_t, long double, long long, ptrdiff_t, quad_t, + uint_least32_t, intptr_t]) AC_C_STRINGIZE @@ -2407,43 +2498,55 @@ # can provide some functions too. (mpn/Makefile.am passes # -DOPERATION_ to get them to generate the right code.) -# Note: The following lines defining $gmp_mpn_functions_optional -# and $gmp_mpn_functions are parsed by the "macos/configure" -# Perl script. So if you change the lines in a major way -# make sure to run and examine the output from -# -# % (cd macos; perl configure) -# # Note: $gmp_mpn_functions must have mod_1 before pre_mod_1 so the former # can optionally provide the latter as an extra entrypoint. Likewise # divrem_1 and pre_divrem_1. -gmp_mpn_functions_optional="umul udiv copyi copyd com_n - and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ +gmp_mpn_functions_optional="umul udiv \ invert_limb sqr_diagonal \ mul_2 mul_3 mul_4 \ addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8 \ - addlsh1_n sublsh1_n rsh1add_n rsh1sub_n addsub_n addaddmul_1msb0 lshiftc" + addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n \ + addlsh2_n sublsh2_n rsblsh2_n \ + addlsh_n sublsh_n rsblsh_n \ + add_n_sub_n addaddmul_1msb0" gmp_mpn_functions="$extra_functions \ - add add_1 add_n sub sub_1 sub_n neg_n mul_1 addmul_1 \ + add add_1 add_n sub sub_1 sub_n neg com mul_1 addmul_1 \ submul_1 lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2 \ fib2_ui mod_1 mod_34lsub1 mode1o pre_divrem_1 pre_mod_1 dump \ - mod_1_1 mod_1_2 mod_1_3 mod_1_4 \ - mul mul_fft mul_n mul_basecase sqr_basecase random random2 pow_1 \ - rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp perfsqr \ - bdivmod gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ + mod_1_1 mod_1_2 mod_1_3 mod_1_4 lshiftc \ + mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \ + random random2 pow_1 \ + rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp \ + perfsqr perfpow \ + gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ gcdext_lehmer gcdext_subdiv_step \ - tdiv_qr dc_divrem_n sb_divrem_mn jacbase get_d \ - matrix22_mul hgcd2 hgcd mullow_n mullow_basecase \ - toom22_mul toom33_mul toom44_mul \ - toom32_mul toom42_mul toom62_mul toom53_mul \ + div_q tdiv_qr jacbase get_d \ + matrix22_mul hgcd2 hgcd mullo_n mullo_basecase \ + toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \ + toom33_mul toom43_mul toom53_mul toom63_mul \ + toom44_mul \ + toom6h_mul toom6_sqr toom8h_mul toom8_sqr \ + toom_couple_handling \ toom2_sqr toom3_sqr toom4_sqr \ - toom_interpolate_5pts toom_interpolate_7pts invert binvert \ - sb_div_qr sb_divappr_q sb_div_q dc_div_qr dc_divappr_q dc_div_q \ + toom_eval_dgr3_pm1 toom_eval_dgr3_pm2 \ + toom_eval_pm1 toom_eval_pm2 toom_eval_pm2exp toom_eval_pm2rexp \ + toom_interpolate_5pts toom_interpolate_6pts toom_interpolate_7pts \ + toom_interpolate_8pts toom_interpolate_12pts toom_interpolate_16pts \ + invertappr invert binvert mulmod_bnm1 sqrmod_bnm1 \ + sbpi1_div_q sbpi1_div_qr sbpi1_divappr_q \ + dcpi1_div_q dcpi1_div_qr dcpi1_divappr_q \ mu_div_qr mu_divappr_q mu_div_q \ - sb_bdiv_q sb_bdiv_qr dc_bdiv_q dc_bdiv_qr mu_bdiv_q mu_bdiv_qr \ - divexact bdiv_dbm1c redc_1 redc_2 powm powlo powm_sec subcnd_n \ + bdiv_q_1 \ + sbpi1_bdiv_q sbpi1_bdiv_qr \ + dcpi1_bdiv_q dcpi1_bdiv_qr \ + mu_bdiv_q mu_bdiv_qr \ + bdiv_q bdiv_qr \ + divexact bdiv_dbm1c redc_1 redc_2 redc_n powm powlo powm_sec subcnd_n \ + redc_1_sec trialdiv remove \ + and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ + copyi copyd zero \ $gmp_mpn_functions_optional" define(GMP_MULFUNC_CHOICES, @@ -2456,8 +2559,24 @@ and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) tmp_mulfunc="logops_n" ;; lshift|rshift) tmp_mulfunc="lorrshift";; - addlsh1_n|sublsh1_n) - tmp_mulfunc="aorslsh1_n";; + addlsh1_n) + tmp_mulfunc="aorslsh1_n aorrlsh1_n";; + sublsh1_n) + tmp_mulfunc="aorslsh1_n sorrlsh1_n";; + rsblsh1_n) + tmp_mulfunc="aorrlsh1_n sorrlsh1_n";; + addlsh2_n) + tmp_mulfunc="aorslsh2_n aorrlsh2_n";; + sublsh2_n) + tmp_mulfunc="aorslsh2_n sorrlsh2_n";; + rsblsh2_n) + tmp_mulfunc="aorrlsh2_n sorrlsh2_n";; + addlsh_n) + tmp_mulfunc="aorslsh_n aorrlsh_n";; + sublsh_n) + tmp_mulfunc="aorslsh_n sorrlsh_n";; + rsblsh_n) + tmp_mulfunc="aorrlsh_n sorrlsh_n";; rsh1add_n|rsh1sub_n) tmp_mulfunc="rsh1aors_n";; esac @@ -2514,10 +2633,10 @@ # setup that structure, on a per-directory basis ready for # mpn//fat/fat.c. # -# fat.h includes thesholds listed in $fat_thresholds, extracted from +# fat.h includes thresholds listed in $fat_thresholds, extracted from # gmp-mparam.h in each directory. An overall maximum for each threshold is # established, for use in making fixed size arrays of temporary space. -# (Eg. MUL_TOOM3_THRESHOLD_LIMIT used by mpn/generic/mul.c.) +# (Eg. MUL_TOOM33_THRESHOLD_LIMIT used by mpn/generic/mul.c.) # # It'd be possible to do some of this manually, but when there's more than a # few functions and a few directories it becomes very tedious, and very @@ -2565,7 +2684,7 @@ echo " /* Copy all fields into __gmpn_cpuvec. memcpy is not used because it might operate byte-wise (depending on its - implemenation), and we need the function pointer writes to be atomic. + implementation), and we need the function pointer writes to be atomic. "volatile" discourages the compiler from trying to optimize this. */ #define CPUVEC_INSTALL(vec) \\ do { \\ @@ -2627,7 +2746,7 @@ esac # Extract desired thresholds from gmp-mparam.h file in this directory, - # if prsent. + # if present. tmp_mparam=$srcdir/mpn/$tmp_dir/gmp-mparam.h if test -f $tmp_mparam; then for tmp_tn in $fat_thresholds; do @@ -2880,8 +2999,12 @@ [/* Define to 1 each of the following for which a native (ie. CPU specific) implementation of the corresponding routine exists. */ #undef HAVE_NATIVE_mpn_add_n +#undef HAVE_NATIVE_mpn_add_n_sub_n #undef HAVE_NATIVE_mpn_add_nc +#undef HAVE_NATIVE_mpn_addaddmul_1msb0 #undef HAVE_NATIVE_mpn_addlsh1_n +#undef HAVE_NATIVE_mpn_addlsh2_n +#undef HAVE_NATIVE_mpn_addlsh_n #undef HAVE_NATIVE_mpn_addmul_1c #undef HAVE_NATIVE_mpn_addmul_2 #undef HAVE_NATIVE_mpn_addmul_3 @@ -2890,12 +3013,12 @@ #undef HAVE_NATIVE_mpn_addmul_6 #undef HAVE_NATIVE_mpn_addmul_7 #undef HAVE_NATIVE_mpn_addmul_8 -#undef HAVE_NATIVE_mpn_addsub_n -#undef HAVE_NATIVE_mpn_addaddmul_1msb0 #undef HAVE_NATIVE_mpn_and_n #undef HAVE_NATIVE_mpn_andn_n #undef HAVE_NATIVE_mpn_bdiv_dbm1c -#undef HAVE_NATIVE_mpn_com_n +#undef HAVE_NATIVE_mpn_bdiv_q_1 +#undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#undef HAVE_NATIVE_mpn_com #undef HAVE_NATIVE_mpn_copyd #undef HAVE_NATIVE_mpn_copyi #undef HAVE_NATIVE_mpn_divexact_1 @@ -2904,36 +3027,54 @@ #undef HAVE_NATIVE_mpn_divrem_1c #undef HAVE_NATIVE_mpn_divrem_2 #undef HAVE_NATIVE_mpn_gcd_1 +#undef HAVE_NATIVE_mpn_hamdist #undef HAVE_NATIVE_mpn_invert_limb #undef HAVE_NATIVE_mpn_ior_n #undef HAVE_NATIVE_mpn_iorn_n +#undef HAVE_NATIVE_mpn_lshift #undef HAVE_NATIVE_mpn_lshiftc +#undef HAVE_NATIVE_mpn_lshsub_n #undef HAVE_NATIVE_mpn_mod_1 +#undef HAVE_NATIVE_mpn_mod_1_1p #undef HAVE_NATIVE_mpn_mod_1c +#undef HAVE_NATIVE_mpn_mod_1s_2p +#undef HAVE_NATIVE_mpn_mod_1s_4p +#undef HAVE_NATIVE_mpn_mod_34lsub1 #undef HAVE_NATIVE_mpn_modexact_1_odd #undef HAVE_NATIVE_mpn_modexact_1c_odd +#undef HAVE_NATIVE_mpn_mul_1 #undef HAVE_NATIVE_mpn_mul_1c #undef HAVE_NATIVE_mpn_mul_2 #undef HAVE_NATIVE_mpn_mul_3 #undef HAVE_NATIVE_mpn_mul_4 +#undef HAVE_NATIVE_mpn_mul_basecase #undef HAVE_NATIVE_mpn_nand_n #undef HAVE_NATIVE_mpn_nior_n +#undef HAVE_NATIVE_mpn_popcount #undef HAVE_NATIVE_mpn_preinv_divrem_1 #undef HAVE_NATIVE_mpn_preinv_mod_1 #undef HAVE_NATIVE_mpn_redc_1 #undef HAVE_NATIVE_mpn_redc_2 +#undef HAVE_NATIVE_mpn_rsblsh1_n +#undef HAVE_NATIVE_mpn_rsblsh2_n +#undef HAVE_NATIVE_mpn_rsblsh_n #undef HAVE_NATIVE_mpn_rsh1add_n +#undef HAVE_NATIVE_mpn_rsh1add_nc #undef HAVE_NATIVE_mpn_rsh1sub_n +#undef HAVE_NATIVE_mpn_rsh1sub_nc +#undef HAVE_NATIVE_mpn_rshift #undef HAVE_NATIVE_mpn_sqr_basecase #undef HAVE_NATIVE_mpn_sqr_diagonal #undef HAVE_NATIVE_mpn_sub_n #undef HAVE_NATIVE_mpn_sub_nc #undef HAVE_NATIVE_mpn_sublsh1_n +#undef HAVE_NATIVE_mpn_sublsh2_n +#undef HAVE_NATIVE_mpn_sublsh_n #undef HAVE_NATIVE_mpn_submul_1c -#undef HAVE_NATIVE_mpn_umul_ppmm -#undef HAVE_NATIVE_mpn_umul_ppmm_r #undef HAVE_NATIVE_mpn_udiv_qrnnd #undef HAVE_NATIVE_mpn_udiv_qrnnd_r +#undef HAVE_NATIVE_mpn_umul_ppmm +#undef HAVE_NATIVE_mpn_umul_ppmm_r #undef HAVE_NATIVE_mpn_xor_n #undef HAVE_NATIVE_mpn_xnor_n]) @@ -2943,7 +3084,10 @@ GMP_PROG_M4 GMP_M4_M4WRAP_SPURIOUS else - M4=m4-not-needed + # In case the user has set M4 in the environment, don't touch it. + if test -z "$M4" ; then + M4=m4-not-needed + fi fi # Only do the GMP_ASM checks if there's a .S or .asm wanting them. @@ -3017,7 +3161,7 @@ ;; esac ;; - X86_PATTERN | athlon64-*-* | atom-*-* | core2-*-* | x86_64-*-*) + X86_PATTERN | X86_64_PATTERN) GMP_ASM_ALIGN_FILL_0x90 case $ABI in 32) @@ -3036,6 +3180,7 @@ ;; 64) GMP_INCLUDE_MPN(x86_64/x86_64-defs.m4) + AC_DEFINE(HAVE_HOST_CPU_FAMILY_x86_64) case $host in *-*-darwin*) GMP_INCLUDE_MPN(x86_64/darwin.m4) ;; @@ -3080,25 +3225,26 @@ [The gmp-mparam.h file (a string) the tune program should suggest updating.]) -# Copy any SQR_KARATSUBA_THRESHOLD from gmp-mparam.h to config.m4. +# Copy any SQR_TOOM2_THRESHOLD from gmp-mparam.h to config.m4. # Some versions of sqr_basecase.asm use this. # Fat binaries do this on a per-file basis, so skip in that case. # if test -z "$fat_path"; then - tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_KARATSUBA_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` + tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_TOOM2_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` if test -n "$tmp_gmp_karatsuba_sqr_threshold"; then - GMP_DEFINE_RAW(["define(,<$tmp_gmp_karatsuba_sqr_threshold>)"]) + GMP_DEFINE_RAW(["define(,<$tmp_gmp_karatsuba_sqr_threshold>)"]) fi fi # Sizes of some types, needed at preprocessing time. # -# FIXME: The assumption that BITS_PER_MP_LIMB is 8*sizeof(mp_limb_t) might -# be slightly rash, but it's true everwhere we know of and ought to be true +# FIXME: The assumption that GMP_LIMB_BITS is 8*sizeof(mp_limb_t) might +# be slightly rash, but it's true everywhere we know of and ought to be true # of any sensible system. In a generic C build, grepping LONG_BIT out of # might be an alternative, for maximum portability. # +AC_CHECK_SIZEOF(void *) AC_CHECK_SIZEOF(unsigned short) AC_CHECK_SIZEOF(unsigned) AC_CHECK_SIZEOF(unsigned long) @@ -3106,7 +3252,7 @@ if test "$ac_cv_sizeof_mp_limb_t" = 0; then AC_MSG_ERROR([Oops, mp_limb_t doesn't seem to work]) fi -AC_SUBST(BITS_PER_MP_LIMB, `expr 8 \* $ac_cv_sizeof_mp_limb_t`) +AC_SUBST(GMP_LIMB_BITS, `expr 8 \* $ac_cv_sizeof_mp_limb_t`) GMP_DEFINE_RAW(["define(,<$ac_cv_sizeof_unsigned>)"]) # Check compiler limb size matches gmp-mparam.h @@ -3116,20 +3262,20 @@ # probably wouldn't want to be fatal, none of the libgmp assembler code # depends on ulong. # -mparam_bits=[`sed -n 's/^#define BITS_PER_MP_LIMB[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source`] -if test -n "$mparam_bits" && test "$mparam_bits" -ne $BITS_PER_MP_LIMB; then +mparam_bits=[`sed -n 's/^#define GMP_LIMB_BITS[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source`] +if test -n "$mparam_bits" && test "$mparam_bits" -ne $GMP_LIMB_BITS; then if test "$test_CFLAGS" = set; then - AC_MSG_ERROR([Oops, mp_limb_t is $BITS_PER_MP_LIMB bits, but the assembler code + AC_MSG_ERROR([Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code in this configuration expects $mparam_bits bits. You appear to have set \$CFLAGS, perhaps you also need to tell GMP the intended ABI, see "ABI and ISA" in the manual.]) else - AC_MSG_ERROR([Oops, mp_limb_t is $BITS_PER_MP_LIMB bits, but the assembler code + AC_MSG_ERROR([Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code in this configuration expects $mparam_bits bits.]) fi fi -GMP_DEFINE_RAW(["define(,$BITS_PER_MP_LIMB)"]) +GMP_DEFINE_RAW(["define(,$GMP_LIMB_BITS)"]) GMP_DEFINE_RAW(["define(,$GMP_NAIL_BITS)"]) GMP_DEFINE_RAW(["define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))"]) @@ -3158,11 +3304,11 @@ test -d tune || mkdir tune case $sqr_basecase_source in *.asm) - sqr_max=[`sed -n 's/^def...(SQR_KARATSUBA_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source`] + sqr_max=[`sed -n 's/^def...(SQR_TOOM2_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source`] if test -n "$sqr_max"; then TUNE_SQR_OBJ=sqr_asm.o - AC_DEFINE_UNQUOTED(TUNE_SQR_KARATSUBA_MAX,$sqr_max, - [Maximum size the tune program can test for SQR_KARATSUBA_THRESHOLD]) + AC_DEFINE_UNQUOTED(TUNE_SQR_TOOM2_MAX,$sqr_max, + [Maximum size the tune program can test for SQR_TOOM2_THRESHOLD]) fi cat >tune/sqr_basecase.c <tune/sqr_basecase.c <,$want_assert_01)"]) + + +AC_ARG_ENABLE(alloca, +AC_HELP_STRING([--enable-alloca],[how to get temp memory [[default=reentrant]]]), +[case $enableval in +alloca|malloc-reentrant|malloc-notreentrant) ;; +yes|no|reentrant|notreentrant) ;; +debug) ;; +*) + AC_MSG_ERROR([bad value $enableval for --enable-alloca, need one of: +yes no reentrant notreentrant alloca malloc-reentrant malloc-notreentrant debug]) ;; +esac], +[enable_alloca=reentrant]) + + +# IMPROVE ME: The default for C++ is disabled. The tests currently +# performed below for a working C++ compiler are not particularly strong, +# and in general can't be expected to get the right setup on their own. The +# most significant problem is getting the ABI the same. Defaulting CXXFLAGS +# to CFLAGS takes only a small step towards this. It's also probably worth +# worrying whether the C and C++ runtimes from say gcc and a vendor C++ can +# work together. Some rather broken C++ installations were encountered +# during testing, and though such things clearly aren't GMP's problem, if +# --enable-cxx=detect were to be the default then some careful checks of +# which, if any, C++ compiler on the system is up to scratch would be +# wanted. +# +AC_ARG_ENABLE(cxx, +AC_HELP_STRING([--enable-cxx],[enable C++ support [[default=no]]]), +[case $enableval in +yes|no|detect) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-cxx, need yes/no/detect]) ;; +esac], +[enable_cxx=no]) + + +AC_ARG_ENABLE(fft, +AC_HELP_STRING([--enable-fft],[enable FFTs for multiplication [[default=yes]]]), +[case $enableval in +yes|no) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-fft, need yes or no]) ;; +esac], +[enable_fft=yes]) + +if test "$enable_fft" = "yes"; then + AC_DEFINE(WANT_FFT,1, + [Define to 1 to enable FFTs for multiplication, per --enable-fft]) +fi + + +AC_ARG_ENABLE(old-fft-full, +AC_HELP_STRING([--enable-old-fft-full],[enable old mpn_mul_fft_full for multiplication [[default=no]]]), +[case $enableval in +yes|no) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-old-fft-full, need yes or no]) ;; +esac], +[enable_old_fft_full=no]) + +if test "$enable_old_fft_full" = "yes"; then + AC_DEFINE(WANT_OLD_FFT_FULL,1, + [Define to 1 to enable old mpn_mul_fft_full for multiplication, per --enable-old-fft-full]) +fi + + +AC_ARG_ENABLE(mpbsd, +AC_HELP_STRING([--enable-mpbsd], + [build Berkeley MP compatibility library [[default=no]]]), +[case $enableval in +yes|no) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-mpbsd, need yes or no]) ;; +esac], +[enable_mpbsd=no]) +AM_CONDITIONAL(WANT_MPBSD, test "$enable_mpbsd" = "yes") + + +AC_ARG_ENABLE(nails, +AC_HELP_STRING([--enable-nails],[use nails on limbs [[default=no]]]), +[case $enableval in +[yes|no|[02468]|[0-9][02468]]) ;; +[*[13579]]) + AC_MSG_ERROR([bad value $enableval for --enable-nails, only even nail sizes supported]) ;; +*) + AC_MSG_ERROR([bad value $enableval for --enable-nails, need yes/no/number]) ;; +esac], +[enable_nails=no]) + +case $enable_nails in +yes) GMP_NAIL_BITS=2 ;; +no) GMP_NAIL_BITS=0 ;; +*) GMP_NAIL_BITS=$enable_nails ;; +esac +AC_SUBST(GMP_NAIL_BITS) + + +AC_ARG_ENABLE(profiling, +AC_HELP_STRING([--enable-profiling], + [build with profiler support [[default=no]]]), +[case $enableval in +no|prof|gprof|instrument) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-profiling, need no/prof/gprof/instrument]) ;; +esac], +[enable_profiling=no]) + +case $enable_profiling in + prof) + AC_DEFINE(WANT_PROFILING_PROF, 1, + [Define to 1 if --enable-profiling=prof]) + ;; + gprof) + AC_DEFINE(WANT_PROFILING_GPROF, 1, + [Define to 1 if --enable-profiling=gprof]) + ;; + instrument) + AC_DEFINE(WANT_PROFILING_INSTRUMENT, 1, + [Define to 1 if --enable-profiling=instrument]) + ;; +esac + +GMP_DEFINE_RAW(["define(,<\`$enable_profiling'>)"]) + +# -fomit-frame-pointer is incompatible with -pg on some chips +if test "$enable_profiling" = gprof; then + fomit_frame_pointer= +else + fomit_frame_pointer="-fomit-frame-pointer" +fi + + +AC_ARG_WITH(readline, +AC_HELP_STRING([--with-readline], + [readline support in calc demo program [[default=detect]]]), +[case $withval in +yes|no|detect) ;; +*) AC_MSG_ERROR([bad value $withval for --with-readline, need yes/no/detect]) ;; +esac], +[with_readline=detect]) + + +AC_ARG_ENABLE(fat, +AC_HELP_STRING([--enable-fat], + [build a fat binary on systems that support it [[default=no]]]), +[case $enableval in +yes|no) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-fat, need yes or no]) ;; +esac], +[enable_fat=no]) + + +AC_ARG_ENABLE(minithres, +AC_HELP_STRING([--enable-minithres], + [choose minimal thresholds for testing [[default=no]]]), +[case $enableval in +yes|no) ;; +*) AC_MSG_ERROR([bad value $enableval for --enable-minithres, need yes or no]) ;; +esac], +[enable_minithres=no]) + + + +tmp_host=`echo $host_cpu | sed 's/\./_/'` +AC_DEFINE_UNQUOTED(HAVE_HOST_CPU_$tmp_host) +GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_HOST_CPU_$tmp_host')", POST) + +dnl The HAVE_HOST_CPU_ list here only needs to have entries for those which +dnl are going to be tested, not everything that can possibly be selected. +dnl +dnl The HAVE_HOST_CPU_FAMILY_ list similarly, and note that the AC_DEFINEs +dnl for these are under the cpu specific setups below. + +AH_VERBATIM([HAVE_HOST_CPU_1], +[/* Define one of these to 1 for the host CPU family. + If your CPU is not in any of these families, leave all undefined. + For an AMD64 chip, define "x86" in ABI=32, but not in ABI=64. */ +#undef HAVE_HOST_CPU_FAMILY_alpha +#undef HAVE_HOST_CPU_FAMILY_m68k +#undef HAVE_HOST_CPU_FAMILY_power +#undef HAVE_HOST_CPU_FAMILY_powerpc +#undef HAVE_HOST_CPU_FAMILY_x86 +#undef HAVE_HOST_CPU_FAMILY_x86_64 + +/* Define one of the following to 1 for the host CPU, as per the output of + ./config.guess. If your CPU is not listed here, leave all undefined. */ +#undef HAVE_HOST_CPU_alphaev67 +#undef HAVE_HOST_CPU_alphaev68 +#undef HAVE_HOST_CPU_alphaev7 +#undef HAVE_HOST_CPU_m68020 +#undef HAVE_HOST_CPU_m68030 +#undef HAVE_HOST_CPU_m68040 +#undef HAVE_HOST_CPU_m68060 +#undef HAVE_HOST_CPU_m68360 +#undef HAVE_HOST_CPU_powerpc604 +#undef HAVE_HOST_CPU_powerpc604e +#undef HAVE_HOST_CPU_powerpc750 +#undef HAVE_HOST_CPU_powerpc7400 +#undef HAVE_HOST_CPU_supersparc +#undef HAVE_HOST_CPU_i386 +#undef HAVE_HOST_CPU_i586 +#undef HAVE_HOST_CPU_i686 +#undef HAVE_HOST_CPU_pentium +#undef HAVE_HOST_CPU_pentiummmx +#undef HAVE_HOST_CPU_pentiumpro +#undef HAVE_HOST_CPU_pentium2 +#undef HAVE_HOST_CPU_pentium3]) + + +# Table of compilers, options, and mpn paths. This code has various related +# purposes +# +# - better default CC/CFLAGS selections than autoconf otherwise gives +# - default CC/CFLAGS selections for extra CPU types specific to GMP +# - a few tests for known bad compilers +# - choice of ABIs on suitable systems +# - selection of corresponding mpn search path +# +# After GMP specific searches and tests, the standard autoconf AC_PROG_CC is +# called. User selections of CC etc are respected. +# +# Care is taken not to use macros like AC_TRY_COMPILE during the GMP +# pre-testing, since they of course depend on AC_PROG_CC, and also some of +# them cache their results, which is not wanted. +# +# The ABI selection mechanism is unique to GMP. All that reaches autoconf +# is a different selection of CC/CFLAGS according to the best ABI the system +# supports, and/or what the user selects. Naturally the mpn assembler code +# selected is very dependent on the ABI. +# +# The closest the standard tools come to a notion of ABI is something like +# "sparc64" which encodes a CPU and an ABI together. This doesn't seem to +# scale well for GMP, where exact CPU types like "ultrasparc2" are wanted, +# separate from the ABI used on them. +# +# +# The variables set here are +# +# cclist the compiler choices +# xx_cflags flags for compiler xx +# xx_cflags_maybe flags for compiler xx, if they work +# xx_cppflags cpp flags for compiler xx +# xx_cflags_optlist list of sets of optional flags +# xx_cflags_yyy set yyy of optional flags for compiler xx +# xx_ldflags -Wc,-foo flags for libtool linking with compiler xx +# ar_flags extra flags for $AR +# nm_flags extra flags for $NM +# limb limb size, can be "longlong" +# path mpn search path +# extra_functions extra mpn functions +# fat_path fat binary mpn search path [if fat binary desired] +# fat_functions fat functions +# fat_thresholds fat thresholds +# +# Suppose xx_cflags_optlist="arch", then flags from $xx_cflags_arch are +# tried, and the first flag that works will be used. An optlist like "arch +# cpu optimize" can be used to get multiple independent sets of flags tried. +# The first that works from each will be used. If no flag in a set works +# then nothing from that set is added. +# +# For multiple ABIs, the scheme extends as follows. +# +# abilist set of ABI choices +# cclist_aa compiler choices in ABI aa +# xx_aa_cflags flags for xx in ABI aa +# xx_aa_cflags_maybe flags for xx in ABI aa, if they work +# xx_aa_cppflags cpp flags for xx in ABI aa +# xx_aa_cflags_optlist list of sets of optional flags in ABI aa +# xx_aa_cflags_yyy set yyy of optional flags for compiler xx in ABI aa +# xx_aa_ldflags -Wc,-foo flags for libtool linking +# ar_aa_flags extra flags for $AR in ABI aa +# nm_aa_flags extra flags for $NM in ABI aa +# limb_aa limb size in ABI aa, can be "longlong" +# path_aa mpn search path in ABI aa +# extra_functions_aa extra mpn functions in ABI aa +# +# As a convenience, the unadorned xx_cflags (etc) are used for the last ABI +# in ablist, if an xx_aa_cflags for that ABI isn't given. For example if +# abilist="64 32" then $cc_64_cflags will be used for the 64-bit ABI, but +# for the 32-bit either $cc_32_cflags or $cc_cflags is used, whichever is +# defined. This makes it easy to add some 64-bit compilers and flags to an +# unadorned 32-bit set. +# +# limb=longlong (or limb_aa=longlong) applies to all compilers within that +# ABI. It won't work to have some needing long long and some not, since a +# single instantiated gmp.h will be used by both. +# +# SPEED_CYCLECOUNTER, cyclecounter_size and CALLING_CONVENTIONS_OBJS are +# also set here, with an ABI suffix. +# +# +# +# A table-driven approach like this to mapping cpu type to good compiler +# options is a bit of a maintenance burden, but there's not much uniformity +# between options specifications on different compilers. Some sort of +# separately updatable tool might be cute. +# +# The use of lots of variables like this, direct and indirect, tends to +# obscure when and how various things are done, but unfortunately it's +# pretty much the only way. If shell subroutines were portable then actual +# code like "if this .. do that" could be written, but attempting the same +# with full copies of GMP_PROG_CC_WORKS etc expanded at every point would +# hugely bloat the output. + + +AC_ARG_VAR(ABI, [desired ABI (for processors supporting more than one ABI)]) + +# abilist needs to be non-empty, "standard" is just a generic name here +abilist="standard" + +# FIXME: We'd like to prefer an ANSI compiler, perhaps by preferring +# c89 over cc here. But note that on HP-UX c89 provides a castrated +# environment, and would want to be excluded somehow. Maybe +# AC_PROG_CC_STDC already does enough to stick cc into ANSI mode and +# we don't need to worry. +# +cclist="gcc cc" + +gcc_cflags="-O2 -pedantic" +gcc_64_cflags="-O2 -pedantic" +cc_cflags="-O" +cc_64_cflags="-O" + +SPEED_CYCLECOUNTER_OBJ= +cyclecounter_size=2 + +AC_SUBST(HAVE_HOST_CPU_FAMILY_power, 0) +AC_SUBST(HAVE_HOST_CPU_FAMILY_powerpc,0) + +case $host in + + a29k*-*-*) + path="a29k" + ;; + + + alpha*-*-*) + AC_DEFINE(HAVE_HOST_CPU_FAMILY_alpha) + case $host_cpu in + alphaev5* | alphapca5*) + path="alpha/ev5 alpha" ;; + alphaev67 | alphaev68 | alphaev7*) + path="alpha/ev67 alpha/ev6 alpha" ;; + alphaev6) + path="alpha/ev6 alpha" ;; + *) + path="alpha" ;; + esac + extra_functions="cntlz" + gcc_cflags_optlist="asm cpu oldas" # need asm ahead of cpu, see below + gcc_cflags_oldas="-Wa,-oldas" # see GMP_GCC_WA_OLDAS. + + # gcc 2.7.2.3 doesn't know any -mcpu= for alpha, apparently. + # gcc 2.95 knows -mcpu= ev4, ev5, ev56, pca56, ev6. + # gcc 3.0 adds nothing. + # gcc 3.1 adds ev45, ev67 (but ev45 is the same as ev4). + # gcc 3.2 adds nothing. + # + # gcc version "2.9-gnupro-99r1" under "-O2 -mcpu=ev6" strikes internal + # compiler errors too easily and is rejected by GMP_PROG_CC_WORKS. Each + # -mcpu=ev6 below has a fallback to -mcpu=ev56 for this reason. + # + case $host_cpu in + alpha) gcc_cflags_cpu="-mcpu=ev4" ;; + alphaev5) gcc_cflags_cpu="-mcpu=ev5" ;; + alphaev56) gcc_cflags_cpu="-mcpu=ev56" ;; + alphapca56 | alphapca57) + gcc_cflags_cpu="-mcpu=pca56" ;; + alphaev6) gcc_cflags_cpu="-mcpu=ev6 -mcpu=ev56" ;; + alphaev67 | alphaev68 | alphaev7*) + gcc_cflags_cpu="-mcpu=ev67 -mcpu=ev6 -mcpu=ev56" ;; + esac + + # gcc version "2.9-gnupro-99r1" on alphaev68-dec-osf5.1 has been seen + # accepting -mcpu=ev6, but not putting the assembler in the right mode + # for what it produces. We need to do this for it, and need to do it + # before testing the -mcpu options. + # + # On old versions of gcc, which don't know -mcpu=, we believe an + # explicit -Wa,-mev5 etc will be necessary to put the assembler in + # the right mode for our .asm files and longlong.h asm blocks. + # + # On newer versions of gcc, when -mcpu= is known, we must give a -Wa + # which is at least as high as the code gcc will generate. gcc + # establishes what it needs with a ".arch" directive, our command line + # option seems to override that. + # + # gas prior to 2.14 doesn't accept -mev67, but -mev6 seems enough for + # ctlz and cttz (in 2.10.0 at least). + # + # OSF `as' accepts ev68 but stupidly treats it as ev4. -arch only seems + # to affect insns like ldbu which are expanded as macros when necessary. + # Insns like ctlz which were never available as macros are always + # accepted and always generate their plain code. + # + case $host_cpu in + alpha) gcc_cflags_asm="-Wa,-arch,ev4 -Wa,-mev4" ;; + alphaev5) gcc_cflags_asm="-Wa,-arch,ev5 -Wa,-mev5" ;; + alphaev56) gcc_cflags_asm="-Wa,-arch,ev56 -Wa,-mev56" ;; + alphapca56 | alphapca57) + gcc_cflags_asm="-Wa,-arch,pca56 -Wa,-mpca56" ;; + alphaev6) gcc_cflags_asm="-Wa,-arch,ev6 -Wa,-mev6" ;; + alphaev67 | alphaev68 | alphaev7*) + gcc_cflags_asm="-Wa,-arch,ev67 -Wa,-mev67 -Wa,-arch,ev6 -Wa,-mev6" ;; + esac + + # It might be better to ask "cc" whether it's Cray C or DEC C, + # instead of relying on the OS part of $host. But it's hard to + # imagine either of those compilers anywhere except their native + # systems. + # + GMP_INCLUDE_MPN(alpha/alpha-defs.m4) + case $host in + *-cray-unicos*) + cc_cflags="-O" # no -g, it silently disables all optimizations + GMP_INCLUDE_MPN(alpha/unicos.m4) + # Don't perform any assembly syntax tests on this beast. + gmp_asm_syntax_testing=no + ;; + *-*-osf*) + GMP_INCLUDE_MPN(alpha/default.m4) + cc_cflags="" + cc_cflags_optlist="opt cpu" + + # not sure if -fast works on old versions, so make it optional + cc_cflags_opt="-fast -O2" + + # DEC C V5.9-005 knows ev4, ev5, ev56, pca56, ev6. + # Compaq C V6.3-029 adds ev67. + # + case $host_cpu in + alpha) cc_cflags_cpu="-arch~ev4~-tune~ev4" ;; + alphaev5) cc_cflags_cpu="-arch~ev5~-tune~ev5" ;; + alphaev56) cc_cflags_cpu="-arch~ev56~-tune~ev56" ;; + alphapca56 | alphapca57) + cc_cflags_cpu="-arch~pca56~-tune~pca56" ;; + alphaev6) cc_cflags_cpu="-arch~ev6~-tune~ev6" ;; + alphaev67 | alphaev68 | alphaev7*) + cc_cflags_cpu="-arch~ev67~-tune~ev67 -arch~ev6~-tune~ev6" ;; + esac + ;; + *) + GMP_INCLUDE_MPN(alpha/default.m4) + ;; + esac + + case $host in + *-*-unicos*) + # tune/alpha.asm assumes int==4bytes but unicos uses int==8bytes + ;; + *) + SPEED_CYCLECOUNTER_OBJ=alpha.lo + cyclecounter_size=1 ;; + esac + ;; + + + # Cray vector machines. + # This must come after alpha* so that we can recognize present and future + # vector processors with a wildcard. + *-cray-unicos*) + gmp_asm_syntax_testing=no + cclist="cc" + # We used to have -hscalar0 here as a workaround for miscompilation of + # mpz/import.c, but let's hope Cray fixes their bugs instead, since + # -hscalar0 causes disastrously poor code to be generated. + cc_cflags="-O3 -hnofastmd -htask0 -Wa,-B" + path="cray" + ;; + + + arm*-*-*) + path="arm" + gcc_cflags="$gcc_cflags $fomit_frame_pointer" + gcc_testlist="gcc-arm-umodsi" + GMP_INCLUDE_MPN(arm/arm-defs.m4) + ;; + + + clipper*-*-*) + path="clipper" + ;; + + + # Fujitsu + [f30[01]-fujitsu-sysv*]) + cclist="gcc vcc" + # FIXME: flags for vcc? + vcc_cflags="-g" + path="fujitsu" + ;; + + + hppa*-*-*) + # HP cc (the one sold separately) is K&R by default, but AM_C_PROTOTYPES + # will add "-Ae", or "-Aa -D_HPUX_SOURCE", to put it into ansi mode, if + # possible. + # + # gcc for hppa 2.0 can be built either for 2.0n (32-bit) or 2.0w + # (64-bit), but not both, so there's no option to choose the desired + # mode, we must instead detect which of the two it is. This is done by + # checking sizeof(long), either 4 or 8 bytes respectively. Do this in + # ABI=1.0 too, in case someone tries to build that with a 2.0w gcc. + # + gcc_cflags_optlist="arch" + gcc_testlist="sizeof-long-4" + SPEED_CYCLECOUNTER_OBJ=hppa.lo + cyclecounter_size=1 + + # FIXME: For hppa2.0*, path should be "pa32/hppa2_0 pa32/hppa1_1 pa32". + # (Can't remember why this isn't done already, have to check what .asm + # files are available in each and how they run on a typical 2.0 cpu.) + # + case $host_cpu in + hppa1.0*) path="pa32" ;; + hppa7000*) path="pa32/hppa1_1 pa32" ;; + hppa2.0* | hppa64) + path="pa32/hppa2_0 pa32/hppa1_1/pa7100 pa32/hppa1_1 pa32" ;; + *) # default to 7100 + path="pa32/hppa1_1/pa7100 pa32/hppa1_1 pa32" ;; + esac + + # gcc 2.7.2.3 knows -mpa-risc-1-0 and -mpa-risc-1-1 + # gcc 2.95 adds -mpa-risc-2-0, plus synonyms -march=1.0, 1.1 and 2.0 + # + # We don't use -mpa-risc-2-0 in ABI=1.0 because 64-bit registers may not + # be saved by the kernel on an old system. Actually gcc (as of 3.2) + # only adds a few float instructions with -mpa-risc-2-0, so it would + # probably be safe, but let's not take the chance. In any case, a + # configuration like --host=hppa2.0 ABI=1.0 is far from optimal. + # + case $host_cpu in + hppa1.0*) gcc_cflags_arch="-mpa-risc-1-0" ;; + *) # default to 7100 + gcc_cflags_arch="-mpa-risc-1-1" ;; + esac + + case $host_cpu in + hppa1.0*) cc_cflags="+O2" ;; + *) # default to 7100 + cc_cflags="+DA1.1 +O2" ;; + esac + + case $host in + hppa2.0*-*-* | hppa64-*-*) + cclist_20n="gcc cc" + abilist="2.0n 1.0" + path_20n="pa64" + limb_20n=longlong + any_20n_testlist="sizeof-long-4" + SPEED_CYCLECOUNTER_OBJ_20n=hppa2.lo + cyclecounter_size_20n=2 + + # -mpa-risc-2-0 is only an optional flag, in case an old gcc is + # used. Assembler support for 2.0 is essential though, for our asm + # files. + gcc_20n_cflags="-O2" + gcc_20n_cflags_optlist="arch" + gcc_20n_cflags_arch="-mpa-risc-2-0 -mpa-risc-1-1" + gcc_20n_testlist="sizeof-long-4 hppa-level-2.0" + + cc_20n_cflags="+DA2.0 +e +O2 -Wl,+vnocompatwarnings" + cc_20n_testlist="hpc-hppa-2-0" + + # ABI=2.0w is available for hppa2.0w and hppa2.0, but not for + # hppa2.0n, on the assumption that that the latter indicates a + # desire for ABI=2.0n. + case $host in + hppa2.0n-*-*) ;; + *) + # HPUX 10 and earlier cannot run 2.0w. Not sure about other + # systems (GNU/Linux for instance), but lets assume they're ok. + case $host in + [*-*-hpux[1-9] | *-*-hpux[1-9].* | *-*-hpux10 | *-*-hpux10.*]) ;; + [*-*-linux*]) abilist="1.0" ;; # due to linux permanent kernel bug + *) abilist="2.0w $abilist" ;; + esac + + cclist_20w="gcc cc" + gcc_20w_cflags="-O2 -mpa-risc-2-0" + cc_20w_cflags="+DD64 +O2" + cc_20w_testlist="hpc-hppa-2-0" + path_20w="pa64" + any_20w_testlist="sizeof-long-8" + SPEED_CYCLECOUNTER_OBJ_20w=hppa2w.lo + cyclecounter_size_20w=2 + ;; + esac + ;; + esac + ;; + + + i960*-*-*) + path="i960" + ;; + + + IA64_PATTERN) + abilist="64" + GMP_INCLUDE_MPN(ia64/ia64-defs.m4) + SPEED_CYCLECOUNTER_OBJ=ia64.lo + + case $host_cpu in + itanium) path="ia64/itanium ia64" ;; + itanium2) path="ia64/itanium2 ia64" ;; + *) path="ia64" ;; + esac + + gcc_64_cflags_optlist="tune" + gcc_32_cflags_optlist=$gcc_64_cflags_optlist + + # gcc pre-release 3.4 adds -mtune itanium and itanium2 + case $host_cpu in + itanium) gcc_cflags_tune="-mtune=itanium" ;; + itanium2) gcc_cflags_tune="-mtune=itanium2" ;; + esac + + case $host in + *-*-linux*) + cclist="gcc icc" + icc_cflags="-no-gcc" + icc_cflags_optlist="opt" + # Don't use -O3, it is for "large data sets" and also miscompiles GMP. + # But icc miscompiles GMP at any optimization level, at higher levels + # it miscompiles more files... + icc_cflags_opt="-O2 -O1" + ;; + + *-*-hpux*) + # HP cc sometimes gets internal errors if the optimization level is + # too high. GMP_PROG_CC_WORKS detects this, the "_opt" fallbacks + # let us use whatever seems to work. + # + abilist="32 64" + + cclist_32="gcc cc" + path_32="ia64" + cc_32_cflags="" + cc_32_cflags_optlist="opt" + cc_32_cflags_opt="+O3 +O2 +O1" + gcc_32_cflags="-milp32 -O2" + limb_32=longlong + SPEED_CYCLECOUNTER_OBJ_32=ia64.lo + cyclecounter_size_32=2 + + # Must have +DD64 in CPPFLAGS to get the right __LP64__ for headers, + # but also need it in CFLAGS for linking programs, since automake + # only uses CFLAGS when linking, not CPPFLAGS. + # FIXME: Maybe should use cc_64_ldflags for this, but that would + # need GMP_LDFLAGS used consistently by all the programs. + # + cc_64_cflags="+DD64" + cc_64_cppflags="+DD64" + cc_64_cflags_optlist="opt" + cc_64_cflags_opt="+O3 +O2 +O1" + gcc_64_cflags="$gcc_64_cflags -mlp64" + ;; + esac + ;; + + + # Motorola 68k + # + M68K_PATTERN) + AC_DEFINE(HAVE_HOST_CPU_FAMILY_m68k) + GMP_INCLUDE_MPN(m68k/m68k-defs.m4) + gcc_cflags="$gcc_cflags $fomit_frame_pointer" + gcc_cflags_optlist="arch" + + # gcc 2.7.2 knows -m68000, -m68020, -m68030, -m68040. + # gcc 2.95 adds -mcpu32, -m68060. + # FIXME: Maybe "-m68020 -mnobitfield" would suit cpu32 on 2.7.2. + # + case $host_cpu in + m68020) gcc_cflags_arch="-m68020" ;; + m68030) gcc_cflags_arch="-m68030" ;; + m68040) gcc_cflags_arch="-m68040" ;; + m68060) gcc_cflags_arch="-m68060 -m68000" ;; + m68360) gcc_cflags_arch="-mcpu32 -m68000" ;; + *) gcc_cflags_arch="-m68000" ;; + esac + + # FIXME: m68k/mc68020 looks like it's ok for cpu32, but this wants to be + # tested. Will need to introduce an m68k/cpu32 if m68k/mc68020 ever uses + # the bitfield instructions. + case $host_cpu in + [m680[234]0 | m68360]) path="m68k/mc68020 m68k" ;; + *) path="m68k" ;; + esac + ;; + + + # Motorola 88k + m88k*-*-*) + path="m88k" + ;; + m88110*-*-*) + gcc_cflags="$gcc_cflags -m88110" + path="m88k/mc88110 m88k" + ;; + + + # National Semiconductor 32k + ns32k*-*-*) + path="ns32k" + ;; + + + # IRIX 5 and earlier can only run 32-bit o32. + # + # IRIX 6 and up always has a 64-bit mips CPU can run n32 or 64. n32 is + # preferred over 64, but only because that's been the default in past + # versions of GMP. The two are equally efficient. + # + # Linux kernel 2.2.13 arch/mips/kernel/irixelf.c has a comment about not + # supporting n32 or 64. + # + # For reference, libtool (eg. 1.5.6) recognises the n32 ABI and knows the + # right options to use when linking (both cc and gcc), so no need for + # anything special from us. + # + mips*-*-*) + abilist="o32" + gcc_cflags_optlist="abi" + gcc_cflags_abi="-mabi=32" + gcc_testlist="gcc-mips-o32" + path="mips32" + cc_cflags="-O2 -o32" # no -g, it disables all optimizations + # this suits both mips32 and mips64 + GMP_INCLUDE_MPN(mips32/mips-defs.m4) + + case $host in + [mips64*-*-* | mips*-*-irix[6789]*]) + abilist="n32 64 o32" + + cclist_n32="gcc cc" + gcc_n32_cflags="-O2 -mabi=n32" + cc_n32_cflags="-O2 -n32" # no -g, it disables all optimizations + limb_n32=longlong + path_n32="mips64" + + cclist_64="gcc cc" + gcc_64_cflags="$gcc_64_cflags -mabi=64" + gcc_64_ldflags="-Wc,-mabi=64" + cc_64_cflags="-O2 -64" # no -g, it disables all optimizations + cc_64_ldflags="-Wc,-64" + path_64="mips64" + ;; + esac + ;; + + + # Darwin (powerpc-apple-darwin1.3) has it's hacked gcc installed as cc. + # Our usual "gcc in disguise" detection means gcc_cflags etc here gets + # used. + # + # The darwin pre-compiling preprocessor is disabled with -no-cpp-precomp + # since it doesn't like "__attribute__ ((mode (SI)))" etc in gmp-impl.h, + # and so always ends up running the plain preprocessor anyway. This could + # be done in CPPFLAGS rather than CFLAGS, but there's not many places + # preprocessing is done separately, and this is only a speedup, the normal + # preprocessor gets run if there's any problems. + # + # We used to use -Wa,-mppc with gcc, but can't remember exactly why. + # Presumably it was for old versions of gcc where -mpowerpc doesn't put + # the assembler in the right mode. In any case -Wa,-mppc is not good, for + # instance -mcpu=604 makes recent gcc use -m604 to get access to the + # "fsel" instruction, but a -Wa,-mppc overrides that, making code that + # comes out with fsel fail. + # + # (Note also that the darwin assembler doesn't accept "-mppc", so any + # -Wa,-mppc was used only if it worked. The right flag on darwin would be + # "-arch ppc" or some such, but that's already the default.) + # + [powerpc*-*-* | power[3-9]-*-*]) + AC_DEFINE(HAVE_HOST_CPU_FAMILY_powerpc) + HAVE_HOST_CPU_FAMILY_powerpc=1 + abilist="32" + cclist="gcc cc" + cc_cflags="-O2" + gcc_cflags="$gcc_cflags -mpowerpc" + gcc_cflags_optlist="precomp subtype asm cpu" + gcc_cflags_precomp="-no-cpp-precomp" + gcc_cflags_subtype="-force_cpusubtype_ALL" # for vmx on darwin + gcc_cflags_asm="" + gcc_cflags_cpu="" + vmx_path="" + + # grab this object, though it's not a true cycle counter routine + SPEED_CYCLECOUNTER_OBJ=powerpc.lo + cyclecounter_size=0 + + case $host_cpu in + powerpc740 | powerpc750) + path="powerpc32/750 powerpc32" ;; + powerpc7400 | powerpc7410) + path="powerpc32/vmx powerpc32/750 powerpc32" ;; + [powerpc74[45]?]) + path="powerpc32/vmx powerpc32" ;; + *) + path="powerpc32" ;; + esac + + # gcc 2.7.2 knows -mcpu=403, 601, 603, 604. + # gcc 2.95 adds 401, 505, 602, 603e, ec603e, 604e, 620, 740, 750, + # 801, 821, 823, 860. + # gcc 3.0 adds 630, rs64a. + # gcc 3.1 adds 405, 7400, 7450. + # gcc 3.2 adds nothing. + # gcc 3.3 adds power3, power4, 8540. power3 seems to be a synonym for 630. + # gcc pre-release 3.4 adds 405fp, 440, 440fp, 970. + # + # FIXME: The way 603e falls back to 603 for gcc 2.7.2 should be + # done for all the others too. But what would be the correct + # arrangements? + # + case $host_cpu in + powerpc401) gcc_cflags_cpu="-mcpu=401" ;; + powerpc403) gcc_cflags_cpu="-mcpu=403" ;; + powerpc405) gcc_cflags_cpu="-mcpu=405" ;; + powerpc505) gcc_cflags_cpu="-mcpu=505" ;; + powerpc601) gcc_cflags_cpu="-mcpu=601" ;; + powerpc602) gcc_cflags_cpu="-mcpu=602" ;; + powerpc603) gcc_cflags_cpu="-mcpu=603" ;; + powerpc603e) gcc_cflags_cpu="-mcpu=603e -mcpu=603" ;; + powerpc604) gcc_cflags_cpu="-mcpu=604" ;; + powerpc604e) gcc_cflags_cpu="-mcpu=604e -mcpu=604" ;; + powerpc620) gcc_cflags_cpu="-mcpu=620" ;; + powerpc630) gcc_cflags_cpu="-mcpu=630" + cpu_path="p3" ;; + powerpc740) gcc_cflags_cpu="-mcpu=740" ;; + powerpc7400 | powerpc7410) + gcc_cflags_asm="-Wa,-maltivec" + gcc_cflags_cpu="-mcpu=7400 -mcpu=750" ;; + [powerpc74[45]?]) + gcc_cflags_asm="-Wa,-maltivec" + gcc_cflags_cpu="-mcpu=7450" ;; + powerpc750) gcc_cflags_cpu="-mcpu=750" ;; + powerpc801) gcc_cflags_cpu="-mcpu=801" ;; + powerpc821) gcc_cflags_cpu="-mcpu=821" ;; + powerpc823) gcc_cflags_cpu="-mcpu=823" ;; + powerpc860) gcc_cflags_cpu="-mcpu=860" ;; + powerpc970) gcc_cflags_cpu="-mtune=970" + vmx_path="powerpc64/vmx" + cpu_path="p4" ;; + power4) gcc_cflags_cpu="-mtune=power4" + cpu_path="p4" ;; + power5) gcc_cflags_cpu="-mtune=power5 -mtune=power4" + cpu_path="p5 p4" ;; + power6) gcc_cflags_cpu="-mtune=power6" + cpu_path="p6" ;; + esac + + case $host in + *-*-aix*) + cclist="gcc xlc cc" + xlc_cflags="-O2 -qmaxmem=20000" + xlc_cflags_optlist="arch" + + # xlc (what version?) knows -qarch=ppc, ppcgr, 601, 602, 603, 604, + # 403, rs64a + # -qarch=ppc is needed, so ensure everything falls back to that. + # FIXME: Perhaps newer versions know more flavours. + # + case $host_cpu in + powerpc403) xlc_cflags_arch="-qarch=403 -qarch=ppc" ;; + powerpc601) xlc_cflags_arch="-qarch=601 -qarch=ppc" ;; + powerpc602) xlc_cflags_arch="-qarch=602 -qarch=ppc" ;; + powerpc603) xlc_cflags_arch="-qarch=603 -qarch=ppc" ;; + powerpc603e) xlc_cflags_arch="-qarch=603 -qarch=ppc" ;; + powerpc604) xlc_cflags_arch="-qarch=604 -qarch=ppc" ;; + powerpc604e) xlc_cflags_arch="-qarch=604 -qarch=ppc" ;; + *) xlc_cflags_arch="-qarch=ppc" ;; + esac + ;; + esac + + case $host in + *-*-aix*) + cclist="gcc xlc cc" + gcc_32_cflags_maybe="-maix32" + xlc_cflags="-O2 -qmaxmem=20000" + xlc_cflags_optlist="arch" + xlc_32_cflags_maybe="-q32" + cc_cflags="-O2 -qmaxmem=20000" + cc_cflags_optlist="arch" + cc_32_cflags_maybe="-q32" + ar_32_flags="-X32" + nm_32_flags="-X32" + esac + + case $host in + POWERPC64_PATTERN) + case $host in + *-*-aix*) + # On AIX a true 64-bit ABI is available. + # Need -Wc to pass object type flags through to the linker. + abilist="aix64 $abilist" + cclist_aix64="gcc xlc" + gcc_aix64_cflags="-O2 -maix64 -mpowerpc64" + gcc_aix64_cflags_optlist="cpu" + gcc_aix64_ldflags="-Wc,-maix64" + xlc_aix64_cflags="-O2 -q64 -qtune=pwr3 -qmaxmem=20000" + xlc_aix64_ldflags="-Wc,-q64" + # Must indicate object type to ar and nm + ar_aix64_flags="-X64" + nm_aix64_flags="-X64" + path_aix64="" + for i in $cpu_path; do path_aix64="${path_aix64}powerpc64/mode64/$i "; done + path_aix64="${path_aix64}powerpc64/mode64 $vmx_path powerpc64" + # grab this object, though it's not a true cycle counter routine + SPEED_CYCLECOUNTER_OBJ_aix64=powerpc64.lo + cyclecounter_size_aix64=0 + ;; + *-*-darwin*) + # On Darwin we can use 64-bit instructions with a longlong limb, + # but the chip still in 32-bit mode. + # In theory this can be used on any OS which knows how to save + # 64-bit registers in a context switch. + # + # Note that we must use -mpowerpc64 with gcc, since the + # longlong.h macros expect limb operands in a single 64-bit + # register, not two 32-bit registers as would be given for a + # long long without -mpowerpc64. In theory we could detect and + # accommodate both styles, but the proper 64-bit registers will + # be fastest and are what we really want to use. + # + # One would think -mpowerpc64 would set the assembler in the right + # mode to handle 64-bit instructions. But for that, also + # -force_cpusubtype_ALL is needed. + # + # Do not use -fast for Darwin, it actually adds options + # incompatible with a shared library. + # + abilist="mode64 mode32 $abilist" + gcc_cflags_opt="-O3 -O2 -O1" # will this become used? + cclist_mode32="gcc" + gcc_mode32_cflags="-mpowerpc64" + gcc_mode32_cflags_optlist="subtype cpu opt" + gcc_mode32_cflags_subtype="-force_cpusubtype_ALL" + gcc_mode32_cflags_opt="-O3 -O2 -O1" + path_mode32="powerpc64/mode32 $vmx_path powerpc64" + limb_mode32=longlong + cclist_mode64="gcc" + gcc_mode64_cflags="-m64" + gcc_mode64_cflags_optlist="cpu opt" + gcc_mode64_cflags_opt="-O3 -O2 -O1" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" + SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo + cyclecounter_size_mode64=0 + any_mode64_testlist="sizeof-long-8" + ;; + *-*-linux* | *-*-*bsd*) + # On GNU/Linux, assume the processor is in 64-bit mode. Some + # environments have a gcc that is always in 64-bit mode, while + # others require -m64, hence the use of cflags_maybe. The + # sizeof-long-8 test checks the mode is right (for the no option + # case). + # + # -mpowerpc64 is not used, since it should be the default in + # 64-bit mode. (We need its effect for the various longlong.h + # asm macros to be right of course.) + # + # gcc64 was an early port of gcc to 64-bit mode, but should be + # obsolete before too long. We prefer plain gcc when it knows + # 64-bits. + # + abilist="mode64 mode32 $abilist" + cclist_mode32="gcc" + gcc_mode32_cflags="-mpowerpc64" + gcc_mode32_cflags_optlist="cpu opt" + gcc_mode32_cflags_opt="-O3 -O2 -O1" + path_mode32="powerpc64/mode32 $vmx_path powerpc64" + limb_mode32=longlong + cclist_mode64="gcc gcc64" + gcc_mode64_cflags_maybe="-m64" + gcc_mode64_cflags_optlist="cpu opt" + gcc_mode64_cflags_opt="-O3 -O2 -O1" + path_mode64="" + for i in $cpu_path; do path_mode64="${path_mode64}powerpc64/mode64/$i "; done + path_mode64="${path_mode64}powerpc64/mode64 $vmx_path powerpc64" + SPEED_CYCLECOUNTER_OBJ_mode64=powerpc64.lo + cyclecounter_size_mode64=0 + any_mode64_testlist="sizeof-long-8" + ;; + esac + ;; + esac + ;; + + + # POWER + [power-*-* | power[12]-*-* | power2sc-*-*]) + AC_DEFINE(HAVE_HOST_CPU_FAMILY_power) + HAVE_HOST_CPU_FAMILY_power=1 + cclist="gcc" + extra_functions="udiv_w_sdiv" + path="power" + + # gcc 2.7.2 knows rios1, rios2, rsc + # + # -mcpu=rios2 can tickle an AIX assembler bug (see GMP_PROG_CC_WORKS) so + # there needs to be a fallback to just -mpower. + # + gcc_cflags_optlist="cpu" + case $host in + power-*-*) gcc_cflags_cpu="-mcpu=power -mpower" ;; + power1-*-*) gcc_cflags_cpu="-mcpu=rios1 -mpower" ;; + power2-*-*) gcc_cflags_cpu="-mcpu=rios2 -mpower" ;; + power2sc-*-*) gcc_cflags_cpu="-mcpu=rsc -mpower" ;; + esac + case $host in + *-*-aix*) + cclist="gcc xlc" + xlc_cflags="-O2 -qarch=pwr -qmaxmem=20000" + ;; + esac + ;; + + + pyramid-*-*) + path="pyr" + ;; + + + # IBM s/370 and similar + [s3[6-9]0*-*-*]) + gcc_cflags="$gcc_cflags $fomit_frame_pointer" + path="s390" + extra_functions="udiv_w_sdiv" + ;; + + + sh-*-*) path="sh" ;; + sh2-*-*) path="sh/sh2 sh" ;; + + + *sparc*-*-*) + # sizeof(long)==4 or 8 is tested, to ensure we get the right ABI. We've + # had various bug reports where users have set CFLAGS for their desired + # mode, but not set our ABI. For some reason it's sparc where this + # keeps coming up, presumably users there are accustomed to driving the + # compiler mode that way. The effect of our testlist setting is to + # reject ABI=64 in favour of ABI=32 if the user has forced the flags to + # 32-bit mode. + # + abilist="32" + cclist="gcc acc cc" + any_testlist="sizeof-long-4" + GMP_INCLUDE_MPN(sparc32/sparc-defs.m4) + + case $host_cpu in + sparcv8 | microsparc | turbosparc) + path="sparc32/v8 sparc32" ;; + supersparc) + path="sparc32/v8/supersparc sparc32/v8 sparc32" ;; + sparc64 | sparcv9* | ultrasparc*) + path="sparc32/v9 sparc32/v8 sparc32" ;; + *) + path="sparc32" ;; + esac + + # gcc 2.7.2 doesn't know about v9 and doesn't pass -xarch=v8plus to the + # assembler. Add it explicitly since the solaris assembler won't accept + # our sparc32/v9 asm code without it. gas accepts -xarch=v8plus too, so + # it can be in the cflags unconditionally (though gas doesn't need it). + # + # gcc -m32 is needed to force 32-bit mode on a dual-ABI system, but past + # gcc doesn't know that flag, hence cflags_maybe. Note that -m32 cannot + # be done through the optlist since the plain cflags would be run first + # and we don't want to require the default mode (whatever it is) works. + # + # Note it's gcc_32_cflags_maybe and not gcc_cflags_maybe because the + # latter would be used in the 64-bit ABI on systems like "*bsd" where + # abilist="64" only. + # + case $host_cpu in + sparc64 | sparcv9* | ultrasparc*) + gcc_cflags="$gcc_cflags -Wa,-xarch=v8plus" ;; + *) + gcc_cflags="$gcc_cflags" ;; + esac + gcc_32_cflags_maybe="-m32" + gcc_cflags_optlist="cpu" + + # gcc 2.7.2 knows -mcypress, -msupersparc, -mv8, -msparclite. + # gcc 2.95 knows -mcpu= v7, hypersparc, sparclite86x, f930, f934, + # sparclet, tsc701, v9, ultrasparc. A warning is given that the + # plain -m forms will disappear. + # gcc 3.0 adds nothing. + # gcc 3.1 adds nothing. + # gcc 3.2 adds nothing. + # gcc 3.3 adds ultrasparc3. + # + case $host_cpu in + supersparc) gcc_cflags_cpu="-mcpu=supersparc -msupersparc" ;; + sparcv8 | microsparc | turbosparc) + gcc_cflags_cpu="-mcpu=v8 -mv8" ;; + sparc64 | sparcv9*) gcc_cflags_cpu="-mcpu=v9 -mv8" ;; + ultrasparc3) gcc_cflags_cpu="-mcpu=ultrasparc3 -mcpu=ultrasparc -mv8" ;; + ultrasparc*) gcc_cflags_cpu="-mcpu=ultrasparc -mv8" ;; + *) gcc_cflags_cpu="-mcpu=v7 -mcypress" ;; + esac + + # SunPRO cc and acc, and SunOS bundled cc + case $host in + *-*-solaris* | *-*-sunos*) + # Note no -g, it disables all optimizations. + cc_cflags= + cc_cflags_optlist="opt arch cpu" + + # SunOS cc doesn't know -xO4, fallback to -O2. + cc_cflags_opt="-xO4 -O2" + + # SunOS cc doesn't know -xarch, apparently always generating v7 + # code, so make this optional + case $host_cpu in + sparcv8 | microsparc | supersparc | turbosparc) + cc_cflags_arch="-xarch=v8" ;; + sparc64 | sparcv9* | ultrasparc*) cc_cflags_arch="-xarch=v8plus" ;; + *) cc_cflags_arch="-xarch=v7" ;; + esac + + # SunOS cc doesn't know -xchip and doesn't seem to have an equivalent. + # SunPRO cc 5 recognises -xchip=generic, old, super, super2, micro, + # micro2, hyper, hyper2, powerup, ultra, ultra2, ultra2i. + # SunPRO cc 6 adds -xchip=ultra2e, ultra3cu. + # + # FIXME: Which of ultra, ultra2 or ultra2i is the best fallback for + # ultrasparc3? + # + case $host_cpu in + supersparc) cc_cflags_cpu="-xchip=super" ;; + microsparc) cc_cflags_cpu="-xchip=micro" ;; + turbosparc) cc_cflags_cpu="-xchip=micro2" ;; + ultrasparc) cc_cflags_cpu="-xchip=ultra" ;; + ultrasparc2) cc_cflags_cpu="-xchip=ultra2" ;; + ultrasparc2i) cc_cflags_cpu="-xchip=ultra2i" ;; + ultrasparc3) cc_cflags_cpu="-xchip=ultra3 -xchip=ultra" ;; + *) cc_cflags_cpu="-xchip=generic" ;; + esac + esac + + case $host_cpu in + sparc64 | sparcv9* | ultrasparc*) + case $host in + # Solaris 6 and earlier cannot run ABI=64 since it doesn't save + # registers properly, so ABI=32 is left as the only choice. + # + [*-*-solaris2.[0-6] | *-*-solaris2.[0-6].*]) ;; + + # BSD sparc64 ports are 64-bit-only systems, so ABI=64 is the only + # choice. In fact they need no special compiler flags, gcc -m64 + # is the default, but it doesn't hurt to add it. v9 CPUs always + # use the sparc64 port, since the plain 32-bit sparc ports don't + # run on a v9. + # + *-*-*bsd*) abilist="64" ;; + + # For all other systems, we try both 64 and 32. + # + # GNU/Linux sparc64 has only recently gained a 64-bit user mode. + # In the past sparc64 meant a v9 cpu, but there were no 64-bit + # operations in user mode. We assume that if "gcc -m64" works + # then the system is suitable. Hopefully even if someone attempts + # to put a new gcc and/or glibc on an old system it won't run. + # + *) abilist="64 32" ;; + esac + + case $host_cpu in + ultrasparc | ultrasparc2 | ultrasparc2i) + path_64="sparc64/ultrasparc12 sparc64" ;; + ultrasparc3) + path_64="sparc64/ultrasparc34 sparc64/ultrasparc12 sparc64" ;; + *) + path_64="sparc64" + esac + + cclist_64="gcc" + any_64_testlist="sizeof-long-8" + + # gcc -mptr64 is probably implied by -m64, but we're not sure if + # this was always so. On Solaris in the past we always used both + # "-m64 -mptr64". + # + # gcc -Wa,-xarch=v9 is thought to be necessary in some cases on + # solaris, but it would seem likely that if gcc is going to generate + # 64-bit code it will have to add that option itself where needed. + # An extra copy of this option should be harmless though, but leave + # it until we're sure. (Might want -xarch=v9a or -xarch=v9b for the + # higher cpu types instead.) + # + gcc_64_cflags="$gcc_64_cflags -m64 -mptr64" + gcc_64_ldflags="-Wc,-m64" + gcc_64_cflags_optlist="cpu" + + case $host in + *-*-solaris*) + # Sun cc. + # + # We used to have -fast and some fixup options here, but it + # recurrently caused problems with miscompilation. Of course, + # -fast is documented as miscompiling things for the sake of speed. + # + cclist_64="$cclist_64 cc" + cc_64_cflags="-xO3 -xarch=v9" + cc_64_cflags_optlist="cpu" + ;; + esac + + # using the v9 %tick register + SPEED_CYCLECOUNTER_OBJ_32=sparcv9.lo + SPEED_CYCLECOUNTER_OBJ_64=sparcv9.lo + cyclecounter_size_32=2 + cyclecounter_size_64=2 + ;; + esac + ;; + + + # VAX + vax*-*-*) + # Currently gcc (version 3.0) on vax always uses a frame pointer + # (config/vax/vax.h FRAME_POINTER_REQUIRED=1), so -fomit-frame-pointer + # will be ignored. + # + gcc_cflags="$gcc_cflags $fomit_frame_pointer" + path="vax" + extra_functions="udiv_w_sdiv" + ;; + + + # AMD and Intel x86 configurations, including AMD64 + # + # Rumour has it gcc -O2 used to give worse register allocation than just + # -O, but lets assume that's no longer true. + # + # -m32 forces 32-bit mode on a bi-arch 32/64 amd64 build of gcc. -m64 is + # the default in such a build (we think), so -m32 is essential for ABI=32. + # This is, of course, done for any $host_cpu, not just x86_64, so we can + # get such a gcc into the right mode to cross-compile to say i486-*-*. + # + # -m32 is not available in gcc 2.95 and earlier, hence cflags_maybe to use + # it when it works. We check sizeof(long)==4 to ensure we get the right + # mode, in case -m32 has failed not because it's an old gcc, but because + # it's a dual 32/64-bit gcc without a 32-bit libc, or whatever. + # + X86_PATTERN | X86_64_PATTERN) + abilist="32" + cclist="gcc icc cc" + gcc_cflags="$gcc_cflags $fomit_frame_pointer" + gcc_32_cflags_maybe="-m32" + icc_cflags="-no-gcc" + icc_cflags_optlist="opt" + icc_cflags_opt="-O3 -O2 -O1" + any_32_testlist="sizeof-long-4" + CALLING_CONVENTIONS_OBJS='x86call.lo x86check$U.lo' + + # Availability of rdtsc is checked at run-time. + SPEED_CYCLECOUNTER_OBJ=pentium.lo + + # gcc 2.7.2 only knows i386 and i486, using -m386 or -m486. These + # represent -mcpu= since -m486 doesn't generate 486 specific insns. + # gcc 2.95 adds k6, pentium and pentiumpro, and takes -march= and -mcpu=. + # gcc 3.0 adds athlon. + # gcc 3.1 adds k6-2, k6-3, pentium-mmx, pentium2, pentium3, pentium4, + # athlon-tbird, athlon-4, athlon-xp, athlon-mp. + # gcc 3.2 adds winchip2. + # gcc 3.3 adds winchip-c6. + # gcc 3.3.1 from mandrake adds k8 and knows -mtune. + # gcc 3.4 adds c3, c3-2, k8, and deprecates -mcpu in favour of -mtune. + # + # In gcc 2.95.[0123], -march=pentiumpro provoked a stack slot bug in an + # old version of mpz/powm.c. Seems to be fine with the current code, so + # no need for any restrictions on that option. + # + # -march=pentiumpro can fail if the assembler doesn't know "cmov" + # (eg. solaris 2.8 native "as"), so always have -march=pentium after + # that as a fallback. + # + # -march=pentium4 and -march=k8 enable SSE2 instructions, which may or + # may not be supported by the assembler and/or the OS, and is bad in gcc + # prior to 3.3. The tests will reject these if no good, so fallbacks + # like "-march=pentium4 -mno-sse2" are given to try also without SSE2. + # Note the relevant -march types are listed in the optflags handling + # below, be sure to update there if adding new types emitting SSE2. + # + # -mtune is used at the start of each cpu option list to give something + # gcc 3.4 will use, thereby avoiding warnings from -mcpu. -mcpu forms + # are retained for use by prior gcc. For example pentium has + # "-mtune=pentium -mcpu=pentium ...", the -mtune is for 3.4 and the + # -mcpu for prior. If there's a brand new choice in 3.4 for a chip, + # like k8 for x86_64, then it can be the -mtune at the start, no need to + # duplicate anything. + # + gcc_cflags_optlist="cpu arch" + case $host_cpu in + i386*) + gcc_cflags_cpu="-mtune=i386 -mcpu=i386 -m386" + gcc_cflags_arch="-march=i386" + ;; + i486*) + gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" + gcc_cflags_arch="-march=i486" + ;; + i586 | pentium) + gcc_cflags_cpu="-mtune=pentium -mcpu=pentium -m486" + gcc_cflags_arch="-march=pentium" + ;; + pentiummmx) + gcc_cflags_cpu="-mtune=pentium-mmx -mcpu=pentium-mmx -mcpu=pentium -m486" + gcc_cflags_arch="-march=pentium-mmx -march=pentium" + ;; + i686 | pentiumpro) + gcc_cflags_cpu="-mtune=pentiumpro -mcpu=pentiumpro -mcpu=i486 -m486" + gcc_cflags_arch="-march=pentiumpro -march=pentium" + ;; + pentium2) + gcc_cflags_cpu="-mtune=pentium2 -mcpu=pentium2 -mcpu=pentiumpro -mcpu=i486 -m486" + gcc_cflags_arch="-march=pentium2 -march=pentiumpro -march=pentium" + ;; + pentium3 | pentiumm) + gcc_cflags_cpu="-mtune=pentium3 -mcpu=pentium3 -mcpu=pentiumpro -mcpu=i486 -m486" + gcc_cflags_arch="-march=pentium3 -march=pentiumpro -march=pentium" + ;; + k6) + gcc_cflags_cpu="-mtune=k6 -mcpu=k6 -mcpu=i486 -m486" + gcc_cflags_arch="-march=k6" + ;; + k62) + gcc_cflags_cpu="-mtune=k6-2 -mcpu=k6-2 -mcpu=k6 -mcpu=i486 -m486" + gcc_cflags_arch="-march=k6-2 -march=k6" + ;; + k63) + gcc_cflags_cpu="-mtune=k6-3 -mcpu=k6-3 -mcpu=k6 -mcpu=i486 -m486" + gcc_cflags_arch="-march=k6-3 -march=k6" + ;; + geode) + gcc_cflags_cpu="-mtune=k6-3 -mcpu=k6-3 -mcpu=k6 -mcpu=i486 -m486" + gcc_cflags_arch="-march=k6-3 -march=k6" + ;; + athlon) + # Athlon instruction costs are close to P6 (3 cycle load latency, + # 4-6 cycle mul, 40 cycle div, pairable adc, etc) so if gcc doesn't + # know athlon (eg. 2.95.2 doesn't) then fall back on pentiumpro. + gcc_cflags_cpu="-mtune=athlon -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" + gcc_cflags_arch="-march=athlon -march=pentiumpro -march=pentium" + ;; + i786 | pentium4) + # pentiumpro is the primary fallback when gcc doesn't know pentium4. + # This gets us cmov to eliminate branches. Maybe "athlon" would be + # a possibility on gcc 3.0. + # + gcc_cflags_cpu="-mtune=pentium4 -mcpu=pentium4 -mcpu=pentiumpro -mcpu=i486 -m486" + gcc_cflags_arch="-march=pentium4 -march=pentium4~-mno-sse2 -march=pentiumpro -march=pentium" + gcc_64_cflags_cpu="-mtune=nocona" + ;; + viac32) + # Not sure of the best fallbacks here for -mcpu. + # c3-2 has sse and mmx, so pentium3 is good for -march. + gcc_cflags_cpu="-mtune=c3-2 -mcpu=c3-2 -mcpu=i486 -m486" + gcc_cflags_arch="-march=c3-2 -march=pentium3 -march=pentiumpro -march=pentium" + ;; + viac3*) + # Not sure of the best fallbacks here. + gcc_cflags_cpu="-mtune=c3 -mcpu=c3 -mcpu=i486 -m486" + gcc_cflags_arch="-march=c3 -march=pentium-mmx -march=pentium" + ;; + athlon64 | x86_64) + gcc_cflags_cpu="-mtune=k8 -mcpu=athlon -mcpu=pentiumpro -mcpu=i486 -m486" + gcc_cflags_arch="-march=k8 -march=k8~-mno-sse2 -march=athlon -march=pentiumpro -march=pentium" + ;; + core2 | corei) + gcc_cflags_cpu="-mtune=core2 -mtune=k8" + gcc_cflags_arch="-march=core2 -march=core2~-mno-sse2 -march=k8 -march=k8~-mno-sse2" + ;; + atom) + gcc_cflags_cpu="-mtune=atom -mtune=pentium3" + gcc_cflags_arch="-march=atom -march=pentium3" + ;; + *) + gcc_cflags_cpu="-mtune=i486 -mcpu=i486 -m486" + gcc_cflags_arch="-march=i486" + ;; + esac + + case $host_cpu in + i386*) path="x86" ;; + i486*) path="x86/i486 x86" ;; + i586 | pentium) path="x86/pentium x86" ;; + pentiummmx) path="x86/pentium/mmx x86/pentium x86" ;; + i686 | pentiumpro) path="x86/p6 x86" ;; + pentium2) path="x86/p6/mmx x86/p6 x86" ;; + pentium3) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; + pentiumm | core2 | corei) + path="x86/p6/sse2 x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; + [k6[23]]) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; + k6) path="x86/k6/mmx x86/k6 x86" ;; + geode) path="x86/k6/k62mmx x86/k6/mmx x86/k6 x86" ;; + # we don't have any specific 32-bit code for athlon64/opteron, the + # athlon code should be reasonable + athlon | athlon64) path="x86/k7/mmx x86/k7 x86" ;; + i786 | pentium4) path="x86/pentium4/sse2 x86/pentium4/mmx x86/pentium4 x86" ;; + # VIA/Centaur processors, sold as CyrixIII and C3. + viac32) path="x86/p6/p3mmx x86/p6/mmx x86/p6 x86";; + viac3*) path="x86/pentium/mmx x86/pentium x86";; + atom) path="x86/atom x86" ;; + *) path="x86" ;; + esac + + case $host in + X86_64_PATTERN) + cclist_64="gcc" + gcc_64_cflags="$gcc_64_cflags -m64" + gcc_64_cflags_optlist="cpu arch" + CALLING_CONVENTIONS_OBJS_64='amd64call.lo amd64check$U.lo' + SPEED_CYCLECOUNTER_OBJ_64=x86_64.lo + cyclecounter_size_64=2 + abilist="64 32" + path_64="x86_64" + + case $host_cpu in + x86_64) + ;; + athlon64) + path_64="x86_64/k8 $path_64" + ;; + pentium4) + path_64="x86_64/pentium4 $path_64" + ;; + core2) + path_64="x86_64/core2 $path_64" + ;; + corei) + path_64="x86_64/corei x86_64/core2 $path_64" + ;; + atom) + path_64="x86_64/atom $path_64" + ;; + nano) + path_64="x86_64/nano $path_64" + ;; + esac + + case $host in + *-*-solaris*) + # Sun cc. + cclist_64="$cclist_64 cc" + cc_64_cflags="-xO3 -m64" + ;; + *-*-mingw*) + limb_64=longlong + path_64="" # Windows amd64 calling conventions are *different* + # Silence many pedantic warnings for w64. FIXME. + gcc_64_cflags="$gcc_64_cflags -std=gnu99" + ;; + esac + ;; + esac + ;; + + + # FIXME: z8kx won't get through config.sub. Could make 16 versus 32 bit + # limb an ABI option perhaps. + z8kx*-*-*) + path="z8000x" + extra_functions="udiv_w_sdiv" + ;; + z8k*-*-*) + path="z8000" + extra_functions="udiv_w_sdiv" + ;; + + + # Special CPU "none" selects generic C. -DNO_ASM is used to disable gcc + # asm blocks in longlong.h (since they're driven by cpp pre-defined + # symbols like __alpha rather than the configured $host_cpu). + # + none-*-*) + abilist="long longlong" + cclist_long=$cclist + gcc_long_cflags=$gcc_cflags + gcc_long_cppflags="-DNO_ASM" + cc_long_cflags=$cc_cflags + cclist_longlong=$cclist + gcc_longlong_cflags=$gcc_cflags + gcc_longlong_cppflags="-DNO_ASM" + cc_longlong_cflags=$cc_cflags + limb_longlong=longlong + ;; + +esac + +# mingw can be built by the cygwin gcc if -mno-cygwin is added. For +# convenience add this automatically if it works. Actual mingw gcc accepts +# -mno-cygwin too, but of course is the default. mingw only runs on the +# x86s, but allow any CPU here so as to catch "none" too. +# +case $host in + *-*-mingw*) + gcc_cflags_optlist="$gcc_cflags_optlist nocygwin" + gcc_cflags_nocygwin="-mno-cygwin" + ;; +esac + + +CFLAGS_or_unset=${CFLAGS-'(unset)'} +CPPFLAGS_or_unset=${CPPFLAGS-'(unset)'} + +cat >&AC_FD_CC <&AC_FD_CC + cxxflags_ac_prog_cxx=$CXXFLAGS + cxxflags_list=ac_prog_cxx + + # If the user didn't specify $CXXFLAGS, then try $CFLAGS, with -g removed + # if AC_PROG_CXX thinks that doesn't work. $CFLAGS stands a good chance + # of working, eg. on a GNU system where CC=gcc and CXX=g++. + # + if test "$test_CXXFLAGS" != set; then + cxxflags_cflags=$CFLAGS + cxxflags_list="cflags $cxxflags_list" + if test "$ac_prog_cxx_g" = no; then + cxxflags_cflags=`echo "$cxxflags_cflags" | sed -e 's/ -g //' -e 's/^-g //' -e 's/ -g$//'` + fi + fi + + # See if the C++ compiler works. If the user specified CXXFLAGS then all + # we're doing is checking whether AC_PROG_CXX succeeded, since it doesn't + # give a fatal error, just leaves CXX set to a default g++. If on the + # other hand the user didn't specify CXXFLAGS then we get to try here our + # $cxxflags_list alternatives. + # + # Automake includes $CPPFLAGS in a C++ compile, so we do the same here. + # + for cxxflags_choice in $cxxflags_list; do + eval CXXFLAGS=\"\$cxxflags_$cxxflags_choice\" + GMP_PROG_CXX_WORKS($CXX $CPPFLAGS $CXXFLAGS, + [want_cxx=yes + break]) + done + + # If --enable-cxx=yes but a C++ compiler can't be found, then abort. + if test $want_cxx = no && test $enable_cxx = yes; then + AC_MSG_ERROR([C++ compiler not available, see config.log for details]) + fi +fi + +AM_CONDITIONAL(WANT_CXX, test $want_cxx = yes) + +# FIXME: We're not interested in CXXCPP for ourselves, but if we don't do it +# here then AC_PROG_LIBTOOL will AC_REQUIRE it (via _LT_AC_TAGCONFIG) and +# hence execute it unconditionally, and that will fail if there's no C++ +# compiler (and no generic /lib/cpp). +# +if test $want_cxx = yes; then + AC_PROG_CXXCPP +fi + + +# Path setups for Cray, according to IEEE or CFP. These must come after +# deciding the compiler. +# +GMP_CRAY_OPTIONS( + [add_path="cray/ieee"], + [add_path="cray/cfp"; extra_functions="mulwwc90"], + [add_path="cray/cfp"; extra_functions="mulwwj90"]) + + +if test -z "$MPN_PATH"; then + path="$add_path $path" +fi + +# For a nail build, also look in "nails" subdirectories. +# +if test $GMP_NAIL_BITS != 0 && test -z "$MPN_PATH"; then + new_path= + for i in $path; do + case $i in + generic) new_path="$new_path $i" ;; + *) new_path="$new_path $i/nails $i" ;; + esac + done + path=$new_path +fi + + +# Put all directories into CPUVEC_list so as to get a full set of +# CPUVEC_SETUP_$tmp_suffix defines into config.h, even if some of them are +# empty because mmx and/or sse2 had to be dropped. +# +for i in $fat_path; do + GMP_FAT_SUFFIX(tmp_suffix, $i) + CPUVEC_list="$CPUVEC_list CPUVEC_SETUP_$tmp_suffix" +done + + +# If there's any sse2 or mmx in the path, check whether the assembler +# supports it, and remove if not. +# +# We only need this in ABI=32, for ABI=64 on x86_64 we can assume a new +# enough assembler. +# +case $host in + X86_PATTERN | X86_64_PATTERN) + if test "$ABI" = 32; then + case "$path $fat_path" in + *mmx*) GMP_ASM_X86_MMX( , [GMP_STRIP_PATH(*mmx*)]) ;; + esac + case "$path $fat_path" in + *sse2*) GMP_ASM_X86_SSE2( , [GMP_STRIP_PATH(sse2)]) ;; + esac + fi + ;; +esac + + +cat >&AC_FD_CC < +# include +#else +# if HAVE_SYS_TIME_H +# include +# else +# include +# endif +#endif]) + +# On NetBSD and OpenBSD, sys/sysctl.h needs sys/param.h for various constants +AC_CHECK_HEADERS(sys/sysctl.h,,, +[#if HAVE_SYS_PARAM_H +# include +#endif]) + +# On OSF 4.0, must have for ulong_t +AC_CHECK_HEADERS(machine/hal_sysinfo.h,,, +[#if HAVE_SYS_SYSINFO_H +# include +#endif]) + +# Reasons for testing: +# optarg - not declared in mingw +# fgetc, fscanf, ungetc, vfprintf - not declared in SunOS 4 +# sys_errlist, sys_nerr - not declared in SunOS 4 +# +# optarg should be in unistd.h and the rest in stdio.h, both of which are +# in the autoconf default includes. +# +# sys_errlist and sys_nerr are supposed to be in on SunOS according +# to the man page (but aren't), in glibc they're in stdio.h. +# +AC_CHECK_DECLS([fgetc, fscanf, optarg, ungetc, vfprintf]) +AC_CHECK_DECLS([sys_errlist, sys_nerr], , , +[#include +#include ]) + +AC_TYPE_SIGNAL + +# Reasons for testing: +# intmax_t - C99 +# long double - not in the HP bundled K&R cc +# long long - only in reasonably recent compilers +# ptrdiff_t - seems to be everywhere, maybe don't need to check this +# quad_t - BSD specific +# uint_least32_t - C99 +# +# the default includes are sufficient for all these types +# +AC_CHECK_TYPES([intmax_t, long double, long long, ptrdiff_t, quad_t, + uint_least32_t, intptr_t]) + +AC_C_STRINGIZE + +# FIXME: Really want #ifndef __cplusplus around the #define volatile +# replacement autoconf gives, since volatile is always available in C++. +# But we don't use it in C++ currently. +AC_C_VOLATILE + +AC_C_RESTRICT + +GMP_C_STDARG +GMP_C_ATTRIBUTE_CONST +GMP_C_ATTRIBUTE_MALLOC +GMP_C_ATTRIBUTE_MODE +GMP_C_ATTRIBUTE_NORETURN + +GMP_H_EXTERN_INLINE + +# from libtool +AC_CHECK_LIBM +AC_SUBST(LIBM) + +GMP_FUNC_ALLOCA +GMP_OPTION_ALLOCA + +GMP_H_HAVE_FILE + +AC_C_BIGENDIAN( + [AC_DEFINE(HAVE_LIMB_BIG_ENDIAN, 1) + GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_LIMB_BIG_ENDIAN')", POST)], + [AC_DEFINE(HAVE_LIMB_LITTLE_ENDIAN, 1) + GMP_DEFINE_RAW("define_not_for_expansion(\`HAVE_LIMB_LITTLE_ENDIAN')", POST) + ], [:]) +AH_VERBATIM([HAVE_LIMB], +[/* Define one of these to 1 for the endianness of `mp_limb_t'. + If the endianness is not a simple big or little, or you don't know what + it is, then leave both undefined. */ +#undef HAVE_LIMB_BIG_ENDIAN +#undef HAVE_LIMB_LITTLE_ENDIAN]) + +GMP_C_DOUBLE_FORMAT + + +# Reasons for testing: +# alarm - not in mingw +# attr_get - IRIX specific +# clock_gettime - not in glibc 2.2.4, only very recent systems +# cputime - not in glibc +# getsysinfo - OSF specific +# getrusage - not in mingw +# gettimeofday - not in mingw +# mmap - not in mingw, djgpp +# nl_langinfo - X/Open standard only, not in djgpp for instance +# obstack_vprintf - glibc specific +# processor_info - solaris specific +# pstat_getprocessor - HPUX specific (10.x and up) +# raise - an ANSI-ism, though probably almost universal by now +# read_real_time - AIX specific +# sigaction - not in mingw +# sigaltstack - not in mingw, or old AIX (reputedly) +# sigstack - not in mingw +# strerror - not in SunOS +# strnlen - glibc extension (some other systems too) +# syssgi - IRIX specific +# times - not in mingw +# +# clock_gettime is in librt on *-*-osf5.1. We could look for it +# there, but that's not worth bothering with unless it has a decent +# resolution (in a quick test clock_getres said only 1 millisecond). +# +# AC_FUNC_STRNLEN is not used because we don't want the AC_LIBOBJ +# replacement setups it gives. It detects a faulty strnlen on AIX, but +# missing out on that test is ok since our only use of strnlen is in +# __gmp_replacement_vsnprintf which is not required on AIX since it has a +# vsnprintf. +# +AC_CHECK_FUNCS(alarm attr_get clock clock_gettime cputime getpagesize getrusage gettimeofday getsysinfo localeconv memset mmap mprotect nl_langinfo obstack_vprintf popen processor_info pstat_getprocessor raise read_real_time sigaction sigaltstack sigstack syssgi strchr strerror strnlen strtol strtoul sysconf sysctl sysctlbyname times) + +GMP_FUNC_VSNPRINTF +GMP_FUNC_SSCANF_WRITABLE_INPUT + +# Reasons for checking: +# pst_processor psp_iticksperclktick - not in hpux 9 +# +AC_CHECK_MEMBER(struct pst_processor.psp_iticksperclktick, + [AC_DEFINE(HAVE_PSP_ITICKSPERCLKTICK, 1, +[Define to 1 if `struct pst_processor' exists +and contains `psp_iticksperclktick'.])],, + [#include ]) + +# C++ tests, when required +# +if test $enable_cxx = yes; then + AC_LANG_PUSH(C++) + + # Reasons for testing: + # - not in g++ 2.95.2 + # std::locale - not in g++ 2.95.4 + # + AC_CHECK_HEADERS([sstream]) + AC_CHECK_TYPES([std::locale],,,[#include ]) + + AC_LANG_POP(C++) +fi + + +# Pick the correct source files in $path and link them to mpn/. +# $gmp_mpn_functions lists all functions we need. +# +# The rule is to find a file with the function name and a .asm, .S, +# .s, or .c extension. Certain multi-function files with special names +# can provide some functions too. (mpn/Makefile.am passes +# -DOPERATION_ to get them to generate the right code.) + +# Note: $gmp_mpn_functions must have mod_1 before pre_mod_1 so the former +# can optionally provide the latter as an extra entrypoint. Likewise +# divrem_1 and pre_divrem_1. + +gmp_mpn_functions_optional="umul udiv \ + invert_limb sqr_diagonal \ + mul_2 mul_3 mul_4 \ + addmul_2 addmul_3 addmul_4 addmul_5 addmul_6 addmul_7 addmul_8 \ + addlsh1_n sublsh1_n rsblsh1_n rsh1add_n rsh1sub_n \ + addlsh2_n sublsh2_n rsblsh2_n \ + addlsh_n sublsh_n rsblsh_n \ + add_n_sub_n addaddmul_1msb0" + +gmp_mpn_functions="$extra_functions \ + add add_1 add_n sub sub_1 sub_n neg com mul_1 addmul_1 \ + submul_1 lshift rshift dive_1 diveby3 divis divrem divrem_1 divrem_2 \ + fib2_ui mod_1 mod_34lsub1 mode1o pre_divrem_1 pre_mod_1 dump \ + mod_1_1 mod_1_2 mod_1_3 mod_1_4 lshiftc \ + mul mul_fft mul_n sqr mul_basecase sqr_basecase nussbaumer_mul \ + random random2 pow_1 \ + rootrem sqrtrem get_str set_str scan0 scan1 popcount hamdist cmp \ + perfsqr perfpow \ + gcd_1 gcd gcdext_1 gcdext gcd_lehmer gcd_subdiv_step \ + gcdext_lehmer gcdext_subdiv_step \ + div_q tdiv_qr jacbase get_d \ + matrix22_mul hgcd2 hgcd mullo_n mullo_basecase \ + toom22_mul toom32_mul toom42_mul toom52_mul toom62_mul \ + toom33_mul toom43_mul toom53_mul toom63_mul \ + toom44_mul \ + toom6h_mul toom6_sqr toom8h_mul toom8_sqr \ + toom_couple_handling \ + toom2_sqr toom3_sqr toom4_sqr \ + toom_eval_dgr3_pm1 toom_eval_dgr3_pm2 \ + toom_eval_pm1 toom_eval_pm2 toom_eval_pm2exp toom_eval_pm2rexp \ + toom_interpolate_5pts toom_interpolate_6pts toom_interpolate_7pts \ + toom_interpolate_8pts toom_interpolate_12pts toom_interpolate_16pts \ + invertappr invert binvert mulmod_bnm1 sqrmod_bnm1 \ + sbpi1_div_q sbpi1_div_qr sbpi1_divappr_q \ + dcpi1_div_q dcpi1_div_qr dcpi1_divappr_q \ + mu_div_qr mu_divappr_q mu_div_q \ + bdiv_q_1 \ + sbpi1_bdiv_q sbpi1_bdiv_qr \ + dcpi1_bdiv_q dcpi1_bdiv_qr \ + mu_bdiv_q mu_bdiv_qr \ + bdiv_q bdiv_qr \ + divexact bdiv_dbm1c redc_1 redc_2 redc_n powm powlo powm_sec subcnd_n \ + redc_1_sec trialdiv remove \ + and_n andn_n nand_n ior_n iorn_n nior_n xor_n xnor_n \ + copyi copyd zero \ + $gmp_mpn_functions_optional" + +define(GMP_MULFUNC_CHOICES, +[# functions that can be provided by multi-function files +tmp_mulfunc= +case $tmp_fn in + add_n|sub_n) tmp_mulfunc="aors_n" ;; + addmul_1|submul_1) tmp_mulfunc="aorsmul_1" ;; + popcount|hamdist) tmp_mulfunc="popham" ;; + and_n|andn_n|nand_n | ior_n|iorn_n|nior_n | xor_n|xnor_n) + tmp_mulfunc="logops_n" ;; + lshift|rshift) tmp_mulfunc="lorrshift";; + addlsh1_n) + tmp_mulfunc="aorslsh1_n aorrlsh1_n";; + sublsh1_n) + tmp_mulfunc="aorslsh1_n sorrlsh1_n";; + rsblsh1_n) + tmp_mulfunc="aorrlsh1_n sorrlsh1_n";; + addlsh2_n) + tmp_mulfunc="aorslsh2_n aorrlsh2_n";; + sublsh2_n) + tmp_mulfunc="aorslsh2_n sorrlsh2_n";; + rsblsh2_n) + tmp_mulfunc="aorrlsh2_n sorrlsh2_n";; + addlsh_n) + tmp_mulfunc="aorslsh_n aorrlsh_n";; + sublsh_n) + tmp_mulfunc="aorslsh_n sorrlsh_n";; + rsblsh_n) + tmp_mulfunc="aorrlsh_n sorrlsh_n";; + rsh1add_n|rsh1sub_n) + tmp_mulfunc="rsh1aors_n";; +esac +]) + +# the list of all object files used by mpn/Makefile.in and the +# top-level Makefile.in, respectively +mpn_objects= +mpn_objs_in_libgmp= + +# links from the sources, to be removed by "make distclean" +gmp_srclinks= + + +# mpn_relative_top_srcdir is $top_srcdir, but for use from within the mpn +# build directory. If $srcdir is relative then we use a relative path too, +# so the two trees can be moved together. +case $srcdir in + [[\\/]* | ?:[\\/]*]) # absolute, as per autoconf + mpn_relative_top_srcdir=$srcdir ;; + *) # relative + mpn_relative_top_srcdir=../$srcdir ;; +esac + + +define(MPN_SUFFIXES,[asm S s c]) + +dnl Usage: GMP_FILE_TO_FUNCTION_BASE(func,file) +dnl +dnl Set $func to the function base name for $file, eg. dive_1 gives +dnl divexact_1. +dnl +define(GMP_FILE_TO_FUNCTION, +[case $$2 in + dive_1) $1=divexact_1 ;; + diveby3) $1=divexact_by3c ;; + pre_divrem_1) $1=preinv_divrem_1 ;; + mode1o) $1=modexact_1c_odd ;; + pre_mod_1) $1=preinv_mod_1 ;; + *) $1=$$2 ;; +esac +]) + +# Fat binary setups. +# +# We proceed through each $fat_path directory, and look for $fat_function +# routines there. Those found are incorporated in the build by generating a +# little mpn/.asm or mpn/.c file in the build directory, with +# suitable function renaming, and adding that to $mpn_objects (the same as a +# normal mpn file). +# +# fat.h is generated with macros to let internal calls to each $fat_function +# go directly through __gmpn_cpuvec, plus macros and declarations helping to +# setup that structure, on a per-directory basis ready for +# mpn//fat/fat.c. +# +# fat.h includes thresholds listed in $fat_thresholds, extracted from +# gmp-mparam.h in each directory. An overall maximum for each threshold is +# established, for use in making fixed size arrays of temporary space. +# (Eg. MUL_TOOM33_THRESHOLD_LIMIT used by mpn/generic/mul.c.) +# +# It'd be possible to do some of this manually, but when there's more than a +# few functions and a few directories it becomes very tedious, and very +# prone to having some routine accidentally omitted. On that basis it seems +# best to automate as much as possible, even if the code to do so is a bit +# ugly. +# + +if test -n "$fat_path"; then + # Usually the mpn build directory is created with mpn/Makefile + # instantiation, but we want to write to it sooner. + mkdir mpn 2>/dev/null + + echo "/* fat.h - setups for fat binaries." >fat.h + echo " Generated by configure - DO NOT EDIT. */" >>fat.h + + AC_DEFINE(WANT_FAT_BINARY, 1, [Define to 1 when building a fat binary.]) + GMP_DEFINE(WANT_FAT_BINARY, yes) + + # Don't want normal copies of fat functions + for tmp_fn in $fat_functions; do + GMP_REMOVE_FROM_LIST(gmp_mpn_functions, $tmp_fn) + GMP_REMOVE_FROM_LIST(gmp_mpn_functions_optional, $tmp_fn) + done + + for tmp_fn in $fat_functions; do + GMP_FILE_TO_FUNCTION(tmp_fbase,tmp_fn) + echo " +#ifndef OPERATION_$tmp_fn +#undef mpn_$tmp_fbase +#define mpn_$tmp_fbase (*__gmpn_cpuvec.$tmp_fbase) +#endif +DECL_$tmp_fbase (__MPN(${tmp_fbase}_init));" >>fat.h + # encourage various macros to use fat functions + AC_DEFINE_UNQUOTED(HAVE_NATIVE_$tmp_fbase) + done + + echo "" >>fat.h + echo "/* variable thresholds */" >>fat.h + for tmp_tn in $fat_thresholds; do + echo "#undef $tmp_tn" >>fat.h + echo "#define $tmp_tn CPUVEC_THRESHOLD (`echo $tmp_tn | tr A-Z a-z`)" >>fat.h + done + + echo " +/* Copy all fields into __gmpn_cpuvec. + memcpy is not used because it might operate byte-wise (depending on its + implementation), and we need the function pointer writes to be atomic. + "volatile" discourages the compiler from trying to optimize this. */ +#define CPUVEC_INSTALL(vec) \\ + do { \\ + volatile struct cpuvec_t *p = &__gmpn_cpuvec; \\" >>fat.h + for tmp_fn in $fat_functions; do + GMP_FILE_TO_FUNCTION(tmp_fbase,tmp_fn) + echo " p->$tmp_fbase = vec.$tmp_fbase; \\" >>fat.h + done + for tmp_tn in $fat_thresholds; do + tmp_field_name=`echo $tmp_tn | tr A-Z a-z` + echo " p->$tmp_field_name = vec.$tmp_field_name; \\" >>fat.h + done + echo " } while (0)" >>fat.h + + echo " +/* A helper to check all fields are filled. */ +#define ASSERT_CPUVEC(vec) \\ + do { \\" >>fat.h + for tmp_fn in $fat_functions; do + GMP_FILE_TO_FUNCTION(tmp_fbase,tmp_fn) + echo " ASSERT (vec.$tmp_fbase != NULL); \\" >>fat.h + done + for tmp_tn in $fat_thresholds; do + tmp_field_name=`echo $tmp_tn | tr A-Z a-z` + echo " ASSERT (vec.$tmp_field_name != 0); \\" >>fat.h + done + echo " } while (0)" >>fat.h + + echo " +/* Call ITERATE(field) for each fat threshold field. */ +#define ITERATE_FAT_THRESHOLDS() \\ + do { \\" >>fat.h + for tmp_tn in $fat_thresholds; do + tmp_field_name=`echo $tmp_tn | tr A-Z a-z` + echo " ITERATE ($tmp_tn, $tmp_field_name); \\" >>fat.h + done + echo " } while (0)" >>fat.h + + for tmp_dir in $fat_path; do + CPUVEC_SETUP= + THRESH_ASM_SETUP= + echo "" >>fat.h + GMP_FAT_SUFFIX(tmp_suffix, $tmp_dir) + + # In order to keep names unique on a DOS 8.3 filesystem, use a prefix + # (rather than a suffix) for the generated file names, and abbreviate. + case $tmp_suffix in + pentium) tmp_prefix=p ;; + pentium_mmx) tmp_prefix=pm ;; + p6_mmx) tmp_prefix=p2 ;; + p6_p3mmx) tmp_prefix=p3 ;; + pentium4) tmp_prefix=p4 ;; + pentium4_mmx) tmp_prefix=p4m ;; + pentium4_sse2) tmp_prefix=p4s ;; + k6_mmx) tmp_prefix=k6m ;; + k6_k62mmx) tmp_prefix=k62 ;; + k7_mmx) tmp_prefix=k7m ;; + *) tmp_prefix=$tmp_suffix ;; + esac + + # Extract desired thresholds from gmp-mparam.h file in this directory, + # if present. + tmp_mparam=$srcdir/mpn/$tmp_dir/gmp-mparam.h + if test -f $tmp_mparam; then + for tmp_tn in $fat_thresholds; do + tmp_thresh=`sed -n "s/^#define $tmp_tn[ ]*\\([0-9][0-9]*\\).*$/\\1/p" $tmp_mparam` + if test -n "$tmp_thresh"; then + THRESH_ASM_SETUP=["${THRESH_ASM_SETUP}define($tmp_tn,$tmp_thresh) +"] + CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.`echo $tmp_tn | tr A-Z a-z` = $tmp_thresh; \\ +" + eval tmp_limit=\$${tmp_tn}_LIMIT + if test -z "$tmp_limit"; then + tmp_limit=0 + fi + if test $tmp_thresh -gt $tmp_limit; then + eval ${tmp_tn}_LIMIT=$tmp_thresh + fi + fi + done + fi + + for tmp_fn in $fat_functions; do + GMP_MULFUNC_CHOICES + + for tmp_base in $tmp_fn $tmp_mulfunc; do + for tmp_ext in MPN_SUFFIXES; do + tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext + if test -f $tmp_file; then + + mpn_objects="$mpn_objects ${tmp_prefix}_$tmp_fn.lo" + mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/${tmp_prefix}_$tmp_fn.lo" + + GMP_FILE_TO_FUNCTION(tmp_fbase,tmp_fn) + + # carry-in variant, eg. divrem_1c or modexact_1c_odd + case $tmp_fbase in + *_1*) tmp_fbasec=`echo $tmp_fbase | sed 's/_1/_1c/'` ;; + *) tmp_fbasec=${tmp_fbase}c ;; + esac + + # Create a little file doing an include from srcdir. The + # OPERATION and renamings aren't all needed all the time, but + # they don't hurt if unused. + # + # FIXME: Should generate these via config.status commands. + # Would need them all in one AC_CONFIG_COMMANDS though, since + # that macro doesn't accept a set of separate commands generated + # by shell code. + # + case $tmp_ext in + asm) + # hide the d-n-l from autoconf's error checking + tmp_d_n_l=d""nl + echo ["$tmp_d_n_l mpn_$tmp_fbase - from $tmp_dir directory for fat binary. +$tmp_d_n_l Generated by configure - DO NOT EDIT. + +define(OPERATION_$tmp_fn) +define(__gmpn_$tmp_fbase, __gmpn_${tmp_fbase}_$tmp_suffix) +define(__gmpn_$tmp_fbasec,__gmpn_${tmp_fbasec}_${tmp_suffix}) +define(__gmpn_preinv_${tmp_fbase},__gmpn_preinv_${tmp_fbase}_${tmp_suffix}) + +$tmp_d_n_l For k6 and k7 gcd_1 calling their corresponding mpn_modexact_1_odd +ifdef(\`__gmpn_modexact_1_odd',, +\`define(__gmpn_modexact_1_odd,__gmpn_modexact_1_odd_${tmp_suffix})') + +$THRESH_ASM_SETUP +include][($mpn_relative_top_srcdir/mpn/$tmp_dir/$tmp_base.asm) +"] >mpn/${tmp_prefix}_$tmp_fn.asm + ;; + c) + echo ["/* mpn_$tmp_fbase - from $tmp_dir directory for fat binary. + Generated by configure - DO NOT EDIT. */ + +#define OPERATION_$tmp_fn 1 +#define __gmpn_$tmp_fbase __gmpn_${tmp_fbase}_$tmp_suffix +#define __gmpn_$tmp_fbasec __gmpn_${tmp_fbasec}_${tmp_suffix} +#define __gmpn_preinv_${tmp_fbase} __gmpn_preinv_${tmp_fbase}_${tmp_suffix} + +#include \"$mpn_relative_top_srcdir/mpn/$tmp_dir/$tmp_base.c\" +"] >mpn/${tmp_prefix}_$tmp_fn.c + ;; + esac + + # Prototype, and append to CPUVEC_SETUP for this directory. + echo "DECL_$tmp_fbase (__gmpn_${tmp_fbase}_$tmp_suffix);" >>fat.h + CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.$tmp_fbase = __gmpn_${tmp_fbase}_${tmp_suffix}; \\ +" + # Ditto for any preinv variant (preinv_divrem_1, preinv_mod_1). + if grep "^PROLOGUE(mpn_preinv_$tmp_fn)" $tmp_file >/dev/null; then + echo "DECL_preinv_$tmp_fbase (__gmpn_preinv_${tmp_fbase}_$tmp_suffix);" >>fat.h + CPUVEC_SETUP="$CPUVEC_SETUP decided_cpuvec.preinv_$tmp_fbase = __gmpn_preinv_${tmp_fbase}_${tmp_suffix}; \\ +" + fi + fi + done + done + done + + # Emit CPUVEC_SETUP for this directory + echo "" >>fat.h + echo "#define CPUVEC_SETUP_$tmp_suffix \\" >>fat.h + echo " do { \\" >>fat.h + echo "$CPUVEC_SETUP } while (0)" >>fat.h + done + + # Emit threshold limits + echo "" >>fat.h + for tmp_tn in $fat_thresholds; do + eval tmp_limit=\$${tmp_tn}_LIMIT + echo "#define ${tmp_tn}_LIMIT $tmp_limit" >>fat.h + done +fi + + +# Normal binary setups. +# + +for tmp_ext in MPN_SUFFIXES; do + eval found_$tmp_ext=no +done + +for tmp_fn in $gmp_mpn_functions; do + for tmp_ext in MPN_SUFFIXES; do + test "$no_create" = yes || rm -f mpn/$tmp_fn.$tmp_ext + done + + # mpn_preinv_divrem_1 might have been provided by divrem_1.asm, likewise + # mpn_preinv_mod_1 by mod_1.asm. + case $tmp_fn in + pre_divrem_1) + if test "$HAVE_NATIVE_mpn_preinv_divrem_1" = yes; then continue; fi ;; + pre_mod_1) + if test "$HAVE_NATIVE_mpn_preinv_mod_1" = yes; then continue; fi ;; + esac + + GMP_MULFUNC_CHOICES + + found=no + for tmp_dir in $path; do + for tmp_base in $tmp_fn $tmp_mulfunc; do + for tmp_ext in MPN_SUFFIXES; do + tmp_file=$srcdir/mpn/$tmp_dir/$tmp_base.$tmp_ext + if test -f $tmp_file; then + + # For a nails build, check if the file supports our nail bits. + # Generic code always supports all nails. + # + # FIXME: When a multi-function file is selected to provide one of + # the nails-neutral routines, like logops_n for and_n, the + # PROLOGUE grepping will create HAVE_NATIVE_mpn_ defines for + # all functions in that file, even if they haven't all been + # nailified. Not sure what to do about this, it's only really a + # problem for logops_n, and it's not too terrible to insist those + # get nailified always. + # + if test $GMP_NAIL_BITS != 0 && test $tmp_dir != generic; then + case $tmp_fn in + and_n | ior_n | xor_n | andn_n | \ + copyi | copyd | \ + popcount | hamdist | \ + udiv | udiv_w_sdiv | umul | \ + cntlz | invert_limb) + # these operations are either unaffected by nails or defined + # to operate on full limbs + ;; + *) + nails=[`sed -n 's/^[ ]*NAILS_SUPPORT(\(.*\))/\1/p' $tmp_file `] + for n in $nails; do + case $n in + *-*) + n_start=`echo "$n" | sed -n 's/\(.*\)-.*/\1/p'` + n_end=`echo "$n" | sed -n 's/.*-\(.*\)/\1/p'` + ;; + *) + n_start=$n + n_end=$n + ;; + esac + if test $GMP_NAIL_BITS -ge $n_start && test $GMP_NAIL_BITS -le $n_end; then + found=yes + break + fi + done + if test $found != yes; then + continue + fi + ;; + esac + fi + + found=yes + eval found_$tmp_ext=yes + + if test $tmp_ext = c; then + tmp_u='$U' + else + tmp_u= + fi + + mpn_objects="$mpn_objects $tmp_fn$tmp_u.lo" + mpn_objs_in_libgmp="$mpn_objs_in_libgmp mpn/$tmp_fn$tmp_u.lo" + AC_CONFIG_LINKS(mpn/$tmp_fn.$tmp_ext:mpn/$tmp_dir/$tmp_base.$tmp_ext) + gmp_srclinks="$gmp_srclinks mpn/$tmp_fn.$tmp_ext" + + # Duplicate AC_DEFINEs are harmless, so it doesn't matter + # that multi-function files get grepped here repeatedly. + # The PROLOGUE pattern excludes the optional second parameter. + gmp_ep=[` + sed -n 's/^[ ]*MULFUNC_PROLOGUE(\(.*\))/\1/p' $tmp_file ; + sed -n 's/^[ ]*PROLOGUE(\([^,]*\).*)/\1/p' $tmp_file + `] + for gmp_tmp in $gmp_ep; do + AC_DEFINE_UNQUOTED(HAVE_NATIVE_$gmp_tmp) + eval HAVE_NATIVE_$gmp_tmp=yes + done + + case $tmp_fn in + sqr_basecase) sqr_basecase_source=$tmp_file ;; + esac + + break + fi + done + if test $found = yes; then break ; fi + done + if test $found = yes; then break ; fi + done + + if test $found = no; then + for tmp_optional in $gmp_mpn_functions_optional; do + if test $tmp_optional = $tmp_fn; then + found=yes + fi + done + if test $found = no; then + AC_MSG_ERROR([no version of $tmp_fn found in path: $path]) + fi + fi +done + +# All cycle counters are .asm files currently +if test -n "$SPEED_CYCLECOUNTER_OBJ"; then + found_asm=yes +fi + +dnl The following list only needs to have templates for those defines which +dnl are going to be tested by the code, there's no need to have every +dnl possible mpn routine. + +AH_VERBATIM([HAVE_NATIVE], +[/* Define to 1 each of the following for which a native (ie. CPU specific) + implementation of the corresponding routine exists. */ +#undef HAVE_NATIVE_mpn_add_n +#undef HAVE_NATIVE_mpn_add_n_sub_n +#undef HAVE_NATIVE_mpn_add_nc +#undef HAVE_NATIVE_mpn_addaddmul_1msb0 +#undef HAVE_NATIVE_mpn_addlsh1_n +#undef HAVE_NATIVE_mpn_addlsh2_n +#undef HAVE_NATIVE_mpn_addlsh_n +#undef HAVE_NATIVE_mpn_addmul_1c +#undef HAVE_NATIVE_mpn_addmul_2 +#undef HAVE_NATIVE_mpn_addmul_3 +#undef HAVE_NATIVE_mpn_addmul_4 +#undef HAVE_NATIVE_mpn_addmul_5 +#undef HAVE_NATIVE_mpn_addmul_6 +#undef HAVE_NATIVE_mpn_addmul_7 +#undef HAVE_NATIVE_mpn_addmul_8 +#undef HAVE_NATIVE_mpn_and_n +#undef HAVE_NATIVE_mpn_andn_n +#undef HAVE_NATIVE_mpn_bdiv_dbm1c +#undef HAVE_NATIVE_mpn_bdiv_q_1 +#undef HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#undef HAVE_NATIVE_mpn_com +#undef HAVE_NATIVE_mpn_copyd +#undef HAVE_NATIVE_mpn_copyi +#undef HAVE_NATIVE_mpn_divexact_1 +#undef HAVE_NATIVE_mpn_divexact_by3c +#undef HAVE_NATIVE_mpn_divrem_1 +#undef HAVE_NATIVE_mpn_divrem_1c +#undef HAVE_NATIVE_mpn_divrem_2 +#undef HAVE_NATIVE_mpn_gcd_1 +#undef HAVE_NATIVE_mpn_hamdist +#undef HAVE_NATIVE_mpn_invert_limb +#undef HAVE_NATIVE_mpn_ior_n +#undef HAVE_NATIVE_mpn_iorn_n +#undef HAVE_NATIVE_mpn_lshift +#undef HAVE_NATIVE_mpn_lshiftc +#undef HAVE_NATIVE_mpn_lshsub_n +#undef HAVE_NATIVE_mpn_mod_1 +#undef HAVE_NATIVE_mpn_mod_1_1p +#undef HAVE_NATIVE_mpn_mod_1c +#undef HAVE_NATIVE_mpn_mod_1s_2p +#undef HAVE_NATIVE_mpn_mod_1s_4p +#undef HAVE_NATIVE_mpn_mod_34lsub1 +#undef HAVE_NATIVE_mpn_modexact_1_odd +#undef HAVE_NATIVE_mpn_modexact_1c_odd +#undef HAVE_NATIVE_mpn_mul_1 +#undef HAVE_NATIVE_mpn_mul_1c +#undef HAVE_NATIVE_mpn_mul_2 +#undef HAVE_NATIVE_mpn_mul_3 +#undef HAVE_NATIVE_mpn_mul_4 +#undef HAVE_NATIVE_mpn_mul_basecase +#undef HAVE_NATIVE_mpn_nand_n +#undef HAVE_NATIVE_mpn_nior_n +#undef HAVE_NATIVE_mpn_popcount +#undef HAVE_NATIVE_mpn_preinv_divrem_1 +#undef HAVE_NATIVE_mpn_preinv_mod_1 +#undef HAVE_NATIVE_mpn_redc_1 +#undef HAVE_NATIVE_mpn_redc_2 +#undef HAVE_NATIVE_mpn_rsblsh1_n +#undef HAVE_NATIVE_mpn_rsblsh2_n +#undef HAVE_NATIVE_mpn_rsblsh_n +#undef HAVE_NATIVE_mpn_rsh1add_n +#undef HAVE_NATIVE_mpn_rsh1add_nc +#undef HAVE_NATIVE_mpn_rsh1sub_n +#undef HAVE_NATIVE_mpn_rsh1sub_nc +#undef HAVE_NATIVE_mpn_rshift +#undef HAVE_NATIVE_mpn_sqr_basecase +#undef HAVE_NATIVE_mpn_sqr_diagonal +#undef HAVE_NATIVE_mpn_sub_n +#undef HAVE_NATIVE_mpn_sub_nc +#undef HAVE_NATIVE_mpn_sublsh1_n +#undef HAVE_NATIVE_mpn_sublsh2_n +#undef HAVE_NATIVE_mpn_sublsh_n +#undef HAVE_NATIVE_mpn_submul_1c +#undef HAVE_NATIVE_mpn_udiv_qrnnd +#undef HAVE_NATIVE_mpn_udiv_qrnnd_r +#undef HAVE_NATIVE_mpn_umul_ppmm +#undef HAVE_NATIVE_mpn_umul_ppmm_r +#undef HAVE_NATIVE_mpn_xor_n +#undef HAVE_NATIVE_mpn_xnor_n]) + + +# Don't demand an m4 unless it's actually needed. +if test $found_asm = yes; then + GMP_PROG_M4 + GMP_M4_M4WRAP_SPURIOUS +else + # In case the user has set M4 in the environment, don't touch it. + if test -z "$M4" ; then + M4=m4-not-needed + fi +fi + +# Only do the GMP_ASM checks if there's a .S or .asm wanting them. +if test $found_asm = no && test $found_S = no; then + gmp_asm_syntax_testing=no +fi + +if test "$gmp_asm_syntax_testing" != no; then + GMP_ASM_TEXT + GMP_ASM_DATA + GMP_ASM_LABEL_SUFFIX + GMP_ASM_GLOBL + GMP_ASM_GLOBL_ATTR + GMP_ASM_UNDERSCORE + GMP_ASM_RODATA + GMP_ASM_TYPE + GMP_ASM_SIZE + GMP_ASM_LSYM_PREFIX + GMP_ASM_W32 + GMP_ASM_ALIGN_LOG + + case $host in + hppa*-*-*) + # for both pa32 and pa64 + GMP_INCLUDE_MPN(pa32/pa-defs.m4) + ;; + IA64_PATTERN) + GMP_ASM_IA64_ALIGN_OK + ;; + M68K_PATTERN) + GMP_ASM_M68K_INSTRUCTION + GMP_ASM_M68K_ADDRESSING + GMP_ASM_M68K_BRANCHES + ;; + [powerpc*-*-* | power[3-9]-*-*]) + GMP_ASM_POWERPC_PIC_ALWAYS + GMP_ASM_POWERPC_R_REGISTERS + GMP_INCLUDE_MPN(powerpc32/powerpc-defs.m4) + case $host in + *-*-aix*) + case $ABI in + 64 | aix64) GMP_INCLUDE_MPN(powerpc64/aix.m4) ;; + *) GMP_INCLUDE_MPN(powerpc32/aix.m4) ;; + esac + ;; + *-*-linux* | *-*-*bsd*) + case $ABI in + mode64) GMP_INCLUDE_MPN(powerpc64/elf.m4) ;; + mode32 | 32) GMP_INCLUDE_MPN(powerpc32/elf.m4) ;; + esac + ;; + *-*-darwin*) + case $ABI in + mode64) GMP_INCLUDE_MPN(powerpc64/darwin.m4) ;; + mode32 | 32) GMP_INCLUDE_MPN(powerpc32/darwin.m4) ;; + esac + ;; + *) + # Assume unrecognized operating system is the powerpc eABI + GMP_INCLUDE_MPN(powerpc32/eabi.m4) + ;; + esac + ;; + power*-*-aix*) + GMP_INCLUDE_MPN(powerpc32/aix.m4) + ;; + sparcv9*-*-* | ultrasparc*-*-* | sparc64-*-*) + case $ABI in + 64) + GMP_ASM_SPARC_REGISTER + ;; + esac + ;; + X86_PATTERN | X86_64_PATTERN) + GMP_ASM_ALIGN_FILL_0x90 + case $ABI in + 32) + GMP_INCLUDE_MPN(x86/x86-defs.m4) + AC_DEFINE(HAVE_HOST_CPU_FAMILY_x86) + GMP_ASM_COFF_TYPE + GMP_ASM_X86_GOT_UNDERSCORE + GMP_ASM_X86_SHLDL_CL + case $enable_profiling in + prof | gprof) GMP_ASM_X86_MCOUNT ;; + esac + case $host in + *-*-darwin*) + GMP_INCLUDE_MPN(x86/darwin.m4) ;; + esac + ;; + 64) + GMP_INCLUDE_MPN(x86_64/x86_64-defs.m4) + AC_DEFINE(HAVE_HOST_CPU_FAMILY_x86_64) + case $host in + *-*-darwin*) + GMP_INCLUDE_MPN(x86_64/darwin.m4) ;; + esac + ;; + esac + ;; + esac +fi + +# For --enable-minithres, prepend "minithres" to path so that its special +# gmp-mparam.h will be used. +if test $enable_minithres = yes; then + path="minithres $path" +fi + +# Create link for gmp-mparam.h. +gmp_mparam_source= +for gmp_mparam_dir in $path; do + test "$no_create" = yes || rm -f gmp-mparam.h + tmp_file=$srcdir/mpn/$gmp_mparam_dir/gmp-mparam.h + if test -f $tmp_file; then + AC_CONFIG_LINKS(gmp-mparam.h:mpn/$gmp_mparam_dir/gmp-mparam.h) + gmp_srclinks="$gmp_srclinks gmp-mparam.h" + gmp_mparam_source=$tmp_file + break + fi +done +if test -z "$gmp_mparam_source"; then + AC_MSG_ERROR([no version of gmp-mparam.h found in path: $path]) +fi + +# For a helpful message from tune/tuneup.c +gmp_mparam_suggest=$gmp_mparam_source +if test "$gmp_mparam_dir" = generic; then + for i in $path; do break; done + if test "$i" != generic; then + gmp_mparam_suggest="new file $srcdir/mpn/$i/gmp-mparam.h" + fi +fi +AC_DEFINE_UNQUOTED(GMP_MPARAM_H_SUGGEST, "$gmp_mparam_source", +[The gmp-mparam.h file (a string) the tune program should suggest updating.]) + + +# Copy any SQR_TOOM2_THRESHOLD from gmp-mparam.h to config.m4. +# Some versions of sqr_basecase.asm use this. +# Fat binaries do this on a per-file basis, so skip in that case. +# +if test -z "$fat_path"; then + tmp_gmp_karatsuba_sqr_threshold=`sed -n 's/^#define SQR_TOOM2_THRESHOLD[ ]*\([0-9][0-9]*\).*$/\1/p' $gmp_mparam_source` + if test -n "$tmp_gmp_karatsuba_sqr_threshold"; then + GMP_DEFINE_RAW(["define(,<$tmp_gmp_karatsuba_sqr_threshold>)"]) + fi +fi + + +# Sizes of some types, needed at preprocessing time. +# +# FIXME: The assumption that GMP_LIMB_BITS is 8*sizeof(mp_limb_t) might +# be slightly rash, but it's true everywhere we know of and ought to be true +# of any sensible system. In a generic C build, grepping LONG_BIT out of +# might be an alternative, for maximum portability. +# +AC_CHECK_SIZEOF(void *) +AC_CHECK_SIZEOF(unsigned short) +AC_CHECK_SIZEOF(unsigned) +AC_CHECK_SIZEOF(unsigned long) +AC_CHECK_SIZEOF(mp_limb_t, , GMP_INCLUDE_GMP_H) +if test "$ac_cv_sizeof_mp_limb_t" = 0; then + AC_MSG_ERROR([Oops, mp_limb_t doesn't seem to work]) +fi +AC_SUBST(GMP_LIMB_BITS, `expr 8 \* $ac_cv_sizeof_mp_limb_t`) +GMP_DEFINE_RAW(["define(,<$ac_cv_sizeof_unsigned>)"]) + +# Check compiler limb size matches gmp-mparam.h +# +# FIXME: Some of the cycle counter objects in the tune directory depend on +# the size of ulong, it'd be possible to check that here, though a mismatch +# probably wouldn't want to be fatal, none of the libgmp assembler code +# depends on ulong. +# +mparam_bits=[`sed -n 's/^#define GMP_LIMB_BITS[ ][ ]*\([0-9]*\).*$/\1/p' $gmp_mparam_source`] +if test -n "$mparam_bits" && test "$mparam_bits" -ne $GMP_LIMB_BITS; then + if test "$test_CFLAGS" = set; then + AC_MSG_ERROR([Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code +in this configuration expects $mparam_bits bits. +You appear to have set \$CFLAGS, perhaps you also need to tell GMP the +intended ABI, see "ABI and ISA" in the manual.]) + else + AC_MSG_ERROR([Oops, mp_limb_t is $GMP_LIMB_BITS bits, but the assembler code +in this configuration expects $mparam_bits bits.]) + fi +fi + +GMP_DEFINE_RAW(["define(,$GMP_LIMB_BITS)"]) +GMP_DEFINE_RAW(["define(,$GMP_NAIL_BITS)"]) +GMP_DEFINE_RAW(["define(,eval(GMP_LIMB_BITS-GMP_NAIL_BITS))"]) + + +# Exclude the mpn random functions from mpbsd since that would drag in the +# top-level rand things, all of which are unnecessary for libmp. There's +# other unnecessary objects too actually, if we could be bothered figuring +# out exactly which they are. +# +mpn_objs_in_libmp= +for i in $mpn_objs_in_libgmp; do + case $i in + *random*) ;; + *) mpn_objs_in_libmp="$mpn_objs_in_libmp $i" ;; + esac +done +AC_SUBST(mpn_objs_in_libmp) + +AC_SUBST(mpn_objects) +AC_SUBST(mpn_objs_in_libgmp) +AC_SUBST(gmp_srclinks) + + +# A recompiled sqr_basecase for use in the tune program, if necessary. +TUNE_SQR_OBJ= +test -d tune || mkdir tune +case $sqr_basecase_source in + *.asm) + sqr_max=[`sed -n 's/^def...(SQR_TOOM2_THRESHOLD_MAX, *\([0-9]*\))/\1/p' $sqr_basecase_source`] + if test -n "$sqr_max"; then + TUNE_SQR_OBJ=sqr_asm.o + AC_DEFINE_UNQUOTED(TUNE_SQR_TOOM2_MAX,$sqr_max, + [Maximum size the tune program can test for SQR_TOOM2_THRESHOLD]) + fi + cat >tune/sqr_basecase.c <tune/sqr_basecase.c <]) +AC_SUBST(HAVE_STACK_T_01) + +# Configs for demos/calc directory +# +# AC_SUBST+AC_CONFIG_FILES is used for calc-config.h, rather than AC_DEFINE+ +# AC_CONFIG_HEADERS, since with the latter automake (1.8) will then put the +# directory (ie. demos/calc) into $(DEFAULT_INCLUDES) for every Makefile.in, +# which would look very strange. +# +# -lcurses is required by libreadline. On a typical SVR4 style system this +# normally doesn't have to be given explicitly, since libreadline.so will +# have a NEEDED record for it. But if someone for some reason is using only +# a static libreadline.a then we must give -lcurses. Readline (as of +# version 4.3) doesn't use libtool, so we can't rely on a .la to cover +# necessary dependencies. +# +# On a couple of systems we've seen libreadline available, but the headers +# not in the default include path, so check for readline/readline.h. We've +# also seen readline/history.h missing, not sure if that's just a broken +# install or a very old version, but check that too. +# +AC_CONFIG_FILES(demos/calc/calc-config.h:demos/calc/calc-config-h.in) +LIBCURSES= +if test $with_readline != no; then + AC_CHECK_LIB(ncurses, tputs, [LIBCURSES=-lncurses], + [AC_CHECK_LIB(curses, tputs, [LIBCURSES=-lcurses])]) +fi +AC_SUBST(LIBCURSES) +use_readline=$with_readline +if test $with_readline = detect; then + use_readline=no + AC_CHECK_LIB(readline, readline, + [AC_CHECK_HEADER(readline/readline.h, + [AC_CHECK_HEADER(readline/history.h, use_readline=yes)])], + , $LIBCURSES) + AC_MSG_CHECKING(readline detected) + AC_MSG_RESULT($use_readline) +fi +if test $use_readline = yes; then + AC_SUBST(WITH_READLINE_01, 1) + AC_SUBST(LIBREADLINE, -lreadline) +else + WITH_READLINE_01=0 +fi +AC_PROG_YACC +AM_PROG_LEX + +# Configs for demos/expr directory +# +# Libtool already runs an AC_CHECK_TOOL for ranlib, but we give +# AC_PROG_RANLIB anyway since automake is supposed to complain if it's not +# called. (Automake 1.8.4 doesn't, at least not when the only library is in +# an EXTRA_LIBRARIES.) +# +AC_PROG_RANLIB + + +# Create config.m4. +GMP_FINISH + +# Create Makefiles +# FIXME: Upcoming version of autoconf/automake may not like broken lines. +# Right now automake isn't accepting the new AC_CONFIG_FILES scheme. + +AC_OUTPUT(Makefile \ + mpbsd/Makefile mpf/Makefile mpn/Makefile mpq/Makefile \ + mpz/Makefile printf/Makefile scanf/Makefile cxx/Makefile \ + tests/Makefile tests/devel/Makefile tests/mpbsd/Makefile \ + tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile \ + tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile \ + tests/cxx/Makefile \ + doc/Makefile tune/Makefile \ + demos/Makefile demos/calc/Makefile demos/expr/Makefile \ + gmp.h:gmp-h.in mp.h:mp-h.in) diff -Nru gmp-4.3.2+dfsg/cxx/Makefile.in gmp-5.0.2+dfsg/cxx/Makefile.in --- gmp-4.3.2+dfsg/cxx/Makefile.in 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/cxx/Makefile.in 2011-08-30 01:19:39.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -96,7 +96,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -120,10 +119,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -163,6 +161,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -196,10 +195,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -229,7 +228,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/debian/changelog gmp-5.0.2+dfsg/debian/changelog --- gmp-4.3.2+dfsg/debian/changelog 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/changelog 2012-01-07 14:02:16.000000000 +0000 @@ -1,10 +1,123 @@ -gmp (2:4.3.2+dfsg-1ubuntu1) lucid; urgency=low +gmp (2:5.0.2+dfsg-0ubuntu1) lucid; urgency=low - * Support for thumb2 instructions in arm assembler (LP: #51372) - - patches/arm-thumb2-support.patch: add patch for thumb2 asm - * add ${misc:Depends} to all Depends: to make lintian happy + * gmp-5.0.2 PPA upload for lucid, based on the the natty packaging. + - Don't build the libgmp3-dev compat package. - -- David Sugar Thu, 25 Feb 2010 07:07:18 -0500 + -- Matthias Klose Sat, 07 Jan 2012 14:20:16 +0100 + +gmp (2:5.0.1+dfsg-7ubuntu2) natty; urgency=low + + * Merge with Debian; remaining changes: + - Build with -mno-vsx on ppc64. + - Support for thumb2 instructions in arm assembler. + + -- Matthias Klose Thu, 21 Apr 2011 07:48:06 +0200 + +gmp (2:5.0.1+dfsg-7) unstable; urgency=low + + [ Peter Pearse ] + * For cross builds, strip GNU_TYPES & pass --target. Closes: #605038. + + [ Steve Langasek ] + * We don't need to use $(strip), just avoid having whitespace in the first + place. + * For that matter, this s/i386/i486/ substitution is entirely unnecessary + to begin with; the DEB_HOST_GNU_TYPE is already i486 on Debian, and i686 + on Ubuntu. So as long as we're modifying this line, let's simplify it + some more. + + [ Steve Robbins ] + * control: Make libgmp-dev, and lib{32,64}-dev real packages, providing + virtual packages libgmp10-dev, etc. Add real package libgmp3-dev, a + dummy package to pull in libgmp-dev. Required to ease transition of + mlton because it build-depends on itself and on versioned libgmp3-dev. + See http://lists.debian.org/debian-release/2011/03/msg00374.html. + + -- Steve M. Robbins Tue, 22 Mar 2011 22:00:03 -0500 + +gmp (2:5.0.1+dfsg-6) unstable; urgency=low + + * control: libgmp10-dev provides the old libgmp3-dev package. This is a + temporary measure to ease the transition for ghc, which build-depends + on itself as well as libgmp3-dev; c.f. + http://lists.debian.org/debian-haskell/2011/03/msg00013.html + + -- Steve M. Robbins Sun, 06 Mar 2011 09:38:56 -0600 + +gmp (2:5.0.1+dfsg-5) unstable; urgency=low + + * Merge the v5 branch back to trunk. + + * Package libgmp10-dev also provides libgmp-dev so you can build-depend + on an unversioned GMP -dev package. + + * Remove archaic MP compatibility library (libmp3 and 32/64-bit + variants). + + * control: Set Standards-Version to 3.9.1. + - rules: don't build with -D_REENTRANT + + -- Steve M. Robbins Sat, 05 Mar 2011 10:25:02 -0600 + +gmp (2:5.0.1+dfsg-4) experimental; urgency=low + + * rules: Build with -O2 on ia64, to work around ICE + (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43603). + + -- Steve M. Robbins Mon, 14 Feb 2011 21:39:01 -0600 + +gmp (2:5.0.1+dfsg-3) experimental; urgency=low + + [ Sylvestre Ledru ] + * Package moved to Debian Science. + + * gmp.h: Add support for __m68k__ (thanks, Thorsten Glaser). + Closes: #601287. + + * libgmp3-doc.examples: + * libgmp3-doc.README.Debian: Rename to libgmp10-doc.xxx. + + * libgmp3.prerm: Remove obsolete file. Was used to remove /usr/doc/xxx + symlinks from back at the time of the /usr/doc --> /usr/share/doc + transition. + + -- Steve M. Robbins Sat, 06 Nov 2010 17:55:15 -0500 + +gmp (2:5.0.1+dfsg-2) experimental; urgency=low + + * control: + * rules: New packages libmp3, lib32mp3, lib64mp3. Split library mp + out from the libgmp package as they have evolved to use different + major numbers now. Make libgmp10-dev conflict & replace libgmp3-dev + packages; ditto for 32-bit and 64-bit variants. Closes: #570225. + + -- Steve M. Robbins Sun, 28 Feb 2010 03:31:42 -0600 + +gmp (2:5.0.1+dfsg-1) experimental; urgency=low + + * New upstream release. Library gmp SOVERSION bumped from 3 to 10. + + * control: New packages (libgmp10, libgmp10-dev, etc) replace + corresponding packages due to SOVERSION change. Drop some + now-obsolete conflicts on libgmp3 and libgmp2 pacakges. + Bump Standards-Version to 3.8.4. + + -- Steve M. Robbins Sun, 07 Feb 2010 11:04:56 -0600 + +gmp (2:5.0.0+dfsg-1) experimental; urgency=low + + * New upstream release. + + -- Steve M. Robbins Sat, 09 Jan 2010 19:38:41 -0600 + +gmp (2:4.3.2+dfsg-2) UNRELEASED; urgency=low + + * Package moved to Debian Science + + [ Steve M. Robbins ] + * control: Set Standards-Version to 3.8.3. Add ${misc:Depends} to each package. + + -- Sylvestre Ledru Wed, 28 Apr 2010 14:24:45 +0200 gmp (2:4.3.2+dfsg-1) unstable; urgency=low diff -Nru gmp-4.3.2+dfsg/debian/control gmp-5.0.2+dfsg/debian/control --- gmp-4.3.2+dfsg/debian/control 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/control 2012-01-07 14:02:16.000000000 +0000 @@ -6,17 +6,15 @@ Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Debian Scientific Computing Team Uploaders: Steve M. Robbins -Vcs-Browser: http://svn.debian.org/wsvn/pkg-scicomp/gmp/trunk/?rev=0&sc=0 -Vcs-Svn: svn://svn.debian.org/svn/pkg-scicomp/gmp/trunk -Standards-Version: 3.8.4 +Vcs-Svn: svn://svn.debian.org/svn/debian-science/packages/gmp/trunk/ +Vcs-Browser: http://svn.debian.org/viewsvn/debian-science/packages/gmp/trunk/ +Standards-Version: 3.9.1 -Package: libgmp3c2 +Package: libgmp10 Section: libs Priority: optional Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} -Conflicts: libgmp3, libgmp2 (<< 2.0.2-10) -Replaces: libgmp3 Description: Multiprecision arithmetic library GNU MP is a programmer's library for arbitrary precision arithmetic (ie, a bignum package). It can operate on signed @@ -37,19 +35,20 @@ arithmetic (ie, a bignum package). It can operate on signed integer, rational, and floating point numeric types. -Package: libgmp3-dev +Package: libgmp-dev Section: libdevel Priority: optional Architecture: any -Depends: libgmp3c2 (= ${binary:Version}), libgmpxx4ldbl (= ${binary:Version}), ${misc:Depends} -Replaces: libgmp2-dev -Conflicts: libgmp2-dev +Depends: libgmp10 (= ${binary:Version}), libgmpxx4ldbl (= ${binary:Version}), ${misc:Depends} +Provides: libgmp10-dev +Conflicts: libgmp3-dev (<< 5.0.1), libgmp10-dev +Replaces: libgmp3-dev, libgmp10-dev Recommends: libstdc++-dev -Suggests: libgmp3-doc, libmpfr-dev +Suggests: libgmp10-doc, libmpfr-dev Description: Multiprecision arithmetic library developers tools This development package provides the header files and the symbolic links to allow compilation and linking of programs that use the libraries - provided in the libgmp3 package. + provided in the libgmp10 package. . Both C and C++ bindings are present in this package. Package libstdc++-dev is required to use the C++ bindings. @@ -57,7 +56,7 @@ The MPFR library (multiple-precision floating-point) used to be included, but has since been moved to package libmpfr-dev. -Package: lib32gmp3 +Package: lib32gmp10 Section: libs Priority: optional Architecture: amd64 ppc64 kfreebsd-amd64 @@ -84,17 +83,19 @@ integer, rational, and floating point numeric types. This package includes a 32 bit version of the shared library. -Package: lib32gmp3-dev +Package: lib32gmp-dev Section: libdevel Priority: optional Architecture: amd64 ppc64 kfreebsd-amd64 -Depends: libgmp3-dev (= ${binary:Version}), lib32gmp3 (= ${binary:Version}), lib32gmpxx4 (= ${binary:Version}), ${misc:Depends} -Suggests: libgmp3-doc, libmpfr-dev -Conflicts: libc6-i386 (<= 2.9-18) +Depends: libgmp-dev (= ${binary:Version}), lib32gmp10 (= ${binary:Version}), lib32gmpxx4 (= ${binary:Version}), ${misc:Depends} +Provides: lib32gmp10-dev, lib32gmp3-dev +Suggests: libgmp10-doc, libmpfr-dev +Conflicts: libc6-i386 (<= 2.9-18), lib32gmp3-dev, lib32gmp10-dev +Replaces: lib32gmp3-dev, lib32gmp10-dev Description: Multiprecision arithmetic library developers tools (32bit) This development package provides the header files and the symbolic links to allow compilation and linking of programs that use the - libraries provided in the libgmp3 package. This package includes 32 + libraries provided in the libgmp10 package. This package includes 32 bit versions of the link libraries. . Both C and C++ bindings are present in this package. Package @@ -103,7 +104,7 @@ The MPFR library (multiple-precision floating-point) used to be included, but has since been moved to package libmpfr-dev. -Package: lib64gmp3 +Package: lib64gmp10 Section: libs Priority: optional Architecture: powerpc @@ -128,16 +129,19 @@ integer, rational, and floating point numeric types. This package includes a 64 bit version of the shared library. -Package: lib64gmp3-dev +Package: lib64gmp-dev Section: libdevel Priority: optional Architecture: powerpc -Depends: libgmp3-dev (= ${binary:Version}), lib64gmp3 (= ${binary:Version}), lib64gmpxx4 (= ${binary:Version}), ${misc:Depends} -Suggests: libgmp3-doc, libmpfr-dev +Depends: libgmp-dev (= ${binary:Version}), lib64gmp10 (= ${binary:Version}), lib64gmpxx4 (= ${binary:Version}), ${misc:Depends} +Provides: lib64gmp10-dev, lib64gmp3-dev +Conflicts: lib64gmp3-dev, lib64gmp10-dev +Replaces: lib64gmp3-dev, lib64gmp10-dev +Suggests: libgmp10-doc, libmpfr-dev Description: Multiprecision arithmetic library developers tools (64bit) This development package provides the header files and the symbolic links to allow compilation and linking of programs that use the - libraries provided in the libgmp3 package. This package includes 64 + libraries provided in the libgmp10 package. This package includes 64 bit versions of the link libraries. . Both C and C++ bindings are present in this package. Package @@ -146,11 +150,21 @@ The MPFR library (multiple-precision floating-point) used to be included, but has since been moved to package libmpfr-dev. -Package: libgmp3-doc +Package: libgmp10-doc Section: doc Priority: optional -Depends: ${misc:Depends} Architecture: all -Replaces: libgmp3 (<< 3.1.1-8) +Depends: ${misc:Depends} Description: Multiprecision arithmetic library example code This package provides example code illustrating the use of GMP. + +#Package: libgmp3-dev +#Section: libdevel +#Priority: optional +#Architecture: any +#Depends: ${misc:Depends}, libgmp-dev (= ${binary:Version}) +#Conflicts: libgmp10-dev (<< 2:5.0.1+dfsg-7) +#Replaces: libgmp10-dev +#Description: Multiprecision arithmetic library developers tools +# This is a dummy package that simply pulls in libgmp-dev. +# It can safely be removed. diff -Nru gmp-4.3.2+dfsg/debian/gmp.h gmp-5.0.2+dfsg/debian/gmp.h --- gmp-4.3.2+dfsg/debian/gmp.h 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/gmp.h 2012-01-07 14:02:16.000000000 +0000 @@ -35,32 +35,34 @@ #endif #define gmp_wrapper_h -#if defined(__arm__) +#if defined(__alpha__) +#include "gmp-alpha.h" +#elif defined(__arm__) #include "gmp-arm.h" #elif defined(__avr32__) #include "gmp-avr32.h" +#elif defined(__hppa__) +#include "gmp-hppa.h" #elif defined(__i386__) #include "gmp-i386.h" #elif defined(__ia64__) #include "gmp-ia64.h" -#elif defined(__hppa__) -#include "gmp-hppa.h" -#elif defined(__powerpc64__) -#include "gmp-ppc64.h" +#elif defined(__m68k__) +#include "gmp-m68k.h" #elif defined(__mips__) #include "gmp-mips.h" +#elif defined(__powerpc64__) +#include "gmp-ppc64.h" #elif defined(__powerpc__) #include "gmp-ppc.h" #elif defined(__s390__) #include "gmp-s390.h" +#elif defined(__sh__) +#include "gmp-sh.h" #elif defined(__sparc__) #include "gmp-sparc.h" #elif defined(__x86_64__) #include "gmp-x86_64.h" -#elif defined(__alpha__) -#include "gmp-alpha.h" -#elif defined(__sh__) -#include "gmp-sh.h" #else #error "The gmp-dev package is not usable with the architecture." #endif diff -Nru gmp-4.3.2+dfsg/debian/lib32mp3.debhelper.log gmp-5.0.2+dfsg/debian/lib32mp3.debhelper.log --- gmp-4.3.2+dfsg/debian/lib32mp3.debhelper.log 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/lib32mp3.debhelper.log 2012-01-07 14:02:16.000000000 +0000 @@ -0,0 +1 @@ +dh_install diff -Nru gmp-4.3.2+dfsg/debian/libgmp10-doc.examples gmp-5.0.2+dfsg/debian/libgmp10-doc.examples --- gmp-4.3.2+dfsg/debian/libgmp10-doc.examples 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/libgmp10-doc.examples 2012-01-07 14:02:16.000000000 +0000 @@ -0,0 +1 @@ +demos diff -Nru gmp-4.3.2+dfsg/debian/libgmp10-doc.README.Debian gmp-5.0.2+dfsg/debian/libgmp10-doc.README.Debian --- gmp-4.3.2+dfsg/debian/libgmp10-doc.README.Debian 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/libgmp10-doc.README.Debian 2012-01-07 14:02:16.000000000 +0000 @@ -0,0 +1,21 @@ + No Docs + ------- + +Please see http://gmplib.org/manual/ for the documentation. +Sadly, due to licensing it cannot be shipped in Debian. + +See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335403 +and http://lists.debian.org/debian-legal/2006/03/msg00536.html + + + Demo Code + --------- + +The code in /usr/share/doc/libgmp10-doc/examples/demos comes straight +out of the GMP source distribution. As such, the "Makefile.am" files +are not expected to be directly useful, but should serve as a model +for building the code. + + + + -- Steve M. Robbins , Sat, 06 Nov 2010 18:00:20 -0500 diff -Nru gmp-4.3.2+dfsg/debian/libgmp3-doc.examples gmp-5.0.2+dfsg/debian/libgmp3-doc.examples --- gmp-4.3.2+dfsg/debian/libgmp3-doc.examples 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/libgmp3-doc.examples 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -demos diff -Nru gmp-4.3.2+dfsg/debian/libgmp3-doc.README.Debian gmp-5.0.2+dfsg/debian/libgmp3-doc.README.Debian --- gmp-4.3.2+dfsg/debian/libgmp3-doc.README.Debian 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/libgmp3-doc.README.Debian 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ - No Docs - ------- - -Please see http://www.swox.com/gmp/#DOC for the documentation. -Sadly, due to licensing it cannot be shipped in Debian. - -See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335403 -and http://lists.debian.org/debian-legal/2006/03/msg00536.html - - - Demo Code - --------- - -The code in /usr/share/doc/libgmp3-doc/examples/demos comes straight -out of the GMP source distribution. As such, the "Makefile.am" files -are not expected to be directly useful, but should serve as a model -for building the code. - - - - -- Steve M. Robbins , Fri, 14 Apr 2006 04:10:07 -0400 diff -Nru gmp-4.3.2+dfsg/debian/libgmp3.prerm gmp-5.0.2+dfsg/debian/libgmp3.prerm --- gmp-4.3.2+dfsg/debian/libgmp3.prerm 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/libgmp3.prerm 1970-01-01 00:00:00.000000000 +0000 @@ -1,17 +0,0 @@ -#!/bin/sh - -# Cruft removal -if [ \( "$1" = "upgrade" -o "$1" = "remove" -o "$1" = "purge" \) ]; then - if [ -L /usr/doc/libgmp3 ]; then - rm -f /usr/doc/libgmp3 - fi - if [ -L /usr/info/gmp3.info.gz ]; then - rm -f /usr/info/gmp3.info.gz - fi - if [ -L /usr/info/gmp3.info ]; then - rm -f /usr/info/gmp3.info - fi -fi - - -#DEBHELPER# diff -Nru gmp-4.3.2+dfsg/debian/libmp3.debhelper.log gmp-5.0.2+dfsg/debian/libmp3.debhelper.log --- gmp-4.3.2+dfsg/debian/libmp3.debhelper.log 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/libmp3.debhelper.log 2012-01-07 14:02:16.000000000 +0000 @@ -0,0 +1 @@ +dh_install diff -Nru gmp-4.3.2+dfsg/debian/patches/series gmp-5.0.2+dfsg/debian/patches/series --- gmp-4.3.2+dfsg/debian/patches/series 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/patches/series 2012-01-07 14:02:16.000000000 +0000 @@ -1 +1,2 @@ arm-thumb2-support.patch +# No patches at present diff -Nru gmp-4.3.2+dfsg/debian/README.Debian gmp-5.0.2+dfsg/debian/README.Debian --- gmp-4.3.2+dfsg/debian/README.Debian 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/README.Debian 2012-01-07 14:02:16.000000000 +0000 @@ -2,9 +2,9 @@ ------------------------------ Sadly, due to licensing the GMP documentation is no longer shipped in -Debian. The package libgmp3-doc now contains only demo code. +Debian. The package libgmp10-doc now contains only demo code. -Please see http://www.swox.com/gmp/#DOC for the documentation. +Please see http://gmplib.org/manual/ for the documentation. - -- Steve M. Robbins , Fri, 14 Apr 2006 13:07:10 -0400 + -- Steve M. Robbins , Sat, 06 Nov 2010 18:00:53 -0500 diff -Nru gmp-4.3.2+dfsg/debian/rules gmp-5.0.2+dfsg/debian/rules --- gmp-4.3.2+dfsg/debian/rules 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/rules 2012-01-07 14:02:16.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/make -f -ORIG_SRC_VERSION = 4.3.2 +ORIG_SRC_VERSION = 5.0.1 include /usr/share/quilt/quilt.make @@ -16,8 +16,8 @@ endif DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) -export DEB_HOST_GNU_TYPE := $(subst i386,i486, $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)) -export DEB_BUILD_GNU_TYPE := $(subst i386,i486, $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)) +export DEB_HOST_GNU_TYPE := $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +export DEB_BUILD_GNU_TYPE := $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) MAKE_CHECK = : disabled make check ifeq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) @@ -26,20 +26,27 @@ endif endif -export CFLAGS = -Wall -g -D_REENTRANT +export CFLAGS = -Wall -g export LDFLAGS = -Wl,-Bsymbolic-functions ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else - CFLAGS += -O3 + ifneq (,$(findstring $(DEB_HOST_ARCH), ia64)) + CFLAGS += -O2 + else + CFLAGS += -O3 + ifeq ($(DEB_HOST_ARCH),ppc64) + CFLAGS += -mno-vsx + endif + endif endif lib32dir = usr/lib32 lib64dir = usr/lib64 -confflags = --prefix=/usr --enable-cxx --enable-mpbsd +confflags = --prefix=/usr --enable-cxx ifneq (,$(filter $(DEB_HOST_ARCH), amd64 kfreebsd-amd64 lpia)) confflags += --disable-fat @@ -52,7 +59,7 @@ confflags_build += --build $(DEB_BUILD_GNU_TYPE) else AR = $(DEB_HOST_GNU_TYPE)-ar - confflags_build += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) + confflags_build += --build $(DEB_BUILD_GNU_TYPE) --host $(DEB_HOST_GNU_TYPE) --target $(DEB_HOST_GNU_TYPE) endif ifneq (,$(findstring $(DEB_HOST_ARCH), amd64 ppc64 kfreebsd-amd64)) @@ -85,6 +92,7 @@ confflags += $(confflags_build) + get-orig-source: gmp-$(ORIG_SRC_VERSION).tar.gz tar xzf gmp-$(ORIG_SRC_VERSION).tar.gz mv gmp-$(ORIG_SRC_VERSION) gmp-$(ORIG_SRC_VERSION)+dfsg @@ -166,46 +174,46 @@ install: build-stamp install-prep $(MAKE) DESTDIR=`pwd`/debian/tmp -C build install - dh_install -plibgmp3c2 usr/lib/libgmp.so.* - dh_install -plibgmp3c2 usr/lib/libmp.so.* + dh_install -plibgmp10 usr/lib/libgmp.so.* +# dh_install -plibmp3 usr/lib/libmp.so.* dh_install -plibgmpxx4ldbl usr/lib/libgmpxx.so.* - dh_install -plibgmp3-dev usr/lib/lib*.so - dh_install -plibgmp3-dev usr/lib/lib*.a - dh_install -plibgmp3-dev usr/lib/lib*.la - dh_install -plibgmp3-dev usr/include - dh_install -plibgmp3-dev -Xgmp-mparam.h build/gmp*.h usr/include + dh_install -plibgmp-dev usr/lib/lib*.so + dh_install -plibgmp-dev usr/lib/lib*.a + dh_install -plibgmp-dev usr/lib/lib*.la + dh_install -plibgmp-dev usr/include + dh_install -plibgmp-dev -Xgmp-mparam.h build/gmp*.h usr/include # Install upstream ChangeLog, AUTHORS, NEWS, and README only in -dev package - dh_installchangelogs -plibgmp3-dev - dh_installdocs -plibgmp3-dev AUTHORS NEWS README + dh_installchangelogs -plibgmp-dev + dh_installdocs -plibgmp-dev AUTHORS NEWS README install32: build32-stamp install-prep $(MAKE) DESTDIR=`pwd`/debian/tmp -C build32 install - dh_install -plib32gmp3 ${lib32dir}/libgmp.so.* - dh_install -plib32gmp3 ${lib32dir}/libmp.so.* + dh_install -plib32gmp10 ${lib32dir}/libgmp.so.* +# dh_install -plib32mp3 ${lib32dir}/libmp.so.* dh_install -plib32gmpxx4 ${lib32dir}/libgmpxx.so.* - dh_install -plib32gmp3-dev ${lib32dir}/lib*.so - dh_install -plib32gmp3-dev ${lib32dir}/lib*.a - dh_install -plib32gmp3-dev ${lib32dir}/lib*.la - dh_install -plib32gmp3-dev -Xgmp-mparam.h -Xgmp.h build32/gmp*.h usr/include + dh_install -plib32gmp-dev ${lib32dir}/lib*.so + dh_install -plib32gmp-dev ${lib32dir}/lib*.a + dh_install -plib32gmp-dev ${lib32dir}/lib*.la + dh_install -plib32gmp-dev -Xgmp-mparam.h -Xgmp.h build32/gmp*.h usr/include install64: build64-stamp install-prep $(MAKE) DESTDIR=`pwd`/debian/tmp -C build64 install - dh_install -plib64gmp3 ${lib64dir}/libgmp.so.* - dh_install -plib64gmp3 ${lib64dir}/libmp.so.* + dh_install -plib64gmp10 ${lib64dir}/libgmp.so.* +# dh_install -plib64mp3 ${lib64dir}/libmp.so.* dh_install -plib64gmpxx4 ${lib64dir}/libgmpxx.so.* - dh_install -plib64gmp3-dev ${lib64dir}/lib*.so - dh_install -plib64gmp3-dev ${lib64dir}/lib*.a - dh_install -plib64gmp3-dev ${lib64dir}/lib*.la - dh_install -plib64gmp3-dev -Xgmp-mparam.h -Xgmp.h build64/gmp*.h usr/include + dh_install -plib64gmp-dev ${lib64dir}/lib*.so + dh_install -plib64gmp-dev ${lib64dir}/lib*.a + dh_install -plib64gmp-dev ${lib64dir}/lib*.la + dh_install -plib64gmp-dev -Xgmp-mparam.h -Xgmp.h build64/gmp*.h usr/include # This single target is used to build all the packages, all at once, or diff -Nru gmp-4.3.2+dfsg/debian/TODO gmp-5.0.2+dfsg/debian/TODO --- gmp-4.3.2+dfsg/debian/TODO 2012-01-07 14:02:15.000000000 +0000 +++ gmp-5.0.2+dfsg/debian/TODO 2012-01-07 14:02:16.000000000 +0000 @@ -1 +1 @@ - +* remove old mp libraries. diff -Nru gmp-4.3.2+dfsg/demos/calc/calc.c gmp-5.0.2+dfsg/demos/calc/calc.c --- gmp-4.3.2+dfsg/demos/calc/calc.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/calc/calc.c 2011-05-08 09:49:50.000000000 +0000 @@ -1,37 +1,72 @@ -/* A Bison parser, made from calc.y - by GNU bison 1.34. */ +/* A Bison parser, made by GNU Bison 2.4.3. */ -#define YYBISON 1 /* Identify Bison output. */ +/* Skeleton implementation for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ -# define EOS 257 -# define BAD 258 -# define HELP 259 -# define HEX 260 -# define DECIMAL 261 -# define QUIT 262 -# define ABS 263 -# define BIN 264 -# define FIB 265 -# define GCD 266 -# define KRON 267 -# define LCM 268 -# define LUCNUM 269 -# define NEXTPRIME 270 -# define POWM 271 -# define ROOT 272 -# define SQRT 273 -# define NUMBER 274 -# define VARIABLE 275 -# define LOR 276 -# define LAND 277 -# define EQ 278 -# define NE 279 -# define LE 280 -# define GE 281 -# define LSHIFT 282 -# define RSHIFT 283 -# define UMINUS 284 +/* C LALR(1) parser skeleton written by Richard Stallman, by + simplifying the original so-called "semantic" parser. */ +/* All symbols defined below should begin with yy or YY, to avoid + infringing on user name space. This should be done even for local + variables, as they might otherwise be expanded by user macros. + There are some unavoidable exceptions within include files to + define necessary library symbols; they are noted "INFRINGES ON + USER NAME SPACE" below. */ + +/* Identify Bison output. */ +#define YYBISON 1 + +/* Bison version. */ +#define YYBISON_VERSION "2.4.3" + +/* Skeleton name. */ +#define YYSKELETON_NAME "yacc.c" + +/* Pure parsers. */ +#define YYPURE 0 + +/* Push parsers. */ +#define YYPUSH 0 + +/* Pull parsers. */ +#define YYPULL 1 + +/* Using locations. */ +#define YYLSP_NEEDED 0 + + + +/* Copy the first part of user declarations. */ + +/* Line 189 of yacc.c */ #line 1 "calc.y" /* A simple integer desk calculator using yacc and gmp. @@ -140,10 +175,10 @@ mpz_ptr sp = stack[0]; #define CHECK_OVERFLOW() \ - if (sp >= stack[numberof(stack)]) \ + if (sp >= stack[numberof(stack)]) /* FIXME */ \ { \ fprintf (stderr, \ - "Value stack overflow, too much nesting in expression\n"); \ + "Value stack overflow, too much nesting in expression\n"); \ YYERROR; \ } @@ -173,29 +208,358 @@ } -#line 143 "calc.y" -#ifndef YYSTYPE -typedef union { + +/* Line 189 of yacc.c */ +#line 214 "calc.c" + +/* Enabling traces. */ +#ifndef YYDEBUG +# define YYDEBUG 0 +#endif + +/* Enabling verbose error messages. */ +#ifdef YYERROR_VERBOSE +# undef YYERROR_VERBOSE +# define YYERROR_VERBOSE 1 +#else +# define YYERROR_VERBOSE 0 +#endif + +/* Enabling the token table. */ +#ifndef YYTOKEN_TABLE +# define YYTOKEN_TABLE 0 +#endif + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + EOS = 258, + BAD = 259, + HELP = 260, + HEX = 261, + DECIMAL = 262, + QUIT = 263, + ABS = 264, + BIN = 265, + FIB = 266, + GCD = 267, + KRON = 268, + LCM = 269, + LUCNUM = 270, + NEXTPRIME = 271, + POWM = 272, + ROOT = 273, + SQRT = 274, + NUMBER = 275, + VARIABLE = 276, + LOR = 277, + LAND = 278, + GE = 279, + LE = 280, + NE = 281, + EQ = 282, + RSHIFT = 283, + LSHIFT = 284, + UMINUS = 285 + }; +#endif +/* Tokens. */ +#define EOS 258 +#define BAD 259 +#define HELP 260 +#define HEX 261 +#define DECIMAL 262 +#define QUIT 263 +#define ABS 264 +#define BIN 265 +#define FIB 266 +#define GCD 267 +#define KRON 268 +#define LCM 269 +#define LUCNUM 270 +#define NEXTPRIME 271 +#define POWM 272 +#define ROOT 273 +#define SQRT 274 +#define NUMBER 275 +#define VARIABLE 276 +#define LOR 277 +#define LAND 278 +#define GE 279 +#define LE 280 +#define NE 281 +#define EQ 282 +#define RSHIFT 283 +#define LSHIFT 284 +#define UMINUS 285 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 214 of yacc.c */ +#line 142 "calc.y" + char *str; int var; -} yystype; -# define YYSTYPE yystype + + + +/* Line 214 of yacc.c */ +#line 317 "calc.c" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 #endif -#ifndef YYDEBUG -# define YYDEBUG 0 + + +/* Copy the second part of user declarations. */ + + +/* Line 264 of yacc.c */ +#line 329 "calc.c" + +#ifdef short +# undef short #endif +#ifdef YYTYPE_UINT8 +typedef YYTYPE_UINT8 yytype_uint8; +#else +typedef unsigned char yytype_uint8; +#endif +#ifdef YYTYPE_INT8 +typedef YYTYPE_INT8 yytype_int8; +#elif (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +typedef signed char yytype_int8; +#else +typedef short int yytype_int8; +#endif -#define YYFINAL 118 -#define YYFLAG -32768 -#define YYNTBASE 44 +#ifdef YYTYPE_UINT16 +typedef YYTYPE_UINT16 yytype_uint16; +#else +typedef unsigned short int yytype_uint16; +#endif -/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */ -#define YYTRANSLATE(x) ((unsigned)(x) <= 284 ? yytranslate[x] : 50) +#ifdef YYTYPE_INT16 +typedef YYTYPE_INT16 yytype_int16; +#else +typedef short int yytype_int16; +#endif -/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */ -static const char yytranslate[] = +#ifndef YYSIZE_T +# ifdef __SIZE_TYPE__ +# define YYSIZE_T __SIZE_TYPE__ +# elif defined size_t +# define YYSIZE_T size_t +# elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# define YYSIZE_T size_t +# else +# define YYSIZE_T unsigned int +# endif +#endif + +#define YYSIZE_MAXIMUM ((YYSIZE_T) -1) + +#ifndef YY_ +# if defined YYENABLE_NLS && YYENABLE_NLS +# if ENABLE_NLS +# include /* INFRINGES ON USER NAME SPACE */ +# define YY_(msgid) dgettext ("bison-runtime", msgid) +# endif +# endif +# ifndef YY_ +# define YY_(msgid) msgid +# endif +#endif + +/* Suppress unused-variable warnings by "using" E. */ +#if ! defined lint || defined __GNUC__ +# define YYUSE(e) ((void) (e)) +#else +# define YYUSE(e) /* empty */ +#endif + +/* Identity function, used to suppress warnings about constant conditions. */ +#ifndef lint +# define YYID(n) (n) +#else +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static int +YYID (int yyi) +#else +static int +YYID (yyi) + int yyi; +#endif +{ + return yyi; +} +#endif + +#if ! defined yyoverflow || YYERROR_VERBOSE + +/* The parser invokes alloca or malloc; define the necessary symbols. */ + +# ifdef YYSTACK_USE_ALLOCA +# if YYSTACK_USE_ALLOCA +# ifdef __GNUC__ +# define YYSTACK_ALLOC __builtin_alloca +# elif defined __BUILTIN_VA_ARG_INCR +# include /* INFRINGES ON USER NAME SPACE */ +# elif defined _AIX +# define YYSTACK_ALLOC __alloca +# elif defined _MSC_VER +# include /* INFRINGES ON USER NAME SPACE */ +# define alloca _alloca +# else +# define YYSTACK_ALLOC alloca +# if ! defined _ALLOCA_H && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# endif +# endif +# endif + +# ifdef YYSTACK_ALLOC + /* Pacify GCC's `empty if-body' warning. */ +# define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) +# ifndef YYSTACK_ALLOC_MAXIMUM + /* The OS might guarantee only one guard page at the bottom of the stack, + and a page size can be as small as 4096 bytes. So we cannot safely + invoke alloca (N) if N exceeds 4096. Use a slightly smaller number + to allow for a few compiler-allocated temporary stack slots. */ +# define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ +# endif +# else +# define YYSTACK_ALLOC YYMALLOC +# define YYSTACK_FREE YYFREE +# ifndef YYSTACK_ALLOC_MAXIMUM +# define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM +# endif +# if (defined __cplusplus && ! defined _STDLIB_H \ + && ! ((defined YYMALLOC || defined malloc) \ + && (defined YYFREE || defined free))) +# include /* INFRINGES ON USER NAME SPACE */ +# ifndef _STDLIB_H +# define _STDLIB_H 1 +# endif +# endif +# ifndef YYMALLOC +# define YYMALLOC malloc +# if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# ifndef YYFREE +# define YYFREE free +# if ! defined free && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +void free (void *); /* INFRINGES ON USER NAME SPACE */ +# endif +# endif +# endif +#endif /* ! defined yyoverflow || YYERROR_VERBOSE */ + + +#if (! defined yyoverflow \ + && (! defined __cplusplus \ + || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) + +/* A type that is properly aligned for any stack member. */ +union yyalloc +{ + yytype_int16 yyss_alloc; + YYSTYPE yyvs_alloc; +}; + +/* The size of the maximum gap between one aligned stack and the next. */ +# define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) + +/* The size of an array large to enough to hold all stacks, each with + N elements. */ +# define YYSTACK_BYTES(N) \ + ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + + YYSTACK_GAP_MAXIMUM) + +/* Copy COUNT objects from FROM to TO. The source and destination do + not overlap. */ +# ifndef YYCOPY +# if defined __GNUC__ && 1 < __GNUC__ +# define YYCOPY(To, From, Count) \ + __builtin_memcpy (To, From, (Count) * sizeof (*(From))) +# else +# define YYCOPY(To, From, Count) \ + do \ + { \ + YYSIZE_T yyi; \ + for (yyi = 0; yyi < (Count); yyi++) \ + (To)[yyi] = (From)[yyi]; \ + } \ + while (YYID (0)) +# endif +# endif + +/* Relocate STACK from its old location to the new one. The + local variables YYSIZE and YYSTACKSIZE give the old and new number of + elements in the stack, and YYPTR gives the new location of the + stack. Advance YYPTR to a properly aligned location for the next + stack. */ +# define YYSTACK_RELOCATE(Stack_alloc, Stack) \ + do \ + { \ + YYSIZE_T yynewbytes; \ + YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ + Stack = &yyptr->Stack_alloc; \ + yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ + yyptr += yynewbytes / sizeof (*yyptr); \ + } \ + while (YYID (0)) + +#endif + +/* YYFINAL -- State number of the termination state. */ +#define YYFINAL 41 +/* YYLAST -- Last index in YYTABLE. */ +#define YYLAST 552 + +/* YYNTOKENS -- Number of terminals. */ +#define YYNTOKENS 44 +/* YYNNTS -- Number of nonterminals. */ +#define YYNNTS 7 +/* YYNRULES -- Number of rules. */ +#define YYNRULES 49 +/* YYNRULES -- Number of states. */ +#define YYNSTATES 118 + +/* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ +#define YYUNDEFTOK 2 +#define YYMAXUTOK 285 + +#define YYTRANSLATE(YYX) \ + ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) + +/* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ +static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, @@ -222,223 +586,240 @@ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, - 2, 2, 2, 2, 2, 2, 1, 3, 4, 5, - 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, - 16, 17, 18, 19, 20, 21, 22, 23, 26, 27, - 28, 29, 30, 31, 37 + 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, + 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, + 15, 16, 17, 18, 19, 20, 21, 22, 23, 26, + 27, 28, 29, 30, 31, 37 }; #if YYDEBUG -static const short yyprhs[] = -{ - 0, 0, 2, 5, 8, 12, 15, 16, 18, 22, - 24, 26, 28, 30, 34, 38, 42, 46, 50, 54, - 58, 62, 66, 69, 72, 76, 80, 84, 88, 92, - 96, 100, 104, 109, 116, 121, 126, 133, 138, 143, - 148, 157, 164, 169, 171, 173, 175, 179, 181 +/* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in + YYRHS. */ +static const yytype_uint8 yyprhs[] = +{ + 0, 0, 3, 5, 8, 11, 15, 18, 19, 21, + 25, 27, 29, 31, 33, 37, 41, 45, 49, 53, + 57, 61, 65, 69, 72, 75, 79, 83, 87, 91, + 95, 99, 103, 107, 112, 119, 124, 129, 136, 141, + 146, 151, 160, 167, 172, 174, 176, 178, 182, 184 }; -static const short yyrhs[] = + +/* YYRHS -- A `-1'-separated list of the rules' RHS. */ +static const yytype_int8 yyrhs[] = { - 46, 0, 45, 46, 0, 46, 3, 0, 45, 46, - 3, 0, 1, 3, 0, 0, 47, 0, 21, 40, - 47, 0, 5, 0, 6, 0, 7, 0, 8, 0, - 41, 47, 42, 0, 47, 32, 47, 0, 47, 33, - 47, 0, 47, 34, 47, 0, 47, 35, 47, 0, - 47, 36, 47, 0, 47, 38, 47, 0, 47, 30, - 47, 0, 47, 31, 47, 0, 47, 39, 0, 33, - 47, 0, 47, 24, 47, 0, 47, 28, 47, 0, - 47, 26, 47, 0, 47, 27, 47, 0, 47, 29, - 47, 0, 47, 25, 47, 0, 47, 23, 47, 0, - 47, 22, 47, 0, 9, 41, 47, 42, 0, 10, - 41, 47, 43, 47, 42, 0, 11, 41, 47, 42, - 0, 12, 41, 48, 42, 0, 13, 41, 47, 43, - 47, 42, 0, 14, 41, 49, 42, 0, 15, 41, - 47, 42, 0, 16, 41, 47, 42, 0, 17, 41, - 47, 43, 47, 43, 47, 42, 0, 18, 41, 47, - 43, 47, 42, 0, 19, 41, 47, 42, 0, 21, - 0, 20, 0, 47, 0, 48, 43, 47, 0, 47, - 0, 49, 43, 47, 0 + 45, 0, -1, 47, -1, 46, 47, -1, 47, 3, + -1, 46, 47, 3, -1, 1, 3, -1, -1, 48, + -1, 21, 40, 48, -1, 5, -1, 6, -1, 7, + -1, 8, -1, 41, 48, 42, -1, 48, 32, 48, + -1, 48, 33, 48, -1, 48, 34, 48, -1, 48, + 35, 48, -1, 48, 36, 48, -1, 48, 38, 48, + -1, 48, 31, 48, -1, 48, 30, 48, -1, 48, + 39, -1, 33, 48, -1, 48, 24, 48, -1, 48, + 27, 48, -1, 48, 29, 48, -1, 48, 28, 48, + -1, 48, 26, 48, -1, 48, 25, 48, -1, 48, + 23, 48, -1, 48, 22, 48, -1, 9, 41, 48, + 42, -1, 10, 41, 48, 43, 48, 42, -1, 11, + 41, 48, 42, -1, 12, 41, 49, 42, -1, 13, + 41, 48, 43, 48, 42, -1, 14, 41, 50, 42, + -1, 15, 41, 48, 42, -1, 16, 41, 48, 42, + -1, 17, 41, 48, 43, 48, 43, 48, 42, -1, + 18, 41, 48, 43, 48, 42, -1, 19, 41, 48, + 42, -1, 21, -1, 20, -1, 48, -1, 49, 43, + 48, -1, 48, -1, 50, 43, 48, -1 }; -#endif - -#if YYDEBUG -/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ -static const short yyrline[] = +/* YYRLINE[YYN] -- source line where rule number YYN was defined. */ +static const yytype_uint16 yyrline[] = { - 0, 167, 169, 171, 173, 174, 176, 178, 183, 189, - 190, 191, 192, 197, 199, 200, 201, 202, 203, 204, - 206, 208, 210, 212, 214, 215, 216, 217, 218, 219, - 221, 222, 224, 225, 227, 229, 230, 232, 233, 235, - 236, 237, 239, 241, 247, 257, 259, 261, 263 + 0, 167, 167, 168, 171, 172, 173, 175, 177, 182, + 188, 189, 190, 191, 197, 198, 199, 200, 201, 202, + 203, 205, 207, 209, 211, 213, 214, 215, 216, 217, + 218, 220, 221, 223, 224, 226, 228, 229, 231, 232, + 234, 235, 236, 238, 240, 246, 257, 258, 261, 262 }; #endif - -#if (YYDEBUG) || defined YYERROR_VERBOSE - -/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */ +#if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE +/* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. + First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { - "$", "error", "$undefined.", "EOS", "BAD", "HELP", "HEX", "DECIMAL", - "QUIT", "ABS", "BIN", "FIB", "GCD", "KRON", "LCM", "LUCNUM", - "NEXTPRIME", "POWM", "ROOT", "SQRT", "NUMBER", "VARIABLE", "LOR", - "LAND", "'<'", "'>'", "EQ", "NE", "LE", "GE", "LSHIFT", "RSHIFT", "'+'", - "'-'", "'*'", "'/'", "'%'", "UMINUS", "'^'", "'!'", "'='", "'('", "')'", - "','", "top", "statements", "statement", "e", "gcdlist", "lcmlist", 0 + "$end", "error", "$undefined", "EOS", "BAD", "HELP", "HEX", "DECIMAL", + "QUIT", "ABS", "BIN", "FIB", "GCD", "KRON", "LCM", "LUCNUM", "NEXTPRIME", + "POWM", "ROOT", "SQRT", "NUMBER", "VARIABLE", "LOR", "LAND", "'<'", + "'>'", "GE", "LE", "NE", "EQ", "RSHIFT", "LSHIFT", "'+'", "'-'", "'*'", + "'/'", "'%'", "UMINUS", "'^'", "'!'", "'='", "'('", "')'", "','", + "$accept", "top", "statements", "statement", "e", "gcdlist", "lcmlist", 0 }; #endif -/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ -static const short yyr1[] = +# ifdef YYPRINT +/* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to + token YYLEX-NUM. */ +static const yytype_uint16 yytoknum[] = +{ + 0, 256, 257, 258, 259, 260, 261, 262, 263, 264, + 265, 266, 267, 268, 269, 270, 271, 272, 273, 274, + 275, 276, 277, 278, 60, 62, 279, 280, 281, 282, + 283, 284, 43, 45, 42, 47, 37, 285, 94, 33, + 61, 40, 41, 44 +}; +# endif + +/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ +static const yytype_uint8 yyr1[] = { - 0, 44, 44, 45, 45, 45, 46, 46, 46, 46, - 46, 46, 46, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 47, 47, 47, 47, 47, - 47, 47, 47, 47, 47, 48, 48, 49, 49 + 0, 44, 45, 45, 46, 46, 46, 47, 47, 47, + 47, 47, 47, 47, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 49, 49, 50, 50 }; -/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ -static const short yyr2[] = +/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ +static const yytype_uint8 yyr2[] = { - 0, 1, 2, 2, 3, 2, 0, 1, 3, 1, - 1, 1, 1, 3, 3, 3, 3, 3, 3, 3, - 3, 3, 2, 2, 3, 3, 3, 3, 3, 3, - 3, 3, 4, 6, 4, 4, 6, 4, 4, 4, - 8, 6, 4, 1, 1, 1, 3, 1, 3 + 0, 2, 1, 2, 2, 3, 2, 0, 1, 3, + 1, 1, 1, 1, 3, 3, 3, 3, 3, 3, + 3, 3, 3, 2, 2, 3, 3, 3, 3, 3, + 3, 3, 3, 4, 6, 4, 4, 6, 4, 4, + 4, 8, 6, 4, 1, 1, 1, 3, 1, 3 }; -/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE - doesn't specify something else to do. Zero means the default is an - error. */ -static const short yydefact[] = -{ - 0, 0, 9, 10, 11, 12, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 44, 43, 0, - 0, 6, 1, 7, 5, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 43, 23, 0, - 2, 3, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 22, 0, - 0, 0, 45, 0, 0, 47, 0, 0, 0, 0, - 0, 0, 8, 13, 4, 31, 30, 24, 29, 26, - 27, 25, 28, 20, 21, 14, 15, 16, 17, 18, - 19, 32, 0, 34, 35, 0, 0, 37, 0, 38, - 39, 0, 0, 42, 0, 46, 0, 48, 0, 0, - 33, 36, 0, 41, 0, 40, 0, 0, 0 +/* YYDEFACT[STATE-NAME] -- Default rule to reduce with in state + STATE-NUM when YYTABLE doesn't specify something else to do. Zero + means the default is an error. */ +static const yytype_uint8 yydefact[] = +{ + 0, 0, 10, 11, 12, 13, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 45, 44, 0, + 0, 0, 7, 2, 8, 6, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 44, 24, + 0, 1, 3, 4, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 23, 0, 0, 0, 46, 0, 0, 48, 0, 0, + 0, 0, 0, 0, 9, 14, 5, 32, 31, 25, + 30, 29, 26, 28, 27, 22, 21, 15, 16, 17, + 18, 19, 20, 33, 0, 35, 36, 0, 0, 38, + 0, 39, 40, 0, 0, 43, 0, 47, 0, 49, + 0, 0, 34, 37, 0, 42, 0, 41 }; -static const short yydefgoto[] = +/* YYDEFGOTO[NTERM-NUM]. */ +static const yytype_int8 yydefgoto[] = { - 116, 21, 22, 23, 63, 66 + -1, 21, 22, 23, 24, 65, 68 }; -static const short yypact[] = -{ - 39, 17,-32768,-32768,-32768,-32768, -20, 0, 2, 25, - 28, 30, 33, 34, 37, 40, 46,-32768, -18, 122, - 122, 89, 67, 462,-32768, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122,-32768, -36, 252, - 87,-32768, 122, 122, 122, 122, 122, 122, 122, 122, - 122, 122, 122, 122, 122, 122, 122, 122,-32768, 273, - 142, 294, 462, -38, 164, 462, -24, 315, 336, 186, - 208, 357, 462,-32768,-32768, 479, 495, 511, 511, 511, - 511, 511, 511, 29, 29, 50, 50, -36, -36, -36, - -36,-32768, 122,-32768,-32768, 122, 122,-32768, 122,-32768, - -32768, 122, 122,-32768, 378, 462, 399, 462, 230, 420, - -32768,-32768, 122,-32768, 441,-32768, 91, 92,-32768 +/* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing + STATE-NUM. */ +#define YYPACT_NINF -39 +static const yytype_int16 yypact[] = +{ + 41, 3, -39, -39, -39, -39, 2, 4, 27, 32, + 35, 36, 39, 42, 45, 46, 47, -39, -18, 124, + 124, 89, 91, 87, 464, -39, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, -39, -36, + 254, -39, 88, -39, 124, 124, 124, 124, 124, 124, + 124, 124, 124, 124, 124, 124, 124, 124, 124, 124, + -39, 275, 144, 296, 464, -38, 166, 464, 29, 317, + 338, 188, 210, 359, 464, -39, -39, 481, 497, 513, + 513, 513, 513, 513, 513, 31, 31, -15, -15, -36, + -36, -36, -36, -39, 124, -39, -39, 124, 124, -39, + 124, -39, -39, 124, 124, -39, 380, 464, 401, 464, + 232, 422, -39, -39, 124, -39, 443, -39 }; -static const short yypgoto[] = +/* YYPGOTO[NTERM-NUM]. */ +static const yytype_int8 yypgoto[] = { - -32768,-32768, 90, -19,-32768,-32768 + -39, -39, -39, 70, -19, -39, -39 }; - -#define YYLAST 550 - - -static const short yytable[] = -{ - 38, 39, 57, 58, 94, 95, 59, 60, 61, 62, - 64, 65, 67, 68, 69, 70, 71, 72, 97, 98, - 24, 25, 36, 75, 76, 77, 78, 79, 80, 81, - 82, 83, 84, 85, 86, 87, 88, 89, 90, -6, - 1, 26, -6, 27, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 52, 53, 54, 55, 56, 28, 57, 58, 29, - 41, 30, 19, 104, 31, 32, 105, 106, 33, 107, - 20, 34, 108, 109, 54, 55, 56, 35, 57, 58, - 74, 117, 118, 114, 2, 3, 4, 5, 6, 7, - 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 40, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 19, 0, 0, 0, 0, 0, 0, 0, - 20, 6, 7, 8, 9, 10, 11, 12, 13, 14, - 15, 16, 17, 37, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 19, 0, 0, 0, 0, - 0, 0, 0, 20, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, - 57, 58, 0, 0, 0, 92, 42, 43, 44, 45, +/* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If + positive, shift that token. If negative, reduce the rule which + number is the opposite. If zero, do what YYDEFACT says. + If YYTABLE_NINF, syntax error. */ +#define YYTABLE_NINF -8 +static const yytype_int8 yytable[] = +{ + 39, 40, 59, 60, 96, 97, 25, 61, 62, 63, + 64, 66, 67, 69, 70, 71, 72, 73, 74, 56, + 57, 58, 37, 59, 60, 77, 78, 79, 80, 81, + 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, + 92, -7, 1, 26, -7, 27, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 54, 55, 56, 57, 58, 28, 59, + 60, 99, 100, 29, 19, 106, 30, 31, 107, 108, + 32, 109, 20, 33, 110, 111, 34, 35, 36, 41, + 43, 76, 42, 0, 0, 116, 2, 3, 4, 5, + 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 19, 0, 0, 0, 0, 0, + 0, 0, 20, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 38, 0, 0, 0, 0, + 0, 0, 0, 0, 0, 0, 0, 19, 0, 0, + 0, 0, 0, 0, 0, 20, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 0, 59, 60, 0, 0, 0, 94, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 0, 57, 58, 0, 0, 0, 96, 42, 43, + 56, 57, 58, 0, 59, 60, 0, 0, 0, 98, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 0, 57, 58, 0, 0, 0, 101, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 0, 57, 58, 0, 0, - 0, 102, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 0, 57, 58, - 0, 0, 0, 112, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, - 57, 58, 0, 0, 73, 42, 43, 44, 45, 46, + 54, 55, 56, 57, 58, 0, 59, 60, 0, 0, + 0, 103, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 0, 59, 60, + 0, 0, 0, 104, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, + 59, 60, 0, 0, 0, 114, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 0, 59, 60, 0, 0, 75, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, - 0, 57, 58, 0, 0, 91, 42, 43, 44, 45, + 57, 58, 0, 59, 60, 0, 0, 93, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, - 56, 0, 57, 58, 0, 0, 93, 42, 43, 44, + 56, 57, 58, 0, 59, 60, 0, 0, 95, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 0, 57, 58, 0, 0, 99, 42, 43, + 55, 56, 57, 58, 0, 59, 60, 0, 0, 101, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, - 54, 55, 56, 0, 57, 58, 0, 0, 100, 42, - 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, - 53, 54, 55, 56, 0, 57, 58, 0, 0, 103, - 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, - 52, 53, 54, 55, 56, 0, 57, 58, 0, 0, - 110, 42, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 0, 57, 58, 0, - 0, 111, 42, 43, 44, 45, 46, 47, 48, 49, - 50, 51, 52, 53, 54, 55, 56, 0, 57, 58, - 0, 0, 113, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 0, 57, - 58, 0, 0, 115, 42, 43, 44, 45, 46, 47, - 48, 49, 50, 51, 52, 53, 54, 55, 56, 0, - 57, 58, 43, 44, 45, 46, 47, 48, 49, 50, - 51, 52, 53, 54, 55, 56, 0, 57, 58, 44, - 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, - 55, 56, 0, 57, 58,-32768,-32768,-32768,-32768,-32768, - -32768, 50, 51, 52, 53, 54, 55, 56, 0, 57, - 58 + 54, 55, 56, 57, 58, 0, 59, 60, 0, 0, + 102, 44, 45, 46, 47, 48, 49, 50, 51, 52, + 53, 54, 55, 56, 57, 58, 0, 59, 60, 0, + 0, 105, 44, 45, 46, 47, 48, 49, 50, 51, + 52, 53, 54, 55, 56, 57, 58, 0, 59, 60, + 0, 0, 112, 44, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 0, 59, + 60, 0, 0, 113, 44, 45, 46, 47, 48, 49, + 50, 51, 52, 53, 54, 55, 56, 57, 58, 0, + 59, 60, 0, 0, 115, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 0, 59, 60, 0, 0, 117, 44, 45, 46, 47, + 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, + 58, 0, 59, 60, 45, 46, 47, 48, 49, 50, + 51, 52, 53, 54, 55, 56, 57, 58, 0, 59, + 60, 46, 47, 48, 49, 50, 51, 52, 53, 54, + 55, 56, 57, 58, 0, 59, 60, -8, -8, -8, + -8, -8, -8, 52, 53, 54, 55, 56, 57, 58, + 0, 59, 60 }; -static const short yycheck[] = +static const yytype_int8 yycheck[] = { - 19, 20, 38, 39, 42, 43, 25, 26, 27, 28, - 29, 30, 31, 32, 33, 34, 35, 36, 42, 43, - 3, 41, 40, 42, 43, 44, 45, 46, 47, 48, - 49, 50, 51, 52, 53, 54, 55, 56, 57, 0, - 1, 41, 3, 41, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 32, 33, 34, 35, 36, 41, 38, 39, 41, - 3, 41, 33, 92, 41, 41, 95, 96, 41, 98, - 41, 41, 101, 102, 34, 35, 36, 41, 38, 39, - 3, 0, 0, 112, 5, 6, 7, 8, 9, 10, - 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, - 21, 21, -1, -1, -1, -1, -1, -1, -1, -1, - -1, -1, 33, -1, -1, -1, -1, -1, -1, -1, - 41, 9, 10, 11, 12, 13, 14, 15, 16, 17, - 18, 19, 20, 21, -1, -1, -1, -1, -1, -1, - -1, -1, -1, -1, -1, 33, -1, -1, -1, -1, - -1, -1, -1, 41, 22, 23, 24, 25, 26, 27, - 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, - 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, + 19, 20, 38, 39, 42, 43, 3, 26, 27, 28, + 29, 30, 31, 32, 33, 34, 35, 36, 37, 34, + 35, 36, 40, 38, 39, 44, 45, 46, 47, 48, + 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, + 59, 0, 1, 41, 3, 41, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, 32, 33, 34, 35, 36, 41, 38, + 39, 42, 43, 41, 33, 94, 41, 41, 97, 98, + 41, 100, 41, 41, 103, 104, 41, 41, 41, 0, + 3, 3, 22, -1, -1, 114, 5, 6, 7, 8, + 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, + 19, 20, 21, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, 33, -1, -1, -1, -1, -1, + -1, -1, 41, 9, 10, 11, 12, 13, 14, 15, + 16, 17, 18, 19, 20, 21, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 33, -1, -1, + -1, -1, -1, -1, -1, 41, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, @@ -449,9 +830,7 @@ 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, - 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, - 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, - -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, + 38, 39, -1, -1, -1, 43, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, @@ -470,209 +849,134 @@ 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, - 38, 39, 23, 24, 25, 26, 27, 28, 29, 30, - 31, 32, 33, 34, 35, 36, -1, 38, 39, 24, - 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, - 35, 36, -1, 38, 39, 24, 25, 26, 27, 28, + 38, 39, -1, -1, 42, 22, 23, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + -1, 38, 39, -1, -1, 42, 22, 23, 24, 25, + 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, + 36, -1, 38, 39, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, -1, 38, - 39 + 39, 24, 25, 26, 27, 28, 29, 30, 31, 32, + 33, 34, 35, 36, -1, 38, 39, 24, 25, 26, + 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, + -1, 38, 39 }; -/* -*-C-*- Note some compilers choke on comments on `#line' lines. */ -#line 3 "/usr/share/bison/bison.simple" - -/* Skeleton output parser for bison, - - Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software - Foundation, Inc. - - This program is free software; you can redistribute it and/or modify it - under the terms of the GNU General Public License as published by the Free - Software Foundation; either version 3, or (at your option) any later - version. - - This program is distributed in the hope that it will be useful, but WITHOUT - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for - more details. - - You should have received a copy of the GNU General Public License along with - this program. If not, see http://www.gnu.org/licenses/. */ - -/* As a special exception, when this file is copied by Bison into a - Bison output file, you may use that output file without restriction. - This special exception was added by the Free Software Foundation - in version 1.24 of Bison. */ - -/* This is the parser code that is written into each bison parser when - the %semantic_parser declaration is not specified in the grammar. - It was written by Richard Stallman by simplifying the hairy parser - used when %semantic_parser is specified. */ - -/* All symbols defined below should begin with yy or YY, to avoid - infringing on user name space. This should be done even for local - variables, as they might otherwise be expanded by user macros. - There are some unavoidable exceptions within include files to - define necessary library symbols; they are noted "INFRINGES ON - USER NAME SPACE" below. */ - -#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE) - -/* The parser invokes alloca or malloc; define the necessary symbols. */ - -# if YYSTACK_USE_ALLOCA -# define YYSTACK_ALLOC alloca -# else -# ifndef YYSTACK_USE_ALLOCA -# if defined (alloca) || defined (_ALLOCA_H) -# define YYSTACK_ALLOC alloca -# else -# ifdef __GNUC__ -# define YYSTACK_ALLOC __builtin_alloca -# endif -# endif -# endif -# endif - -# ifdef YYSTACK_ALLOC - /* Pacify GCC's `empty if-body' warning. */ -# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0) -# else -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -# define YYSTACK_ALLOC malloc -# define YYSTACK_FREE free -# endif -/* A type that is properly aligned for any stack member. */ -union yyalloc -{ - short yyss; - YYSTYPE yyvs; -# if YYLSP_NEEDED - YYLTYPE yyls; -# endif +/* YYSTOS[STATE-NUM] -- The (internal number of the) accessing + symbol of state STATE-NUM. */ +static const yytype_uint8 yystos[] = +{ + 0, 1, 5, 6, 7, 8, 9, 10, 11, 12, + 13, 14, 15, 16, 17, 18, 19, 20, 21, 33, + 41, 45, 46, 47, 48, 3, 41, 41, 41, 41, + 41, 41, 41, 41, 41, 41, 41, 40, 21, 48, + 48, 0, 47, 3, 22, 23, 24, 25, 26, 27, + 28, 29, 30, 31, 32, 33, 34, 35, 36, 38, + 39, 48, 48, 48, 48, 49, 48, 48, 50, 48, + 48, 48, 48, 48, 48, 42, 3, 48, 48, 48, + 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, + 48, 48, 48, 42, 43, 42, 42, 43, 43, 42, + 43, 42, 42, 43, 43, 42, 48, 48, 48, 48, + 48, 48, 42, 42, 43, 42, 48, 42 }; -/* The size of the maximum gap between one aligned stack and the next. */ -# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1) - -/* The size of an array large to enough to hold all stacks, each with - N elements. */ -# if YYLSP_NEEDED -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \ - + 2 * YYSTACK_GAP_MAX) -# else -# define YYSTACK_BYTES(N) \ - ((N) * (sizeof (short) + sizeof (YYSTYPE)) \ - + YYSTACK_GAP_MAX) -# endif - -/* Relocate the TYPE STACK from its old location to the new one. The - local variables YYSIZE and YYSTACKSIZE give the old and new number of - elements in the stack, and YYPTR gives the new location of the - stack. Advance YYPTR to a properly aligned location for the next - stack. */ -# define YYSTACK_RELOCATE(Type, Stack) \ - do \ - { \ - YYSIZE_T yynewbytes; \ - yymemcpy ((char *) yyptr, (char *) (Stack), \ - yysize * (YYSIZE_T) sizeof (Type)); \ - Stack = &yyptr->Stack; \ - yynewbytes = yystacksize * sizeof (Type) + YYSTACK_GAP_MAX; \ - yyptr += yynewbytes / sizeof (*yyptr); \ - } \ - while (0) - -#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */ - - -#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__) -# define YYSIZE_T __SIZE_TYPE__ -#endif -#if ! defined (YYSIZE_T) && defined (size_t) -# define YYSIZE_T size_t -#endif -#if ! defined (YYSIZE_T) -# if defined (__STDC__) || defined (__cplusplus) -# include /* INFRINGES ON USER NAME SPACE */ -# define YYSIZE_T size_t -# endif -#endif -#if ! defined (YYSIZE_T) -# define YYSIZE_T unsigned int -#endif - #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) -#define YYEMPTY -2 +#define YYEMPTY (-2) #define YYEOF 0 + #define YYACCEPT goto yyacceptlab -#define YYABORT goto yyabortlab -#define YYERROR goto yyerrlab1 +#define YYABORT goto yyabortlab +#define YYERROR goto yyerrorlab + + /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. - Once GCC version 2 has supplanted version 1, this can go. */ + Once GCC version 2 has supplanted version 1, this can go. However, + YYFAIL appears to be in use. Nevertheless, it is formally deprecated + in Bison 2.4.2's NEWS entry, where a plan to phase it out is + discussed. */ + #define YYFAIL goto yyerrlab +#if defined YYFAIL + /* This is here to suppress warnings from the GCC cpp's + -Wunused-macros. Normally we don't worry about that warning, but + some users do, and we want to make it easy for users to remove + YYFAIL uses, which will produce warnings from Bison 2.5. */ +#endif + #define YYRECOVERING() (!!yyerrstatus) + #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ - yychar1 = YYTRANSLATE (yychar); \ - YYPOPSTACK; \ + yytoken = YYTRANSLATE (yychar); \ + YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ - yyerror ("syntax error: cannot back up"); \ + yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ -while (0) +while (YYID (0)) + #define YYTERROR 1 #define YYERRCODE 256 -/* YYLLOC_DEFAULT -- Compute the default location (before the actions - are run). - - When YYLLOC_DEFAULT is run, CURRENT is set the location of the - first token. By default, to implement support for ranges, extend - its range to the last symbol. */ +/* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. + If N is 0, then set CURRENT to the empty location which ends + the previous symbol: RHS[0] (always defined). */ +#define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT -# define YYLLOC_DEFAULT(Current, Rhs, N) \ - Current.last_line = Rhs[N].last_line; \ - Current.last_column = Rhs[N].last_column; +# define YYLLOC_DEFAULT(Current, Rhs, N) \ + do \ + if (YYID (N)) \ + { \ + (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ + (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ + (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ + (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ + } \ + else \ + { \ + (Current).first_line = (Current).last_line = \ + YYRHSLOC (Rhs, 0).last_line; \ + (Current).first_column = (Current).last_column = \ + YYRHSLOC (Rhs, 0).last_column; \ + } \ + while (YYID (0)) #endif -/* YYLEX -- calling `yylex' with the right arguments. */ +/* YY_LOCATION_PRINT -- Print the location on the stream. + This macro was not mandated originally: define only if we know + we won't break user code: when these are the locations we know. */ + +#ifndef YY_LOCATION_PRINT +# if defined YYLTYPE_IS_TRIVIAL && YYLTYPE_IS_TRIVIAL +# define YY_LOCATION_PRINT(File, Loc) \ + fprintf (File, "%d.%d-%d.%d", \ + (Loc).first_line, (Loc).first_column, \ + (Loc).last_line, (Loc).last_column) +# else +# define YY_LOCATION_PRINT(File, Loc) ((void) 0) +# endif +#endif -#if YYPURE -# if YYLSP_NEEDED -# ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM) -# else -# define YYLEX yylex (&yylval, &yylloc) -# endif -# else /* !YYLSP_NEEDED */ -# ifdef YYLEX_PARAM -# define YYLEX yylex (&yylval, YYLEX_PARAM) -# else -# define YYLEX yylex (&yylval) -# endif -# endif /* !YYLSP_NEEDED */ -#else /* !YYPURE */ -# define YYLEX yylex () -#endif /* !YYPURE */ +/* YYLEX -- calling `yylex' with the right arguments. */ + +#ifdef YYLEX_PARAM +# define YYLEX yylex (YYLEX_PARAM) +#else +# define YYLEX yylex () +#endif /* Enable debugging if requested. */ #if YYDEBUG @@ -686,14 +990,158 @@ do { \ if (yydebug) \ YYFPRINTF Args; \ -} while (0) +} while (YYID (0)) + +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ +do { \ + if (yydebug) \ + { \ + YYFPRINTF (stderr, "%s ", Title); \ + yy_symbol_print (stderr, \ + Type, Value); \ + YYFPRINTF (stderr, "\n"); \ + } \ +} while (YYID (0)) + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_value_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (!yyvaluep) + return; +# ifdef YYPRINT + if (yytype < YYNTOKENS) + YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); +# else + YYUSE (yyoutput); +# endif + switch (yytype) + { + default: + break; + } +} + + +/*--------------------------------. +| Print this symbol on YYOUTPUT. | +`--------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) +#else +static void +yy_symbol_print (yyoutput, yytype, yyvaluep) + FILE *yyoutput; + int yytype; + YYSTYPE const * const yyvaluep; +#endif +{ + if (yytype < YYNTOKENS) + YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); + else + YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); + + yy_symbol_value_print (yyoutput, yytype, yyvaluep); + YYFPRINTF (yyoutput, ")"); +} + +/*------------------------------------------------------------------. +| yy_stack_print -- Print the state stack from its BOTTOM up to its | +| TOP (included). | +`------------------------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) +#else +static void +yy_stack_print (yybottom, yytop) + yytype_int16 *yybottom; + yytype_int16 *yytop; +#endif +{ + YYFPRINTF (stderr, "Stack now"); + for (; yybottom <= yytop; yybottom++) + { + int yybot = *yybottom; + YYFPRINTF (stderr, " %d", yybot); + } + YYFPRINTF (stderr, "\n"); +} + +# define YY_STACK_PRINT(Bottom, Top) \ +do { \ + if (yydebug) \ + yy_stack_print ((Bottom), (Top)); \ +} while (YYID (0)) + + +/*------------------------------------------------. +| Report that the YYRULE is going to be reduced. | +`------------------------------------------------*/ + +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yy_reduce_print (YYSTYPE *yyvsp, int yyrule) +#else +static void +yy_reduce_print (yyvsp, yyrule) + YYSTYPE *yyvsp; + int yyrule; +#endif +{ + int yynrhs = yyr2[yyrule]; + int yyi; + unsigned long int yylno = yyrline[yyrule]; + YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", + yyrule - 1, yylno); + /* The symbols being reduced. */ + for (yyi = 0; yyi < yynrhs; yyi++) + { + YYFPRINTF (stderr, " $%d = ", yyi + 1); + yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], + &(yyvsp[(yyi + 1) - (yynrhs)]) + ); + YYFPRINTF (stderr, "\n"); + } +} + +# define YY_REDUCE_PRINT(Rule) \ +do { \ + if (yydebug) \ + yy_reduce_print (yyvsp, Rule); \ +} while (YYID (0)) + /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) +# define YY_SYMBOL_PRINT(Title, Type, Value, Location) +# define YY_STACK_PRINT(Bottom, Top) +# define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ + /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 @@ -703,86 +1151,59 @@ if the built-in stack extension method is used). Do not make this value too large; the results are undefined if - SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH) + YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ -#if YYMAXDEPTH == 0 -# undef YYMAXDEPTH -#endif - #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif - -#if ! defined (yyoverflow) && ! defined (yymemcpy) -# if __GNUC__ > 1 /* GNU C and GNU C++ define this. */ -# define yymemcpy __builtin_memcpy -# else /* not GNU C or C++ */ -/* This is the most reliable way to avoid incompatibilities - in available built-in functions on various systems. */ -static void -# if defined (__STDC__) || defined (__cplusplus) -yymemcpy (char *yyto, const char *yyfrom, YYSIZE_T yycount) -# else -yymemcpy (yyto, yyfrom, yycount) - char *yyto; - const char *yyfrom; - YYSIZE_T yycount; -# endif -{ - register const char *yyf = yyfrom; - register char *yyt = yyto; - register YYSIZE_T yyi = yycount; - - while (yyi-- != 0) - *yyt++ = *yyf++; -} -# endif -#endif + -#ifdef YYERROR_VERBOSE +#if YYERROR_VERBOSE # ifndef yystrlen -# if defined (__GLIBC__) && defined (_STRING_H) +# if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static YYSIZE_T -# if defined (__STDC__) || defined (__cplusplus) yystrlen (const char *yystr) -# else +#else +static YYSIZE_T yystrlen (yystr) - const char *yystr; -# endif + const char *yystr; +#endif { - register const char *yys = yystr; - - while (*yys++ != '\0') + YYSIZE_T yylen; + for (yylen = 0; yystr[yylen]; yylen++) continue; - - return yys - yystr - 1; + return yylen; } # endif # endif # ifndef yystpcpy -# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE) +# if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) static char * -# if defined (__STDC__) || defined (__cplusplus) yystpcpy (char *yydest, const char *yysrc) -# else +#else +static char * yystpcpy (yydest, yysrc) - char *yydest; - const char *yysrc; -# endif + char *yydest; + const char *yysrc; +#endif { - register char *yyd = yydest; - register const char *yys = yysrc; + char *yyd = yydest; + const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; @@ -791,149 +1212,314 @@ } # endif # endif -#endif + +# ifndef yytnamerr +/* Copy to YYRES the contents of YYSTR after stripping away unnecessary + quotes and backslashes, so that it's suitable for yyerror. The + heuristic is that double-quoting is unnecessary unless the string + contains an apostrophe, a comma, or backslash (other than + backslash-backslash). YYSTR is taken from yytname. If YYRES is + null, do not copy; instead, return the length of what the result + would have been. */ +static YYSIZE_T +yytnamerr (char *yyres, const char *yystr) +{ + if (*yystr == '"') + { + YYSIZE_T yyn = 0; + char const *yyp = yystr; + + for (;;) + switch (*++yyp) + { + case '\'': + case ',': + goto do_not_strip_quotes; + + case '\\': + if (*++yyp != '\\') + goto do_not_strip_quotes; + /* Fall through. */ + default: + if (yyres) + yyres[yyn] = *yyp; + yyn++; + break; + + case '"': + if (yyres) + yyres[yyn] = '\0'; + return yyn; + } + do_not_strip_quotes: ; + } + + if (! yyres) + return yystrlen (yystr); + + return yystpcpy (yyres, yystr) - yyres; +} +# endif + +/* Copy into YYRESULT an error message about the unexpected token + YYCHAR while in state YYSTATE. Return the number of bytes copied, + including the terminating null byte. If YYRESULT is null, do not + copy anything; just return the number of bytes that would be + copied. As a special case, return 0 if an ordinary "syntax error" + message will do. Return YYSIZE_MAXIMUM if overflow occurs during + size calculation. */ +static YYSIZE_T +yysyntax_error (char *yyresult, int yystate, int yychar) +{ + int yyn = yypact[yystate]; + + if (! (YYPACT_NINF < yyn && yyn <= YYLAST)) + return 0; + else + { + int yytype = YYTRANSLATE (yychar); + YYSIZE_T yysize0 = yytnamerr (0, yytname[yytype]); + YYSIZE_T yysize = yysize0; + YYSIZE_T yysize1; + int yysize_overflow = 0; + enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; + char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; + int yyx; + +# if 0 + /* This is so xgettext sees the translatable formats that are + constructed on the fly. */ + YY_("syntax error, unexpected %s"); + YY_("syntax error, unexpected %s, expecting %s"); + YY_("syntax error, unexpected %s, expecting %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s"); + YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s"); +# endif + char *yyfmt; + char const *yyf; + static char const yyunexpected[] = "syntax error, unexpected %s"; + static char const yyexpecting[] = ", expecting %s"; + static char const yyor[] = " or %s"; + char yyformat[sizeof yyunexpected + + sizeof yyexpecting - 1 + + ((YYERROR_VERBOSE_ARGS_MAXIMUM - 2) + * (sizeof yyor - 1))]; + char const *yyprefix = yyexpecting; + + /* Start YYX at -YYN if negative to avoid negative indexes in + YYCHECK. */ + int yyxbegin = yyn < 0 ? -yyn : 0; + + /* Stay within bounds of both yycheck and yytname. */ + int yychecklim = YYLAST - yyn + 1; + int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; + int yycount = 1; + + yyarg[0] = yytname[yytype]; + yyfmt = yystpcpy (yyformat, yyunexpected); + + for (yyx = yyxbegin; yyx < yyxend; ++yyx) + if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR) + { + if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) + { + yycount = 1; + yysize = yysize0; + yyformat[sizeof yyunexpected - 1] = '\0'; + break; + } + yyarg[yycount++] = yytname[yyx]; + yysize1 = yysize + yytnamerr (0, yytname[yyx]); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + yyfmt = yystpcpy (yyfmt, yyprefix); + yyprefix = yyor; + } + + yyf = YY_(yyformat); + yysize1 = yysize + yystrlen (yyf); + yysize_overflow |= (yysize1 < yysize); + yysize = yysize1; + + if (yysize_overflow) + return YYSIZE_MAXIMUM; + + if (yyresult) + { + /* Avoid sprintf, as that infringes on the user's name space. + Don't have undefined behavior even if the translation + produced a string with the wrong number of "%s"s. */ + char *yyp = yyresult; + int yyi = 0; + while ((*yyp = *yyf) != '\0') + { + if (*yyp == '%' && yyf[1] == 's' && yyi < yycount) + { + yyp += yytnamerr (yyp, yyarg[yyi++]); + yyf += 2; + } + else + { + yyp++; + yyf++; + } + } + } + return yysize; + } +} +#endif /* YYERROR_VERBOSE */ -#line 319 "/usr/share/bison/bison.simple" +/*-----------------------------------------------. +| Release the memory associated to this symbol. | +`-----------------------------------------------*/ + +/*ARGSUSED*/ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +static void +yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) +#else +static void +yydestruct (yymsg, yytype, yyvaluep) + const char *yymsg; + int yytype; + YYSTYPE *yyvaluep; +#endif +{ + YYUSE (yyvaluep); -/* The user can define YYPARSE_PARAM as the name of an argument to be passed - into yyparse. The argument should have type void *. - It should actually point to an object. - Grammar actions can access the variable by casting it - to the proper pointer type. */ + if (!yymsg) + yymsg = "Deleting"; + YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); + + switch (yytype) + { + + default: + break; + } +} +/* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM -# if defined (__STDC__) || defined (__cplusplus) -# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM -# define YYPARSE_PARAM_DECL -# else -# define YYPARSE_PARAM_ARG YYPARSE_PARAM -# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM; -# endif -#else /* !YYPARSE_PARAM */ -# define YYPARSE_PARAM_ARG -# define YYPARSE_PARAM_DECL -#endif /* !YYPARSE_PARAM */ - -/* Prevent warning if -Wstrict-prototypes. */ -#ifdef __GNUC__ -# ifdef YYPARSE_PARAM -int yyparse (void *); -# else +#if defined __STDC__ || defined __cplusplus +int yyparse (void *YYPARSE_PARAM); +#else +int yyparse (); +#endif +#else /* ! YYPARSE_PARAM */ +#if defined __STDC__ || defined __cplusplus int yyparse (void); -# endif +#else +int yyparse (); #endif +#endif /* ! YYPARSE_PARAM */ -/* YY_DECL_VARIABLES -- depending whether we use a pure parser, - variables are global, or local to YYPARSE. */ -#define YY_DECL_NON_LSP_VARIABLES \ -/* The lookahead symbol. */ \ -int yychar; \ - \ -/* The semantic value of the lookahead symbol. */ \ -YYSTYPE yylval; \ - \ -/* Number of parse errors so far. */ \ -int yynerrs; +/* The lookahead symbol. */ +int yychar; -#if YYLSP_NEEDED -# define YY_DECL_VARIABLES \ -YY_DECL_NON_LSP_VARIABLES \ - \ -/* Location data for the lookahead symbol. */ \ -YYLTYPE yylloc; -#else -# define YY_DECL_VARIABLES \ -YY_DECL_NON_LSP_VARIABLES -#endif +/* The semantic value of the lookahead symbol. */ +YYSTYPE yylval; +/* Number of syntax errors so far. */ +int yynerrs; -/* If nonreentrant, generate the variables here. */ -#if !YYPURE -YY_DECL_VARIABLES -#endif /* !YYPURE */ -int -yyparse (YYPARSE_PARAM_ARG) - YYPARSE_PARAM_DECL -{ - /* If reentrant, generate the variables here. */ -#if YYPURE - YY_DECL_VARIABLES -#endif /* !YYPURE */ +/*-------------------------. +| yyparse or yypush_parse. | +`-------------------------*/ - register int yystate; - register int yyn; - int yyresult; - /* Number of tokens to shift before error messages enabled. */ - int yyerrstatus; - /* Lookahead token as an internal (translated) token number. */ - int yychar1 = 0; +#ifdef YYPARSE_PARAM +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void *YYPARSE_PARAM) +#else +int +yyparse (YYPARSE_PARAM) + void *YYPARSE_PARAM; +#endif +#else /* ! YYPARSE_PARAM */ +#if (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +int +yyparse (void) +#else +int +yyparse () - /* Three stacks and their tools: - `yyss': related to states, - `yyvs': related to semantic values, - `yyls': related to locations. +#endif +#endif +{ - Refer to the stacks thru separate pointers, to allow yyoverflow - to reallocate them elsewhere. */ - /* The state stack. */ - short yyssa[YYINITDEPTH]; - short *yyss = yyssa; - register short *yyssp; + int yystate; + /* Number of tokens to shift before error messages enabled. */ + int yyerrstatus; - /* The semantic value stack. */ - YYSTYPE yyvsa[YYINITDEPTH]; - YYSTYPE *yyvs = yyvsa; - register YYSTYPE *yyvsp; + /* The stacks and their tools: + `yyss': related to states. + `yyvs': related to semantic values. -#if YYLSP_NEEDED - /* The location stack. */ - YYLTYPE yylsa[YYINITDEPTH]; - YYLTYPE *yyls = yylsa; - YYLTYPE *yylsp; -#endif + Refer to the stacks thru separate pointers, to allow yyoverflow + to reallocate them elsewhere. */ -#if YYLSP_NEEDED -# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--) -#else -# define YYPOPSTACK (yyvsp--, yyssp--) -#endif + /* The state stack. */ + yytype_int16 yyssa[YYINITDEPTH]; + yytype_int16 *yyss; + yytype_int16 *yyssp; - YYSIZE_T yystacksize = YYINITDEPTH; + /* The semantic value stack. */ + YYSTYPE yyvsa[YYINITDEPTH]; + YYSTYPE *yyvs; + YYSTYPE *yyvsp; + YYSIZE_T yystacksize; + int yyn; + int yyresult; + /* Lookahead token as an internal (translated) token number. */ + int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; -#if YYLSP_NEEDED - YYLTYPE yyloc; -#endif - /* When reducing, the number of symbols on the RHS of the reduced - rule. */ - int yylen; +#if YYERROR_VERBOSE + /* Buffer for error messages, and its allocated size. */ + char yymsgbuf[128]; + char *yymsg = yymsgbuf; + YYSIZE_T yymsg_alloc = sizeof yymsgbuf; +#endif + +#define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) + + /* The number of symbols on the RHS of the reduced rule. + Keep to zero when no symbol should be popped. */ + int yylen = 0; + + yytoken = 0; + yyss = yyssa; + yyvs = yyvsa; + yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; - yychar = YYEMPTY; /* Cause a token to be read. */ + yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ - yyssp = yyss; yyvsp = yyvs; -#if YYLSP_NEEDED - yylsp = yyls; -#endif + goto yysetstate; /*------------------------------------------------------------. @@ -941,191 +1527,141 @@ `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks - have just been pushed. so pushing a state here evens the stacks. - */ + have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; - if (yyssp >= yyss + yystacksize - 1) + if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { - /* Give user a chance to reallocate the stack. Use copies of + /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; - short *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the - data in use in that stack, in bytes. */ -# if YYLSP_NEEDED - YYLTYPE *yyls1 = yyls; - /* This used to be a conditional around just the two extra args, - but that might be undefined if yyoverflow is a macro. */ - yyoverflow ("parser stack overflow", - &yyss1, yysize * sizeof (*yyssp), - &yyvs1, yysize * sizeof (*yyvsp), - &yyls1, yysize * sizeof (*yylsp), - &yystacksize); - yyls = yyls1; -# else - yyoverflow ("parser stack overflow", + data in use in that stack, in bytes. This used to be a + conditional around just the two extra args, but that might + be undefined if yyoverflow is a macro. */ + yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); -# endif + yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ +# ifndef YYSTACK_RELOCATE + goto yyexhaustedlab; +# else /* Extend the stack our own way. */ - if (yystacksize >= YYMAXDEPTH) - goto yyoverflowlab; + if (YYMAXDEPTH <= yystacksize) + goto yyexhaustedlab; yystacksize *= 2; - if (yystacksize > YYMAXDEPTH) + if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { - short *yyss1 = yyss; + yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) - goto yyoverflowlab; - YYSTACK_RELOCATE (short, yyss); - YYSTACK_RELOCATE (YYSTYPE, yyvs); -# if YYLSP_NEEDED - YYSTACK_RELOCATE (YYLTYPE, yyls); -# endif -# undef YYSTACK_RELOCATE + goto yyexhaustedlab; + YYSTACK_RELOCATE (yyss_alloc, yyss); + YYSTACK_RELOCATE (yyvs_alloc, yyvs); +# undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } +# endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; -#if YYLSP_NEEDED - yylsp = yyls + yysize - 1; -#endif YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); - if (yyssp >= yyss + yystacksize - 1) + if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); - goto yybackup; + if (yystate == YYFINAL) + YYACCEPT; + goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: -/* Do appropriate processing given the current state. */ -/* Read a lookahead token if we need one and don't already have one. */ -/* yyresume: */ + /* Do appropriate processing given the current state. Read a + lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ - yyn = yypact[yystate]; - if (yyn == YYFLAG) + if (yyn == YYPACT_NINF) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ - /* yychar is either YYEMPTY or YYEOF - or a valid token in external form. */ - + /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } - /* Convert token to internal form (in yychar1) for indexing tables with */ - - if (yychar <= 0) /* This means end of input. */ + if (yychar <= YYEOF) { - yychar1 = 0; - yychar = YYEOF; /* Don't call YYLEX any more */ - + yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { - yychar1 = YYTRANSLATE (yychar); - -#if YYDEBUG - /* We have to keep this `#if YYDEBUG', since we use variables - which are defined only if `YYDEBUG' is set. */ - if (yydebug) - { - YYFPRINTF (stderr, "Next token is %d (%s", - yychar, yytname[yychar1]); - /* Give the individual parser a way to print the precise - meaning of a token, for further debugging info. */ -# ifdef YYPRINT - YYPRINT (stderr, yychar, yylval); -# endif - YYFPRINTF (stderr, ")\n"); - } -#endif + yytoken = YYTRANSLATE (yychar); + YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } - yyn += yychar1; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1) + /* If the proper action on seeing token YYTOKEN is to reduce or to + detect an error, take that action. */ + yyn += yytoken; + if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; - yyn = yytable[yyn]; - - /* yyn is what to do for this token type in this state. - Negative => reduce, -yyn is rule number. - Positive => shift, yyn is new state. - New state is final state => don't bother to shift, - just return success. - 0, or most negative number => error. */ - - if (yyn < 0) + if (yyn <= 0) { - if (yyn == YYFLAG) + if (yyn == 0 || yyn == YYTABLE_NINF) goto yyerrlab; yyn = -yyn; goto yyreduce; } - else if (yyn == 0) - goto yyerrlab; - - if (yyn == YYFINAL) - YYACCEPT; - - /* Shift the lookahead token. */ - YYDPRINTF ((stderr, "Shifting token %d (%s), ", - yychar, yytname[yychar1])); - - /* Discard the token being shifted unless it is eof. */ - if (yychar != YYEOF) - yychar = YYEMPTY; - - *++yyvsp = yylval; -#if YYLSP_NEEDED - *++yylsp = yylloc; -#endif /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; + /* Shift the lookahead token. */ + YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); + + /* Discard the shifted token. */ + yychar = YYEMPTY; + yystate = yyn; + *++yyvsp = yylval; + goto yynewstate; @@ -1149,248 +1685,327 @@ /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. - Otherwise, the following line sets YYVAL to the semantic value of - the lookahead token. This behavior is undocumented and Bison + Otherwise, the following line sets YYVAL to garbage. + This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; -#if YYLSP_NEEDED - /* Similarly for the default location. Let the user run additional - commands if for instance locations are ranges. */ - yyloc = yylsp[1-yylen]; - YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen); -#endif -#if YYDEBUG - /* We have to keep this `#if YYDEBUG', since we use variables which - are defined only if `YYDEBUG' is set. */ - if (yydebug) + YY_REDUCE_PRINT (yyn); + switch (yyn) { - int yyi; + case 6: - YYFPRINTF (stderr, "Reducing via rule %d (line %d), ", - yyn, yyrline[yyn]); - - /* Print the symbols being reduced, and their result. */ - for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++) - YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]); - YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]); - } -#endif +/* Line 1464 of yacc.c */ +#line 173 "calc.y" + { sp = stack[0]; yyerrok; } + break; - switch (yyn) { + case 8: -case 5: -#line 174 "calc.y" -{ sp = stack[0]; yyerrok; } - break; -case 7: -#line 178 "calc.y" -{ +/* Line 1464 of yacc.c */ +#line 177 "calc.y" + { mpz_out_str (stdout, obase, sp); putchar ('\n'); sp--; CHECK_EMPTY (); } break; -case 8: -#line 183 "calc.y" -{ - CHECK_VARIABLE (yyvsp[-2].var); - mpz_swap (variable[yyvsp[-2].var], sp); + + case 9: + +/* Line 1464 of yacc.c */ +#line 182 "calc.y" + { + CHECK_VARIABLE ((yyvsp[(1) - (3)].var)); + mpz_swap (variable[(yyvsp[(1) - (3)].var)], sp); sp--; CHECK_EMPTY (); } break; -case 9: + + case 10: + +/* Line 1464 of yacc.c */ +#line 188 "calc.y" + { calc_help (); } + break; + + case 11: + +/* Line 1464 of yacc.c */ #line 189 "calc.y" -{ calc_help (); } + { ibase = 16; obase = -16; } break; -case 10: + + case 12: + +/* Line 1464 of yacc.c */ #line 190 "calc.y" -{ ibase = 16; obase = -16; } + { ibase = 0; obase = 10; } break; -case 11: + + case 13: + +/* Line 1464 of yacc.c */ #line 191 "calc.y" -{ ibase = 0; obase = 10; } + { exit (0); } break; -case 12: -#line 192 "calc.y" -{ exit (0); } + + case 15: + +/* Line 1464 of yacc.c */ +#line 198 "calc.y" + { sp--; mpz_add (sp, sp, sp+1); } break; -case 14: + + case 16: + +/* Line 1464 of yacc.c */ #line 199 "calc.y" -{ sp--; mpz_add (sp, sp, sp+1); } + { sp--; mpz_sub (sp, sp, sp+1); } break; -case 15: + + case 17: + +/* Line 1464 of yacc.c */ #line 200 "calc.y" -{ sp--; mpz_sub (sp, sp, sp+1); } + { sp--; mpz_mul (sp, sp, sp+1); } break; -case 16: + + case 18: + +/* Line 1464 of yacc.c */ #line 201 "calc.y" -{ sp--; mpz_mul (sp, sp, sp+1); } + { sp--; mpz_fdiv_q (sp, sp, sp+1); } break; -case 17: + + case 19: + +/* Line 1464 of yacc.c */ #line 202 "calc.y" -{ sp--; mpz_fdiv_q (sp, sp, sp+1); } + { sp--; mpz_fdiv_r (sp, sp, sp+1); } break; -case 18: + + case 20: + +/* Line 1464 of yacc.c */ #line 203 "calc.y" -{ sp--; mpz_fdiv_r (sp, sp, sp+1); } + { CHECK_UI ("Exponent", sp); + sp--; mpz_pow_ui (sp, sp, mpz_get_ui (sp+1)); } + break; + + case 21: + +/* Line 1464 of yacc.c */ +#line 205 "calc.y" + { CHECK_UI ("Shift count", sp); + sp--; mpz_mul_2exp (sp, sp, mpz_get_ui (sp+1)); } + break; + + case 22: + +/* Line 1464 of yacc.c */ +#line 207 "calc.y" + { CHECK_UI ("Shift count", sp); + sp--; mpz_fdiv_q_2exp (sp, sp, mpz_get_ui (sp+1)); } + break; + + case 23: + +/* Line 1464 of yacc.c */ +#line 209 "calc.y" + { CHECK_UI ("Factorial", sp); + mpz_fac_ui (sp, mpz_get_ui (sp)); } + break; + + case 24: + +/* Line 1464 of yacc.c */ +#line 211 "calc.y" + { mpz_neg (sp, sp); } break; -case 19: -#line 204 "calc.y" -{ CHECK_UI ("Exponent", sp); - sp--; mpz_pow_ui (sp, sp, mpz_get_ui (sp+1)); } - break; -case 20: -#line 206 "calc.y" -{ CHECK_UI ("Shift count", sp); - sp--; mpz_mul_2exp (sp, sp, mpz_get_ui (sp+1)); } - break; -case 21: -#line 208 "calc.y" -{ CHECK_UI ("Shift count", sp); - sp--; mpz_fdiv_q_2exp (sp, sp, mpz_get_ui (sp+1)); } - break; -case 22: -#line 210 "calc.y" -{ CHECK_UI ("Factorial", sp); - mpz_fac_ui (sp, mpz_get_ui (sp)); } - break; -case 23: -#line 212 "calc.y" -{ mpz_neg (sp, sp); } + + case 25: + +/* Line 1464 of yacc.c */ +#line 213 "calc.y" + { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) < 0); } break; -case 24: + + case 26: + +/* Line 1464 of yacc.c */ #line 214 "calc.y" -{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) < 0); } + { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) <= 0); } break; -case 25: + + case 27: + +/* Line 1464 of yacc.c */ #line 215 "calc.y" -{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) <= 0); } + { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) == 0); } break; -case 26: + + case 28: + +/* Line 1464 of yacc.c */ #line 216 "calc.y" -{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) == 0); } + { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) != 0); } break; -case 27: + + case 29: + +/* Line 1464 of yacc.c */ #line 217 "calc.y" -{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) != 0); } + { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) >= 0); } break; -case 28: + + case 30: + +/* Line 1464 of yacc.c */ #line 218 "calc.y" -{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) >= 0); } + { sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) > 0); } break; -case 29: -#line 219 "calc.y" -{ sp--; mpz_set_ui (sp, mpz_cmp (sp, sp+1) > 0); } + + case 31: + +/* Line 1464 of yacc.c */ +#line 220 "calc.y" + { sp--; mpz_set_ui (sp, mpz_sgn (sp) && mpz_sgn (sp+1)); } break; -case 30: + + case 32: + +/* Line 1464 of yacc.c */ #line 221 "calc.y" -{ sp--; mpz_set_ui (sp, mpz_sgn (sp) && mpz_sgn (sp+1)); } + { sp--; mpz_set_ui (sp, mpz_sgn (sp) || mpz_sgn (sp+1)); } break; -case 31: -#line 222 "calc.y" -{ sp--; mpz_set_ui (sp, mpz_sgn (sp) || mpz_sgn (sp+1)); } + + case 33: + +/* Line 1464 of yacc.c */ +#line 223 "calc.y" + { mpz_abs (sp, sp); } break; -case 32: + + case 34: + +/* Line 1464 of yacc.c */ #line 224 "calc.y" -{ mpz_abs (sp, sp); } + { sp--; CHECK_UI ("Binomial base", sp+1); + mpz_bin_ui (sp, sp, mpz_get_ui (sp+1)); } + break; + + case 35: + +/* Line 1464 of yacc.c */ +#line 226 "calc.y" + { CHECK_UI ("Fibonacci", sp); + mpz_fib_ui (sp, mpz_get_ui (sp)); } + break; + + case 37: + +/* Line 1464 of yacc.c */ +#line 229 "calc.y" + { sp--; mpz_set_si (sp, + mpz_kronecker (sp, sp+1)); } break; -case 33: -#line 225 "calc.y" -{ sp--; CHECK_UI ("Binomial base", sp+1); - mpz_bin_ui (sp, sp, mpz_get_ui (sp+1)); } - break; -case 34: -#line 227 "calc.y" -{ CHECK_UI ("Fibonacci", sp); - mpz_fib_ui (sp, mpz_get_ui (sp)); } - break; -case 36: -#line 230 "calc.y" -{ sp--; mpz_set_si (sp, - mpz_kronecker (sp, sp+1)); } - break; -case 38: -#line 233 "calc.y" -{ CHECK_UI ("Lucas number", sp); - mpz_lucnum_ui (sp, mpz_get_ui (sp)); } + + case 39: + +/* Line 1464 of yacc.c */ +#line 232 "calc.y" + { CHECK_UI ("Lucas number", sp); + mpz_lucnum_ui (sp, mpz_get_ui (sp)); } + break; + + case 40: + +/* Line 1464 of yacc.c */ +#line 234 "calc.y" + { mpz_nextprime (sp, sp); } break; -case 39: + + case 41: + +/* Line 1464 of yacc.c */ #line 235 "calc.y" -{ mpz_nextprime (sp, sp); } + { sp -= 2; mpz_powm (sp, sp, sp+1, sp+2); } break; -case 40: + + case 42: + +/* Line 1464 of yacc.c */ #line 236 "calc.y" -{ sp -= 2; mpz_powm (sp, sp, sp+1, sp+2); } + { sp--; CHECK_UI ("Nth-root", sp+1); + mpz_root (sp, sp, mpz_get_ui (sp+1)); } + break; + + case 43: + +/* Line 1464 of yacc.c */ +#line 238 "calc.y" + { mpz_sqrt (sp, sp); } break; -case 41: -#line 237 "calc.y" -{ sp--; CHECK_UI ("Nth-root", sp+1); - mpz_root (sp, sp, mpz_get_ui (sp+1)); } - break; -case 42: -#line 239 "calc.y" -{ mpz_sqrt (sp, sp); } - break; -case 43: -#line 241 "calc.y" -{ - sp++; - CHECK_OVERFLOW (); - CHECK_VARIABLE (yyvsp[0].var); - mpz_set (sp, variable[yyvsp[0].var]); + + case 44: + +/* Line 1464 of yacc.c */ +#line 240 "calc.y" + { + sp++; + CHECK_OVERFLOW (); + CHECK_VARIABLE ((yyvsp[(1) - (1)].var)); + mpz_set (sp, variable[(yyvsp[(1) - (1)].var)]); } break; -case 44: -#line 247 "calc.y" -{ - sp++; - CHECK_OVERFLOW (); - if (mpz_set_str (sp, yyvsp[0].str, ibase) != 0) - { - fprintf (stderr, "Invalid number: %s\n", yyvsp[0].str); - YYERROR; - } + + case 45: + +/* Line 1464 of yacc.c */ +#line 246 "calc.y" + { + sp++; + CHECK_OVERFLOW (); + if (mpz_set_str (sp, (yyvsp[(1) - (1)].str), ibase) != 0) + { + fprintf (stderr, "Invalid number: %s\n", (yyvsp[(1) - (1)].str)); + YYERROR; + } } break; -case 46: -#line 259 "calc.y" -{ sp--; mpz_gcd (sp, sp, sp+1); } - break; -case 48: -#line 263 "calc.y" -{ sp--; mpz_lcm (sp, sp, sp+1); } + + case 47: + +/* Line 1464 of yacc.c */ +#line 258 "calc.y" + { sp--; mpz_gcd (sp, sp, sp+1); } break; -} -#line 705 "/usr/share/bison/bison.simple" + case 49: - - yyvsp -= yylen; - yyssp -= yylen; -#if YYLSP_NEEDED - yylsp -= yylen; -#endif +/* Line 1464 of yacc.c */ +#line 262 "calc.y" + { sp--; mpz_lcm (sp, sp, sp+1); } + break; -#if YYDEBUG - if (yydebug) - { - short *yyssp1 = yyss - 1; - YYFPRINTF (stderr, "state stack now"); - while (yyssp1 != yyssp) - YYFPRINTF (stderr, " %d", *++yyssp1); - YYFPRINTF (stderr, "\n"); + + +/* Line 1464 of yacc.c */ +#line 2000 "calc.c" + default: break; } -#endif + YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); + + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; -#if YYLSP_NEEDED - *++yylsp = yyloc; -#endif /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule @@ -1398,11 +2013,11 @@ yyn = yyr1[yyn]; - yystate = yypgoto[yyn - YYNTBASE] + *yyssp; - if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp) + yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; + if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else - yystate = yydefgoto[yyn - YYNTBASE]; + yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; @@ -1415,155 +2030,126 @@ if (!yyerrstatus) { ++yynerrs; - -#ifdef YYERROR_VERBOSE - yyn = yypact[yystate]; - - if (yyn > YYFLAG && yyn < YYLAST) - { - YYSIZE_T yysize = 0; - char *yymsg; - int yyx, yycount; - - yycount = 0; - /* Start YYX at -YYN if negative to avoid negative indexes in - YYCHECK. */ - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++) - if (yycheck[yyx + yyn] == yyx) - yysize += yystrlen (yytname[yyx]) + 15, yycount++; - yysize += yystrlen ("parse error, unexpected ") + 1; - yysize += yystrlen (yytname[YYTRANSLATE (yychar)]); - yymsg = (char *) YYSTACK_ALLOC (yysize); - if (yymsg != 0) - { - char *yyp = yystpcpy (yymsg, "parse error, unexpected "); - yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]); - - if (yycount < 5) - { - yycount = 0; - for (yyx = yyn < 0 ? -yyn : 0; - yyx < (int) (sizeof (yytname) / sizeof (char *)); - yyx++) - if (yycheck[yyx + yyn] == yyx) - { - const char *yyq = ! yycount ? ", expecting " : " or "; - yyp = yystpcpy (yyp, yyq); - yyp = yystpcpy (yyp, yytname[yyx]); - yycount++; - } - } - yyerror (yymsg); +#if ! YYERROR_VERBOSE + yyerror (YY_("syntax error")); +#else + { + YYSIZE_T yysize = yysyntax_error (0, yystate, yychar); + if (yymsg_alloc < yysize && yymsg_alloc < YYSTACK_ALLOC_MAXIMUM) + { + YYSIZE_T yyalloc = 2 * yysize; + if (! (yysize <= yyalloc && yyalloc <= YYSTACK_ALLOC_MAXIMUM)) + yyalloc = YYSTACK_ALLOC_MAXIMUM; + if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); - } - else - yyerror ("parse error; also virtual memory exhausted"); - } - else -#endif /* defined (YYERROR_VERBOSE) */ - yyerror ("parse error"); + yymsg = (char *) YYSTACK_ALLOC (yyalloc); + if (yymsg) + yymsg_alloc = yyalloc; + else + { + yymsg = yymsgbuf; + yymsg_alloc = sizeof yymsgbuf; + } + } + + if (0 < yysize && yysize <= yymsg_alloc) + { + (void) yysyntax_error (yymsg, yystate, yychar); + yyerror (yymsg); + } + else + { + yyerror (YY_("syntax error")); + if (yysize != 0) + goto yyexhaustedlab; + } + } +#endif } - goto yyerrlab1; -/*--------------------------------------------------. -| yyerrlab1 -- error raised explicitly by an action | -`--------------------------------------------------*/ -yyerrlab1: + if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ - /* return failure if at end of input */ - if (yychar == YYEOF) - YYABORT; - YYDPRINTF ((stderr, "Discarding token %d (%s).\n", - yychar, yytname[yychar1])); - yychar = YYEMPTY; + if (yychar <= YYEOF) + { + /* Return failure if at end of input. */ + if (yychar == YYEOF) + YYABORT; + } + else + { + yydestruct ("Error: discarding", + yytoken, &yylval); + yychar = YYEMPTY; + } } /* Else will try to reuse lookahead token after shifting the error token. */ + goto yyerrlab1; - yyerrstatus = 3; /* Each real token shifted decrements this */ - - goto yyerrhandle; - - -/*-------------------------------------------------------------------. -| yyerrdefault -- current state does not do anything special for the | -| error token. | -`-------------------------------------------------------------------*/ -yyerrdefault: -#if 0 - /* This is wrong; only states that explicitly want error tokens - should shift them. */ - /* If its default is to accept any token, ok. Otherwise pop it. */ - yyn = yydefact[yystate]; - if (yyn) - goto yydefault; -#endif +/*---------------------------------------------------. +| yyerrorlab -- error raised explicitly by YYERROR. | +`---------------------------------------------------*/ +yyerrorlab: + + /* Pacify compilers like GCC when the user code never invokes + YYERROR and the label yyerrorlab therefore never appears in user + code. */ + if (/*CONSTCOND*/ 0) + goto yyerrorlab; + + /* Do not reclaim the symbols of the rule which action triggered + this YYERROR. */ + YYPOPSTACK (yylen); + yylen = 0; + YY_STACK_PRINT (yyss, yyssp); + yystate = *yyssp; + goto yyerrlab1; -/*---------------------------------------------------------------. -| yyerrpop -- pop the current state because it cannot handle the | -| error token | -`---------------------------------------------------------------*/ -yyerrpop: - if (yyssp == yyss) - YYABORT; - yyvsp--; - yystate = *--yyssp; -#if YYLSP_NEEDED - yylsp--; -#endif +/*-------------------------------------------------------------. +| yyerrlab1 -- common code for both syntax error and YYERROR. | +`-------------------------------------------------------------*/ +yyerrlab1: + yyerrstatus = 3; /* Each real token shifted decrements this. */ -#if YYDEBUG - if (yydebug) + for (;;) { - short *yyssp1 = yyss - 1; - YYFPRINTF (stderr, "Error: state stack now"); - while (yyssp1 != yyssp) - YYFPRINTF (stderr, " %d", *++yyssp1); - YYFPRINTF (stderr, "\n"); - } -#endif + yyn = yypact[yystate]; + if (yyn != YYPACT_NINF) + { + yyn += YYTERROR; + if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) + { + yyn = yytable[yyn]; + if (0 < yyn) + break; + } + } -/*--------------. -| yyerrhandle. | -`--------------*/ -yyerrhandle: - yyn = yypact[yystate]; - if (yyn == YYFLAG) - goto yyerrdefault; + /* Pop the current state because it cannot handle the error token. */ + if (yyssp == yyss) + YYABORT; - yyn += YYTERROR; - if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR) - goto yyerrdefault; - yyn = yytable[yyn]; - if (yyn < 0) - { - if (yyn == YYFLAG) - goto yyerrpop; - yyn = -yyn; - goto yyreduce; + yydestruct ("Error: popping", + yystos[yystate], yyvsp); + YYPOPSTACK (1); + yystate = *yyssp; + YY_STACK_PRINT (yyss, yyssp); } - else if (yyn == 0) - goto yyerrpop; - if (yyn == YYFINAL) - YYACCEPT; + *++yyvsp = yylval; - YYDPRINTF ((stderr, "Shifting error token, ")); - *++yyvsp = yylval; -#if YYLSP_NEEDED - *++yylsp = yylloc; -#endif + /* Shift the error token. */ + YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; @@ -1583,22 +2169,46 @@ yyresult = 1; goto yyreturn; -/*---------------------------------------------. -| yyoverflowab -- parser overflow comes here. | -`---------------------------------------------*/ -yyoverflowlab: - yyerror ("parser stack overflow"); +#if !defined(yyoverflow) || YYERROR_VERBOSE +/*-------------------------------------------------. +| yyexhaustedlab -- memory exhaustion comes here. | +`-------------------------------------------------*/ +yyexhaustedlab: + yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ +#endif yyreturn: + if (yychar != YYEMPTY) + yydestruct ("Cleanup: discarding lookahead", + yytoken, &yylval); + /* Do not reclaim the symbols of the rule which action triggered + this YYABORT or YYACCEPT. */ + YYPOPSTACK (yylen); + YY_STACK_PRINT (yyss, yyssp); + while (yyssp != yyss) + { + yydestruct ("Cleanup: popping", + yystos[*yyssp], yyvsp); + YYPOPSTACK (1); + } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif - return yyresult; +#if YYERROR_VERBOSE + if (yymsg != yymsgbuf) + YYSTACK_FREE (yymsg); +#endif + /* Make sure YYID is used. */ + return YYID (yyresult); } -#line 265 "calc.y" + + + +/* Line 1684 of yacc.c */ +#line 264 "calc.y" yyerror (char *s) @@ -1616,24 +2226,24 @@ for (i = 1; i < argc; i++) { if (strcmp (argv[i], "--readline") == 0) - calc_option_readline = 1; + calc_option_readline = 1; else if (strcmp (argv[i], "--noreadline") == 0) - calc_option_readline = 0; + calc_option_readline = 0; else if (strcmp (argv[i], "--help") == 0) - { - printf ("Usage: calc [--option]...\n"); - printf (" --readline use readline\n"); - printf (" --noreadline don't use readline\n"); - printf (" --help this message\n"); - printf ("Readline is only available when compiled in,\n"); - printf ("and in that case it's the default on a tty.\n"); - exit (0); - } + { + printf ("Usage: calc [--option]...\n"); + printf (" --readline use readline\n"); + printf (" --noreadline don't use readline\n"); + printf (" --help this message\n"); + printf ("Readline is only available when compiled in,\n"); + printf ("and in that case it's the default on a tty.\n"); + exit (0); + } else - { - fprintf (stderr, "Unrecognised option: %s\n", argv[i]); - exit (1); - } + { + fprintf (stderr, "Unrecognised option: %s\n", argv[i]); + exit (1); + } } #if WITH_READLINE @@ -1654,3 +2264,4 @@ return yyparse (); } + diff -Nru gmp-4.3.2+dfsg/demos/calc/calc.h gmp-5.0.2+dfsg/demos/calc/calc.h --- gmp-4.3.2+dfsg/demos/calc/calc.h 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/calc/calc.h 2011-05-08 09:49:50.000000000 +0000 @@ -1,43 +1,126 @@ -#ifndef BISON_CALC_H -# define BISON_CALC_H +/* A Bison parser, made by GNU Bison 2.4.3. */ + +/* Skeleton interface for Bison's Yacc-like parsers in C + + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003, 2004, 2005, 2006, + 2009, 2010 Free Software Foundation, Inc. + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . */ + +/* As a special exception, you may create a larger work that contains + part or all of the Bison parser skeleton and distribute that work + under terms of your choice, so long as that work isn't itself a + parser generator using the skeleton or a modified version thereof + as a parser skeleton. Alternatively, if you modify or redistribute + the parser skeleton itself, you may (at your option) remove this + special exception, which will cause the skeleton and the resulting + Bison output files to be licensed under the GNU General Public + License without this special exception. + + This special exception was added by the Free Software Foundation in + version 2.2 of Bison. */ + + +/* Tokens. */ +#ifndef YYTOKENTYPE +# define YYTOKENTYPE + /* Put the tokens into the symbol table, so that GDB and other debuggers + know about them. */ + enum yytokentype { + EOS = 258, + BAD = 259, + HELP = 260, + HEX = 261, + DECIMAL = 262, + QUIT = 263, + ABS = 264, + BIN = 265, + FIB = 266, + GCD = 267, + KRON = 268, + LCM = 269, + LUCNUM = 270, + NEXTPRIME = 271, + POWM = 272, + ROOT = 273, + SQRT = 274, + NUMBER = 275, + VARIABLE = 276, + LOR = 277, + LAND = 278, + GE = 279, + LE = 280, + NE = 281, + EQ = 282, + RSHIFT = 283, + LSHIFT = 284, + UMINUS = 285 + }; +#endif +/* Tokens. */ +#define EOS 258 +#define BAD 259 +#define HELP 260 +#define HEX 261 +#define DECIMAL 262 +#define QUIT 263 +#define ABS 264 +#define BIN 265 +#define FIB 266 +#define GCD 267 +#define KRON 268 +#define LCM 269 +#define LUCNUM 270 +#define NEXTPRIME 271 +#define POWM 272 +#define ROOT 273 +#define SQRT 274 +#define NUMBER 275 +#define VARIABLE 276 +#define LOR 277 +#define LAND 278 +#define GE 279 +#define LE 280 +#define NE 281 +#define EQ 282 +#define RSHIFT 283 +#define LSHIFT 284 +#define UMINUS 285 + + + + +#if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED +typedef union YYSTYPE +{ + +/* Line 1685 of yacc.c */ +#line 142 "calc.y" -#ifndef YYSTYPE -typedef union { char *str; int var; -} yystype; -# define YYSTYPE yystype -#endif -# define EOS 257 -# define BAD 258 -# define HELP 259 -# define HEX 260 -# define DECIMAL 261 -# define QUIT 262 -# define ABS 263 -# define BIN 264 -# define FIB 265 -# define GCD 266 -# define KRON 267 -# define LCM 268 -# define LUCNUM 269 -# define NEXTPRIME 270 -# define POWM 271 -# define ROOT 272 -# define SQRT 273 -# define NUMBER 274 -# define VARIABLE 275 -# define LOR 276 -# define LAND 277 -# define EQ 278 -# define NE 279 -# define LE 280 -# define GE 281 -# define LSHIFT 282 -# define RSHIFT 283 -# define UMINUS 284 + +/* Line 1685 of yacc.c */ +#line 118 "calc.h" +} YYSTYPE; +# define YYSTYPE_IS_TRIVIAL 1 +# define yystype YYSTYPE /* obsolescent; will be withdrawn */ +# define YYSTYPE_IS_DECLARED 1 +#endif + extern YYSTYPE yylval; -#endif /* not BISON_CALC_H */ + diff -Nru gmp-4.3.2+dfsg/demos/calc/calclex.c gmp-5.0.2+dfsg/demos/calc/calclex.c --- gmp-4.3.2+dfsg/demos/calc/calclex.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/calc/calclex.c 2011-05-08 09:49:50.000000000 +0000 @@ -1,70 +1,112 @@ -#line 2 "calclex.c" -/* A lexical scanner generated by flex */ -/* Scanner skeleton version: - * $Header$ - */ +#line 3 "calclex.c" + +#define YY_INT_ALIGNED short int + +/* A lexical scanner generated by flex */ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 #define YY_FLEX_MINOR_VERSION 5 +#define YY_FLEX_SUBMINOR_VERSION 35 +#if YY_FLEX_SUBMINOR_VERSION > 0 +#define FLEX_BETA +#endif + +/* First, we deal with platform-specific or compiler-specific issues. */ +/* begin standard C headers. */ #include +#include #include +#include -/* cfront 1.2 defines "c_plusplus" instead of "__cplusplus" */ -#ifdef c_plusplus -#ifndef __cplusplus -#define __cplusplus -#endif -#endif +/* end standard C headers. */ +/* flex integer type definitions */ -#ifdef __cplusplus +#ifndef FLEXINT_H +#define FLEXINT_H -#include -#ifndef _WIN32 -#include +/* C99 systems have . Non-C99 systems may or may not. */ + +#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L + +/* C99 says to define __STDC_LIMIT_MACROS before including stdint.h, + * if you want the limit (max/min) macros for int types. + */ +#ifndef __STDC_LIMIT_MACROS +#define __STDC_LIMIT_MACROS 1 #endif -/* Use prototypes in function declarations. */ -#define YY_USE_PROTOS +#include +typedef int8_t flex_int8_t; +typedef uint8_t flex_uint8_t; +typedef int16_t flex_int16_t; +typedef uint16_t flex_uint16_t; +typedef int32_t flex_int32_t; +typedef uint32_t flex_uint32_t; +#else +typedef signed char flex_int8_t; +typedef short int flex_int16_t; +typedef int flex_int32_t; +typedef unsigned char flex_uint8_t; +typedef unsigned short int flex_uint16_t; +typedef unsigned int flex_uint32_t; +#endif /* ! C99 */ + +/* Limits of integral types. */ +#ifndef INT8_MIN +#define INT8_MIN (-128) +#endif +#ifndef INT16_MIN +#define INT16_MIN (-32767-1) +#endif +#ifndef INT32_MIN +#define INT32_MIN (-2147483647-1) +#endif +#ifndef INT8_MAX +#define INT8_MAX (127) +#endif +#ifndef INT16_MAX +#define INT16_MAX (32767) +#endif +#ifndef INT32_MAX +#define INT32_MAX (2147483647) +#endif +#ifndef UINT8_MAX +#define UINT8_MAX (255U) +#endif +#ifndef UINT16_MAX +#define UINT16_MAX (65535U) +#endif +#ifndef UINT32_MAX +#define UINT32_MAX (4294967295U) +#endif + +#endif /* ! FLEXINT_H */ + +#ifdef __cplusplus /* The "const" storage-class-modifier is valid. */ #define YY_USE_CONST #else /* ! __cplusplus */ -#if __STDC__ +/* C99 requires __STDC__ to be defined as 1. */ +#if defined (__STDC__) -#define YY_USE_PROTOS #define YY_USE_CONST -#endif /* __STDC__ */ +#endif /* defined (__STDC__) */ #endif /* ! __cplusplus */ -#ifdef __TURBOC__ - #pragma warn -rch - #pragma warn -use -#include -#include -#define YY_USE_CONST -#define YY_USE_PROTOS -#endif - #ifdef YY_USE_CONST #define yyconst const #else #define yyconst #endif - -#ifdef YY_USE_PROTOS -#define YY_PROTO(proto) proto -#else -#define YY_PROTO(proto) () -#endif - /* Returned upon end-of-file. */ #define YY_NULL 0 @@ -79,71 +121,70 @@ * but we do it the disgusting crufty way forced on us by the ()-less * definition of BEGIN. */ -#define BEGIN yy_start = 1 + 2 * +#define BEGIN (yy_start) = 1 + 2 * /* Translate the current start state into a value that can be later handed * to BEGIN to return to the state. The YYSTATE alias is for lex * compatibility. */ -#define YY_START ((yy_start - 1) / 2) +#define YY_START (((yy_start) - 1) / 2) #define YYSTATE YY_START /* Action number for EOF rule of a given start state. */ #define YY_STATE_EOF(state) (YY_END_OF_BUFFER + state + 1) /* Special action meaning "start processing a new file". */ -#define YY_NEW_FILE yyrestart( yyin ) +#define YY_NEW_FILE yyrestart(yyin ) #define YY_END_OF_BUFFER_CHAR 0 /* Size of default input buffer. */ +#ifndef YY_BUF_SIZE #define YY_BUF_SIZE 16384 +#endif + +/* The state buf must be large enough to hold one state per character in the main buffer. + */ +#define YY_STATE_BUF_SIZE ((YY_BUF_SIZE + 2) * sizeof(yy_state_type)) +#ifndef YY_TYPEDEF_YY_BUFFER_STATE +#define YY_TYPEDEF_YY_BUFFER_STATE typedef struct yy_buffer_state *YY_BUFFER_STATE; +#endif extern int yyleng; + extern FILE *yyin, *yyout; #define EOB_ACT_CONTINUE_SCAN 0 #define EOB_ACT_END_OF_FILE 1 #define EOB_ACT_LAST_MATCH 2 -/* The funky do-while in the following #define is used to turn the definition - * int a single C statement (which needs a semi-colon terminator). This - * avoids problems with code like: - * - * if ( condition_holds ) - * yyless( 5 ); - * else - * do_something_else(); - * - * Prior to using the do-while the compiler would get upset at the - * "else" because it interpreted the "if" statement as being all - * done when it reached the ';' after the yyless() call. - */ - -/* Return all but the first 'n' matched characters back to the input stream. */ - + #define YY_LESS_LINENO(n) + +/* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ do \ { \ /* Undo effects of setting up yytext. */ \ - *yy_cp = yy_hold_char; \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + *yy_cp = (yy_hold_char); \ YY_RESTORE_YY_MORE_OFFSET \ - yy_c_buf_p = yy_cp = yy_bp + n - YY_MORE_ADJ; \ + (yy_c_buf_p) = yy_cp = yy_bp + yyless_macro_arg - YY_MORE_ADJ; \ YY_DO_BEFORE_ACTION; /* set up yytext again */ \ } \ while ( 0 ) -#define unput(c) yyunput( c, yytext_ptr ) - -/* The following is because we cannot portably get our hands on size_t - * (without autoconf's help, which isn't available because we want - * flex-generated scanners to compile on their own). - */ -typedef unsigned int yy_size_t; +#define unput(c) yyunput( c, (yytext_ptr) ) +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif +#ifndef YY_STRUCT_YY_BUFFER_STATE +#define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state { FILE *yy_input_file; @@ -180,12 +221,16 @@ */ int yy_at_bol; + int yy_bs_lineno; /**< The line count. */ + int yy_bs_column; /**< The column count. */ + /* Whether to try to fill the input buffer when we reach the * end of it. */ int yy_fill_buffer; int yy_buffer_status; + #define YY_BUFFER_NEW 0 #define YY_BUFFER_NORMAL 1 /* When an EOF's been seen but there's still some text to process @@ -199,28 +244,38 @@ * just pointing yyin at a new input file. */ #define YY_BUFFER_EOF_PENDING 2 + }; +#endif /* !YY_STRUCT_YY_BUFFER_STATE */ -static YY_BUFFER_STATE yy_current_buffer = 0; +/* Stack of input buffers. */ +static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ +static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ +static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general * "scanner state". + * + * Returns the top of the stack, or NULL. */ -#define YY_CURRENT_BUFFER yy_current_buffer +#define YY_CURRENT_BUFFER ( (yy_buffer_stack) \ + ? (yy_buffer_stack)[(yy_buffer_stack_top)] \ + : NULL) +/* Same as previous macro, but useful when we know that the buffer stack is not + * NULL or when we need an lvalue. For internal use only. + */ +#define YY_CURRENT_BUFFER_LVALUE (yy_buffer_stack)[(yy_buffer_stack_top)] /* yy_hold_char holds the character lost when yytext is formed. */ static char yy_hold_char; - static int yy_n_chars; /* number of characters read into yy_ch_buf */ - - int yyleng; /* Points to current character in buffer. */ static char *yy_c_buf_p = (char *) 0; -static int yy_init = 1; /* whether we need to initialize */ +static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ /* Flag which is used to allow yywrap()'s to do buffer switches @@ -228,66 +283,92 @@ */ static int yy_did_buffer_switch_on_eof; -void yyrestart YY_PROTO(( FILE *input_file )); - -void yy_switch_to_buffer YY_PROTO(( YY_BUFFER_STATE new_buffer )); -void yy_load_buffer_state YY_PROTO(( void )); -YY_BUFFER_STATE yy_create_buffer YY_PROTO(( FILE *file, int size )); -void yy_delete_buffer YY_PROTO(( YY_BUFFER_STATE b )); -void yy_init_buffer YY_PROTO(( YY_BUFFER_STATE b, FILE *file )); -void yy_flush_buffer YY_PROTO(( YY_BUFFER_STATE b )); -#define YY_FLUSH_BUFFER yy_flush_buffer( yy_current_buffer ) - -YY_BUFFER_STATE yy_scan_buffer YY_PROTO(( char *base, yy_size_t size )); -YY_BUFFER_STATE yy_scan_string YY_PROTO(( yyconst char *yy_str )); -YY_BUFFER_STATE yy_scan_bytes YY_PROTO(( yyconst char *bytes, int len )); - -static void *yy_flex_alloc YY_PROTO(( yy_size_t )); -static void *yy_flex_realloc YY_PROTO(( void *, yy_size_t )); -static void yy_flex_free YY_PROTO(( void * )); +void yyrestart (FILE *input_file ); +void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ); +YY_BUFFER_STATE yy_create_buffer (FILE *file,int size ); +void yy_delete_buffer (YY_BUFFER_STATE b ); +void yy_flush_buffer (YY_BUFFER_STATE b ); +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ); +void yypop_buffer_state (void ); + +static void yyensure_buffer_stack (void ); +static void yy_load_buffer_state (void ); +static void yy_init_buffer (YY_BUFFER_STATE b,FILE *file ); + +#define YY_FLUSH_BUFFER yy_flush_buffer(YY_CURRENT_BUFFER ) + +YY_BUFFER_STATE yy_scan_buffer (char *base,yy_size_t size ); +YY_BUFFER_STATE yy_scan_string (yyconst char *yy_str ); +YY_BUFFER_STATE yy_scan_bytes (yyconst char *bytes,int len ); + +void *yyalloc (yy_size_t ); +void *yyrealloc (void *,yy_size_t ); +void yyfree (void * ); #define yy_new_buffer yy_create_buffer #define yy_set_interactive(is_interactive) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_is_interactive = is_interactive; \ + if ( ! YY_CURRENT_BUFFER ){ \ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_is_interactive = is_interactive; \ } #define yy_set_bol(at_bol) \ { \ - if ( ! yy_current_buffer ) \ - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); \ - yy_current_buffer->yy_at_bol = at_bol; \ + if ( ! YY_CURRENT_BUFFER ){\ + yyensure_buffer_stack (); \ + YY_CURRENT_BUFFER_LVALUE = \ + yy_create_buffer(yyin,YY_BUF_SIZE ); \ + } \ + YY_CURRENT_BUFFER_LVALUE->yy_at_bol = at_bol; \ } -#define YY_AT_BOL() (yy_current_buffer->yy_at_bol) +#define YY_AT_BOL() (YY_CURRENT_BUFFER_LVALUE->yy_at_bol) + +/* Begin user sect3 */ typedef unsigned char YY_CHAR; + FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; + typedef int yy_state_type; + +extern int yylineno; + +int yylineno = 1; + extern char *yytext; #define yytext_ptr yytext -static yy_state_type yy_get_previous_state YY_PROTO(( void )); -static yy_state_type yy_try_NUL_trans YY_PROTO(( yy_state_type current_state )); -static int yy_get_next_buffer YY_PROTO(( void )); -static void yy_fatal_error YY_PROTO(( yyconst char msg[] )); +static yy_state_type yy_get_previous_state (void ); +static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); +static int yy_get_next_buffer (void ); +static void yy_fatal_error (yyconst char msg[] ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. */ #define YY_DO_BEFORE_ACTION \ - yytext_ptr = yy_bp; \ - yyleng = (int) (yy_cp - yy_bp); \ - yy_hold_char = *yy_cp; \ + (yytext_ptr) = yy_bp; \ + yyleng = (size_t) (yy_cp - yy_bp); \ + (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ - yy_c_buf_p = yy_cp; + (yy_c_buf_p) = yy_cp; #define YY_NUM_RULES 19 #define YY_END_OF_BUFFER 20 -static yyconst short int yy_accept[39] = +/* This struct is not used in this scanner, + but its presence is necessary. */ +struct yy_trans_info + { + flex_int32_t yy_verify; + flex_int32_t yy_nxt; + }; +static yyconst flex_int16_t yy_accept[39] = { 0, 0, 0, 20, 18, 1, 2, 7, 6, 7, 18, 16, 16, 2, 7, 7, 7, 16, 17, 18, 18, @@ -295,7 +376,7 @@ 9, 13, 16, 17, 3, 15, 4, 0 } ; -static yyconst int yy_ec[256] = +static yyconst flex_int32_t yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, @@ -327,13 +408,13 @@ 1, 1, 1, 1, 1 } ; -static yyconst int yy_meta[19] = +static yyconst flex_int32_t yy_meta[19] = { 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 3, 2, 1, 1 } ; -static yyconst short int yy_base[43] = +static yyconst flex_int16_t yy_base[43] = { 0, 0, 0, 39, 49, 49, 49, 26, 16, 49, 30, 20, 19, 49, 9, 22, 10, 9, 0, 29, 13, @@ -342,7 +423,7 @@ 43, 45 } ; -static yyconst short int yy_def[43] = +static yyconst flex_int16_t yy_def[43] = { 0, 38, 1, 38, 38, 38, 38, 38, 39, 38, 38, 40, 40, 38, 38, 38, 38, 41, 42, 38, 38, @@ -351,7 +432,7 @@ 38, 38 } ; -static yyconst short int yy_nxt[68] = +static yyconst flex_int16_t yy_nxt[68] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 18, 19, 20, 23, 28, @@ -362,7 +443,7 @@ 38, 38, 38, 38, 38, 38, 38 } ; -static yyconst short int yy_chk[68] = +static yyconst flex_int16_t yy_chk[68] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 8, 14, @@ -376,6 +457,9 @@ static yy_state_type yy_last_accepting_state; static char *yy_last_accepting_cpos; +extern int yy_flex_debug; +int yy_flex_debug = 0; + /* The intent behind this definition is that it'll catch * any uses of REJECT which flex missed. */ @@ -385,7 +469,6 @@ #define YY_RESTORE_YY_MORE_OFFSET char *yytext; #line 1 "calclex.l" -#define INITIAL 0 /* Lexical analyzer for calc program. Copyright 2000, 2001, 2002 Free Software Foundation, Inc. @@ -403,8 +486,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/. */ - -#line 21 "calclex.l" +#line 20 "calclex.l" #include #include "calc-common.h" @@ -440,7 +522,52 @@ { "sqrt", SQRT }, { NULL } }; -#line 444 "calclex.c" +#line 526 "calclex.c" + +#define INITIAL 0 + +#ifndef YY_NO_UNISTD_H +/* Special case for "unistd.h", since it is non-ANSI. We include it way + * down here because we want the user's section 1 to have been scanned first. + * The user has a chance to override it with an option. + */ +#include +#endif + +#ifndef YY_EXTRA_TYPE +#define YY_EXTRA_TYPE void * +#endif + +static int yy_init_globals (void ); + +/* Accessor methods to globals. + These are made visible to non-reentrant scanners for convenience. */ + +int yylex_destroy (void ); + +int yyget_debug (void ); + +void yyset_debug (int debug_flag ); + +YY_EXTRA_TYPE yyget_extra (void ); + +void yyset_extra (YY_EXTRA_TYPE user_defined ); + +FILE *yyget_in (void ); + +void yyset_in (FILE * in_str ); + +FILE *yyget_out (void ); + +void yyset_out (FILE * out_str ); + +int yyget_leng (void ); + +char *yyget_text (void ); + +int yyget_lineno (void ); + +void yyset_lineno (int line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -448,65 +575,30 @@ #ifndef YY_SKIP_YYWRAP #ifdef __cplusplus -extern "C" int yywrap YY_PROTO(( void )); +extern "C" int yywrap (void ); #else -extern int yywrap YY_PROTO(( void )); +extern int yywrap (void ); #endif #endif -#ifndef YY_NO_UNPUT -static void yyunput YY_PROTO(( int c, char *buf_ptr )); -#endif - + static void yyunput (int c,char *buf_ptr ); + #ifndef yytext_ptr -static void yy_flex_strncpy YY_PROTO(( char *, yyconst char *, int )); +static void yy_flex_strncpy (char *,yyconst char *,int ); #endif #ifdef YY_NEED_STRLEN -static int yy_flex_strlen YY_PROTO(( yyconst char * )); +static int yy_flex_strlen (yyconst char * ); #endif #ifndef YY_NO_INPUT -#ifdef __cplusplus -static int yyinput YY_PROTO(( void )); -#else -static int input YY_PROTO(( void )); -#endif -#endif - -#if YY_STACK_USED -static int yy_start_stack_ptr = 0; -static int yy_start_stack_depth = 0; -static int *yy_start_stack = 0; -#ifndef YY_NO_PUSH_STATE -static void yy_push_state YY_PROTO(( int new_state )); -#endif -#ifndef YY_NO_POP_STATE -static void yy_pop_state YY_PROTO(( void )); -#endif -#ifndef YY_NO_TOP_STATE -static int yy_top_state YY_PROTO(( void )); -#endif +#ifdef __cplusplus +static int yyinput (void ); #else -#define YY_NO_PUSH_STATE 1 -#define YY_NO_POP_STATE 1 -#define YY_NO_TOP_STATE 1 +static int input (void ); #endif -#ifdef YY_MALLOC_DECL -YY_MALLOC_DECL -#else -#if __STDC__ -#ifndef __cplusplus -#include -#endif -#else -/* Just try to get by without declaring the routines. This will fail - * miserably on non-ANSI systems for which sizeof(size_t) != sizeof(int) - * or sizeof(void*) != sizeof(int). - */ -#endif #endif /* Amount of stuff to slurp up with each read. */ @@ -515,12 +607,11 @@ #endif /* Copy whatever the last rule matched to the standard output. */ - #ifndef ECHO /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) +#define ECHO fwrite( yytext, yyleng, 1, yyout ) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -528,9 +619,10 @@ */ #ifndef YY_INPUT #define YY_INPUT(buf,result,max_size) \ - if ( yy_current_buffer->yy_is_interactive ) \ + if ( YY_CURRENT_BUFFER_LVALUE->yy_is_interactive ) \ { \ - int c = '*', n; \ + int c = '*'; \ + int n; \ for ( n = 0; n < max_size && \ (c = getc( yyin )) != EOF && c != '\n'; ++n ) \ buf[n] = (char) c; \ @@ -553,7 +645,9 @@ errno=0; \ clearerr(yyin); \ } \ - } + }\ +\ + #endif /* No semi-colon after return; correct usage is to write "yyterminate();" - @@ -574,12 +668,18 @@ #define YY_FATAL_ERROR(msg) yy_fatal_error( msg ) #endif +/* end tables serialization structures and prototypes */ + /* Default declaration of generated scanner - a define so the user can * easily add parameters. */ #ifndef YY_DECL -#define YY_DECL int yylex YY_PROTO(( void )) -#endif +#define YY_DECL_IS_OURS 1 + +extern int yylex (void); + +#define YY_DECL int yylex (void) +#endif /* !YY_DECL */ /* Code executed at the beginning of each rule, after yytext and yyleng * have been set up. @@ -596,27 +696,29 @@ #define YY_RULE_SETUP \ YY_USER_ACTION +/** The main scanner function which does all the work. + */ YY_DECL - { +{ register yy_state_type yy_current_state; register char *yy_cp, *yy_bp; register int yy_act; - -#line 58 "calclex.l" + +#line 57 "calclex.l" -#line 609 "calclex.c" +#line 711 "calclex.c" - if ( yy_init ) + if ( !(yy_init) ) { - yy_init = 0; + (yy_init) = 1; #ifdef YY_USER_INIT YY_USER_INIT; #endif - if ( ! yy_start ) - yy_start = 1; /* first start state */ + if ( ! (yy_start) ) + (yy_start) = 1; /* first start state */ if ( ! yyin ) yyin = stdin; @@ -624,34 +726,36 @@ if ( ! yyout ) yyout = stdout; - if ( ! yy_current_buffer ) - yy_current_buffer = - yy_create_buffer( yyin, YY_BUF_SIZE ); + if ( ! YY_CURRENT_BUFFER ) { + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); + } - yy_load_buffer_state(); + yy_load_buffer_state( ); } while ( 1 ) /* loops until end-of-file is reached */ { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); /* Support of yytext. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); /* yy_bp points to the position in yy_ch_buf of the start of * the current run. */ yy_bp = yy_cp; - yy_current_state = yy_start; + yy_current_state = (yy_start); yy_match: do { register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -668,116 +772,118 @@ yy_act = yy_accept[yy_current_state]; if ( yy_act == 0 ) { /* have to back up */ - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); yy_act = yy_accept[yy_current_state]; } YY_DO_BEFORE_ACTION; - do_action: /* This label is used only to access EOF actions. */ - switch ( yy_act ) { /* beginning of action switch */ case 0: /* must back up */ /* undo the effects of YY_DO_BEFORE_ACTION */ - *yy_cp = yy_hold_char; - yy_cp = yy_last_accepting_cpos; - yy_current_state = yy_last_accepting_state; + *yy_cp = (yy_hold_char); + yy_cp = (yy_last_accepting_cpos); + yy_current_state = (yy_last_accepting_state); goto yy_find_action; case 1: YY_RULE_SETUP -#line 60 "calclex.l" +#line 59 "calclex.l" { /* white space is skipped */ } YY_BREAK case 2: +/* rule 2 can match eol */ YY_RULE_SETUP -#line 62 "calclex.l" +#line 61 "calclex.l" { /* semicolon or newline separates statements */ calc_more_input = 0; return EOS; } YY_BREAK case 3: +/* rule 3 can match eol */ YY_RULE_SETUP -#line 65 "calclex.l" +#line 64 "calclex.l" { /* escaped newlines are skipped */ } YY_BREAK case 4: +/* rule 4 can match eol */ YY_RULE_SETUP -#line 68 "calclex.l" +#line 67 "calclex.l" { /* comment through to escaped newline is skipped */ } YY_BREAK case 5: +/* rule 5 can match eol */ YY_RULE_SETUP -#line 70 "calclex.l" +#line 69 "calclex.l" { /* comment through to newline is a separator */ calc_more_input = 0; return EOS; } YY_BREAK case 6: YY_RULE_SETUP -#line 73 "calclex.l" +#line 72 "calclex.l" { /* comment through to EOF skipped */ } YY_BREAK case 7: YY_RULE_SETUP -#line 76 "calclex.l" +#line 75 "calclex.l" { return yytext[0]; } YY_BREAK case 8: YY_RULE_SETUP -#line 77 "calclex.l" +#line 76 "calclex.l" { return LE; } YY_BREAK case 9: YY_RULE_SETUP -#line 78 "calclex.l" +#line 77 "calclex.l" { return GE; } YY_BREAK case 10: YY_RULE_SETUP -#line 79 "calclex.l" +#line 78 "calclex.l" { return EQ; } YY_BREAK case 11: YY_RULE_SETUP -#line 80 "calclex.l" +#line 79 "calclex.l" { return NE; } YY_BREAK case 12: YY_RULE_SETUP -#line 81 "calclex.l" +#line 80 "calclex.l" { return LSHIFT; } YY_BREAK case 13: YY_RULE_SETUP -#line 82 "calclex.l" +#line 81 "calclex.l" { return RSHIFT; } YY_BREAK case 14: YY_RULE_SETUP -#line 83 "calclex.l" +#line 82 "calclex.l" { return LAND; } YY_BREAK case 15: YY_RULE_SETUP -#line 84 "calclex.l" +#line 83 "calclex.l" { return LOR; } YY_BREAK case 16: YY_RULE_SETUP -#line 86 "calclex.l" +#line 85 "calclex.l" { yylval.str = yytext; return NUMBER; } YY_BREAK case 17: YY_RULE_SETUP -#line 90 "calclex.l" +#line 89 "calclex.l" { int i; @@ -796,41 +902,41 @@ YY_BREAK case 18: YY_RULE_SETUP -#line 106 "calclex.l" +#line 105 "calclex.l" { return BAD; } YY_BREAK case 19: YY_RULE_SETUP -#line 108 "calclex.l" +#line 107 "calclex.l" ECHO; YY_BREAK -#line 808 "calclex.c" +#line 914 "calclex.c" case YY_STATE_EOF(INITIAL): yyterminate(); case YY_END_OF_BUFFER: { /* Amount of text matched not including the EOB char. */ - int yy_amount_of_matched_text = (int) (yy_cp - yytext_ptr) - 1; + int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1; /* Undo the effects of YY_DO_BEFORE_ACTION. */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); YY_RESTORE_YY_MORE_OFFSET - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_NEW ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW ) { /* We're scanning a new file or input source. It's * possible that this happened because the user * just pointed yyin at a new source and called * yylex(). If so, then we have to assure - * consistency between yy_current_buffer and our + * consistency between YY_CURRENT_BUFFER and our * globals. Here is the right place to do so, because * this is the first action (other than possibly a * back-up) that will match for the new input source. */ - yy_n_chars = yy_current_buffer->yy_n_chars; - yy_current_buffer->yy_input_file = yyin; - yy_current_buffer->yy_buffer_status = YY_BUFFER_NORMAL; + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_input_file = yyin; + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL; } /* Note that here we test for yy_c_buf_p "<=" to the position @@ -840,13 +946,13 @@ * end-of-buffer state). Contrast this with the test * in input(). */ - if ( yy_c_buf_p <= &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) { /* This was really a NUL. */ yy_state_type yy_next_state; - yy_c_buf_p = yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); /* Okay, we're now positioned to make the NUL * transition. We couldn't have @@ -859,30 +965,30 @@ yy_next_state = yy_try_NUL_trans( yy_current_state ); - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_bp = (yytext_ptr) + YY_MORE_ADJ; if ( yy_next_state ) { /* Consume the NUL. */ - yy_cp = ++yy_c_buf_p; + yy_cp = ++(yy_c_buf_p); yy_current_state = yy_next_state; goto yy_match; } else { - yy_cp = yy_c_buf_p; + yy_cp = (yy_c_buf_p); goto yy_find_action; } } - else switch ( yy_get_next_buffer() ) + else switch ( yy_get_next_buffer( ) ) { case EOB_ACT_END_OF_FILE: { - yy_did_buffer_switch_on_eof = 0; + (yy_did_buffer_switch_on_eof) = 0; - if ( yywrap() ) + if ( yywrap( ) ) { /* Note: because we've taken care in * yy_get_next_buffer() to have set up @@ -893,7 +999,7 @@ * YY_NULL, it'll still work - another * YY_NULL will get returned. */ - yy_c_buf_p = yytext_ptr + YY_MORE_ADJ; + (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ; yy_act = YY_STATE_EOF(YY_START); goto do_action; @@ -901,30 +1007,30 @@ else { - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; } break; } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = - yytext_ptr + yy_amount_of_matched_text; + (yy_c_buf_p) = + (yytext_ptr) + yy_amount_of_matched_text; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_match; case EOB_ACT_LAST_MATCH: - yy_c_buf_p = - &yy_current_buffer->yy_ch_buf[yy_n_chars]; + (yy_c_buf_p) = + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)]; - yy_current_state = yy_get_previous_state(); + yy_current_state = yy_get_previous_state( ); - yy_cp = yy_c_buf_p; - yy_bp = yytext_ptr + YY_MORE_ADJ; + yy_cp = (yy_c_buf_p); + yy_bp = (yytext_ptr) + YY_MORE_ADJ; goto yy_find_action; } break; @@ -935,8 +1041,7 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ - } /* end of yylex */ - +} /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer * @@ -945,21 +1050,20 @@ * EOB_ACT_CONTINUE_SCAN - continue scanning from current position * EOB_ACT_END_OF_FILE - end of file */ - -static int yy_get_next_buffer() - { - register char *dest = yy_current_buffer->yy_ch_buf; - register char *source = yytext_ptr; +static int yy_get_next_buffer (void) +{ + register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + register char *source = (yytext_ptr); register int number_to_move, i; int ret_val; - if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] ) + if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) YY_FATAL_ERROR( "fatal flex scanner internal error--end of buffer missed" ); - if ( yy_current_buffer->yy_fill_buffer == 0 ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_fill_buffer == 0 ) { /* Don't try to fill the buffer, so this is an EOF. */ - if ( yy_c_buf_p - yytext_ptr - YY_MORE_ADJ == 1 ) + if ( (yy_c_buf_p) - (yytext_ptr) - YY_MORE_ADJ == 1 ) { /* We matched a single character, the EOB, so * treat this as a final EOF. @@ -979,34 +1083,30 @@ /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) (yy_c_buf_p - yytext_ptr) - 1; + number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); - if ( yy_current_buffer->yy_buffer_status == YY_BUFFER_EOF_PENDING ) + if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_EOF_PENDING ) /* don't do the read, it's not guaranteed to return an EOF, * just force an EOF */ - yy_current_buffer->yy_n_chars = yy_n_chars = 0; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars) = 0; else { - int num_to_read = - yy_current_buffer->yy_buf_size - number_to_move - 1; + int num_to_read = + YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; while ( num_to_read <= 0 ) { /* Not enough room in the buffer - grow it. */ -#ifdef YY_USES_REJECT - YY_FATAL_ERROR( -"input buffer overflow, can't enlarge buffer because scanner uses REJECT" ); -#else /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = yy_current_buffer; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER; int yy_c_buf_p_offset = - (int) (yy_c_buf_p - b->yy_ch_buf); + (int) ((yy_c_buf_p) - b->yy_ch_buf); if ( b->yy_is_our_buffer ) { @@ -1019,8 +1119,7 @@ b->yy_ch_buf = (char *) /* Include room in for 2 EOB chars. */ - yy_flex_realloc( (void *) b->yy_ch_buf, - b->yy_buf_size + 2 ); + yyrealloc((void *) b->yy_ch_buf,b->yy_buf_size + 2 ); } else /* Can't grow it, we don't own it. */ @@ -1030,35 +1129,35 @@ YY_FATAL_ERROR( "fatal error - scanner input buffer overflow" ); - yy_c_buf_p = &b->yy_ch_buf[yy_c_buf_p_offset]; + (yy_c_buf_p) = &b->yy_ch_buf[yy_c_buf_p_offset]; - num_to_read = yy_current_buffer->yy_buf_size - + num_to_read = YY_CURRENT_BUFFER_LVALUE->yy_buf_size - number_to_move - 1; -#endif + } if ( num_to_read > YY_READ_BUF_SIZE ) num_to_read = YY_READ_BUF_SIZE; /* Read in more data. */ - YY_INPUT( (&yy_current_buffer->yy_ch_buf[number_to_move]), - yy_n_chars, num_to_read ); + YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), + (yy_n_chars), (size_t) num_to_read ); - yy_current_buffer->yy_n_chars = yy_n_chars; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - if ( yy_n_chars == 0 ) + if ( (yy_n_chars) == 0 ) { if ( number_to_move == YY_MORE_ADJ ) { ret_val = EOB_ACT_END_OF_FILE; - yyrestart( yyin ); + yyrestart(yyin ); } else { ret_val = EOB_ACT_LAST_MATCH; - yy_current_buffer->yy_buffer_status = + YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_EOF_PENDING; } } @@ -1066,32 +1165,39 @@ else ret_val = EOB_ACT_CONTINUE_SCAN; - yy_n_chars += number_to_move; - yy_current_buffer->yy_ch_buf[yy_n_chars] = YY_END_OF_BUFFER_CHAR; - yy_current_buffer->yy_ch_buf[yy_n_chars + 1] = YY_END_OF_BUFFER_CHAR; + if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + /* Extend the array by 50%, plus the number we really need. */ + yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); + if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) + YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); + } - yytext_ptr = &yy_current_buffer->yy_ch_buf[0]; + (yy_n_chars) += number_to_move; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] = YY_END_OF_BUFFER_CHAR; + YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] = YY_END_OF_BUFFER_CHAR; - return ret_val; - } + (yytext_ptr) = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[0]; + return ret_val; +} /* yy_get_previous_state - get the state just before the EOB char was reached */ -static yy_state_type yy_get_previous_state() - { + static yy_state_type yy_get_previous_state (void) +{ register yy_state_type yy_current_state; register char *yy_cp; + + yy_current_state = (yy_start); - yy_current_state = yy_start; - - for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp ) + for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1103,30 +1209,23 @@ } return yy_current_state; - } - +} /* yy_try_NUL_trans - try to make a transition on the NUL character * * synopsis * next_state = yy_try_NUL_trans( current_state ); */ - -#ifdef YY_USE_PROTOS -static yy_state_type yy_try_NUL_trans( yy_state_type yy_current_state ) -#else -static yy_state_type yy_try_NUL_trans( yy_current_state ) -yy_state_type yy_current_state; -#endif - { + static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) +{ register int yy_is_jam; - register char *yy_cp = yy_c_buf_p; + register char *yy_cp = (yy_c_buf_p); register YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { - yy_last_accepting_state = yy_current_state; - yy_last_accepting_cpos = yy_cp; + (yy_last_accepting_state) = yy_current_state; + (yy_last_accepting_cpos) = yy_cp; } while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state ) { @@ -1138,80 +1237,73 @@ yy_is_jam = (yy_current_state == 38); return yy_is_jam ? 0 : yy_current_state; - } - +} -#ifndef YY_NO_UNPUT -#ifdef YY_USE_PROTOS -static void yyunput( int c, register char *yy_bp ) -#else -static void yyunput( c, yy_bp ) -int c; -register char *yy_bp; -#endif - { - register char *yy_cp = yy_c_buf_p; + static void yyunput (int c, register char * yy_bp ) +{ + register char *yy_cp; + + yy_cp = (yy_c_buf_p); /* undo effects of setting up yytext */ - *yy_cp = yy_hold_char; + *yy_cp = (yy_hold_char); - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = yy_n_chars + 2; - register char *dest = &yy_current_buffer->yy_ch_buf[ - yy_current_buffer->yy_buf_size + 2]; + register int number_to_move = (yy_n_chars) + 2; + register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; register char *source = - &yy_current_buffer->yy_ch_buf[number_to_move]; + &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; - while ( source > yy_current_buffer->yy_ch_buf ) + while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) *--dest = *--source; yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); - yy_current_buffer->yy_n_chars = - yy_n_chars = yy_current_buffer->yy_buf_size; + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; - if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 ) + if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); } *--yy_cp = (char) c; + (yytext_ptr) = yy_bp; + (yy_hold_char) = *yy_cp; + (yy_c_buf_p) = yy_cp; +} - yytext_ptr = yy_bp; - yy_hold_char = *yy_cp; - yy_c_buf_p = yy_cp; - } -#endif /* ifndef YY_NO_UNPUT */ - - +#ifndef YY_NO_INPUT #ifdef __cplusplus -static int yyinput() + static int yyinput (void) #else -static int input() + static int input (void) #endif - { - int c; - *yy_c_buf_p = yy_hold_char; +{ + int c; + + *(yy_c_buf_p) = (yy_hold_char); - if ( *yy_c_buf_p == YY_END_OF_BUFFER_CHAR ) + if ( *(yy_c_buf_p) == YY_END_OF_BUFFER_CHAR ) { /* yy_c_buf_p now points to the character we want to return. * If this occurs *before* the EOB characters, then it's a * valid NUL; if not, then we've hit the end of the buffer. */ - if ( yy_c_buf_p < &yy_current_buffer->yy_ch_buf[yy_n_chars] ) + if ( (yy_c_buf_p) < &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] ) /* This was really a NUL. */ - *yy_c_buf_p = '\0'; + *(yy_c_buf_p) = '\0'; else { /* need more input */ - int offset = yy_c_buf_p - yytext_ptr; - ++yy_c_buf_p; + int offset = (yy_c_buf_p) - (yytext_ptr); + ++(yy_c_buf_p); - switch ( yy_get_next_buffer() ) + switch ( yy_get_next_buffer( ) ) { case EOB_ACT_LAST_MATCH: /* This happens because yy_g_n_b() @@ -1225,16 +1317,16 @@ */ /* Reset buffer status. */ - yyrestart( yyin ); + yyrestart(yyin ); - /* fall through */ + /*FALLTHROUGH*/ case EOB_ACT_END_OF_FILE: { - if ( yywrap() ) + if ( yywrap( ) ) return EOF; - if ( ! yy_did_buffer_switch_on_eof ) + if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; #ifdef __cplusplus return yyinput(); @@ -1244,90 +1336,92 @@ } case EOB_ACT_CONTINUE_SCAN: - yy_c_buf_p = yytext_ptr + offset; + (yy_c_buf_p) = (yytext_ptr) + offset; break; } } } - c = *(unsigned char *) yy_c_buf_p; /* cast for 8-bit char's */ - *yy_c_buf_p = '\0'; /* preserve yytext */ - yy_hold_char = *++yy_c_buf_p; - + c = *(unsigned char *) (yy_c_buf_p); /* cast for 8-bit char's */ + *(yy_c_buf_p) = '\0'; /* preserve yytext */ + (yy_hold_char) = *++(yy_c_buf_p); return c; - } - - -#ifdef YY_USE_PROTOS -void yyrestart( FILE *input_file ) -#else -void yyrestart( input_file ) -FILE *input_file; -#endif - { - if ( ! yy_current_buffer ) - yy_current_buffer = yy_create_buffer( yyin, YY_BUF_SIZE ); +} +#endif /* ifndef YY_NO_INPUT */ - yy_init_buffer( yy_current_buffer, input_file ); - yy_load_buffer_state(); +/** Immediately switch to a different input stream. + * @param input_file A readable stream. + * + * @note This function does not reset the start condition to @c INITIAL . + */ + void yyrestart (FILE * input_file ) +{ + + if ( ! YY_CURRENT_BUFFER ){ + yyensure_buffer_stack (); + YY_CURRENT_BUFFER_LVALUE = + yy_create_buffer(yyin,YY_BUF_SIZE ); } + yy_init_buffer(YY_CURRENT_BUFFER,input_file ); + yy_load_buffer_state( ); +} -#ifdef YY_USE_PROTOS -void yy_switch_to_buffer( YY_BUFFER_STATE new_buffer ) -#else -void yy_switch_to_buffer( new_buffer ) -YY_BUFFER_STATE new_buffer; -#endif - { - if ( yy_current_buffer == new_buffer ) +/** Switch to a different input buffer. + * @param new_buffer The new input buffer. + * + */ + void yy_switch_to_buffer (YY_BUFFER_STATE new_buffer ) +{ + + /* TODO. We should be able to replace this entire function body + * with + * yypop_buffer_state(); + * yypush_buffer_state(new_buffer); + */ + yyensure_buffer_stack (); + if ( YY_CURRENT_BUFFER == new_buffer ) return; - if ( yy_current_buffer ) + if ( YY_CURRENT_BUFFER ) { /* Flush out information for old buffer. */ - *yy_c_buf_p = yy_hold_char; - yy_current_buffer->yy_buf_pos = yy_c_buf_p; - yy_current_buffer->yy_n_chars = yy_n_chars; + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } - yy_current_buffer = new_buffer; - yy_load_buffer_state(); + YY_CURRENT_BUFFER_LVALUE = new_buffer; + yy_load_buffer_state( ); /* We don't actually know whether we did this switch during * EOF (yywrap()) processing, but the only time this flag * is looked at is after yywrap() is called, so it's safe * to go ahead and always set it. */ - yy_did_buffer_switch_on_eof = 1; - } - - -#ifdef YY_USE_PROTOS -void yy_load_buffer_state( void ) -#else -void yy_load_buffer_state() -#endif - { - yy_n_chars = yy_current_buffer->yy_n_chars; - yytext_ptr = yy_c_buf_p = yy_current_buffer->yy_buf_pos; - yyin = yy_current_buffer->yy_input_file; - yy_hold_char = *yy_c_buf_p; - } + (yy_did_buffer_switch_on_eof) = 1; +} +static void yy_load_buffer_state (void) +{ + (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars; + (yytext_ptr) = (yy_c_buf_p) = YY_CURRENT_BUFFER_LVALUE->yy_buf_pos; + yyin = YY_CURRENT_BUFFER_LVALUE->yy_input_file; + (yy_hold_char) = *(yy_c_buf_p); +} -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_create_buffer( FILE *file, int size ) -#else -YY_BUFFER_STATE yy_create_buffer( file, size ) -FILE *file; -int size; -#endif - { +/** Allocate and initialize an input buffer state. + * @param file A readable stream. + * @param size The character buffer size in bytes. When in doubt, use @c YY_BUF_SIZE. + * + * @return the allocated buffer state. + */ + YY_BUFFER_STATE yy_create_buffer (FILE * file, int size ) +{ YY_BUFFER_STATE b; - - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); @@ -1336,84 +1430,75 @@ /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. */ - b->yy_ch_buf = (char *) yy_flex_alloc( b->yy_buf_size + 2 ); + b->yy_ch_buf = (char *) yyalloc(b->yy_buf_size + 2 ); if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); b->yy_is_our_buffer = 1; - yy_init_buffer( b, file ); + yy_init_buffer(b,file ); return b; - } - +} -#ifdef YY_USE_PROTOS -void yy_delete_buffer( YY_BUFFER_STATE b ) -#else -void yy_delete_buffer( b ) -YY_BUFFER_STATE b; -#endif - { +/** Destroy the buffer. + * @param b a buffer created with yy_create_buffer() + * + */ + void yy_delete_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; - if ( b == yy_current_buffer ) - yy_current_buffer = (YY_BUFFER_STATE) 0; + if ( b == YY_CURRENT_BUFFER ) /* Not sure if we should pop here. */ + YY_CURRENT_BUFFER_LVALUE = (YY_BUFFER_STATE) 0; if ( b->yy_is_our_buffer ) - yy_flex_free( (void *) b->yy_ch_buf ); - - yy_flex_free( (void *) b ); - } - + yyfree((void *) b->yy_ch_buf ); -#ifndef _WIN32 -#include -#else -#ifndef YY_ALWAYS_INTERACTIVE -#ifndef YY_NEVER_INTERACTIVE -extern int isatty YY_PROTO(( int )); -#endif -#endif -#endif - -#ifdef YY_USE_PROTOS -void yy_init_buffer( YY_BUFFER_STATE b, FILE *file ) -#else -void yy_init_buffer( b, file ) -YY_BUFFER_STATE b; -FILE *file; -#endif + yyfree((void *) b ); +} +#ifndef __cplusplus +extern int isatty (int ); +#endif /* __cplusplus */ + +/* Initializes or reinitializes a buffer. + * This function is sometimes called more than once on the same buffer, + * such as during a yyrestart() or at EOF. + */ + static void yy_init_buffer (YY_BUFFER_STATE b, FILE * file ) - { - yy_flush_buffer( b ); +{ + int oerrno = errno; + + yy_flush_buffer(b ); b->yy_input_file = file; b->yy_fill_buffer = 1; -#if YY_ALWAYS_INTERACTIVE - b->yy_is_interactive = 1; -#else -#if YY_NEVER_INTERACTIVE - b->yy_is_interactive = 0; -#else - b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; -#endif -#endif - } - - -#ifdef YY_USE_PROTOS -void yy_flush_buffer( YY_BUFFER_STATE b ) -#else -void yy_flush_buffer( b ) -YY_BUFFER_STATE b; -#endif + /* If b is the current buffer, then yy_init_buffer was _probably_ + * called from yyrestart() or through yy_get_next_buffer. + * In that case, we don't want to reset the lineno or column. + */ + if (b != YY_CURRENT_BUFFER){ + b->yy_bs_lineno = 1; + b->yy_bs_column = 0; + } + + b->yy_is_interactive = file ? (isatty( fileno(file) ) > 0) : 0; + + errno = oerrno; +} - { - if ( ! b ) +/** Discard all buffered characters. On the next scan, YY_INPUT will be called. + * @param b the buffer state to be flushed, usually @c YY_CURRENT_BUFFER. + * + */ + void yy_flush_buffer (YY_BUFFER_STATE b ) +{ + if ( ! b ) return; b->yy_n_chars = 0; @@ -1430,29 +1515,125 @@ b->yy_at_bol = 1; b->yy_buffer_status = YY_BUFFER_NEW; - if ( b == yy_current_buffer ) - yy_load_buffer_state(); + if ( b == YY_CURRENT_BUFFER ) + yy_load_buffer_state( ); +} + +/** Pushes the new state onto the stack. The new state becomes + * the current state. This function will allocate the stack + * if necessary. + * @param new_buffer The new state. + * + */ +void yypush_buffer_state (YY_BUFFER_STATE new_buffer ) +{ + if (new_buffer == NULL) + return; + + yyensure_buffer_stack(); + + /* This block is copied from yy_switch_to_buffer. */ + if ( YY_CURRENT_BUFFER ) + { + /* Flush out information for old buffer. */ + *(yy_c_buf_p) = (yy_hold_char); + YY_CURRENT_BUFFER_LVALUE->yy_buf_pos = (yy_c_buf_p); + YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); + } + + /* Only push if top exists. Otherwise, replace top. */ + if (YY_CURRENT_BUFFER) + (yy_buffer_stack_top)++; + YY_CURRENT_BUFFER_LVALUE = new_buffer; + + /* copied from yy_switch_to_buffer. */ + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; +} + +/** Removes and deletes the top of the stack, if present. + * The next element becomes the new top. + * + */ +void yypop_buffer_state (void) +{ + if (!YY_CURRENT_BUFFER) + return; + + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + if ((yy_buffer_stack_top) > 0) + --(yy_buffer_stack_top); + + if (YY_CURRENT_BUFFER) { + yy_load_buffer_state( ); + (yy_did_buffer_switch_on_eof) = 1; } +} +/* Allocates the stack if it does not exist. + * Guarantees space for at least one push. + */ +static void yyensure_buffer_stack (void) +{ + int num_to_alloc; + + if (!(yy_buffer_stack)) { + + /* First allocation is just for 2 elements, since we don't know if this + * scanner will even need a stack. We use 2 instead of 1 to avoid an + * immediate realloc on the next call. + */ + num_to_alloc = 1; + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc + (num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + memset((yy_buffer_stack), 0, num_to_alloc * sizeof(struct yy_buffer_state*)); + + (yy_buffer_stack_max) = num_to_alloc; + (yy_buffer_stack_top) = 0; + return; + } -#ifndef YY_NO_SCAN_BUFFER -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_buffer( char *base, yy_size_t size ) -#else -YY_BUFFER_STATE yy_scan_buffer( base, size ) -char *base; -yy_size_t size; -#endif - { - YY_BUFFER_STATE b; + if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ + + /* Increase the buffer to prepare for a possible push. */ + int grow_size = 8 /* arbitrary grow size */; + num_to_alloc = (yy_buffer_stack_max) + grow_size; + (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc + ((yy_buffer_stack), + num_to_alloc * sizeof(struct yy_buffer_state*) + ); + if ( ! (yy_buffer_stack) ) + YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" ); + + /* zero only the new slots.*/ + memset((yy_buffer_stack) + (yy_buffer_stack_max), 0, grow_size * sizeof(struct yy_buffer_state*)); + (yy_buffer_stack_max) = num_to_alloc; + } +} + +/** Setup the input buffer state to scan directly from a user-specified character buffer. + * @param base the character buffer + * @param size the size in bytes of the character buffer + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_buffer (char * base, yy_size_t size ) +{ + YY_BUFFER_STATE b; + if ( size < 2 || base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ return 0; - b = (YY_BUFFER_STATE) yy_flex_alloc( sizeof( struct yy_buffer_state ) ); + b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_buffer()" ); @@ -1466,56 +1647,51 @@ b->yy_fill_buffer = 0; b->yy_buffer_status = YY_BUFFER_NEW; - yy_switch_to_buffer( b ); + yy_switch_to_buffer(b ); return b; - } -#endif - - -#ifndef YY_NO_SCAN_STRING -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_string( yyconst char *yy_str ) -#else -YY_BUFFER_STATE yy_scan_string( yy_str ) -yyconst char *yy_str; -#endif - { - int len; - for ( len = 0; yy_str[len]; ++len ) - ; - - return yy_scan_bytes( yy_str, len ); - } -#endif +} +/** Setup the input buffer state to scan a string. The next call to yylex() will + * scan from a @e copy of @a str. + * @param yystr a NUL-terminated string to scan + * + * @return the newly allocated buffer state object. + * @note If you want to scan bytes that may contain NUL values, then use + * yy_scan_bytes() instead. + */ +YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) +{ + + return yy_scan_bytes(yystr,strlen(yystr) ); +} -#ifndef YY_NO_SCAN_BYTES -#ifdef YY_USE_PROTOS -YY_BUFFER_STATE yy_scan_bytes( yyconst char *bytes, int len ) -#else -YY_BUFFER_STATE yy_scan_bytes( bytes, len ) -yyconst char *bytes; -int len; -#endif - { +/** Setup the input buffer state to scan the given bytes. The next call to yylex() will + * scan from a @e copy of @a bytes. + * @param bytes the byte buffer to scan + * @param len the number of bytes in the buffer pointed to by @a bytes. + * + * @return the newly allocated buffer state object. + */ +YY_BUFFER_STATE yy_scan_bytes (yyconst char * yybytes, int _yybytes_len ) +{ YY_BUFFER_STATE b; char *buf; yy_size_t n; int i; - + /* Get memory for full buffer, including space for trailing EOB's. */ - n = len + 2; - buf = (char *) yy_flex_alloc( n ); + n = _yybytes_len + 2; + buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); - for ( i = 0; i < len; ++i ) - buf[i] = bytes[i]; + for ( i = 0; i < _yybytes_len; ++i ) + buf[i] = yybytes[i]; - buf[len] = buf[len+1] = YY_END_OF_BUFFER_CHAR; + buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR; - b = yy_scan_buffer( buf, n ); + b = yy_scan_buffer(buf,n ); if ( ! b ) YY_FATAL_ERROR( "bad buffer in yy_scan_bytes()" ); @@ -1525,148 +1701,196 @@ b->yy_is_our_buffer = 1; return b; - } -#endif - +} -#ifndef YY_NO_PUSH_STATE -#ifdef YY_USE_PROTOS -static void yy_push_state( int new_state ) -#else -static void yy_push_state( new_state ) -int new_state; +#ifndef YY_EXIT_FAILURE +#define YY_EXIT_FAILURE 2 #endif - { - if ( yy_start_stack_ptr >= yy_start_stack_depth ) - { - yy_size_t new_size; - yy_start_stack_depth += YY_START_STACK_INCR; - new_size = yy_start_stack_depth * sizeof( int ); +static void yy_fatal_error (yyconst char* msg ) +{ + (void) fprintf( stderr, "%s\n", msg ); + exit( YY_EXIT_FAILURE ); +} - if ( ! yy_start_stack ) - yy_start_stack = (int *) yy_flex_alloc( new_size ); +/* Redefine yyless() so it works in section 3 code. */ - else - yy_start_stack = (int *) yy_flex_realloc( - (void *) yy_start_stack, new_size ); +#undef yyless +#define yyless(n) \ + do \ + { \ + /* Undo effects of setting up yytext. */ \ + int yyless_macro_arg = (n); \ + YY_LESS_LINENO(yyless_macro_arg);\ + yytext[yyleng] = (yy_hold_char); \ + (yy_c_buf_p) = yytext + yyless_macro_arg; \ + (yy_hold_char) = *(yy_c_buf_p); \ + *(yy_c_buf_p) = '\0'; \ + yyleng = yyless_macro_arg; \ + } \ + while ( 0 ) - if ( ! yy_start_stack ) - YY_FATAL_ERROR( - "out of memory expanding start-condition stack" ); - } +/* Accessor methods (get/set functions) to struct members. */ - yy_start_stack[yy_start_stack_ptr++] = YY_START; +/** Get the current line number. + * + */ +int yyget_lineno (void) +{ + + return yylineno; +} - BEGIN(new_state); - } -#endif +/** Get the input stream. + * + */ +FILE *yyget_in (void) +{ + return yyin; +} +/** Get the output stream. + * + */ +FILE *yyget_out (void) +{ + return yyout; +} -#ifndef YY_NO_POP_STATE -static void yy_pop_state() - { - if ( --yy_start_stack_ptr < 0 ) - YY_FATAL_ERROR( "start-condition stack underflow" ); +/** Get the length of the current token. + * + */ +int yyget_leng (void) +{ + return yyleng; +} - BEGIN(yy_start_stack[yy_start_stack_ptr]); - } -#endif +/** Get the current token. + * + */ +char *yyget_text (void) +{ + return yytext; +} -#ifndef YY_NO_TOP_STATE -static int yy_top_state() - { - return yy_start_stack[yy_start_stack_ptr - 1]; - } -#endif +/** Set the current line number. + * @param line_number + * + */ +void yyset_lineno (int line_number ) +{ + + yylineno = line_number; +} -#ifndef YY_EXIT_FAILURE -#define YY_EXIT_FAILURE 2 -#endif +/** Set the input stream. This does not discard the current + * input buffer. + * @param in_str A readable stream. + * + * @see yy_switch_to_buffer + */ +void yyset_in (FILE * in_str ) +{ + yyin = in_str ; +} -#ifdef YY_USE_PROTOS -static void yy_fatal_error( yyconst char msg[] ) -#else -static void yy_fatal_error( msg ) -char msg[]; -#endif - { - (void) fprintf( stderr, "%s\n", msg ); - exit( YY_EXIT_FAILURE ); - } +void yyset_out (FILE * out_str ) +{ + yyout = out_str ; +} +int yyget_debug (void) +{ + return yy_flex_debug; +} +void yyset_debug (int bdebug ) +{ + yy_flex_debug = bdebug ; +} -/* Redefine yyless() so it works in section 3 code. */ +static int yy_init_globals (void) +{ + /* Initialization is the same as for the non-reentrant scanner. + * This function is called from yylex_destroy(), so don't allocate here. + */ + + (yy_buffer_stack) = 0; + (yy_buffer_stack_top) = 0; + (yy_buffer_stack_max) = 0; + (yy_c_buf_p) = (char *) 0; + (yy_init) = 0; + (yy_start) = 0; + +/* Defined in main.c */ +#ifdef YY_STDINIT + yyin = stdin; + yyout = stdout; +#else + yyin = (FILE *) 0; + yyout = (FILE *) 0; +#endif + + /* For future reference: Set errno on error, since we are called by + * yylex_init() + */ + return 0; +} -#undef yyless -#define yyless(n) \ - do \ - { \ - /* Undo effects of setting up yytext. */ \ - yytext[yyleng] = yy_hold_char; \ - yy_c_buf_p = yytext + n; \ - yy_hold_char = *yy_c_buf_p; \ - *yy_c_buf_p = '\0'; \ - yyleng = n; \ - } \ - while ( 0 ) +/* yylex_destroy is for both reentrant and non-reentrant scanners. */ +int yylex_destroy (void) +{ + + /* Pop the buffer stack, destroying each element. */ + while(YY_CURRENT_BUFFER){ + yy_delete_buffer(YY_CURRENT_BUFFER ); + YY_CURRENT_BUFFER_LVALUE = NULL; + yypop_buffer_state(); + } + + /* Destroy the stack itself. */ + yyfree((yy_buffer_stack) ); + (yy_buffer_stack) = NULL; + + /* Reset the globals. This is important in a non-reentrant scanner so the next time + * yylex() is called, initialization will occur. */ + yy_init_globals( ); + return 0; +} -/* Internal utility routines. */ +/* + * Internal utility routines. + */ #ifndef yytext_ptr -#ifdef YY_USE_PROTOS -static void yy_flex_strncpy( char *s1, yyconst char *s2, int n ) -#else -static void yy_flex_strncpy( s1, s2, n ) -char *s1; -yyconst char *s2; -int n; -#endif - { +static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) +{ register int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; - } +} #endif #ifdef YY_NEED_STRLEN -#ifdef YY_USE_PROTOS -static int yy_flex_strlen( yyconst char *s ) -#else -static int yy_flex_strlen( s ) -yyconst char *s; -#endif - { +static int yy_flex_strlen (yyconst char * s ) +{ register int n; for ( n = 0; s[n]; ++n ) ; return n; - } +} #endif - -#ifdef YY_USE_PROTOS -static void *yy_flex_alloc( yy_size_t size ) -#else -static void *yy_flex_alloc( size ) -yy_size_t size; -#endif - { +void *yyalloc (yy_size_t size ) +{ return (void *) malloc( size ); - } +} -#ifdef YY_USE_PROTOS -static void *yy_flex_realloc( void *ptr, yy_size_t size ) -#else -static void *yy_flex_realloc( ptr, size ) -void *ptr; -yy_size_t size; -#endif - { +void *yyrealloc (void * ptr, yy_size_t size ) +{ /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -1675,26 +1899,17 @@ * as though doing an assignment. */ return (void *) realloc( (char *) ptr, size ); - } +} -#ifdef YY_USE_PROTOS -static void yy_flex_free( void *ptr ) -#else -static void yy_flex_free( ptr ) -void *ptr; -#endif - { - free( ptr ); - } +void yyfree (void * ptr ) +{ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ +} + +#define YYTABLES_NAME "yytables" + +#line 107 "calclex.l" -#if YY_MAIN -int main() - { - yylex(); - return 0; - } -#endif -#line 108 "calclex.l" int @@ -1702,3 +1917,4 @@ { return 1; } + diff -Nru gmp-4.3.2+dfsg/demos/calc/Makefile.in gmp-5.0.2+dfsg/demos/calc/Makefile.in --- gmp-4.3.2+dfsg/demos/calc/Makefile.in 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/calc/Makefile.in 2011-08-30 01:19:39.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -107,7 +107,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -131,10 +130,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -174,6 +172,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -207,10 +206,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -240,7 +239,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/demos/expr/Makefile.in gmp-5.0.2+dfsg/demos/expr/Makefile.in --- gmp-4.3.2+dfsg/demos/expr/Makefile.in 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/expr/Makefile.in 2011-08-30 01:19:39.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -103,7 +103,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -127,10 +126,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -170,6 +168,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -203,10 +202,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -236,7 +235,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/demos/expr/README gmp-5.0.2+dfsg/demos/expr/README --- gmp-4.3.2+dfsg/demos/expr/README 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/expr/README 2011-05-08 09:49:29.000000000 +0000 @@ -474,7 +474,7 @@ There would want to be a standard table without assignments available though, so user input could be safely parsed. -The closing parethesis table entry could specify the type of open paren it +The closing parenthesis table entry could specify the type of open paren it expects, so that "(" and ")" could match and "[" and "]" match but not a mixture of the two. Currently "[" and "]" can be added, but there's no error on writing a mixed expression like "2*(3+4]". Maybe also there could diff -Nru gmp-4.3.2+dfsg/demos/factorize.c gmp-5.0.2+dfsg/demos/factorize.c --- gmp-4.3.2+dfsg/demos/factorize.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/factorize.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* Factoring with Pollard's rho method. -Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005 Free Software -Foundation, Inc. +Copyright 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2005, 2009 +Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -35,7 +35,7 @@ unsigned *addv = add; unsigned int failures; - if (flag_verbose) + if (flag_verbose > 0) { printf ("[trial division (%u)] ", limit); fflush (stdout); @@ -98,8 +98,7 @@ } } - mpz_clear (q); - mpz_clear (r); + mpz_clears (q, r, NULL); } void @@ -109,7 +108,7 @@ mpz_t f; unsigned int k; - if (flag_verbose) + if (flag_verbose > 0) { printf ("[trial division (%u)] ", limit); fflush (stdout); @@ -132,129 +131,133 @@ mpz_add_ui (f, f, 2 * p); } - mpz_clear (f); - mpz_clear (r); + mpz_clears (f, r, NULL); } void -factor_using_pollard_rho (mpz_t n, int a_int, unsigned long p) +factor_using_pollard_rho (mpz_t n, unsigned long a, unsigned long p) { mpz_t x, x1, y, P; - mpz_t a; - mpz_t g; mpz_t t1, t2; - int k, l, c, i; + unsigned long long k, l, i; - if (flag_verbose) + if (flag_verbose > 0) { - printf ("[pollard-rho (%d)] ", a_int); + printf ("[pollard-rho (%lu)] ", a); fflush (stdout); } - mpz_init (g); - mpz_init (t1); - mpz_init (t2); - - mpz_init_set_si (a, a_int); + mpz_inits (t1, t2, NULL); mpz_init_set_si (y, 2); mpz_init_set_si (x, 2); mpz_init_set_si (x1, 2); + mpz_init_set_ui (P, 1); k = 1; l = 1; - mpz_init_set_ui (P, 1); - c = 0; while (mpz_cmp_ui (n, 1) != 0) { -S2: - if (p != 0) - { - mpz_powm_ui (x, x, p, n); mpz_add (x, x, a); - } - else - { - mpz_mul (x, x, x); mpz_add (x, x, a); mpz_mod (x, x, n); - } - mpz_sub (t1, x1, x); mpz_mul (t2, P, t1); mpz_mod (P, t2, n); - c++; - if (c == 20) - { - c = 0; - mpz_gcd (g, P, n); - if (mpz_cmp_ui (g, 1) != 0) - goto S4; - mpz_set (y, x); - } -S3: - k--; - if (k > 0) - goto S2; - - mpz_gcd (g, P, n); - if (mpz_cmp_ui (g, 1) != 0) - goto S4; - - mpz_set (x1, x); - k = l; - l = 2 * l; - for (i = 0; i < k; i++) + for (;;) { - if (p != 0) + do { - mpz_powm_ui (x, x, p, n); mpz_add (x, x, a); + if (p != 0) + { + mpz_powm_ui (x, x, p, n); + mpz_add_ui (x, x, a); + } + else + { + mpz_mul (t1, x, x); + mpz_mod (x, t1, n); + mpz_add_ui (x, x, a); + } + + mpz_sub (t1, x1, x); + mpz_mul (t2, P, t1); + mpz_mod (P, t2, n); + + if (k % 32 == 1) + { + mpz_gcd (t1, P, n); + if (mpz_cmp_ui (t1, 1) != 0) + goto factor_found; + mpz_set (y, x); + } } - else + while (--k != 0); + + mpz_gcd (t1, P, n); + if (mpz_cmp_ui (t1, 1) != 0) + goto factor_found; + + mpz_set (x1, x); + k = l; + l = 2 * l; + for (i = 0; i < k; i++) { - mpz_mul (x, x, x); mpz_add (x, x, a); mpz_mod (x, x, n); + if (p != 0) + { + mpz_powm_ui (x, x, p, n); + mpz_add_ui (x, x, a); + } + else + { + mpz_mul (t1, x, x); + mpz_mod (x, t1, n); + mpz_add_ui (x, x, a); + } } + mpz_set (y, x); } - mpz_set (y, x); - c = 0; - goto S2; -S4: + + factor_found: do { if (p != 0) { - mpz_powm_ui (y, y, p, n); mpz_add (y, y, a); + mpz_powm_ui (y, y, p, n); mpz_add_ui (y, y, a); } else { - mpz_mul (y, y, y); mpz_add (y, y, a); mpz_mod (y, y, n); + mpz_mul (t1, y, y); + mpz_mod (y, t1, n); + mpz_add_ui (y, y, a); } - mpz_sub (t1, x1, y); mpz_gcd (g, t1, n); + mpz_sub (t1, x1, y); + mpz_gcd (t1, t1, n); } - while (mpz_cmp_ui (g, 1) == 0); + while (mpz_cmp_ui (t1, 1) == 0); - mpz_div (n, n, g); /* divide by g, before g is overwritten */ + mpz_divexact (n, n, t1); /* divide by t1, before t1 is overwritten */ - if (!mpz_probab_prime_p (g, 3)) + if (!mpz_probab_prime_p (t1, 10)) { do { mp_limb_t a_limb; mpn_random (&a_limb, (mp_size_t) 1); - a_int = (int) a_limb; + a = a_limb; } - while (a_int == -2 || a_int == 0); + while (a == 0); - if (flag_verbose) + if (flag_verbose > 0) { printf ("[composite factor--restarting pollard-rho] "); fflush (stdout); } - factor_using_pollard_rho (g, a_int, p); + factor_using_pollard_rho (t1, a, p); } else { - mpz_out_str (stdout, 10, g); + mpz_out_str (stdout, 10, t1); fflush (stdout); fputc (' ', stdout); } mpz_mod (x, x, n); mpz_mod (x1, x1, n); mpz_mod (y, y, n); - if (mpz_probab_prime_p (n, 3)) + if (mpz_probab_prime_p (n, 10)) { mpz_out_str (stdout, 10, n); fflush (stdout); @@ -263,14 +266,7 @@ } } - mpz_clear (g); - mpz_clear (P); - mpz_clear (t2); - mpz_clear (t1); - mpz_clear (a); - mpz_clear (x1); - mpz_clear (x); - mpz_clear (y); + mpz_clears (P, t2, t1, x1, x, y, NULL); } void @@ -295,15 +291,15 @@ if (mpz_cmp_ui (t, 1) != 0) { - if (flag_verbose) + if (flag_verbose > 0) { printf ("[is number prime?] "); fflush (stdout); } - if (mpz_probab_prime_p (t, 3)) + if (mpz_probab_prime_p (t, 10)) mpz_out_str (stdout, 10, t); else - factor_using_pollard_rho (t, 1, p); + factor_using_pollard_rho (t, 1L, p); } } @@ -320,6 +316,12 @@ argv++; argc--; } + if (argc > 1 && !strcmp (argv[1], "-q")) + { + flag_verbose = -1; + argv++; + argc--; + } mpz_init (t); if (argc > 1) @@ -360,7 +362,10 @@ mpz_inp_str (t, stdin, 0); if (feof (stdin)) break; - mpz_out_str (stdout, 10, t); printf (" = "); + if (flag_verbose >= 0) + { + mpz_out_str (stdout, 10, t); printf (" = "); + } factor (t, 0); puts (""); } diff -Nru gmp-4.3.2+dfsg/demos/Makefile.in gmp-5.0.2+dfsg/demos/Makefile.in --- gmp-4.3.2+dfsg/demos/Makefile.in 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/Makefile.in 2011-08-30 01:19:39.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -149,7 +149,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -173,10 +172,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -216,6 +214,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -249,10 +248,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -282,7 +281,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -406,7 +404,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -431,7 +429,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru gmp-4.3.2+dfsg/demos/perl/GMP.pm gmp-5.0.2+dfsg/demos/perl/GMP.pm --- gmp-4.3.2+dfsg/demos/perl/GMP.pm 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/perl/GMP.pm 2011-05-08 09:49:29.000000000 +0000 @@ -209,7 +209,7 @@ string of byte data, which will be a multiple of $size bytes. C returns the inverse, or undef if it doesn't exist. C -returns a remainder/multiplicty pair. C returns the nth root, and +returns a remainder/multiplicity pair. C returns the nth root, and C returns a root/bool pair, the bool indicating whether the root is exact. C and C return a root/remainder pair. @@ -477,7 +477,7 @@ Arguments to operators and functions are converted as necessary to the appropriate type. For instance C<**> requires an unsigned integer exponent, and an mpq argument will be converted, so long as it's an integer in the -apropriate range. +appropriate range. use GMP::Mpz (mpz); use GMP::Mpq (mpq); diff -Nru gmp-4.3.2+dfsg/demos/perl/typemap gmp-5.0.2+dfsg/demos/perl/typemap --- gmp-4.3.2+dfsg/demos/perl/typemap 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/perl/typemap 2011-05-08 09:49:29.000000000 +0000 @@ -73,7 +73,7 @@ ORDER_NOSWAP assert ($arg != &PL_sv_yes); DUMMY - /* dummy $var */ + /* dummy $var */ CONST_STRING_ASSUME /* No need to check for SvPOKp and use SvPV, this mapping is only used for overload_constant, which always gets literal diff -Nru gmp-4.3.2+dfsg/demos/primes.c gmp-5.0.2+dfsg/demos/primes.c --- gmp-4.3.2+dfsg/demos/primes.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/demos/primes.c 2011-05-08 09:49:29.000000000 +0000 @@ -283,7 +283,7 @@ { start = (prime - mpz_tdiv_ui (fr, prime)) % prime; if (start % 2 != 0) - start += prime; /* adjust if even divisable */ + start += prime; /* adjust if even divisible */ } start2 = start / 2; } diff -Nru gmp-4.3.2+dfsg/doc/Makefile.in gmp-5.0.2+dfsg/doc/Makefile.in --- gmp-4.3.2+dfsg/doc/Makefile.in 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/doc/Makefile.in 2011-08-30 01:19:39.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -59,7 +59,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -83,10 +82,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -126,6 +124,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -159,10 +158,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -192,7 +191,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/dumbmp.c gmp-5.0.2+dfsg/dumbmp.c --- gmp-4.3.2+dfsg/dumbmp.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/dumbmp.c 2011-05-08 09:49:29.000000000 +0000 @@ -101,16 +101,41 @@ dst[i] = src[i]; } -int -isprime (int n) +static int +isprime (unsigned long int t) { - int i; - if (n < 2) + unsigned long int q, r, d; + + if (t < 32) + return (0xa08a28acUL >> t) & 1; + if ((t & 1) == 0) + return 0; + + if (t % 3 == 0) return 0; - for (i = 2; i < n; i++) - if ((n % i) == 0) - return 0; - return 1; + if (t % 5 == 0) + return 0; + if (t % 7 == 0) + return 0; + + for (d = 11;;) + { + q = t / d; + r = t - q * d; + if (q < d) + return 1; + if (r == 0) + break; + d += 2; + q = t / d; + r = t - q * d; + if (q < d) + return 1; + if (r == 0) + break; + d += 4; + } + return 0; } int @@ -679,6 +704,16 @@ } void +mpz_tdiv_r (mpz_t r, mpz_t a, mpz_t b) +{ + mpz_t q; + + mpz_init (q); + mpz_tdiv_qr (q, r, a, b); + mpz_clear (q); +} + +void mpz_tdiv_q_ui (mpz_t q, mpz_t n, unsigned long d) { mpz_t dz; diff -Nru gmp-4.3.2+dfsg/gen-trialdivtab.c gmp-5.0.2+dfsg/gen-trialdivtab.c --- gmp-4.3.2+dfsg/gen-trialdivtab.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/gen-trialdivtab.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,298 @@ +/* gen-trialdivtab.c + + Contributed to the GNU project by Torbjorn Granlund. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +/* + Generate tables for fast, division-free trial division for GMP. + + There is one main table, ptab. It contains primes, multiplied together, and + several types of pre-computed inverses. It refers to tables of the type + dtab, via the last two indices. That table contains the individual primes in + the range, except that the primes are not actually included in the table (see + the P macro; it sneakingly excludes the primes themselves). Instead, the + dtab tables contains tuples for each prime (modular-inverse, limit) used for + divisibility checks. + + This interface is not intended for division of very many primes, since then + other algorithms apply. +*/ + +#include +#include +#include "dumbmp.c" + +int sumspills (mpz_t, mpz_t *, int); +void mpn_mod_1s_4p_cps (mpz_t [7], mpz_t); + +int limb_bits; + +mpz_t B; + +int +main (int argc, char *argv[]) +{ + unsigned long t, p; + mpz_t ppp, acc, inv, gmp_numb_max, tmp, Bhalf; + mpz_t pre[7]; + int i; + int start_p, end_p, interval_start, interval_end, omitted_p; + char *endtok; + int stop; + int np, start_idx; + + if (argc < 2) + { + fprintf (stderr, "usage: %s bits endprime\n", argv[0]); + exit (1); + } + + limb_bits = atoi (argv[1]); + + end_p = 1290; /* default end prime */ + if (argc == 3) + end_p = atoi (argv[2]); + + printf ("#if GMP_LIMB_BITS != %d\n", limb_bits); + printf ("#error This table is for GMP_LIMB_BITS = %d\n", limb_bits); + printf ("#endif\n\n"); + + printf ("#if GMP_NAIL_BITS != 0\n"); + printf ("#error This table does not support nails\n"); + printf ("#endif\n\n"); + + for (i = 0; i < 7; i++) + mpz_init (pre[i]); + + mpz_init_set_ui (gmp_numb_max, 1); + mpz_mul_2exp (gmp_numb_max, gmp_numb_max, limb_bits); + mpz_sub_ui (gmp_numb_max, gmp_numb_max, 1); + + mpz_init (tmp); + mpz_init (inv); + + mpz_init_set_ui (B, 1); mpz_mul_2exp (B, B, limb_bits); + mpz_init_set_ui (Bhalf, 1); mpz_mul_2exp (Bhalf, Bhalf, limb_bits - 1); + + start_p = 3; + + mpz_init_set_ui (ppp, 1); + mpz_init (acc); + interval_start = start_p; + omitted_p = 3; + interval_end = 0; + + printf ("static struct gmp_primes_dtab gmp_primes_dtab[] = {\n"); + + for (t = start_p; t <= end_p; t += 2) + { + if (! isprime (t)) + continue; + + mpz_mul_ui (acc, ppp, t); + stop = mpz_cmp (acc, Bhalf) >= 0; + if (!stop) + { + mpn_mod_1s_4p_cps (pre, acc); + stop = sumspills (acc, pre + 2, 5); + } + + if (stop) + { + for (p = interval_start; p <= interval_end; p += 2) + { + if (! isprime (p)) + continue; + + printf (" P(%d,", (int) p); + mpz_invert_ui_2exp (inv, p, limb_bits); + printf ("CNST_LIMB(0x"); mpz_out_str (stdout, 16, inv); printf ("),"); + + mpz_tdiv_q_ui (tmp, gmp_numb_max, p); + printf ("CNST_LIMB(0x"); mpz_out_str (stdout, 16, tmp); + printf (")),\n"); + } + mpz_set_ui (ppp, t); + interval_start = t; + omitted_p = t; + } + else + { + mpz_set (ppp, acc); + } + interval_end = t; + } + printf (" P(0,0,0)\n};\n"); + + + printf ("static struct gmp_primes_ptab gmp_primes_ptab[] = {\n"); + + endtok = ""; + + mpz_set_ui (ppp, 1); + interval_start = start_p; + interval_end = 0; + np = 0; + start_idx = 0; + for (t = start_p; t <= end_p; t += 2) + { + if (! isprime (t)) + continue; + + mpz_mul_ui (acc, ppp, t); + + stop = mpz_cmp (acc, Bhalf) >= 0; + if (!stop) + { + mpn_mod_1s_4p_cps (pre, acc); + stop = sumspills (acc, pre + 2, 5); + } + + if (stop) + { + mpn_mod_1s_4p_cps (pre, ppp); + printf ("%s", endtok); + printf (" {CNST_LIMB(0x"); mpz_out_str (stdout, 16, ppp); + printf ("),{CNST_LIMB(0x"); mpz_out_str (stdout, 16, pre[0]); + printf ("),%d", (int) PTR(pre[1])[0]); + for (i = 0; i < 5; i++) + { + printf (","); + printf ("CNST_LIMB(0x"); mpz_out_str (stdout, 16, pre[2 + i]); + printf (")"); + } + printf ("},"); + printf ("%d,", start_idx); + printf ("%d}", np - start_idx); + + endtok = ",\n"; + mpz_set_ui (ppp, t); + interval_start = t; + start_idx = np; + } + else + { + mpz_set (ppp, acc); + } + interval_end = t; + np++; + } + printf ("\n};\n"); + + printf ("#define SMALLEST_OMITTED_PRIME %d\n", (int) omitted_p); + + return 0; +} + +unsigned long +mpz_log2 (mpz_t x) +{ + mpz_t y; + unsigned long cnt; + + mpz_init (y); + mpz_set (y, x); + cnt = 0; + while (mpz_sgn (y) != 0) + { + mpz_tdiv_q_2exp (y, y, 1); + cnt++; + } + mpz_clear (y); + + return cnt; +} + +void +mpn_mod_1s_4p_cps (mpz_t cps[7], mpz_t bparm) +{ + mpz_t b, bi; + mpz_t B1modb, B2modb, B3modb, B4modb, B5modb; + mpz_t t; + int cnt; + + mpz_init_set (b, bparm); + + cnt = limb_bits - mpz_log2 (b); + + mpz_init (bi); + mpz_init (t); + mpz_init (B1modb); + mpz_init (B2modb); + mpz_init (B3modb); + mpz_init (B4modb); + mpz_init (B5modb); + + mpz_set_ui (t, 1); + mpz_mul_2exp (t, t, limb_bits - cnt); + mpz_sub (t, t, b); + mpz_mul_2exp (t, t, limb_bits); + mpz_tdiv_q (bi, t, b); /* bi = B^2/b, except msb */ + + mpz_set_ui (t, 1); + mpz_mul_2exp (t, t, limb_bits); /* t = B */ + mpz_tdiv_r (B1modb, t, b); + + mpz_mul_2exp (t, B1modb, limb_bits); + mpz_tdiv_r (B2modb, t, b); + + mpz_mul_2exp (t, B2modb, limb_bits); + mpz_tdiv_r (B3modb, t, b); + + mpz_mul_2exp (t, B3modb, limb_bits); + mpz_tdiv_r (B4modb, t, b); + + mpz_mul_2exp (t, B4modb, limb_bits); + mpz_tdiv_r (B5modb, t, b); + + mpz_set (cps[0], bi); + mpz_set_ui (cps[1], cnt); + mpz_tdiv_q_2exp (cps[2], B1modb, 0); + mpz_tdiv_q_2exp (cps[3], B2modb, 0); + mpz_tdiv_q_2exp (cps[4], B3modb, 0); + mpz_tdiv_q_2exp (cps[5], B4modb, 0); + mpz_tdiv_q_2exp (cps[6], B5modb, 0); + + mpz_clear (b); + mpz_clear (bi); + mpz_clear (t); + mpz_clear (B1modb); + mpz_clear (B2modb); + mpz_clear (B3modb); + mpz_clear (B4modb); + mpz_clear (B5modb); +} + +int +sumspills (mpz_t ppp, mpz_t *a, int n) +{ + mpz_t s; + int i, ret; + + mpz_init_set (s, a[0]); + + for (i = 1; i < n; i++) + { + mpz_add (s, s, a[i]); + } + ret = mpz_cmp (s, B) >= 0; + mpz_clear (s); + + return ret; +} diff -Nru gmp-4.3.2+dfsg/gmp-h.in gmp-5.0.2+dfsg/gmp-h.in --- gmp-4.3.2+dfsg/gmp-h.in 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/gmp-h.in 2011-05-08 09:49:29.000000000 +0000 @@ -28,10 +28,9 @@ /* Instantiated by configure. */ #if ! defined (__GMP_WITHIN_CONFIGURE) -#define __GMP_BITS_PER_MP_LIMB @BITS_PER_MP_LIMB@ #define __GMP_HAVE_HOST_CPU_FAMILY_power @HAVE_HOST_CPU_FAMILY_power@ #define __GMP_HAVE_HOST_CPU_FAMILY_powerpc @HAVE_HOST_CPU_FAMILY_powerpc@ -#define GMP_LIMB_BITS @BITS_PER_MP_LIMB@ +#define GMP_LIMB_BITS @GMP_LIMB_BITS@ #define GMP_NAIL_BITS @GMP_NAIL_BITS@ #endif #define GMP_NUMB_BITS (GMP_LIMB_BITS - GMP_NAIL_BITS) @@ -44,7 +43,7 @@ gmp.h and mp.h to allow both to be included in an application or during the library build. */ #ifndef __GNU_MP__ -#define __GNU_MP__ 4 +#define __GNU_MP__ 5 #define __need_size_t /* tell gcc stddef.h we only want size_t */ #if defined (__cplusplus) @@ -195,6 +194,7 @@ typedef long int mp_limb_signed_t; #endif #endif +typedef unsigned long int mp_bitcnt_t; /* For reference, note that the name __mpz_struct gets into C++ mangled function names, which means although the "__" suggests an internal, we @@ -460,13 +460,13 @@ #define __GMP_EXTERN_INLINE __inline #endif -/* Recent enough Sun C compilers accept "extern inline" */ +/* Recent enough Sun C compilers want "inline" */ #if defined (__SUNPRO_C) && __SUNPRO_C >= 0x560 \ && ! defined (__GMP_EXTERN_INLINE) -#define __GMP_EXTERN_INLINE extern inline +#define __GMP_EXTERN_INLINE inline #endif -/* Somewhat older Sun C compilers accept "static inline" */ +/* Somewhat older Sun C compilers want "static inline" */ #if defined (__SUNPRO_C) && __SUNPRO_C >= 0x540 \ && ! defined (__GMP_EXTERN_INLINE) #define __GMP_EXTERN_INLINE static inline @@ -569,11 +569,11 @@ #define gmp_randinit_lc_2exp __gmp_randinit_lc_2exp __GMP_DECLSPEC void gmp_randinit_lc_2exp __GMP_PROTO ((gmp_randstate_t, - mpz_srcptr, unsigned long int, - unsigned long int)); + mpz_srcptr, unsigned long int, + mp_bitcnt_t)); #define gmp_randinit_lc_2exp_size __gmp_randinit_lc_2exp_size -__GMP_DECLSPEC int gmp_randinit_lc_2exp_size __GMP_PROTO ((gmp_randstate_t, unsigned long)); +__GMP_DECLSPEC int gmp_randinit_lc_2exp_size __GMP_PROTO ((gmp_randstate_t, mp_bitcnt_t)); #define gmp_randinit_mt __gmp_randinit_mt __GMP_DECLSPEC void gmp_randinit_mt __GMP_PROTO ((gmp_randstate_t)); @@ -720,7 +720,7 @@ __GMP_DECLSPEC void mpz_cdiv_q __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_cdiv_q_2exp __gmpz_cdiv_q_2exp -__GMP_DECLSPEC void mpz_cdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long)); +__GMP_DECLSPEC void mpz_cdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); #define mpz_cdiv_q_ui __gmpz_cdiv_q_ui __GMP_DECLSPEC unsigned long int mpz_cdiv_q_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); @@ -735,7 +735,7 @@ __GMP_DECLSPEC void mpz_cdiv_r __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_cdiv_r_2exp __gmpz_cdiv_r_2exp -__GMP_DECLSPEC void mpz_cdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long)); +__GMP_DECLSPEC void mpz_cdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); #define mpz_cdiv_r_ui __gmpz_cdiv_r_ui __GMP_DECLSPEC unsigned long int mpz_cdiv_r_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); @@ -746,8 +746,11 @@ #define mpz_clear __gmpz_clear __GMP_DECLSPEC void mpz_clear __GMP_PROTO ((mpz_ptr)); +#define mpz_clears __gmpz_clears +__GMP_DECLSPEC void mpz_clears __GMP_PROTO ((mpz_ptr, ...)); + #define mpz_clrbit __gmpz_clrbit -__GMP_DECLSPEC void mpz_clrbit __GMP_PROTO ((mpz_ptr, unsigned long int)); +__GMP_DECLSPEC void mpz_clrbit __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); #define mpz_cmp __gmpz_cmp __GMP_DECLSPEC int mpz_cmp __GMP_PROTO ((mpz_srcptr, mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; @@ -774,13 +777,13 @@ __GMP_DECLSPEC void mpz_com __GMP_PROTO ((mpz_ptr, mpz_srcptr)); #define mpz_combit __gmpz_combit -__GMP_DECLSPEC void mpz_combit __GMP_PROTO ((mpz_ptr, unsigned long int)); +__GMP_DECLSPEC void mpz_combit __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); #define mpz_congruent_p __gmpz_congruent_p __GMP_DECLSPEC int mpz_congruent_p __GMP_PROTO ((mpz_srcptr, mpz_srcptr, mpz_srcptr)) __GMP_ATTRIBUTE_PURE; #define mpz_congruent_2exp_p __gmpz_congruent_2exp_p -__GMP_DECLSPEC int mpz_congruent_2exp_p __GMP_PROTO ((mpz_srcptr, mpz_srcptr, unsigned long)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC int mpz_congruent_2exp_p __GMP_PROTO ((mpz_srcptr, mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpz_congruent_ui_p __gmpz_congruent_ui_p __GMP_DECLSPEC int mpz_congruent_ui_p __GMP_PROTO ((mpz_srcptr, unsigned long, unsigned long)) __GMP_ATTRIBUTE_PURE; @@ -798,7 +801,7 @@ __GMP_DECLSPEC int mpz_divisible_ui_p __GMP_PROTO ((mpz_srcptr, unsigned long)) __GMP_ATTRIBUTE_PURE; #define mpz_divisible_2exp_p __gmpz_divisible_2exp_p -__GMP_DECLSPEC int mpz_divisible_2exp_p __GMP_PROTO ((mpz_srcptr, unsigned long)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC int mpz_divisible_2exp_p __GMP_PROTO ((mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpz_dump __gmpz_dump __GMP_DECLSPEC void mpz_dump __GMP_PROTO ((mpz_srcptr)); @@ -813,7 +816,7 @@ __GMP_DECLSPEC void mpz_fdiv_q __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_fdiv_q_2exp __gmpz_fdiv_q_2exp -__GMP_DECLSPEC void mpz_fdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); +__GMP_DECLSPEC void mpz_fdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); #define mpz_fdiv_q_ui __gmpz_fdiv_q_ui __GMP_DECLSPEC unsigned long int mpz_fdiv_q_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); @@ -828,7 +831,7 @@ __GMP_DECLSPEC void mpz_fdiv_r __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_fdiv_r_2exp __gmpz_fdiv_r_2exp -__GMP_DECLSPEC void mpz_fdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); +__GMP_DECLSPEC void mpz_fdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); #define mpz_fdiv_r_ui __gmpz_fdiv_r_ui __GMP_DECLSPEC unsigned long int mpz_fdiv_r_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); @@ -898,7 +901,7 @@ #endif #define mpz_hamdist __gmpz_hamdist -__GMP_DECLSPEC unsigned long int mpz_hamdist __GMP_PROTO ((mpz_srcptr, mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpz_hamdist __GMP_PROTO ((mpz_srcptr, mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpz_import __gmpz_import __GMP_DECLSPEC void mpz_import __GMP_PROTO ((mpz_ptr, size_t, int, size_t, int, size_t, __gmp_const void *)); @@ -907,7 +910,10 @@ __GMP_DECLSPEC void mpz_init __GMP_PROTO ((mpz_ptr)); #define mpz_init2 __gmpz_init2 -__GMP_DECLSPEC void mpz_init2 __GMP_PROTO ((mpz_ptr, unsigned long)); +__GMP_DECLSPEC void mpz_init2 __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); + +#define mpz_inits __gmpz_inits +__GMP_DECLSPEC void mpz_inits __GMP_PROTO ((mpz_ptr, ...)); #define mpz_init_set __gmpz_init_set __GMP_DECLSPEC void mpz_init_set __GMP_PROTO ((mpz_ptr, mpz_srcptr)); @@ -983,7 +989,7 @@ __GMP_DECLSPEC void mpz_mul __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_mul_2exp __gmpz_mul_2exp -__GMP_DECLSPEC void mpz_mul_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); +__GMP_DECLSPEC void mpz_mul_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); #define mpz_mul_si __gmpz_mul_si __GMP_DECLSPEC void mpz_mul_si __GMP_PROTO ((mpz_ptr, mpz_srcptr, long int)); @@ -1019,7 +1025,7 @@ #define mpz_popcount __gmpz_popcount #if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_popcount) -__GMP_DECLSPEC unsigned long int mpz_popcount __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpz_popcount __GMP_PROTO ((mpz_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #endif #define mpz_pow_ui __gmpz_pow_ui @@ -1028,6 +1034,9 @@ #define mpz_powm __gmpz_powm __GMP_DECLSPEC void mpz_powm __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr)); +#define mpz_powm_sec __gmpz_powm_sec +__GMP_DECLSPEC void mpz_powm_sec __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr)); + #define mpz_powm_ui __gmpz_powm_ui __GMP_DECLSPEC void mpz_powm_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int, mpz_srcptr)); @@ -1041,10 +1050,10 @@ __GMP_DECLSPEC void mpz_random2 __GMP_PROTO ((mpz_ptr, mp_size_t)); #define mpz_realloc2 __gmpz_realloc2 -__GMP_DECLSPEC void mpz_realloc2 __GMP_PROTO ((mpz_ptr, unsigned long)); +__GMP_DECLSPEC void mpz_realloc2 __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); #define mpz_remove __gmpz_remove -__GMP_DECLSPEC unsigned long int mpz_remove __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); +__GMP_DECLSPEC mp_bitcnt_t mpz_remove __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_root __gmpz_root __GMP_DECLSPEC int mpz_root __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); @@ -1053,13 +1062,13 @@ __GMP_DECLSPEC void mpz_rootrem __GMP_PROTO ((mpz_ptr,mpz_ptr, mpz_srcptr, unsigned long int)); #define mpz_rrandomb __gmpz_rrandomb -__GMP_DECLSPEC void mpz_rrandomb __GMP_PROTO ((mpz_ptr, gmp_randstate_t, unsigned long int)); +__GMP_DECLSPEC void mpz_rrandomb __GMP_PROTO ((mpz_ptr, gmp_randstate_t, mp_bitcnt_t)); #define mpz_scan0 __gmpz_scan0 -__GMP_DECLSPEC unsigned long int mpz_scan0 __GMP_PROTO ((mpz_srcptr, unsigned long int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpz_scan0 __GMP_PROTO ((mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpz_scan1 __gmpz_scan1 -__GMP_DECLSPEC unsigned long int mpz_scan1 __GMP_PROTO ((mpz_srcptr, unsigned long int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpz_scan1 __GMP_PROTO ((mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpz_set __gmpz_set __GMP_DECLSPEC void mpz_set __GMP_PROTO ((mpz_ptr, mpz_srcptr)); @@ -1085,7 +1094,7 @@ __GMP_DECLSPEC void mpz_set_ui __GMP_PROTO ((mpz_ptr, unsigned long int)); #define mpz_setbit __gmpz_setbit -__GMP_DECLSPEC void mpz_setbit __GMP_PROTO ((mpz_ptr, unsigned long int)); +__GMP_DECLSPEC void mpz_setbit __GMP_PROTO ((mpz_ptr, mp_bitcnt_t)); #define mpz_size __gmpz_size #if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpz_size) @@ -1126,7 +1135,7 @@ __GMP_DECLSPEC void mpz_tdiv_q __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_tdiv_q_2exp __gmpz_tdiv_q_2exp -__GMP_DECLSPEC void mpz_tdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); +__GMP_DECLSPEC void mpz_tdiv_q_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); #define mpz_tdiv_q_ui __gmpz_tdiv_q_ui __GMP_DECLSPEC unsigned long int mpz_tdiv_q_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); @@ -1141,19 +1150,19 @@ __GMP_DECLSPEC void mpz_tdiv_r __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_tdiv_r_2exp __gmpz_tdiv_r_2exp -__GMP_DECLSPEC void mpz_tdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); +__GMP_DECLSPEC void mpz_tdiv_r_2exp __GMP_PROTO ((mpz_ptr, mpz_srcptr, mp_bitcnt_t)); #define mpz_tdiv_r_ui __gmpz_tdiv_r_ui __GMP_DECLSPEC unsigned long int mpz_tdiv_r_ui __GMP_PROTO ((mpz_ptr, mpz_srcptr, unsigned long int)); #define mpz_tstbit __gmpz_tstbit -__GMP_DECLSPEC int mpz_tstbit __GMP_PROTO ((mpz_srcptr, unsigned long int)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC int mpz_tstbit __GMP_PROTO ((mpz_srcptr, mp_bitcnt_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpz_ui_pow_ui __gmpz_ui_pow_ui __GMP_DECLSPEC void mpz_ui_pow_ui __GMP_PROTO ((mpz_ptr, unsigned long int, unsigned long int)); #define mpz_urandomb __gmpz_urandomb -__GMP_DECLSPEC void mpz_urandomb __GMP_PROTO ((mpz_ptr, gmp_randstate_t, unsigned long int)); +__GMP_DECLSPEC void mpz_urandomb __GMP_PROTO ((mpz_ptr, gmp_randstate_t, mp_bitcnt_t)); #define mpz_urandomm __gmpz_urandomm __GMP_DECLSPEC void mpz_urandomm __GMP_PROTO ((mpz_ptr, gmp_randstate_t, mpz_srcptr)); @@ -1179,6 +1188,9 @@ #define mpq_clear __gmpq_clear __GMP_DECLSPEC void mpq_clear __GMP_PROTO ((mpq_ptr)); +#define mpq_clears __gmpq_clears +__GMP_DECLSPEC void mpq_clears __GMP_PROTO ((mpq_ptr, ...)); + #define mpq_cmp __gmpq_cmp __GMP_DECLSPEC int mpq_cmp __GMP_PROTO ((mpq_srcptr, mpq_srcptr)) __GMP_ATTRIBUTE_PURE; @@ -1192,7 +1204,7 @@ __GMP_DECLSPEC void mpq_div __GMP_PROTO ((mpq_ptr, mpq_srcptr, mpq_srcptr)); #define mpq_div_2exp __gmpq_div_2exp -__GMP_DECLSPEC void mpq_div_2exp __GMP_PROTO ((mpq_ptr, mpq_srcptr, unsigned long)); +__GMP_DECLSPEC void mpq_div_2exp __GMP_PROTO ((mpq_ptr, mpq_srcptr, mp_bitcnt_t)); #define mpq_equal __gmpq_equal __GMP_DECLSPEC int mpq_equal __GMP_PROTO ((mpq_srcptr, mpq_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; @@ -1212,6 +1224,9 @@ #define mpq_init __gmpq_init __GMP_DECLSPEC void mpq_init __GMP_PROTO ((mpq_ptr)); +#define mpq_inits __gmpq_inits +__GMP_DECLSPEC void mpq_inits __GMP_PROTO ((mpq_ptr, ...)); + #define mpq_inp_str __gmpq_inp_str #ifdef _GMP_H_HAVE_FILE __GMP_DECLSPEC size_t mpq_inp_str __GMP_PROTO ((mpq_ptr, FILE *, int)); @@ -1224,7 +1239,7 @@ __GMP_DECLSPEC void mpq_mul __GMP_PROTO ((mpq_ptr, mpq_srcptr, mpq_srcptr)); #define mpq_mul_2exp __gmpq_mul_2exp -__GMP_DECLSPEC void mpq_mul_2exp __GMP_PROTO ((mpq_ptr, mpq_srcptr, unsigned long)); +__GMP_DECLSPEC void mpq_mul_2exp __GMP_PROTO ((mpq_ptr, mpq_srcptr, mp_bitcnt_t)); #define mpq_neg __gmpq_neg #if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpq_neg) @@ -1286,6 +1301,9 @@ #define mpf_clear __gmpf_clear __GMP_DECLSPEC void mpf_clear __GMP_PROTO ((mpf_ptr)); +#define mpf_clears __gmpf_clears +__GMP_DECLSPEC void mpf_clears __GMP_PROTO ((mpf_ptr, ...)); + #define mpf_cmp __gmpf_cmp __GMP_DECLSPEC int mpf_cmp __GMP_PROTO ((mpf_srcptr, mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; @@ -1302,7 +1320,7 @@ __GMP_DECLSPEC void mpf_div __GMP_PROTO ((mpf_ptr, mpf_srcptr, mpf_srcptr)); #define mpf_div_2exp __gmpf_div_2exp -__GMP_DECLSPEC void mpf_div_2exp __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); +__GMP_DECLSPEC void mpf_div_2exp __GMP_PROTO ((mpf_ptr, mpf_srcptr, mp_bitcnt_t)); #define mpf_div_ui __gmpf_div_ui __GMP_DECLSPEC void mpf_div_ui __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); @@ -1311,7 +1329,7 @@ __GMP_DECLSPEC void mpf_dump __GMP_PROTO ((mpf_srcptr)); #define mpf_eq __gmpf_eq -__GMP_DECLSPEC int mpf_eq __GMP_PROTO ((mpf_srcptr, mpf_srcptr, unsigned long int)) __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC int mpf_eq __GMP_PROTO ((mpf_srcptr, mpf_srcptr, mp_bitcnt_t)) __GMP_ATTRIBUTE_PURE; #define mpf_fits_sint_p __gmpf_fits_sint_p __GMP_DECLSPEC int mpf_fits_sint_p __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; @@ -1341,10 +1359,10 @@ __GMP_DECLSPEC double mpf_get_d_2exp __GMP_PROTO ((signed long int *, mpf_srcptr)); #define mpf_get_default_prec __gmpf_get_default_prec -__GMP_DECLSPEC unsigned long int mpf_get_default_prec __GMP_PROTO ((void)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpf_get_default_prec __GMP_PROTO ((void)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpf_get_prec __gmpf_get_prec -__GMP_DECLSPEC unsigned long int mpf_get_prec __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpf_get_prec __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpf_get_si __gmpf_get_si __GMP_DECLSPEC long mpf_get_si __GMP_PROTO ((mpf_srcptr)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; @@ -1359,7 +1377,10 @@ __GMP_DECLSPEC void mpf_init __GMP_PROTO ((mpf_ptr)); #define mpf_init2 __gmpf_init2 -__GMP_DECLSPEC void mpf_init2 __GMP_PROTO ((mpf_ptr, unsigned long int)); +__GMP_DECLSPEC void mpf_init2 __GMP_PROTO ((mpf_ptr, mp_bitcnt_t)); + +#define mpf_inits __gmpf_inits +__GMP_DECLSPEC void mpf_inits __GMP_PROTO ((mpf_ptr, ...)); #define mpf_init_set __gmpf_init_set __GMP_DECLSPEC void mpf_init_set __GMP_PROTO ((mpf_ptr, mpf_srcptr)); @@ -1388,7 +1409,7 @@ __GMP_DECLSPEC void mpf_mul __GMP_PROTO ((mpf_ptr, mpf_srcptr, mpf_srcptr)); #define mpf_mul_2exp __gmpf_mul_2exp -__GMP_DECLSPEC void mpf_mul_2exp __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); +__GMP_DECLSPEC void mpf_mul_2exp __GMP_PROTO ((mpf_ptr, mpf_srcptr, mp_bitcnt_t)); #define mpf_mul_ui __gmpf_mul_ui __GMP_DECLSPEC void mpf_mul_ui __GMP_PROTO ((mpf_ptr, mpf_srcptr, unsigned long int)); @@ -1417,13 +1438,13 @@ __GMP_DECLSPEC void mpf_set_d __GMP_PROTO ((mpf_ptr, double)); #define mpf_set_default_prec __gmpf_set_default_prec -__GMP_DECLSPEC void mpf_set_default_prec __GMP_PROTO ((unsigned long int)) __GMP_NOTHROW; +__GMP_DECLSPEC void mpf_set_default_prec __GMP_PROTO ((mp_bitcnt_t)) __GMP_NOTHROW; #define mpf_set_prec __gmpf_set_prec -__GMP_DECLSPEC void mpf_set_prec __GMP_PROTO ((mpf_ptr, unsigned long int)); +__GMP_DECLSPEC void mpf_set_prec __GMP_PROTO ((mpf_ptr, mp_bitcnt_t)); #define mpf_set_prec_raw __gmpf_set_prec_raw -__GMP_DECLSPEC void mpf_set_prec_raw __GMP_PROTO ((mpf_ptr, unsigned long int)) __GMP_NOTHROW; +__GMP_DECLSPEC void mpf_set_prec_raw __GMP_PROTO ((mpf_ptr, mp_bitcnt_t)) __GMP_NOTHROW; #define mpf_set_q __gmpf_set_q __GMP_DECLSPEC void mpf_set_q __GMP_PROTO ((mpf_ptr, mpq_srcptr)); @@ -1468,7 +1489,7 @@ __GMP_DECLSPEC void mpf_ui_sub __GMP_PROTO ((mpf_ptr, unsigned long int, mpf_srcptr)); #define mpf_urandomb __gmpf_urandomb -__GMP_DECLSPEC void mpf_urandomb __GMP_PROTO ((mpf_t, gmp_randstate_t, unsigned long int)); +__GMP_DECLSPEC void mpf_urandomb __GMP_PROTO ((mpf_t, gmp_randstate_t, mp_bitcnt_t)); /************ Low level positive-integer (i.e. N) routines. ************/ @@ -1491,9 +1512,6 @@ #define mpn_addmul_1 __MPN(addmul_1) __GMP_DECLSPEC mp_limb_t mpn_addmul_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); -#define mpn_bdivmod __MPN(bdivmod) -__GMP_DECLSPEC mp_limb_t mpn_bdivmod __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, unsigned long int)); - #define mpn_cmp __MPN(cmp) #if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_cmp) __GMP_DECLSPEC int mpn_cmp __GMP_PROTO ((mp_srcptr, mp_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; @@ -1533,7 +1551,7 @@ __GMP_DECLSPEC size_t mpn_get_str __GMP_PROTO ((unsigned char *, int, mp_ptr, mp_size_t)); #define mpn_hamdist __MPN(hamdist) -__GMP_DECLSPEC unsigned long int mpn_hamdist __GMP_PROTO ((mp_srcptr, mp_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpn_hamdist __GMP_PROTO ((mp_srcptr, mp_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpn_lshift __MPN(lshift) __GMP_DECLSPEC mp_limb_t mpn_lshift __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned int)); @@ -1553,16 +1571,24 @@ #define mpn_sqr __MPN(sqr) __GMP_DECLSPEC void mpn_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); -#define mpn_neg_n __MPN(neg_n) -#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg_n) -__GMP_DECLSPEC mp_limb_t mpn_neg_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); +#define mpn_neg __MPN(neg) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_neg) +__GMP_DECLSPEC mp_limb_t mpn_neg __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); +#endif + +#define mpn_com __MPN(com) +#if __GMP_INLINE_PROTOTYPES || defined (__GMP_FORCE_mpn_com) +__GMP_DECLSPEC void mpn_com __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); #endif #define mpn_perfect_square_p __MPN(perfect_square_p) __GMP_DECLSPEC int mpn_perfect_square_p __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_ATTRIBUTE_PURE; +#define mpn_perfect_power_p __MPN(perfect_power_p) +__GMP_DECLSPEC int mpn_perfect_power_p __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_ATTRIBUTE_PURE; + #define mpn_popcount __MPN(popcount) -__GMP_DECLSPEC unsigned long int mpn_popcount __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpn_popcount __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_NOTHROW __GMP_ATTRIBUTE_PURE; #define mpn_pow_1 __MPN(pow_1) __GMP_DECLSPEC mp_size_t mpn_pow_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr)); @@ -1581,10 +1607,10 @@ __GMP_DECLSPEC mp_limb_t mpn_rshift __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned int)); #define mpn_scan0 __MPN(scan0) -__GMP_DECLSPEC unsigned long int mpn_scan0 __GMP_PROTO ((mp_srcptr, unsigned long int)) __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpn_scan0 __GMP_PROTO ((mp_srcptr, mp_bitcnt_t)) __GMP_ATTRIBUTE_PURE; #define mpn_scan1 __MPN(scan1) -__GMP_DECLSPEC unsigned long int mpn_scan1 __GMP_PROTO ((mp_srcptr, unsigned long int)) __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_bitcnt_t mpn_scan1 __GMP_PROTO ((mp_srcptr, mp_bitcnt_t)) __GMP_ATTRIBUTE_PURE; #define mpn_set_str __MPN(set_str) __GMP_DECLSPEC mp_size_t mpn_set_str __GMP_PROTO ((mp_ptr, __gmp_const unsigned char *, size_t, int)); @@ -1611,6 +1637,29 @@ #define mpn_tdiv_qr __MPN(tdiv_qr) __GMP_DECLSPEC void mpn_tdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); +#define mpn_and_n __MPN(and_n) +__GMP_DECLSPEC void mpn_and_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_andn_n __MPN(andn_n) +__GMP_DECLSPEC void mpn_andn_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_nand_n __MPN(nand_n) +__GMP_DECLSPEC void mpn_nand_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_ior_n __MPN(ior_n) +__GMP_DECLSPEC void mpn_ior_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_iorn_n __MPN(iorn_n) +__GMP_DECLSPEC void mpn_iorn_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_nior_n __MPN(nior_n) +__GMP_DECLSPEC void mpn_nior_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_xor_n __MPN(xor_n) +__GMP_DECLSPEC void mpn_xor_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_xnor_n __MPN(xnor_n) +__GMP_DECLSPEC void mpn_xnor_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); + +#define mpn_copyi __MPN(copyi) +__GMP_DECLSPEC void mpn_copyi __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); +#define mpn_copyd __MPN(copyd) +__GMP_DECLSPEC void mpn_copyd __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); +#define mpn_zero __MPN(zero) +__GMP_DECLSPEC void mpn_zero __GMP_PROTO ((mp_ptr, mp_size_t)); /**************** mpz inlines ****************/ @@ -1758,11 +1807,11 @@ #if ! defined (__GMP_FORCE_mpz_popcount) __GMP_EXTERN_INLINE #endif -unsigned long +mp_bitcnt_t mpz_popcount (mpz_srcptr __gmp_u) __GMP_NOTHROW { mp_size_t __gmp_usize; - unsigned long __gmp_result; + mp_bitcnt_t __gmp_result; __gmp_usize = __gmp_u->_mp_size; __gmp_result = (__gmp_usize < 0 ? __GMP_ULONG_MAX : 0); @@ -2114,12 +2163,12 @@ } #endif -#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg_n) -#if ! defined (__GMP_FORCE_mpn_neg_n) +#if defined (__GMP_EXTERN_INLINE) || defined (__GMP_FORCE_mpn_neg) +#if ! defined (__GMP_FORCE_mpn_neg) __GMP_EXTERN_INLINE #endif mp_limb_t -mpn_neg_n (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) +mpn_neg (mp_ptr __gmp_rp, mp_srcptr __gmp_up, mp_size_t __gmp_n) { mp_limb_t __gmp_ul, __gmp_cy; __gmp_cy = 0; @@ -2222,9 +2271,10 @@ #define __GMP_CFLAGS "@CFLAGS@" /* Major version number is the value of __GNU_MP__ too, above and in mp.h. */ -#define __GNU_MP_VERSION 4 -#define __GNU_MP_VERSION_MINOR 3 +#define __GNU_MP_VERSION 5 +#define __GNU_MP_VERSION_MINOR 0 #define __GNU_MP_VERSION_PATCHLEVEL 2 +#define __GMP_MP_RELEASE (__GNU_MP_VERSION * 10000 + __GNU_MP_VERSION_MINOR * 100 + __GNU_MP_VERSION_PATCHLEVEL) #define __GMP_H__ #endif /* __GMP_H__ */ diff -Nru gmp-4.3.2+dfsg/gmp-impl.h gmp-5.0.2+dfsg/gmp-impl.h --- gmp-4.3.2+dfsg/gmp-impl.h 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/gmp-impl.h 2011-05-08 09:49:29.000000000 +0000 @@ -4,7 +4,7 @@ BE SUBJECT TO INCOMPATIBLE CHANGES IN FUTURE GNU MP RELEASES. Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2001, 2002, 2003, -2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -56,41 +56,41 @@ declared this way are only used to set function pointers in __gmp_cpuvec, they're not called directly. */ #define DECL_add_n(name) \ - mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)) #define DECL_addmul_1(name) \ - mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)) #define DECL_copyd(name) \ - void name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)) + __GMP_DECLSPEC void name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)) #define DECL_copyi(name) \ DECL_copyd (name) #define DECL_divexact_1(name) \ - mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)) #define DECL_divexact_by3c(name) \ - mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)) #define DECL_divrem_1(name) \ - mp_limb_t name __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)) #define DECL_gcd_1(name) \ - mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t)) #define DECL_lshift(name) \ - mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned)) #define DECL_mod_1(name) \ - mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t)) #define DECL_mod_34lsub1(name) \ - mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t)) #define DECL_modexact_1c_odd(name) \ - mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) #define DECL_mul_1(name) \ DECL_addmul_1 (name) #define DECL_mul_basecase(name) \ - void name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)) + __GMP_DECLSPEC void name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)) #define DECL_preinv_divrem_1(name) \ - mp_limb_t name __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t, int)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t, int)) #define DECL_preinv_mod_1(name) \ - mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) + __GMP_DECLSPEC mp_limb_t name __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) #define DECL_rshift(name) \ DECL_lshift (name) #define DECL_sqr_basecase(name) \ - void name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)) + __GMP_DECLSPEC void name __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)) #define DECL_sub_n(name) \ DECL_add_n (name) #define DECL_submul_1(name) \ @@ -175,8 +175,9 @@ #ifndef BYTES_PER_MP_LIMB #define BYTES_PER_MP_LIMB SIZEOF_MP_LIMB_T #endif -#ifndef BITS_PER_MP_LIMB -#define BITS_PER_MP_LIMB (8 * SIZEOF_MP_LIMB_T) +#define GMP_LIMB_BYTES BYTES_PER_MP_LIMB +#ifndef GMP_LIMB_BITS +#define GMP_LIMB_BITS (8 * SIZEOF_MP_LIMB_T) #endif #define BITS_PER_ULONG (8 * SIZEOF_UNSIGNED_LONG) @@ -198,6 +199,19 @@ #endif +/* gmp_intptr_t, for pointer to integer casts */ +#if HAVE_INTPTR_T +typedef intptr_t gmp_intptr_t; +#else /* fallback */ +typedef size_t gmp_intptr_t; +#endif + + +/* pre-inverse types for truncating division and modulo */ +typedef struct {mp_limb_t inv32;} gmp_pi1_t; +typedef struct {mp_limb_t inv21, inv32, inv53;} gmp_pi2_t; + + /* const and signed must match __gmp_const and __gmp_signed, so follow the decision made for those in gmp.h. */ #if ! __GMP_HAVE_CONST @@ -312,8 +326,8 @@ struct tmp_reentrant_t *next; size_t size; /* bytes, including header */ }; -void *__gmp_tmp_reentrant_alloc __GMP_PROTO ((struct tmp_reentrant_t **, size_t)) ATTRIBUTE_MALLOC; -void __gmp_tmp_reentrant_free __GMP_PROTO ((struct tmp_reentrant_t *)); +__GMP_DECLSPEC void *__gmp_tmp_reentrant_alloc __GMP_PROTO ((struct tmp_reentrant_t **, size_t)) ATTRIBUTE_MALLOC; +__GMP_DECLSPEC void __gmp_tmp_reentrant_free __GMP_PROTO ((struct tmp_reentrant_t *)); #endif #if WANT_TMP_ALLOCA @@ -350,9 +364,9 @@ struct tmp_stack *which_chunk; void *alloc_point; }; -void *__gmp_tmp_alloc __GMP_PROTO ((unsigned long)) ATTRIBUTE_MALLOC; -void __gmp_tmp_mark __GMP_PROTO ((struct tmp_marker *)); -void __gmp_tmp_free __GMP_PROTO ((struct tmp_marker *)); +__GMP_DECLSPEC void *__gmp_tmp_alloc __GMP_PROTO ((unsigned long)) ATTRIBUTE_MALLOC; +__GMP_DECLSPEC void __gmp_tmp_mark __GMP_PROTO ((struct tmp_marker *)); +__GMP_DECLSPEC void __gmp_tmp_free __GMP_PROTO ((struct tmp_marker *)); #define TMP_SDECL TMP_DECL #define TMP_DECL struct tmp_marker __tmp_marker #define TMP_SMARK TMP_MARK @@ -377,15 +391,15 @@ char *block; size_t size; }; -void __gmp_tmp_debug_mark __GMP_PROTO ((const char *, int, struct tmp_debug_t **, - struct tmp_debug_t *, - const char *, const char *)); -void *__gmp_tmp_debug_alloc __GMP_PROTO ((const char *, int, int, - struct tmp_debug_t **, const char *, - size_t)) ATTRIBUTE_MALLOC; -void __gmp_tmp_debug_free __GMP_PROTO ((const char *, int, int, - struct tmp_debug_t **, - const char *, const char *)); +__GMP_DECLSPEC void __gmp_tmp_debug_mark __GMP_PROTO ((const char *, int, struct tmp_debug_t **, + struct tmp_debug_t *, + const char *, const char *)); +__GMP_DECLSPEC void *__gmp_tmp_debug_alloc __GMP_PROTO ((const char *, int, int, + struct tmp_debug_t **, const char *, + size_t)) ATTRIBUTE_MALLOC; +__GMP_DECLSPEC void __gmp_tmp_debug_free __GMP_PROTO ((const char *, int, int, + struct tmp_debug_t **, + const char *, const char *)); #define TMP_SDECL TMP_DECL_NAME(__tmp_xmarker, "__tmp_marker") #define TMP_DECL TMP_DECL_NAME(__tmp_xmarker, "__tmp_marker") #define TMP_SMARK TMP_MARK_NAME(__tmp_xmarker, "__tmp_marker") @@ -561,31 +575,21 @@ /* Set various *_THRESHOLD values to be used for nails. Thus we avoid using code that has not yet been qualified. */ -#undef DIV_SB_PREINV_THRESHOLD -#undef DIV_DC_THRESHOLD -#undef POWM_THRESHOLD -#define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX -#define DIV_DC_THRESHOLD 50 -#define POWM_THRESHOLD 0 - -#undef GCD_ACCEL_THRESHOLD -#define GCD_ACCEL_THRESHOLD 3 +#undef DC_DIV_QR_THRESHOLD +#define DC_DIV_QR_THRESHOLD 50 #undef DIVREM_1_NORM_THRESHOLD #undef DIVREM_1_UNNORM_THRESHOLD #undef MOD_1_NORM_THRESHOLD #undef MOD_1_UNNORM_THRESHOLD #undef USE_PREINV_DIVREM_1 -#undef USE_PREINV_MOD_1 #undef DIVREM_2_THRESHOLD #undef DIVEXACT_1_THRESHOLD -#undef MODEXACT_1_ODD_THRESHOLD #define DIVREM_1_NORM_THRESHOLD MP_SIZE_T_MAX /* no preinv */ #define DIVREM_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* no preinv */ #define MOD_1_NORM_THRESHOLD MP_SIZE_T_MAX /* no preinv */ #define MOD_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* no preinv */ #define USE_PREINV_DIVREM_1 0 /* no preinv */ -#define USE_PREINV_MOD_1 0 /* no preinv */ #define DIVREM_2_THRESHOLD MP_SIZE_T_MAX /* no preinv */ /* mpn/generic/mul_fft.c is not nails-capable. */ @@ -654,9 +658,9 @@ __GMP_DECLSPEC extern void * (*__gmp_reallocate_func) __GMP_PROTO ((void *, size_t, size_t)); __GMP_DECLSPEC extern void (*__gmp_free_func) __GMP_PROTO ((void *, size_t)); -void *__gmp_default_allocate __GMP_PROTO ((size_t)); -void *__gmp_default_reallocate __GMP_PROTO ((void *, size_t, size_t)); -void __gmp_default_free __GMP_PROTO ((void *, size_t)); +__GMP_DECLSPEC void *__gmp_default_allocate __GMP_PROTO ((size_t)); +__GMP_DECLSPEC void *__gmp_default_reallocate __GMP_PROTO ((void *, size_t, size_t)); +__GMP_DECLSPEC void __gmp_default_free __GMP_PROTO ((void *, size_t)); #define __GMP_ALLOCATE_FUNC_TYPE(n,type) \ ((type *) (*__gmp_allocate_func) ((n) * sizeof (type))) @@ -757,11 +761,11 @@ #endif -void __gmpz_aorsmul_1 __GMP_PROTO ((REGPARM_3_1 (mpz_ptr, mpz_srcptr, mp_limb_t, mp_size_t))) REGPARM_ATTR(1); +__GMP_DECLSPEC void __gmpz_aorsmul_1 __GMP_PROTO ((REGPARM_3_1 (mpz_ptr, mpz_srcptr, mp_limb_t, mp_size_t))) REGPARM_ATTR(1); #define mpz_aorsmul_1(w,u,v,sub) __gmpz_aorsmul_1 (REGPARM_3_1 (w, u, v, sub)) #define mpz_n_pow_ui __gmpz_n_pow_ui -void mpz_n_pow_ui __GMP_PROTO ((mpz_ptr, mp_srcptr, mp_size_t, unsigned long)); +__GMP_DECLSPEC void mpz_n_pow_ui __GMP_PROTO ((mpz_ptr, mp_srcptr, mp_size_t, unsigned long)); #define mpn_addmul_1c __MPN(addmul_1c) @@ -793,15 +797,47 @@ #define mpn_addlsh1_n __MPN(addlsh1_n) __GMP_DECLSPEC mp_limb_t mpn_addlsh1_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +/* mpn_addlsh2_n(c,a,b,n), when it exists, sets {c,n} to {a,n}+4*{b,n}, and + returns the carry out (0, ..., 4). */ +#define mpn_addlsh2_n __MPN(addlsh2_n) +__GMP_DECLSPEC mp_limb_t mpn_addlsh2_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); + +/* mpn_addlsh_n(c,a,b,n,k), when it exists, sets {c,n} to {a,n}+2^k*{b,n}, and + returns the carry out (0, ..., 2^k). */ +#define mpn_addlsh_n __MPN(addlsh_n) + __GMP_DECLSPEC mp_limb_t mpn_addlsh_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned int)); + /* mpn_sublsh1_n(c,a,b,n), when it exists, sets {c,n} to {a,n}-2*{b,n}, and returns the borrow out (0, 1 or 2). */ #define mpn_sublsh1_n __MPN(sublsh1_n) __GMP_DECLSPEC mp_limb_t mpn_sublsh1_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +/* mpn_rsblsh1_n(c,a,b,n), when it exists, sets {c,n} to 2*{b,n}-{a,n}, and + returns the carry out (-1, 0, 1). */ +#define mpn_rsblsh1_n __MPN(rsblsh1_n) +__GMP_DECLSPEC mp_limb_signed_t mpn_rsblsh1_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); + +/* mpn_sublsh2_n(c,a,b,n), when it exists, sets {c,n} to {a,n}-4*{b,n}, and + returns the borrow out (FIXME 0, 1, 2 or 3). */ +#define mpn_sublsh2_n __MPN(sublsh2_n) +__GMP_DECLSPEC mp_limb_t mpn_sublsh2_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); + +/* mpn_rsblsh2_n(c,a,b,n), when it exists, sets {c,n} to 4*{b,n}-{a,n}, and + returns the carry out (-1, ..., 3). */ +#define mpn_rsblsh2_n __MPN(rsblsh2_n) +__GMP_DECLSPEC mp_limb_signed_t mpn_rsblsh2_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); + +/* mpn_rsblsh_n(c,a,b,n,k), when it exists, sets {c,n} to 2^k*{b,n}-{a,n}, and + returns the carry out (-1, 0, ..., 2^k-1). */ +#define mpn_rsblsh_n __MPN(rsblsh_n) +__GMP_DECLSPEC mp_limb_signed_t mpn_rsblsh_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned int)); + /* mpn_rsh1add_n(c,a,b,n), when it exists, sets {c,n} to ({a,n} + {b,n}) >> 1, and returns the bit rshifted out (0 or 1). */ #define mpn_rsh1add_n __MPN(rsh1add_n) __GMP_DECLSPEC mp_limb_t mpn_rsh1add_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_rsh1add_nc __MPN(rsh1add_nc) +__GMP_DECLSPEC mp_limb_t mpn_rsh1add_nc __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t)); /* mpn_rsh1sub_n(c,a,b,n), when it exists, sets {c,n} to ({a,n} - {b,n}) >> 1, and returns the bit rshifted out (0 or 1). If there's a borrow from the @@ -809,15 +845,17 @@ complement negative. */ #define mpn_rsh1sub_n __MPN(rsh1sub_n) __GMP_DECLSPEC mp_limb_t mpn_rsh1sub_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_rsh1sub_nc __MPN(rsh1sub_nc) +__GMP_DECLSPEC mp_limb_t mpn_rsh1sub_nc __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t)); #define mpn_lshiftc __MPN(lshiftc) __GMP_DECLSPEC mp_limb_t mpn_lshiftc __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned int)); -#define mpn_addsub_n __MPN(addsub_n) -__GMP_DECLSPEC mp_limb_t mpn_addsub_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_add_n_sub_n __MPN(add_n_sub_n) +__GMP_DECLSPEC mp_limb_t mpn_add_n_sub_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_addsub_nc __MPN(addsub_nc) -__GMP_DECLSPEC mp_limb_t mpn_addsub_nc __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t)); +#define mpn_add_n_sub_nc __MPN(add_n_sub_nc) +__GMP_DECLSPEC mp_limb_t mpn_add_n_sub_nc __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t)); #define mpn_addaddmul_1msb0 __MPN(addaddmul_1msb0) __GMP_DECLSPEC mp_limb_t mpn_addaddmul_1msb0 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)); @@ -829,14 +867,14 @@ __GMP_DECLSPEC void mpn_dump __GMP_PROTO ((mp_srcptr, mp_size_t)); #define mpn_fib2_ui __MPN(fib2_ui) -mp_size_t mpn_fib2_ui __GMP_PROTO ((mp_ptr, mp_ptr, unsigned long)); +__GMP_DECLSPEC mp_size_t mpn_fib2_ui __GMP_PROTO ((mp_ptr, mp_ptr, unsigned long)); /* Remap names of internal mpn functions. */ #define __clz_tab __MPN(clz_tab) #define mpn_udiv_w_sdiv __MPN(udiv_w_sdiv) #define mpn_jacobi_base __MPN(jacobi_base) -int mpn_jacobi_base __GMP_PROTO ((mp_limb_t, mp_limb_t, int)) ATTRIBUTE_CONST; +__GMP_DECLSPEC int mpn_jacobi_base __GMP_PROTO ((mp_limb_t, mp_limb_t, int)) ATTRIBUTE_CONST; #define mpn_mod_1c __MPN(mod_1c) __GMP_DECLSPEC mp_limb_t mpn_mod_1c __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE; @@ -845,7 +883,7 @@ __GMP_DECLSPEC mp_limb_t mpn_mul_1c __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)); #define mpn_mul_2 __MPN(mul_2) -mp_limb_t mpn_mul_2 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr)); +__GMP_DECLSPEC mp_limb_t mpn_mul_2 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr)); #define mpn_mul_3 __MPN(mul_3) __GMP_DECLSPEC mp_limb_t mpn_mul_3 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr)); @@ -858,13 +896,14 @@ __GMP_DECLSPEC void mpn_mul_basecase __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); #endif -#define mpn_mullow_n __MPN(mullow_n) -__GMP_DECLSPEC void mpn_mullow_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_mullo_n __MPN(mullo_n) +__GMP_DECLSPEC void mpn_mullo_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_mullow_basecase __MPN(mullow_basecase) -__GMP_DECLSPEC void mpn_mullow_basecase __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +#define mpn_mullo_basecase __MPN(mullo_basecase) +__GMP_DECLSPEC void mpn_mullo_basecase __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#define mpn_sqr_n __MPN(sqr) /* compatibility */ +#define mpn_sqr __MPN(sqr) +__GMP_DECLSPEC void mpn_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); #ifndef mpn_sqr_basecase /* if not done with cpuvec in a fat binary */ #define mpn_sqr_basecase __MPN(sqr_basecase) @@ -874,36 +913,62 @@ #define mpn_submul_1c __MPN(submul_1c) __GMP_DECLSPEC mp_limb_t mpn_submul_1c __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)); -#define mpn_invert_2exp __MPN(invert_2exp) -__GMP_DECLSPEC void mpn_invert_2exp __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); - #define mpn_redc_1 __MPN(redc_1) -__GMP_DECLSPEC void mpn_redc_1 __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t);) +__GMP_DECLSPEC void mpn_redc_1 __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); #define mpn_redc_2 __MPN(redc_2) __GMP_DECLSPEC void mpn_redc_2 __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr)); +#define mpn_redc_n __MPN(redc_n) +__GMP_DECLSPEC void mpn_redc_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr)); -#define mpn_mod_1s_1p_cps __MPN(mod_1s_1p_cps) -__GMP_DECLSPEC void mpn_mod_1s_1p_cps __GMP_PROTO ((mp_limb_t [4], mp_limb_t)); -#define mpn_mod_1s_1p __MPN(mod_1s_1p) -__GMP_DECLSPEC mp_limb_t mpn_mod_1s_1p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [4])); +#define mpn_mod_1_1p_cps __MPN(mod_1_1p_cps) +__GMP_DECLSPEC void mpn_mod_1_1p_cps __GMP_PROTO ((mp_limb_t [4], mp_limb_t)); +#define mpn_mod_1_1p __MPN(mod_1_1p) +__GMP_DECLSPEC mp_limb_t mpn_mod_1_1p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [4])) __GMP_ATTRIBUTE_PURE; #define mpn_mod_1s_2p_cps __MPN(mod_1s_2p_cps) __GMP_DECLSPEC void mpn_mod_1s_2p_cps __GMP_PROTO ((mp_limb_t [5], mp_limb_t)); #define mpn_mod_1s_2p __MPN(mod_1s_2p) -__GMP_DECLSPEC mp_limb_t mpn_mod_1s_2p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [5])); +__GMP_DECLSPEC mp_limb_t mpn_mod_1s_2p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [5])) __GMP_ATTRIBUTE_PURE; #define mpn_mod_1s_3p_cps __MPN(mod_1s_3p_cps) __GMP_DECLSPEC void mpn_mod_1s_3p_cps __GMP_PROTO ((mp_limb_t [6], mp_limb_t)); #define mpn_mod_1s_3p __MPN(mod_1s_3p) -__GMP_DECLSPEC mp_limb_t mpn_mod_1s_3p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [6])); +__GMP_DECLSPEC mp_limb_t mpn_mod_1s_3p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [6])) __GMP_ATTRIBUTE_PURE; #define mpn_mod_1s_4p_cps __MPN(mod_1s_4p_cps) __GMP_DECLSPEC void mpn_mod_1s_4p_cps __GMP_PROTO ((mp_limb_t [7], mp_limb_t)); #define mpn_mod_1s_4p __MPN(mod_1s_4p) -__GMP_DECLSPEC mp_limb_t mpn_mod_1s_4p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [7])); +__GMP_DECLSPEC mp_limb_t mpn_mod_1s_4p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t [7])) __GMP_ATTRIBUTE_PURE; +#define mpn_bc_mulmod_bnm1 __MPN(bc_mulmod_bnm1) +__GMP_DECLSPEC void mpn_bc_mulmod_bnm1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_mulmod_bnm1 __MPN(mulmod_bnm1) +__GMP_DECLSPEC void mpn_mulmod_bnm1 __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_mulmod_bnm1_next_size __MPN(mulmod_bnm1_next_size) +__GMP_DECLSPEC mp_size_t mpn_mulmod_bnm1_next_size __GMP_PROTO ((mp_size_t)) ATTRIBUTE_CONST; +static inline mp_size_t +mpn_mulmod_bnm1_itch (mp_size_t rn, mp_size_t an, mp_size_t bn) { + mp_size_t n, itch; + n = rn >> 1; + itch = rn + 4 + + (an > n ? (bn > n ? rn : n) : 0); + return itch; +} + +#define mpn_sqrmod_bnm1 __MPN(sqrmod_bnm1) +__GMP_DECLSPEC void mpn_sqrmod_bnm1 __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_sqrmod_bnm1_next_size __MPN(sqrmod_bnm1_next_size) +__GMP_DECLSPEC mp_size_t mpn_sqrmod_bnm1_next_size __GMP_PROTO ((mp_size_t)) ATTRIBUTE_CONST; +static inline mp_size_t +mpn_sqrmod_bnm1_itch (mp_size_t rn, mp_size_t an) { + mp_size_t n, itch; + n = rn >> 1; + itch = rn + 3 + + (an > n ? an : 0); + return itch; +} typedef __gmp_randstate_struct *gmp_randstate_ptr; typedef const __gmp_randstate_struct *gmp_randstate_srcptr; @@ -966,289 +1031,287 @@ } while (0) -/* FIXME: Make these itch functions less conservative. Also consider making - them dependent on just 'an', and compute the allocation directly from 'an' - instead of via n. */ -static inline mp_size_t -mpn_toom22_mul_itch (mp_size_t an, mp_size_t bn) -{ - mp_size_t n = 1 + (2 * an >= 3 * bn ? (an - 1) / (size_t) 3 : (bn - 1) >> 1); - return 4 * n + 2; -} +/* For a threshold between algorithms A and B, size>=thresh is where B + should be used. Special value MP_SIZE_T_MAX means only ever use A, or + value 0 means only ever use B. The tests for these special values will + be compile-time constants, so the compiler should be able to eliminate + the code for the unwanted algorithm. */ -static inline mp_size_t -mpn_toom33_mul_itch (mp_size_t an, mp_size_t bn) -{ - /* We could trim this to 4n+3 if HAVE_NATIVE_mpn_sublsh1_n, since - mpn_toom_interpolate_5pts only needs scratch otherwise. */ - mp_size_t n = (an + 2) / (size_t) 3; - return 6 * n + GMP_NUMB_BITS; -} +#define ABOVE_THRESHOLD(size,thresh) \ + ((thresh) == 0 \ + || ((thresh) != MP_SIZE_T_MAX \ + && (size) >= (thresh))) +#define BELOW_THRESHOLD(size,thresh) (! ABOVE_THRESHOLD (size, thresh)) -static inline mp_size_t -mpn_toom44_mul_itch (mp_size_t an, mp_size_t bn) -{ - mp_size_t n = (an + 3) >> 2; - return 12 * n + GMP_NUMB_BITS; -} +#define MPN_TOOM22_MUL_MINSIZE 4 +#define MPN_TOOM2_SQR_MINSIZE 4 -static inline mp_size_t -mpn_toom32_mul_itch (mp_size_t an, mp_size_t bn) -{ - mp_size_t n = 1 + (2 * an >= 3 * bn ? (an - 1) / (size_t) 3 : (bn - 1) >> 1); - return 4 * n + 2; -} +#define MPN_TOOM33_MUL_MINSIZE 17 +#define MPN_TOOM3_SQR_MINSIZE 17 -static inline mp_size_t -mpn_toom42_mul_itch (mp_size_t an, mp_size_t bn) -{ - /* We could trim this to 4n+3 if HAVE_NATIVE_mpn_sublsh1_n, since - mpn_toom_interpolate_5pts only needs scratch otherwise. */ - mp_size_t n = an >= 2 * bn ? (an + 3) >> 2 : (bn + 1) >> 1; - return 6 * n + 3; -} +#define MPN_TOOM44_MUL_MINSIZE 30 +#define MPN_TOOM4_SQR_MINSIZE 30 -static inline mp_size_t -mpn_toom53_mul_itch (mp_size_t an, mp_size_t bn) -{ - mp_size_t n = 1 + (3 * an >= 5 * bn ? (an - 1) / (size_t) 5 : (bn - 1) / (size_t) 3); - return 10 * n + 10; -} +#define MPN_TOOM6H_MUL_MINSIZE 46 +#define MPN_TOOM6_SQR_MINSIZE 46 + +#define MPN_TOOM8H_MUL_MINSIZE 86 +#define MPN_TOOM8_SQR_MINSIZE 86 + +#define MPN_TOOM32_MUL_MINSIZE 10 +#define MPN_TOOM42_MUL_MINSIZE 10 +#define MPN_TOOM43_MUL_MINSIZE 49 /* ??? */ +#define MPN_TOOM53_MUL_MINSIZE 49 /* ??? */ +#define MPN_TOOM63_MUL_MINSIZE 49 -static inline mp_size_t -mpn_toom2_sqr_itch (mp_size_t an) -{ - mp_size_t n = 1 + ((an - 1) >> 1); - return 4 * n + 2; -} +#define mpn_sqr_diagonal __MPN(sqr_diagonal) +__GMP_DECLSPEC void mpn_sqr_diagonal __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); -static inline mp_size_t -mpn_toom3_sqr_itch (mp_size_t an) -{ - /* We could trim this to 4n+3 if HAVE_NATIVE_mpn_sublsh1_n, since - mpn_toom_interpolate_5pts only needs scratch otherwise. */ - mp_size_t n = (an + 2) / (size_t) 3; - return 6 * n + GMP_NUMB_BITS; -} +#define mpn_toom_interpolate_5pts __MPN(toom_interpolate_5pts) +__GMP_DECLSPEC void mpn_toom_interpolate_5pts __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_size_t, int, mp_limb_t)); -static inline mp_size_t -mpn_toom4_sqr_itch (mp_size_t an) -{ - mp_size_t n = (an + 3) >> 2; - return 12 * n + GMP_NUMB_BITS; -} +enum toom6_flags {toom6_all_pos = 0, toom6_vm1_neg = 1, toom6_vm2_neg = 2}; +#define mpn_toom_interpolate_6pts __MPN(toom_interpolate_6pts) +__GMP_DECLSPEC void mpn_toom_interpolate_6pts __GMP_PROTO ((mp_ptr, mp_size_t, enum toom6_flags, mp_ptr, mp_ptr, mp_ptr, mp_size_t)); +enum toom7_flags { toom7_w1_neg = 1, toom7_w3_neg = 2 }; +#define mpn_toom_interpolate_7pts __MPN(toom_interpolate_7pts) +__GMP_DECLSPEC void mpn_toom_interpolate_7pts __GMP_PROTO ((mp_ptr, mp_size_t, enum toom7_flags, mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); -/* kara uses n+1 limbs of temporary space and then recurses with the balance, - so need (n+1) + (ceil(n/2)+1) + (ceil(n/4)+1) + ... This can be solved to - 2n + o(n). Since n is very limited, o(n) in practice could be around 15. - For now, assume n is arbitrarily large. */ -#define MPN_KARA_MUL_N_TSIZE(n) (2*(n) + 2*GMP_LIMB_BITS) -#define MPN_KARA_SQR_N_TSIZE(n) (2*(n) + 2*GMP_LIMB_BITS) - -/* toom3 uses 2n + 2n/3 + o(n) limbs of temporary space if mpn_sublsh1_n is - unavailable, but just 2n + o(n) if mpn_sublsh1_n is available. It is hard - to pin down the value of o(n), since it is a complex function of - MUL_TOOM3_THRESHOLD and n. Normally toom3 is used between kara and fft; in - that case o(n) will be really limited. If toom3 is used for arbitrarily - large operands, o(n) will be larger. These definitions handle operands of - up to 8956264246117233 limbs. A single multiplication using toom3 on the - fastest hardware currently (2008) would need 10 million years, which - suggests that these limits are acceptable. */ -#if WANT_FFT -#if HAVE_NATIVE_mpn_sublsh1_n -#define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 63) -#define MPN_TOOM3_SQR_N_TSIZE(n) (2*(n) + 63) -#else -#define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 2*(n/3) + 63) -#define MPN_TOOM3_SQR_N_TSIZE(n) (2*(n) + 2*(n/3) + 63) -#endif -#else /* WANT_FFT */ -#if HAVE_NATIVE_mpn_sublsh1_n -#define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 255) -#define MPN_TOOM3_SQR_N_TSIZE(n) (2*(n) + 255) -#else -#define MPN_TOOM3_MUL_N_TSIZE(n) (2*(n) + 2*(n/3) + 255) -#define MPN_TOOM3_SQR_N_TSIZE(n) (2*(n) + 2*(n/3) + 255) -#endif -#define MPN_TOOM44_MAX_N 285405 -#endif /* WANT_FFT */ +#define mpn_toom_interpolate_8pts __MPN(toom_interpolate_8pts) +__GMP_DECLSPEC void mpn_toom_interpolate_8pts __GMP_PROTO ((mp_ptr, mp_size_t, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); -/* need 2 so that n2>=1 */ -#define MPN_KARA_MUL_N_MINSIZE 2 -#define MPN_KARA_SQR_N_MINSIZE 2 - -/* Need l>=1, ls>=1, and 2*ls > l (the latter for the tD MPN_INCR_U) */ -#define MPN_TOOM3_MUL_N_MINSIZE 17 -#define MPN_TOOM3_SQR_N_MINSIZE 17 +#define mpn_toom_interpolate_12pts __MPN(toom_interpolate_12pts) +__GMP_DECLSPEC void mpn_toom_interpolate_12pts __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_size_t, int, mp_ptr)); -#define MPN_TOOM44_MUL_N_MINSIZE 30 /* ??? */ -#define MPN_TOOM4_SQR_N_MINSIZE 30 /* ??? */ +#define mpn_toom_interpolate_16pts __MPN(toom_interpolate_16pts) +__GMP_DECLSPEC void mpn_toom_interpolate_16pts __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_size_t, int, mp_ptr)); -#define mpn_sqr_diagonal __MPN(sqr_diagonal) -void mpn_sqr_diagonal __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); +#define mpn_toom_couple_handling __MPN(toom_couple_handling) +__GMP_DECLSPEC void mpn_toom_couple_handling __GMP_PROTO ((mp_ptr, mp_size_t, mp_ptr, int, mp_size_t, int, int)); -#define mpn_kara_mul_n __MPN(kara_mul_n) -void mpn_kara_mul_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_toom_eval_dgr3_pm1 __MPN(toom_eval_dgr3_pm1) +__GMP_DECLSPEC int mpn_toom_eval_dgr3_pm1 __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_size_t, mp_ptr)); -#define mpn_kara_sqr_n __MPN(kara_sqr_n) -void mpn_kara_sqr_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_toom_eval_dgr3_pm2 __MPN(toom_eval_dgr3_pm2) +__GMP_DECLSPEC int mpn_toom_eval_dgr3_pm2 __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_size_t, mp_ptr)); -#define mpn_toom_interpolate_5pts __MPN(toom_interpolate_5pts) -void mpn_toom_interpolate_5pts __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_size_t, int, mp_limb_t, mp_ptr)); +#define mpn_toom_eval_pm1 __MPN(toom_eval_pm1) +__GMP_DECLSPEC int mpn_toom_eval_pm1 __GMP_PROTO ((mp_ptr, mp_ptr, unsigned, mp_srcptr, mp_size_t, mp_size_t, mp_ptr)); -enum toom4_flags { toom4_w1_neg = 1, toom4_w3_neg = 2 }; /* FIXME */ -#define mpn_toom_interpolate_7pts __MPN(toom_interpolate_7pts) -void mpn_toom_interpolate_7pts __GMP_PROTO ((mp_ptr, mp_size_t, enum toom4_flags, mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); +#define mpn_toom_eval_pm2 __MPN(toom_eval_pm2) +__GMP_DECLSPEC int mpn_toom_eval_pm2 __GMP_PROTO ((mp_ptr, mp_ptr, unsigned, mp_srcptr, mp_size_t, mp_size_t, mp_ptr)); -#define mpn_toom3_mul_n __MPN(toom3_mul_n) -void mpn_toom3_mul_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t,mp_ptr)); +#define mpn_toom_eval_pm2exp __MPN(toom_eval_pm2exp) +__GMP_DECLSPEC int mpn_toom_eval_pm2exp __GMP_PROTO ((mp_ptr, mp_ptr, unsigned, mp_srcptr, mp_size_t, mp_size_t, unsigned, mp_ptr)); -#define mpn_toom3_sqr_n __MPN(toom3_sqr_n) -void mpn_toom3_sqr_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_toom_eval_pm2rexp __MPN(toom_eval_pm2rexp) +__GMP_DECLSPEC int mpn_toom_eval_pm2rexp __GMP_PROTO ((mp_ptr, mp_ptr, unsigned, mp_srcptr, mp_size_t, mp_size_t, unsigned, mp_ptr)); #define mpn_toom22_mul __MPN(toom22_mul) -void mpn_toom22_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_toom22_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + +#define mpn_toom32_mul __MPN(toom32_mul) +__GMP_DECLSPEC void mpn_toom32_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + +#define mpn_toom42_mul __MPN(toom42_mul) +__GMP_DECLSPEC void mpn_toom42_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + +#define mpn_toom52_mul __MPN(toom52_mul) +__GMP_DECLSPEC void mpn_toom52_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + +#define mpn_toom62_mul __MPN(toom62_mul) +__GMP_DECLSPEC void mpn_toom62_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_toom2_sqr __MPN(toom2_sqr) -void mpn_toom2_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_toom2_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_toom33_mul __MPN(toom33_mul) -void mpn_toom33_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_toom33_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + +#define mpn_toom43_mul __MPN(toom43_mul) +__GMP_DECLSPEC void mpn_toom43_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + +#define mpn_toom53_mul __MPN(toom53_mul) +__GMP_DECLSPEC void mpn_toom53_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + +#define mpn_toom63_mul __MPN(toom63_mul) +__GMP_DECLSPEC void mpn_toom63_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_toom3_sqr __MPN(toom3_sqr) -void mpn_toom3_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_toom3_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_toom44_mul __MPN(toom44_mul) -void mpn_toom44_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_toom44_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); -#define mpn_toom32_mul __MPN(toom32_mul) -void mpn_toom32_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_toom4_sqr __MPN(toom4_sqr) +__GMP_DECLSPEC void mpn_toom4_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); -#define mpn_toom42_mul __MPN(toom42_mul) -void mpn_toom42_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_toom6h_mul __MPN(toom6h_mul) +__GMP_DECLSPEC void mpn_toom6h_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); -#define mpn_toom53_mul __MPN(toom53_mul) -void mpn_toom53_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_toom6_sqr __MPN(toom6_sqr) +__GMP_DECLSPEC void mpn_toom6_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); -#define mpn_toom62_mul __MPN(toom62_mul) -void mpn_toom62_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_toom8h_mul __MPN(toom8h_mul) +__GMP_DECLSPEC void mpn_toom8h_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); -#define mpn_toom4_sqr __MPN(toom4_sqr) -void mpn_toom4_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_toom8_sqr __MPN(toom8_sqr) +__GMP_DECLSPEC void mpn_toom8_sqr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_fft_best_k __MPN(fft_best_k) -int mpn_fft_best_k __GMP_PROTO ((mp_size_t, int)) ATTRIBUTE_CONST; +__GMP_DECLSPEC int mpn_fft_best_k __GMP_PROTO ((mp_size_t, int)) ATTRIBUTE_CONST; #define mpn_mul_fft __MPN(mul_fft) -mp_limb_t mpn_mul_fft __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, int)); +__GMP_DECLSPEC mp_limb_t mpn_mul_fft __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, int)); #define mpn_mul_fft_full __MPN(mul_fft_full) -void mpn_mul_fft_full __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); +__GMP_DECLSPEC void mpn_mul_fft_full __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); + +#define mpn_nussbaumer_mul __MPN(nussbaumer_mul) +__GMP_DECLSPEC void mpn_nussbaumer_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); #define mpn_fft_next_size __MPN(fft_next_size) -mp_size_t mpn_fft_next_size __GMP_PROTO ((mp_size_t, int)) ATTRIBUTE_CONST; +__GMP_DECLSPEC mp_size_t mpn_fft_next_size __GMP_PROTO ((mp_size_t, int)) ATTRIBUTE_CONST; + +#define mpn_sbpi1_div_qr __MPN(sbpi1_div_qr) +__GMP_DECLSPEC mp_limb_t mpn_sbpi1_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); + +#define mpn_sbpi1_div_q __MPN(sbpi1_div_q) +__GMP_DECLSPEC mp_limb_t mpn_sbpi1_div_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); + +#define mpn_sbpi1_divappr_q __MPN(sbpi1_divappr_q) +__GMP_DECLSPEC mp_limb_t mpn_sbpi1_divappr_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); -#define mpn_sb_divrem_mn __MPN(sb_divrem_mn) -mp_limb_t mpn_sb_divrem_mn __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t)); +#define mpn_dcpi1_div_qr __MPN(dcpi1_div_qr) +__GMP_DECLSPEC mp_limb_t mpn_dcpi1_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, gmp_pi1_t *)); +#define mpn_dcpi1_div_qr_n __MPN(dcpi1_div_qr_n) +__GMP_DECLSPEC mp_limb_t mpn_dcpi1_div_qr_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, gmp_pi1_t *, mp_ptr)); -#define mpn_dc_divrem_n __MPN(dc_divrem_n) -mp_limb_t mpn_dc_divrem_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t)); +#define mpn_dcpi1_div_q __MPN(dcpi1_div_q) +__GMP_DECLSPEC mp_limb_t mpn_dcpi1_div_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, gmp_pi1_t *)); + +#define mpn_dcpi1_divappr_q __MPN(dcpi1_divappr_q) +__GMP_DECLSPEC mp_limb_t mpn_dcpi1_divappr_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, gmp_pi1_t *)); +#define mpn_dcpi1_divappr_q_n __MPN(dcpi1_divappr_q_n) +__GMP_DECLSPEC mp_limb_t mpn_dcpi1_divappr_q_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, gmp_pi1_t *, mp_ptr)); -#define mpn_sb_div_qr __MPN(sb_div_qr) -mp_limb_t mpn_sb_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr)); -#define mpn_sb_div_q __MPN(sb_div_q) -mp_limb_t mpn_sb_div_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr)); -#define mpn_sb_divappr_q __MPN(sb_divappr_q) -mp_limb_t mpn_sb_divappr_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr)); -#define mpn_dc_div_qr __MPN(dc_div_qr) -mp_limb_t mpn_dc_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t)); -#define mpn_dc_div_qr_n __MPN(dc_div_qr_n) -mp_limb_t mpn_dc_div_qr_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_ptr)); -#define mpn_dc_div_q __MPN(dc_div_q) -mp_limb_t mpn_dc_div_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t)); -#define mpn_preinv_dc_div_qr __MPN(preinv_dc_div_qr) -mp_limb_t mpn_preinv_dc_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr)); -#define mpn_dc_divappr_q __MPN(dc_divappr_q) -mp_limb_t mpn_dc_divappr_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t)); -#define mpn_dc_divappr_q_n __MPN(dc_divappr_q_n) -mp_limb_t mpn_dc_divappr_q_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_ptr)); -#define mpn_preinv_dc_divappr_q __MPN(preinv_dc_divappr_q) -mp_limb_t mpn_preinv_dc_divappr_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr)); #define mpn_mu_div_qr __MPN(mu_div_qr) -mp_limb_t mpn_mu_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_limb_t mpn_mu_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_mu_div_qr_itch __MPN(mu_div_qr_itch) -mp_size_t mpn_mu_div_qr_itch __GMP_PROTO ((mp_size_t, mp_size_t, int)); +__GMP_DECLSPEC mp_size_t mpn_mu_div_qr_itch __GMP_PROTO ((mp_size_t, mp_size_t, int)); #define mpn_mu_div_qr_choose_in __MPN(mu_div_qr_choose_in) -mp_size_t mpn_mu_div_qr_choose_in __GMP_PROTO ((mp_size_t, mp_size_t, int)); +__GMP_DECLSPEC mp_size_t mpn_mu_div_qr_choose_in __GMP_PROTO ((mp_size_t, mp_size_t, int)); + #define mpn_preinv_mu_div_qr __MPN(preinv_mu_div_qr) -void mpn_preinv_mu_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_limb_t mpn_preinv_mu_div_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_preinv_mu_div_qr_itch __MPN(preinv_mu_div_qr_itch) +__GMP_DECLSPEC mp_size_t mpn_preinv_mu_div_qr_itch __GMP_PROTO ((mp_size_t, mp_size_t, mp_size_t)); + #define mpn_mu_divappr_q __MPN(mu_divappr_q) -mp_limb_t mpn_mu_divappr_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_limb_t mpn_mu_divappr_q __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_mu_divappr_q_itch __MPN(mu_divappr_q_itch) -mp_size_t mpn_mu_divappr_q_itch __GMP_PROTO ((mp_size_t, mp_size_t, int)); +__GMP_DECLSPEC mp_size_t mpn_mu_divappr_q_itch __GMP_PROTO ((mp_size_t, mp_size_t, int)); #define mpn_mu_divappr_q_choose_in __MPN(mu_divappr_q_choose_in) -mp_size_t mpn_mu_divappr_q_choose_in __GMP_PROTO ((mp_size_t, mp_size_t, int)); +__GMP_DECLSPEC mp_size_t mpn_mu_divappr_q_choose_in __GMP_PROTO ((mp_size_t, mp_size_t, int)); + #define mpn_preinv_mu_divappr_q __MPN(preinv_mu_divappr_q) -void mpn_preinv_mu_divappr_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_limb_t mpn_preinv_mu_divappr_q __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + #define mpn_mu_div_q __MPN(mu_div_q) -mp_limb_t mpn_mu_div_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_limb_t mpn_mu_div_q __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_mu_div_q_itch __MPN(mu_div_q_itch) +__GMP_DECLSPEC mp_size_t mpn_mu_div_q_itch __GMP_PROTO ((mp_size_t, mp_size_t, int)); + +#define mpn_div_q __MPN(div_q) +__GMP_DECLSPEC void mpn_div_q __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); + #define mpn_invert __MPN(invert) -void mpn_invert __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); -#define mpn_invert_itch __MPN(invert_itch) -mp_size_t mpn_invert_itch __GMP_PROTO ((mp_size_t)); +__GMP_DECLSPEC void mpn_invert __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_invert_itch(n) mpn_invertappr_itch(n) + +#define mpn_ni_invertappr __MPN(ni_invertappr) +__GMP_DECLSPEC mp_limb_t mpn_ni_invertappr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_invertappr __MPN(invertappr) +__GMP_DECLSPEC mp_limb_t mpn_invertappr __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_invertappr_itch(n) (3 * (n) + 2) #define mpn_binvert __MPN(binvert) -void mpn_binvert __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_binvert __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_binvert_itch __MPN(binvert_itch) -mp_size_t mpn_binvert_itch __GMP_PROTO ((mp_size_t)); -#define mpn_sb_bdiv_qr __MPN(sb_bdiv_qr) -mp_limb_t mpn_sb_bdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); -#define mpn_sb_bdiv_q __MPN(sb_bdiv_q) -void mpn_sb_bdiv_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); -#define mpn_dc_bdiv_qr __MPN(dc_bdiv_qr) -mp_limb_t mpn_dc_bdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); -#define mpn_dc_bdiv_qr_n_itch __MPN(dc_bdiv_qr_n_itch) -mp_size_t mpn_dc_bdiv_qr_n_itch __GMP_PROTO ((mp_size_t)); -#define mpn_dc_bdiv_qr_n __MPN(dc_bdiv_qr_n) -mp_limb_t mpn_dc_bdiv_qr_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr)); -#define mpn_dc_bdiv_q __MPN(dc_bdiv_q) -void mpn_dc_bdiv_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); -#define mpn_dc_bdiv_q_n_itch __MPN(dc_bdiv_q_n_itch) -mp_size_t mpn_dc_bdiv_q_n_itch __GMP_PROTO ((mp_size_t)); -#define mpn_dc_bdiv_q_n __MPN(dc_bdiv_q_n) -void mpn_dc_bdiv_q_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_binvert_itch __GMP_PROTO ((mp_size_t)); + +#define mpn_bdiv_q_1 __MPN(bdiv_q_1) +__GMP_DECLSPEC mp_limb_t mpn_bdiv_q_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); + +#define mpn_pi1_bdiv_q_1 __MPN(pi1_bdiv_q_1) +__GMP_DECLSPEC mp_limb_t mpn_pi1_bdiv_q_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t, int)); + +#define mpn_sbpi1_bdiv_qr __MPN(sbpi1_bdiv_qr) +__GMP_DECLSPEC mp_limb_t mpn_sbpi1_bdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); + +#define mpn_sbpi1_bdiv_q __MPN(sbpi1_bdiv_q) +__GMP_DECLSPEC void mpn_sbpi1_bdiv_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); + +#define mpn_dcpi1_bdiv_qr __MPN(dcpi1_bdiv_qr) +__GMP_DECLSPEC mp_limb_t mpn_dcpi1_bdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); +#define mpn_dcpi1_bdiv_qr_n_itch __MPN(dcpi1_bdiv_qr_n_itch) +__GMP_DECLSPEC mp_size_t mpn_dcpi1_bdiv_qr_n_itch __GMP_PROTO ((mp_size_t)); + +#define mpn_dcpi1_bdiv_qr_n __MPN(dcpi1_bdiv_qr_n) +__GMP_DECLSPEC mp_limb_t mpn_dcpi1_bdiv_qr_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr)); +#define mpn_dcpi1_bdiv_q __MPN(dcpi1_bdiv_q) +__GMP_DECLSPEC void mpn_dcpi1_bdiv_q __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t)); + +#define mpn_dcpi1_bdiv_q_n_itch __MPN(dcpi1_bdiv_q_n_itch) +__GMP_DECLSPEC mp_size_t mpn_dcpi1_bdiv_q_n_itch __GMP_PROTO ((mp_size_t)); +#define mpn_dcpi1_bdiv_q_n __MPN(dcpi1_bdiv_q_n) +__GMP_DECLSPEC void mpn_dcpi1_bdiv_q_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_ptr)); + #define mpn_mu_bdiv_qr __MPN(mu_bdiv_qr) -void mpn_mu_bdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_limb_t mpn_mu_bdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_mu_bdiv_qr_itch __MPN(mu_bdiv_qr_itch) -mp_size_t mpn_mu_bdiv_qr_itch __GMP_PROTO ((mp_size_t, mp_size_t)); +__GMP_DECLSPEC mp_size_t mpn_mu_bdiv_qr_itch __GMP_PROTO ((mp_size_t, mp_size_t)); + #define mpn_mu_bdiv_q __MPN(mu_bdiv_q) -void mpn_mu_bdiv_q __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_mu_bdiv_q __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_mu_bdiv_q_itch __MPN(mu_bdiv_q_itch) -mp_size_t mpn_mu_bdiv_q_itch __GMP_PROTO ((mp_size_t, mp_size_t)); +__GMP_DECLSPEC mp_size_t mpn_mu_bdiv_q_itch __GMP_PROTO ((mp_size_t, mp_size_t)); + +#define mpn_bdiv_qr __MPN(bdiv_qr) +__GMP_DECLSPEC mp_limb_t mpn_bdiv_qr __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_bdiv_qr_itch __MPN(bdiv_qr_itch) +__GMP_DECLSPEC mp_size_t mpn_bdiv_qr_itch __GMP_PROTO ((mp_size_t, mp_size_t)); + +#define mpn_bdiv_q __MPN(bdiv_q) +__GMP_DECLSPEC void mpn_bdiv_q __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_bdiv_q_itch __MPN(bdiv_q_itch) +__GMP_DECLSPEC mp_size_t mpn_bdiv_q_itch __GMP_PROTO ((mp_size_t, mp_size_t)); #define mpn_divexact __MPN(divexact) -void mpn_divexact __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_divexact __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); #define mpn_divexact_itch __MPN(divexact_itch) -mp_size_t mpn_divexact_itch __GMP_PROTO ((mp_size_t, mp_size_t)); - +__GMP_DECLSPEC mp_size_t mpn_divexact_itch __GMP_PROTO ((mp_size_t, mp_size_t)); #define mpn_bdiv_dbm1c __MPN(bdiv_dbm1c) -mp_limb_t mpn_bdiv_dbm1c __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)); +__GMP_DECLSPEC mp_limb_t mpn_bdiv_dbm1c __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)); #define mpn_bdiv_dbm1(dst, src, size, divisor) \ mpn_bdiv_dbm1c (dst, src, size, divisor, __GMP_CAST (mp_limb_t, 0)) #define mpn_powm __MPN(powm) -void mpn_powm __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_powm __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_powlo __MPN(powlo) -void mpn_powlo __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_size_t, mp_ptr)); - +__GMP_DECLSPEC void mpn_powlo __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_size_t, mp_ptr)); #define mpn_powm_sec __MPN(powm_sec) -void mpn_powm_sec __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_powm_sec __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr)); +#define mpn_powm_sec_itch __MPN(powm_sec_itch) +__GMP_DECLSPEC mp_size_t mpn_powm_sec_itch __GMP_PROTO ((mp_size_t, mp_size_t, mp_size_t)); #define mpn_subcnd_n __MPN(subcnd_n) -mp_limb_t mpn_subcnd_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t)); +__GMP_DECLSPEC mp_limb_t mpn_subcnd_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_limb_t)); #define mpn_tabselect __MPN(tabselect) -void mpn_tabselect __GMP_PROTO ((volatile mp_limb_t *, volatile mp_limb_t *, mp_size_t, mp_size_t, mp_size_t)); +__GMP_DECLSPEC void mpn_tabselect __GMP_PROTO ((volatile mp_limb_t *, volatile mp_limb_t *, mp_size_t, mp_size_t, mp_size_t)); +#define mpn_redc_1_sec __MPN(redc_1_sec) +__GMP_DECLSPEC void mpn_redc_1_sec __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); #ifndef DIVEXACT_BY3_METHOD #if GMP_NUMB_BITS % 2 == 0 && ! defined (HAVE_NATIVE_mpn_divexact_by3c) @@ -1301,18 +1364,18 @@ #endif #define mpz_divexact_gcd __gmpz_divexact_gcd -void mpz_divexact_gcd __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); +__GMP_DECLSPEC void mpz_divexact_gcd __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr)); #define mpz_inp_str_nowhite __gmpz_inp_str_nowhite #ifdef _GMP_H_HAVE_FILE -size_t mpz_inp_str_nowhite __GMP_PROTO ((mpz_ptr, FILE *, int, int, size_t)); +__GMP_DECLSPEC size_t mpz_inp_str_nowhite __GMP_PROTO ((mpz_ptr, FILE *, int, int, size_t)); #endif #define mpn_divisible_p __MPN(divisible_p) -int mpn_divisible_p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)) __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC int mpn_divisible_p __GMP_PROTO ((mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)) __GMP_ATTRIBUTE_PURE; #define mpn_rootrem __MPN(rootrem) -mp_size_t mpn_rootrem __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); +__GMP_DECLSPEC mp_size_t mpn_rootrem __GMP_PROTO ((mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); #if defined (_CRAY) @@ -1562,7 +1625,7 @@ mpz_ptr __x = (X); \ ASSERT ((NLIMBS) >= 1); \ __x->_mp_alloc = (NLIMBS); \ - __x->_mp_d = (mp_ptr) TMP_ALLOC ((NLIMBS) * BYTES_PER_MP_LIMB); \ + __x->_mp_d = TMP_ALLOC_LIMBS (NLIMBS); \ } while (0) /* Realloc for an mpz_t WHAT if it has less than NEEDED limbs. */ @@ -1606,149 +1669,197 @@ __GMP_DECLSPEC extern const mp_limb_t __gmp_fib_table[]; #define FIB_TABLE(n) (__gmp_fib_table[(n)+1]) +#define SIEVESIZE 512 /* FIXME: Allow gmp_init_primesieve to choose */ +typedef struct +{ + unsigned long d; /* current index in s[] */ + unsigned long s0; /* number corresponding to s[0] */ + unsigned long sqrt_s0; /* misnomer for sqrt(s[SIEVESIZE-1]) */ + unsigned char s[SIEVESIZE + 1]; /* sieve table */ +} gmp_primesieve_t; -/* For a threshold between algorithms A and B, size>=thresh is where B - should be used. Special value MP_SIZE_T_MAX means only ever use A, or - value 0 means only ever use B. The tests for these special values will - be compile-time constants, so the compiler should be able to eliminate - the code for the unwanted algorithm. */ +#define gmp_init_primesieve __gmp_init_primesieve +__GMP_DECLSPEC void gmp_init_primesieve (gmp_primesieve_t *); -#define ABOVE_THRESHOLD(size,thresh) \ - ((thresh) == 0 \ - || ((thresh) != MP_SIZE_T_MAX \ - && (size) >= (thresh))) -#define BELOW_THRESHOLD(size,thresh) (! ABOVE_THRESHOLD (size, thresh)) +#define gmp_nextprime __gmp_nextprime +__GMP_DECLSPEC unsigned long int gmp_nextprime (gmp_primesieve_t *); -/* Usage: int use_foo = BELOW_THRESHOLD (size, FOO_THRESHOLD); - ... - if (CACHED_BELOW_THRESHOLD (use_foo, size, FOO_THRESHOLD)) - - When "use_foo" is a constant (thresh is 0 or MP_SIZE_T), gcc prior to - version 3.3 doesn't optimize away a test "if (use_foo)" when within a - loop. CACHED_BELOW_THRESHOLD helps it do so. */ - -#define CACHED_ABOVE_THRESHOLD(cache, thresh) \ - ((thresh) == 0 || (thresh) == MP_SIZE_T_MAX \ - ? ABOVE_THRESHOLD (0, thresh) \ - : (cache)) -#define CACHED_BELOW_THRESHOLD(cache, thresh) \ - ((thresh) == 0 || (thresh) == MP_SIZE_T_MAX \ - ? BELOW_THRESHOLD (0, thresh) \ - : (cache)) - - -/* If MUL_KARATSUBA_THRESHOLD is not already defined, define it to a - value which is good on most machines. */ -#ifndef MUL_KARATSUBA_THRESHOLD -#define MUL_KARATSUBA_THRESHOLD 32 -#endif - -/* If MUL_TOOM3_THRESHOLD is not already defined, define it to a - value which is good on most machines. */ -#ifndef MUL_TOOM3_THRESHOLD -#define MUL_TOOM3_THRESHOLD 128 + +#ifndef MUL_TOOM22_THRESHOLD +#define MUL_TOOM22_THRESHOLD 30 +#endif + +#ifndef MUL_TOOM33_THRESHOLD +#define MUL_TOOM33_THRESHOLD 100 #endif #ifndef MUL_TOOM44_THRESHOLD -#define MUL_TOOM44_THRESHOLD 500 +#define MUL_TOOM44_THRESHOLD 300 #endif -/* Source compatibility while source is in flux. */ -#define MUL_TOOM22_THRESHOLD MUL_KARATSUBA_THRESHOLD -#define MUL_TOOM33_THRESHOLD MUL_TOOM3_THRESHOLD -#define SQR_TOOM2_THRESHOLD SQR_KARATSUBA_THRESHOLD - -/* MUL_KARATSUBA_THRESHOLD_LIMIT is the maximum for MUL_KARATSUBA_THRESHOLD. - In a normal build MUL_KARATSUBA_THRESHOLD is a constant and we use that. - In a fat binary or tune program build MUL_KARATSUBA_THRESHOLD is a - variable and a separate hard limit will have been defined. Similarly for - TOOM3. */ -#ifndef MUL_KARATSUBA_THRESHOLD_LIMIT -#define MUL_KARATSUBA_THRESHOLD_LIMIT MUL_KARATSUBA_THRESHOLD +#ifndef MUL_TOOM6H_THRESHOLD +#define MUL_TOOM6H_THRESHOLD 350 #endif -#ifndef MUL_TOOM3_THRESHOLD_LIMIT -#define MUL_TOOM3_THRESHOLD_LIMIT MUL_TOOM3_THRESHOLD + +#ifndef SQR_TOOM6_THRESHOLD +#define SQR_TOOM6_THRESHOLD MUL_TOOM6H_THRESHOLD #endif -#ifndef MULLOW_BASECASE_THRESHOLD_LIMIT -#define MULLOW_BASECASE_THRESHOLD_LIMIT MULLOW_BASECASE_THRESHOLD + +#ifndef MUL_TOOM8H_THRESHOLD +#define MUL_TOOM8H_THRESHOLD 450 +#endif + +#ifndef SQR_TOOM8_THRESHOLD +#define SQR_TOOM8_THRESHOLD MUL_TOOM8H_THRESHOLD +#endif + +#ifndef MUL_TOOM32_TO_TOOM43_THRESHOLD +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 100 +#endif + +#ifndef MUL_TOOM32_TO_TOOM53_THRESHOLD +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 110 +#endif + +#ifndef MUL_TOOM42_TO_TOOM53_THRESHOLD +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 100 +#endif + +#ifndef MUL_TOOM42_TO_TOOM63_THRESHOLD +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 110 +#endif + +/* MUL_TOOM22_THRESHOLD_LIMIT is the maximum for MUL_TOOM22_THRESHOLD. In a + normal build MUL_TOOM22_THRESHOLD is a constant and we use that. In a fat + binary or tune program build MUL_TOOM22_THRESHOLD is a variable and a + separate hard limit will have been defined. Similarly for TOOM3. */ +#ifndef MUL_TOOM22_THRESHOLD_LIMIT +#define MUL_TOOM22_THRESHOLD_LIMIT MUL_TOOM22_THRESHOLD +#endif +#ifndef MUL_TOOM33_THRESHOLD_LIMIT +#define MUL_TOOM33_THRESHOLD_LIMIT MUL_TOOM33_THRESHOLD +#endif +#ifndef MULLO_BASECASE_THRESHOLD_LIMIT +#define MULLO_BASECASE_THRESHOLD_LIMIT MULLO_BASECASE_THRESHOLD #endif /* SQR_BASECASE_THRESHOLD is where mpn_sqr_basecase should take over from - mpn_mul_basecase in mpn_sqr_n. Default is to use mpn_sqr_basecase - always. (Note that we certainly always want it if there's a native - assembler mpn_sqr_basecase.) - - If it turns out that mpn_kara_sqr_n becomes faster than mpn_mul_basecase - before mpn_sqr_basecase does, then SQR_BASECASE_THRESHOLD is the - karatsuba threshold and SQR_KARATSUBA_THRESHOLD is 0. This oddity arises - more or less because SQR_KARATSUBA_THRESHOLD represents the size up to - which mpn_sqr_basecase should be used, and that may be never. */ + mpn_mul_basecase. Default is to use mpn_sqr_basecase from 0. (Note that we + certainly always want it if there's a native assembler mpn_sqr_basecase.) + + If it turns out that mpn_toom2_sqr becomes faster than mpn_mul_basecase + before mpn_sqr_basecase does, then SQR_BASECASE_THRESHOLD is the toom2 + threshold and SQR_TOOM2_THRESHOLD is 0. This oddity arises more or less + because SQR_TOOM2_THRESHOLD represents the size up to which mpn_sqr_basecase + should be used, and that may be never. */ #ifndef SQR_BASECASE_THRESHOLD -#define SQR_BASECASE_THRESHOLD 0 +#define SQR_BASECASE_THRESHOLD 0 #endif -#ifndef SQR_KARATSUBA_THRESHOLD -#define SQR_KARATSUBA_THRESHOLD (2*MUL_KARATSUBA_THRESHOLD) +#ifndef SQR_TOOM2_THRESHOLD +#define SQR_TOOM2_THRESHOLD 50 #endif #ifndef SQR_TOOM3_THRESHOLD -#define SQR_TOOM3_THRESHOLD 128 +#define SQR_TOOM3_THRESHOLD 120 #endif #ifndef SQR_TOOM4_THRESHOLD -#define SQR_TOOM4_THRESHOLD 500 +#define SQR_TOOM4_THRESHOLD 400 #endif -/* See comments above about MUL_TOOM3_THRESHOLD_LIMIT. */ +/* See comments above about MUL_TOOM33_THRESHOLD_LIMIT. */ #ifndef SQR_TOOM3_THRESHOLD_LIMIT #define SQR_TOOM3_THRESHOLD_LIMIT SQR_TOOM3_THRESHOLD #endif #ifndef DC_DIV_QR_THRESHOLD -#define DC_DIV_QR_THRESHOLD 43 +#define DC_DIV_QR_THRESHOLD 50 #endif #ifndef DC_DIVAPPR_Q_THRESHOLD -#define DC_DIVAPPR_Q_THRESHOLD 208 -#endif - -#ifndef DC_DIV_Q_THRESHOLD -#define DC_DIV_Q_THRESHOLD 228 +#define DC_DIVAPPR_Q_THRESHOLD 200 #endif #ifndef DC_BDIV_QR_THRESHOLD -#define DC_BDIV_QR_THRESHOLD 52 +#define DC_BDIV_QR_THRESHOLD 50 #endif #ifndef DC_BDIV_Q_THRESHOLD -#define DC_BDIV_Q_THRESHOLD 224 +#define DC_BDIV_Q_THRESHOLD 180 #endif #ifndef DIVEXACT_JEB_THRESHOLD -#define DIVEXACT_JEB_THRESHOLD 25 +#define DIVEXACT_JEB_THRESHOLD 25 +#endif + +#ifndef INV_MULMOD_BNM1_THRESHOLD +#define INV_MULMOD_BNM1_THRESHOLD (5*MULMOD_BNM1_THRESHOLD) +#endif + +#ifndef INV_APPR_THRESHOLD +#define INV_APPR_THRESHOLD INV_NEWTON_THRESHOLD #endif #ifndef INV_NEWTON_THRESHOLD -#define INV_NEWTON_THRESHOLD 654 +#define INV_NEWTON_THRESHOLD 200 #endif #ifndef BINV_NEWTON_THRESHOLD -#define BINV_NEWTON_THRESHOLD 807 +#define BINV_NEWTON_THRESHOLD 300 #endif #ifndef MU_DIVAPPR_Q_THRESHOLD -#define MU_DIVAPPR_Q_THRESHOLD 4000 +#define MU_DIVAPPR_Q_THRESHOLD 2000 #endif -#ifndef MU_DIV_Q_THRESHOLD -#define MU_DIV_Q_THRESHOLD 4000 +#ifndef MU_DIV_QR_THRESHOLD +#define MU_DIV_QR_THRESHOLD 2000 +#endif + +#ifndef MUPI_DIV_QR_THRESHOLD +#define MUPI_DIV_QR_THRESHOLD 200 #endif #ifndef MU_BDIV_Q_THRESHOLD -#define MU_BDIV_Q_THRESHOLD 2000 +#define MU_BDIV_Q_THRESHOLD 2000 +#endif + +#ifndef MU_BDIV_QR_THRESHOLD +#define MU_BDIV_QR_THRESHOLD 2000 +#endif + +#ifndef MULMOD_BNM1_THRESHOLD +#define MULMOD_BNM1_THRESHOLD 16 +#endif + +#ifndef SQRMOD_BNM1_THRESHOLD +#define SQRMOD_BNM1_THRESHOLD 16 +#endif + +#ifndef MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD +#define MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD (INV_MULMOD_BNM1_THRESHOLD/2) +#endif + +#if HAVE_NATIVE_mpn_addmul_2 || HAVE_NATIVE_mpn_redc_2 + +#ifndef REDC_1_TO_REDC_2_THRESHOLD +#define REDC_1_TO_REDC_2_THRESHOLD 15 +#endif +#ifndef REDC_2_TO_REDC_N_THRESHOLD +#define REDC_2_TO_REDC_N_THRESHOLD 100 +#endif + +#else + +#ifndef REDC_1_TO_REDC_N_THRESHOLD +#define REDC_1_TO_REDC_N_THRESHOLD 100 #endif +#endif /* HAVE_NATIVE_mpn_addmul_2 || HAVE_NATIVE_mpn_redc_2 */ + + /* First k to use for an FFT modF multiply. A modF FFT is an order log(2^k)/log(2^(k-1)) algorithm, so k=3 is merely 1.5 like karatsuba, whereas k=4 is 1.33 which is faster than toom3 at 1.485. */ @@ -1756,7 +1867,7 @@ /* Threshold at which FFT should be used to do a modF NxN -> N multiply. */ #ifndef MUL_FFT_MODF_THRESHOLD -#define MUL_FFT_MODF_THRESHOLD (MUL_TOOM3_THRESHOLD * 3) +#define MUL_FFT_MODF_THRESHOLD (MUL_TOOM33_THRESHOLD * 3) #endif #ifndef SQR_FFT_MODF_THRESHOLD #define SQR_FFT_MODF_THRESHOLD (SQR_TOOM3_THRESHOLD * 3) @@ -1779,12 +1890,12 @@ etc. See mpn_fft_best_k(). */ #ifndef MUL_FFT_TABLE #define MUL_FFT_TABLE \ - { MUL_TOOM3_THRESHOLD * 4, /* k=5 */ \ - MUL_TOOM3_THRESHOLD * 8, /* k=6 */ \ - MUL_TOOM3_THRESHOLD * 16, /* k=7 */ \ - MUL_TOOM3_THRESHOLD * 32, /* k=8 */ \ - MUL_TOOM3_THRESHOLD * 96, /* k=9 */ \ - MUL_TOOM3_THRESHOLD * 288, /* k=10 */ \ + { MUL_TOOM33_THRESHOLD * 4, /* k=5 */ \ + MUL_TOOM33_THRESHOLD * 8, /* k=6 */ \ + MUL_TOOM33_THRESHOLD * 16, /* k=7 */ \ + MUL_TOOM33_THRESHOLD * 32, /* k=8 */ \ + MUL_TOOM33_THRESHOLD * 96, /* k=9 */ \ + MUL_TOOM33_THRESHOLD * 288, /* k=10 */ \ 0 } #endif #ifndef SQR_FFT_TABLE @@ -1798,6 +1909,12 @@ 0 } #endif +struct fft_table_nk +{ + unsigned int n:27; + unsigned int k:5; +}; + #ifndef FFT_TABLE_ATTRS #define FFT_TABLE_ATTRS static const #endif @@ -1805,15 +1922,8 @@ #define MPN_FFT_TABLE_SIZE 16 -/* mpn_dc_divrem_n(n) calls 2*mul(n/2)+2*div(n/2), thus to be faster than - div(n) = 4*div(n/2), we need mul(n/2) to be faster than the classic way, - i.e. n/2 >= MUL_KARATSUBA_THRESHOLD - - Measured values are between 2 and 4 times MUL_KARATSUBA_THRESHOLD, so go - for 3 as an average. */ - -#ifndef DIV_DC_THRESHOLD -#define DIV_DC_THRESHOLD (3 * MUL_KARATSUBA_THRESHOLD) +#ifndef DC_DIV_QR_THRESHOLD +#define DC_DIV_QR_THRESHOLD (3 * MUL_TOOM22_THRESHOLD) #endif #ifndef GET_STR_DC_THRESHOLD @@ -1882,7 +1992,7 @@ #define ASSERT_FILE "" #endif -void __gmp_assert_header __GMP_PROTO ((const char *, int)); +__GMP_DECLSPEC void __gmp_assert_header __GMP_PROTO ((const char *, int)); __GMP_DECLSPEC void __gmp_assert_fail __GMP_PROTO ((const char *, int, const char *)) ATTRIBUTE_NORETURN; #if HAVE_STRINGIZE @@ -2008,11 +2118,9 @@ #endif -#if HAVE_NATIVE_mpn_com_n -#define mpn_com_n __MPN(com_n) -void mpn_com_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); -#else -#define mpn_com_n(d,s,n) \ +#if ! HAVE_NATIVE_mpn_com +#undef mpn_com +#define mpn_com(d,s,n) \ do { \ mp_ptr __d = (d); \ mp_srcptr __s = (s); \ @@ -2025,84 +2133,82 @@ } while (0) #endif -#define MPN_LOGOPS_N_INLINE(d, s1, s2, n, operation) \ - do { \ - mp_ptr __d = (d); \ - mp_srcptr __s1 = (s1); \ - mp_srcptr __s2 = (s2); \ - mp_size_t __n = (n); \ - ASSERT (__n >= 1); \ - ASSERT (MPN_SAME_OR_SEPARATE_P (__d, __s1, __n)); \ - ASSERT (MPN_SAME_OR_SEPARATE_P (__d, __s2, __n)); \ - do \ - operation; \ - while (--__n); \ +#define MPN_LOGOPS_N_INLINE(rp, up, vp, n, operation) \ + do { \ + mp_srcptr __up = (up); \ + mp_srcptr __vp = (vp); \ + mp_ptr __rp = (rp); \ + mp_size_t __n = (n); \ + mp_limb_t __a, __b; \ + ASSERT (__n > 0); \ + ASSERT (MPN_SAME_OR_SEPARATE_P (__rp, __up, __n)); \ + ASSERT (MPN_SAME_OR_SEPARATE_P (__rp, __vp, __n)); \ + __up += __n; \ + __vp += __n; \ + __rp += __n; \ + __n = -__n; \ + do { \ + __a = __up[__n]; \ + __b = __vp[__n]; \ + __rp[__n] = operation; \ + } while (++__n); \ } while (0) -#if HAVE_NATIVE_mpn_and_n -#define mpn_and_n __MPN(and_n) -void mpn_and_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#else -#define mpn_and_n(d, s1, s2, n) \ - MPN_LOGOPS_N_INLINE (d, s1, s2, n, *__d++ = *__s1++ & *__s2++) + +#if ! HAVE_NATIVE_mpn_and_n +#undef mpn_and_n +#define mpn_and_n(rp, up, vp, n) \ + MPN_LOGOPS_N_INLINE (rp, up, vp, n, __a & __b) #endif -#if HAVE_NATIVE_mpn_andn_n -#define mpn_andn_n __MPN(andn_n) -void mpn_andn_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#else -#define mpn_andn_n(d, s1, s2, n) \ - MPN_LOGOPS_N_INLINE (d, s1, s2, n, *__d++ = *__s1++ & ~*__s2++) +#if ! HAVE_NATIVE_mpn_andn_n +#undef mpn_andn_n +#define mpn_andn_n(rp, up, vp, n) \ + MPN_LOGOPS_N_INLINE (rp, up, vp, n, __a & ~__b) #endif -#if HAVE_NATIVE_mpn_nand_n -#define mpn_nand_n __MPN(nand_n) -void mpn_nand_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#else -#define mpn_nand_n(d, s1, s2, n) \ - MPN_LOGOPS_N_INLINE (d, s1, s2, n, *__d++ = ~(*__s1++ & *__s2++) & GMP_NUMB_MASK) +#if ! HAVE_NATIVE_mpn_nand_n +#undef mpn_nand_n +#define mpn_nand_n(rp, up, vp, n) \ + MPN_LOGOPS_N_INLINE (rp, up, vp, n, ~(__a & __b) & GMP_NUMB_MASK) #endif -#if HAVE_NATIVE_mpn_ior_n -#define mpn_ior_n __MPN(ior_n) -void mpn_ior_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#else -#define mpn_ior_n(d, s1, s2, n) \ - MPN_LOGOPS_N_INLINE (d, s1, s2, n, *__d++ = *__s1++ | *__s2++) +#if ! HAVE_NATIVE_mpn_ior_n +#undef mpn_ior_n +#define mpn_ior_n(rp, up, vp, n) \ + MPN_LOGOPS_N_INLINE (rp, up, vp, n, __a | __b) #endif -#if HAVE_NATIVE_mpn_iorn_n -#define mpn_iorn_n __MPN(iorn_n) -void mpn_iorn_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#else -#define mpn_iorn_n(d, s1, s2, n) \ - MPN_LOGOPS_N_INLINE (d, s1, s2, n, *__d++ = (*__s1++ | ~*__s2++) & GMP_NUMB_MASK) +#if ! HAVE_NATIVE_mpn_iorn_n +#undef mpn_iorn_n +#define mpn_iorn_n(rp, up, vp, n) \ + MPN_LOGOPS_N_INLINE (rp, up, vp, n, (__a | ~__b) & GMP_NUMB_MASK) #endif -#if HAVE_NATIVE_mpn_nior_n -#define mpn_nior_n __MPN(nior_n) -void mpn_nior_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#else -#define mpn_nior_n(d, s1, s2, n) \ - MPN_LOGOPS_N_INLINE (d, s1, s2, n, *__d++ = ~(*__s1++ | *__s2++) & GMP_NUMB_MASK) +#if ! HAVE_NATIVE_mpn_nior_n +#undef mpn_nior_n +#define mpn_nior_n(rp, up, vp, n) \ + MPN_LOGOPS_N_INLINE (rp, up, vp, n, ~(__a | __b) & GMP_NUMB_MASK) #endif -#if HAVE_NATIVE_mpn_xor_n -#define mpn_xor_n __MPN(xor_n) -void mpn_xor_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#else -#define mpn_xor_n(d, s1, s2, n) \ - MPN_LOGOPS_N_INLINE (d, s1, s2, n, *__d++ = *__s1++ ^ *__s2++) +#if ! HAVE_NATIVE_mpn_xor_n +#undef mpn_xor_n +#define mpn_xor_n(rp, up, vp, n) \ + MPN_LOGOPS_N_INLINE (rp, up, vp, n, __a ^ __b) #endif -#if HAVE_NATIVE_mpn_xnor_n -#define mpn_xnor_n __MPN(xnor_n) -void mpn_xnor_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); -#else -#define mpn_xnor_n(d, s1, s2, n) \ - MPN_LOGOPS_N_INLINE (d, s1, s2, n, *__d++ = ~(*__s1++ ^ *__s2++) & GMP_NUMB_MASK) +#if ! HAVE_NATIVE_mpn_xnor_n +#undef mpn_xnor_n +#define mpn_xnor_n(rp, up, vp, n) \ + MPN_LOGOPS_N_INLINE (rp, up, vp, n, ~(__a ^ __b) & GMP_NUMB_MASK) #endif +#define mpn_trialdiv __MPN(trialdiv) +__GMP_DECLSPEC mp_limb_t mpn_trialdiv __GMP_PROTO ((mp_srcptr, mp_size_t, mp_size_t, int *)); + +#define mpn_remove __MPN(remove) +__GMP_DECLSPEC mp_bitcnt_t mpn_remove __GMP_PROTO ((mp_ptr, mp_size_t *, mp_ptr, mp_size_t, mp_ptr, mp_size_t, mp_bitcnt_t)); + /* ADDC_LIMB sets w=x+y and cout to 0 or 1 for a carry from that addition. */ #if GMP_NAIL_BITS == 0 @@ -2163,7 +2269,7 @@ for the benefit of assertion checking. */ #if defined (__GNUC__) && HAVE_HOST_CPU_FAMILY_x86 && GMP_NAIL_BITS == 0 \ - && BITS_PER_MP_LIMB == 32 && ! defined (NO_ASM) && ! WANT_ASSERT + && GMP_LIMB_BITS == 32 && ! defined (NO_ASM) && ! WANT_ASSERT /* Better flags handling than the generic C gives on i386, saving a few bytes of code and maybe a cycle or two. */ @@ -2352,14 +2458,13 @@ i.e. the number of bits used to represent each digit in the base. */ mp_limb_t big_base; - /* A BITS_PER_MP_LIMB bit approximation to 1/big_base, represented as a + /* A GMP_LIMB_BITS bit approximation to 1/big_base, represented as a fixed-point number. Instead of dividing by big_base an application can choose to multiply by big_base_inverted. */ mp_limb_t big_base_inverted; }; #define mp_bases __MPN(bases) -#define __mp_bases __MPN(bases) __GMP_DECLSPEC extern const struct bases mp_bases[257]; @@ -2484,7 +2589,7 @@ /* Use a library function for invert_limb, if available. */ #define mpn_invert_limb __MPN(invert_limb) -mp_limb_t mpn_invert_limb __GMP_PROTO ((mp_limb_t)) ATTRIBUTE_CONST; +__GMP_DECLSPEC mp_limb_t mpn_invert_limb __GMP_PROTO ((mp_limb_t)) ATTRIBUTE_CONST; #if ! defined (invert_limb) && HAVE_NATIVE_mpn_invert_limb #define invert_limb(invxl,xl) \ do { \ @@ -2501,12 +2606,41 @@ } while (0) #endif +#define invert_pi1(dinv, d1, d0) \ + do { \ + mp_limb_t v, p, t1, t0, mask; \ + invert_limb (v, d1); \ + p = d1 * v; \ + p += d0; \ + if (p < d0) \ + { \ + v--; \ + mask = -(p >= d1); \ + p -= d1; \ + v += mask; \ + p -= mask & d1; \ + } \ + umul_ppmm (t1, t0, d0, v); \ + p += t1; \ + if (p < t1) \ + { \ + v--; \ + if (UNLIKELY (p >= d1)) \ + { \ + if (p > d1 || t0 >= d0) \ + v--; \ + } \ + } \ + (dinv).inv32 = v; \ + } while (0) + + #ifndef udiv_qrnnd_preinv #define udiv_qrnnd_preinv udiv_qrnnd_preinv3 #endif /* Divide the two-limb number in (NH,,NL) by D, with DI being the largest - limb not larger than (2**(2*BITS_PER_MP_LIMB))/D - (2**BITS_PER_MP_LIMB). + limb not larger than (2**(2*GMP_LIMB_BITS))/D - (2**GMP_LIMB_BITS). If this would yield overflow, DI should be the largest possible number (i.e., only ones). For correct operation, the most significant bit of D has to be set. Put the quotient in Q and the remainder in R. */ @@ -2563,8 +2697,8 @@ do { \ mp_limb_t _n2, _n10, _nmask, _nadj, _q1; \ mp_limb_t _xh, _xl; \ - _n2 = ((nh) << (BITS_PER_MP_LIMB - (lgup))) + ((nl) >> 1 >> (l - 1));\ - _n10 = (nl) << (BITS_PER_MP_LIMB - (lgup)); \ + _n2 = ((nh) << (GMP_LIMB_BITS - (lgup))) + ((nl) >> 1 >> (l - 1)); \ + _n10 = (nl) << (GMP_LIMB_BITS - (lgup)); \ _nmask = LIMB_HIGHBIT_TO_MASK (_n10); \ _nadj = _n10 + (_nmask & (dnorm)); \ umul_ppmm (_xh, _xl, di, _n2 - _nmask); \ @@ -2637,22 +2771,54 @@ (r) = _r; \ } while (0) +/* Compute quotient the quotient and remainder for n / d. Requires d + >= B^2 / 2 and n < d B. di is the inverse + + floor ((B^3 - 1) / (d0 + d1 B)) - B. + + NOTE: Output variables are updated multiple times. Only some inputs + and outputs may overlap. +*/ +#define udiv_qr_3by2(q, r1, r0, n2, n1, n0, d1, d0, dinv) \ + do { \ + mp_limb_t _q0, _t1, _t0, _mask; \ + umul_ppmm ((q), _q0, (n2), (dinv)); \ + add_ssaaaa ((q), _q0, (q), _q0, (n2), (n1)); \ + \ + /* Compute the two most significant limbs of n - q'd */ \ + (r1) = (n1) - (d1) * (q); \ + (r0) = (n0); \ + sub_ddmmss ((r1), (r0), (r1), (r0), (d1), (d0)); \ + umul_ppmm (_t1, _t0, (d0), (q)); \ + sub_ddmmss ((r1), (r0), (r1), (r0), _t1, _t0); \ + (q)++; \ + \ + /* Conditionally adjust q and the remainders */ \ + _mask = - (mp_limb_t) ((r1) >= _q0); \ + (q) += _mask; \ + add_ssaaaa ((r1), (r0), (r1), (r0), _mask & (d1), _mask & (d0)); \ + if (UNLIKELY ((r1) >= (d1))) \ + { \ + if ((r1) > (d1) || (r0) >= (d0)) \ + { \ + (q)++; \ + sub_ddmmss ((r1), (r0), (r1), (r0), (d1), (d0)); \ + } \ + } \ + } while (0) + #ifndef mpn_preinv_divrem_1 /* if not done with cpuvec in a fat binary */ #define mpn_preinv_divrem_1 __MPN(preinv_divrem_1) -mp_limb_t mpn_preinv_divrem_1 __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t, int)); +__GMP_DECLSPEC mp_limb_t mpn_preinv_divrem_1 __GMP_PROTO ((mp_ptr, mp_size_t, mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t, int)); #endif -/* USE_PREINV_DIVREM_1 is whether to use mpn_preinv_divrem_1, as opposed to - the plain mpn_divrem_1. Likewise USE_PREINV_MOD_1 chooses between - mpn_preinv_mod_1 and plain mpn_mod_1. The default for both is yes, since - the few CISC chips where preinv is not good have defines saying so. */ +/* USE_PREINV_DIVREM_1 is whether to use mpn_preinv_divrem_1, as opposed to the + plain mpn_divrem_1. The default is yes, since the few CISC chips where + preinv is not good have defines saying so. */ #ifndef USE_PREINV_DIVREM_1 #define USE_PREINV_DIVREM_1 1 #endif -#ifndef USE_PREINV_MOD_1 -#define USE_PREINV_MOD_1 1 -#endif #if USE_PREINV_DIVREM_1 #define MPN_DIVREM_OR_PREINV_DIVREM_1(qp,xsize,ap,size,d,dinv,shift) \ @@ -2662,36 +2828,39 @@ mpn_divrem_1 (qp, xsize, ap, size, d) #endif -#if USE_PREINV_MOD_1 -#define MPN_MOD_OR_PREINV_MOD_1(src,size,divisor,inverse) \ - mpn_preinv_mod_1 (src, size, divisor, inverse) -#else -#define MPN_MOD_OR_PREINV_MOD_1(src,size,divisor,inverse) \ - mpn_mod_1 (src, size, divisor) +#ifndef PREINV_MOD_1_TO_MOD_1_THRESHOLD +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 10 #endif +/* This selection may seem backwards. The reason mpn_mod_1 typically takes + over for larger sizes is that it uses the mod_1_1 function. */ +#define MPN_MOD_OR_PREINV_MOD_1(src,size,divisor,inverse) \ + (BELOW_THRESHOLD (size, PREINV_MOD_1_TO_MOD_1_THRESHOLD) \ + ? mpn_preinv_mod_1 (src, size, divisor, inverse) \ + : mpn_mod_1 (src, size, divisor)) + #ifndef mpn_mod_34lsub1 /* if not done with cpuvec in a fat binary */ #define mpn_mod_34lsub1 __MPN(mod_34lsub1) -mp_limb_t mpn_mod_34lsub1 __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_limb_t mpn_mod_34lsub1 __GMP_PROTO ((mp_srcptr, mp_size_t)) __GMP_ATTRIBUTE_PURE; #endif /* DIVEXACT_1_THRESHOLD is at what size to use mpn_divexact_1, as opposed to - plain mpn_divrem_1. Likewise MODEXACT_1_ODD_THRESHOLD for + plain mpn_divrem_1. Likewise BMOD_1_TO_MOD_1_THRESHOLD for mpn_modexact_1_odd against plain mpn_mod_1. On most CPUs divexact and modexact are faster at all sizes, so the defaults are 0. Those CPUs where this is not right have a tuned threshold. */ #ifndef DIVEXACT_1_THRESHOLD #define DIVEXACT_1_THRESHOLD 0 #endif -#ifndef MODEXACT_1_ODD_THRESHOLD -#define MODEXACT_1_ODD_THRESHOLD 0 +#ifndef BMOD_1_TO_MOD_1_THRESHOLD +#define BMOD_1_TO_MOD_1_THRESHOLD 10 #endif #ifndef mpn_divexact_1 /* if not done with cpuvec in a fat binary */ #define mpn_divexact_1 __MPN(divexact_1) -void mpn_divexact_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); +__GMP_DECLSPEC void mpn_divexact_1 __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_limb_t)); #endif #define MPN_DIVREM_OR_DIVEXACT_1(dst, src, size, divisor) \ @@ -2707,23 +2876,22 @@ #ifndef mpn_modexact_1c_odd /* if not done with cpuvec in a fat binary */ #define mpn_modexact_1c_odd __MPN(modexact_1c_odd) -mp_limb_t mpn_modexact_1c_odd __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_limb_t mpn_modexact_1c_odd __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE; #endif #if HAVE_NATIVE_mpn_modexact_1_odd #define mpn_modexact_1_odd __MPN(modexact_1_odd) -mp_limb_t mpn_modexact_1_odd __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC mp_limb_t mpn_modexact_1_odd __GMP_PROTO ((mp_srcptr, mp_size_t, mp_limb_t)) __GMP_ATTRIBUTE_PURE; #else #define mpn_modexact_1_odd(src,size,divisor) \ mpn_modexact_1c_odd (src, size, divisor, CNST_LIMB(0)) #endif #define MPN_MOD_OR_MODEXACT_1_ODD(src,size,divisor) \ - (ABOVE_THRESHOLD (size, MODEXACT_1_ODD_THRESHOLD) \ + (BELOW_THRESHOLD (size, BMOD_1_TO_MOD_1_THRESHOLD) \ ? mpn_modexact_1_odd (src, size, divisor) \ : mpn_mod_1 (src, size, divisor)) - /* binvert_limb() sets inv to the multiplicative inverse of n modulo 2^GMP_NUMB_BITS, ie. satisfying inv*n == 1 mod 2^GMP_NUMB_BITS. n must be odd (otherwise such an inverse doesn't exist). @@ -2895,7 +3063,7 @@ version 3.1 at least) doesn't seem to know how to generate rlwimi for anything other than bit-fields, so use "asm". */ #if defined (__GNUC__) && ! defined (NO_ASM) \ - && HAVE_HOST_CPU_FAMILY_powerpc && BITS_PER_MP_LIMB == 32 + && HAVE_HOST_CPU_FAMILY_powerpc && GMP_LIMB_BITS == 32 #define BSWAP_LIMB(dst, src) \ do { \ mp_limb_t __bswapl_src = (src); \ @@ -2916,7 +3084,7 @@ partial register stalls on P6 chips. */ #if defined (__GNUC__) && ! defined (NO_ASM) \ && HAVE_HOST_CPU_FAMILY_x86 && ! HAVE_HOST_CPU_i386 \ - && BITS_PER_MP_LIMB == 32 + && GMP_LIMB_BITS == 32 #define BSWAP_LIMB(dst, src) \ do { \ __asm__ ("bswap %0" : "=r" (dst) : "0" (src)); \ @@ -2924,7 +3092,7 @@ #endif #if defined (__GNUC__) && ! defined (NO_ASM) \ - && defined (__amd64__) && BITS_PER_MP_LIMB == 64 + && defined (__amd64__) && GMP_LIMB_BITS == 64 #define BSWAP_LIMB(dst, src) \ do { \ __asm__ ("bswap %q0" : "=r" (dst) : "0" (src)); \ @@ -2941,7 +3109,7 @@ /* As per glibc. */ #if defined (__GNUC__) && ! defined (NO_ASM) \ - && HAVE_HOST_CPU_FAMILY_m68k && BITS_PER_MP_LIMB == 32 + && HAVE_HOST_CPU_FAMILY_m68k && GMP_LIMB_BITS == 32 #define BSWAP_LIMB(dst, src) \ do { \ mp_limb_t __bswapl_src = (src); \ @@ -2954,17 +3122,17 @@ #endif #if ! defined (BSWAP_LIMB) -#if BITS_PER_MP_LIMB == 8 +#if GMP_LIMB_BITS == 8 #define BSWAP_LIMB(dst, src) \ do { (dst) = (src); } while (0) #endif -#if BITS_PER_MP_LIMB == 16 +#if GMP_LIMB_BITS == 16 #define BSWAP_LIMB(dst, src) \ do { \ (dst) = ((src) << 8) + ((src) >> 8); \ } while (0) #endif -#if BITS_PER_MP_LIMB == 32 +#if GMP_LIMB_BITS == 32 #define BSWAP_LIMB(dst, src) \ do { \ (dst) = \ @@ -2974,7 +3142,7 @@ + ((src) >> 24); \ } while (0) #endif -#if BITS_PER_MP_LIMB == 64 +#if GMP_LIMB_BITS == 64 #define BSWAP_LIMB(dst, src) \ do { \ (dst) = \ @@ -3009,7 +3177,7 @@ /* Apparently lwbrx might be slow on some PowerPC chips, so restrict it to those we know are fast. */ #if defined (__GNUC__) && ! defined (NO_ASM) \ - && BITS_PER_MP_LIMB == 32 && HAVE_LIMB_BIG_ENDIAN \ + && GMP_LIMB_BITS == 32 && HAVE_LIMB_BIG_ENDIAN \ && (HAVE_HOST_CPU_powerpc604 \ || HAVE_HOST_CPU_powerpc604e \ || HAVE_HOST_CPU_powerpc750 \ @@ -3034,7 +3202,7 @@ /* On the same basis that lwbrx might be slow, restrict stwbrx to those we know are fast. FIXME: Is this necessary? */ #if defined (__GNUC__) && ! defined (NO_ASM) \ - && BITS_PER_MP_LIMB == 32 && HAVE_LIMB_BIG_ENDIAN \ + && GMP_LIMB_BITS == 32 && HAVE_LIMB_BIG_ENDIAN \ && (HAVE_HOST_CPU_powerpc604 \ || HAVE_HOST_CPU_powerpc604e \ || HAVE_HOST_CPU_powerpc750 \ @@ -3095,7 +3263,7 @@ /* No processor claiming to be SPARC v9 compliant seems to implement the POPC instruction. Disable pattern for now. */ #if 0 -#if defined __GNUC__ && defined __sparc_v9__ && BITS_PER_MP_LIMB == 64 +#if defined __GNUC__ && defined __sparc_v9__ && GMP_LIMB_BITS == 64 #define popc_limb(result, input) \ do { \ DItype __res; \ @@ -3209,7 +3377,7 @@ typedef mp_limb_t UWtype; typedef unsigned int UHWtype; -#define W_TYPE_SIZE BITS_PER_MP_LIMB +#define W_TYPE_SIZE GMP_LIMB_BITS /* Define ieee_double_extract and _GMP_IEEE_FLOATS. @@ -3276,10 +3444,10 @@ We assume doubles have 53 mantissa bits. */ #define LIMBS_PER_DOUBLE ((53 + GMP_NUMB_BITS - 2) / GMP_NUMB_BITS + 1) -int __gmp_extract_double __GMP_PROTO ((mp_ptr, double)); +__GMP_DECLSPEC int __gmp_extract_double __GMP_PROTO ((mp_ptr, double)); #define mpn_get_d __gmpn_get_d -double mpn_get_d __GMP_PROTO ((mp_srcptr, mp_size_t, mp_size_t, long)) __GMP_ATTRIBUTE_PURE; +__GMP_DECLSPEC double mpn_get_d __GMP_PROTO ((mp_srcptr, mp_size_t, mp_size_t, long)) __GMP_ATTRIBUTE_PURE; /* DOUBLE_NAN_INF_ACTION executes code a_nan if x is a NaN, or executes @@ -3348,12 +3516,12 @@ #endif -extern int __gmp_junk; -extern const int __gmp_0; -void __gmp_exception __GMP_PROTO ((int)) ATTRIBUTE_NORETURN; -void __gmp_divide_by_zero __GMP_PROTO ((void)) ATTRIBUTE_NORETURN; -void __gmp_sqrt_of_negative __GMP_PROTO ((void)) ATTRIBUTE_NORETURN; -void __gmp_invalid_operation __GMP_PROTO ((void)) ATTRIBUTE_NORETURN; +__GMP_DECLSPEC extern int __gmp_junk; +__GMP_DECLSPEC extern const int __gmp_0; +__GMP_DECLSPEC void __gmp_exception __GMP_PROTO ((int)) ATTRIBUTE_NORETURN; +__GMP_DECLSPEC void __gmp_divide_by_zero __GMP_PROTO ((void)) ATTRIBUTE_NORETURN; +__GMP_DECLSPEC void __gmp_sqrt_of_negative __GMP_PROTO ((void)) ATTRIBUTE_NORETURN; +__GMP_DECLSPEC void __gmp_invalid_operation __GMP_PROTO ((void)) ATTRIBUTE_NORETURN; #define GMP_ERROR(code) __gmp_exception (code) #define DIVIDE_BY_ZERO __gmp_divide_by_zero () #define SQRT_OF_NEGATIVE __gmp_sqrt_of_negative () @@ -3538,7 +3706,7 @@ ASSERT (__b & 1); \ \ if ((GMP_NUMB_BITS % 2) != 0 \ - || BELOW_THRESHOLD (__a_size, MODEXACT_1_ODD_THRESHOLD)) \ + || ABOVE_THRESHOLD (__a_size, BMOD_1_TO_MOD_1_THRESHOLD)) \ { \ (a_rem) = mpn_mod_1 (__a_ptr, __a_size, __b); \ } \ @@ -3551,11 +3719,11 @@ /* Matrix multiplication */ #define mpn_matrix22_mul __MPN(matrix22_mul) -void mpn_matrix22_mul __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_srcptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_matrix22_mul __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_srcptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_matrix22_mul_strassen __MPN(matrix22_mul_strassen) -void mpn_matrix22_mul_strassen __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_srcptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_matrix22_mul_strassen __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_srcptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr)); #define mpn_matrix22_mul_itch __MPN(matrix22_mul_itch) -mp_size_t mpn_matrix22_mul_itch __GMP_PROTO ((mp_size_t, mp_size_t)); +__GMP_DECLSPEC mp_size_t mpn_matrix22_mul_itch __GMP_PROTO ((mp_size_t, mp_size_t)); #ifndef MATRIX22_STRASSEN_THRESHOLD #define MATRIX22_STRASSEN_THRESHOLD 30 @@ -3593,13 +3761,13 @@ }; #define mpn_hgcd2 __MPN (hgcd2) -int mpn_hgcd2 __GMP_PROTO ((mp_limb_t, mp_limb_t, mp_limb_t, mp_limb_t, struct hgcd_matrix1 *)); +__GMP_DECLSPEC int mpn_hgcd2 __GMP_PROTO ((mp_limb_t, mp_limb_t, mp_limb_t, mp_limb_t, struct hgcd_matrix1 *)); #define mpn_hgcd_mul_matrix1_vector __MPN (hgcd_mul_matrix1_vector) -mp_size_t mpn_hgcd_mul_matrix1_vector __GMP_PROTO ((const struct hgcd_matrix1 *, mp_ptr, mp_srcptr, mp_ptr, mp_size_t)); +__GMP_DECLSPEC mp_size_t mpn_hgcd_mul_matrix1_vector __GMP_PROTO ((const struct hgcd_matrix1 *, mp_ptr, mp_srcptr, mp_ptr, mp_size_t)); #define mpn_hgcd_mul_matrix1_inverse_vector __MPN (hgcd_mul_matrix1_inverse_vector) -mp_size_t mpn_hgcd_mul_matrix1_inverse_vector __GMP_PROTO ((const struct hgcd_matrix1 *, mp_ptr, mp_srcptr, mp_ptr, mp_size_t)); +__GMP_DECLSPEC mp_size_t mpn_hgcd_mul_matrix1_inverse_vector __GMP_PROTO ((const struct hgcd_matrix1 *, mp_ptr, mp_srcptr, mp_ptr, mp_size_t)); struct hgcd_matrix { @@ -3611,43 +3779,43 @@ #define MPN_HGCD_MATRIX_INIT_ITCH(n) (4 * ((n+1)/2 + 1)) #define mpn_hgcd_matrix_init __MPN (hgcd_matrix_init) -void mpn_hgcd_matrix_init __GMP_PROTO ((struct hgcd_matrix *, mp_size_t, mp_ptr)); +__GMP_DECLSPEC void mpn_hgcd_matrix_init __GMP_PROTO ((struct hgcd_matrix *, mp_size_t, mp_ptr)); #define mpn_hgcd_matrix_mul __MPN (hgcd_matrix_mul) -void mpn_hgcd_matrix_mul __GMP_PROTO ((struct hgcd_matrix *, const struct hgcd_matrix *, mp_ptr)); +__GMP_DECLSPEC void mpn_hgcd_matrix_mul __GMP_PROTO ((struct hgcd_matrix *, const struct hgcd_matrix *, mp_ptr)); #define mpn_hgcd_matrix_adjust __MPN (hgcd_matrix_adjust) -mp_size_t mpn_hgcd_matrix_adjust __GMP_PROTO ((struct hgcd_matrix *, mp_size_t, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_hgcd_matrix_adjust __GMP_PROTO ((struct hgcd_matrix *, mp_size_t, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); #define mpn_hgcd_itch __MPN (hgcd_itch) -mp_size_t mpn_hgcd_itch __GMP_PROTO ((mp_size_t)); +__GMP_DECLSPEC mp_size_t mpn_hgcd_itch __GMP_PROTO ((mp_size_t)); #define mpn_hgcd __MPN (hgcd) -mp_size_t mpn_hgcd __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, struct hgcd_matrix *, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_hgcd __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, struct hgcd_matrix *, mp_ptr)); #define MPN_HGCD_LEHMER_ITCH(n) (n) #define mpn_hgcd_lehmer __MPN (hgcd_lehmer) -mp_size_t mpn_hgcd_lehmer __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, struct hgcd_matrix *, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_hgcd_lehmer __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, struct hgcd_matrix *, mp_ptr)); /* Needs storage for the quotient */ #define MPN_GCD_SUBDIV_STEP_ITCH(n) (n) #define mpn_gcd_subdiv_step __MPN(gcd_subdiv_step) -mp_size_t mpn_gcd_subdiv_step __GMP_PROTO ((mp_ptr, mp_size_t *, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_gcd_subdiv_step __GMP_PROTO ((mp_ptr, mp_size_t *, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); #define MPN_GCD_LEHMER_N_ITCH(n) (n) #define mpn_gcd_lehmer_n __MPN(gcd_lehmer_n) -mp_size_t mpn_gcd_lehmer_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_gcd_lehmer_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); #define mpn_gcdext_subdiv_step __MPN(gcdext_subdiv_step) -mp_size_t mpn_gcdext_subdiv_step __GMP_PROTO ((mp_ptr, mp_size_t *, mp_ptr, mp_size_t *, mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_gcdext_subdiv_step __GMP_PROTO ((mp_ptr, mp_size_t *, mp_ptr, mp_size_t *, mp_ptr, mp_ptr, mp_size_t, mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_ptr)); #define MPN_GCDEXT_LEHMER_N_ITCH(n) (4*(n) + 3) #define mpn_gcdext_lehmer_n __MPN(gcdext_lehmer_n) -mp_size_t mpn_gcdext_lehmer_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_gcdext_lehmer_n __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t *, mp_ptr, mp_ptr, mp_size_t, mp_ptr)); /* 4*(an + 1) + 4*(bn + 1) + an */ #define MPN_GCDEXT_LEHMER_ITCH(an, bn) (5*(an) + 4*(bn) + 8) @@ -3680,11 +3848,11 @@ #define mpn_dc_get_str_itch(n) ((n) + GMP_LIMB_BITS) #define mpn_dc_set_str __MPN(dc_set_str) -mp_size_t mpn_dc_set_str __GMP_PROTO ((mp_ptr, const unsigned char *, size_t, const powers_t *, mp_ptr)); +__GMP_DECLSPEC mp_size_t mpn_dc_set_str __GMP_PROTO ((mp_ptr, const unsigned char *, size_t, const powers_t *, mp_ptr)); #define mpn_bc_set_str __MPN(bc_set_str) -mp_size_t mpn_bc_set_str __GMP_PROTO ((mp_ptr, const unsigned char *, size_t, int)); +__GMP_DECLSPEC mp_size_t mpn_bc_set_str __GMP_PROTO ((mp_ptr, const unsigned char *, size_t, int)); #define mpn_set_str_compute_powtab __MPN(set_str_compute_powtab) -void mpn_set_str_compute_powtab __GMP_PROTO ((powers_t *, mp_ptr, mp_size_t, int)); +__GMP_DECLSPEC void mpn_set_str_compute_powtab __GMP_PROTO ((powers_t *, mp_ptr, mp_size_t, int)); /* __GMPF_BITS_TO_PREC applies a minimum 53 bits, rounds upwards to a whole @@ -3694,9 +3862,9 @@ #define __GMPF_BITS_TO_PREC(n) \ ((mp_size_t) ((__GMP_MAX (53, n) + 2 * GMP_NUMB_BITS - 1) / GMP_NUMB_BITS)) #define __GMPF_PREC_TO_BITS(n) \ - ((unsigned long) (n) * GMP_NUMB_BITS - GMP_NUMB_BITS) + ((mp_bitcnt_t) (n) * GMP_NUMB_BITS - GMP_NUMB_BITS) -extern mp_size_t __gmp_default_fp_limb_precision; +__GMP_DECLSPEC extern mp_size_t __gmp_default_fp_limb_precision; /* Set n to the number of significant digits an mpf of the given _mp_prec @@ -3708,7 +3876,7 @@ further +1 is because the limbs usually won't fall on digit boundaries. FIXME: If base is a power of 2 and the bits per digit divides - BITS_PER_MP_LIMB then the +2 is unnecessary. This happens always for + GMP_LIMB_BITS then the +2 is unnecessary. This happens always for base==2, and in base==16 with the current 32 or 64 bit limb sizes. */ #define MPF_SIGNIFICANT_DIGITS(n, base, prec) \ @@ -3774,10 +3942,10 @@ #if _GMP_H_HAVE_VA_LIST -typedef int (*doprnt_format_t) __GMP_PROTO ((void *, const char *, va_list)); -typedef int (*doprnt_memory_t) __GMP_PROTO ((void *, const char *, size_t)); -typedef int (*doprnt_reps_t) __GMP_PROTO ((void *, int, int)); -typedef int (*doprnt_final_t) __GMP_PROTO ((void *)); +__GMP_DECLSPEC typedef int (*doprnt_format_t) __GMP_PROTO ((void *, const char *, va_list)); +__GMP_DECLSPEC typedef int (*doprnt_memory_t) __GMP_PROTO ((void *, const char *, size_t)); +__GMP_DECLSPEC typedef int (*doprnt_reps_t) __GMP_PROTO ((void *, int, int)); +__GMP_DECLSPEC typedef int (*doprnt_final_t) __GMP_PROTO ((void *)); struct doprnt_funs_t { doprnt_format_t format; @@ -3883,7 +4051,7 @@ #define __gmp_doprnt_mpf __gmp_doprnt_mpf2 __GMP_DECLSPEC int __gmp_doprnt_mpf __GMP_PROTO ((const struct doprnt_funs_t *, void *, const struct doprnt_params_t *, const char *, mpf_srcptr)); -int __gmp_replacement_vsnprintf __GMP_PROTO ((char *, size_t, const char *, va_list)); +__GMP_DECLSPEC int __gmp_replacement_vsnprintf __GMP_PROTO ((char *, size_t, const char *, va_list)); #endif /* _GMP_H_HAVE_VA_LIST */ @@ -3902,8 +4070,7 @@ extern const struct gmp_doscan_funs_t __gmp_sscanf_funs; #if _GMP_H_HAVE_VA_LIST -int __gmp_doscan __GMP_PROTO ((const struct gmp_doscan_funs_t *, void *, - const char *, va_list)); +__GMP_DECLSPEC int __gmp_doscan __GMP_PROTO ((const struct gmp_doscan_funs_t *, void *, const char *, va_list)); #endif @@ -3959,7 +4126,7 @@ difference to the gmp code, since hopefully we arrange calls so there's no great need for the compiler to move things around. */ -#if WANT_FAT_BINARY && HAVE_HOST_CPU_FAMILY_x86 +#if WANT_FAT_BINARY && (HAVE_HOST_CPU_FAMILY_x86 || HAVE_HOST_CPU_FAMILY_x86_64) /* NOTE: The function pointers in this struct are also in CPUVEC_FUNCS_LIST in mpn/x86/x86-defs.m4. Be sure to update that when changing here. */ struct cpuvec_t { @@ -3984,15 +4151,15 @@ DECL_sub_n ((*sub_n)); DECL_submul_1 ((*submul_1)); int initialized; - mp_size_t mul_karatsuba_threshold; - mp_size_t mul_toom3_threshold; - mp_size_t sqr_karatsuba_threshold; + mp_size_t mul_toom22_threshold; + mp_size_t mul_toom33_threshold; + mp_size_t sqr_toom2_threshold; mp_size_t sqr_toom3_threshold; }; __GMP_DECLSPEC extern struct cpuvec_t __gmpn_cpuvec; #endif /* x86 fat binary */ -void __gmpn_cpuvec_init __GMP_PROTO ((void)); +__GMP_DECLSPEC void __gmpn_cpuvec_init __GMP_PROTO ((void)); /* Get a threshold "field" from __gmpn_cpuvec, running __gmpn_cpuvec_init() if that hasn't yet been done (to establish the right values). */ @@ -4051,201 +4218,409 @@ on #ifdef in the .c files. For some this is not so (the defaults are instead established above), but all are done this way for consistency. */ -#undef MUL_KARATSUBA_THRESHOLD -#define MUL_KARATSUBA_THRESHOLD mul_karatsuba_threshold -extern mp_size_t mul_karatsuba_threshold; - -#undef MUL_TOOM3_THRESHOLD -#define MUL_TOOM3_THRESHOLD mul_toom3_threshold -extern mp_size_t mul_toom3_threshold; - -#undef MUL_TOOM44_THRESHOLD -#define MUL_TOOM44_THRESHOLD mul_toom44_threshold -extern mp_size_t mul_toom44_threshold; - -#undef MUL_FFT_THRESHOLD -#define MUL_FFT_THRESHOLD mul_fft_threshold -extern mp_size_t mul_fft_threshold; +#undef MUL_TOOM22_THRESHOLD +#define MUL_TOOM22_THRESHOLD mul_toom22_threshold +extern mp_size_t mul_toom22_threshold; + +#undef MUL_TOOM33_THRESHOLD +#define MUL_TOOM33_THRESHOLD mul_toom33_threshold +extern mp_size_t mul_toom33_threshold; + +#undef MUL_TOOM44_THRESHOLD +#define MUL_TOOM44_THRESHOLD mul_toom44_threshold +extern mp_size_t mul_toom44_threshold; + +#undef MUL_TOOM6H_THRESHOLD +#define MUL_TOOM6H_THRESHOLD mul_toom6h_threshold +extern mp_size_t mul_toom6h_threshold; + +#undef MUL_TOOM8H_THRESHOLD +#define MUL_TOOM8H_THRESHOLD mul_toom8h_threshold +extern mp_size_t mul_toom8h_threshold; + +#undef MUL_TOOM32_TO_TOOM43_THRESHOLD +#define MUL_TOOM32_TO_TOOM43_THRESHOLD mul_toom32_to_toom43_threshold +extern mp_size_t mul_toom32_to_toom43_threshold; + +#undef MUL_TOOM32_TO_TOOM53_THRESHOLD +#define MUL_TOOM32_TO_TOOM53_THRESHOLD mul_toom32_to_toom53_threshold +extern mp_size_t mul_toom32_to_toom53_threshold; + +#undef MUL_TOOM42_TO_TOOM53_THRESHOLD +#define MUL_TOOM42_TO_TOOM53_THRESHOLD mul_toom42_to_toom53_threshold +extern mp_size_t mul_toom42_to_toom53_threshold; + +#undef MUL_TOOM42_TO_TOOM63_THRESHOLD +#define MUL_TOOM42_TO_TOOM63_THRESHOLD mul_toom42_to_toom63_threshold +extern mp_size_t mul_toom42_to_toom63_threshold; + +#undef MUL_FFT_THRESHOLD +#define MUL_FFT_THRESHOLD mul_fft_threshold +extern mp_size_t mul_fft_threshold; + +#undef MUL_FFT_MODF_THRESHOLD +#define MUL_FFT_MODF_THRESHOLD mul_fft_modf_threshold +extern mp_size_t mul_fft_modf_threshold; -#undef MUL_FFT_MODF_THRESHOLD -#define MUL_FFT_MODF_THRESHOLD mul_fft_modf_threshold -extern mp_size_t mul_fft_modf_threshold; +#undef MUL_FFT_TABLE +#define MUL_FFT_TABLE { 0 } -#undef MUL_FFT_TABLE -#define MUL_FFT_TABLE { 0 } +#undef MUL_FFT_TABLE3 +#define MUL_FFT_TABLE3 { {0,0} } /* A native mpn_sqr_basecase is not tuned and SQR_BASECASE_THRESHOLD should remain as zero (always use it). */ #if ! HAVE_NATIVE_mpn_sqr_basecase -#undef SQR_BASECASE_THRESHOLD -#define SQR_BASECASE_THRESHOLD sqr_basecase_threshold -extern mp_size_t sqr_basecase_threshold; +#undef SQR_BASECASE_THRESHOLD +#define SQR_BASECASE_THRESHOLD sqr_basecase_threshold +extern mp_size_t sqr_basecase_threshold; #endif #if TUNE_PROGRAM_BUILD_SQR -#undef SQR_KARATSUBA_THRESHOLD -#define SQR_KARATSUBA_THRESHOLD SQR_KARATSUBA_MAX_GENERIC +#undef SQR_TOOM2_THRESHOLD +#define SQR_TOOM2_THRESHOLD SQR_TOOM2_MAX_GENERIC #else -#undef SQR_KARATSUBA_THRESHOLD -#define SQR_KARATSUBA_THRESHOLD sqr_karatsuba_threshold -extern mp_size_t sqr_karatsuba_threshold; +#undef SQR_TOOM2_THRESHOLD +#define SQR_TOOM2_THRESHOLD sqr_toom2_threshold +extern mp_size_t sqr_toom2_threshold; #endif -#undef SQR_TOOM3_THRESHOLD -#define SQR_TOOM3_THRESHOLD sqr_toom3_threshold -extern mp_size_t sqr_toom3_threshold; - -#undef SQR_TOOM4_THRESHOLD -#define SQR_TOOM4_THRESHOLD sqr_toom4_threshold -extern mp_size_t sqr_toom4_threshold; +#undef SQR_TOOM3_THRESHOLD +#define SQR_TOOM3_THRESHOLD sqr_toom3_threshold +extern mp_size_t sqr_toom3_threshold; -#undef SQR_FFT_THRESHOLD -#define SQR_FFT_THRESHOLD sqr_fft_threshold -extern mp_size_t sqr_fft_threshold; +#undef SQR_TOOM4_THRESHOLD +#define SQR_TOOM4_THRESHOLD sqr_toom4_threshold +extern mp_size_t sqr_toom4_threshold; -#undef SQR_FFT_MODF_THRESHOLD -#define SQR_FFT_MODF_THRESHOLD sqr_fft_modf_threshold -extern mp_size_t sqr_fft_modf_threshold; +#undef SQR_TOOM6_THRESHOLD +#define SQR_TOOM6_THRESHOLD sqr_toom6_threshold +extern mp_size_t sqr_toom6_threshold; -#undef SQR_FFT_TABLE -#define SQR_FFT_TABLE { 0 } +#undef SQR_TOOM8_THRESHOLD +#define SQR_TOOM8_THRESHOLD sqr_toom8_threshold +extern mp_size_t sqr_toom8_threshold; -#undef MULLOW_BASECASE_THRESHOLD -#define MULLOW_BASECASE_THRESHOLD mullow_basecase_threshold -extern mp_size_t mullow_basecase_threshold; - -#undef MULLOW_DC_THRESHOLD -#define MULLOW_DC_THRESHOLD mullow_dc_threshold -extern mp_size_t mullow_dc_threshold; - -#undef MULLOW_MUL_N_THRESHOLD -#define MULLOW_MUL_N_THRESHOLD mullow_mul_n_threshold -extern mp_size_t mullow_mul_n_threshold; - - -#if ! UDIV_PREINV_ALWAYS -#undef DIV_SB_PREINV_THRESHOLD -#define DIV_SB_PREINV_THRESHOLD div_sb_preinv_threshold -extern mp_size_t div_sb_preinv_threshold; -#endif - -#undef DIV_DC_THRESHOLD -#define DIV_DC_THRESHOLD div_dc_threshold -extern mp_size_t div_dc_threshold; - -#undef POWM_THRESHOLD -#define POWM_THRESHOLD powm_threshold -extern mp_size_t powm_threshold; - -#undef MATRIX22_STRASSEN_THRESHOLD -#define MATRIX22_STRASSEN_THRESHOLD matrix22_strassen_threshold -extern mp_size_t matrix22_strassen_threshold; - -#undef HGCD_THRESHOLD -#define HGCD_THRESHOLD hgcd_threshold -extern mp_size_t hgcd_threshold; - -#undef GCD_ACCEL_THRESHOLD -#define GCD_ACCEL_THRESHOLD gcd_accel_threshold -extern mp_size_t gcd_accel_threshold; - -#undef GCD_DC_THRESHOLD -#define GCD_DC_THRESHOLD gcd_dc_threshold -extern mp_size_t gcd_dc_threshold; - -#undef GCDEXT_DC_THRESHOLD -#define GCDEXT_DC_THRESHOLD gcdext_dc_threshold -extern mp_size_t gcdext_dc_threshold; - -#undef DIVREM_1_NORM_THRESHOLD -#define DIVREM_1_NORM_THRESHOLD divrem_1_norm_threshold -extern mp_size_t divrem_1_norm_threshold; - -#undef DIVREM_1_UNNORM_THRESHOLD -#define DIVREM_1_UNNORM_THRESHOLD divrem_1_unnorm_threshold -extern mp_size_t divrem_1_unnorm_threshold; - -#undef MOD_1_NORM_THRESHOLD -#define MOD_1_NORM_THRESHOLD mod_1_norm_threshold -extern mp_size_t mod_1_norm_threshold; - -#undef MOD_1_UNNORM_THRESHOLD -#define MOD_1_UNNORM_THRESHOLD mod_1_unnorm_threshold -extern mp_size_t mod_1_unnorm_threshold; +#undef SQR_FFT_THRESHOLD +#define SQR_FFT_THRESHOLD sqr_fft_threshold +extern mp_size_t sqr_fft_threshold; -#undef MOD_1_1_THRESHOLD -#define MOD_1_1_THRESHOLD mod_1_1_threshold -extern mp_size_t mod_1_1_threshold; - -#undef MOD_1_2_THRESHOLD -#define MOD_1_2_THRESHOLD mod_1_2_threshold -extern mp_size_t mod_1_2_threshold; - -#undef MOD_1_3_THRESHOLD -#define MOD_1_3_THRESHOLD mod_1_3_threshold -extern mp_size_t mod_1_3_threshold; - -#undef MOD_1_4_THRESHOLD -#define MOD_1_4_THRESHOLD mod_1_4_threshold -extern mp_size_t mod_1_4_threshold; +#undef SQR_FFT_MODF_THRESHOLD +#define SQR_FFT_MODF_THRESHOLD sqr_fft_modf_threshold +extern mp_size_t sqr_fft_modf_threshold; + +#undef SQR_FFT_TABLE +#define SQR_FFT_TABLE { 0 } + +#undef SQR_FFT_TABLE3 +#define SQR_FFT_TABLE3 { {0,0} } + +#undef MULLO_BASECASE_THRESHOLD +#define MULLO_BASECASE_THRESHOLD mullo_basecase_threshold +extern mp_size_t mullo_basecase_threshold; + +#undef MULLO_DC_THRESHOLD +#define MULLO_DC_THRESHOLD mullo_dc_threshold +extern mp_size_t mullo_dc_threshold; + +#undef MULLO_MUL_N_THRESHOLD +#define MULLO_MUL_N_THRESHOLD mullo_mul_n_threshold +extern mp_size_t mullo_mul_n_threshold; + +#undef DC_DIV_QR_THRESHOLD +#define DC_DIV_QR_THRESHOLD dc_div_qr_threshold +extern mp_size_t dc_div_qr_threshold; + +#undef DC_DIVAPPR_Q_THRESHOLD +#define DC_DIVAPPR_Q_THRESHOLD dc_divappr_q_threshold +extern mp_size_t dc_divappr_q_threshold; + +#undef DC_BDIV_Q_THRESHOLD +#define DC_BDIV_Q_THRESHOLD dc_bdiv_q_threshold +extern mp_size_t dc_bdiv_q_threshold; + +#undef DC_BDIV_QR_THRESHOLD +#define DC_BDIV_QR_THRESHOLD dc_bdiv_qr_threshold +extern mp_size_t dc_bdiv_qr_threshold; + +#undef MU_DIV_QR_THRESHOLD +#define MU_DIV_QR_THRESHOLD mu_div_qr_threshold +extern mp_size_t mu_div_qr_threshold; + +#undef MU_DIVAPPR_Q_THRESHOLD +#define MU_DIVAPPR_Q_THRESHOLD mu_divappr_q_threshold +extern mp_size_t mu_divappr_q_threshold; + +#undef MUPI_DIV_QR_THRESHOLD +#define MUPI_DIV_QR_THRESHOLD mupi_div_qr_threshold +extern mp_size_t mupi_div_qr_threshold; + +#undef MU_BDIV_QR_THRESHOLD +#define MU_BDIV_QR_THRESHOLD mu_bdiv_qr_threshold +extern mp_size_t mu_bdiv_qr_threshold; + +#undef MU_BDIV_Q_THRESHOLD +#define MU_BDIV_Q_THRESHOLD mu_bdiv_q_threshold +extern mp_size_t mu_bdiv_q_threshold; + +#undef INV_MULMOD_BNM1_THRESHOLD +#define INV_MULMOD_BNM1_THRESHOLD inv_mulmod_bnm1_threshold +extern mp_size_t inv_mulmod_bnm1_threshold; + +#undef INV_NEWTON_THRESHOLD +#define INV_NEWTON_THRESHOLD inv_newton_threshold +extern mp_size_t inv_newton_threshold; + +#undef INV_APPR_THRESHOLD +#define INV_APPR_THRESHOLD inv_appr_threshold +extern mp_size_t inv_appr_threshold; + +#undef BINV_NEWTON_THRESHOLD +#define BINV_NEWTON_THRESHOLD binv_newton_threshold +extern mp_size_t binv_newton_threshold; + +#undef REDC_1_TO_REDC_2_THRESHOLD +#define REDC_1_TO_REDC_2_THRESHOLD redc_1_to_redc_2_threshold +extern mp_size_t redc_1_to_redc_2_threshold; + +#undef REDC_2_TO_REDC_N_THRESHOLD +#define REDC_2_TO_REDC_N_THRESHOLD redc_2_to_redc_n_threshold +extern mp_size_t redc_2_to_redc_n_threshold; + +#undef REDC_1_TO_REDC_N_THRESHOLD +#define REDC_1_TO_REDC_N_THRESHOLD redc_1_to_redc_n_threshold +extern mp_size_t redc_1_to_redc_n_threshold; + +#undef MATRIX22_STRASSEN_THRESHOLD +#define MATRIX22_STRASSEN_THRESHOLD matrix22_strassen_threshold +extern mp_size_t matrix22_strassen_threshold; + +#undef HGCD_THRESHOLD +#define HGCD_THRESHOLD hgcd_threshold +extern mp_size_t hgcd_threshold; + +#undef GCD_DC_THRESHOLD +#define GCD_DC_THRESHOLD gcd_dc_threshold +extern mp_size_t gcd_dc_threshold; + +#undef GCDEXT_DC_THRESHOLD +#define GCDEXT_DC_THRESHOLD gcdext_dc_threshold +extern mp_size_t gcdext_dc_threshold; + +#undef DIVREM_1_NORM_THRESHOLD +#define DIVREM_1_NORM_THRESHOLD divrem_1_norm_threshold +extern mp_size_t divrem_1_norm_threshold; + +#undef DIVREM_1_UNNORM_THRESHOLD +#define DIVREM_1_UNNORM_THRESHOLD divrem_1_unnorm_threshold +extern mp_size_t divrem_1_unnorm_threshold; + +#undef MOD_1_NORM_THRESHOLD +#define MOD_1_NORM_THRESHOLD mod_1_norm_threshold +extern mp_size_t mod_1_norm_threshold; + +#undef MOD_1_UNNORM_THRESHOLD +#define MOD_1_UNNORM_THRESHOLD mod_1_unnorm_threshold +extern mp_size_t mod_1_unnorm_threshold; + +#undef MOD_1N_TO_MOD_1_1_THRESHOLD +#define MOD_1N_TO_MOD_1_1_THRESHOLD mod_1n_to_mod_1_1_threshold +extern mp_size_t mod_1n_to_mod_1_1_threshold; + +#undef MOD_1U_TO_MOD_1_1_THRESHOLD +#define MOD_1U_TO_MOD_1_1_THRESHOLD mod_1u_to_mod_1_1_threshold +extern mp_size_t mod_1u_to_mod_1_1_threshold; + +#undef MOD_1_1_TO_MOD_1_2_THRESHOLD +#define MOD_1_1_TO_MOD_1_2_THRESHOLD mod_1_1_to_mod_1_2_threshold +extern mp_size_t mod_1_1_to_mod_1_2_threshold; + +#undef MOD_1_2_TO_MOD_1_4_THRESHOLD +#define MOD_1_2_TO_MOD_1_4_THRESHOLD mod_1_2_to_mod_1_4_threshold +extern mp_size_t mod_1_2_to_mod_1_4_threshold; + +#undef PREINV_MOD_1_TO_MOD_1_THRESHOLD +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD preinv_mod_1_to_mod_1_threshold +extern mp_size_t preinv_mod_1_to_mod_1_threshold; #if ! UDIV_PREINV_ALWAYS -#undef DIVREM_2_THRESHOLD -#define DIVREM_2_THRESHOLD divrem_2_threshold -extern mp_size_t divrem_2_threshold; -#endif - -#undef GET_STR_DC_THRESHOLD -#define GET_STR_DC_THRESHOLD get_str_dc_threshold -extern mp_size_t get_str_dc_threshold; - -#undef GET_STR_PRECOMPUTE_THRESHOLD -#define GET_STR_PRECOMPUTE_THRESHOLD get_str_precompute_threshold -extern mp_size_t get_str_precompute_threshold; - -#undef SET_STR_DC_THRESHOLD -#define SET_STR_DC_THRESHOLD set_str_dc_threshold -extern mp_size_t set_str_dc_threshold; - -#undef SET_STR_PRECOMPUTE_THRESHOLD -#define SET_STR_PRECOMPUTE_THRESHOLD set_str_precompute_threshold -extern mp_size_t set_str_precompute_threshold; - -#undef SET_STR_THRESHOLD -#define SET_STR_THRESHOLD set_str_threshold -extern mp_size_t SET_STR_THRESHOLD; +#undef DIVREM_2_THRESHOLD +#define DIVREM_2_THRESHOLD divrem_2_threshold +extern mp_size_t divrem_2_threshold; +#endif + +#undef MULMOD_BNM1_THRESHOLD +#define MULMOD_BNM1_THRESHOLD mulmod_bnm1_threshold +extern mp_size_t mulmod_bnm1_threshold; + +#undef SQRMOD_BNM1_THRESHOLD +#define SQRMOD_BNM1_THRESHOLD sqrmod_bnm1_threshold +extern mp_size_t sqrmod_bnm1_threshold; + +#undef GET_STR_DC_THRESHOLD +#define GET_STR_DC_THRESHOLD get_str_dc_threshold +extern mp_size_t get_str_dc_threshold; + +#undef GET_STR_PRECOMPUTE_THRESHOLD +#define GET_STR_PRECOMPUTE_THRESHOLD get_str_precompute_threshold +extern mp_size_t get_str_precompute_threshold; + +#undef SET_STR_DC_THRESHOLD +#define SET_STR_DC_THRESHOLD set_str_dc_threshold +extern mp_size_t set_str_dc_threshold; + +#undef SET_STR_PRECOMPUTE_THRESHOLD +#define SET_STR_PRECOMPUTE_THRESHOLD set_str_precompute_threshold +extern mp_size_t set_str_precompute_threshold; #undef FFT_TABLE_ATTRS #define FFT_TABLE_ATTRS extern mp_size_t mpn_fft_table[2][MPN_FFT_TABLE_SIZE]; +#define FFT_TABLE3_SIZE 2000 /* generous space for tuning */ +extern struct fft_table_nk mpn_fft_table3[2][FFT_TABLE3_SIZE]; /* Sizes the tune program tests up to, used in a couple of recompilations. */ -#undef MUL_KARATSUBA_THRESHOLD_LIMIT -#undef MUL_TOOM3_THRESHOLD_LIMIT -#undef MULLOW_BASECASE_THRESHOLD_LIMIT +#undef MUL_TOOM22_THRESHOLD_LIMIT +#undef MUL_TOOM33_THRESHOLD_LIMIT +#undef MULLO_BASECASE_THRESHOLD_LIMIT #undef SQR_TOOM3_THRESHOLD_LIMIT -#define SQR_KARATSUBA_MAX_GENERIC 200 -#define MUL_KARATSUBA_THRESHOLD_LIMIT 700 -#define MUL_TOOM3_THRESHOLD_LIMIT 700 +#define SQR_TOOM2_MAX_GENERIC 200 +#define MUL_TOOM22_THRESHOLD_LIMIT 700 +#define MUL_TOOM33_THRESHOLD_LIMIT 700 #define SQR_TOOM3_THRESHOLD_LIMIT 400 #define MUL_TOOM44_THRESHOLD_LIMIT 1000 #define SQR_TOOM4_THRESHOLD_LIMIT 1000 -#define MULLOW_BASECASE_THRESHOLD_LIMIT 200 +#define MUL_TOOM6H_THRESHOLD_LIMIT 1100 +#define SQR_TOOM6_THRESHOLD_LIMIT 1100 +#define MUL_TOOM8H_THRESHOLD_LIMIT 1200 +#define SQR_TOOM8_THRESHOLD_LIMIT 1200 +#define MULLO_BASECASE_THRESHOLD_LIMIT 200 #define GET_STR_THRESHOLD_LIMIT 150 -/* "thresh" will normally be a variable when tuning, so use the cached - result. This helps mpn_sb_divrem_mn for instance. */ -#undef CACHED_ABOVE_THRESHOLD -#define CACHED_ABOVE_THRESHOLD(cache, thresh) (cache) -#undef CACHED_BELOW_THRESHOLD -#define CACHED_BELOW_THRESHOLD(cache, thresh) (cache) - #endif /* TUNE_PROGRAM_BUILD */ #if defined (__cplusplus) } #endif +/* FIXME: Make these itch functions less conservative. Also consider making + them dependent on just 'an', and compute the allocation directly from 'an' + instead of via n. */ + +/* toom22/toom2: Scratch need is 2*(an + k), k is the recursion depth. + k is ths smallest k such that + ceil(an/2^k) < MUL_TOOM22_THRESHOLD. + which implies that + k = bitsize of floor ((an-1)/(MUL_TOOM22_THRESHOLD-1)) + = 1 + floor (log_2 (floor ((an-1)/(MUL_TOOM22_THRESHOLD-1)))) +*/ +#define mpn_toom22_mul_itch(an, bn) \ + (2 * ((an) + GMP_NUMB_BITS)) +#define mpn_toom2_sqr_itch(an) \ + (2 * ((an) + GMP_NUMB_BITS)) + +/* Can probably be trimmed to 2 an + O(log an). */ +#define mpn_toom33_mul_itch(an, bn) \ + ((5 * (an) >> 1) + GMP_NUMB_BITS) +#define mpn_toom3_sqr_itch(an) \ + ((5 * (an) >> 1) + GMP_NUMB_BITS) + +#define mpn_toom44_mul_itch(an, bn) \ + (3 * (an) + GMP_NUMB_BITS) +#define mpn_toom4_sqr_itch(an) \ + (3 * (an) + GMP_NUMB_BITS) + +#define mpn_toom6_sqr_itch(n) \ +( ((n) - SQR_TOOM6_THRESHOLD)*2 + \ + MAX(SQR_TOOM6_THRESHOLD*2 + GMP_NUMB_BITS*6, \ + mpn_toom4_sqr_itch(SQR_TOOM6_THRESHOLD)) ) + +#define mpn_toom6_mul_n_itch(n) \ +( ((n) - MUL_TOOM6H_THRESHOLD)*2 + \ + MAX(MUL_TOOM6H_THRESHOLD*2 + GMP_NUMB_BITS*6, \ + mpn_toom44_mul_itch(MUL_TOOM6H_THRESHOLD,MUL_TOOM6H_THRESHOLD)) ) + +static inline mp_size_t +mpn_toom6h_mul_itch (mp_size_t an, mp_size_t bn) { + mp_size_t estimatedN; + estimatedN = (an + bn) / (size_t) 10 + 1; + return mpn_toom6_mul_n_itch (estimatedN * 6); +} + +#define mpn_toom8_sqr_itch(n) \ +( (((n)*15)>>3) - ((SQR_TOOM8_THRESHOLD*15)>>3) + \ + MAX(((SQR_TOOM8_THRESHOLD*15)>>3) + GMP_NUMB_BITS*6, \ + mpn_toom6_sqr_itch(SQR_TOOM8_THRESHOLD)) ) + +#define mpn_toom8_mul_n_itch(n) \ +( (((n)*15)>>3) - ((MUL_TOOM8H_THRESHOLD*15)>>3) + \ + MAX(((MUL_TOOM8H_THRESHOLD*15)>>3) + GMP_NUMB_BITS*6, \ + mpn_toom6_mul_n_itch(MUL_TOOM8H_THRESHOLD)) ) + +static inline mp_size_t +mpn_toom8h_mul_itch (mp_size_t an, mp_size_t bn) { + mp_size_t estimatedN; + estimatedN = (an + bn) / (size_t) 14 + 1; + return mpn_toom8_mul_n_itch (estimatedN * 8); +} + +static inline mp_size_t +mpn_toom32_mul_itch (mp_size_t an, mp_size_t bn) +{ + mp_size_t n = 1 + (2 * an >= 3 * bn ? (an - 1) / (size_t) 3 : (bn - 1) >> 1); + mp_size_t itch = 2 * n + 1; + + return itch; +} + +static inline mp_size_t +mpn_toom42_mul_itch (mp_size_t an, mp_size_t bn) +{ + mp_size_t n = an >= 2 * bn ? (an + 3) >> 2 : (bn + 1) >> 1; + return 6 * n + 3; +} + +static inline mp_size_t +mpn_toom43_mul_itch (mp_size_t an, mp_size_t bn) +{ + mp_size_t n = 1 + (3 * an >= 4 * bn ? (an - 1) >> 2 : (bn - 1) / (size_t) 3); + + return 6*n + 4; +} + +static inline mp_size_t +mpn_toom52_mul_itch (mp_size_t an, mp_size_t bn) +{ + mp_size_t n = 1 + (2 * an >= 5 * bn ? (an - 1) / (size_t) 5 : (bn - 1) >> 1); + return 6*n + 4; +} + +static inline mp_size_t +mpn_toom53_mul_itch (mp_size_t an, mp_size_t bn) +{ + mp_size_t n = 1 + (3 * an >= 5 * bn ? (an - 1) / (size_t) 5 : (bn - 1) / (size_t) 3); + return 10 * n + 10; +} + +static inline mp_size_t +mpn_toom62_mul_itch (mp_size_t an, mp_size_t bn) +{ + mp_size_t n = 1 + (an >= 3 * bn ? (an - 1) / (size_t) 6 : (bn - 1) >> 1); + return 10 * n + 10; +} + +static inline mp_size_t +mpn_toom63_mul_itch (mp_size_t an, mp_size_t bn) +{ + mp_size_t n = 1 + (an >= 2 * bn ? (an - 1) / (size_t) 6 : (bn - 1) / (size_t) 3); + return 9 * n + 3; +} + +#if 0 +#define mpn_fft_mul mpn_mul_fft_full +#else +#define mpn_fft_mul mpn_nussbaumer_mul +#endif #ifdef __cplusplus diff -Nru gmp-4.3.2+dfsg/gmpxx.h gmp-5.0.2+dfsg/gmpxx.h --- gmp-4.3.2+dfsg/gmpxx.h 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/gmpxx.h 2011-05-08 09:49:29.000000000 +0000 @@ -1342,7 +1342,7 @@ { mpz_urandomb(z, s, l); } static void eval(mpz_ptr z, gmp_randstate_t s, mpz_srcptr w) { mpz_urandomm(z, s, w); } - static void eval(mpf_ptr f, gmp_randstate_t s, unsigned long int prec) + static void eval(mpf_ptr f, gmp_randstate_t s, mp_bitcnt_t prec) { mpf_urandomb(f, s, prec); } }; @@ -1537,7 +1537,7 @@ typedef mpz_t value_type; value_type mp; public: - unsigned long int get_prec() const { return mpf_get_default_prec(); } + mp_bitcnt_t get_prec() const { return mpf_get_default_prec(); } // constructors and destructor __gmp_expr() { mpz_init(mp); } @@ -1704,7 +1704,7 @@ typedef mpq_t value_type; value_type mp; public: - unsigned long int get_prec() const { return mpf_get_default_prec(); } + mp_bitcnt_t get_prec() const { return mpf_get_default_prec(); } void canonicalize() { mpq_canonicalize(mp); } // constructors and destructor @@ -1884,61 +1884,61 @@ typedef mpf_t value_type; value_type mp; public: - unsigned long int get_prec() const { return mpf_get_prec(mp); } + mp_bitcnt_t get_prec() const { return mpf_get_prec(mp); } - void set_prec(unsigned long int prec) { mpf_set_prec(mp, prec); } - void set_prec_raw(unsigned long int prec) { mpf_set_prec_raw(mp, prec); } + void set_prec(mp_bitcnt_t prec) { mpf_set_prec(mp, prec); } + void set_prec_raw(mp_bitcnt_t prec) { mpf_set_prec_raw(mp, prec); } // constructors and destructor __gmp_expr() { mpf_init(mp); } __gmp_expr(const __gmp_expr &f) { mpf_init2(mp, f.get_prec()); mpf_set(mp, f.mp); } - __gmp_expr(const __gmp_expr &f, unsigned long int prec) + __gmp_expr(const __gmp_expr &f, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set(mp, f.mp); } template __gmp_expr(const __gmp_expr &expr) { mpf_init2(mp, expr.get_prec()); __gmp_set_expr(mp, expr); } template - __gmp_expr(const __gmp_expr &expr, unsigned long int prec) + __gmp_expr(const __gmp_expr &expr, mp_bitcnt_t prec) { mpf_init2(mp, prec); __gmp_set_expr(mp, expr); } __gmp_expr(signed char c) { mpf_init_set_si(mp, c); } - __gmp_expr(signed char c, unsigned long int prec) + __gmp_expr(signed char c, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_si(mp, c); } __gmp_expr(unsigned char c) { mpf_init_set_ui(mp, c); } - __gmp_expr(unsigned char c, unsigned long int prec) + __gmp_expr(unsigned char c, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_ui(mp, c); } __gmp_expr(signed int i) { mpf_init_set_si(mp, i); } - __gmp_expr(signed int i, unsigned long int prec) + __gmp_expr(signed int i, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_si(mp, i); } __gmp_expr(unsigned int i) { mpf_init_set_ui(mp, i); } - __gmp_expr(unsigned int i, unsigned long int prec) + __gmp_expr(unsigned int i, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_ui(mp, i); } __gmp_expr(signed short int s) { mpf_init_set_si(mp, s); } - __gmp_expr(signed short int s, unsigned long int prec) + __gmp_expr(signed short int s, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_si(mp, s); } __gmp_expr(unsigned short int s) { mpf_init_set_ui(mp, s); } - __gmp_expr(unsigned short int s, unsigned long int prec) + __gmp_expr(unsigned short int s, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_ui(mp, s); } __gmp_expr(signed long int l) { mpf_init_set_si(mp, l); } - __gmp_expr(signed long int l, unsigned long int prec) + __gmp_expr(signed long int l, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_si(mp, l); } __gmp_expr(unsigned long int l) { mpf_init_set_ui(mp, l); } - __gmp_expr(unsigned long int l, unsigned long int prec) + __gmp_expr(unsigned long int l, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_ui(mp, l); } __gmp_expr(float f) { mpf_init_set_d(mp, f); } - __gmp_expr(float f, unsigned long int prec) + __gmp_expr(float f, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_d(mp, f); } __gmp_expr(double d) { mpf_init_set_d(mp, d); } - __gmp_expr(double d, unsigned long int prec) + __gmp_expr(double d, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set_d(mp, d); } // __gmp_expr(long double ld) { mpf_init_set_d(mp, ld); } - // __gmp_expr(long double ld, unsigned long int prec) + // __gmp_expr(long double ld, mp_bitcnt_t prec) // { mpf_init2(mp, prec); mpf_set_d(mp, ld); } explicit __gmp_expr(const char *s) @@ -1949,7 +1949,7 @@ throw std::invalid_argument ("mpf_set_str"); } } - __gmp_expr(const char *s, unsigned long int prec, int base = 0) + __gmp_expr(const char *s, mp_bitcnt_t prec, int base = 0) { mpf_init2(mp, prec); if (mpf_set_str(mp, s, base) != 0) @@ -1966,7 +1966,7 @@ throw std::invalid_argument ("mpf_set_str"); } } - __gmp_expr(const std::string &s, unsigned long int prec, int base = 0) + __gmp_expr(const std::string &s, mp_bitcnt_t prec, int base = 0) { mpf_init2(mp, prec); if (mpf_set_str(mp, s.c_str(), base) != 0) @@ -1978,7 +1978,7 @@ explicit __gmp_expr(mpf_srcptr f) { mpf_init2(mp, mpf_get_prec(f)); mpf_set(mp, f); } - __gmp_expr(mpf_srcptr f, unsigned long int prec) + __gmp_expr(mpf_srcptr f, mp_bitcnt_t prec) { mpf_init2(mp, prec); mpf_set(mp, f); } ~__gmp_expr() { mpf_clear(mp); } @@ -2275,7 +2275,7 @@ void eval(typename __gmp_resolve_expr::ptr_type p) const { __gmp_expr temp(expr.val); Op::eval(p, temp.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp(expr.val, prec); Op::eval(p, temp.__get_mp()); } const val_type & get_val() const { return expr.val; } unsigned long int get_prec() const { return expr.val.get_prec(); } @@ -2313,7 +2313,7 @@ const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { - unsigned long int prec1 = expr.val1.get_prec(), + mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } @@ -2381,7 +2381,7 @@ Op::eval(p, expr.val1.__get_mp(), temp.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp(expr.val2, prec); Op::eval(p, expr.val1.__get_mp(), temp.__get_mp()); @@ -2390,7 +2390,7 @@ const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { - unsigned long int prec1 = expr.val1.get_prec(), + mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } @@ -2414,7 +2414,7 @@ Op::eval(p, temp.__get_mp(), expr.val2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp(expr.val1, prec); Op::eval(p, temp.__get_mp(), expr.val2.__get_mp()); @@ -2423,7 +2423,7 @@ const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { - unsigned long int prec1 = expr.val1.get_prec(), + mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } @@ -2447,7 +2447,7 @@ Op::eval(p, expr.val1.__get_mp(), temp.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp(expr.val2, prec); Op::eval(p, expr.val1.__get_mp(), temp.__get_mp()); @@ -2456,7 +2456,7 @@ const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { - unsigned long int prec1 = expr.val1.get_prec(), + mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } @@ -2480,7 +2480,7 @@ Op::eval(p, temp.__get_mp(), expr.val2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp(expr.val1, prec); Op::eval(p, temp.__get_mp(), expr.val2.__get_mp()); @@ -2489,7 +2489,7 @@ const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { - unsigned long int prec1 = expr.val1.get_prec(), + mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } @@ -2515,7 +2515,7 @@ Op::eval(p, temp.__get_mp(), expr.val2); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp(expr.val1, prec); Op::eval(p, temp.__get_mp(), expr.val2); @@ -2542,7 +2542,7 @@ Op::eval(p, expr.val1, temp.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp(expr.val2, prec); Op::eval(p, expr.val1, temp.__get_mp()); @@ -2573,7 +2573,7 @@ Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp1(expr.val1, prec), temp2(expr.val2, prec); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); @@ -2582,7 +2582,7 @@ const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { - unsigned long int prec1 = expr.val1.get_prec(), + mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } @@ -2606,7 +2606,7 @@ Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp1(expr.val1, prec), temp2(expr.val2, prec); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); @@ -2615,7 +2615,7 @@ const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { - unsigned long int prec1 = expr.val1.get_prec(), + mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } @@ -2639,7 +2639,7 @@ Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); } void eval(typename __gmp_resolve_expr::ptr_type p, - unsigned long int prec) const + mp_bitcnt_t prec) const { __gmp_expr temp1(expr.val1, prec), temp2(expr.val2, prec); Op::eval(p, temp1.__get_mp(), temp2.__get_mp()); @@ -2648,7 +2648,7 @@ const val2_type & get_val2() const { return expr.val2; } unsigned long int get_prec() const { - unsigned long int prec1 = expr.val1.get_prec(), + mp_bitcnt_t prec1 = expr.val1.get_prec(), prec2 = expr.val2.get_prec(); return (prec1 > prec2) ? prec1 : prec2; } @@ -3247,7 +3247,7 @@ unsigned long int bits; public: __gmp_expr(gmp_randstate_t s, unsigned long int l) : state(s), bits(l) { } - void eval(mpf_ptr f, unsigned long int prec) const + void eval(mpf_ptr f, mp_bitcnt_t prec) const { __gmp_rand_function::eval(f, state, (bits>0) ? get_prec() : prec); } unsigned long int get_prec() const { @@ -3317,7 +3317,7 @@ __gmp_expr get_z_range(const mpz_class &z) { return __gmp_expr(state, z); } - __gmp_expr get_f(unsigned long int prec = 0) + __gmp_expr get_f(mp_bitcnt_t prec = 0) { return __gmp_expr(state, prec); } }; diff -Nru gmp-4.3.2+dfsg/INSTALL gmp-5.0.2+dfsg/INSTALL --- gmp-4.3.2+dfsg/INSTALL 2010-01-09 06:26:23.000000000 +0000 +++ gmp-5.0.2+dfsg/INSTALL 2011-08-30 01:19:41.000000000 +0000 @@ -4,8 +4,10 @@ Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. + Copying and distribution of this file, with or without modification, +are permitted in any medium without royalty provided the copyright +notice and this notice are preserved. This file is offered as-is, +without warranty of any kind. Basic Installation ================== @@ -13,7 +15,11 @@ Briefly, the shell commands `./configure; make; make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for -instructions specific to this package. +instructions specific to this package. Some packages provide this +`INSTALL' file but do not implement all of the features documented +below. The lack of an optional feature in a given package is not +necessarily a bug. More recommendations for GNU packages can be found +in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -42,7 +48,7 @@ you want to change it or regenerate `configure' using a newer version of `autoconf'. -The simplest way to compile this package is: + The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. @@ -53,12 +59,22 @@ 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with - the package. + the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and - documentation. + documentation. When installing into a prefix owned by root, it is + recommended that the package be configured and built as a regular + user, and only the `make install' phase executed with root + privileges. + + 5. Optionally, type `make installcheck' to repeat any self-tests, but + this time using the binaries in their final installed location. + This target does not install anything. Running this target as a + regular user, particularly if the prior `make install' required + root privileges, verifies that the installation completed + correctly. - 5. You can remove the program binaries and object files from the + 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is @@ -67,8 +83,15 @@ all sorts of other programs in order to regenerate files that came with the distribution. - 6. Often, you can also type `make uninstall' to remove the installed - files again. + 7. Often, you can also type `make uninstall' to remove the installed + files again. In practice, not all packages have tested that + uninstallation works correctly, even though it is required by the + GNU Coding Standards. + + 8. Some packages, particularly those that use Automake, provide `make + distcheck', which can by used by developers to test that all other + targets like `make install' and `make uninstall' work correctly. + This target is generally not run by end users. Compilers and Options ===================== @@ -93,7 +116,8 @@ own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. +source code in the directory that `configure' is in and in `..'. This +is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have @@ -120,7 +144,8 @@ By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving -`configure' the option `--prefix=PREFIX'. +`configure' the option `--prefix=PREFIX', where PREFIX must be an +absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you @@ -131,15 +156,46 @@ In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. +you can set and what kinds of files go in them. In general, the +default for these options is expressed in terms of `${prefix}', so that +specifying just `--prefix' will affect all of the other directory +specifications that were not explicitly provided. + + The most portable way to affect installation locations is to pass the +correct locations to `configure'; however, many packages provide one or +both of the following shortcuts of passing variable assignments to the +`make install' command line to change installation locations without +having to reconfigure or recompile. + + The first method involves providing an override variable for each +affected directory. For example, `make install +prefix=/alternate/directory' will choose an alternate location for all +directory configuration variables that were expressed in terms of +`${prefix}'. Any directories that were specified during `configure', +but not in terms of `${prefix}', must each be overridden at install +time for the entire installation to be relocated. The approach of +makefile variable overrides for each directory variable is required by +the GNU Coding Standards, and ideally causes no recompilation. +However, some platforms have known limitations with the semantics of +shared libraries that end up requiring recompilation when using this +method, particularly noticeable in packages that use GNU Libtool. + + The second method involves providing the `DESTDIR' variable. For +example, `make install DESTDIR=/alternate/directory' will prepend +`/alternate/directory' before all installation names. The approach of +`DESTDIR' overrides is not required by the GNU Coding Standards, and +does not work on platforms that have drive letters. On the other hand, +it does better at avoiding recompilation issues, and works well even +when some directory options were not specified in terms of `${prefix}' +at `configure' time. + +Optional Features +================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. -Optional Features -================= - Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE @@ -152,6 +208,13 @@ you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. + Some packages offer the ability to configure how verbose the +execution of `make' will be. For these packages, running `./configure +--enable-silent-rules' sets the default to minimal output, which can be +overridden with `make V=1'; while running `./configure +--disable-silent-rules' sets the default to verbose, which can be +overridden with `make V=0'. + Particular systems ================== @@ -288,7 +351,7 @@ `configure' can determine that directory automatically. `--prefix=DIR' - Use DIR as the installation prefix. *Note Installation Names:: + Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. diff -Nru gmp-4.3.2+dfsg/longlong.h gmp-5.0.2+dfsg/longlong.h --- gmp-4.3.2+dfsg/longlong.h 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/longlong.h 2011-05-08 09:49:29.000000000 +0000 @@ -19,18 +19,25 @@ /* You have to define the following before including this file: UWtype -- An unsigned type, default type for operations (typically a "word") - UHWtype -- An unsigned type, at least half the size of UWtype. + UHWtype -- An unsigned type, at least half the size of UWtype UDWtype -- An unsigned type, at least twice as large a UWtype W_TYPE_SIZE -- size in bits of UWtype - SItype, USItype -- Signed and unsigned 32 bit types. - DItype, UDItype -- Signed and unsigned 64 bit types. + SItype, USItype -- Signed and unsigned 32 bit types + DItype, UDItype -- Signed and unsigned 64 bit types On a 32 bit machine UWtype should typically be USItype; on a 64 bit machine, UWtype should typically be UDItype. - CAUTION! Using this file outside of GMP is not safe. You need to include - gmp.h and gmp-impl.h, or certain things might not work as expected. + Optionally, define: + + LONGLONG_STANDALONE -- Avoid code that needs machine-dependent support files + NO_ASM -- Disable inline asm + + + CAUTION! Using this version of longlong.h outside of GMP is not safe. You + need to include gmp.h and gmp-impl.h, or certain things might not work as + expected. */ #define __BITS4 (W_TYPE_SIZE / 4) @@ -506,6 +513,12 @@ #define UDIV_TIME 200 #endif /* LONGLONG_STANDALONE */ #endif +#if defined (__ARM_ARCH_5__) +/* This actually requires arm 5 */ +#define count_leading_zeros(count, x) \ + __asm__ ("clz\t%0, %1" : "=r" (count) : "r" (x)) +#define COUNT_LEADING_ZEROS_0 32 +#endif #endif /* __arm__ */ #if defined (__clipper__) && W_TYPE_SIZE == 32 diff -Nru gmp-4.3.2+dfsg/ltmain.sh gmp-5.0.2+dfsg/ltmain.sh --- gmp-4.3.2+dfsg/ltmain.sh 2010-01-09 06:26:12.000000000 +0000 +++ gmp-5.0.2+dfsg/ltmain.sh 2011-08-30 01:19:29.000000000 +0000 @@ -1,9 +1,9 @@ -# Generated from ltmain.m4sh. -# ltmain.sh (GNU libtool) 2.2.6b +# libtool (GNU libtool) 2.4 # Written by Gordon Matzigkeit , 1996 -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc. +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007, 2008, 2009, 2010 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. @@ -32,50 +32,56 @@ # # Provide generalized library-building support services. # -# --config show all configuration variables -# --debug enable verbose shell tracing -# -n, --dry-run display commands without modifying any files -# --features display basic configuration information and exit -# --mode=MODE use operation mode MODE -# --preserve-dup-deps don't remove duplicate dependency libraries -# --quiet, --silent don't print informational messages -# --tag=TAG use configuration variables from tag TAG -# -v, --verbose print informational messages (default) -# --version print version information -# -h, --help print short or long help message +# --config show all configuration variables +# --debug enable verbose shell tracing +# -n, --dry-run display commands without modifying any files +# --features display basic configuration information and exit +# --mode=MODE use operation mode MODE +# --preserve-dup-deps don't remove duplicate dependency libraries +# --quiet, --silent don't print informational messages +# --no-quiet, --no-silent +# print informational messages (default) +# --tag=TAG use configuration variables from tag TAG +# -v, --verbose print more informational messages than default +# --no-verbose don't print the extra informational messages +# --version print version information +# -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # -# clean remove files from the build directory -# compile compile a source file into a libtool object -# execute automatically set library path, then run a program -# finish complete the installation of libtool libraries -# install install libraries or executables -# link create a library or an executable -# uninstall remove libraries from an installed directory +# clean remove files from the build directory +# compile compile a source file into a libtool object +# execute automatically set library path, then run a program +# finish complete the installation of libtool libraries +# install install libraries or executables +# link create a library or an executable +# uninstall remove libraries from an installed directory # -# MODE-ARGS vary depending on the MODE. +# MODE-ARGS vary depending on the MODE. When passed as first option, +# `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # -# host-triplet: $host -# shell: $SHELL -# compiler: $LTCC -# compiler flags: $LTCFLAGS -# linker: $LD (gnu? $with_gnu_ld) -# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2 -# automake: $automake_version -# autoconf: $autoconf_version +# host-triplet: $host +# shell: $SHELL +# compiler: $LTCC +# compiler flags: $LTCFLAGS +# linker: $LD (gnu? $with_gnu_ld) +# $progname: (GNU libtool) 2.4 Debian-2.4-4 +# automake: $automake_version +# autoconf: $autoconf_version # # Report bugs to . +# GNU libtool home page: . +# General help using GNU software: . -PROGRAM=ltmain.sh +PROGRAM=libtool PACKAGE=libtool -VERSION="2.2.6b Debian-2.2.6b-2" +VERSION="2.4 Debian-2.4-4" TIMESTAMP="" -package_revision=1.3017 +package_revision=1.3293 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then @@ -91,10 +97,15 @@ BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +$1 +_LTECHO_EOF' +} + # NLS nuisances: We save the old values to restore during execute mode. -# Only set LANG and LC_ALL to C if already set. -# These must not be set unconditionally because not all systems understand -# e.g. LANG=C (notably SCO). lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES @@ -107,15 +118,24 @@ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done +LC_ALL=C +LANGUAGE=C +export LANGUAGE LC_ALL $lt_unset CDPATH +# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh +# is ksh but when the shell is invoked as "sh" and the current value of +# the _XPG environment variable is not equal to 1 (one), the special +# positional parameter $0, within a function call, is the name of the +# function. +progpath="$0" : ${CP="cp -f"} -: ${ECHO="echo"} +test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${EGREP="/bin/grep -E"} : ${FGREP="/bin/grep -F"} : ${GREP="/bin/grep"} @@ -144,6 +164,27 @@ dirname="s,/[^/]*$,," basename="s,^.*/,," +# func_dirname file append nondir_replacement +# Compute the dirname of FILE. If nonempty, add APPEND to the result, +# otherwise set result to NONDIR_REPLACEMENT. +func_dirname () +{ + func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi +} # func_dirname may be replaced by extended shell implementation + + +# func_basename file +func_basename () +{ + func_basename_result=`$ECHO "${1}" | $SED "$basename"` +} # func_basename may be replaced by extended shell implementation + + # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: @@ -158,33 +199,183 @@ # those functions but instead duplicate the functionality here. func_dirname_and_basename () { - # Extract subdirectory from the argument. - func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"` - if test "X$func_dirname_result" = "X${1}"; then - func_dirname_result="${3}" - else - func_dirname_result="$func_dirname_result${2}" - fi - func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"` + # Extract subdirectory from the argument. + func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` + if test "X$func_dirname_result" = "X${1}"; then + func_dirname_result="${3}" + else + func_dirname_result="$func_dirname_result${2}" + fi + func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` +} # func_dirname_and_basename may be replaced by extended shell implementation + + +# func_stripname prefix suffix name +# strip PREFIX and SUFFIX off of NAME. +# PREFIX and SUFFIX must not contain globbing or regex special +# characters, hashes, percent signs, but SUFFIX may contain a leading +# dot (in which case that matches only a dot). +# func_strip_suffix prefix name +func_stripname () +{ + case ${2} in + .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; + *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; + esac +} # func_stripname may be replaced by extended shell implementation + + +# These SED scripts presuppose an absolute path with a trailing slash. +pathcar='s,^/\([^/]*\).*$,\1,' +pathcdr='s,^/[^/]*,,' +removedotparts=':dotsl + s@/\./@/@g + t dotsl + s,/\.$,/,' +collapseslashes='s@/\{1,\}@/@g' +finalslash='s,/*$,/,' + +# func_normal_abspath PATH +# Remove doubled-up and trailing slashes, "." path components, +# and cancel out any ".." path components in PATH after making +# it an absolute path. +# value returned in "$func_normal_abspath_result" +func_normal_abspath () +{ + # Start from root dir and reassemble the path. + func_normal_abspath_result= + func_normal_abspath_tpath=$1 + func_normal_abspath_altnamespace= + case $func_normal_abspath_tpath in + "") + # Empty path, that just means $cwd. + func_stripname '' '/' "`pwd`" + func_normal_abspath_result=$func_stripname_result + return + ;; + # The next three entries are used to spot a run of precisely + # two leading slashes without using negated character classes; + # we take advantage of case's first-match behaviour. + ///*) + # Unusual form of absolute path, do nothing. + ;; + //*) + # Not necessarily an ordinary path; POSIX reserves leading '//' + # and for example Cygwin uses it to access remote file shares + # over CIFS/SMB, so we conserve a leading double slash if found. + func_normal_abspath_altnamespace=/ + ;; + /*) + # Absolute path, do nothing. + ;; + *) + # Relative path, prepend $cwd. + func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath + ;; + esac + # Cancel out all the simple stuff to save iterations. We also want + # the path to end with a slash for ease of parsing, so make sure + # there is one (and only one) here. + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` + while :; do + # Processed it all yet? + if test "$func_normal_abspath_tpath" = / ; then + # If we ascended to the root using ".." the result may be empty now. + if test -z "$func_normal_abspath_result" ; then + func_normal_abspath_result=/ + fi + break + fi + func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcar"` + func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ + -e "$pathcdr"` + # Figure out what to do with it + case $func_normal_abspath_tcomponent in + "") + # Trailing empty path component, ignore it. + ;; + ..) + # Parent dir; strip last assembled component from result. + func_dirname "$func_normal_abspath_result" + func_normal_abspath_result=$func_dirname_result + ;; + *) + # Actual path component, append it. + func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent + ;; + esac + done + # Restore leading double-slash if one was found on entry. + func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } -# Generated shell functions inserted here. +# func_relative_path SRCDIR DSTDIR +# generates a relative path from SRCDIR to DSTDIR, with a trailing +# slash if non-empty, suitable for immediately appending a filename +# without needing to append a separator. +# value returned in "$func_relative_path_result" +func_relative_path () +{ + func_relative_path_result= + func_normal_abspath "$1" + func_relative_path_tlibdir=$func_normal_abspath_result + func_normal_abspath "$2" + func_relative_path_tbindir=$func_normal_abspath_result + + # Ascend the tree starting from libdir + while :; do + # check if we have found a prefix of bindir + case $func_relative_path_tbindir in + $func_relative_path_tlibdir) + # found an exact match + func_relative_path_tcancelled= + break + ;; + $func_relative_path_tlibdir*) + # found a matching prefix + func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" + func_relative_path_tcancelled=$func_stripname_result + if test -z "$func_relative_path_result"; then + func_relative_path_result=. + fi + break + ;; + *) + func_dirname $func_relative_path_tlibdir + func_relative_path_tlibdir=${func_dirname_result} + if test "x$func_relative_path_tlibdir" = x ; then + # Have to descend all the way to the root! + func_relative_path_result=../$func_relative_path_result + func_relative_path_tcancelled=$func_relative_path_tbindir + break + fi + func_relative_path_result=../$func_relative_path_result + ;; + esac + done + + # Now calculate path; take care to avoid doubling-up slashes. + func_stripname '' '/' "$func_relative_path_result" + func_relative_path_result=$func_stripname_result + func_stripname '/' '/' "$func_relative_path_tcancelled" + if test "x$func_stripname_result" != x ; then + func_relative_path_result=${func_relative_path_result}/${func_stripname_result} + fi -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" + # Normalisation. If bindir is libdir, return empty string, + # else relative path ending with a slash; either way, target + # file name can be directly appended. + if test ! -z "$func_relative_path_result"; then + func_stripname './' '' "$func_relative_path_result/" + func_relative_path_result=$func_stripname_result + fi +} # The name of this program: -# In the unlikely event $progname began with a '-', it would play havoc with -# func_echo (imagine progname=-n), so we prepend ./ in that case: func_dirname_and_basename "$progpath" progname=$func_basename_result -case $progname in - -*) progname=./$progname ;; -esac # Make sure we have an absolute path for reexecution: case $progpath in @@ -215,6 +406,15 @@ # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' +# Sed substitution that turns a string into a regex matching for the +# string literally. +sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' + +# Sed substitution that converts a w32 file name or path +# which contains forward slashes, into one that contains +# (escaped) backslashes. A very naive implementation. +lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' + # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. @@ -243,7 +443,7 @@ # name if it has been set yet. func_echo () { - $ECHO "$progname${mode+: }$mode: $*" + $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... @@ -258,18 +458,25 @@ : } +# func_echo_all arg... +# Invoke $ECHO with all args, space-separated. +func_echo_all () +{ + $ECHO "$*" +} + # func_error arg... # Echo program name prefixed message to standard error. func_error () { - $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2 + $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { - $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2 + $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : @@ -326,9 +533,9 @@ case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop - my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"` + my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done - my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'` + my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do @@ -378,7 +585,7 @@ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi - $ECHO "X$my_tmpdir" | $Xsed + $ECHO "$my_tmpdir" } @@ -392,7 +599,7 @@ { case $1 in *[\\\`\"\$]*) - func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;; + func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac @@ -419,7 +626,7 @@ { case $1 in *[\\\`\"]*) - my_arg=`$ECHO "X$1" | $Xsed \ + my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; @@ -488,15 +695,39 @@ fi } - - +# func_tr_sh +# Turn $1 into a string suitable for a shell variable name. +# Result is stored in $func_tr_sh_result. All characters +# not in the set a-zA-Z0-9_ are replaced with '_'. Further, +# if $1 begins with a digit, a '_' is prepended as well. +func_tr_sh () +{ + case $1 in + [0-9]* | *[!a-zA-Z0-9_]*) + func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` + ;; + * ) + func_tr_sh_result=$1 + ;; + esac +} # func_version # Echo version message to standard output and exit. func_version () { - $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / { + $opt_debug + + $SED -n '/(C)/!b go + :more + /\./!{ + N + s/\n# / / + b more + } + :go + /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ @@ -509,22 +740,28 @@ # Echo short help message to standard output and exit. func_usage () { - $SED -n '/^# Usage:/,/# -h/ { + $opt_debug + + $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" - $ECHO + echo $ECHO "run \`$progname --help | more' for full usage" exit $? } -# func_help -# Echo long help message to standard output and exit. +# func_help [NOEXIT] +# Echo long help message to standard output and exit, +# unless 'noexit' is passed as argument. func_help () { + $opt_debug + $SED -n '/^# Usage:/,/# Report bugs to/ { + :print s/^# // s/^# *$// s*\$progname*'$progname'* @@ -537,8 +774,15 @@ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/ p - }' < "$progpath" - exit $? + d + } + /^# .* home page:/b print + /^# General help using/b print + ' < "$progpath" + ret=$? + if test -z "$1"; then + exit $ret + fi } # func_missing_arg argname @@ -546,63 +790,106 @@ # exit_cmd. func_missing_arg () { - func_error "missing argument for $1" + $opt_debug + + func_error "missing argument for $1." exit_cmd=exit } -exit_cmd=: +# func_split_short_opt shortopt +# Set func_split_short_opt_name and func_split_short_opt_arg shell +# variables after splitting SHORTOPT after the 2nd character. +func_split_short_opt () +{ + my_sed_short_opt='1s/^\(..\).*$/\1/;q' + my_sed_short_rest='1s/^..\(.*\)$/\1/;q' + + func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` + func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` +} # func_split_short_opt may be replaced by extended shell implementation + + +# func_split_long_opt longopt +# Set func_split_long_opt_name and func_split_long_opt_arg shell +# variables after splitting LONGOPT at the `=' sign. +func_split_long_opt () +{ + my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' + my_sed_long_arg='1s/^--[^=]*=//' + + func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` + func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` +} # func_split_long_opt may be replaced by extended shell implementation +exit_cmd=: -# Check that we have a working $ECHO. -if test "X$1" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift -elif test "X$1" = X--fallback-echo; then - # Avoid inline document here, it may be left over - : -elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then - # Yippee, $ECHO works! - : -else - # Restart under the correct shell, and then maybe $ECHO will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat </dev/null || echo $max_cmd_len` +} # func_len may be replaced by extended shell implementation + + +# func_lo2o object +func_lo2o () +{ + func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` +} # func_lo2o may be replaced by extended shell implementation + + +# func_xform libobj-or-source +func_xform () +{ + func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` +} # func_xform may be replaced by extended shell implementation + + # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. @@ -636,16 +923,16 @@ # Display the features supported by this script. func_features () { - $ECHO "host: $host" + echo "host: $host" if test "$build_libtool_libs" = yes; then - $ECHO "enable shared libraries" + echo "enable shared libraries" else - $ECHO "disable shared libraries" + echo "disable shared libraries" fi if test "$build_old_libs" = yes; then - $ECHO "enable static libraries" + echo "enable static libraries" else - $ECHO "disable static libraries" + echo "disable static libraries" fi exit $? @@ -692,117 +979,204 @@ esac } -# Parse options once, thoroughly. This comes as soon as possible in -# the script to make things like `libtool --version' happen quickly. +# func_check_version_match +# Ensure that we are using m4 macros, and libtool script from the same +# release of libtool. +func_check_version_match () { + if test "$package_revision" != "$macro_revision"; then + if test "$VERSION" != "$macro_version"; then + if test -z "$macro_version"; then + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from an older release. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, but the +$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. +$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION +$progname: and run autoconf again. +_LT_EOF + fi + else + cat >&2 <<_LT_EOF +$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, +$progname: but the definition of this LT_INIT comes from revision $macro_revision. +$progname: You should recreate aclocal.m4 with macros from revision $package_revision +$progname: of $PACKAGE $VERSION and run autoconf again. +_LT_EOF + fi + + exit $EXIT_MISMATCH + fi +} + + +# Shorthand for --mode=foo, only valid as the first argument +case $1 in +clean|clea|cle|cl) + shift; set dummy --mode clean ${1+"$@"}; shift + ;; +compile|compil|compi|comp|com|co|c) + shift; set dummy --mode compile ${1+"$@"}; shift + ;; +execute|execut|execu|exec|exe|ex|e) + shift; set dummy --mode execute ${1+"$@"}; shift + ;; +finish|finis|fini|fin|fi|f) + shift; set dummy --mode finish ${1+"$@"}; shift + ;; +install|instal|insta|inst|ins|in|i) + shift; set dummy --mode install ${1+"$@"}; shift + ;; +link|lin|li|l) + shift; set dummy --mode link ${1+"$@"}; shift + ;; +uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) + shift; set dummy --mode uninstall ${1+"$@"}; shift + ;; +esac - # Shorthand for --mode=foo, only valid as the first argument - case $1 in - clean|clea|cle|cl) - shift; set dummy --mode clean ${1+"$@"}; shift - ;; - compile|compil|compi|comp|com|co|c) - shift; set dummy --mode compile ${1+"$@"}; shift - ;; - execute|execut|execu|exec|exe|ex|e) - shift; set dummy --mode execute ${1+"$@"}; shift - ;; - finish|finis|fini|fin|fi|f) - shift; set dummy --mode finish ${1+"$@"}; shift - ;; - install|instal|insta|inst|ins|in|i) - shift; set dummy --mode install ${1+"$@"}; shift - ;; - link|lin|li|l) - shift; set dummy --mode link ${1+"$@"}; shift - ;; - uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) - shift; set dummy --mode uninstall ${1+"$@"}; shift - ;; - esac - # Parse non-mode specific arguments: - while test "$#" -gt 0; do + +# Option defaults: +opt_debug=: +opt_dry_run=false +opt_config=false +opt_preserve_dup_deps=false +opt_features=false +opt_finish=false +opt_help=false +opt_help_all=false +opt_silent=: +opt_verbose=: +opt_silent=false +opt_verbose=false + + +# Parse options once, thoroughly. This comes as soon as possible in the +# script to make things like `--version' happen as quickly as we can. +{ + # this just eases exit handling + while test $# -gt 0; do opt="$1" shift - case $opt in - --config) func_config ;; - - --debug) preserve_args="$preserve_args $opt" + --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" - opt_debug='set -x' $opt_debug ;; - - -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break - execute_dlfiles="$execute_dlfiles $1" - shift + --dry-run|--dryrun|-n) + opt_dry_run=: ;; - - --dry-run | -n) opt_dry_run=: ;; - --features) func_features ;; - --finish) mode="finish" ;; - - --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break - case $1 in - # Valid mode arguments: - clean) ;; - compile) ;; - execute) ;; - finish) ;; - install) ;; - link) ;; - relink) ;; - uninstall) ;; - - # Catch anything else as an error - *) func_error "invalid argument for $opt" - exit_cmd=exit - break - ;; - esac - - mode="$1" + --config) + opt_config=: +func_config + ;; + --dlopen|-dlopen) + optarg="$1" + opt_dlopen="${opt_dlopen+$opt_dlopen +}$optarg" shift ;; - --preserve-dup-deps) - opt_duplicate_deps=: ;; - - --quiet|--silent) preserve_args="$preserve_args $opt" - opt_silent=: + opt_preserve_dup_deps=: ;; - - --verbose| -v) preserve_args="$preserve_args $opt" + --features) + opt_features=: +func_features + ;; + --finish) + opt_finish=: +set dummy --mode finish ${1+"$@"}; shift + ;; + --help) + opt_help=: + ;; + --help-all) + opt_help_all=: +opt_help=': help-all' + ;; + --mode) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_mode="$optarg" +case $optarg in + # Valid mode arguments: + clean|compile|execute|finish|install|link|relink|uninstall) ;; + + # Catch anything else as an error + *) func_error "invalid argument for $opt" + exit_cmd=exit + break + ;; +esac + shift + ;; + --no-silent|--no-quiet) opt_silent=false +func_append preserve_args " $opt" ;; - - --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break - preserve_args="$preserve_args $opt $1" - func_enable_tag "$1" # tagname is set here + --no-verbose) + opt_verbose=false +func_append preserve_args " $opt" + ;; + --silent|--quiet) + opt_silent=: +func_append preserve_args " $opt" + opt_verbose=false + ;; + --verbose|-v) + opt_verbose=: +func_append preserve_args " $opt" +opt_silent=false + ;; + --tag) + test $# = 0 && func_missing_arg $opt && break + optarg="$1" + opt_tag="$optarg" +func_append preserve_args " $opt $optarg" +func_enable_tag "$optarg" shift ;; + -\?|-h) func_usage ;; + --help) func_help ;; + --version) func_version ;; + # Separate optargs to long options: - -dlopen=*|--mode=*|--tag=*) - func_opt_split "$opt" - set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"} + --*=*) + func_split_long_opt "$opt" + set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; - -\?|-h) func_usage ;; - --help) opt_help=: ;; - --version) func_version ;; - - -*) func_fatal_help "unrecognized option \`$opt'" ;; - - *) nonopt="$opt" - break + # Separate non-argument short options: + -\?*|-h*|-n*|-v*) + func_split_short_opt "$opt" + set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} + shift ;; + + --) break ;; + -*) func_fatal_help "unrecognized option \`$opt'" ;; + *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done + # Validate options: + + # save first non-option argument + if test "$#" -gt 0; then + nonopt="$opt" + shift + fi + + # preserve --debug + test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) @@ -810,82 +1184,44 @@ opt_duplicate_compiler_generated_deps=: ;; *) - opt_duplicate_compiler_generated_deps=$opt_duplicate_deps + opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac - # Having warned about all mis-specified options, bail out if - # anything was wrong. - $exit_cmd $EXIT_FAILURE -} + $opt_help || { + # Sanity checks first: + func_check_version_match -# func_check_version_match -# Ensure that we are using m4 macros, and libtool script from the same -# release of libtool. -func_check_version_match () -{ - if test "$package_revision" != "$macro_revision"; then - if test "$VERSION" != "$macro_version"; then - if test -z "$macro_version"; then - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from an older release. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, but the -$progname: definition of this LT_INIT comes from $PACKAGE $macro_version. -$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION -$progname: and run autoconf again. -_LT_EOF - fi - else - cat >&2 <<_LT_EOF -$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, -$progname: but the definition of this LT_INIT comes from revision $macro_revision. -$progname: You should recreate aclocal.m4 with macros from revision $package_revision -$progname: of $PACKAGE $VERSION and run autoconf again. -_LT_EOF + if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then + func_fatal_configuration "not configured to build any kind of library" fi - exit $EXIT_MISMATCH - fi -} - + # Darwin sucks + eval std_shrext=\"$shrext_cmds\" -## ----------- ## -## Main. ## -## ----------- ## - -$opt_help || { - # Sanity checks first: - func_check_version_match - - if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then - func_fatal_configuration "not configured to build any kind of library" - fi + # Only execute mode is allowed to have -dlopen flags. + if test -n "$opt_dlopen" && test "$opt_mode" != execute; then + func_error "unrecognized option \`-dlopen'" + $ECHO "$help" 1>&2 + exit $EXIT_FAILURE + fi - test -z "$mode" && func_fatal_error "error: you must specify a MODE." + # Change the help message to a mode-specific one. + generic_help="$help" + help="Try \`$progname --help --mode=$opt_mode' for more information." + } - # Darwin sucks - eval std_shrext=\"$shrext_cmds\" + # Bail if the options were screwed + $exit_cmd $EXIT_FAILURE +} - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - func_error "unrecognized option \`-dlopen'" - $ECHO "$help" 1>&2 - exit $EXIT_FAILURE - fi - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$progname --help --mode=$mode' for more information." -} +## ----------- ## +## Main. ## +## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. @@ -950,12 +1286,9 @@ # temporary ltwrapper_script. func_ltwrapper_scriptname () { - func_ltwrapper_scriptname_result="" - if func_ltwrapper_executable_p "$1"; then - func_dirname_and_basename "$1" "" "." - func_stripname '' '.exe' "$func_basename_result" - func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" - fi + func_dirname_and_basename "$1" "" "." + func_stripname '' '.exe' "$func_basename_result" + func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file @@ -1001,6 +1334,37 @@ } +# func_resolve_sysroot PATH +# Replace a leading = in PATH with a sysroot. Store the result into +# func_resolve_sysroot_result +func_resolve_sysroot () +{ + func_resolve_sysroot_result=$1 + case $func_resolve_sysroot_result in + =*) + func_stripname '=' '' "$func_resolve_sysroot_result" + func_resolve_sysroot_result=$lt_sysroot$func_stripname_result + ;; + esac +} + +# func_replace_sysroot PATH +# If PATH begins with the sysroot, replace it with = and +# store the result into func_replace_sysroot_result. +func_replace_sysroot () +{ + case "$lt_sysroot:$1" in + ?*:"$lt_sysroot"*) + func_stripname "$lt_sysroot" '' "$1" + func_replace_sysroot_result="=$func_stripname_result" + ;; + *) + # Including no sysroot. + func_replace_sysroot_result=$1 + ;; + esac +} + # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. @@ -1013,13 +1377,15 @@ if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;; + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) @@ -1030,11 +1396,13 @@ CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. - func_quote_for_eval "$arg" - CC_quoted="$CC_quoted $func_quote_for_eval_result" + func_append_quoted CC_quoted "$arg" done + CC_expanded=`func_echo_all $CC` + CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in - " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) + " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ + " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. @@ -1097,6 +1465,486 @@ } } + +################################################## +# FILE NAME AND PATH CONVERSION HELPER FUNCTIONS # +################################################## + +# func_convert_core_file_wine_to_w32 ARG +# Helper function used by file name conversion functions when $build is *nix, +# and $host is mingw, cygwin, or some other w32 environment. Relies on a +# correctly configured wine environment available, with the winepath program +# in $build's $PATH. +# +# ARG is the $build file name to be converted to w32 format. +# Result is available in $func_convert_core_file_wine_to_w32_result, and will +# be empty on error (or when ARG is empty) +func_convert_core_file_wine_to_w32 () +{ + $opt_debug + func_convert_core_file_wine_to_w32_result="$1" + if test -n "$1"; then + # Unfortunately, winepath does not exit with a non-zero error code, so we + # are forced to check the contents of stdout. On the other hand, if the + # command is not found, the shell will set an exit code of 127 and print + # *an error message* to stdout. So we must check for both error code of + # zero AND non-empty stdout, which explains the odd construction: + func_convert_core_file_wine_to_w32_tmp=`winepath -w "$1" 2>/dev/null` + if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then + func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | + $SED -e "$lt_sed_naive_backslashify"` + else + func_convert_core_file_wine_to_w32_result= + fi + fi +} +# end: func_convert_core_file_wine_to_w32 + + +# func_convert_core_path_wine_to_w32 ARG +# Helper function used by path conversion functions when $build is *nix, and +# $host is mingw, cygwin, or some other w32 environment. Relies on a correctly +# configured wine environment available, with the winepath program in $build's +# $PATH. Assumes ARG has no leading or trailing path separator characters. +# +# ARG is path to be converted from $build format to win32. +# Result is available in $func_convert_core_path_wine_to_w32_result. +# Unconvertible file (directory) names in ARG are skipped; if no directory names +# are convertible, then the result may be empty. +func_convert_core_path_wine_to_w32 () +{ + $opt_debug + # unfortunately, winepath doesn't convert paths, only file names + func_convert_core_path_wine_to_w32_result="" + if test -n "$1"; then + oldIFS=$IFS + IFS=: + for func_convert_core_path_wine_to_w32_f in $1; do + IFS=$oldIFS + func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" + if test -n "$func_convert_core_file_wine_to_w32_result" ; then + if test -z "$func_convert_core_path_wine_to_w32_result"; then + func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" + else + func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" + fi + fi + done + IFS=$oldIFS + fi +} +# end: func_convert_core_path_wine_to_w32 + + +# func_cygpath ARGS... +# Wrapper around calling the cygpath program via LT_CYGPATH. This is used when +# when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) +# $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or +# (2), returns the Cygwin file name or path in func_cygpath_result (input +# file name or path is assumed to be in w32 format, as previously converted +# from $build's *nix or MSYS format). In case (3), returns the w32 file name +# or path in func_cygpath_result (input file name or path is assumed to be in +# Cygwin format). Returns an empty string on error. +# +# ARGS are passed to cygpath, with the last one being the file name or path to +# be converted. +# +# Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH +# environment variable; do not put it in $PATH. +func_cygpath () +{ + $opt_debug + if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then + func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` + if test "$?" -ne 0; then + # on failure, ensure result is empty + func_cygpath_result= + fi + else + func_cygpath_result= + func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" + fi +} +#end: func_cygpath + + +# func_convert_core_msys_to_w32 ARG +# Convert file name or path ARG from MSYS format to w32 format. Return +# result in func_convert_core_msys_to_w32_result. +func_convert_core_msys_to_w32 () +{ + $opt_debug + # awkward: cmd appends spaces to result + func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` +} +#end: func_convert_core_msys_to_w32 + + +# func_convert_file_check ARG1 ARG2 +# Verify that ARG1 (a file name in $build format) was converted to $host +# format in ARG2. Otherwise, emit an error message, but continue (resetting +# func_to_host_file_result to ARG1). +func_convert_file_check () +{ + $opt_debug + if test -z "$2" && test -n "$1" ; then + func_error "Could not determine host file name corresponding to" + func_error " \`$1'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback: + func_to_host_file_result="$1" + fi +} +# end func_convert_file_check + + +# func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH +# Verify that FROM_PATH (a path in $build format) was converted to $host +# format in TO_PATH. Otherwise, emit an error message, but continue, resetting +# func_to_host_file_result to a simplistic fallback value (see below). +func_convert_path_check () +{ + $opt_debug + if test -z "$4" && test -n "$3"; then + func_error "Could not determine the host path corresponding to" + func_error " \`$3'" + func_error "Continuing, but uninstalled executables may not work." + # Fallback. This is a deliberately simplistic "conversion" and + # should not be "improved". See libtool.info. + if test "x$1" != "x$2"; then + lt_replace_pathsep_chars="s|$1|$2|g" + func_to_host_path_result=`echo "$3" | + $SED -e "$lt_replace_pathsep_chars"` + else + func_to_host_path_result="$3" + fi + fi +} +# end func_convert_path_check + + +# func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG +# Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT +# and appending REPL if ORIG matches BACKPAT. +func_convert_path_front_back_pathsep () +{ + $opt_debug + case $4 in + $1 ) func_to_host_path_result="$3$func_to_host_path_result" + ;; + esac + case $4 in + $2 ) func_append func_to_host_path_result "$3" + ;; + esac +} +# end func_convert_path_front_back_pathsep + + +################################################## +# $build to $host FILE NAME CONVERSION FUNCTIONS # +################################################## +# invoked via `$to_host_file_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# Result will be available in $func_to_host_file_result. + + +# func_to_host_file ARG +# Converts the file name ARG from $build format to $host format. Return result +# in func_to_host_file_result. +func_to_host_file () +{ + $opt_debug + $to_host_file_cmd "$1" +} +# end func_to_host_file + + +# func_to_tool_file ARG LAZY +# converts the file name ARG from $build format to toolchain format. Return +# result in func_to_tool_file_result. If the conversion in use is listed +# in (the comma separated) LAZY, no conversion takes place. +func_to_tool_file () +{ + $opt_debug + case ,$2, in + *,"$to_tool_file_cmd",*) + func_to_tool_file_result=$1 + ;; + *) + $to_tool_file_cmd "$1" + func_to_tool_file_result=$func_to_host_file_result + ;; + esac +} +# end func_to_tool_file + + +# func_convert_file_noop ARG +# Copy ARG to func_to_host_file_result. +func_convert_file_noop () +{ + func_to_host_file_result="$1" +} +# end func_convert_file_noop + + +# func_convert_file_msys_to_w32 ARG +# Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_file_result. +func_convert_file_msys_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_to_host_file_result="$func_convert_core_msys_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_w32 + + +# func_convert_file_cygwin_to_w32 ARG +# Convert file name ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_file_cygwin_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # because $build is cygwin, we call "the" cygpath in $PATH; no need to use + # LT_CYGPATH in this case. + func_to_host_file_result=`cygpath -m "$1"` + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_cygwin_to_w32 + + +# func_convert_file_nix_to_w32 ARG +# Convert file name ARG from *nix to w32 format. Requires a wine environment +# and a working winepath. Returns result in func_to_host_file_result. +func_convert_file_nix_to_w32 () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_file_wine_to_w32 "$1" + func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_w32 + + +# func_convert_file_msys_to_cygwin ARG +# Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_file_msys_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + func_convert_core_msys_to_w32 "$1" + func_cygpath -u "$func_convert_core_msys_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_msys_to_cygwin + + +# func_convert_file_nix_to_cygwin ARG +# Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed +# in a wine environment, working winepath, and LT_CYGPATH set. Returns result +# in func_to_host_file_result. +func_convert_file_nix_to_cygwin () +{ + $opt_debug + func_to_host_file_result="$1" + if test -n "$1"; then + # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. + func_convert_core_file_wine_to_w32 "$1" + func_cygpath -u "$func_convert_core_file_wine_to_w32_result" + func_to_host_file_result="$func_cygpath_result" + fi + func_convert_file_check "$1" "$func_to_host_file_result" +} +# end func_convert_file_nix_to_cygwin + + +############################################# +# $build to $host PATH CONVERSION FUNCTIONS # +############################################# +# invoked via `$to_host_path_cmd ARG' +# +# In each case, ARG is the path to be converted from $build to $host format. +# The result will be available in $func_to_host_path_result. +# +# Path separators are also converted from $build format to $host format. If +# ARG begins or ends with a path separator character, it is preserved (but +# converted to $host format) on output. +# +# All path conversion functions are named using the following convention: +# file name conversion function : func_convert_file_X_to_Y () +# path conversion function : func_convert_path_X_to_Y () +# where, for any given $build/$host combination the 'X_to_Y' value is the +# same. If conversion functions are added for new $build/$host combinations, +# the two new functions must follow this pattern, or func_init_to_host_path_cmd +# will break. + + +# func_init_to_host_path_cmd +# Ensures that function "pointer" variable $to_host_path_cmd is set to the +# appropriate value, based on the value of $to_host_file_cmd. +to_host_path_cmd= +func_init_to_host_path_cmd () +{ + $opt_debug + if test -z "$to_host_path_cmd"; then + func_stripname 'func_convert_file_' '' "$to_host_file_cmd" + to_host_path_cmd="func_convert_path_${func_stripname_result}" + fi +} + + +# func_to_host_path ARG +# Converts the path ARG from $build format to $host format. Return result +# in func_to_host_path_result. +func_to_host_path () +{ + $opt_debug + func_init_to_host_path_cmd + $to_host_path_cmd "$1" +} +# end func_to_host_path + + +# func_convert_path_noop ARG +# Copy ARG to func_to_host_path_result. +func_convert_path_noop () +{ + func_to_host_path_result="$1" +} +# end func_convert_path_noop + + +# func_convert_path_msys_to_w32 ARG +# Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic +# conversion to w32 is not available inside the cwrapper. Returns result in +# func_to_host_path_result. +func_convert_path_msys_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from ARG. MSYS + # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; + # and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_msys_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_msys_to_w32 + + +# func_convert_path_cygwin_to_w32 ARG +# Convert path ARG from Cygwin to w32 format. Returns result in +# func_to_host_file_result. +func_convert_path_cygwin_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_cygwin_to_w32 + + +# func_convert_path_nix_to_w32 ARG +# Convert path ARG from *nix to w32 format. Requires a wine environment and +# a working winepath. Returns result in func_to_host_file_result. +func_convert_path_nix_to_w32 () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" + func_convert_path_check : ";" \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" + fi +} +# end func_convert_path_nix_to_w32 + + +# func_convert_path_msys_to_cygwin ARG +# Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. +# Returns result in func_to_host_file_result. +func_convert_path_msys_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # See func_convert_path_msys_to_w32: + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_msys_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_msys_to_cygwin + + +# func_convert_path_nix_to_cygwin ARG +# Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a +# a wine environment, working winepath, and LT_CYGPATH set. Returns result in +# func_to_host_file_result. +func_convert_path_nix_to_cygwin () +{ + $opt_debug + func_to_host_path_result="$1" + if test -n "$1"; then + # Remove leading and trailing path separator characters from + # ARG. msys behavior is inconsistent here, cygpath turns them + # into '.;' and ';.', and winepath ignores them completely. + func_stripname : : "$1" + func_to_host_path_tmp1=$func_stripname_result + func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" + func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" + func_to_host_path_result="$func_cygpath_result" + func_convert_path_check : : \ + "$func_to_host_path_tmp1" "$func_to_host_path_result" + func_convert_path_front_back_pathsep ":*" "*:" : "$1" + fi +} +# end func_convert_path_nix_to_cygwin + + # func_mode_compile arg... func_mode_compile () { @@ -1137,12 +1985,12 @@ ;; -pie | -fpie | -fPIE) - pie_flag="$pie_flag $arg" + func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" + func_append later " $arg" continue ;; @@ -1163,15 +2011,14 @@ save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" - func_quote_for_eval "$arg" - lastarg="$lastarg $func_quote_for_eval_result" + func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" + func_append base_compile " $lastarg" continue ;; @@ -1187,8 +2034,7 @@ esac # case $arg_mode # Aesthetically quote the previous argument. - func_quote_for_eval "$lastarg" - base_compile="$base_compile $func_quote_for_eval_result" + func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in @@ -1213,7 +2059,7 @@ *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ - *.[fF][09]? | *.for | *.java | *.obj | *.sx) + *.[fF][09]? | *.for | *.java | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; @@ -1288,7 +2134,7 @@ # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then - output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} + output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= @@ -1319,17 +2165,16 @@ $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi - removelist="$removelist $output_obj" + func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist - removelist="$removelist $lockfile" + func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi + func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 + srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result @@ -1349,7 +2194,7 @@ if test -z "$output_obj"; then # Place PIC objects in $objdir - command="$command -o $lobj" + func_append command " -o $lobj" fi func_show_eval_locale "$command" \ @@ -1396,11 +2241,11 @@ command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then - command="$command -o $obj" + func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. - command="$command$suppress_output" + func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' @@ -1445,13 +2290,13 @@ } $opt_help || { -test "$mode" = compile && func_mode_compile ${1+"$@"} + test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. - case $mode in + case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. @@ -1482,10 +2327,11 @@ -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only + -prefer-pic try to build PIC objects only + -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking + -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. @@ -1538,7 +2384,7 @@ The following components of INSTALL-COMMAND are treated specially: - -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation + -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." @@ -1558,6 +2404,8 @@ -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible + -bindir BINDIR specify path to binaries directory (for systems where + libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) @@ -1586,6 +2434,11 @@ -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface + -Wc,FLAG + -Xcompiler FLAG pass linker-specific FLAG directly to the compiler + -Wl,FLAG + -Xlinker FLAG pass linker-specific FLAG directly to the linker + -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. @@ -1619,18 +2472,44 @@ ;; *) - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac - $ECHO + echo $ECHO "Try \`$progname --help' for more information about other modes." - - exit $? } - # Now that we've collected a possible --mode arg, show help if necessary - $opt_help && func_mode_help +# Now that we've collected a possible --mode arg, show help if necessary +if $opt_help; then + if test "$opt_help" = :; then + func_mode_help + else + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + func_mode_help + done + } | sed -n '1p; 2,$s/^Usage:/ or: /p' + { + func_help noexit + for opt_mode in compile link execute install finish uninstall clean; do + echo + func_mode_help + done + } | + sed '1d + /^When reporting/,/^Report/{ + H + d + } + $x + /information about other modes/d + /more detailed .*MODE/d + s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' + fi + exit $? +fi # func_mode_execute arg... @@ -1643,13 +2522,16 @@ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do + for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" @@ -1671,7 +2553,7 @@ dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" + func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" @@ -1712,7 +2594,7 @@ for file do case $file in - -*) ;; + -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then @@ -1728,8 +2610,7 @@ ;; esac # Quote arguments (to preserve shell metacharacters). - func_quote_for_eval "$file" - args="$args $func_quote_for_eval_result" + func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then @@ -1754,29 +2635,66 @@ # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" - $ECHO "export $shlibpath_var" + echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } -test "$mode" = execute && func_mode_execute ${1+"$@"} +test "$opt_mode" = execute && func_mode_execute ${1+"$@"} + + +# func_mode_finish arg... +func_mode_finish () +{ + $opt_debug + libs= + libdirs= + admincmds= + + for opt in "$nonopt" ${1+"$@"} + do + if test -d "$opt"; then + func_append libdirs " $opt" + + elif test -f "$opt"; then + if func_lalib_unsafe_p "$opt"; then + func_append libs " $opt" + else + func_warning "\`$opt' is not a valid libtool archive" + fi + + else + func_fatal_error "invalid argument \`$opt'" + fi + done + if test -n "$libs"; then + if test -n "$lt_sysroot"; then + sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` + sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" + else + sysroot_cmd= + fi -# func_mode_finish arg... -func_mode_finish () -{ - $opt_debug - libdirs="$nonopt" - admincmds= + # Remove sysroot references + if $opt_dry_run; then + for lib in $libs; do + echo "removing references to $lt_sysroot and \`=' prefixes from $lib" + done + else + tmpdir=`func_mktempdir` + for lib in $libs; do + sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ + > $tmpdir/tmp-la + mv -f $tmpdir/tmp-la $lib + done + ${RM}r "$tmpdir" + fi + fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. @@ -1786,7 +2704,7 @@ if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" - $opt_dry_run || eval "$cmds" || admincmds="$admincmds + $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done @@ -1795,53 +2713,55 @@ # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS - $ECHO "X----------------------------------------------------------------------" | $Xsed - $ECHO "Libraries have been installed in:" - for libdir in $libdirs; do - $ECHO " $libdir" - done - $ECHO - $ECHO "If you ever happen to want to link against installed libraries" - $ECHO "in a given directory, LIBDIR, you must either use libtool, and" - $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'" - $ECHO "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable" - $ECHO " during execution" - fi - if test -n "$runpath_var"; then - $ECHO " - add LIBDIR to the \`$runpath_var' environment variable" - $ECHO " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" + if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then + echo "----------------------------------------------------------------------" + echo "Libraries have been installed in:" + for libdir in $libdirs; do + $ECHO " $libdir" + done + echo + echo "If you ever happen to want to link against installed libraries" + echo "in a given directory, LIBDIR, you must either use libtool, and" + echo "specify the full pathname of the library, or use the \`-LLIBDIR'" + echo "flag during linking and do at least one of the following:" + if test -n "$shlibpath_var"; then + echo " - add LIBDIR to the \`$shlibpath_var' environment variable" + echo " during execution" + fi + if test -n "$runpath_var"; then + echo " - add LIBDIR to the \`$runpath_var' environment variable" + echo " during linking" + fi + if test -n "$hardcode_libdir_flag_spec"; then + libdir=LIBDIR + eval flag=\"$hardcode_libdir_flag_spec\" - $ECHO " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $ECHO " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $ECHO + $ECHO " - use the \`$flag' linker flag" + fi + if test -n "$admincmds"; then + $ECHO " - have your system administrator run these commands:$admincmds" + fi + if test -f /etc/ld.so.conf; then + echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" + fi + echo - $ECHO "See any operating system documentation about shared libraries for" - case $host in - solaris2.[6789]|solaris2.1[0-9]) - $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual" - $ECHO "pages." - ;; - *) - $ECHO "more information, such as the ld(1) and ld.so(8) manual pages." - ;; - esac - $ECHO "X----------------------------------------------------------------------" | $Xsed + echo "See any operating system documentation about shared libraries for" + case $host in + solaris2.[6789]|solaris2.1[0-9]) + echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" + echo "pages." + ;; + *) + echo "more information, such as the ld(1) and ld.so(8) manual pages." + ;; + esac + echo "----------------------------------------------------------------------" + fi exit $EXIT_SUCCESS } -test "$mode" = finish && func_mode_finish ${1+"$@"} +test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... @@ -1852,7 +2772,7 @@ # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. - $ECHO "X$nonopt" | $GREP shtool >/dev/null; then + case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " @@ -1866,7 +2786,12 @@ # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" - install_prog="$install_prog$func_quote_for_eval_result" + func_append install_prog "$func_quote_for_eval_result" + install_shared_prog=$install_prog + case " $install_prog " in + *[\\\ /]cp\ *) install_cp=: ;; + *) install_cp=false ;; + esac # We need to accept at least all the BSD install flags. dest= @@ -1876,10 +2801,12 @@ install_type= isdir=no stripme= + no_mode=: for arg do + arg2= if test -n "$dest"; then - files="$files $dest" + func_append files " $dest" dest=$arg continue fi @@ -1887,10 +2814,9 @@ case $arg in -d) isdir=yes ;; -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac + if $install_cp; then :; else + prev=$arg + fi ;; -g | -m | -o) prev=$arg @@ -1904,6 +2830,10 @@ *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then + if test "x$prev" = x-m && test -n "$install_override_mode"; then + arg2=$install_override_mode + no_mode=false + fi prev= else dest=$arg @@ -1914,7 +2844,11 @@ # Aesthetically quote the argument. func_quote_for_eval "$arg" - install_prog="$install_prog $func_quote_for_eval_result" + func_append install_prog " $func_quote_for_eval_result" + if test -n "$arg2"; then + func_quote_for_eval "$arg2" + fi + func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ @@ -1923,6 +2857,13 @@ test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" + if test -n "$install_override_mode" && $no_mode; then + if $install_cp; then :; else + func_quote_for_eval "$install_override_mode" + func_append install_shared_prog " -m $func_quote_for_eval_result" + fi + fi + if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" @@ -1977,10 +2918,13 @@ case $file in *.$libext) # Do the static libraries later. - staticlibs="$staticlibs $file" + func_append staticlibs " $file" ;; *.la) + func_resolve_sysroot "$file" + file=$func_resolve_sysroot_result + # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" @@ -1994,23 +2938,23 @@ if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; + *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; + *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" - dir="$dir$objdir" + func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"` + inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that @@ -2023,9 +2967,9 @@ if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else - relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"` + relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" @@ -2043,7 +2987,7 @@ test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. - func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \ + func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in @@ -2083,7 +3027,7 @@ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" + test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) @@ -2183,7 +3127,7 @@ if test -f "$lib"; then func_source "$lib" fi - libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test + libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no @@ -2202,7 +3146,7 @@ file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. - relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` + relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" @@ -2221,7 +3165,7 @@ } else # Install the binary that we compiled earlier. - file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` + file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi @@ -2280,7 +3224,7 @@ fi } -test "$mode" = install && func_mode_install ${1+"$@"} +test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p @@ -2323,6 +3267,22 @@ extern \"C\" { #endif +#if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) +#pragma GCC diagnostic ignored \"-Wstrict-prototypes\" +#endif + +/* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ +#if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) +/* DATA imports from DLLs on WIN32 con't be const, because runtime + relocations are performed -- see ld's documentation on pseudo-relocs. */ +# define LT_DLSYM_CONST +#elif defined(__osf__) +/* This system does not cope well with relocations in const data. */ +# define LT_DLSYM_CONST +#else +# define LT_DLSYM_CONST const +#endif + /* External symbol declarations for the compiler. */\ " @@ -2332,10 +3292,11 @@ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. - progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do - func_verbose "extracting global C symbols from \`$progfile'" - $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'" + func_to_tool_file "$progfile" func_convert_file_msys_to_w32 + func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" + $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then @@ -2371,7 +3332,7 @@ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in - *cygwin | *mingw* | *cegcc* ) + *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; @@ -2384,10 +3345,52 @@ func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" - $opt_dry_run || { - eval '$ECHO ": $name " >> "$nlist"' - eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'" - } + case $host in + *cygwin* | *mingw* | *cegcc* ) + # if an import library, we need to obtain dlname + if func_win32_import_lib_p "$dlprefile"; then + func_tr_sh "$dlprefile" + eval "curr_lafile=\$libfile_$func_tr_sh_result" + dlprefile_dlbasename="" + if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then + # Use subshell, to avoid clobbering current variable values + dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` + if test -n "$dlprefile_dlname" ; then + func_basename "$dlprefile_dlname" + dlprefile_dlbasename="$func_basename_result" + else + # no lafile. user explicitly requested -dlpreopen . + $sharedlib_from_linklib_cmd "$dlprefile" + dlprefile_dlbasename=$sharedlib_from_linklib_result + fi + fi + $opt_dry_run || { + if test -n "$dlprefile_dlbasename" ; then + eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' + else + func_warning "Could not compute DLL name from $name" + eval '$ECHO ": $name " >> "$nlist"' + fi + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | + $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" + } + else # not an import lib + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + fi + ;; + *) + $opt_dry_run || { + eval '$ECHO ": $name " >> "$nlist"' + func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 + eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" + } + ;; + esac done $opt_dry_run || { @@ -2415,36 +3418,19 @@ if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else - $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms" + echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; -" - case $host in - *cygwin* | *mingw* | *cegcc* ) - $ECHO >> "$output_objdir/$my_dlsyms" "\ -/* DATA imports from DLLs on WIN32 con't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs. */" - lt_dlsym_const= ;; - *osf5*) - echo >> "$output_objdir/$my_dlsyms" "\ -/* This system does not cope well with relocations in const data */" - lt_dlsym_const= ;; - *) - lt_dlsym_const=const ;; - esac - - $ECHO >> "$output_objdir/$my_dlsyms" "\ -extern $lt_dlsym_const lt_dlsymlist +extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; -$lt_dlsym_const lt_dlsymlist +LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," @@ -2457,7 +3443,7 @@ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac - $ECHO >> "$output_objdir/$my_dlsyms" "\ + echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; @@ -2500,7 +3486,7 @@ for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; - *) symtab_cflags="$symtab_cflags $arg" ;; + *) func_append symtab_cflags " $arg" ;; esac done @@ -2515,16 +3501,16 @@ case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"` + compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; @@ -2538,8 +3524,8 @@ # really was required. # Nullify the symbol file. - compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` + compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` + finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } @@ -2549,6 +3535,7 @@ # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. +# Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug @@ -2559,9 +3546,11 @@ win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static + # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | - $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | + $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then + func_to_tool_file "$1" func_convert_file_msys_to_w32 + win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ @@ -2590,6 +3579,131 @@ $ECHO "$win32_libid_type" } +# func_cygming_dll_for_implib ARG +# +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib () +{ + $opt_debug + sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` +} + +# func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs +# +# The is the core of a fallback implementation of a +# platform-specific function to extract the name of the +# DLL associated with the specified import library LIBNAME. +# +# SECTION_NAME is either .idata$6 or .idata$7, depending +# on the platform and compiler that created the implib. +# +# Echos the name of the DLL associated with the +# specified import library. +func_cygming_dll_for_implib_fallback_core () +{ + $opt_debug + match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` + $OBJDUMP -s --section "$1" "$2" 2>/dev/null | + $SED '/^Contents of section '"$match_literal"':/{ + # Place marker at beginning of archive member dllname section + s/.*/====MARK====/ + p + d + } + # These lines can sometimes be longer than 43 characters, but + # are always uninteresting + /:[ ]*file format pe[i]\{,1\}-/d + /^In archive [^:]*:/d + # Ensure marker is printed + /^====MARK====/p + # Remove all lines with less than 43 characters + /^.\{43\}/!d + # From remaining lines, remove first 43 characters + s/^.\{43\}//' | + $SED -n ' + # Join marker and all lines until next marker into a single line + /^====MARK====/ b para + H + $ b para + b + :para + x + s/\n//g + # Remove the marker + s/^====MARK====// + # Remove trailing dots and whitespace + s/[\. \t]*$// + # Print + /./p' | + # we now have a list, one entry per line, of the stringified + # contents of the appropriate section of all members of the + # archive which possess that section. Heuristic: eliminate + # all those which have a first or second character that is + # a '.' (that is, objdump's representation of an unprintable + # character.) This should work for all archives with less than + # 0x302f exports -- but will fail for DLLs whose name actually + # begins with a literal '.' or a single character followed by + # a '.'. + # + # Of those that remain, print the first one. + $SED -e '/^\./d;/^.\./d;q' +} + +# func_cygming_gnu_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is a GNU/binutils-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_gnu_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` + test -n "$func_cygming_gnu_implib_tmp" +} + +# func_cygming_ms_implib_p ARG +# This predicate returns with zero status (TRUE) if +# ARG is an MS-style import library. Returns +# with nonzero status (FALSE) otherwise. +func_cygming_ms_implib_p () +{ + $opt_debug + func_to_tool_file "$1" func_convert_file_msys_to_w32 + func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` + test -n "$func_cygming_ms_implib_tmp" +} + +# func_cygming_dll_for_implib_fallback ARG +# Platform-specific function to extract the +# name of the DLL associated with the specified +# import library ARG. +# +# This fallback implementation is for use when $DLLTOOL +# does not support the --identify-strict option. +# Invoked by eval'ing the libtool variable +# $sharedlib_from_linklib_cmd +# Result is available in the variable +# $sharedlib_from_linklib_result +func_cygming_dll_for_implib_fallback () +{ + $opt_debug + if func_cygming_gnu_implib_p "$1" ; then + # binutils import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` + elif func_cygming_ms_implib_p "$1" ; then + # ms-generated import library + sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` + else + # unknown + sharedlib_from_linklib_result="" + fi +} # func_extract_an_archive dir oldlib @@ -2598,7 +3712,18 @@ $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" - func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?' + if test "$lock_old_archive_extraction" = yes; then + lockfile=$f_ex_an_ar_oldlib.lock + until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do + func_echo "Waiting for $lockfile to be removed" + sleep 2 + done + fi + func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ + 'stat=$?; rm -f "$lockfile"; exit $stat' + if test "$lock_old_archive_extraction" = yes; then + $opt_dry_run || rm -f "$lockfile" + fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else @@ -2669,7 +3794,7 @@ darwin_file= darwin_files= for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` + darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ @@ -2684,25 +3809,30 @@ func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` + my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } - -# func_emit_wrapper_part1 [arg=no] +# func_emit_wrapper [arg=no] # -# Emit the first part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part1 () -{ - func_emit_wrapper_part1_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part1_arg1=$1 - fi +# Emit a libtool wrapper script on stdout. +# Don't directly open a file because we may want to +# incorporate the script contents within a cygwin/mingw +# wrapper executable. Must ONLY be called from within +# func_mode_link because it depends on a number of variables +# set therein. +# +# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR +# variable will take. If 'yes', then the emitted script +# will assume that the directory in which it is stored is +# the $objdir directory. This is a cygwin/mingw-specific +# behavior. +func_emit_wrapper () +{ + func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL @@ -2718,7 +3848,6 @@ # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # Be Bourne compatible @@ -2749,31 +3878,132 @@ else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then - ECHO=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$ECHO works! - : - else - # Restart under the correct shell, and then maybe \$ECHO will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ + file=\"\$0\"" + + qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` + $ECHO "\ + +# A function that is used when there is no print builtin or printf. +func_fallback_echo () +{ + eval 'cat <<_LTECHO_EOF +\$1 +_LTECHO_EOF' +} + ECHO=\"$qECHO\" + fi + +# Very basic option parsing. These options are (a) specific to +# the libtool wrapper, (b) are identical between the wrapper +# /script/ and the wrapper /executable/ which is used only on +# windows platforms, and (c) all begin with the string "--lt-" +# (application programs are unlikely to have options which match +# this pattern). +# +# There are only two supported options: --lt-debug and +# --lt-dump-script. There is, deliberately, no --lt-help. +# +# The first argument to this parsing function should be the +# script's $0 value, followed by "$@". +lt_option_debug= +func_parse_lt_options () +{ + lt_script_arg0=\$0 + shift + for lt_opt + do + case \"\$lt_opt\" in + --lt-debug) lt_option_debug=1 ;; + --lt-dump-script) + lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` + test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. + lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` + cat \"\$lt_dump_D/\$lt_dump_F\" + exit 0 + ;; + --lt-*) + \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 + exit 1 + ;; + esac + done + + # Print the debug banner immediately: + if test -n \"\$lt_option_debug\"; then + echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 + fi +} + +# Used when --lt-debug. Prints its arguments to stdout +# (redirection is the responsibility of the caller) +func_lt_dump_args () +{ + lt_dump_args_N=1; + for lt_arg + do + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" + lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` + done +} + +# Core function for launching the target application +func_exec_program_core () +{ " - $ECHO "\ + case $host in + # Backslashes separate directories on plain windows + *-*-mingw | *-*-os2* | *-cegcc*) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} +" + ;; + + *) + $ECHO "\ + if test -n \"\$lt_option_debug\"; then + \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 + func_lt_dump_args \${1+\"\$@\"} 1>&2 + fi + exec \"\$progdir/\$program\" \${1+\"\$@\"} +" + ;; + esac + $ECHO "\ + \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 + exit 1 +} + +# A function to encapsulate launching the target application +# Strips options in the --lt-* namespace from \$@ and +# launches target application with the remaining arguments. +func_exec_program () +{ + for lt_wr_arg + do + case \$lt_wr_arg in + --lt-*) ;; + *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; + esac + shift + done + func_exec_program_core \${1+\"\$@\"} +} + + # Parse options + func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. - thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` + thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do - destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` + destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then @@ -2783,30 +4013,13 @@ esac fi - file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` + file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` + file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done -" -} -# end: func_emit_wrapper_part1 - -# func_emit_wrapper_part2 [arg=no] -# -# Emit the second part of a libtool wrapper script on stdout. -# For more information, see the description associated with -# func_emit_wrapper(), below. -func_emit_wrapper_part2 () -{ - func_emit_wrapper_part2_arg1=no - if test -n "$1" ; then - func_emit_wrapper_part2_arg1=$1 - fi - - $ECHO "\ # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. - WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1 + WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then @@ -2814,7 +4027,7 @@ fi # remove .libs from thisdir case \"\$thisdir\" in - *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;; + *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi @@ -2869,6 +4082,18 @@ if test -f \"\$progdir/\$program\"; then" + # fixup the dll searchpath if we need to. + # + # Fix the DLL searchpath if we need to. Do this before prepending + # to shlibpath, because on Windows, both are PATH and uninstalled + # libraries must come first. + if test -n "$dllsearchpath"; then + $ECHO "\ + # Add the dll search path components to the executable PATH + PATH=$dllsearchpath:\$PATH +" + fi + # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ @@ -2877,253 +4102,28 @@ # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` + $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $ECHO "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2* | *-cegcc*) - $ECHO "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $ECHO "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $ECHO "\ - \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 - exit 1 + func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 - $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 - exit 1 - fi -fi\ -" -} -# end: func_emit_wrapper_part2 - - -# func_emit_wrapper [arg=no] -# -# Emit a libtool wrapper script on stdout. -# Don't directly open a file because we may want to -# incorporate the script contents within a cygwin/mingw -# wrapper executable. Must ONLY be called from within -# func_mode_link because it depends on a number of variables -# set therein. -# -# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR -# variable will take. If 'yes', then the emitted script -# will assume that the directory in which it is stored is -# the $objdir directory. This is a cygwin/mingw-specific -# behavior. -func_emit_wrapper () -{ - func_emit_wrapper_arg1=no - if test -n "$1" ; then - func_emit_wrapper_arg1=$1 - fi - - # split this up so that func_emit_cwrapperexe_src - # can call each part independently. - func_emit_wrapper_part1 "${func_emit_wrapper_arg1}" - func_emit_wrapper_part2 "${func_emit_wrapper_arg1}" -} - - -# func_to_host_path arg -# -# Convert paths to host format when used with build tools. -# Intended for use with "native" mingw (where libtool itself -# is running under the msys shell), or in the following cross- -# build environments: -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# where wine is equipped with the `winepath' executable. -# In the native mingw case, the (msys) shell automatically -# converts paths for any non-msys applications it launches, -# but that facility isn't available from inside the cwrapper. -# Similar accommodations are necessary for $host mingw and -# $build cygwin. Calling this function does no harm for other -# $host/$build combinations not listed above. -# -# ARG is the path (on $build) that should be converted to -# the proper representation for $host. The result is stored -# in $func_to_host_path_result. -func_to_host_path () -{ - func_to_host_path_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - case $build in - *mingw* ) # actually, msys - # awkward: cmd appends spaces to result - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_path_tmp1=`( cmd //c echo "$1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_path_tmp1=`cygpath -w "$1"` - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # Unfortunately, winepath does not exit with a non-zero - # error code, so we are forced to check the contents of - # stdout. On the other hand, if the command is not - # found, the shell will set an exit code of 127 and print - # *an error message* to stdout. So we must check for both - # error code of zero AND non-empty stdout, which explains - # the odd construction: - func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null` - if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then - func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\ - $SED -e "$lt_sed_naive_backslashify"` - else - # Allow warning below. - func_to_host_path_result="" - fi - ;; - esac - if test -z "$func_to_host_path_result" ; then - func_error "Could not determine host path corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback: - func_to_host_path_result="$1" - fi - ;; - esac - fi -} -# end: func_to_host_path - -# func_to_host_pathlist arg -# -# Convert pathlists to host format when used with build tools. -# See func_to_host_path(), above. This function supports the -# following $build/$host combinations (but does no harm for -# combinations not listed here): -# $build $host -# mingw (msys) mingw [e.g. native] -# cygwin mingw -# *nix + wine mingw -# -# Path separators are also converted from $build format to -# $host format. If ARG begins or ends with a path separator -# character, it is preserved (but converted to $host format) -# on output. -# -# ARG is a pathlist (on $build) that should be converted to -# the proper representation on $host. The result is stored -# in $func_to_host_pathlist_result. -func_to_host_pathlist () -{ - func_to_host_pathlist_result="$1" - if test -n "$1" ; then - case $host in - *mingw* ) - lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' - # Remove leading and trailing path separator characters from - # ARG. msys behavior is inconsistent here, cygpath turns them - # into '.;' and ';.', and winepath ignores them completely. - func_to_host_pathlist_tmp2="$1" - # Once set for this call, this variable should not be - # reassigned. It is used in tha fallback case. - func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e 's|^:*||' -e 's|:*$||'` - case $build in - *mingw* ) # Actually, msys. - # Awkward: cmd appends spaces to result. - lt_sed_strip_trailing_spaces="s/[ ]*\$//" - func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - *cygwin* ) - func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"` - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\ - $SED -e "$lt_sed_naive_backslashify"` - ;; - * ) - # unfortunately, winepath doesn't convert pathlists - func_to_host_pathlist_result="" - func_to_host_pathlist_oldIFS=$IFS - IFS=: - for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do - IFS=$func_to_host_pathlist_oldIFS - if test -n "$func_to_host_pathlist_f" ; then - func_to_host_path "$func_to_host_pathlist_f" - if test -n "$func_to_host_path_result" ; then - if test -z "$func_to_host_pathlist_result" ; then - func_to_host_pathlist_result="$func_to_host_path_result" - else - func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result" - fi - fi - fi - IFS=: - done - IFS=$func_to_host_pathlist_oldIFS - ;; - esac - if test -z "$func_to_host_pathlist_result" ; then - func_error "Could not determine the host path(s) corresponding to" - func_error " '$1'" - func_error "Continuing, but uninstalled executables may not work." - # Fallback. This may break if $1 contains DOS-style drive - # specifications. The fix is not to complicate the expression - # below, but for the user to provide a working wine installation - # with winepath so that path translation in the cross-to-mingw - # case works properly. - lt_replace_pathsep_nix_to_dos="s|:|;|g" - func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\ - $SED -e "$lt_replace_pathsep_nix_to_dos"` - fi - # Now, add the leading and trailing path separators back - case "$1" in - :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result" - ;; - esac - case "$1" in - *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;" - ;; - esac - ;; - esac + \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 + exit 1 fi +fi\ +" } -# end: func_to_host_pathlist + # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout @@ -3141,31 +4141,23 @@ This wrapper executable should never be moved out of the build directory. If it is, it will not operate correctly. - - Currently, it simply execs the wrapper *script* "$SHELL $output", - but could eventually absorb all of the scripts functionality and - exec $objdir/$outputname directly. */ EOF cat <<"EOF" +#ifdef _MSC_VER +# define _CRT_SECURE_NO_DEPRECATE 1 +#endif #include #include #ifdef _MSC_VER # include # include # include -# define setmode _setmode #else # include # include # ifdef __CYGWIN__ # include -# define HAVE_SETENV -# ifdef __STRICT_ANSI__ -char *realpath (const char *, char *); -int putenv (char *); -int setenv (const char *, const char *, int); -# endif # endif #endif #include @@ -3177,6 +4169,44 @@ #include #include +/* declarations of non-ANSI functions */ +#if defined(__MINGW32__) +# ifdef __STRICT_ANSI__ +int _putenv (const char *); +# endif +#elif defined(__CYGWIN__) +# ifdef __STRICT_ANSI__ +char *realpath (const char *, char *); +int putenv (char *); +int setenv (const char *, const char *, int); +# endif +/* #elif defined (other platforms) ... */ +#endif + +/* portability defines, excluding path handling macros */ +#if defined(_MSC_VER) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +# define S_IXUSR _S_IEXEC +# ifndef _INTPTR_T_DEFINED +# define _INTPTR_T_DEFINED +# define intptr_t int +# endif +#elif defined(__MINGW32__) +# define setmode _setmode +# define stat _stat +# define chmod _chmod +# define getcwd _getcwd +# define putenv _putenv +#elif defined(__CYGWIN__) +# define HAVE_SETENV +# define FOPEN_WB "wb" +/* #elif defined (other platforms) ... */ +#endif + #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) @@ -3192,14 +4222,7 @@ # define S_IXGRP 0 #endif -#ifdef _MSC_VER -# define S_IXUSR _S_IEXEC -# define stat _stat -# ifndef _INTPTR_T_DEFINED -# define intptr_t int -# endif -#endif - +/* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' @@ -3230,10 +4253,6 @@ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ -#ifdef __CYGWIN__ -# define FOPEN_WB "wb" -#endif - #ifndef FOPEN_WB # define FOPEN_WB "w" #endif @@ -3246,22 +4265,13 @@ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) -#undef LTWRAPPER_DEBUGPRINTF -#if defined DEBUGWRAPPER -# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args -static void -ltwrapper_debugprintf (const char *fmt, ...) -{ - va_list args; - va_start (args, fmt); - (void) vfprintf (stderr, fmt, args); - va_end (args); -} +#if defined(LT_DEBUGWRAPPER) +static int lt_debug = 1; #else -# define LTWRAPPER_DEBUGPRINTF(args) +static int lt_debug = 0; #endif -const char *program_name = NULL; +const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); @@ -3271,41 +4281,27 @@ int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); -void lt_fatal (const char *message, ...); +void lt_debugprintf (const char *file, int line, const char *fmt, ...); +void lt_fatal (const char *file, int line, const char *message, ...); +static const char *nonnull (const char *s); +static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); -void lt_opt_process_env_set (const char *arg); -void lt_opt_process_env_prepend (const char *arg); -void lt_opt_process_env_append (const char *arg); -int lt_split_name_value (const char *arg, char** name, char** value); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); - -static const char *script_text_part1 = -EOF - - func_emit_wrapper_part1 yes | - $SED -e 's/\([\\"]\)/\\\1/g' \ - -e 's/^/ "/' -e 's/$/\\n"/' - echo ";" - cat <"))); + lt_debugprintf (__FILE__, __LINE__, "(main) lt_argv_zero: %s\n", + nonnull (lt_argv_zero)); for (i = 0; i < newargc; i++) { - LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : ""))); + lt_debugprintf (__FILE__, __LINE__, "(main) newargz[%d]: %s\n", + i, nonnull (newargz[i])); } EOF @@ -3560,11 +4517,14 @@ mingw*) cat <<"EOF" /* execv doesn't actually work on mingw as expected on unix */ + newargz = prepare_spawn (newargz); rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz); if (rval == -1) { /* failed to start process */ - LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno)); + lt_debugprintf (__FILE__, __LINE__, + "(main) failed to launch target \"%s\": %s\n", + lt_argv_zero, nonnull (strerror (errno))); return 127; } return rval; @@ -3586,7 +4546,7 @@ { void *p = (void *) malloc (num); if (!p) - lt_fatal ("Memory exhausted"); + lt_fatal (__FILE__, __LINE__, "memory exhausted"); return p; } @@ -3620,8 +4580,8 @@ { struct stat st; - LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(check_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3638,8 +4598,8 @@ int rval = 0; struct stat st; - LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n", - path ? (*path ? path : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", + nonempty (path)); if ((!path) || (!*path)) return 0; @@ -3665,8 +4625,8 @@ int tmp_len; char *concat_name; - LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n", - wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!")); + lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", + nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; @@ -3719,7 +4679,8 @@ { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); @@ -3744,7 +4705,8 @@ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); + lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", + nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); @@ -3770,8 +4732,9 @@ int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { - LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n", - tmp_pathspec)); + lt_debugprintf (__FILE__, __LINE__, + "checking path component for symlinks: %s\n", + tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) @@ -3793,8 +4756,9 @@ } else { - char *errstr = strerror (errno); - lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr); + lt_fatal (__FILE__, __LINE__, + "error accessing file \"%s\": %s", + tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); @@ -3807,7 +4771,8 @@ tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { - lt_fatal ("Could not follow symlinks for %s", pathspec); + lt_fatal (__FILE__, __LINE__, + "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif @@ -3833,11 +4798,25 @@ return str; } +void +lt_debugprintf (const char *file, int line, const char *fmt, ...) +{ + va_list args; + if (lt_debug) + { + (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); + va_start (args, fmt); + (void) vfprintf (stderr, fmt, args); + va_end (args); + } +} + static void -lt_error_core (int exit_status, const char *mode, +lt_error_core (int exit_status, const char *file, + int line, const char *mode, const char *message, va_list ap) { - fprintf (stderr, "%s: %s: ", program_name, mode); + fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); @@ -3846,20 +4825,32 @@ } void -lt_fatal (const char *message, ...) +lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); + lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } +static const char * +nonnull (const char *s) +{ + return s ? s : "(null)"; +} + +static const char * +nonempty (const char *s) +{ + return (s && !*s) ? "(empty)" : nonnull (s); +} + void lt_setenv (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_setenv) setting '%s' to '%s'\n", + nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ @@ -3904,95 +4895,12 @@ return new_value; } -int -lt_split_name_value (const char *arg, char** name, char** value) -{ - const char *p; - int len; - if (!arg || !*arg) - return 1; - - p = strchr (arg, (int)'='); - - if (!p) - return 1; - - *value = xstrdup (++p); - - len = strlen (arg) - strlen (*value); - *name = XMALLOC (char, len); - strncpy (*name, arg, len-1); - (*name)[len - 1] = '\0'; - - return 0; -} - -void -lt_opt_process_env_set (const char *arg) -{ - char *name = NULL; - char *value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg); - } - - lt_setenv (name, value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_prepend (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 0); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - -void -lt_opt_process_env_append (const char *arg) -{ - char *name = NULL; - char *value = NULL; - char *new_value = NULL; - - if (lt_split_name_value (arg, &name, &value) != 0) - { - XFREE (name); - XFREE (value); - lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg); - } - - new_value = lt_extend_str (getenv (name), value, 1); - lt_setenv (name, new_value); - XFREE (new_value); - XFREE (name); - XFREE (value); -} - void lt_update_exe_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4011,9 +4919,9 @@ void lt_update_lib_path (const char *name, const char *value) { - LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n", - (name ? name : ""), - (value ? value : ""))); + lt_debugprintf (__FILE__, __LINE__, + "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", + nonnull (name), nonnull (value)); if (name && *name && value && *value) { @@ -4023,11 +4931,152 @@ } } +EOF + case $host_os in + mingw*) + cat <<"EOF" + +/* Prepares an argument vector before calling spawn(). + Note that spawn() does not by itself call the command interpreter + (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : + ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); + GetVersionEx(&v); + v.dwPlatformId == VER_PLATFORM_WIN32_NT; + }) ? "cmd.exe" : "command.com"). + Instead it simply concatenates the arguments, separated by ' ', and calls + CreateProcess(). We must quote the arguments since Win32 CreateProcess() + interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a + special way: + - Space and tab are interpreted as delimiters. They are not treated as + delimiters if they are surrounded by double quotes: "...". + - Unescaped double quotes are removed from the input. Their only effect is + that within double quotes, space and tab are treated like normal + characters. + - Backslashes not followed by double quotes are not special. + - But 2*n+1 backslashes followed by a double quote become + n backslashes followed by a double quote (n >= 0): + \" -> " + \\\" -> \" + \\\\\" -> \\" + */ +#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" +char ** +prepare_spawn (char **argv) +{ + size_t argc; + char **new_argv; + size_t i; + + /* Count number of arguments. */ + for (argc = 0; argv[argc] != NULL; argc++) + ; + + /* Allocate new argument vector. */ + new_argv = XMALLOC (char *, argc + 1); + + /* Put quoted arguments into the new argument vector. */ + for (i = 0; i < argc; i++) + { + const char *string = argv[i]; + + if (string[0] == '\0') + new_argv[i] = xstrdup ("\"\""); + else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) + { + int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); + size_t length; + unsigned int backslashes; + const char *s; + char *quoted_string; + char *p; + + length = 0; + backslashes = 0; + if (quote_around) + length++; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + length += backslashes + 1; + length++; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + length += backslashes + 1; + + quoted_string = XMALLOC (char, length + 1); + + p = quoted_string; + backslashes = 0; + if (quote_around) + *p++ = '"'; + for (s = string; *s != '\0'; s++) + { + char c = *s; + if (c == '"') + { + unsigned int j; + for (j = backslashes + 1; j > 0; j--) + *p++ = '\\'; + } + *p++ = c; + if (c == '\\') + backslashes++; + else + backslashes = 0; + } + if (quote_around) + { + unsigned int j; + for (j = backslashes; j > 0; j--) + *p++ = '\\'; + *p++ = '"'; + } + *p = '\0'; + + new_argv[i] = quoted_string; + } + else + new_argv[i] = (char *) string; + } + new_argv[argc] = NULL; + + return new_argv; +} +EOF + ;; + esac + + cat <<"EOF" +void lt_dump_script (FILE* f) +{ +EOF + func_emit_wrapper yes | + $SED -e 's/\([\\"]\)/\\\1/g' \ + -e 's/^/ fputs ("/' -e 's/$/\\n", f);/' + cat <<"EOF" +} EOF } # end: func_emit_cwrapperexe_src +# func_win32_import_lib_p ARG +# True if ARG is an import lib, as indicated by $file_magic_cmd +func_win32_import_lib_p () +{ + $opt_debug + case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in + *import*) : ;; + *) false ;; + esac +} + # func_mode_link arg... func_mode_link () { @@ -4072,6 +5121,7 @@ new_inherited_linker_flags= avoid_version=no + bindir= dlfiles= dlprefiles= dlself=no @@ -4164,6 +5214,11 @@ esac case $prev in + bindir) + bindir="$arg" + prev= + continue + ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. @@ -4195,9 +5250,9 @@ ;; *) if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" + func_append dlfiles " $arg" else - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $arg" fi prev= continue @@ -4221,7 +5276,7 @@ *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; - *) deplibs="$deplibs $qarg.ltframework" # this is fixed later + *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; @@ -4240,7 +5295,7 @@ moreargs= for fil in `cat "$save_arg"` do -# moreargs="$moreargs $fil" +# func_append moreargs " $fil" arg=$fil # A libtool-controlled object. @@ -4269,7 +5324,7 @@ if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4281,7 +5336,7 @@ # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4351,12 +5406,12 @@ if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; - *) rpath="$rpath $arg" ;; + *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; + *) func_append xrpath " $arg" ;; esac fi prev= @@ -4368,28 +5423,28 @@ continue ;; weak) - weak_libs="$weak_libs $arg" + func_append weak_libs " $arg" prev= continue ;; xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) - compiler_flags="$compiler_flags $qarg" + func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" + func_append linker_flags " $qarg" + func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" @@ -4425,6 +5480,11 @@ continue ;; + -bindir) + prev=bindir + continue + ;; + -dlopen) prev=dlfiles continue @@ -4475,15 +5535,16 @@ ;; -L*) - func_stripname '-L' '' "$arg" - dir=$func_stripname_result - if test -z "$dir"; then + func_stripname "-L" '' "$arg" + if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; @@ -4495,24 +5556,30 @@ ;; esac case "$deplibs " in - *" -L$dir "*) ;; + *" -L$dir "* | *" $arg "*) + # Will only happen for absolute or sysroot arguments + ;; *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" + # Preserve sysroot, but never include relative directories + case $dir in + [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; + *) func_append deplibs " -L$dir" ;; + esac + func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) - testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'` + testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; - *) dllsearchpath="$dllsearchpath:$dir";; + *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -4522,7 +5589,7 @@ -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; @@ -4536,7 +5603,7 @@ ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) @@ -4556,7 +5623,7 @@ ;; esac fi - deplibs="$deplibs $arg" + func_append deplibs " $arg" continue ;; @@ -4568,8 +5635,8 @@ # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. - -model|-arch|-isysroot) - compiler_flags="$compiler_flags $arg" + -model|-arch|-isysroot|--sysroot) + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler @@ -4577,12 +5644,12 @@ ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads) - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;; + * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; @@ -4649,13 +5716,17 @@ # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; + =*) + func_stripname '=' '' "$dir" + dir=$lt_sysroot$func_stripname_result + ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac continue ;; @@ -4708,8 +5779,8 @@ for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $func_quote_for_eval_result" + func_append arg " $func_quote_for_eval_result" + func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4724,9 +5795,9 @@ for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" - arg="$arg $wl$func_quote_for_eval_result" - compiler_flags="$compiler_flags $wl$func_quote_for_eval_result" - linker_flags="$linker_flags $func_quote_for_eval_result" + func_append arg " $wl$func_quote_for_eval_result" + func_append compiler_flags " $wl$func_quote_for_eval_result" + func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" @@ -4754,23 +5825,27 @@ arg="$func_quote_for_eval_result" ;; - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -F/path gives path to uninstalled frameworks, gcc on darwin - # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC - # @file GCC response files + # Flags to be passed through unchanged, with rationale: + # -64, -mips[0-9] enable 64-bit mode for the SGI compiler + # -r[0-9][0-9]* specify processor for the SGI compiler + # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler + # +DA*, +DD* enable 64-bit mode for the HP compiler + # -q* compiler args for the IBM compiler + # -m*, -t[45]*, -txscale* architecture-specific flags for GCC + # -F/path path to uninstalled frameworks, gcc on darwin + # -p, -pg, --coverage, -fprofile-* profiling flags for GCC + # @file GCC response files + # -tp=* Portland pgcc target processor selection + # --sysroot=* for sysroot support + # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ - -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*) + -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ + -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" - compiler_flags="$compiler_flags $arg" + func_append compiler_flags " $arg" continue ;; @@ -4782,7 +5857,7 @@ *.$objext) # A standard object. - objs="$objs $arg" + func_append objs " $arg" ;; *.lo) @@ -4813,7 +5888,7 @@ if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" + func_append dlfiles " $pic_object" prev= continue else @@ -4825,7 +5900,7 @@ # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" + func_append dlprefiles " $pic_object" prev= fi @@ -4870,24 +5945,25 @@ *.$libext) # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" + func_append deplibs " $arg" + func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. + func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" + func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" + func_append dlprefiles " $func_resolve_sysroot_result" prev= else - deplibs="$deplibs $arg" + func_append deplibs " $func_resolve_sysroot_result" fi continue ;; @@ -4925,7 +6001,7 @@ if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` + eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi @@ -4934,6 +6010,8 @@ func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" + func_to_tool_file "$output_objdir/" + tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" @@ -4954,12 +6032,12 @@ # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - libs="$libs $deplib" + func_append libs " $deplib" done if test "$linkmode" = lib; then @@ -4972,9 +6050,9 @@ if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; + *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac - pre_post_deps="$pre_post_deps $pre_post_dep" + func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= @@ -5044,17 +6122,19 @@ for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= + func_resolve_sysroot "$lib" case $lib in - *.la) func_source "$lib" ;; + *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do - deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"` + func_basename "$deplib" + deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; - *) deplibs="$deplibs $deplib" ;; + *) func_append deplibs " $deplib" ;; esac done done @@ -5075,11 +6155,11 @@ compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - compiler_flags="$compiler_flags $deplib" + func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5164,7 +6244,7 @@ if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; - * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;; + * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi @@ -5177,7 +6257,8 @@ test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then @@ -5191,7 +6272,8 @@ finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" @@ -5202,17 +6284,21 @@ -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" - dir=$func_stripname_result + func_resolve_sysroot "$func_stripname_result" + dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; + *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; - *.la) lib="$deplib" ;; + *.la) + func_resolve_sysroot "$deplib" + lib=$func_resolve_sysroot_result + ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" @@ -5230,7 +6316,7 @@ match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` - if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \ + if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi @@ -5240,15 +6326,15 @@ ;; esac if test "$valid_a_lib" != yes; then - $ECHO + echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because the file extensions .$libext of this argument makes me believe" - $ECHO "*** that it is just a static archive that I should not use here." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because the file extensions .$libext of this argument makes me believe" + echo "*** that it is just a static archive that I should not use here." else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" @@ -5275,11 +6361,11 @@ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. - newdlprefiles="$newdlprefiles $deplib" + func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else - newdlfiles="$newdlfiles $deplib" + func_append newdlfiles " $deplib" fi fi continue @@ -5321,20 +6407,20 @@ # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then - tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'` + tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; - *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";; + *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi - dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" + test -n "$dlopen" && func_append dlfiles " $dlopen" + test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then @@ -5345,17 +6431,17 @@ func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" + func_append convenience " $ladir/$objdir/$old_library" + func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" @@ -5366,9 +6452,15 @@ # Get the name of the library we link against. linklib= - for l in $old_library $library_names; do - linklib="$l" - done + if test -n "$old_library" && + { test "$prefer_static_libs" = yes || + test "$prefer_static_libs,$installed" = "built,no"; }; then + linklib=$old_library + else + for l in $old_library $library_names; do + linklib="$l" + done + fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi @@ -5385,9 +6477,9 @@ # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" + func_append dlprefiles " $lib $dependency_libs" else - newdlfiles="$newdlfiles $lib" + func_append newdlfiles " $lib" fi continue fi # $pass = dlopen @@ -5409,14 +6501,14 @@ # Find the relevant object directory and library name. if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then + if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else - dir="$libdir" - absdir="$libdir" + dir="$lt_sysroot$libdir" + absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else @@ -5424,12 +6516,12 @@ dir="$ladir" absdir="$abs_ladir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later - notinst_path="$notinst_path $abs_ladir" + func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" @@ -5440,20 +6532,46 @@ if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Keep a list of preopened convenience libraries to check - # that they are being used correctly in the link pass. - test -z "$libdir" && \ - dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi + case "$host" in + # special handling for platforms with PE-DLLs. + *cygwin* | *mingw* | *cegcc* ) + # Linker will automatically link against shared library if both + # static and shared are present. Therefore, ensure we extract + # symbols from the import library if a shared library is present + # (otherwise, the dlopen module name will be incorrect). We do + # this by putting the import library name into $newdlprefiles. + # We recover the dlopen module name by 'saving' the la file + # name in a special purpose variable, and (later) extracting the + # dlname from the la file. + if test -n "$dlname"; then + func_tr_sh "$dir/$linklib" + eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" + func_append newdlprefiles " $dir/$linklib" + else + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + fi + ;; + * ) + # Prefer using a static library (so that no silly _DYNAMIC symbols + # are required to link). + if test -n "$old_library"; then + func_append newdlprefiles " $dir/$old_library" + # Keep a list of preopened convenience libraries to check + # that they are being used correctly in the link pass. + test -z "$libdir" && \ + func_append dlpreconveniencelibs " $dir/$old_library" + # Otherwise, use the dlname, so that lt_dlopen finds it. + elif test -n "$dlname"; then + func_append newdlprefiles " $dir/$dlname" + else + func_append newdlprefiles " $dir/$linklib" + fi + ;; + esac fi # $pass = dlpreopen if test -z "$libdir"; then @@ -5471,7 +6589,7 @@ if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" + func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no @@ -5484,7 +6602,8 @@ for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" - newlib_search_path="$newlib_search_path $func_stripname_result" + func_resolve_sysroot "$func_stripname_result" + func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? @@ -5495,12 +6614,12 @@ # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi - if $opt_duplicate_deps ; then + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... @@ -5515,7 +6634,7 @@ # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; - *) temp_rpath="$temp_rpath$absdir:" ;; + *) func_append temp_rpath "$absdir:" ;; esac fi @@ -5527,7 +6646,7 @@ *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5536,7 +6655,7 @@ *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5561,12 +6680,12 @@ case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" + func_append notinst_deplibs " $lib" need_relink=yes fi ;; @@ -5583,7 +6702,7 @@ fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then - $ECHO + echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else @@ -5601,7 +6720,7 @@ *) case "$compile_rpath " in *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" + *) func_append compile_rpath " $absdir" ;; esac ;; esac @@ -5610,7 +6729,7 @@ *) case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" + *) func_append finalize_rpath " $libdir" ;; esac ;; esac @@ -5664,7 +6783,7 @@ linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" - if test "$linkmode" = prog || test "$mode" != relink; then + if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= @@ -5686,9 +6805,9 @@ if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then - $ECHO - $ECHO "*** And there doesn't seem to be a static archive available" - $ECHO "*** The link will probably fail, sorry" + echo + echo "*** And there doesn't seem to be a static archive available" + echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi @@ -5720,7 +6839,7 @@ if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5742,7 +6861,7 @@ if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; + *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then @@ -5756,13 +6875,13 @@ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi - if test "$linkmode" = prog || test "$mode" = relink; then + if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= @@ -5776,7 +6895,7 @@ elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; + *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then @@ -5793,7 +6912,7 @@ if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" + func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi @@ -5828,21 +6947,21 @@ # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. - $ECHO + echo $ECHO "*** Warning: This system can not link to static lib archive $lib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then - $ECHO "*** But as you try to build a module library, libtool will still create " - $ECHO "*** a static module, that should work as long as the dlopening application" - $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime." + echo "*** But as you try to build a module library, libtool will still create " + echo "*** a static module, that should work as long as the dlopening application" + echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module @@ -5870,27 +6989,33 @@ temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; + *) func_append xrpath " $temp_xrpath";; esac;; - *) temp_deplibs="$temp_deplibs $libdir";; + *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi - newlib_search_path="$newlib_search_path $absdir" + func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" - if $opt_duplicate_deps ; then + case $deplib in + -L*) func_stripname '-L' '' "$deplib" + func_resolve_sysroot "$func_stripname_result";; + *) func_resolve_sysroot "$deplib" ;; + esac + if $opt_preserve_dup_deps ; then case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; + *" $func_resolve_sysroot_result "*) + func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi - tmp_libs="$tmp_libs $deplib" + func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then @@ -5900,8 +7025,10 @@ case $deplib in -L*) path="$deplib" ;; *.la) + func_resolve_sysroot "$deplib" + deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." - dir="$func_dirname_result" + dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; @@ -5928,8 +7055,8 @@ if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi - compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" - linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}" + func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" + func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi @@ -5962,7 +7089,7 @@ compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else - compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" @@ -5979,7 +7106,7 @@ for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; + *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= @@ -6037,10 +7164,10 @@ -L*) case " $tmp_libs " in *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac ;; - *) tmp_libs="$tmp_libs $deplib" ;; + *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" @@ -6056,7 +7183,7 @@ ;; esac if test -n "$i" ; then - tmp_libs="$tmp_libs $i" + func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs @@ -6097,7 +7224,7 @@ # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" - objs="$objs$old_deplibs" + func_append objs "$old_deplibs" ;; lib) @@ -6130,10 +7257,10 @@ if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else - $ECHO + echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" - libobjs="$libobjs $objs" + func_append libobjs " $objs" fi fi @@ -6198,7 +7325,7 @@ age="$number_minor" revision="$number_revision" ;; - freebsd-aout|freebsd-elf|sunos) + freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" @@ -6334,7 +7461,7 @@ done # Make executables depend on our current version. - verstring="$verstring:${current}.0" + func_append verstring ":${current}.0" ;; qnx) @@ -6402,10 +7529,10 @@ fi func_generate_dlsyms "$libname" "$libname" "yes" - libobjs="$libobjs $symfileobj" + func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= - if test "$mode" != relink; then + if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= @@ -6421,7 +7548,7 @@ continue fi fi - removelist="$removelist $p" + func_append removelist " $p" ;; *) ;; esac @@ -6432,27 +7559,28 @@ # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" + func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. - oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` + oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do - # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"` - # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"` - # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"` + # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` + # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` + # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" + func_replace_sysroot "$libdir" + func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then @@ -6466,7 +7594,7 @@ for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; + *) func_append dlfiles " $lib" ;; esac done @@ -6476,19 +7604,19 @@ for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; + *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*) + *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework - deplibs="$deplibs System.ltframework" + func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. @@ -6505,7 +7633,7 @@ *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" + func_append deplibs " -lc" fi ;; esac @@ -6554,7 +7682,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6565,21 +7693,21 @@ set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which I believe you do not have" - $ECHO "*** because a test_compile did reveal that the linker did not use it for" - $ECHO "*** its dynamic dependency list that programs get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which I believe you do not have" + echo "*** because a test_compile did reveal that the linker did not use it for" + echo "*** its dynamic dependency list that programs get resolved with at runtime." fi fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6597,7 +7725,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $i "*) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" i="" ;; esac @@ -6608,29 +7736,29 @@ set dummy $deplib_matches; shift deplib_match=$1 if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: dynamic linker does not accept needed library $i." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because a test_compile did reveal that the linker did not use this one" - $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime." + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because a test_compile did reveal that the linker did not use this one" + echo "*** as a dynamic dependency that programs can get resolved with at runtime." fi fi else droppeddeps=yes - $ECHO + echo $ECHO "*** Warning! Library $i is needed by this library but I was not able to" - $ECHO "*** make it link in! You will probably need to install it or some" - $ECHO "*** library that it depends on before this library will be fully" - $ECHO "*** functional. Installing it before continuing would be even better." + echo "*** make it link in! You will probably need to install it or some" + echo "*** library that it depends on before this library will be fully" + echo "*** functional. Installing it before continuing would be even better." fi ;; *) - newdeplibs="$newdeplibs $i" + func_append newdeplibs " $i" ;; esac done @@ -6647,15 +7775,27 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` + if test -n "$file_magic_glob"; then + libnameglob=`func_echo_all "$libname" | $SED -e $file_magic_glob` + else + libnameglob=$libname + fi + test "$want_nocaseglob" = yes && nocaseglob=`shopt -p nocaseglob` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` + if test "$want_nocaseglob" = yes; then + shopt -s nocaseglob + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + $nocaseglob + else + potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` + fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | @@ -6672,13 +7812,13 @@ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; + *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6687,12 +7827,12 @@ fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else @@ -6703,7 +7843,7 @@ ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. @@ -6719,7 +7859,7 @@ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" ;; esac @@ -6730,9 +7870,9 @@ potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test - if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \ + if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi @@ -6741,12 +7881,12 @@ fi if test -n "$a_deplib" ; then droppeddeps=yes - $ECHO + echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." - $ECHO "*** I have the capability to make that library automatically link in when" - $ECHO "*** you link to this library. But I can only do this if you have a" - $ECHO "*** shared version of the library, which you do not appear to have" - $ECHO "*** because I did check the linker path looking for a file starting" + echo "*** I have the capability to make that library automatically link in when" + echo "*** you link to this library. But I can only do this if you have a" + echo "*** shared version of the library, which you do not appear to have" + echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else @@ -6757,32 +7897,32 @@ ;; *) # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" + func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" - tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \ - -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'` + tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"` + tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi - if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' | - $GREP . >/dev/null; then - $ECHO + case $tmp_deplibs in + *[!\ \ ]*) + echo if test "X$deplibs_check_method" = "Xnone"; then - $ECHO "*** Warning: inter-library dependencies are not supported in this platform." + echo "*** Warning: inter-library dependencies are not supported in this platform." else - $ECHO "*** Warning: inter-library dependencies are not known to be supported." + echo "*** Warning: inter-library dependencies are not known to be supported." fi - $ECHO "*** All declared inter-library dependencies are being dropped." + echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes - fi + ;; + esac ;; esac versuffix=$versuffix_save @@ -6794,23 +7934,23 @@ case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then - $ECHO - $ECHO "*** Warning: libtool could not satisfy all declared inter-library" + echo + echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" - $ECHO "*** a static module, that should work as long as the dlopening" - $ECHO "*** application is linked with the -dlopen flag." + echo "*** a static module, that should work as long as the dlopening" + echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then - $ECHO - $ECHO "*** However, this would only work if libtool was able to extract symbol" - $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could" - $ECHO "*** not find such a program. So, this module is probably useless." - $ECHO "*** \`nm' from GNU binutils and a full rebuild may help." + echo + echo "*** However, this would only work if libtool was able to extract symbol" + echo "*** lists from a program, using \`nm' or equivalent, but libtool could" + echo "*** not find such a program. So, this module is probably useless." + echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" @@ -6820,16 +7960,16 @@ build_libtool_libs=no fi else - $ECHO "*** The inter-library dependencies that have been dropped here will be" - $ECHO "*** automatically added whenever a program is linked with this library" - $ECHO "*** or is declared to -dlopen it." + echo "*** The inter-library dependencies that have been dropped here will be" + echo "*** automatically added whenever a program is linked with this library" + echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then - $ECHO - $ECHO "*** Since this library must not contain undefined symbols," - $ECHO "*** because either the platform does not support them or" - $ECHO "*** it was explicitly requested with -no-undefined," - $ECHO "*** libtool will only create a static version of it." + echo + echo "*** Since this library must not contain undefined symbols," + echo "*** because either the platform does not support them or" + echo "*** it was explicitly requested with -no-undefined," + echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module @@ -6846,9 +7986,9 @@ # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) - newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -6861,7 +8001,7 @@ *) case " $deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -6871,10 +8011,10 @@ -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" @@ -6891,10 +8031,12 @@ hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" + test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then + func_replace_sysroot "$libdir" + libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else @@ -6903,18 +8045,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" + func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_apped perm_rpath " $libdir" ;; esac fi done @@ -6932,7 +8074,7 @@ # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi @@ -6940,7 +8082,7 @@ fi shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" + test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi @@ -6966,18 +8108,18 @@ linknames= for link do - linknames="$linknames $link" + func_append linknames " $link" done # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" - delfiles="$delfiles $export_symbols" + func_append delfiles " $export_symbols" fi orig_export_symbols= @@ -7008,13 +8150,45 @@ $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do + for cmd1 in $cmds; do IFS="$save_ifs" - eval cmd=\"$cmd\" - func_len " $cmd" - len=$func_len_result - if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then + # Take the normal branch if the nm_file_list_spec branch + # doesn't work or if tool conversion is not needed. + case $nm_file_list_spec~$to_tool_file_cmd in + *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) + try_normal_branch=yes + eval cmd=\"$cmd1\" + func_len " $cmd" + len=$func_len_result + ;; + *) + try_normal_branch=no + ;; + esac + if test "$try_normal_branch" = yes \ + && { test "$len" -lt "$max_cmd_len" \ + || test "$max_cmd_len" -le -1; } + then + func_show_eval "$cmd" 'exit $?' + skipped_export=false + elif test -n "$nm_file_list_spec"; then + func_basename "$output" + output_la=$func_basename_result + save_libobjs=$libobjs + save_output=$output + output=${output_objdir}/${output_la}.nm + func_to_tool_file "$output" + libobjs=$nm_file_list_spec$func_to_tool_file_result + func_append delfiles " $output" + func_verbose "creating $NM input file list: $output" + for obj in $save_libobjs; do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > "$output" + eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' + output=$save_output + libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. @@ -7036,7 +8210,7 @@ if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then @@ -7048,7 +8222,7 @@ # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7058,7 +8232,7 @@ case " $convenience " in *" $test_deplib "*) ;; *) - tmp_deplibs="$tmp_deplibs $test_deplib" + func_append tmp_deplibs " $test_deplib" ;; esac done @@ -7078,21 +8252,21 @@ test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" + func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi @@ -7137,7 +8311,8 @@ save_libobjs=$libobjs fi save_output=$output - output_la=`$ECHO "X$output" | $Xsed -e "$basename"` + func_basename "$output" + output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. @@ -7150,13 +8325,16 @@ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" - $ECHO 'INPUT (' > $output + echo 'INPUT (' > $output for obj in $save_libobjs do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - $ECHO ')' >> $output - delfiles="$delfiles $output" + echo ')' >> $output + func_append delfiles " $output" + func_to_tool_file "$output" + output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" @@ -7170,10 +8348,12 @@ fi for obj do - $ECHO "$obj" >> $output + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" >> $output done - delfiles="$delfiles $output" - output=$firstobj\"$file_list_spec$output\" + func_append delfiles " $output" + func_to_tool_file "$output" + output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." @@ -7197,17 +8377,19 @@ # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" + reload_objs=$objlist + eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext - objlist=$obj + objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result @@ -7217,11 +8399,12 @@ # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" + reload_objs="$objlist $last_robj" + eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi - delfiles="$delfiles $output" + func_append delfiles " $output" else output= @@ -7255,7 +8438,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7276,7 +8459,7 @@ if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" - $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"' + $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then @@ -7288,7 +8471,7 @@ # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter - delfiles="$delfiles $export_symbols $output_objdir/$libname.filter" + func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi @@ -7329,10 +8512,10 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - libobjs="$libobjs $func_extract_archives_result" + func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi @@ -7348,7 +8531,7 @@ lt_exit=$? # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) @@ -7360,7 +8543,7 @@ IFS="$save_ifs" # Restore the uninstalled library and exit - if test "$mode" = relink; then + if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then @@ -7441,18 +8624,21 @@ if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` + reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi + # If we're not building shared, we need to use non_pic_objs + test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" + # Create the old-style object. - reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test + reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' @@ -7512,8 +8698,8 @@ case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac @@ -7524,14 +8710,14 @@ if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" + func_append compile_command " ${wl}-bind_at_load" + func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" - compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` - finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'` + compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` + finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac @@ -7545,7 +8731,7 @@ *) case " $compile_deplibs " in *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; + func_append new_libs " -L$path/$objdir" ;; esac ;; esac @@ -7555,17 +8741,17 @@ -L*) case " $new_libs " in *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac ;; - *) new_libs="$new_libs $deplib" ;; + *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" + func_append compile_command " $compile_deplibs" + func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. @@ -7573,7 +8759,7 @@ # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; + *) func_append finalize_rpath " $libdir" ;; esac done fi @@ -7592,18 +8778,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; + *) func_append perm_rpath " $libdir" ;; esac fi case $host in @@ -7612,12 +8798,12 @@ case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; - *) dllsearchpath="$dllsearchpath:$libdir";; + *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; - *) dllsearchpath="$dllsearchpath:$testbindir";; + *) func_append dllsearchpath ":$testbindir";; esac ;; esac @@ -7643,18 +8829,18 @@ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" + func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" + func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; + *) func_append finalize_perm_rpath " $libdir" ;; esac fi done @@ -7668,8 +8854,8 @@ if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. - compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` + compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` + finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" @@ -7681,15 +8867,15 @@ wrappers_required=yes case $host in + *cegcc* | *mingw32ce*) + # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. + wrappers_required=no + ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; - *cegcc) - # Disable wrappers for cegcc, we are cross compiling anyway. - wrappers_required=no - ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no @@ -7698,13 +8884,19 @@ esac if test "$wrappers_required" = no; then # Replace the output file specification. - compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' @@ -7727,7 +8919,7 @@ # We should set the runpath_var. rpath= for dir in $perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7735,7 +8927,7 @@ # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" + func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi @@ -7745,11 +8937,18 @@ # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' + + if test -n "$postlink_cmds"; then + func_to_tool_file "$output" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + exit $EXIT_SUCCESS fi @@ -7764,7 +8963,7 @@ if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then - relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` + relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= @@ -7776,13 +8975,19 @@ fi # Replace the output file specification. - link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` + link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' + if test -n "$postlink_cmds"; then + func_to_tool_file "$output_objdir/$outputname" + postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` + func_execute_cmds "$postlink_cmds" 'exit $?' + fi + # Now create the wrapper script. func_verbose "creating $output" @@ -7800,18 +9005,7 @@ fi done relink_command="(cd `pwd`; $relink_command)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $ECHO for shipping. - if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. @@ -7891,7 +9085,7 @@ else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then - oldobjs="$oldobjs $symfileobj" + func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" @@ -7899,10 +9093,10 @@ if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. @@ -7913,10 +9107,10 @@ # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_extract_archives $gentop $dlprefiles - oldobjs="$oldobjs $func_extract_archives_result" + func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have @@ -7932,9 +9126,9 @@ done | sort | sort -uc >/dev/null 2>&1); then : else - $ECHO "copying selected object files to avoid basename conflicts..." + echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" + func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= @@ -7958,9 +9152,9 @@ esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" + func_append oldobjs " $gentop/$newobj" ;; - *) oldobjs="$oldobjs $obj" ;; + *) func_append oldobjs " $obj" ;; esac done fi @@ -7970,6 +9164,16 @@ len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds + elif test -n "$archiver_list_spec"; then + func_verbose "using command file archive linking..." + for obj in $oldobjs + do + func_to_tool_file "$obj" + $ECHO "$func_to_tool_file_result" + done > $output_objdir/$libname.libcmd + func_to_tool_file "$output_objdir/$libname.libcmd" + oldobjs=" $archiver_list_spec$func_to_tool_file_result" + cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." @@ -8043,7 +9247,7 @@ done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"` + relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi @@ -8066,9 +9270,19 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" - newdependency_libs="$newdependency_libs $libdir/$name" + func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" + ;; + -L*) + func_stripname -L '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -L$func_replace_sysroot_result" ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; + -R*) + func_stripname -R '' "$deplib" + func_replace_sysroot "$func_stripname_result" + func_append newdependency_libs " -R$func_replace_sysroot_result" + ;; + *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" @@ -8082,9 +9296,9 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlfiles="$newdlfiles $libdir/$name" + func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; - *) newdlfiles="$newdlfiles $lib" ;; + *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" @@ -8101,7 +9315,7 @@ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" - newdlprefiles="$newdlprefiles $libdir/$name" + func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done @@ -8113,7 +9327,7 @@ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlfiles="$newdlfiles $abs" + func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= @@ -8122,15 +9336,33 @@ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac - newdlprefiles="$newdlprefiles $abs" + func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin + # In fact, it would be nice if we could use this code for all target + # systems that can't hard-code library paths into their executables + # and that have no shared library path variable independent of PATH, + # but it turns out we can't easily determine that from inspecting + # libtool variables, so we have to hard-code the OSs to which it + # applies here; at the moment, that means platforms that use the PE + # object format with DLL files. See the long comment at the top of + # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; + *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) + # If a -bindir argument was supplied, place the dll there. + if test "x$bindir" != x ; + then + func_relative_path "$install_libdir" "$bindir" + tdlname=$func_relative_path_result$dlname + else + # Otherwise fall back on heuristic. + tdlname=../bin/$dlname + fi + ;; esac $ECHO > $output "\ # $outputname - a libtool library file @@ -8189,7 +9421,7 @@ exit $EXIT_SUCCESS } -{ test "$mode" = link || test "$mode" = relink; } && +{ test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} @@ -8209,9 +9441,9 @@ for arg do case $arg in - -f) RM="$RM $arg"; rmforce=yes ;; - -*) RM="$RM $arg" ;; - *) files="$files $arg" ;; + -f) func_append RM " $arg"; rmforce=yes ;; + -*) func_append RM " $arg" ;; + *) func_append files " $arg" ;; esac done @@ -8220,24 +9452,23 @@ rmdirs= - origobjdir="$objdir" for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then - objdir="$origobjdir" + odir="$objdir" else - objdir="$dir/$origobjdir" + odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" - test "$mode" = uninstall && objdir="$dir" + test "$opt_mode" = uninstall && odir="$dir" - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then + # Remember odir for removal later, being careful to avoid duplicates + if test "$opt_mode" = clean; then case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; + *" $odir "*) ;; + *) func_append rmdirs " $odir" ;; esac fi @@ -8263,18 +9494,17 @@ # Delete the libtool libraries and symlinks. for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" + func_append rmfiles " $odir/$n" done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" + test -n "$old_library" && func_append rmfiles " $odir/$old_library" - case "$mode" in + case "$opt_mode" in clean) - case " $library_names " in - # " " in the beginning catches empty $dlname + case " $library_names " in *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; + *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" + test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then @@ -8302,19 +9532,19 @@ # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" + func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" + func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) - if test "$mode" = clean ; then + if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) @@ -8324,7 +9554,7 @@ noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe - rmfiles="$rmfiles $file" + func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. @@ -8333,7 +9563,7 @@ func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result - rmfiles="$rmfiles $func_ltwrapper_scriptname_result" + func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename @@ -8341,12 +9571,12 @@ # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" + func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" + func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" + func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi @@ -8354,7 +9584,6 @@ esac func_show_eval "$RM $rmfiles" 'exit_status=1' done - objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do @@ -8366,16 +9595,16 @@ exit $exit_status } -{ test "$mode" = uninstall || test "$mode" = clean; } && +{ test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} -test -z "$mode" && { +test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ - func_fatal_help "invalid operation mode \`$mode'" + func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" diff -Nru gmp-4.3.2+dfsg/macos/configure gmp-5.0.2+dfsg/macos/configure --- gmp-4.3.2+dfsg/macos/configure 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/macos/configure 1970-01-01 00:00:00.000000000 +0000 @@ -1,519 +0,0 @@ -#!/usr/bin/perl - -# This is a simple configure script for MacOS and MPW. -# Note that this script can't be run directly from MPW perl -# because it has the wrong end-of-line characters. See README. - -# Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. -# -# This file is part of the GNU MP Library. -# -# The GNU MP Library is free software; you can redistribute it and/or modify -# it under the terms of the GNU Lesser General Public License as published by -# the Free Software Foundation; either version 3 of the License, or (at your -# option) any later version. -# -# The GNU MP Library is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -# License for more details. -# -# You should have received a copy of the GNU Lesser General Public License -# along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -# ***************************** NOTE ************************************** -# This script tries to figure out things about this release but has a hard -# time doing it. It reads some lines in "configure", "Makefile.am" and -# "mp*/Makefile.am" and try to guess things. With every new release -# this script has to be tested. -# ***************************** NOTE ************************************** - -use strict; - -########################################################################### -# -# Platform dependent -# -########################################################################### - -$/ = "\012" # Input files use Unix end-of-line chars - if $^O eq 'MacOS'; - -########################################################################### -# -# Constants -# -########################################################################### - -# Directories to create - -my @dirs = - ( - 'MpfObj', - 'MpnObj', - 'MpqObj', - 'MpzObj', - 'PrintfObj', - 'ScanfObj', - 'CmnObj', - 'AsmObj', - 'Asm', - 'MpfBin', - 'MpqBin', - 'MpzBin', - ); - -my $cfg; # Will point to %cfg_apple or %cfg_cw - -my %cfg_apple = - ( - 'cc' => 'MrC', - 'coptions' => ['-ansi on -i : -i :: -i ::mpn:powerpc32 -i ::mpz', - '-opt speed -inline on'], - 'link' => 'PPCLink', - 'linkoptions' => '-sym on -xm library', - 'tooloptions' => "-t 'MPST' -c 'MPS'", - 'asm' => 'PPCAsm', - 'aoptions' => '-sym on', - 'syslibs' => [ - '"{SharedLibraries}"StdCLib', - '"{SharedLibraries}"InterfaceLib', - '"{SharedLibraries}"MathLib', - '"{PPCLibraries}"StdCRuntime.o', - '"{PPCLibraries}"PPCCRuntime.o', - ], - ); - -my %cfg_cw = - ( - 'cc' => 'MWCPPC', - 'coptions' => [ - '-opt all -w nounusedvar,noextended', - '-i :: -i ::mpn:powerpc32 -i ::mpz', - '-sym full', - ], - 'link' => 'MWLinkPPC', - 'linkoptions' => '-sym fullpath -library', - 'tooloptions' => '-mpwtool', - 'asm' => 'PPCAsm', - 'aoptions' => '-sym on', - 'syslibs' => [ - '"{SharedLibraries}"InterfaceLib', - '"{MWPPCLibraries}MSL MPWCRuntime.Lib"', - '"{MWPPCLibraries}MSL C.PPC MPW(NL).Lib"', - '"{SharedLibraries}"MathLib', - ], - ); - -# We only set the variables that have a value -my %vars = - ( - 'BITS_PER_MP_LIMB' => 32, - 'HAVE_HOST_CPU_FAMILY_power' => 0, - 'HAVE_HOST_CPU_FAMILY_powerpc' => 1, - 'GMP_NAIL_BITS' => 0, - 'DEFN_LONG_LONG_LIMB' => '', - 'LIBGMP_DLL' => 0, - ); - -my $make_in = 'Makefile.in'; -my $make = 'Makefile'; -my $configure = mf("../configure"); -my $configure_in = mf("../configure.in"); -my $config_in = mf("../config.in"); -my $gmp_h = mf('../gmp.h'); -my $gmp_h_in = mf('../gmp-h.in'); -my $mpn_asm_dir = "../mpn/powerpc32"; -my $mpn_gen_dir = "../mpn/generic"; -my $config_h = 'config.h'; - -my $asm_start = "\ttoc"; # No dot, like ".dot"? - -########################################################################### -# -# Read command line -# -########################################################################### - -$cfg = \%cfg_apple; # Default - -if (@ARGV and $ARGV[0] =~ /^cw|co/) { - $cfg = \%cfg_cw; - $make .= '.cw'; -} - -########################################################################### -# -# Parse top configure file for mpn files -# -########################################################################### - -my ($files,$optional,$package,$version) = parse_top_configure($configure); -my %mpn_objects = map {$_ => 1} (@$files,@$optional); -my %mpn_optional = map {$_ => 1} @$optional; - -########################################################################### -# -# Create config.h from ../config.in -# -########################################################################### - -my @asm_files; - -open(CONFIG_IN, $config_in) - or die "Can't open \"$config_in\"\n"; -open(CONFIG_H, ">$config_h") - or die "Can't create \"$config_h\"\n"; - -while () { - chomp; - - if (/^\s*#\s*undef\s+HAVE_NATIVE_mpn_(\w+)/ and - -r mf("$mpn_asm_dir/$1.asm")) { - - if (defined delete $mpn_objects{$1}) { - push(@asm_files, $1); - print CONFIG_H "\#define HAVE_NATIVE_mpn_$1 1\n"; - } else { - print STDERR "Warning: Found asm file \"$1\" but no corresponding C file - ignoring\n"; - } - - } elsif (/^\s*#\s*undef\s+inline\b/) { - print CONFIG_H "\#define inline\n"; - } elsif (/^\s*#\s*undef\s+HAVE_STDARG\b/) { - print CONFIG_H "\#define HAVE_STDARG 1\n"; - } elsif (/^\s*#\s*undef\s+HAVE_STRCHR\b/) { - print CONFIG_H "\#define HAVE_STRCHR 1\n"; - } elsif (/^\s*#\s*undef\s+HAVE_HOST_CPU_FAMILY_powerpc\b/) { - print CONFIG_H "\#define HAVE_HOST_CPU_FAMILY_powerpc 1\n"; - } elsif (/^\s*#\s*undef\s+WANT_TMP_NOTREENTRANT\b/) { - print CONFIG_H "\#define WANT_TMP_NOTREENTRANT 1\n"; - } elsif (/^\s*#\s*undef\s+PACKAGE\b/) { - print CONFIG_H "\#define PACKAGE \"$package\"\n"; - } elsif (/^\s*#\s*undef\s+VERSION\b/) { - print CONFIG_H "\#define VERSION \"$version\"\n"; - } elsif (/^\s*#\s*undef\s+STDC_HEADERS\b/) { - print CONFIG_H "\#define STDC_HEADERS 1\n"; - } else { # Blank line, leave it - print CONFIG_H "$_\n"; - } -} - -close CONFIG_H; -close CONFIG_IN; - -########################################################################### -# -# Create gmp.h from ../gmp-h.in -# -########################################################################### - -open(GMP_H_IN, $gmp_h_in) - or die "Can't open \"$gmp_h_in\"\n"; -open(GMP_H, ">$gmp_h") - or die "Can't create \"$gmp_h\"\n"; - -while () { - chomp; # Remove whatever ending it was - - # Do the variable substitution - - s/\@([^\@]+)\@/exists $vars{$1} ? $vars{$1} : ''/ge; - - print GMP_H "$_\n"; -} - -close GMP_H; -close GMP_H_IN; - -########################################################################### -# -# Create directories -# -########################################################################### - -foreach (@dirs) { - -d $_ or mkdir $_, 0775 - or die "Can't create directory \"$_\"\n"; -} - -########################################################################### -# -# Parse the *.asm files found and convert them to MPW format -# -########################################################################### - -my $file; - -foreach $file (@asm_files) { - my $ifile = mf("$mpn_asm_dir/$file.asm"); - my $ofile = mf("Asm/$file.s"); - my $func; - my %defs = (); - - open(ASM, $ifile) - or die "Can't read file \"$ifile\"\n"; - open(NEW, ">$ofile") - or die "Can't create file \"$ofile\"\n"; - - while () { - chomp; # Remove whatever ending it was - - s/\bdnl\b/;/ or s/\bC\b/;/; # Use ; comments - - s/include\s*\(.*?\)//; # Don't use include macro - - s/ASM_START\s*\(.*?\)/$asm_start/; - - if (s/PROLOGUE\s*\(\s*(.*?)\s*\)/asm_prologue($1)/e) { - $func = $1; - } - - s/EPILOGUE\s*\(\s*(.*?)\s*\)/asm_epilogue($func)/e; - - s/L\(([^)]*)\)/L$1/g; # L() style labels - - # register name defines - if (/\bdefine\(`?([a-zA-Z0-9]+)'?,`?([^')]*)\'?\)/) { - $defs{$1} = $2; - $_ = "\n"; - } - foreach my $i (keys %defs) { - s/\b\Q$i\E\b/$defs{$i}/g; - } - - s/\n/\x0D/g; - print NEW "$_\x0D"; # Use MacOS end-of-line character - } - - close ASM; - close NEW; -} - - -########################################################################### -# -# Parse the Makefile.in and produce the Makefile -# -########################################################################### - -# Check if we have optional left in C directory - -foreach (keys %mpn_objects) { - delete $mpn_objects{$_} - if $mpn_optional{$_} and !-r mf("$mpn_gen_dir/$_.c"); -} - -my $mpn_objects = join(' ', map {"{MpnObjDir}$_.o"} sort keys %mpn_objects); -$mpn_objects =~ s/(.{1,66})\s/$1 \xB6\x0D\t/g; - -my @asm_objects = @asm_files; -my @asm_sources = @asm_files; - -# Adjust configuration - -foreach (keys %{$cfg}) { - $$cfg{$_} = join(" \xB6\x0D\t\t", @{$$cfg{$_}}) - if ref $$cfg{$_}; -} - -my %config = - ( - 'version' => $version, - 'package' => $package, - 'c' => "\xB6", - 'dep' => "\xC4", - 'wildcard'=> "\xC5", - 'asm_objects' => - join(" \xB6\x0D\t",map {$_ = "{AsmObjDir}$_.o"} sort @asm_objects), - 'asm_sources' => - join(" \xB6\x0D\t",map {$_ = "{AsmSrcDir}$_.s"} sort @asm_sources), - 'mpn_objects' => $mpn_objects, - 'mpz_objects' => what_objects("mpz","../mpz","{MpzObjDir}"), - 'mpf_objects' => what_objects("mpf","../mpf","{MpfObjDir}"), - 'mpq_objects' => what_objects("mpq","../mpq","{MpqObjDir}"), - 'printf_objects' => what_objects("printf","../printf","{PrintfObjDir}"), - 'scanf_objects' => what_objects("scanf","../scanf","{ScanfObjDir}"), - 'gmp_objects' => what_objects("gmp","..", "{CmnObjDir}"), - %{$cfg}, - ); - - -open(IN, $make_in) - or die "Can't read file \"$make_in\"\n"; -open(OUT, ">$make") - or die "Can't create file \"$make\"\n"; - -while () { - chomp; # Remove whatever ending it was - - # Do the variable substitution - - s/\@([^\@]+)\@/exists $config{$1} ? $config{$1} : ''/ge; - - print OUT "$_\x0D"; # Use MacOS end-of-line character -} - -close IN; -close OUT; - -########################################################################### -# -# Parse the configure.in file to find the mpn files to compile and link -# Find package name and version -# -########################################################################### - -sub parse_top_configure { - my $cfg = shift; - - open(CONFIGURE, $cfg) - or die "Can't open \"$cfg\"\n"; - my $old_eol = $/; - undef $/; - my $text = ; - $/ = $old_eol; - close CONFIGURE; - - my ($package) = $text =~ /(?:\n|\r)PACKAGE_NAME\s*=\s*(\S+)/; - my ($version) = $text =~ /(?:\n|\r)PACKAGE_VERSION\s*=\s*(\S+)/; - - my $files = join(' ',$text =~ /(?:\n|\r)gmp_mpn_functions\s*=\s*\"([^\"]+)/); - $files =~ s/\\/ /g; - $files =~ s/\$\{?\w*\}?//g; - my @files = sort split(' ',$files); - - $files = join(' ',$text =~ /(?:\n|\r)gmp_mpn_functions_optional\s*=\s*\"([^\"]+)/); - $files =~ s/\\/ /g; - $files =~ s/\$\{?\w*\}?//g; - my @optional = sort split(' ',$files); - - @files > 30 or die "Can't find mpn files in \"$cfg\"\n"; - defined $package or die "Can't find package name in \"$cfg\"\n"; - defined $version or die "Can't find version name in \"$cfg\"\n"; - return (\@files,\@optional,$package,$version); -} - -########################################################################### -# -# Find the C files for mpz, mpf ..... -# -########################################################################### - -sub what_objects { - my $part = shift; - my $srcdir = shift; - my $dstdir = shift; - - my $makefile_am = mf("$srcdir/Makefile.am"); - - # We look in the Makefile.am file - open(MAKEFILE_AM, $makefile_am) - or die "Can't open file \"$makefile_am\"\n"; - - # I had as short version of this using more advanced - # regular expressions on the whole file content but - # MacPerl freezes my Mac every time..... :-( - - my $line; - my $text = ''; - - while (defined($line = ) ) { - chomp $line; - - if ($line =~ s/^lib${part}_la_SOURCES\s*=//) { - do { - chomp $line; - if ($line =~ s/\\\s*$//) { - $text .= " $line"; - } else { - $text .= " $line"; - next; - } - } while (defined($line = )); - } - - if ($line =~ s/^nodist_lib${part}_la_SOURCES\s*=//) { - do { - chomp $line; - if ($line =~ s/\\\s*$//) { - $text .= " $line"; - } else { - $text .= " $line"; - last; - } - } while (defined($line = )); - } - } - close MAKEFILE_AM; - - my @ofiles = split(' ',$text); - @ofiles > 8 or die "Can't find $part files in \"$makefile_am\"\n"; - my $ofiles = join(' ', map {/^(.+)\.c$/ and $_ = "$dstdir$1.o"} @ofiles); - $ofiles =~ s/(.{1,66})\s/$1 \xB6\x0D\t/g; - - return $ofiles; -} - -########################################################################### -# -# Assembler -# -########################################################################### - -sub asm_epilogue { - my $func = shift; - return "\tcsect .__g$func\[pr]"; -} - -sub asm_prologue { - my $func = shift; - - my $asm = < configure.mac - % perl configure.mac - -Then run "Make" - - % make - -This will not execute the commands. It is like "make -n" on Unix, it -will display the commands to execute. You select the commands and -hit "enter" to actually execute the commands. - -To test the code you execute the output from - - % make check - -If there is an error the test program will complain. Note that the -test programs can contain errors so a test failure doesn't always -mean that the library is broken. - -To cleanup to the state before configure you execute the output from - - % make clean - -To remove the resulting library as well you do - - % make distclean - - - -PROBLEMS -======== - -Bug reports can be sent to bug-gmp@gnu.org. Unfortunately the -developers don't use this port and can offer only very general help. -Reports including any fixes or updates necessary would be welcomed. - -There may be problems if the program you use for unpacking the source -use automatic conversion of end-of-line characters. - -This port may be out of sync with minor GMP releases or patches. -The MacOS build is very different from the Unix build process and -for some changes in the Unix build the build process for MacOS has -to be changed manually. - -The library uses stream I/O operations for some of the GMP functions -and maybe for some error messages. This means that to link this -library to form a normal Mac application you may get link problems, -i.e. a Mac normally has no console/shell to write to. - -If you are unfamiliar with MPW note that the "return" key and the -"enter" key mean different things to MPW. The first just add a line -break, the second send the line your pointer is at or the selection -you have to the MPW command interpreter. - -If you mount the GMP source from a Unix netatalk server don't move or -remove files from the Unix side while MPW is running. MPW cache -information about what the file system looks like and gets very -confused or crash. - -Kent Boortz diff -Nru gmp-4.3.2+dfsg/macos/unix2mac gmp-5.0.2+dfsg/macos/unix2mac --- gmp-4.3.2+dfsg/macos/unix2mac 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/macos/unix2mac 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -$/="\r"; while(<>) {chomp; print "$_\n";}; diff -Nru gmp-4.3.2+dfsg/Makefile.am gmp-5.0.2+dfsg/Makefile.am --- gmp-4.3.2+dfsg/Makefile.am 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -65,6 +65,9 @@ # 4.3.0 8:0:5 5:0:1 4:14:1 # 4.3.1 8:1:5 5:1:1 4:15:1 WRONG Really used same as 4.3.0 # 4.3.2 8:2:5 5:2:1 4:16:1 +# 5.0.0 9:0:6 6:0:2 4:20:1 Should have been 10:0:0 +# 5.0.1 10:1:0 6:1:2 4:21:1 +# 5.0.2 10:2:0 6:2:2 4:22:1 # # Starting at 3:0:0 is a slight abuse of the versioning system, but it # ensures we're past soname libgmp.so.2, which was used on Debian GNU/Linux @@ -77,22 +80,22 @@ # it's still good to get the shared library filename (like # libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from. -LIBGMP_LT_CURRENT = 8 +LIBGMP_LT_CURRENT = 10 LIBGMP_LT_REVISION = 2 -LIBGMP_LT_AGE = 5 +LIBGMP_LT_AGE = 0 -LIBGMPXX_LT_CURRENT = 5 +LIBGMPXX_LT_CURRENT = 6 LIBGMPXX_LT_REVISION = 2 -LIBGMPXX_LT_AGE = 1 +LIBGMPXX_LT_AGE = 2 LIBMP_LT_CURRENT = 4 -LIBMP_LT_REVISION = 16 +LIBMP_LT_REVISION = 22 LIBMP_LT_AGE = 1 SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc -EXTRA_DIST = macos configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf +EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf if WANT_CXX GMPXX_HEADERS_OPTION = gmpxx.h @@ -105,7 +108,7 @@ # # $exec_prefix/include is not in the default include path for gcc built to # the same $prefix and $exec_prefix, which might mean gmp.h is not found, -# but anyone knowledgable enough to be playing with exec_prefix will be able +# but anyone knowledgeable enough to be playing with exec_prefix will be able # to address that. # includeexecdir = $(exec_prefix)/include @@ -121,14 +124,14 @@ INCLUDES=-D__GMP_WITHIN_GMP -MPF_OBJECTS = mpf/init$U.lo mpf/init2$U.lo mpf/set$U.lo mpf/set_ui$U.lo \ - mpf/set_si$U.lo mpf/set_str$U.lo mpf/set_d$U.lo mpf/set_z$U.lo \ - mpf/iset$U.lo mpf/iset_ui$U.lo mpf/iset_si$U.lo mpf/iset_str$U.lo \ - mpf/iset_d$U.lo mpf/clear$U.lo mpf/get_str$U.lo mpf/dump$U.lo \ - mpf/size$U.lo mpf/eq$U.lo mpf/reldiff$U.lo mpf/sqrt$U.lo mpf/random2$U.lo \ - mpf/inp_str$U.lo mpf/out_str$U.lo mpf/add$U.lo mpf/add_ui$U.lo \ - mpf/sub$U.lo mpf/sub_ui$U.lo mpf/ui_sub$U.lo mpf/mul$U.lo mpf/mul_ui$U.lo \ - mpf/div$U.lo mpf/div_ui$U.lo \ +MPF_OBJECTS = mpf/init$U.lo mpf/init2$U.lo mpf/inits$U.lo mpf/set$U.lo \ + mpf/set_ui$U.lo mpf/set_si$U.lo mpf/set_str$U.lo mpf/set_d$U.lo \ + mpf/set_z$U.lo mpf/iset$U.lo mpf/iset_ui$U.lo mpf/iset_si$U.lo \ + mpf/iset_str$U.lo mpf/iset_d$U.lo mpf/clear$U.lo mpf/clears$U.lo \ + mpf/get_str$U.lo mpf/dump$U.lo mpf/size$U.lo mpf/eq$U.lo mpf/reldiff$U.lo \ + mpf/sqrt$U.lo mpf/random2$U.lo mpf/inp_str$U.lo mpf/out_str$U.lo \ + mpf/add$U.lo mpf/add_ui$U.lo mpf/sub$U.lo mpf/sub_ui$U.lo mpf/ui_sub$U.lo \ + mpf/mul$U.lo mpf/mul_ui$U.lo mpf/div$U.lo mpf/div_ui$U.lo \ mpf/cmp$U.lo mpf/cmp_d$U.lo mpf/cmp_ui$U.lo mpf/cmp_si$U.lo \ mpf/mul_2exp$U.lo mpf/div_2exp$U.lo mpf/abs$U.lo mpf/neg$U.lo \ mpf/set_q$U.lo mpf/get_d$U.lo mpf/get_d_2exp$U.lo mpf/set_dfl_prec$U.lo \ @@ -148,7 +151,7 @@ mpz/cdiv_qr$U.lo mpz/cdiv_qr_ui$U.lo \ mpz/cdiv_r$U.lo mpz/cdiv_r_ui$U.lo mpz/cdiv_ui$U.lo \ mpz/cfdiv_q_2exp$U.lo mpz/cfdiv_r_2exp$U.lo \ - mpz/clear$U.lo mpz/clrbit$U.lo \ + mpz/clear$U.lo mpz/clears$U.lo mpz/clrbit$U.lo \ mpz/cmp$U.lo mpz/cmp_d$U.lo mpz/cmp_si$U.lo mpz/cmp_ui$U.lo \ mpz/cmpabs$U.lo mpz/cmpabs_d$U.lo mpz/cmpabs_ui$U.lo \ mpz/com$U.lo mpz/combit$U.lo \ @@ -164,8 +167,8 @@ mpz/gcd_ui$U.lo mpz/gcdext$U.lo mpz/get_d$U.lo mpz/get_d_2exp$U.lo \ mpz/get_si$U.lo mpz/get_str$U.lo mpz/get_ui$U.lo mpz/getlimbn$U.lo \ mpz/hamdist$U.lo \ - mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inp_raw$U.lo \ - mpz/inp_str$U.lo mpz/invert$U.lo \ + mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inits$U.lo \ + mpz/inp_raw$U.lo mpz/inp_str$U.lo mpz/invert$U.lo \ mpz/ior$U.lo mpz/iset$U.lo mpz/iset_d$U.lo mpz/iset_si$U.lo \ mpz/iset_str$U.lo mpz/iset_ui$U.lo mpz/jacobi$U.lo mpz/kronsz$U.lo \ mpz/kronuz$U.lo mpz/kronzs$U.lo mpz/kronzu$U.lo \ @@ -174,8 +177,8 @@ mpz/mul_si$U.lo mpz/mul_ui$U.lo \ mpz/n_pow_ui$U.lo mpz/neg$U.lo mpz/nextprime$U.lo \ mpz/out_raw$U.lo mpz/out_str$U.lo mpz/perfpow$U.lo mpz/perfsqr$U.lo \ - mpz/popcount$U.lo mpz/pow_ui$U.lo mpz/powm$U.lo mpz/powm_ui$U.lo \ - mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo \ + mpz/popcount$U.lo mpz/pow_ui$U.lo mpz/powm$U.lo mpz/powm_sec$U.lo \ + mpz/powm_ui$U.lo mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo \ mpz/realloc$U.lo mpz/realloc2$U.lo mpz/remove$U.lo \ mpz/root$U.lo mpz/rootrem$U.lo mpz/rrandomb$U.lo mpz/scan0$U.lo \ mpz/scan1$U.lo mpz/set$U.lo mpz/set_d$U.lo mpz/set_f$U.lo \ @@ -190,10 +193,10 @@ mpz/urandomm$U.lo mpz/xor$U.lo MPQ_OBJECTS = mpq/abs$U.lo mpq/aors$U.lo \ - mpq/canonicalize$U.lo mpq/clear$U.lo \ + mpq/canonicalize$U.lo mpq/clear$U.lo mpq/clears$U.lo \ mpq/cmp$U.lo mpq/cmp_si$U.lo mpq/cmp_ui$U.lo mpq/div$U.lo \ mpq/get_d$U.lo mpq/get_den$U.lo mpq/get_num$U.lo mpq/get_str$U.lo \ - mpq/init$U.lo mpq/inp_str$U.lo mpq/inv$U.lo \ + mpq/init$U.lo mpq/inits$U.lo mpq/inp_str$U.lo mpq/inv$U.lo \ mpq/md_2exp$U.lo mpq/mul$U.lo mpq/neg$U.lo mpq/out_str$U.lo \ mpq/set$U.lo mpq/set_den$U.lo mpq/set_num$U.lo \ mpq/set_si$U.lo mpq/set_str$U.lo mpq/set_ui$U.lo \ @@ -250,7 +253,8 @@ assert.c compat.c errno.c extract-dbl.c invalid.c memory.c \ mp_bpl.c mp_clz_tab.c mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c \ rand.c randclr.c randdef.c randiset.c randlc2s.c randlc2x.c randmt.c \ - randmts.c rands.c randsd.c randsdui.c randbui.c randmui.c version.c + randmts.c rands.c randsd.c randsdui.c randbui.c randmui.c version.c \ + nextprime.c EXTRA_libgmp_la_SOURCES = tal-debug.c tal-notreent.c tal-reent.c libgmp_la_DEPENDENCIES = @TAL_OBJECT@ \ $(MPF_OBJECTS) $(MPZ_OBJECTS) $(MPQ_OBJECTS) \ @@ -285,7 +289,7 @@ endif BUILT_SOURCES += mp.h libmp_la_SOURCES = assert.c errno.c memory.c mp_bpl.c mp_clz_tab.c \ - mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c + mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c nextprime.c libmp_la_DEPENDENCIES = $(srcdir)/libmp.sym \ @TAL_OBJECT@ $(MPBSD_OBJECTS) $(MPN_OBJECTS) @mpn_objs_in_libmp@ \ mpz/add$U.lo mpz/gcdext$U.lo mpz/invert$U.lo mpz/mul$U.lo \ @@ -337,7 +341,7 @@ EXTRA_DIST += dumbmp.c mpz/fac_ui.h: gen-fac_ui$(EXEEXT_FOR_BUILD) - ./gen-fac_ui $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1) + ./gen-fac_ui $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1) BUILT_SOURCES += mpz/fac_ui.h gen-fac_ui$(EXEEXT_FOR_BUILD): gen-fac_ui$(U_FOR_BUILD).c dumbmp.c @@ -350,11 +354,11 @@ fib_table.h: gen-fib$(EXEEXT_FOR_BUILD) - ./gen-fib header $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >fib_table.h || (rm -f fib_table.h; exit 1) + ./gen-fib header $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >fib_table.h || (rm -f fib_table.h; exit 1) BUILT_SOURCES += fib_table.h mpn/fib_table.c: gen-fib$(EXEEXT_FOR_BUILD) - ./gen-fib table $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1) + ./gen-fib table $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1) BUILT_SOURCES += mpn/fib_table.c gen-fib$(EXEEXT_FOR_BUILD): gen-fib$(U_FOR_BUILD).c dumbmp.c @@ -367,11 +371,11 @@ mp_bases.h: gen-bases$(EXEEXT_FOR_BUILD) - ./gen-bases header $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mp_bases.h || (rm -f mp_bases.h; exit 1) + ./gen-bases header $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mp_bases.h || (rm -f mp_bases.h; exit 1) BUILT_SOURCES += mp_bases.h mpn/mp_bases.c: gen-bases$(EXEEXT_FOR_BUILD) - ./gen-bases table $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1) + ./gen-bases table $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1) BUILT_SOURCES += mpn/mp_bases.c gen-bases$(EXEEXT_FOR_BUILD): gen-bases$(U_FOR_BUILD).c dumbmp.c @@ -383,8 +387,24 @@ $(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-bases.c; then echo $(srcdir)/gen-bases.c; else echo gen-bases.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-bases_.c || rm -f gen-bases_.c + +trialdivtab.h: gen-trialdivtab$(EXEEXT_FOR_BUILD) + ./gen-trialdivtab $(GMP_LIMB_BITS) 8000 >trialdivtab.h || (rm -f trialdivtab.h; exit 1) +BUILT_SOURCES += trialdivtab.h + +gen-trialdivtab$(EXEEXT_FOR_BUILD): gen-trialdivtab$(U_FOR_BUILD).c dumbmp.c + $(CC_FOR_BUILD) `test -f 'gen-trialdivtab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-trialdivtab$(U_FOR_BUILD).c -o gen-trialdivtab$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) +DISTCLEANFILES += gen-trialdivtab$(EXEEXT_FOR_BUILD) +EXTRA_DIST += gen-trialdivtab.c + +gen-trialdivtab_.c: gen-trialdivtab.c $(ANSI2KNR) + $(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-trialdivtab.c; then echo $(srcdir)/gen-trialdivtab.c; else echo gen-trialdivtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-trialdivtab_.c || rm -f gen-trialdivtab_.c + + + + mpn/perfsqr.h: gen-psqr$(EXEEXT_FOR_BUILD) - ./gen-psqr $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpn/perfsqr.h || (rm -f mpn/perfsqr.h; exit 1) + ./gen-psqr $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/perfsqr.h || (rm -f mpn/perfsqr.h; exit 1) BUILT_SOURCES += mpn/perfsqr.h gen-psqr$(EXEEXT_FOR_BUILD): gen-psqr$(U_FOR_BUILD).c dumbmp.c @@ -406,6 +426,6 @@ dist-hook: -find $(distdir) \( -name CVS -type d \) -o -name "*~" -o -name ".#*" \ | xargs rm -rf - grep -F $(VERSION) $(srcdir)/Makefile.am \ - | grep -q "^# *$(VERSION) *$(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) *$(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE) *$(LIBMP_LT_CURRENT):$(LIBMP_LT_REVISION):$(LIBMP_LT_AGE)" - test -z "`sed -n 's/^# *[0-9]*\.[0-9]*\.[0-9]* *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\).*/A\1\nB\2\nC\3/p' $(srcdir)/Makefile.am | grep -v 'A6:3:3\|B3:5:0\|C4:7:1' | sort | uniq -d`" +# grep -F $(VERSION) $(srcdir)/Makefile.am \ +# | grep -q "^# *$(VERSION) *$(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) *$(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE) *$(LIBMP_LT_CURRENT):$(LIBMP_LT_REVISION):$(LIBMP_LT_AGE)" +# test -z "`sed -n 's/^# *[0-9]*\.[0-9]*\.[0-9]* *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\).*/A\1\nB\2\nC\3/p' $(srcdir)/Makefile.am | grep -v 'A6:3:3\|B3:5:0\|C4:7:1' | sort | uniq -d`" diff -Nru gmp-4.3.2+dfsg/Makefile.in gmp-5.0.2+dfsg/Makefile.in --- gmp-4.3.2+dfsg/Makefile.in 2010-01-09 06:26:23.000000000 +0000 +++ gmp-5.0.2+dfsg/Makefile.in 2011-08-30 01:19:41.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -104,7 +104,7 @@ mp_get_fns$U.lo mp_set_fns$U.lo rand$U.lo randclr$U.lo \ randdef$U.lo randiset$U.lo randlc2s$U.lo randlc2x$U.lo \ randmt$U.lo randmts$U.lo rands$U.lo randsd$U.lo randsdui$U.lo \ - randbui$U.lo randmui$U.lo version$U.lo + randbui$U.lo randmui$U.lo version$U.lo nextprime$U.lo libgmp_la_OBJECTS = $(am_libgmp_la_OBJECTS) libgmp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -121,7 +121,7 @@ mpz/sub$U.lo mpz/tdiv_q$U.lo am_libmp_la_OBJECTS = assert$U.lo errno$U.lo memory$U.lo mp_bpl$U.lo \ mp_clz_tab$U.lo mp_dv_tab$U.lo mp_minv_tab$U.lo \ - mp_get_fns$U.lo mp_set_fns$U.lo + mp_get_fns$U.lo mp_set_fns$U.lo nextprime$U.lo libmp_la_OBJECTS = $(am_libmp_la_OBJECTS) libmp_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(libmp_la_LDFLAGS) \ @@ -215,7 +215,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -239,10 +238,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -282,6 +280,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -315,10 +314,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -348,7 +347,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -412,6 +410,9 @@ # 4.3.0 8:0:5 5:0:1 4:14:1 # 4.3.1 8:1:5 5:1:1 4:15:1 WRONG Really used same as 4.3.0 # 4.3.2 8:2:5 5:2:1 4:16:1 +# 5.0.0 9:0:6 6:0:2 4:20:1 Should have been 10:0:0 +# 5.0.1 10:1:0 6:1:2 4:21:1 +# 5.0.2 10:2:0 6:2:2 4:22:1 # # Starting at 3:0:0 is a slight abuse of the versioning system, but it # ensures we're past soname libgmp.so.2, which was used on Debian GNU/Linux @@ -423,14 +424,14 @@ # Even if we thought the code generated will be identical on all systems, # it's still good to get the shared library filename (like # libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from. -LIBGMP_LT_CURRENT = 8 +LIBGMP_LT_CURRENT = 10 LIBGMP_LT_REVISION = 2 -LIBGMP_LT_AGE = 5 -LIBGMPXX_LT_CURRENT = 5 +LIBGMP_LT_AGE = 0 +LIBGMPXX_LT_CURRENT = 6 LIBGMPXX_LT_REVISION = 2 -LIBGMPXX_LT_AGE = 1 +LIBGMPXX_LT_AGE = 2 LIBMP_LT_CURRENT = 4 -LIBMP_LT_REVISION = 16 +LIBMP_LT_REVISION = 22 LIBMP_LT_AGE = 1 SUBDIRS = tests mpn mpz mpq mpf printf scanf cxx mpbsd demos tune doc @@ -452,9 +453,9 @@ # build-system stuff over and done with at the start. Also, dependencies on # the .h files are not properly expressed for the various objects that use # them. -EXTRA_DIST = macos configfsf.guess configfsf.sub .gdbinit \ - INSTALL.autoconf gmpxx.h libmp.sym dumbmp.c gen-fac_ui.c \ - gen-fib.c gen-bases.c gen-psqr.c +EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf \ + gmpxx.h libmp.sym dumbmp.c gen-fac_ui.c gen-fib.c gen-bases.c \ + gen-trialdivtab.c gen-psqr.c @WANT_CXX_TRUE@GMPXX_HEADERS_OPTION = gmpxx.h # gmp.h and mp.h are architecture dependent, mainly since they encode the @@ -463,7 +464,7 @@ # # $exec_prefix/include is not in the default include path for gcc built to # the same $prefix and $exec_prefix, which might mean gmp.h is not found, -# but anyone knowledgable enough to be playing with exec_prefix will be able +# but anyone knowledgeable enough to be playing with exec_prefix will be able # to address that. # includeexecdir = $(exec_prefix)/include @@ -471,21 +472,22 @@ nodist_includeexec_HEADERS = gmp.h $(MPBSD_HEADERS_OPTION) lib_LTLIBRARIES = libgmp.la $(GMPXX_LTLIBRARIES_OPTION) $(MPBSD_LTLIBRARIES_OPTION) BUILT_SOURCES = gmp.h mp.h mpz/fac_ui.h fib_table.h mpn/fib_table.c \ - mp_bases.h mpn/mp_bases.c mpn/perfsqr.h + mp_bases.h mpn/mp_bases.c trialdivtab.h mpn/perfsqr.h DISTCLEANFILES = $(BUILT_SOURCES) config.m4 @gmp_srclinks@ \ gen-fac_ui$(EXEEXT_FOR_BUILD) gen-fib$(EXEEXT_FOR_BUILD) \ - gen-bases$(EXEEXT_FOR_BUILD) gen-psqr$(EXEEXT_FOR_BUILD) + gen-bases$(EXEEXT_FOR_BUILD) \ + gen-trialdivtab$(EXEEXT_FOR_BUILD) gen-psqr$(EXEEXT_FOR_BUILD) # Tell gmp.h it's building gmp, not an application, used by windows DLL stuff. INCLUDES = -D__GMP_WITHIN_GMP -MPF_OBJECTS = mpf/init$U.lo mpf/init2$U.lo mpf/set$U.lo mpf/set_ui$U.lo \ - mpf/set_si$U.lo mpf/set_str$U.lo mpf/set_d$U.lo mpf/set_z$U.lo \ - mpf/iset$U.lo mpf/iset_ui$U.lo mpf/iset_si$U.lo mpf/iset_str$U.lo \ - mpf/iset_d$U.lo mpf/clear$U.lo mpf/get_str$U.lo mpf/dump$U.lo \ - mpf/size$U.lo mpf/eq$U.lo mpf/reldiff$U.lo mpf/sqrt$U.lo mpf/random2$U.lo \ - mpf/inp_str$U.lo mpf/out_str$U.lo mpf/add$U.lo mpf/add_ui$U.lo \ - mpf/sub$U.lo mpf/sub_ui$U.lo mpf/ui_sub$U.lo mpf/mul$U.lo mpf/mul_ui$U.lo \ - mpf/div$U.lo mpf/div_ui$U.lo \ +MPF_OBJECTS = mpf/init$U.lo mpf/init2$U.lo mpf/inits$U.lo mpf/set$U.lo \ + mpf/set_ui$U.lo mpf/set_si$U.lo mpf/set_str$U.lo mpf/set_d$U.lo \ + mpf/set_z$U.lo mpf/iset$U.lo mpf/iset_ui$U.lo mpf/iset_si$U.lo \ + mpf/iset_str$U.lo mpf/iset_d$U.lo mpf/clear$U.lo mpf/clears$U.lo \ + mpf/get_str$U.lo mpf/dump$U.lo mpf/size$U.lo mpf/eq$U.lo mpf/reldiff$U.lo \ + mpf/sqrt$U.lo mpf/random2$U.lo mpf/inp_str$U.lo mpf/out_str$U.lo \ + mpf/add$U.lo mpf/add_ui$U.lo mpf/sub$U.lo mpf/sub_ui$U.lo mpf/ui_sub$U.lo \ + mpf/mul$U.lo mpf/mul_ui$U.lo mpf/div$U.lo mpf/div_ui$U.lo \ mpf/cmp$U.lo mpf/cmp_d$U.lo mpf/cmp_ui$U.lo mpf/cmp_si$U.lo \ mpf/mul_2exp$U.lo mpf/div_2exp$U.lo mpf/abs$U.lo mpf/neg$U.lo \ mpf/set_q$U.lo mpf/get_d$U.lo mpf/get_d_2exp$U.lo mpf/set_dfl_prec$U.lo \ @@ -505,7 +507,7 @@ mpz/cdiv_qr$U.lo mpz/cdiv_qr_ui$U.lo \ mpz/cdiv_r$U.lo mpz/cdiv_r_ui$U.lo mpz/cdiv_ui$U.lo \ mpz/cfdiv_q_2exp$U.lo mpz/cfdiv_r_2exp$U.lo \ - mpz/clear$U.lo mpz/clrbit$U.lo \ + mpz/clear$U.lo mpz/clears$U.lo mpz/clrbit$U.lo \ mpz/cmp$U.lo mpz/cmp_d$U.lo mpz/cmp_si$U.lo mpz/cmp_ui$U.lo \ mpz/cmpabs$U.lo mpz/cmpabs_d$U.lo mpz/cmpabs_ui$U.lo \ mpz/com$U.lo mpz/combit$U.lo \ @@ -521,8 +523,8 @@ mpz/gcd_ui$U.lo mpz/gcdext$U.lo mpz/get_d$U.lo mpz/get_d_2exp$U.lo \ mpz/get_si$U.lo mpz/get_str$U.lo mpz/get_ui$U.lo mpz/getlimbn$U.lo \ mpz/hamdist$U.lo \ - mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inp_raw$U.lo \ - mpz/inp_str$U.lo mpz/invert$U.lo \ + mpz/import$U.lo mpz/init$U.lo mpz/init2$U.lo mpz/inits$U.lo \ + mpz/inp_raw$U.lo mpz/inp_str$U.lo mpz/invert$U.lo \ mpz/ior$U.lo mpz/iset$U.lo mpz/iset_d$U.lo mpz/iset_si$U.lo \ mpz/iset_str$U.lo mpz/iset_ui$U.lo mpz/jacobi$U.lo mpz/kronsz$U.lo \ mpz/kronuz$U.lo mpz/kronzs$U.lo mpz/kronzu$U.lo \ @@ -531,8 +533,8 @@ mpz/mul_si$U.lo mpz/mul_ui$U.lo \ mpz/n_pow_ui$U.lo mpz/neg$U.lo mpz/nextprime$U.lo \ mpz/out_raw$U.lo mpz/out_str$U.lo mpz/perfpow$U.lo mpz/perfsqr$U.lo \ - mpz/popcount$U.lo mpz/pow_ui$U.lo mpz/powm$U.lo mpz/powm_ui$U.lo \ - mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo \ + mpz/popcount$U.lo mpz/pow_ui$U.lo mpz/powm$U.lo mpz/powm_sec$U.lo \ + mpz/powm_ui$U.lo mpz/pprime_p$U.lo mpz/random$U.lo mpz/random2$U.lo \ mpz/realloc$U.lo mpz/realloc2$U.lo mpz/remove$U.lo \ mpz/root$U.lo mpz/rootrem$U.lo mpz/rrandomb$U.lo mpz/scan0$U.lo \ mpz/scan1$U.lo mpz/set$U.lo mpz/set_d$U.lo mpz/set_f$U.lo \ @@ -547,10 +549,10 @@ mpz/urandomm$U.lo mpz/xor$U.lo MPQ_OBJECTS = mpq/abs$U.lo mpq/aors$U.lo \ - mpq/canonicalize$U.lo mpq/clear$U.lo \ + mpq/canonicalize$U.lo mpq/clear$U.lo mpq/clears$U.lo \ mpq/cmp$U.lo mpq/cmp_si$U.lo mpq/cmp_ui$U.lo mpq/div$U.lo \ mpq/get_d$U.lo mpq/get_den$U.lo mpq/get_num$U.lo mpq/get_str$U.lo \ - mpq/init$U.lo mpq/inp_str$U.lo mpq/inv$U.lo \ + mpq/init$U.lo mpq/inits$U.lo mpq/inp_str$U.lo mpq/inv$U.lo \ mpq/md_2exp$U.lo mpq/mul$U.lo mpq/neg$U.lo mpq/out_str$U.lo \ mpq/set$U.lo mpq/set_den$U.lo mpq/set_num$U.lo \ mpq/set_si$U.lo mpq/set_str$U.lo mpq/set_ui$U.lo \ @@ -606,7 +608,8 @@ assert.c compat.c errno.c extract-dbl.c invalid.c memory.c \ mp_bpl.c mp_clz_tab.c mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c \ rand.c randclr.c randdef.c randiset.c randlc2s.c randlc2x.c randmt.c \ - randmts.c rands.c randsd.c randsdui.c randbui.c randmui.c version.c + randmts.c rands.c randsd.c randsdui.c randbui.c randmui.c version.c \ + nextprime.c EXTRA_libgmp_la_SOURCES = tal-debug.c tal-notreent.c tal-reent.c libgmp_la_DEPENDENCIES = @TAL_OBJECT@ \ @@ -636,7 +639,7 @@ @WANT_MPBSD_TRUE@MPBSD_HEADERS_OPTION = mp.h @WANT_MPBSD_TRUE@MPBSD_LTLIBRARIES_OPTION = libmp.la libmp_la_SOURCES = assert.c errno.c memory.c mp_bpl.c mp_clz_tab.c \ - mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c + mp_dv_tab.c mp_minv_tab.c mp_get_fns.c mp_set_fns.c nextprime.c libmp_la_DEPENDENCIES = $(srcdir)/libmp.sym \ @TAL_OBJECT@ $(MPBSD_OBJECTS) $(MPN_OBJECTS) @mpn_objs_in_libmp@ \ @@ -794,6 +797,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mp_minv_tab.c; then echo $(srcdir)/mp_minv_tab.c; else echo mp_minv_tab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ mp_set_fns_.c: mp_set_fns.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mp_set_fns.c; then echo $(srcdir)/mp_set_fns.c; else echo mp_set_fns.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +nextprime_.c: nextprime.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nextprime.c; then echo $(srcdir)/nextprime.c; else echo nextprime.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ rand_.c: rand.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rand.c; then echo $(srcdir)/rand.c; else echo rand.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ randbui_.c: randbui.c $(ANSI2KNR) @@ -834,16 +839,16 @@ mp_bpl_.$(OBJEXT) mp_bpl_.lo mp_clz_tab_.$(OBJEXT) mp_clz_tab_.lo \ mp_dv_tab_.$(OBJEXT) mp_dv_tab_.lo mp_get_fns_.$(OBJEXT) \ mp_get_fns_.lo mp_minv_tab_.$(OBJEXT) mp_minv_tab_.lo \ -mp_set_fns_.$(OBJEXT) mp_set_fns_.lo rand_.$(OBJEXT) rand_.lo \ -randbui_.$(OBJEXT) randbui_.lo randclr_.$(OBJEXT) randclr_.lo \ -randdef_.$(OBJEXT) randdef_.lo randiset_.$(OBJEXT) randiset_.lo \ -randlc2s_.$(OBJEXT) randlc2s_.lo randlc2x_.$(OBJEXT) randlc2x_.lo \ -randmt_.$(OBJEXT) randmt_.lo randmts_.$(OBJEXT) randmts_.lo \ -randmui_.$(OBJEXT) randmui_.lo rands_.$(OBJEXT) rands_.lo \ -randsd_.$(OBJEXT) randsd_.lo randsdui_.$(OBJEXT) randsdui_.lo \ -tal-debug_.$(OBJEXT) tal-debug_.lo tal-notreent_.$(OBJEXT) \ -tal-notreent_.lo tal-reent_.$(OBJEXT) tal-reent_.lo version_.$(OBJEXT) \ -version_.lo : $(ANSI2KNR) +mp_set_fns_.$(OBJEXT) mp_set_fns_.lo nextprime_.$(OBJEXT) \ +nextprime_.lo rand_.$(OBJEXT) rand_.lo randbui_.$(OBJEXT) randbui_.lo \ +randclr_.$(OBJEXT) randclr_.lo randdef_.$(OBJEXT) randdef_.lo \ +randiset_.$(OBJEXT) randiset_.lo randlc2s_.$(OBJEXT) randlc2s_.lo \ +randlc2x_.$(OBJEXT) randlc2x_.lo randmt_.$(OBJEXT) randmt_.lo \ +randmts_.$(OBJEXT) randmts_.lo randmui_.$(OBJEXT) randmui_.lo \ +rands_.$(OBJEXT) rands_.lo randsd_.$(OBJEXT) randsd_.lo \ +randsdui_.$(OBJEXT) randsdui_.lo tal-debug_.$(OBJEXT) tal-debug_.lo \ +tal-notreent_.$(OBJEXT) tal-notreent_.lo tal-reent_.$(OBJEXT) \ +tal-reent_.lo version_.$(OBJEXT) version_.lo : $(ANSI2KNR) .cc.o: $(CXXCOMPILE) -c -o $@ $< @@ -913,7 +918,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -938,7 +943,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -1105,7 +1110,8 @@ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ - || find "$(distdir)" -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + || find "$(distdir)" -type d ! -perm -755 \ + -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ @@ -1149,17 +1155,17 @@ distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(am__untar) ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ + bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ - unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\ + lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.gz | unshar ;;\ + GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac @@ -1374,7 +1380,7 @@ @echo '' mpz/fac_ui.h: gen-fac_ui$(EXEEXT_FOR_BUILD) - ./gen-fac_ui $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1) + ./gen-fac_ui $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpz/fac_ui.h || (rm -f mpz/fac_ui.h; exit 1) gen-fac_ui$(EXEEXT_FOR_BUILD): gen-fac_ui$(U_FOR_BUILD).c dumbmp.c $(CC_FOR_BUILD) `test -f 'gen-fac_ui$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fac_ui$(U_FOR_BUILD).c -o gen-fac_ui$(EXEEXT_FOR_BUILD) @@ -1383,10 +1389,10 @@ $(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-fac_ui.c; then echo $(srcdir)/gen-fac_ui.c; else echo gen-fac_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-fac_ui_.c || rm -f gen-fac_ui_.c fib_table.h: gen-fib$(EXEEXT_FOR_BUILD) - ./gen-fib header $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >fib_table.h || (rm -f fib_table.h; exit 1) + ./gen-fib header $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >fib_table.h || (rm -f fib_table.h; exit 1) mpn/fib_table.c: gen-fib$(EXEEXT_FOR_BUILD) - ./gen-fib table $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1) + ./gen-fib table $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/fib_table.c || (rm -f mpn/fib_table.c; exit 1) gen-fib$(EXEEXT_FOR_BUILD): gen-fib$(U_FOR_BUILD).c dumbmp.c $(CC_FOR_BUILD) `test -f 'gen-fib$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-fib$(U_FOR_BUILD).c -o gen-fib$(EXEEXT_FOR_BUILD) @@ -1395,10 +1401,10 @@ $(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-fib.c; then echo $(srcdir)/gen-fib.c; else echo gen-fib.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-fib_.c || rm -f gen-fib_.c mp_bases.h: gen-bases$(EXEEXT_FOR_BUILD) - ./gen-bases header $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mp_bases.h || (rm -f mp_bases.h; exit 1) + ./gen-bases header $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mp_bases.h || (rm -f mp_bases.h; exit 1) mpn/mp_bases.c: gen-bases$(EXEEXT_FOR_BUILD) - ./gen-bases table $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1) + ./gen-bases table $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/mp_bases.c || (rm -f mpn/mp_bases.c; exit 1) gen-bases$(EXEEXT_FOR_BUILD): gen-bases$(U_FOR_BUILD).c dumbmp.c $(CC_FOR_BUILD) `test -f 'gen-bases$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-bases$(U_FOR_BUILD).c -o gen-bases$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) @@ -1406,8 +1412,17 @@ gen-bases_.c: gen-bases.c $(ANSI2KNR) $(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-bases.c; then echo $(srcdir)/gen-bases.c; else echo gen-bases.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-bases_.c || rm -f gen-bases_.c +trialdivtab.h: gen-trialdivtab$(EXEEXT_FOR_BUILD) + ./gen-trialdivtab $(GMP_LIMB_BITS) 8000 >trialdivtab.h || (rm -f trialdivtab.h; exit 1) + +gen-trialdivtab$(EXEEXT_FOR_BUILD): gen-trialdivtab$(U_FOR_BUILD).c dumbmp.c + $(CC_FOR_BUILD) `test -f 'gen-trialdivtab$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-trialdivtab$(U_FOR_BUILD).c -o gen-trialdivtab$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) + +gen-trialdivtab_.c: gen-trialdivtab.c $(ANSI2KNR) + $(CPP_FOR_BUILD) `if test -f $(srcdir)/gen-trialdivtab.c; then echo $(srcdir)/gen-trialdivtab.c; else echo gen-trialdivtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > gen-trialdivtab_.c || rm -f gen-trialdivtab_.c + mpn/perfsqr.h: gen-psqr$(EXEEXT_FOR_BUILD) - ./gen-psqr $(BITS_PER_MP_LIMB) $(GMP_NAIL_BITS) >mpn/perfsqr.h || (rm -f mpn/perfsqr.h; exit 1) + ./gen-psqr $(GMP_LIMB_BITS) $(GMP_NAIL_BITS) >mpn/perfsqr.h || (rm -f mpn/perfsqr.h; exit 1) gen-psqr$(EXEEXT_FOR_BUILD): gen-psqr$(U_FOR_BUILD).c dumbmp.c $(CC_FOR_BUILD) `test -f 'gen-psqr$(U_FOR_BUILD).c' || echo '$(srcdir)/'`gen-psqr$(U_FOR_BUILD).c -o gen-psqr$(EXEEXT_FOR_BUILD) $(LIBM_FOR_BUILD) @@ -1425,9 +1440,9 @@ dist-hook: -find $(distdir) \( -name CVS -type d \) -o -name "*~" -o -name ".#*" \ | xargs rm -rf - grep -F $(VERSION) $(srcdir)/Makefile.am \ - | grep -q "^# *$(VERSION) *$(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) *$(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE) *$(LIBMP_LT_CURRENT):$(LIBMP_LT_REVISION):$(LIBMP_LT_AGE)" - test -z "`sed -n 's/^# *[0-9]*\.[0-9]*\.[0-9]* *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\).*/A\1\nB\2\nC\3/p' $(srcdir)/Makefile.am | grep -v 'A6:3:3\|B3:5:0\|C4:7:1' | sort | uniq -d`" +# grep -F $(VERSION) $(srcdir)/Makefile.am \ +# | grep -q "^# *$(VERSION) *$(LIBGMP_LT_CURRENT):$(LIBGMP_LT_REVISION):$(LIBGMP_LT_AGE) *$(LIBGMPXX_LT_CURRENT):$(LIBGMPXX_LT_REVISION):$(LIBGMPXX_LT_AGE) *$(LIBMP_LT_CURRENT):$(LIBMP_LT_REVISION):$(LIBMP_LT_AGE)" +# test -z "`sed -n 's/^# *[0-9]*\.[0-9]*\.[0-9]* *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\) *\([0-9]*:[0-9]*:[0-9]*\).*/A\1\nB\2\nC\3/p' $(srcdir)/Makefile.am | grep -v 'A6:3:3\|B3:5:0\|C4:7:1' | sort | uniq -d`" # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru gmp-4.3.2+dfsg/mp_bpl.c gmp-5.0.2+dfsg/mp_bpl.c --- gmp-4.3.2+dfsg/mp_bpl.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mp_bpl.c 2011-05-08 09:49:29.000000000 +0000 @@ -19,6 +19,6 @@ #include "gmp.h" #include "gmp-impl.h" -const int mp_bits_per_limb = BITS_PER_MP_LIMB; +const int mp_bits_per_limb = GMP_LIMB_BITS; const int __gmp_0 = 0; int __gmp_junk; diff -Nru gmp-4.3.2+dfsg/mpbsd/Makefile.in gmp-5.0.2+dfsg/mpbsd/Makefile.in --- gmp-4.3.2+dfsg/mpbsd/Makefile.in 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/mpbsd/Makefile.in 2011-08-30 01:19:39.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -98,7 +98,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -122,10 +121,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -165,6 +163,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -198,10 +197,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -231,7 +230,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/mpbsd/min.c gmp-5.0.2+dfsg/mpbsd/min.c --- gmp-4.3.2+dfsg/mpbsd/min.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mpbsd/min.c 2011-05-08 09:49:29.000000000 +0000 @@ -77,7 +77,7 @@ ungetc (c, stdin); - dest_size = str_size / __mp_bases[10].chars_per_limb + 1; + dest_size = str_size / mp_bases[10].chars_per_limb + 1; if (dest->_mp_alloc < dest_size) _mp_realloc (dest, dest_size); diff -Nru gmp-4.3.2+dfsg/mpbsd/xtom.c gmp-5.0.2+dfsg/mpbsd/xtom.c --- gmp-4.3.2+dfsg/mpbsd/xtom.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mpbsd/xtom.c 2011-05-08 09:49:29.000000000 +0000 @@ -76,7 +76,7 @@ str_size = s - begs; - xsize = str_size / __mp_bases[16].chars_per_limb + 1; + xsize = str_size / mp_bases[16].chars_per_limb + 1; x->_mp_alloc = xsize; x->_mp_d = (mp_ptr) (*__gmp_allocate_func) (xsize * BYTES_PER_MP_LIMB); diff -Nru gmp-4.3.2+dfsg/mpf/add.c gmp-5.0.2+dfsg/mpf/add.c --- gmp-4.3.2+dfsg/mpf/add.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/add.c 2011-05-08 09:49:29.000000000 +0000 @@ -110,7 +110,7 @@ /* Allocate temp space for the result. Allocate just vsize + ediff later??? */ - tp = (mp_ptr) TMP_ALLOC (prec * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (prec); if (ediff >= prec) { diff -Nru gmp-4.3.2+dfsg/mpf/clears.c gmp-5.0.2+dfsg/mpf/clears.c --- gmp-4.3.2+dfsg/mpf/clears.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/clears.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* mpf_clears() -- Clear multiple mpf_t variables. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "config.h" + +#if HAVE_STDARG +#include +#else +#include +#endif + +#include /* for NULL */ +#include "gmp.h" +#include "gmp-impl.h" + +void +#if HAVE_STDARG +mpf_clears (mpf_ptr x, ...) +#else +mpf_clears (va_alist) + va_dcl +#endif +{ + va_list ap; + +#if HAVE_STDARG + va_start (ap, x); +#else + mpf_ptr x; + va_start (ap); + x = va_arg (ap, mpf_ptr); +#endif + + while (x != NULL) + { + mpf_clear (x); + x = va_arg (ap, mpf_ptr); + } + va_end (ap); +} diff -Nru gmp-4.3.2+dfsg/mpf/div_2exp.c gmp-5.0.2+dfsg/mpf/div_2exp.c --- gmp-4.3.2+dfsg/mpf/div_2exp.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/div_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -65,7 +65,7 @@ then use that mpn_rshift. */ void -mpf_div_2exp (mpf_ptr r, mpf_srcptr u, unsigned long int exp) +mpf_div_2exp (mpf_ptr r, mpf_srcptr u, mp_bitcnt_t exp) { mp_srcptr up; mp_ptr rp = r->_mp_d; diff -Nru gmp-4.3.2+dfsg/mpf/div.c gmp-5.0.2+dfsg/mpf/div.c --- gmp-4.3.2+dfsg/mpf/div.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/div.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ /* mpf_div -- Divide two floats. -Copyright 1993, 1994, 1996, 2000, 2001, 2002, 2004, 2005 Free Software +Copyright 1993, 1994, 1996, 2000, 2001, 2002, 2004, 2005, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,10 +18,8 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#include /* for NULL */ #include "gmp.h" #include "gmp-impl.h" -#include "longlong.h" /* Not done: @@ -42,105 +40,87 @@ overlap between quotient and dividend in mpn_tdiv_qr, then we can avoid copying up,usize. This would only arise from a prec reduced with mpf_set_prec_raw and will be pretty unusual, but might be worthwhile if - it could be worked into the copy_u decision cleanly. - - Future: - - If/when mpn_tdiv_qr supports its qxn parameter we can use that instead of - padding u with zeros in temporary space. - - If/when a quotient-only division exists it can be used here immediately. - remp is only to satisfy mpn_tdiv_qr, the remainder is not used. */ + it could be worked into the copy_u decision cleanly. */ void mpf_div (mpf_ptr r, mpf_srcptr u, mpf_srcptr v) { mp_srcptr up, vp; - mp_ptr rp, remp, tp, new_vp; - mp_size_t usize, vsize, rsize, prospective_rsize, tsize, zeros, copy_v_size; + mp_ptr rp, tp, new_vp; + mp_size_t usize, vsize, rsize, prospective_rsize, tsize, zeros; mp_size_t sign_quotient, prec, high_zero, chop; mp_exp_t rexp; int copy_u; TMP_DECL; - usize = u->_mp_size; - vsize = v->_mp_size; + usize = SIZ(u); + vsize = SIZ(v); sign_quotient = usize ^ vsize; usize = ABS (usize); vsize = ABS (vsize); - prec = r->_mp_prec; + prec = PREC(r); if (vsize == 0) DIVIDE_BY_ZERO; if (usize == 0) { - r->_mp_size = 0; - r->_mp_exp = 0; + SIZ(r) = 0; + EXP(r) = 0; return; } TMP_MARK; - rexp = u->_mp_exp - v->_mp_exp + 1; + rexp = EXP(u) - EXP(v) + 1; - rp = r->_mp_d; - up = u->_mp_d; - vp = v->_mp_d; + rp = PTR(r); + up = PTR(u); + vp = PTR(v); prospective_rsize = usize - vsize + 1; /* quot from using given u,v sizes */ - rsize = prec + 1; /* desired quot */ + rsize = prec + 1; /* desired quot */ - zeros = rsize - prospective_rsize; /* padding u to give rsize */ - copy_u = (zeros > 0 || rp == up); /* copy u if overlap or padding */ + zeros = rsize - prospective_rsize; /* padding u to give rsize */ + copy_u = (zeros > 0 || rp == up); /* copy u if overlap or padding */ - chop = MAX (-zeros, 0); /* negative zeros means shorten u */ + chop = MAX (-zeros, 0); /* negative zeros means shorten u */ up += chop; usize -= chop; - zeros += chop; /* now zeros >= 0 */ + zeros += chop; /* now zeros >= 0 */ - tsize = usize + zeros; /* size for possible copy of u */ - - if (WANT_TMP_DEBUG) - { - /* separate blocks, for malloc debugging */ - remp = TMP_ALLOC_LIMBS (vsize); - tp = (copy_u ? TMP_ALLOC_LIMBS (tsize) : NULL); - new_vp = (rp == vp ? TMP_ALLOC_LIMBS (vsize) : NULL); - } - else - { - /* one block with conditionalized size, for efficiency */ - copy_v_size = (rp == vp ? vsize : 0); - remp = TMP_ALLOC_LIMBS (vsize + copy_v_size + (copy_u ? tsize : 0)); - new_vp = remp + vsize; - tp = new_vp + copy_v_size; - } + tsize = usize + zeros; /* size for possible copy of u */ /* copy and possibly extend u if necessary */ if (copy_u) { + tp = TMP_ALLOC_LIMBS (tsize + 1); /* +1 for mpn_div_q's scratch needs */ MPN_ZERO (tp, zeros); MPN_COPY (tp+zeros, up, usize); up = tp; usize = tsize; } + else + { + tp = TMP_ALLOC_LIMBS (usize + 1); + } /* ensure divisor doesn't overlap quotient */ if (rp == vp) { + new_vp = TMP_ALLOC_LIMBS (vsize); MPN_COPY (new_vp, vp, vsize); vp = new_vp; } ASSERT (usize-vsize+1 == rsize); - mpn_tdiv_qr (rp, remp, (mp_size_t) 0, up, usize, vp, vsize); + mpn_div_q (rp, up, usize, vp, vsize, tp); /* strip possible zero high limb */ high_zero = (rp[rsize-1] == 0); rsize -= high_zero; rexp -= high_zero; - r->_mp_size = sign_quotient >= 0 ? rsize : -rsize; - r->_mp_exp = rexp; + SIZ(r) = sign_quotient >= 0 ? rsize : -rsize; + EXP(r) = rexp; TMP_FREE; } diff -Nru gmp-4.3.2+dfsg/mpf/div_ui.c gmp-5.0.2+dfsg/mpf/div_ui.c --- gmp-4.3.2+dfsg/mpf/div_ui.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/div_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -71,7 +71,7 @@ up = u->_mp_d; tsize = 1 + prec; - tp = (mp_ptr) TMP_ALLOC ((tsize + 1) * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (tsize + 1); if (usize > tsize) { diff -Nru gmp-4.3.2+dfsg/mpf/eq.c gmp-5.0.2+dfsg/mpf/eq.c --- gmp-4.3.2+dfsg/mpf/eq.c 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/eq.c 2011-05-08 09:49:29.000000000 +0000 @@ -23,10 +23,10 @@ #include "longlong.h" int -mpf_eq (mpf_srcptr u, mpf_srcptr v, unsigned long int n_bits) +mpf_eq (mpf_srcptr u, mpf_srcptr v, mp_bitcnt_t n_bits) { mp_srcptr up, vp, p; - mp_size_t usize, vsize, minsize, maxsize, n_limbs, i; + mp_size_t usize, vsize, minsize, maxsize, n_limbs, i, size; mp_exp_t uexp, vexp; mp_limb_t diff; int cnt; @@ -100,32 +100,37 @@ return 0; } - if (minsize != maxsize) + n_bits -= (maxsize - 1) * GMP_NUMB_BITS; + + size = maxsize - minsize; + if (size != 0) { if (up[0] != vp[0]) return 0; - } - /* Now either U or V has its limbs consumed. Check the the other operand - has just zeros in the corresponding, relevant part. */ + /* Now either U or V has its limbs consumed, i.e, continues with an + infinite number of implicit zero limbs. Check that the other operand + has just zeros in the corresponding, relevant part. */ + + if (usize > vsize) + p = up - size; + else + p = vp - size; + + for (i = size - 1; i > 0; i--) + { + if (p[i] != 0) + return 0; + } - if (usize > vsize) - p = up + minsize - maxsize; + diff = p[0]; + } else - p = vp + minsize - maxsize; - - for (i = maxsize - minsize - 1; i > 0; i--) { - if (p[i] != 0) - return 0; - } - - n_bits -= (maxsize - 1) * GMP_NUMB_BITS; + /* Both U or V has its limbs consumed. */ - if (minsize != maxsize) - diff = p[0]; - else - diff = up[0] ^ vp[0]; + diff = up[0] ^ vp[0]; + } if (n_bits < GMP_NUMB_BITS) diff >>= GMP_NUMB_BITS - n_bits; diff -Nru gmp-4.3.2+dfsg/mpf/get_dfl_prec.c gmp-5.0.2+dfsg/mpf/get_dfl_prec.c --- gmp-4.3.2+dfsg/mpf/get_dfl_prec.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/get_dfl_prec.c 2011-05-08 09:49:29.000000000 +0000 @@ -21,7 +21,7 @@ #include "gmp-impl.h" -unsigned long +mp_bitcnt_t mpf_get_default_prec (void) { return __GMPF_PREC_TO_BITS (__gmp_default_fp_limb_precision); diff -Nru gmp-4.3.2+dfsg/mpf/get_prc.c gmp-5.0.2+dfsg/mpf/get_prc.c --- gmp-4.3.2+dfsg/mpf/get_prc.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/get_prc.c 2011-05-08 09:49:29.000000000 +0000 @@ -20,7 +20,7 @@ #include "gmp.h" #include "gmp-impl.h" -unsigned long int +mp_bitcnt_t mpf_get_prec (mpf_srcptr x) { return __GMPF_PREC_TO_BITS (x->_mp_prec); diff -Nru gmp-4.3.2+dfsg/mpf/get_str.c gmp-5.0.2+dfsg/mpf/get_str.c --- gmp-4.3.2+dfsg/mpf/get_str.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/get_str.c 2011-05-08 09:49:29.000000000 +0000 @@ -67,7 +67,7 @@ count_leading_zeros (cnt, exp); for (i = GMP_LIMB_BITS - cnt - 2; i >= 0; i--) { - mpn_sqr_n (tp, rp + off, rn); + mpn_sqr (tp, rp + off, rn); rn = 2 * rn; rn -= tp[rn - 1] == 0; ign <<= 1; diff -Nru gmp-4.3.2+dfsg/mpf/init2.c gmp-5.0.2+dfsg/mpf/init2.c --- gmp-4.3.2+dfsg/mpf/init2.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/init2.c 2011-05-08 09:49:29.000000000 +0000 @@ -21,7 +21,7 @@ #include "gmp-impl.h" void -mpf_init2 (mpf_ptr r, unsigned long int prec_in_bits) +mpf_init2 (mpf_ptr r, mp_bitcnt_t prec_in_bits) { mp_size_t prec; diff -Nru gmp-4.3.2+dfsg/mpf/inits.c gmp-5.0.2+dfsg/mpf/inits.c --- gmp-4.3.2+dfsg/mpf/inits.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/inits.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* mpf_inits() -- Initialize multiple mpf_t variables and set them to 0. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "config.h" + +#if HAVE_STDARG +#include +#else +#include +#endif + +#include /* for NULL */ +#include "gmp.h" +#include "gmp-impl.h" + +void +#if HAVE_STDARG +mpf_inits (mpf_ptr x, ...) +#else +mpf_inits (va_alist) + va_dcl +#endif +{ + va_list ap; + +#if HAVE_STDARG + va_start (ap, x); +#else + mpf_ptr x; + va_start (ap); + x = va_arg (ap, mpf_ptr); +#endif + + while (x != NULL) + { + mpf_init (x); + x = va_arg (ap, mpf_ptr); + } + va_end (ap); +} diff -Nru gmp-4.3.2+dfsg/mpf/Makefile.am gmp-5.0.2+dfsg/mpf/Makefile.am --- gmp-4.3.2+dfsg/mpf/Makefile.am 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -23,9 +23,9 @@ noinst_LTLIBRARIES = libmpf.la libmpf_la_SOURCES = \ - init.c init2.c set.c set_ui.c set_si.c set_str.c set_d.c set_z.c \ - set_q.c iset.c iset_ui.c iset_si.c iset_str.c iset_d.c clear.c get_str.c \ - dump.c size.c eq.c reldiff.c sqrt.c random2.c inp_str.c out_str.c \ + init.c init2.c inits.c set.c set_ui.c set_si.c set_str.c set_d.c set_z.c \ + set_q.c iset.c iset_ui.c iset_si.c iset_str.c iset_d.c clear.c clears.c \ + get_str.c dump.c size.c eq.c reldiff.c sqrt.c random2.c inp_str.c out_str.c \ add.c add_ui.c sub.c sub_ui.c ui_sub.c mul.c mul_ui.c div.c div_ui.c \ cmp.c cmp_d.c cmp_si.c cmp_ui.c mul_2exp.c div_2exp.c abs.c neg.c get_d.c \ get_d_2exp.c set_dfl_prec.c set_prc.c set_prc_raw.c get_dfl_prec.c get_prc.c \ diff -Nru gmp-4.3.2+dfsg/mpf/Makefile.in gmp-5.0.2+dfsg/mpf/Makefile.in --- gmp-4.3.2+dfsg/mpf/Makefile.in 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/Makefile.in 2011-08-30 01:19:39.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -66,18 +66,19 @@ CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmpf_la_LIBADD = -am_libmpf_la_OBJECTS = init$U.lo init2$U.lo set$U.lo set_ui$U.lo \ - set_si$U.lo set_str$U.lo set_d$U.lo set_z$U.lo set_q$U.lo \ - iset$U.lo iset_ui$U.lo iset_si$U.lo iset_str$U.lo iset_d$U.lo \ - clear$U.lo get_str$U.lo dump$U.lo size$U.lo eq$U.lo \ - reldiff$U.lo sqrt$U.lo random2$U.lo inp_str$U.lo out_str$U.lo \ - add$U.lo add_ui$U.lo sub$U.lo sub_ui$U.lo ui_sub$U.lo mul$U.lo \ - mul_ui$U.lo div$U.lo div_ui$U.lo cmp$U.lo cmp_d$U.lo \ - cmp_si$U.lo cmp_ui$U.lo mul_2exp$U.lo div_2exp$U.lo abs$U.lo \ - neg$U.lo get_d$U.lo get_d_2exp$U.lo set_dfl_prec$U.lo \ - set_prc$U.lo set_prc_raw$U.lo get_dfl_prec$U.lo get_prc$U.lo \ - ui_div$U.lo sqrt_ui$U.lo pow_ui$U.lo urandomb$U.lo swap$U.lo \ - get_si$U.lo get_ui$U.lo int_p$U.lo ceilfloor$U.lo trunc$U.lo \ +am_libmpf_la_OBJECTS = init$U.lo init2$U.lo inits$U.lo set$U.lo \ + set_ui$U.lo set_si$U.lo set_str$U.lo set_d$U.lo set_z$U.lo \ + set_q$U.lo iset$U.lo iset_ui$U.lo iset_si$U.lo iset_str$U.lo \ + iset_d$U.lo clear$U.lo clears$U.lo get_str$U.lo dump$U.lo \ + size$U.lo eq$U.lo reldiff$U.lo sqrt$U.lo random2$U.lo \ + inp_str$U.lo out_str$U.lo add$U.lo add_ui$U.lo sub$U.lo \ + sub_ui$U.lo ui_sub$U.lo mul$U.lo mul_ui$U.lo div$U.lo \ + div_ui$U.lo cmp$U.lo cmp_d$U.lo cmp_si$U.lo cmp_ui$U.lo \ + mul_2exp$U.lo div_2exp$U.lo abs$U.lo neg$U.lo get_d$U.lo \ + get_d_2exp$U.lo set_dfl_prec$U.lo set_prc$U.lo \ + set_prc_raw$U.lo get_dfl_prec$U.lo get_prc$U.lo ui_div$U.lo \ + sqrt_ui$U.lo pow_ui$U.lo urandomb$U.lo swap$U.lo get_si$U.lo \ + get_ui$U.lo int_p$U.lo ceilfloor$U.lo trunc$U.lo \ fits_sint$U.lo fits_slong$U.lo fits_sshort$U.lo fits_uint$U.lo \ fits_ulong$U.lo fits_ushort$U.lo libmpf_la_OBJECTS = $(am_libmpf_la_OBJECTS) @@ -108,7 +109,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -132,10 +132,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -175,6 +174,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -208,10 +208,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -241,7 +241,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -263,9 +262,9 @@ INCLUDES = -D__GMP_WITHIN_GMP -I$(top_srcdir) noinst_LTLIBRARIES = libmpf.la libmpf_la_SOURCES = \ - init.c init2.c set.c set_ui.c set_si.c set_str.c set_d.c set_z.c \ - set_q.c iset.c iset_ui.c iset_si.c iset_str.c iset_d.c clear.c get_str.c \ - dump.c size.c eq.c reldiff.c sqrt.c random2.c inp_str.c out_str.c \ + init.c init2.c inits.c set.c set_ui.c set_si.c set_str.c set_d.c set_z.c \ + set_q.c iset.c iset_ui.c iset_si.c iset_str.c iset_d.c clear.c clears.c \ + get_str.c dump.c size.c eq.c reldiff.c sqrt.c random2.c inp_str.c out_str.c \ add.c add_ui.c sub.c sub_ui.c ui_sub.c mul.c mul_ui.c div.c div_ui.c \ cmp.c cmp_d.c cmp_si.c cmp_ui.c mul_2exp.c div_2exp.c abs.c neg.c get_d.c \ get_d_2exp.c set_dfl_prec.c set_prc.c set_prc_raw.c get_dfl_prec.c get_prc.c \ @@ -351,6 +350,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ceilfloor.c; then echo $(srcdir)/ceilfloor.c; else echo ceilfloor.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ clear_.c: clear.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clear.c; then echo $(srcdir)/clear.c; else echo clear.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +clears_.c: clears.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clears.c; then echo $(srcdir)/clears.c; else echo clears.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ cmp_.c: cmp.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmp.c; then echo $(srcdir)/cmp.c; else echo cmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ cmp_d_.c: cmp_d.c $(ANSI2KNR) @@ -399,6 +400,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/init.c; then echo $(srcdir)/init.c; else echo init.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ init2_.c: init2.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/init2.c; then echo $(srcdir)/init2.c; else echo init2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +inits_.c: inits.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inits.c; then echo $(srcdir)/inits.c; else echo inits.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ inp_str_.c: inp_str.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inp_str.c; then echo $(srcdir)/inp_str.c; else echo inp_str.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ int_p_.c: int_p.c $(ANSI2KNR) @@ -471,34 +474,36 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/urandomb.c; then echo $(srcdir)/urandomb.c; else echo urandomb.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ abs_.$(OBJEXT) abs_.lo add_.$(OBJEXT) add_.lo add_ui_.$(OBJEXT) \ add_ui_.lo ceilfloor_.$(OBJEXT) ceilfloor_.lo clear_.$(OBJEXT) \ -clear_.lo cmp_.$(OBJEXT) cmp_.lo cmp_d_.$(OBJEXT) cmp_d_.lo \ -cmp_si_.$(OBJEXT) cmp_si_.lo cmp_ui_.$(OBJEXT) cmp_ui_.lo \ -div_.$(OBJEXT) div_.lo div_2exp_.$(OBJEXT) div_2exp_.lo \ -div_ui_.$(OBJEXT) div_ui_.lo dump_.$(OBJEXT) dump_.lo eq_.$(OBJEXT) \ -eq_.lo fits_sint_.$(OBJEXT) fits_sint_.lo fits_slong_.$(OBJEXT) \ -fits_slong_.lo fits_sshort_.$(OBJEXT) fits_sshort_.lo \ -fits_uint_.$(OBJEXT) fits_uint_.lo fits_ulong_.$(OBJEXT) \ -fits_ulong_.lo fits_ushort_.$(OBJEXT) fits_ushort_.lo get_d_.$(OBJEXT) \ -get_d_.lo get_d_2exp_.$(OBJEXT) get_d_2exp_.lo get_dfl_prec_.$(OBJEXT) \ +clear_.lo clears_.$(OBJEXT) clears_.lo cmp_.$(OBJEXT) cmp_.lo \ +cmp_d_.$(OBJEXT) cmp_d_.lo cmp_si_.$(OBJEXT) cmp_si_.lo \ +cmp_ui_.$(OBJEXT) cmp_ui_.lo div_.$(OBJEXT) div_.lo \ +div_2exp_.$(OBJEXT) div_2exp_.lo div_ui_.$(OBJEXT) div_ui_.lo \ +dump_.$(OBJEXT) dump_.lo eq_.$(OBJEXT) eq_.lo fits_sint_.$(OBJEXT) \ +fits_sint_.lo fits_slong_.$(OBJEXT) fits_slong_.lo \ +fits_sshort_.$(OBJEXT) fits_sshort_.lo fits_uint_.$(OBJEXT) \ +fits_uint_.lo fits_ulong_.$(OBJEXT) fits_ulong_.lo \ +fits_ushort_.$(OBJEXT) fits_ushort_.lo get_d_.$(OBJEXT) get_d_.lo \ +get_d_2exp_.$(OBJEXT) get_d_2exp_.lo get_dfl_prec_.$(OBJEXT) \ get_dfl_prec_.lo get_prc_.$(OBJEXT) get_prc_.lo get_si_.$(OBJEXT) \ get_si_.lo get_str_.$(OBJEXT) get_str_.lo get_ui_.$(OBJEXT) get_ui_.lo \ -init_.$(OBJEXT) init_.lo init2_.$(OBJEXT) init2_.lo inp_str_.$(OBJEXT) \ -inp_str_.lo int_p_.$(OBJEXT) int_p_.lo iset_.$(OBJEXT) iset_.lo \ -iset_d_.$(OBJEXT) iset_d_.lo iset_si_.$(OBJEXT) iset_si_.lo \ -iset_str_.$(OBJEXT) iset_str_.lo iset_ui_.$(OBJEXT) iset_ui_.lo \ -mul_.$(OBJEXT) mul_.lo mul_2exp_.$(OBJEXT) mul_2exp_.lo \ -mul_ui_.$(OBJEXT) mul_ui_.lo neg_.$(OBJEXT) neg_.lo out_str_.$(OBJEXT) \ -out_str_.lo pow_ui_.$(OBJEXT) pow_ui_.lo random2_.$(OBJEXT) \ -random2_.lo reldiff_.$(OBJEXT) reldiff_.lo set_.$(OBJEXT) set_.lo \ -set_d_.$(OBJEXT) set_d_.lo set_dfl_prec_.$(OBJEXT) set_dfl_prec_.lo \ -set_prc_.$(OBJEXT) set_prc_.lo set_prc_raw_.$(OBJEXT) set_prc_raw_.lo \ -set_q_.$(OBJEXT) set_q_.lo set_si_.$(OBJEXT) set_si_.lo \ -set_str_.$(OBJEXT) set_str_.lo set_ui_.$(OBJEXT) set_ui_.lo \ -set_z_.$(OBJEXT) set_z_.lo size_.$(OBJEXT) size_.lo sqrt_.$(OBJEXT) \ -sqrt_.lo sqrt_ui_.$(OBJEXT) sqrt_ui_.lo sub_.$(OBJEXT) sub_.lo \ -sub_ui_.$(OBJEXT) sub_ui_.lo swap_.$(OBJEXT) swap_.lo trunc_.$(OBJEXT) \ -trunc_.lo ui_div_.$(OBJEXT) ui_div_.lo ui_sub_.$(OBJEXT) ui_sub_.lo \ -urandomb_.$(OBJEXT) urandomb_.lo : $(ANSI2KNR) +init_.$(OBJEXT) init_.lo init2_.$(OBJEXT) init2_.lo inits_.$(OBJEXT) \ +inits_.lo inp_str_.$(OBJEXT) inp_str_.lo int_p_.$(OBJEXT) int_p_.lo \ +iset_.$(OBJEXT) iset_.lo iset_d_.$(OBJEXT) iset_d_.lo \ +iset_si_.$(OBJEXT) iset_si_.lo iset_str_.$(OBJEXT) iset_str_.lo \ +iset_ui_.$(OBJEXT) iset_ui_.lo mul_.$(OBJEXT) mul_.lo \ +mul_2exp_.$(OBJEXT) mul_2exp_.lo mul_ui_.$(OBJEXT) mul_ui_.lo \ +neg_.$(OBJEXT) neg_.lo out_str_.$(OBJEXT) out_str_.lo \ +pow_ui_.$(OBJEXT) pow_ui_.lo random2_.$(OBJEXT) random2_.lo \ +reldiff_.$(OBJEXT) reldiff_.lo set_.$(OBJEXT) set_.lo set_d_.$(OBJEXT) \ +set_d_.lo set_dfl_prec_.$(OBJEXT) set_dfl_prec_.lo set_prc_.$(OBJEXT) \ +set_prc_.lo set_prc_raw_.$(OBJEXT) set_prc_raw_.lo set_q_.$(OBJEXT) \ +set_q_.lo set_si_.$(OBJEXT) set_si_.lo set_str_.$(OBJEXT) set_str_.lo \ +set_ui_.$(OBJEXT) set_ui_.lo set_z_.$(OBJEXT) set_z_.lo \ +size_.$(OBJEXT) size_.lo sqrt_.$(OBJEXT) sqrt_.lo sqrt_ui_.$(OBJEXT) \ +sqrt_ui_.lo sub_.$(OBJEXT) sub_.lo sub_ui_.$(OBJEXT) sub_ui_.lo \ +swap_.$(OBJEXT) swap_.lo trunc_.$(OBJEXT) trunc_.lo ui_div_.$(OBJEXT) \ +ui_div_.lo ui_sub_.$(OBJEXT) ui_sub_.lo urandomb_.$(OBJEXT) \ +urandomb_.lo : $(ANSI2KNR) mostlyclean-libtool: -rm -f *.lo diff -Nru gmp-4.3.2+dfsg/mpf/mul_2exp.c gmp-5.0.2+dfsg/mpf/mul_2exp.c --- gmp-4.3.2+dfsg/mpf/mul_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/mul_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -59,7 +59,7 @@ then use that mpn_rshift. */ void -mpf_mul_2exp (mpf_ptr r, mpf_srcptr u, unsigned long int exp) +mpf_mul_2exp (mpf_ptr r, mpf_srcptr u, mp_bitcnt_t exp) { mp_srcptr up; mp_ptr rp = r->_mp_d; diff -Nru gmp-4.3.2+dfsg/mpf/mul.c gmp-5.0.2+dfsg/mpf/mul.c --- gmp-4.3.2+dfsg/mpf/mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -63,7 +63,7 @@ mp_size_t adj; rsize = usize + vsize; - tp = (mp_ptr) TMP_ALLOC (rsize * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (rsize); cy_limb = (usize >= vsize ? mpn_mul (tp, up, usize, vp, vsize) : mpn_mul (tp, vp, vsize, up, usize)); diff -Nru gmp-4.3.2+dfsg/mpf/set_dfl_prec.c gmp-5.0.2+dfsg/mpf/set_dfl_prec.c --- gmp-4.3.2+dfsg/mpf/set_dfl_prec.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/set_dfl_prec.c 2011-05-08 09:49:29.000000000 +0000 @@ -23,7 +23,7 @@ mp_size_t __gmp_default_fp_limb_precision = __GMPF_BITS_TO_PREC (53); void -mpf_set_default_prec (unsigned long int prec_in_bits) +mpf_set_default_prec (mp_bitcnt_t prec_in_bits) { __gmp_default_fp_limb_precision = __GMPF_BITS_TO_PREC (prec_in_bits); } diff -Nru gmp-4.3.2+dfsg/mpf/set_prc.c gmp-5.0.2+dfsg/mpf/set_prc.c --- gmp-4.3.2+dfsg/mpf/set_prc.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/set_prc.c 2011-05-08 09:49:29.000000000 +0000 @@ -28,7 +28,7 @@ inconsistent. */ void -mpf_set_prec (mpf_ptr x, unsigned long int new_prec_in_bits) +mpf_set_prec (mpf_ptr x, mp_bitcnt_t new_prec_in_bits) { mp_size_t old_prec, new_prec, new_prec_plus1; mp_size_t size, sign; diff -Nru gmp-4.3.2+dfsg/mpf/set_prc_raw.c gmp-5.0.2+dfsg/mpf/set_prc_raw.c --- gmp-4.3.2+dfsg/mpf/set_prc_raw.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/set_prc_raw.c 2011-05-08 09:49:29.000000000 +0000 @@ -23,7 +23,7 @@ #include "gmp-impl.h" void -mpf_set_prec_raw (mpf_ptr x, unsigned long int prec_in_bits) +mpf_set_prec_raw (mpf_ptr x, mp_bitcnt_t prec_in_bits) { x->_mp_prec = __GMPF_BITS_TO_PREC (prec_in_bits); } diff -Nru gmp-4.3.2+dfsg/mpf/set_str.c gmp-5.0.2+dfsg/mpf/set_str.c --- gmp-4.3.2+dfsg/mpf/set_str.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/set_str.c 2011-05-08 09:49:29.000000000 +0000 @@ -72,7 +72,7 @@ count_leading_zeros (cnt, exp); for (i = GMP_LIMB_BITS - cnt - 2; i >= 0; i--) { - mpn_sqr_n (tp, rp + off, rn); + mpn_sqr (tp, rp + off, rn); rn = 2 * rn; rn -= tp[rn - 1] == 0; ign <<= 1; diff -Nru gmp-4.3.2+dfsg/mpf/sqrt.c gmp-5.0.2+dfsg/mpf/sqrt.c --- gmp-4.3.2+dfsg/mpf/sqrt.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/sqrt.c 2011-05-08 09:49:29.000000000 +0000 @@ -82,7 +82,7 @@ /* root size is ceil(tsize/2), this will be our desired "prec" limbs */ ASSERT ((tsize + 1) / 2 == prec); - tp = (mp_ptr) TMP_ALLOC (tsize * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (tsize); if (usize > tsize) { diff -Nru gmp-4.3.2+dfsg/mpf/sqrt_ui.c gmp-5.0.2+dfsg/mpf/sqrt_ui.c --- gmp-4.3.2+dfsg/mpf/sqrt_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/sqrt_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -77,7 +77,7 @@ zeros = 2 * prec - 2; rsize = zeros + 1 + U2; - tp = (mp_ptr) TMP_ALLOC (rsize * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (rsize); MPN_ZERO (tp, zeros); tp[zeros] = u & GMP_NUMB_MASK; diff -Nru gmp-4.3.2+dfsg/mpf/sub.c gmp-5.0.2+dfsg/mpf/sub.c --- gmp-4.3.2+dfsg/mpf/sub.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/sub.c 2011-05-08 09:49:29.000000000 +0000 @@ -194,7 +194,7 @@ vsize = prec - 1; } - tp = (mp_ptr) TMP_ALLOC (prec * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (prec); { mp_limb_t cy_limb; if (vsize == 0) @@ -275,7 +275,7 @@ /* Allocate temp space for the result. Allocate just vsize + ediff later??? */ - tp = (mp_ptr) TMP_ALLOC (prec * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (prec); if (ediff >= prec) { diff -Nru gmp-4.3.2+dfsg/mpf/ui_sub.c gmp-5.0.2+dfsg/mpf/ui_sub.c --- gmp-4.3.2+dfsg/mpf/ui_sub.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/ui_sub.c 2011-05-08 09:49:29.000000000 +0000 @@ -140,7 +140,7 @@ /* Allocate temp space for the result. Allocate just vsize + ediff later??? */ - tp = (mp_ptr) TMP_ALLOC (prec * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (prec); if (ediff >= prec) { diff -Nru gmp-4.3.2+dfsg/mpf/urandomb.c gmp-5.0.2+dfsg/mpf/urandomb.c --- gmp-4.3.2+dfsg/mpf/urandomb.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpf/urandomb.c 2011-05-08 09:49:29.000000000 +0000 @@ -24,7 +24,7 @@ #include "gmp-impl.h" void -mpf_urandomb (mpf_t rop, gmp_randstate_t rstate, unsigned long int nbits) +mpf_urandomb (mpf_t rop, gmp_randstate_t rstate, mp_bitcnt_t nbits) { mp_ptr rp; mp_size_t nlimbs; diff -Nru gmp-4.3.2+dfsg/mp-h.in gmp-5.0.2+dfsg/mp-h.in --- gmp-4.3.2+dfsg/mp-h.in 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/mp-h.in 2011-05-08 09:49:29.000000000 +0000 @@ -26,7 +26,7 @@ gmp.h and mp.h to allow both to be included in an application or during the library build. Use the t-gmp-mp-h.pl script to check. */ #ifndef __GNU_MP__ -#define __GNU_MP__ 4 +#define __GNU_MP__ 5 #define __need_size_t /* tell gcc stddef.h we only want size_t */ #if defined (__cplusplus) @@ -106,6 +106,7 @@ typedef long int mp_limb_signed_t; #endif #endif +typedef unsigned long int mp_bitcnt_t; typedef struct { diff -Nru gmp-4.3.2+dfsg/mpn/a29k/submul_1.s gmp-5.0.2+dfsg/mpn/a29k/submul_1.s --- gmp-4.3.2+dfsg/mpn/a29k/submul_1.s 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/a29k/submul_1.s 2011-05-08 09:49:29.000000000 +0000 @@ -82,7 +82,7 @@ subc gr102,gr102,gr110 subc gr103,gr103,gr111 - add gr104,gr103,gr111 ; invert carry from previus sub + add gr104,gr103,gr111 ; invert carry from previous sub addc gr120,gr120,0 mtsrim cr,(8-1) @@ -105,7 +105,7 @@ add gr117,gr117,gr120 addc gr118,gr118,0 sub gr119,gr119,gr117 - add gr104,gr119,gr117 ; invert carry from previus sub + add gr104,gr119,gr117 ; invert carry from previous sub store 0,0,gr119,lr2 jmpfdec lr4,Loop2 addc gr120,gr118,0 diff -Nru gmp-4.3.2+dfsg/mpn/alpha/add_n.asm gmp-5.0.2+dfsg/mpn/alpha/add_n.asm --- gmp-4.3.2+dfsg/mpn/alpha/add_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/add_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ dnl Alpha mpn_add_n -- Add two limb vectors of the same length > 0 and dnl store sum in a third limb vector. -dnl Copyright 1995, 2000, 2002, 2005 Free Software Foundation, Inc. +dnl Copyright 1995, 1999, 2000, 2005 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -21,97 +21,126 @@ include(`../config.m4') C cycles/limb -C EV4: 7.75 -C EV5: 5.75 -C EV6: 4 - -C INPUT PARAMETERS -C rp r16 -C up r17 -C vp r18 -C n r19 +C EV4: ? +C EV5: 4.75 +C EV6: 3 + +dnl INPUT PARAMETERS +dnl res_ptr r16 +dnl s1_ptr r17 +dnl s2_ptr r18 +dnl size r19 ASM_START() PROLOGUE(mpn_add_n) - ldq r3,0(r17) - ldq r4,0(r18) - - subq r19,1,r19 - and r19,4-1,r2 C number of limbs in first loop - bis r31,r31,r0 - beq r2,$L0 C if multiple of 4 limbs, skip first loop - - subq r19,r2,r19 - -$Loop0: subq r2,1,r2 + bis r31,r31,r25 C clear cy + subq r19,4,r19 C decr loop cnt + blt r19,$Lend2 C if less than 4 limbs, goto 2nd loop +C Start software pipeline for 1st loop + ldq r0,0(r18) + ldq r4,0(r17) + ldq r1,8(r18) ldq r5,8(r17) - addq r4,r0,r4 - ldq r6,8(r18) - cmpult r4,r0,r1 - addq r3,r4,r4 - cmpult r4,r3,r0 - stq r4,0(r16) - bis r0,r1,r0 - - addq r17,8,r17 + addq r17,32,r17 C update s1_ptr + ldq r2,16(r18) + addq r0,r4,r20 C 1st main add + ldq r3,24(r18) + subq r19,4,r19 C decr loop cnt + ldq r6,-16(r17) + cmpult r20,r0,r25 C compute cy from last add + ldq r7,-8(r17) + addq r1,r5,r28 C 2nd main add + addq r18,32,r18 C update s2_ptr + addq r28,r25,r21 C 2nd carry add + cmpult r28,r5,r8 C compute cy from last add + blt r19,$Lend1 C if less than 4 limbs remain, jump +C 1st loop handles groups of 4 limbs in a software pipeline + ALIGN(16) +$Loop: cmpult r21,r28,r25 C compute cy from last add + ldq r0,0(r18) + bis r8,r25,r25 C combine cy from the two adds + ldq r1,8(r18) + addq r2,r6,r28 C 3rd main add + ldq r4,0(r17) + addq r28,r25,r22 C 3rd carry add + ldq r5,8(r17) + cmpult r28,r6,r8 C compute cy from last add + cmpult r22,r28,r25 C compute cy from last add + stq r20,0(r16) + bis r8,r25,r25 C combine cy from the two adds + stq r21,8(r16) + addq r3,r7,r28 C 4th main add + addq r28,r25,r23 C 4th carry add + cmpult r28,r7,r8 C compute cy from last add + cmpult r23,r28,r25 C compute cy from last add + addq r17,32,r17 C update s1_ptr + bis r8,r25,r25 C combine cy from the two adds + addq r16,32,r16 C update res_ptr + addq r0,r4,r28 C 1st main add + ldq r2,16(r18) + addq r25,r28,r20 C 1st carry add + ldq r3,24(r18) + cmpult r28,r4,r8 C compute cy from last add + ldq r6,-16(r17) + cmpult r20,r28,r25 C compute cy from last add + ldq r7,-8(r17) + bis r8,r25,r25 C combine cy from the two adds + subq r19,4,r19 C decr loop cnt + stq r22,-16(r16) + addq r1,r5,r28 C 2nd main add + stq r23,-8(r16) + addq r25,r28,r21 C 2nd carry add + addq r18,32,r18 C update s2_ptr + cmpult r28,r5,r8 C compute cy from last add + bge r19,$Loop +C Finish software pipeline for 1st loop +$Lend1: cmpult r21,r28,r25 C compute cy from last add + bis r8,r25,r25 C combine cy from the two adds + addq r2,r6,r28 C 3rd main add + addq r28,r25,r22 C 3rd carry add + cmpult r28,r6,r8 C compute cy from last add + cmpult r22,r28,r25 C compute cy from last add + stq r20,0(r16) + bis r8,r25,r25 C combine cy from the two adds + stq r21,8(r16) + addq r3,r7,r28 C 4th main add + addq r28,r25,r23 C 4th carry add + cmpult r28,r7,r8 C compute cy from last add + cmpult r23,r28,r25 C compute cy from last add + bis r8,r25,r25 C combine cy from the two adds + addq r16,32,r16 C update res_ptr + stq r22,-16(r16) + stq r23,-8(r16) +$Lend2: addq r19,4,r19 C restore loop cnt + beq r19,$Lret +C Start software pipeline for 2nd loop + ldq r0,0(r18) + ldq r4,0(r17) + subq r19,1,r19 + beq r19,$Lend0 +C 2nd loop handles remaining 1-3 limbs + ALIGN(16) +$Loop0: addq r0,r4,r28 C main add + ldq r0,8(r18) + cmpult r28,r4,r8 C compute cy from last add + ldq r4,8(r17) + addq r28,r25,r20 C carry add addq r18,8,r18 - bis r5,r5,r3 - bis r6,r6,r4 + addq r17,8,r17 + stq r20,0(r16) + cmpult r20,r28,r25 C compute cy from last add + subq r19,1,r19 C decr loop cnt + bis r8,r25,r25 C combine cy from the two adds addq r16,8,r16 - bne r2,$Loop0 + bne r19,$Loop0 +$Lend0: addq r0,r4,r28 C main add + addq r28,r25,r20 C carry add + cmpult r28,r4,r8 C compute cy from last add + cmpult r20,r28,r25 C compute cy from last add + stq r20,0(r16) + bis r8,r25,r25 C combine cy from the two adds -$L0: beq r19,$Lend - - ALIGN(8) -$Loop: subq r19,4,r19 - - ldq r5,8(r17) - addq r4,r0,r4 - ldq r6,8(r18) - cmpult r4,r0,r1 - addq r3,r4,r4 - cmpult r4,r3,r0 - stq r4,0(r16) - bis r0,r1,r0 - - ldq r3,16(r17) - addq r6,r0,r6 - ldq r4,16(r18) - cmpult r6,r0,r1 - addq r5,r6,r6 - cmpult r6,r5,r0 - stq r6,8(r16) - bis r0,r1,r0 - - ldq r5,24(r17) - addq r4,r0,r4 - ldq r6,24(r18) - cmpult r4,r0,r1 - addq r3,r4,r4 - cmpult r4,r3,r0 - stq r4,16(r16) - bis r0,r1,r0 - - ldq r3,32(r17) - addq r6,r0,r6 - ldq r4,32(r18) - cmpult r6,r0,r1 - addq r5,r6,r6 - cmpult r6,r5,r0 - stq r6,24(r16) - bis r0,r1,r0 - - addq r17,32,r17 - addq r18,32,r18 - addq r16,32,r16 - bne r19,$Loop - -$Lend: addq r4,r0,r4 - cmpult r4,r0,r1 - addq r3,r4,r4 - cmpult r4,r3,r0 - stq r4,0(r16) - bis r0,r1,r0 +$Lret: bis r25,r31,r0 C return cy ret r31,(r26),1 EPILOGUE(mpn_add_n) ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/com.asm gmp-5.0.2+dfsg/mpn/alpha/com.asm --- gmp-4.3.2+dfsg/mpn/alpha/com.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/com.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,165 @@ +dnl Alpha mpn_com -- mpn one's complement. + +dnl Copyright 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundation; either version 3 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C EV4: 4.75 +C EV5: 2.0 +C EV6: 1.5 + + +C mp_limb_t mpn_com (mp_ptr dst, mp_srcptr src, mp_size_t size); +C +C For ev5 the main loop is 7 cycles plus 1 taken branch bubble, for a total +C 2.0 c/l. In general, a pattern like this unrolled to N limbs per loop +C will be 1.5+2/N c/l. +C +C 2 cycles of loop control are unavoidable, for pointer updates and the +C taken branch bubble, but also since ldq cannot issue two cycles after stq +C (and with a run of stqs that means neither of two cycles at the end of the +C loop. +C +C The fbeq is forced into the second cycle of the loop using unops, since +C the first time through it must wait for the cvtqt result. Once that +C result is ready (a 1 cycle stall) then both the branch and following loads +C can issue together. +C +C The main loop handles an odd count of limbs, being two limbs loaded before +C each size test, plus one pipelined around from the previous iteration (or +C setup in the entry sequence). +C +C An even number of limbs is handled by an explicit dst[0]=~src[0] in the +C entry sequence, and an increment of the pointers. For an odd size there's +C no increment and the first store in the loop (r24) is a repeat of dst[0]. +C +C Note that the load for r24 after the possible pointer increment is done +C before the explicit store to dst[0], in case src==dst. + + +ASM_START() + +FLOAT64(L(dat), 2.0) + + ALIGN(16) + +PROLOGUE(mpn_com,gp) + + C r16 dst + C r17 src + C r18 size + + lda r30, -16(r30) C temporary stack space + lda r7, -3(r18) C size - 3 + + ldq r20, 0(r17) C src[0] + srl r7, 1, r6 C (size-3)/2 + + stq r6, 8(r30) C (size-3)/2 + and r7, 1, r5 C 1 if size even + + LEA( r8, L(dat)) + s8addq r5, r17, r17 C skip src[0] if even + + ornot r31, r20, r20 C ~src[0] + unop + + ldt f0, 8(r30) C (size-3)/2 + ldq r24, 0(r17) C src[0 or 1] + + stq r20, 0(r16) C dst[0] + s8addq r5, r16, r19 C skip dst[0] if even + + ldt f1, 0(r8) C data 2.0 + lda r30, 16(r30) C restore stack + unop + cvtqt f0, f0 C (size-3)/2 as float + + ornot r31, r24, r24 + blt r7, L(done_1) C if size<=2 + unop + unop + + + C 16-byte alignment here +L(top): + C r17 src, incrementing + C r19 dst, incrementing + C r24 dst[i] result, ready to store + C f0 (size-3)/2, decrementing + C f1 2.0 + + ldq r20, 8(r17) C src[i+1] + ldq r21, 16(r17) C src[i+2] + unop + unop + + fbeq f0, L(done_2) + unop + ldq r22, 24(r17) C src[i+3] + ldq r23, 32(r17) C src[i+4] + + stq r24, 0(r19) C dst[i] + ornot r31, r20, r20 + subt f0, f1, f0 C count -= 2 + unop + + stq r20, 8(r19) C dst[i+1] + ornot r31, r21, r21 + unop + unop + + stq r21, 16(r19) C dst[i+2] + ornot r31, r22, r22 + + stq r22, 24(r19) C dst[i+3] + ornot r31, r23, r24 + + lda r17, 32(r17) C src += 4 + lda r19, 32(r19) C dst += 4 + unop + fbge f0, L(top) + + +L(done_1): + C r19 &dst[size-1] + C r24 result for dst[size-1] + + stq r24, 0(r19) C dst[size-1] + ret r31, (r26), 1 + + +L(done_2): + C r19 &dst[size-3] + C r20 src[size-2] + C r21 src[size-1] + C r24 result for dst[size-3] + + stq r24, 0(r19) C dst[size-3] + ornot r31, r20, r20 + + stq r20, 8(r19) C dst[size-2] + ornot r31, r21, r21 + + stq r21, 16(r19) C dst[size-1] + ret r31, (r26), 1 + +EPILOGUE() +ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/diveby3.asm gmp-5.0.2+dfsg/mpn/alpha/diveby3.asm --- gmp-4.3.2+dfsg/mpn/alpha/diveby3.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/diveby3.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,322 +0,0 @@ -dnl Alpha mpn_divexact_by3c -- mpn division by 3, expecting no remainder. - -dnl Copyright 2004, 2005 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C EV4: 22 -C EV5: 11.5 -C EV6: 6.3 - -C TODO -C * Trim this to 6.0 c/l for ev6. -C * Write special ev5 version, should reach 9 c/l, and could be smaller. -C * Try prefetch for destination, using lds. -C * Improve feed-in code, by moving initial mulq earlier; make initial load -C to u0/u0 to save some copying. -C * Combine u0 and u2, u1 and u3. - -C INPUT PARAMETERS -define(`rp', `r16') -define(`up', `r17') -define(`n', `r18') -define(`cy', `r19') - -ASM_START() - -DATASTART(L(LC)) - .quad 0xAAAAAAAAAAAAAAAB - .quad 0x5555555555555555 - .quad 0xAAAAAAAAAAAAAAAA -DATAEND() - -define(`xAAAAAAAAAAAAAAAB', `r20') -define(`x5555555555555555', `r21') -define(`xAAAAAAAAAAAAAAAA', `r22') -define(`u0', `r0') define(`u1', `r1') -define(`u2', `r2') define(`u3', `r3') -define(`l0', `r25') define(`x', `r8') -define(`q0', `r4') define(`q1', `r5') -define(`p6', `r6') define(`p7', `r7') -define(`t0', `r23') define(`t1', `r24') -define(`cymask',`r28') - - -PROLOGUE(mpn_divexact_by3c,gp) - - ldq r28, 0(up) C load first limb early - -C Put magic constants in registers - lda r0, L(LC) - ldq xAAAAAAAAAAAAAAAB, 0(r0) - ldq x5555555555555555, 8(r0) - ldq xAAAAAAAAAAAAAAAA, 16(r0) - -C Compute initial l0 value - cmpeq cy, 1, p6 - cmpeq cy, 2, p7 - negq p6, p6 - and p6, x5555555555555555, l0 - cmovne p7, xAAAAAAAAAAAAAAAA, l0 - -C Feed-in depending on (n mod 4) - and n, 3, r8 - lda n, -3(n) - cmpeq r8, 1, r4 - cmpeq r8, 2, r5 - bne r4, $Lb01 - bne r5, $Lb10 - beq r8, $Lb00 - -$Lb11: ldq u3, 8(up) - lda up, -24(up) - lda rp, -24(rp) - mulq r28, xAAAAAAAAAAAAAAAB, q0 - mov r28, u2 - br r31, $L11 - -$Lb00: ldq u2, 8(up) - lda up, -16(up) - lda rp, -16(rp) - mulq r28, xAAAAAAAAAAAAAAAB, q1 - mov r28, u1 - br r31, $L00 - -$Lb01: lda rp, -8(rp) - mulq r28, xAAAAAAAAAAAAAAAB, q0 - mov r28, u0 - blt n, $Lcj1 - ldq u1, 8(up) - lda up, -8(up) - br r31, $L01 - -$Lb10: ldq u0, 8(up) - mulq r28, xAAAAAAAAAAAAAAAB, q1 - mov r28, u3 - blt n, $Lend - - ALIGN(16) -$Ltop: -C 0 - cmpult u3, cy, cy C L0 - mulq u0, xAAAAAAAAAAAAAAAB, q0 C U1 - ldq u1, 16(up) C L1 - addq q1, l0, x C U0 -C 1 - negq cy, cymask C L0 - unop C U1 - unop C L1 - cmpult x5555555555555555, x, p6 C U0 -C 2 - cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 - unop - unop - negq p6, t0 C L0 -C 3 - negq p7, t1 C L0 - and cymask, x5555555555555555, l0 C U1 - addq p6, cy, cy - and t0, x5555555555555555, t0 -C 4 - and t1, x5555555555555555, t1 - addq p7, cy, cy - unop - addq t0, l0, l0 -C 5 - addq t1, l0, l0 - unop - stq x, 0(rp) C L1 - unop -$L01: -C 0 - cmpult u0, cy, cy C L0 - mulq u1, xAAAAAAAAAAAAAAAB, q1 C U1 - ldq u2, 24(up) C L1 - addq q0, l0, x C U0 -C 1 - negq cy, cymask C L0 - unop C U1 - unop C L1 - cmpult x5555555555555555, x, p6 C U0 -C 2 - cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 - unop - unop - negq p6, t0 C L0 -C 3 - negq p7, t1 C L0 - and cymask, x5555555555555555, l0 C U1 - addq p6, cy, cy - and t0, x5555555555555555, t0 -C 4 - and t1, x5555555555555555, t1 - addq p7, cy, cy - unop - addq t0, l0, l0 -C 5 - addq t1, l0, l0 - unop - stq x, 8(rp) C L1 - unop -$L00: -C 0 - cmpult u1, cy, cy C L0 - mulq u2, xAAAAAAAAAAAAAAAB, q0 C U1 - ldq u3, 32(up) C L1 - addq q1, l0, x C U0 -C 1 - negq cy, cymask C L0 - unop C U1 - unop C L1 - cmpult x5555555555555555, x, p6 C U0 -C 2 - cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 - unop - unop - negq p6, t0 C L0 -C 3 - negq p7, t1 C L0 - and cymask, x5555555555555555, l0 C U1 - addq p6, cy, cy - and t0, x5555555555555555, t0 -C 4 - and t1, x5555555555555555, t1 - addq p7, cy, cy - unop - addq t0, l0, l0 -C 5 - addq t1, l0, l0 - unop - stq x, 16(rp) C L1 - unop -$L11: -C 0 - cmpult u2, cy, cy C L0 - mulq u3, xAAAAAAAAAAAAAAAB, q1 C U1 - ldq u0, 40(up) C L1 - addq q0, l0, x C U0 -C 1 - negq cy, cymask C L0 - unop C U1 - unop C L1 - cmpult x5555555555555555, x, p6 C U0 -C 2 - cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 - lda n, -4(n) C L1 bookkeeping - unop - negq p6, t0 C L0 -C 3 - negq p7, t1 C L0 - and cymask, x5555555555555555, l0 C U1 - addq p6, cy, cy - and t0, x5555555555555555, t0 -C 4 - and t1, x5555555555555555, t1 - addq p7, cy, cy - unop - addq t0, l0, l0 -C 5 - addq t1, l0, l0 - unop - stq x, 24(rp) C L1 - lda up, 32(up) -C - ldl r31, 256(up) C prefetch - unop - lda rp, 32(rp) - bge n, $Ltop C U1 -C *** MAIN LOOP END *** -$Lend: - - cmpult u3, cy, cy C L0 - mulq u0, xAAAAAAAAAAAAAAAB, q0 C U1 - unop - addq q1, l0, x C U0 -C 1 - negq cy, cymask C L0 - unop C U1 - unop C L1 - cmpult x5555555555555555, x, p6 C U0 -C 2 - cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 - unop - unop - negq p6, t0 C L0 -C 3 - negq p7, t1 C L0 - and cymask, x5555555555555555, l0 C U1 - addq p6, cy, cy - and t0, x5555555555555555, t0 -C 4 - and t1, x5555555555555555, t1 - addq p7, cy, cy - unop - addq t0, l0, l0 -C 5 - addq t1, l0, l0 - unop - stq x, 0(rp) C L1 - unop -$Lcj1: - cmpult u0, cy, cy C L0 - addq q0, l0, x C U0 - cmpult x5555555555555555, x, p6 C U0 - cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 - addq p6, cy, cy - addq p7, cy, r0 - stq x, 8(rp) C L1 - - ret r31,(r26),1 -EPILOGUE() -ASM_END() - -C This is useful for playing with various schedules. -C Expand as: one(0)one(1)one(2)one(3) -define(`one',` -C 0 - cmpult `$'eval(($1+3)%4), cy, cy C L0 - mulq `$'$1, xAAAAAAAAAAAAAAAB, `$'eval(4+$1%2) C U1 - ldq `$'eval(($1+1)%4), eval($1*8+16)(up) C L1 - addq `$'eval(4+($1+1)%2), l0, x C U0 -C 1 - negq cy, cymask C L0 - unop C U1 - unop C L1 - cmpult x5555555555555555, x, p6 C U0 -C 2 - cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 - unop - unop - negq p6, t0 C L0 -C 3 - negq p7, t1 C L0 - and cymask, x5555555555555555, l0 C U1 - addq p6, cy, cy - and t0, x5555555555555555, t0 -C 4 - and t1, x5555555555555555, t1 - addq p7, cy, cy - unop - addq t0, l0, l0 -C 5 - addq t1, l0, l0 - unop - stq x, eval($1*8)(rp) C L1 - unop -') diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev5/add_n.asm gmp-5.0.2+dfsg/mpn/alpha/ev5/add_n.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev5/add_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev5/add_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -dnl Alpha EV5 mpn_add_n -- Add two limb vectors of the same length > 0 and -dnl store sum in a third limb vector. - -dnl Copyright 1995, 1999, 2000, 2005 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C EV4: ? -C EV5: 4.75 -C EV6: 3 - -dnl INPUT PARAMETERS -dnl res_ptr r16 -dnl s1_ptr r17 -dnl s2_ptr r18 -dnl size r19 - -ASM_START() -PROLOGUE(mpn_add_n) - bis r31,r31,r25 C clear cy - subq r19,4,r19 C decr loop cnt - blt r19,$Lend2 C if less than 4 limbs, goto 2nd loop -C Start software pipeline for 1st loop - ldq r0,0(r18) - ldq r4,0(r17) - ldq r1,8(r18) - ldq r5,8(r17) - addq r17,32,r17 C update s1_ptr - ldq r2,16(r18) - addq r0,r4,r20 C 1st main add - ldq r3,24(r18) - subq r19,4,r19 C decr loop cnt - ldq r6,-16(r17) - cmpult r20,r0,r25 C compute cy from last add - ldq r7,-8(r17) - addq r1,r5,r28 C 2nd main add - addq r18,32,r18 C update s2_ptr - addq r28,r25,r21 C 2nd carry add - cmpult r28,r5,r8 C compute cy from last add - blt r19,$Lend1 C if less than 4 limbs remain, jump -C 1st loop handles groups of 4 limbs in a software pipeline - ALIGN(16) -$Loop: cmpult r21,r28,r25 C compute cy from last add - ldq r0,0(r18) - bis r8,r25,r25 C combine cy from the two adds - ldq r1,8(r18) - addq r2,r6,r28 C 3rd main add - ldq r4,0(r17) - addq r28,r25,r22 C 3rd carry add - ldq r5,8(r17) - cmpult r28,r6,r8 C compute cy from last add - cmpult r22,r28,r25 C compute cy from last add - stq r20,0(r16) - bis r8,r25,r25 C combine cy from the two adds - stq r21,8(r16) - addq r3,r7,r28 C 4th main add - addq r28,r25,r23 C 4th carry add - cmpult r28,r7,r8 C compute cy from last add - cmpult r23,r28,r25 C compute cy from last add - addq r17,32,r17 C update s1_ptr - bis r8,r25,r25 C combine cy from the two adds - addq r16,32,r16 C update res_ptr - addq r0,r4,r28 C 1st main add - ldq r2,16(r18) - addq r25,r28,r20 C 1st carry add - ldq r3,24(r18) - cmpult r28,r4,r8 C compute cy from last add - ldq r6,-16(r17) - cmpult r20,r28,r25 C compute cy from last add - ldq r7,-8(r17) - bis r8,r25,r25 C combine cy from the two adds - subq r19,4,r19 C decr loop cnt - stq r22,-16(r16) - addq r1,r5,r28 C 2nd main add - stq r23,-8(r16) - addq r25,r28,r21 C 2nd carry add - addq r18,32,r18 C update s2_ptr - cmpult r28,r5,r8 C compute cy from last add - bge r19,$Loop -C Finish software pipeline for 1st loop -$Lend1: cmpult r21,r28,r25 C compute cy from last add - bis r8,r25,r25 C combine cy from the two adds - addq r2,r6,r28 C 3rd main add - addq r28,r25,r22 C 3rd carry add - cmpult r28,r6,r8 C compute cy from last add - cmpult r22,r28,r25 C compute cy from last add - stq r20,0(r16) - bis r8,r25,r25 C combine cy from the two adds - stq r21,8(r16) - addq r3,r7,r28 C 4th main add - addq r28,r25,r23 C 4th carry add - cmpult r28,r7,r8 C compute cy from last add - cmpult r23,r28,r25 C compute cy from last add - bis r8,r25,r25 C combine cy from the two adds - addq r16,32,r16 C update res_ptr - stq r22,-16(r16) - stq r23,-8(r16) -$Lend2: addq r19,4,r19 C restore loop cnt - beq r19,$Lret -C Start software pipeline for 2nd loop - ldq r0,0(r18) - ldq r4,0(r17) - subq r19,1,r19 - beq r19,$Lend0 -C 2nd loop handles remaining 1-3 limbs - ALIGN(16) -$Loop0: addq r0,r4,r28 C main add - ldq r0,8(r18) - cmpult r28,r4,r8 C compute cy from last add - ldq r4,8(r17) - addq r28,r25,r20 C carry add - addq r18,8,r18 - addq r17,8,r17 - stq r20,0(r16) - cmpult r20,r28,r25 C compute cy from last add - subq r19,1,r19 C decr loop cnt - bis r8,r25,r25 C combine cy from the two adds - addq r16,8,r16 - bne r19,$Loop0 -$Lend0: addq r0,r4,r28 C main add - addq r28,r25,r20 C carry add - cmpult r28,r4,r8 C compute cy from last add - cmpult r20,r28,r25 C compute cy from last add - stq r20,0(r16) - bis r8,r25,r25 C combine cy from the two adds - -$Lret: bis r25,r31,r0 C return cy - ret r31,(r26),1 -EPILOGUE(mpn_add_n) -ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev5/com_n.asm gmp-5.0.2+dfsg/mpn/alpha/ev5/com_n.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev5/com_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev5/com_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,165 +0,0 @@ -dnl Alpha EV5 mpn_com_n -- mpn one's complement. - -dnl Copyright 2003 Free Software Foundation, Inc. -dnl -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C cycles/limb -C EV4: 4.75 -C EV5: 2.0 -C EV6: 1.5 - - -C mp_limb_t mpn_com_n (mp_ptr dst, mp_srcptr src, mp_size_t size); -C -C For ev5 the main loop is 7 cycles plus 1 taken branch bubble, for a total -C 2.0 c/l. In general, a pattern like this unrolled to N limbs per loop -C will be 1.5+2/N c/l. -C -C 2 cycles of loop control are unavoidable, for pointer updates and the -C taken branch bubble, but also since ldq cannot issue two cycles after stq -C (and with a run of stqs that means neither of two cycles at the end of the -C loop. -C -C The fbeq is forced into the second cycle of the loop using unops, since -C the first time through it must wait for the cvtqt result. Once that -C result is ready (a 1 cycle stall) then both the branch and following loads -C can issue together. -C -C The main loop handles an odd count of limbs, being two limbs loaded before -C each size test, plus one pipelined around from the previous iteration (or -C setup in the entry sequence). -C -C An even number of limbs is handled by an explicit dst[0]=~src[0] in the -C entry sequence, and an increment of the pointers. For an odd size there's -C no increment and the first store in the loop (r24) is a repeat of dst[0]. -C -C Note that the load for r24 after the possible pointer increment is done -C before the explicit store to dst[0], in case src==dst. - - -ASM_START() - -FLOAT64(L(dat), 2.0) - - ALIGN(16) - -PROLOGUE(mpn_com_n,gp) - - C r16 dst - C r17 src - C r18 size - - lda r30, -16(r30) C temporary stack space - lda r7, -3(r18) C size - 3 - - ldq r20, 0(r17) C src[0] - srl r7, 1, r6 C (size-3)/2 - - stq r6, 8(r30) C (size-3)/2 - and r7, 1, r5 C 1 if size even - - LEA( r8, L(dat)) - s8addq r5, r17, r17 C skip src[0] if even - - ornot r31, r20, r20 C ~src[0] - unop - - ldt f0, 8(r30) C (size-3)/2 - ldq r24, 0(r17) C src[0 or 1] - - stq r20, 0(r16) C dst[0] - s8addq r5, r16, r19 C skip dst[0] if even - - ldt f1, 0(r8) C data 2.0 - lda r30, 16(r30) C restore stack - unop - cvtqt f0, f0 C (size-3)/2 as float - - ornot r31, r24, r24 - blt r7, L(done_1) C if size<=2 - unop - unop - - - C 16-byte alignment here -L(top): - C r17 src, incrementing - C r19 dst, incrementing - C r24 dst[i] result, ready to store - C f0 (size-3)/2, decrementing - C f1 2.0 - - ldq r20, 8(r17) C src[i+1] - ldq r21, 16(r17) C src[i+2] - unop - unop - - fbeq f0, L(done_2) - unop - ldq r22, 24(r17) C src[i+3] - ldq r23, 32(r17) C src[i+4] - - stq r24, 0(r19) C dst[i] - ornot r31, r20, r20 - subt f0, f1, f0 C count -= 2 - unop - - stq r20, 8(r19) C dst[i+1] - ornot r31, r21, r21 - unop - unop - - stq r21, 16(r19) C dst[i+2] - ornot r31, r22, r22 - - stq r22, 24(r19) C dst[i+3] - ornot r31, r23, r24 - - lda r17, 32(r17) C src += 4 - lda r19, 32(r19) C dst += 4 - unop - fbge f0, L(top) - - -L(done_1): - C r19 &dst[size-1] - C r24 result for dst[size-1] - - stq r24, 0(r19) C dst[size-1] - ret r31, (r26), 1 - - -L(done_2): - C r19 &dst[size-3] - C r20 src[size-2] - C r21 src[size-1] - C r24 result for dst[size-3] - - stq r24, 0(r19) C dst[size-3] - ornot r31, r20, r20 - - stq r20, 8(r19) C dst[size-2] - ornot r31, r21, r21 - - stq r21, 16(r19) C dst[size-1] - ret r31, (r26), 1 - -EPILOGUE() -ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev5/diveby3.asm gmp-5.0.2+dfsg/mpn/alpha/ev5/diveby3.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev5/diveby3.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev5/diveby3.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,321 @@ +dnl Alpha mpn_divexact_by3c -- mpn division by 3, expecting no remainder. + +dnl Copyright 2004, 2005, 2009 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + +C cycles/limb +C EV4: 22 +C EV5: 11.5 +C EV6: 6.3 Note that mpn_bdiv_dbm1c is faster + +C TODO +C * Remove the unops, they benefit just ev6, which no longer uses this file. +C * Try prefetch for destination, using lds. +C * Improve feed-in code, by moving initial mulq earlier; make initial load +C to u0/u0 to save some copying. +C * Combine u0 and u2, u1 and u3. + +C INPUT PARAMETERS +define(`rp', `r16') +define(`up', `r17') +define(`n', `r18') +define(`cy', `r19') + +ASM_START() + +DATASTART(L(LC)) + .quad 0xAAAAAAAAAAAAAAAB + .quad 0x5555555555555555 + .quad 0xAAAAAAAAAAAAAAAA +DATAEND() + +define(`xAAAAAAAAAAAAAAAB', `r20') +define(`x5555555555555555', `r21') +define(`xAAAAAAAAAAAAAAAA', `r22') +define(`u0', `r0') define(`u1', `r1') +define(`u2', `r2') define(`u3', `r3') +define(`l0', `r25') define(`x', `r8') +define(`q0', `r4') define(`q1', `r5') +define(`p6', `r6') define(`p7', `r7') +define(`t0', `r23') define(`t1', `r24') +define(`cymask',`r28') + + +PROLOGUE(mpn_divexact_by3c,gp) + + ldq r28, 0(up) C load first limb early + +C Put magic constants in registers + lda r0, L(LC) + ldq xAAAAAAAAAAAAAAAB, 0(r0) + ldq x5555555555555555, 8(r0) + ldq xAAAAAAAAAAAAAAAA, 16(r0) + +C Compute initial l0 value + cmpeq cy, 1, p6 + cmpeq cy, 2, p7 + negq p6, p6 + and p6, x5555555555555555, l0 + cmovne p7, xAAAAAAAAAAAAAAAA, l0 + +C Feed-in depending on (n mod 4) + and n, 3, r8 + lda n, -3(n) + cmpeq r8, 1, r4 + cmpeq r8, 2, r5 + bne r4, $Lb01 + bne r5, $Lb10 + beq r8, $Lb00 + +$Lb11: ldq u3, 8(up) + lda up, -24(up) + lda rp, -24(rp) + mulq r28, xAAAAAAAAAAAAAAAB, q0 + mov r28, u2 + br r31, $L11 + +$Lb00: ldq u2, 8(up) + lda up, -16(up) + lda rp, -16(rp) + mulq r28, xAAAAAAAAAAAAAAAB, q1 + mov r28, u1 + br r31, $L00 + +$Lb01: lda rp, -8(rp) + mulq r28, xAAAAAAAAAAAAAAAB, q0 + mov r28, u0 + blt n, $Lcj1 + ldq u1, 8(up) + lda up, -8(up) + br r31, $L01 + +$Lb10: ldq u0, 8(up) + mulq r28, xAAAAAAAAAAAAAAAB, q1 + mov r28, u3 + blt n, $Lend + + ALIGN(16) +$Ltop: +C 0 + cmpult u3, cy, cy C L0 + mulq u0, xAAAAAAAAAAAAAAAB, q0 C U1 + ldq u1, 16(up) C L1 + addq q1, l0, x C U0 +C 1 + negq cy, cymask C L0 + unop C U1 + unop C L1 + cmpult x5555555555555555, x, p6 C U0 +C 2 + cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 + unop + unop + negq p6, t0 C L0 +C 3 + negq p7, t1 C L0 + and cymask, x5555555555555555, l0 C U1 + addq p6, cy, cy + and t0, x5555555555555555, t0 +C 4 + and t1, x5555555555555555, t1 + addq p7, cy, cy + unop + addq t0, l0, l0 +C 5 + addq t1, l0, l0 + unop + stq x, 0(rp) C L1 + unop +$L01: +C 0 + cmpult u0, cy, cy C L0 + mulq u1, xAAAAAAAAAAAAAAAB, q1 C U1 + ldq u2, 24(up) C L1 + addq q0, l0, x C U0 +C 1 + negq cy, cymask C L0 + unop C U1 + unop C L1 + cmpult x5555555555555555, x, p6 C U0 +C 2 + cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 + unop + unop + negq p6, t0 C L0 +C 3 + negq p7, t1 C L0 + and cymask, x5555555555555555, l0 C U1 + addq p6, cy, cy + and t0, x5555555555555555, t0 +C 4 + and t1, x5555555555555555, t1 + addq p7, cy, cy + unop + addq t0, l0, l0 +C 5 + addq t1, l0, l0 + unop + stq x, 8(rp) C L1 + unop +$L00: +C 0 + cmpult u1, cy, cy C L0 + mulq u2, xAAAAAAAAAAAAAAAB, q0 C U1 + ldq u3, 32(up) C L1 + addq q1, l0, x C U0 +C 1 + negq cy, cymask C L0 + unop C U1 + unop C L1 + cmpult x5555555555555555, x, p6 C U0 +C 2 + cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 + unop + unop + negq p6, t0 C L0 +C 3 + negq p7, t1 C L0 + and cymask, x5555555555555555, l0 C U1 + addq p6, cy, cy + and t0, x5555555555555555, t0 +C 4 + and t1, x5555555555555555, t1 + addq p7, cy, cy + unop + addq t0, l0, l0 +C 5 + addq t1, l0, l0 + unop + stq x, 16(rp) C L1 + unop +$L11: +C 0 + cmpult u2, cy, cy C L0 + mulq u3, xAAAAAAAAAAAAAAAB, q1 C U1 + ldq u0, 40(up) C L1 + addq q0, l0, x C U0 +C 1 + negq cy, cymask C L0 + unop C U1 + unop C L1 + cmpult x5555555555555555, x, p6 C U0 +C 2 + cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 + lda n, -4(n) C L1 bookkeeping + unop + negq p6, t0 C L0 +C 3 + negq p7, t1 C L0 + and cymask, x5555555555555555, l0 C U1 + addq p6, cy, cy + and t0, x5555555555555555, t0 +C 4 + and t1, x5555555555555555, t1 + addq p7, cy, cy + unop + addq t0, l0, l0 +C 5 + addq t1, l0, l0 + unop + stq x, 24(rp) C L1 + lda up, 32(up) +C + ldl r31, 256(up) C prefetch + unop + lda rp, 32(rp) + bge n, $Ltop C U1 +C *** MAIN LOOP END *** +$Lend: + + cmpult u3, cy, cy C L0 + mulq u0, xAAAAAAAAAAAAAAAB, q0 C U1 + unop + addq q1, l0, x C U0 +C 1 + negq cy, cymask C L0 + unop C U1 + unop C L1 + cmpult x5555555555555555, x, p6 C U0 +C 2 + cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 + unop + unop + negq p6, t0 C L0 +C 3 + negq p7, t1 C L0 + and cymask, x5555555555555555, l0 C U1 + addq p6, cy, cy + and t0, x5555555555555555, t0 +C 4 + and t1, x5555555555555555, t1 + addq p7, cy, cy + unop + addq t0, l0, l0 +C 5 + addq t1, l0, l0 + unop + stq x, 0(rp) C L1 + unop +$Lcj1: + cmpult u0, cy, cy C L0 + addq q0, l0, x C U0 + cmpult x5555555555555555, x, p6 C U0 + cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 + addq p6, cy, cy + addq p7, cy, r0 + stq x, 8(rp) C L1 + + ret r31,(r26),1 +EPILOGUE() +ASM_END() + +C This is useful for playing with various schedules. +C Expand as: one(0)one(1)one(2)one(3) +define(`one',` +C 0 + cmpult `$'eval(($1+3)%4), cy, cy C L0 + mulq `$'$1, xAAAAAAAAAAAAAAAB, `$'eval(4+$1%2) C U1 + ldq `$'eval(($1+1)%4), eval($1*8+16)(up) C L1 + addq `$'eval(4+($1+1)%2), l0, x C U0 +C 1 + negq cy, cymask C L0 + unop C U1 + unop C L1 + cmpult x5555555555555555, x, p6 C U0 +C 2 + cmpult xAAAAAAAAAAAAAAAA, x, p7 C U1 + unop + unop + negq p6, t0 C L0 +C 3 + negq p7, t1 C L0 + and cymask, x5555555555555555, l0 C U1 + addq p6, cy, cy + and t0, x5555555555555555, t0 +C 4 + and t1, x5555555555555555, t1 + addq p7, cy, cy + unop + addq t0, l0, l0 +C 5 + addq t1, l0, l0 + unop + stq x, eval($1*8)(rp) C L1 + unop +') diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev5/gmp-mparam.h gmp-5.0.2+dfsg/mpn/alpha/ev5/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/alpha/ev5/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev5/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* Alpha EV5 gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2008, 2009 -Free Software Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2008, 2009, +2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,64 +18,155 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 /* 600 MHz 21164A */ -/* Generated by tuneup.c, 2009-01-15, gcc 3.4 */ - -#define MUL_KARATSUBA_THRESHOLD 14 -#define MUL_TOOM3_THRESHOLD 74 -#define MUL_TOOM44_THRESHOLD 118 - -#define SQR_BASECASE_THRESHOLD 4 -#define SQR_KARATSUBA_THRESHOLD 28 -#define SQR_TOOM3_THRESHOLD 77 -#define SQR_TOOM4_THRESHOLD 136 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 44 -#define MULLOW_MUL_N_THRESHOLD 246 - -#define DIV_SB_PREINV_THRESHOLD 0 /* preinv always */ -#define DIV_DC_THRESHOLD 53 -#define POWM_THRESHOLD 85 - -#define MATRIX22_STRASSEN_THRESHOLD 17 -#define HGCD_THRESHOLD 104 -#define GCD_DC_THRESHOLD 321 -#define GCDEXT_DC_THRESHOLD 298 -#define JACOBI_BASE_METHOD 3 - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 13 -#define MOD_1_2_THRESHOLD 14 -#define MOD_1_4_THRESHOLD 16 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define USE_PREINV_MOD_1 1 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 20 -#define GET_STR_PRECOMPUTE_THRESHOLD 32 -#define SET_STR_DC_THRESHOLD 532 -#define SET_STR_PRECOMPUTE_THRESHOLD 1501 - -#define MUL_FFT_TABLE { 240, 480, 1344, 1792, 5120, 20480, 81920, 196608, 0 } -#define MUL_FFT_MODF_THRESHOLD 240 -#define MUL_FFT_THRESHOLD 1920 - -#define SQR_FFT_TABLE { 240, 480, 1216, 1792, 5120, 12288, 81920, 196608, 0 } -#define SQR_FFT_MODF_THRESHOLD 208 -#define SQR_FFT_THRESHOLD 1408 - -/* These tables need to be updated. */ - -#define MUL_FFT_TABLE2 {{1, 4}, {177, 5}, {193, 4}, {209, 5}, {353, 6}, {385, 5}, {417, 6}, {833, 7}, {897, 6}, {961, 7}, {1025, 6}, {1089, 7}, {1665, 8}, {1793, 7}, {2177, 8}, {2305, 7}, {2433, 8}, {2817, 7}, {2945, 8}, {3329, 9}, {3457, 8}, {4865, 9}, {5633, 8}, {6401, 10}, {7169, 9}, {11777, 10}, {12801, 9}, {13825, 10}, {15361, 9}, {19969, 10}, {23553, 9}, {24065, 11}, {30721, 10}, {48129, 11}, {63489, 10}, {72705, 11}, {96257, 12}, {126977, 11}, {194561, 12}, {258049, 11}, {325633, 12}, {389121, 13}, {516097, 12}, {MP_SIZE_T_MAX,0}} - -#define SQR_FFT_TABLE2 {{1, 4}, {177, 5}, {193, 4}, {209, 5}, {353, 6}, {385, 5}, {417, 6}, {961, 7}, {1025, 6}, {1089, 7}, {1153, 6}, {1217, 7}, {1665, 8}, {1793, 7}, {2177, 8}, {2305, 7}, {2561, 8}, {2817, 7}, {2945, 8}, {3329, 9}, {3585, 8}, {5377, 9}, {5633, 8}, {6401, 9}, {6657, 10}, {6913, 9}, {11777, 10}, {13313, 9}, {13825, 10}, {15361, 9}, {18945, 10}, {19457, 9}, {19969, 10}, {23553, 9}, {24065, 11}, {30721, 10}, {48129, 11}, {53249, 10}, {56321, 11}, {63489, 10}, {72705, 11}, {73729, 10}, {79873, 11}, {96257, 12}, {126977, 11}, {194561, 12}, {258049, 11}, {325633, 12}, {389121, 13}, {516097, 12}, {1699841, 13}, {1708033, 12}, {1732609, 13}, {1748993, 12}, {1757185, 13}, {1773569, 12}, {1777665, 13}, {1781761, 12}, {1789953, 13}, {1806337, 12}, {1818625, 13}, {1822721, 12}, {1826817, 13}, {1830913, 12}, {1961985, 13}, {MP_SIZE_T_MAX,0}} +#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ +#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 32 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 2 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 7 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 18 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 73 +#define USE_PREINV_DIVREM_1 1 /* preinv always */ +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD 87 + +#define MUL_TOOM22_THRESHOLD 16 +#define MUL_TOOM33_THRESHOLD 53 +#define MUL_TOOM44_THRESHOLD 121 +#define MUL_TOOM6H_THRESHOLD 173 +#define MUL_TOOM8H_THRESHOLD 236 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 81 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 91 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 81 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 56 + +#define SQR_BASECASE_THRESHOLD 5 +#define SQR_TOOM2_THRESHOLD 28 +#define SQR_TOOM3_THRESHOLD 78 +#define SQR_TOOM4_THRESHOLD 136 +#define SQR_TOOM6_THRESHOLD 180 +#define SQR_TOOM8_THRESHOLD 260 + +#define MULMOD_BNM1_THRESHOLD 11 +#define SQRMOD_BNM1_THRESHOLD 17 + +#define MUL_FFT_MODF_THRESHOLD 244 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 244, 5}, { 11, 6}, { 6, 5}, { 13, 6}, \ + { 7, 5}, { 15, 6}, { 13, 7}, { 7, 6}, \ + { 15, 7}, { 8, 6}, { 17, 7}, { 9, 6}, \ + { 19, 7}, { 13, 8}, { 7, 7}, { 17, 8}, \ + { 9, 7}, { 20, 8}, { 11, 7}, { 23, 8}, \ + { 13, 7}, { 27, 9}, { 7, 8}, { 21, 9}, \ + { 11, 8}, { 25,10}, { 7, 9}, { 15, 8}, \ + { 33, 9}, { 23,10}, { 15, 9}, { 39,10}, \ + { 23, 9}, { 47,11}, { 15,10}, { 31, 9}, \ + { 67,10}, { 39, 9}, { 79,10}, { 47, 9}, \ + { 95,10}, { 55,11}, { 31,10}, { 63, 9}, \ + { 127,10}, { 71, 9}, { 143, 8}, { 287,10}, \ + { 79,11}, { 47,10}, { 95, 9}, { 191,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255,10}, \ + { 143, 9}, { 287,11}, { 79,10}, { 159, 9}, \ + { 319, 8}, { 639,10}, { 175,11}, { 95,10}, \ + { 191, 9}, { 383,10}, { 207, 9}, { 415,11}, \ + { 111,12}, { 63,11}, { 127,10}, { 255,11}, \ + { 143,10}, { 287, 9}, { 575,11}, { 159,10}, \ + { 319,11}, { 175,10}, { 351,12}, { 95,11}, \ + { 191,10}, { 383,11}, { 207,10}, { 415,11}, \ + { 223,13}, { 63,12}, { 127,11}, { 255,10}, \ + { 511,11}, { 287,10}, { 575,12}, { 159,11}, \ + { 319,10}, { 639,11}, { 351,10}, { 703,12}, \ + { 191,11}, { 415,12}, { 223,11}, { 447,13}, \ + { 127,12}, { 255,11}, { 511,12}, { 287,11}, \ + { 575,12}, { 319,11}, { 639,12}, { 351,11}, \ + { 703,13}, { 191,12}, { 383,11}, { 767,12}, \ + { 415,11}, { 831,12}, { 447,14}, { 127,13}, \ + { 255,12}, { 575,13}, { 319,12}, { 703,13}, \ + { 383,12}, { 831,13}, { 447,12}, { 895,14}, \ + { 255,13}, { 511,12}, { 1023,13}, { 575,12}, \ + { 1151,13}, { 703,12}, { 1407,14}, { 16384,15}, \ + { 32768,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ + { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ + {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 141 +#define MUL_FFT_THRESHOLD 3008 + +#define SQR_FFT_MODF_THRESHOLD 220 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 220, 5}, { 13, 6}, { 15, 7}, { 8, 6}, \ + { 17, 7}, { 9, 6}, { 19, 7}, { 13, 8}, \ + { 7, 7}, { 17, 8}, { 9, 7}, { 20, 8}, \ + { 11, 7}, { 23, 8}, { 13, 7}, { 30, 8}, \ + { 19, 4}, { 319, 9}, { 11, 8}, { 25,10}, \ + { 7, 9}, { 15, 8}, { 31, 7}, { 64, 9}, \ + { 19, 8}, { 39, 7}, { 79, 9}, { 23, 8}, \ + { 47, 9}, { 27,10}, { 15, 9}, { 39,10}, \ + { 23, 9}, { 47,11}, { 15,10}, { 31, 9}, \ + { 67,10}, { 39, 9}, { 79,10}, { 47,11}, \ + { 31,10}, { 63, 9}, { 127,10}, { 71, 9}, \ + { 143, 8}, { 287,10}, { 79,11}, { 47,10}, \ + { 95, 9}, { 191,12}, { 31,11}, { 63,10}, \ + { 127, 9}, { 255,10}, { 143, 9}, { 287,11}, \ + { 79,10}, { 159, 9}, { 319,10}, { 175, 9}, \ + { 351,11}, { 95,10}, { 191, 9}, { 383,10}, \ + { 207,11}, { 111,12}, { 63,11}, { 127,10}, \ + { 255,11}, { 143,10}, { 287,11}, { 159,10}, \ + { 319,11}, { 175,10}, { 351,12}, { 95,11}, \ + { 191,10}, { 383,11}, { 207,10}, { 415,11}, \ + { 223,13}, { 63,12}, { 127,11}, { 255,10}, \ + { 511,11}, { 287,12}, { 159,11}, { 319,10}, \ + { 639,11}, { 351,12}, { 191,11}, { 383,10}, \ + { 767,11}, { 415,12}, { 223,11}, { 447,13}, \ + { 127,12}, { 255,11}, { 511,12}, { 287,11}, \ + { 575,12}, { 319,11}, { 639,12}, { 351,13}, \ + { 191,12}, { 383,11}, { 767,12}, { 415,11}, \ + { 831,12}, { 447,14}, { 127,13}, { 255,12}, \ + { 575,13}, { 319,12}, { 703,13}, { 383,12}, \ + { 831,13}, { 447,12}, { 895,14}, { 255,13}, \ + { 511,12}, { 1023,13}, { 575,12}, { 1151,13}, \ + { 703,14}, { 16384,15}, { 32768,16}, { 65536,17}, \ + { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ + {2097152,22}, {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 135 +#define SQR_FFT_THRESHOLD 2240 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 55 +#define MULLO_MUL_N_THRESHOLD 5558 + +#define DC_DIV_QR_THRESHOLD 55 +#define DC_DIVAPPR_Q_THRESHOLD 192 +#define DC_BDIV_QR_THRESHOLD 51 +#define DC_BDIV_Q_THRESHOLD 120 + +#define INV_MULMOD_BNM1_THRESHOLD 100 +#define INV_NEWTON_THRESHOLD 188 +#define INV_APPR_THRESHOLD 189 + +#define BINV_NEWTON_THRESHOLD 199 +#define REDC_1_TO_REDC_N_THRESHOLD 55 + +#define MU_DIV_QR_THRESHOLD 979 +#define MU_DIVAPPR_Q_THRESHOLD 998 +#define MUPI_DIV_QR_THRESHOLD 90 +#define MU_BDIV_QR_THRESHOLD 792 +#define MU_BDIV_Q_THRESHOLD 942 + +#define MATRIX22_STRASSEN_THRESHOLD 13 +#define HGCD_THRESHOLD 101 +#define GCD_DC_THRESHOLD 306 +#define GCDEXT_DC_THRESHOLD 210 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 16 +#define GET_STR_PRECOMPUTE_THRESHOLD 31 +#define SET_STR_DC_THRESHOLD 422 +#define SET_STR_PRECOMPUTE_THRESHOLD 1524 diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev5/lshift.asm gmp-5.0.2+dfsg/mpn/alpha/ev5/lshift.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev5/lshift.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev5/lshift.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,171 +0,0 @@ -dnl Alpha EV5 mpn_lshift -- Shift a number left. - -dnl Copyright 1994, 1995, 2000, 2003 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C EV4: ? -C EV5: 3.25 -C EV6: 1.75 - -C INPUT PARAMETERS -C rp r16 -C up r17 -C n r18 -C cnt r19 - - -ASM_START() -PROLOGUE(mpn_lshift) - s8addq r18,r17,r17 C make r17 point at end of s1 - ldq r4,-8(r17) C load first limb - subq r31,r19,r20 - s8addq r18,r16,r16 C make r16 point at end of RES - subq r18,1,r18 - and r18,4-1,r28 C number of limbs in first loop - srl r4,r20,r0 C compute function result - - beq r28,$L0 - subq r18,r28,r18 - - ALIGN(8) -$Loop0: ldq r3,-16(r17) - subq r16,8,r16 - sll r4,r19,r5 - subq r17,8,r17 - subq r28,1,r28 - srl r3,r20,r6 - bis r3,r3,r4 - bis r5,r6,r8 - stq r8,0(r16) - bne r28,$Loop0 - -$L0: sll r4,r19,r24 - beq r18,$Lend -C warm up phase 1 - ldq r1,-16(r17) - subq r18,4,r18 - ldq r2,-24(r17) - ldq r3,-32(r17) - ldq r4,-40(r17) - beq r18,$Lend1 -C warm up phase 2 - srl r1,r20,r7 - sll r1,r19,r21 - srl r2,r20,r8 - ldq r1,-48(r17) - sll r2,r19,r22 - ldq r2,-56(r17) - srl r3,r20,r5 - bis r7,r24,r7 - sll r3,r19,r23 - bis r8,r21,r8 - srl r4,r20,r6 - ldq r3,-64(r17) - sll r4,r19,r24 - ldq r4,-72(r17) - subq r18,4,r18 - beq r18,$Lend2 - ALIGN(16) -C main loop -$Loop: stq r7,-8(r16) - bis r5,r22,r5 - stq r8,-16(r16) - bis r6,r23,r6 - - srl r1,r20,r7 - subq r18,4,r18 - sll r1,r19,r21 - unop C ldq r31,-96(r17) - - srl r2,r20,r8 - ldq r1,-80(r17) - sll r2,r19,r22 - ldq r2,-88(r17) - - stq r5,-24(r16) - bis r7,r24,r7 - stq r6,-32(r16) - bis r8,r21,r8 - - srl r3,r20,r5 - unop C ldq r31,-96(r17) - sll r3,r19,r23 - subq r16,32,r16 - - srl r4,r20,r6 - ldq r3,-96(r17) - sll r4,r19,r24 - ldq r4,-104(r17) - - subq r17,32,r17 - bne r18,$Loop -C cool down phase 2/1 -$Lend2: stq r7,-8(r16) - bis r5,r22,r5 - stq r8,-16(r16) - bis r6,r23,r6 - srl r1,r20,r7 - sll r1,r19,r21 - srl r2,r20,r8 - sll r2,r19,r22 - stq r5,-24(r16) - bis r7,r24,r7 - stq r6,-32(r16) - bis r8,r21,r8 - srl r3,r20,r5 - sll r3,r19,r23 - srl r4,r20,r6 - sll r4,r19,r24 -C cool down phase 2/2 - stq r7,-40(r16) - bis r5,r22,r5 - stq r8,-48(r16) - bis r6,r23,r6 - stq r5,-56(r16) - stq r6,-64(r16) -C cool down phase 2/3 - stq r24,-72(r16) - ret r31,(r26),1 - -C cool down phase 1/1 -$Lend1: srl r1,r20,r7 - sll r1,r19,r21 - srl r2,r20,r8 - sll r2,r19,r22 - srl r3,r20,r5 - bis r7,r24,r7 - sll r3,r19,r23 - bis r8,r21,r8 - srl r4,r20,r6 - sll r4,r19,r24 -C cool down phase 1/2 - stq r7,-8(r16) - bis r5,r22,r5 - stq r8,-16(r16) - bis r6,r23,r6 - stq r5,-24(r16) - stq r6,-32(r16) - stq r24,-40(r16) - ret r31,(r26),1 - -$Lend: stq r24,-8(r16) - ret r31,(r26),1 -EPILOGUE(mpn_lshift) -ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev5/rshift.asm gmp-5.0.2+dfsg/mpn/alpha/ev5/rshift.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev5/rshift.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev5/rshift.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,169 +0,0 @@ -dnl Alpha EV5 mpn_rshift -- Shift a number right. - -dnl Copyright 1994, 1995, 2000 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C EV4: ? -C EV5: 3.25 -C EV6: 1.75 - -C INPUT PARAMETERS -C rp r16 -C up r17 -C n r18 -C cnt r19 - - -ASM_START() -PROLOGUE(mpn_rshift) - ldq r4,0(r17) C load first limb - subq r31,r19,r20 - subq r18,1,r18 - and r18,4-1,r28 C number of limbs in first loop - sll r4,r20,r0 C compute function result - - beq r28,$L0 - subq r18,r28,r18 - - ALIGN(8) -$Loop0: ldq r3,8(r17) - addq r16,8,r16 - srl r4,r19,r5 - addq r17,8,r17 - subq r28,1,r28 - sll r3,r20,r6 - bis r3,r3,r4 - bis r5,r6,r8 - stq r8,-8(r16) - bne r28,$Loop0 - -$L0: srl r4,r19,r24 - beq r18,$Lend -C warm up phase 1 - ldq r1,8(r17) - subq r18,4,r18 - ldq r2,16(r17) - ldq r3,24(r17) - ldq r4,32(r17) - beq r18,$Lend1 -C warm up phase 2 - sll r1,r20,r7 - srl r1,r19,r21 - sll r2,r20,r8 - ldq r1,40(r17) - srl r2,r19,r22 - ldq r2,48(r17) - sll r3,r20,r5 - bis r7,r24,r7 - srl r3,r19,r23 - bis r8,r21,r8 - sll r4,r20,r6 - ldq r3,56(r17) - srl r4,r19,r24 - ldq r4,64(r17) - subq r18,4,r18 - beq r18,$Lend2 - ALIGN(16) -C main loop -$Loop: stq r7,0(r16) - bis r5,r22,r5 - stq r8,8(r16) - bis r6,r23,r6 - - sll r1,r20,r7 - subq r18,4,r18 - srl r1,r19,r21 - unop C ldq r31,-96(r17) - - sll r2,r20,r8 - ldq r1,72(r17) - srl r2,r19,r22 - ldq r2,80(r17) - - stq r5,16(r16) - bis r7,r24,r7 - stq r6,24(r16) - bis r8,r21,r8 - - sll r3,r20,r5 - unop C ldq r31,-96(r17) - srl r3,r19,r23 - addq r16,32,r16 - - sll r4,r20,r6 - ldq r3,88(r17) - srl r4,r19,r24 - ldq r4,96(r17) - - addq r17,32,r17 - bne r18,$Loop -C cool down phase 2/1 -$Lend2: stq r7,0(r16) - bis r5,r22,r5 - stq r8,8(r16) - bis r6,r23,r6 - sll r1,r20,r7 - srl r1,r19,r21 - sll r2,r20,r8 - srl r2,r19,r22 - stq r5,16(r16) - bis r7,r24,r7 - stq r6,24(r16) - bis r8,r21,r8 - sll r3,r20,r5 - srl r3,r19,r23 - sll r4,r20,r6 - srl r4,r19,r24 -C cool down phase 2/2 - stq r7,32(r16) - bis r5,r22,r5 - stq r8,40(r16) - bis r6,r23,r6 - stq r5,48(r16) - stq r6,56(r16) -C cool down phase 2/3 - stq r24,64(r16) - ret r31,(r26),1 - -C cool down phase 1/1 -$Lend1: sll r1,r20,r7 - srl r1,r19,r21 - sll r2,r20,r8 - srl r2,r19,r22 - sll r3,r20,r5 - bis r7,r24,r7 - srl r3,r19,r23 - bis r8,r21,r8 - sll r4,r20,r6 - srl r4,r19,r24 -C cool down phase 1/2 - stq r7,0(r16) - bis r5,r22,r5 - stq r8,8(r16) - bis r6,r23,r6 - stq r5,16(r16) - stq r6,24(r16) - stq r24,32(r16) - ret r31,(r26),1 - -$Lend: stq r24,0(r16) - ret r31,(r26),1 -EPILOGUE(mpn_rshift) -ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev5/sub_n.asm gmp-5.0.2+dfsg/mpn/alpha/ev5/sub_n.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev5/sub_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev5/sub_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -dnl Alpha EV5 mpn_sub_n -- Subtract two limb vectors of the same length > 0 -dnl and store difference in a third limb vector. - -dnl Copyright 1995, 1999, 2000, 2005 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C EV4: ? -C EV5: 4.75 -C EV6: 3 - -dnl INPUT PARAMETERS -dnl res_ptr r16 -dnl s1_ptr r17 -dnl s2_ptr r18 -dnl size r19 - -ASM_START() -PROLOGUE(mpn_sub_n) - bis r31,r31,r25 C clear cy - subq r19,4,r19 C decr loop cnt - blt r19,$Lend2 C if less than 4 limbs, goto 2nd loop -C Start software pipeline for 1st loop - ldq r0,0(r18) - ldq r4,0(r17) - ldq r1,8(r18) - ldq r5,8(r17) - addq r17,32,r17 C update s1_ptr - ldq r2,16(r18) - subq r4,r0,r20 C 1st main subtract - ldq r3,24(r18) - subq r19,4,r19 C decr loop cnt - ldq r6,-16(r17) - cmpult r4,r0,r25 C compute cy from last subtract - ldq r7,-8(r17) - subq r5,r1,r28 C 2nd main subtract - addq r18,32,r18 C update s2_ptr - subq r28,r25,r21 C 2nd carry subtract - cmpult r5,r1,r8 C compute cy from last subtract - blt r19,$Lend1 C if less than 4 limbs remain, jump -C 1st loop handles groups of 4 limbs in a software pipeline - ALIGN(16) -$Loop: cmpult r28,r25,r25 C compute cy from last subtract - ldq r0,0(r18) - bis r8,r25,r25 C combine cy from the two subtracts - ldq r1,8(r18) - subq r6,r2,r28 C 3rd main subtract - ldq r4,0(r17) - subq r28,r25,r22 C 3rd carry subtract - ldq r5,8(r17) - cmpult r6,r2,r8 C compute cy from last subtract - cmpult r28,r25,r25 C compute cy from last subtract - stq r20,0(r16) - bis r8,r25,r25 C combine cy from the two subtracts - stq r21,8(r16) - subq r7,r3,r28 C 4th main subtract - subq r28,r25,r23 C 4th carry subtract - cmpult r7,r3,r8 C compute cy from last subtract - cmpult r28,r25,r25 C compute cy from last subtract - addq r17,32,r17 C update s1_ptr - bis r8,r25,r25 C combine cy from the two subtracts - addq r16,32,r16 C update res_ptr - subq r4,r0,r28 C 1st main subtract - ldq r2,16(r18) - subq r28,r25,r20 C 1st carry subtract - ldq r3,24(r18) - cmpult r4,r0,r8 C compute cy from last subtract - ldq r6,-16(r17) - cmpult r28,r25,r25 C compute cy from last subtract - ldq r7,-8(r17) - bis r8,r25,r25 C combine cy from the two subtracts - subq r19,4,r19 C decr loop cnt - stq r22,-16(r16) - subq r5,r1,r28 C 2nd main subtract - stq r23,-8(r16) - subq r28,r25,r21 C 2nd carry subtract - addq r18,32,r18 C update s2_ptr - cmpult r5,r1,r8 C compute cy from last subtract - bge r19,$Loop -C Finish software pipeline for 1st loop -$Lend1: cmpult r28,r25,r25 C compute cy from last subtract - bis r8,r25,r25 C combine cy from the two subtracts - subq r6,r2,r28 C cy add - subq r28,r25,r22 C 3rd main subtract - cmpult r6,r2,r8 C compute cy from last subtract - cmpult r28,r25,r25 C compute cy from last subtract - stq r20,0(r16) - bis r8,r25,r25 C combine cy from the two subtracts - stq r21,8(r16) - subq r7,r3,r28 C cy add - subq r28,r25,r23 C 4th main subtract - cmpult r7,r3,r8 C compute cy from last subtract - cmpult r28,r25,r25 C compute cy from last subtract - bis r8,r25,r25 C combine cy from the two subtracts - addq r16,32,r16 C update res_ptr - stq r22,-16(r16) - stq r23,-8(r16) -$Lend2: addq r19,4,r19 C restore loop cnt - beq r19,$Lret -C Start software pipeline for 2nd loop - ldq r0,0(r18) - ldq r4,0(r17) - subq r19,1,r19 - beq r19,$Lend0 -C 2nd loop handles remaining 1-3 limbs - ALIGN(16) -$Loop0: subq r4,r0,r28 C main subtract - cmpult r4,r0,r8 C compute cy from last subtract - ldq r0,8(r18) - ldq r4,8(r17) - subq r28,r25,r20 C carry subtract - addq r18,8,r18 - addq r17,8,r17 - stq r20,0(r16) - cmpult r28,r25,r25 C compute cy from last subtract - subq r19,1,r19 C decr loop cnt - bis r8,r25,r25 C combine cy from the two subtracts - addq r16,8,r16 - bne r19,$Loop0 -$Lend0: subq r4,r0,r28 C main subtract - subq r28,r25,r20 C carry subtract - cmpult r4,r0,r8 C compute cy from last subtract - cmpult r28,r25,r25 C compute cy from last subtract - stq r20,0(r16) - bis r8,r25,r25 C combine cy from the two subtracts - -$Lret: bis r25,r31,r0 C return cy - ret r31,(r26),1 -EPILOGUE(mpn_sub_n) -ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev6/gmp-mparam.h gmp-5.0.2+dfsg/mpn/alpha/ev6/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/alpha/ev6/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev6/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2008, 2009 -Free Software Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2005, 2008, 2009, +2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,59 +18,164 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 #define DIVEXACT_BY3_METHOD 0 /* override ../diveby3.asm */ -/* 500 MHz 21164 */ +/* 500 MHz 21164 (agnesi.math.su.se) */ -/* Generated by tuneup.c, 2009-01-12, gcc 3.3 */ +/* Generated by tuneup.c, 2009-11-29, gcc 3.3 */ -#define MUL_KARATSUBA_THRESHOLD 31 -#define MUL_TOOM3_THRESHOLD 101 -#define MUL_TOOM44_THRESHOLD 168 - -#define SQR_BASECASE_THRESHOLD 6 -#define SQR_KARATSUBA_THRESHOLD 60 -#define SQR_TOOM3_THRESHOLD 102 -#define SQR_TOOM4_THRESHOLD 172 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 102 -#define MULLOW_MUL_N_THRESHOLD 399 - -#define DIV_SB_PREINV_THRESHOLD 0 /* preinv always */ -#define DIV_DC_THRESHOLD 134 -#define POWM_THRESHOLD 257 - -#define MATRIX22_STRASSEN_THRESHOLD 19 -#define HGCD_THRESHOLD 303 -#define GCD_DC_THRESHOLD 1258 -#define GCDEXT_DC_THRESHOLD 807 -#define JACOBI_BASE_METHOD 3 - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 13 -#define MOD_1_2_THRESHOLD 14 -#define MOD_1_4_THRESHOLD 40 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define USE_PREINV_MOD_1 1 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 16 -#define GET_STR_PRECOMPUTE_THRESHOLD 23 -#define SET_STR_DC_THRESHOLD 4615 -#define SET_STR_PRECOMPUTE_THRESHOLD 8178 - -#define MUL_FFT_TABLE { 432, 864, 1856, 3840, 11264, 28672, 81920, 327680, 0 } -#define MUL_FFT_MODF_THRESHOLD 448 -#define MUL_FFT_THRESHOLD 4992 - -#define SQR_FFT_TABLE { 432, 864, 1728, 3840, 9216, 20480, 81920, 327680, 786432, 0 } -#define SQR_FFT_MODF_THRESHOLD 344 -#define SQR_FFT_THRESHOLD 3712 +#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ +#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 4 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 2 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 6 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 30 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 10 +#define USE_PREINV_DIVREM_1 1 /* preinv always */ +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD 16 + +#define MUL_TOOM22_THRESHOLD 35 +#define MUL_TOOM33_THRESHOLD 74 +#define MUL_TOOM44_THRESHOLD 178 +#define MUL_TOOM6H_THRESHOLD 288 +#define MUL_TOOM8H_THRESHOLD 333 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 75 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 101 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 105 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 105 + +#define SQR_BASECASE_THRESHOLD 5 +#define SQR_TOOM2_THRESHOLD 61 +#define SQR_TOOM3_THRESHOLD 107 +#define SQR_TOOM4_THRESHOLD 170 +#define SQR_TOOM6_THRESHOLD 309 +#define SQR_TOOM8_THRESHOLD 360 + +#define MULMOD_BNM1_THRESHOLD 20 +#define SQRMOD_BNM1_THRESHOLD 23 + +#define MUL_FFT_MODF_THRESHOLD 480 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 480, 5}, { 18, 6}, { 10, 5}, { 21, 6}, \ + { 11, 5}, { 23, 6}, { 12, 5}, { 25, 6}, \ + { 19, 7}, { 10, 6}, { 25, 7}, { 13, 6}, \ + { 27, 7}, { 14, 6}, { 29, 7}, { 25, 8}, \ + { 13, 7}, { 29, 8}, { 15, 7}, { 32, 8}, \ + { 17, 7}, { 35, 8}, { 19, 7}, { 39, 8}, \ + { 29, 9}, { 15, 8}, { 37, 9}, { 19, 8}, \ + { 41, 9}, { 23, 8}, { 51, 9}, { 27, 8}, \ + { 55, 9}, { 31, 8}, { 63, 9}, { 35, 8}, \ + { 71, 9}, { 39,10}, { 23, 9}, { 55,10}, \ + { 31, 9}, { 67,10}, { 39, 9}, { 83,10}, \ + { 47, 9}, { 99,10}, { 55,11}, { 31,10}, \ + { 79,11}, { 47,10}, { 103,12}, { 31,11}, \ + { 63,10}, { 135,11}, { 79,10}, { 167,11}, \ + { 95,10}, { 191,11}, { 111,12}, { 63,11}, \ + { 127,10}, { 255,11}, { 143,10}, { 287, 9}, \ + { 575,11}, { 159,10}, { 319,12}, { 95,11}, \ + { 191,10}, { 383,11}, { 207,13}, { 63,12}, \ + { 127,11}, { 255,10}, { 511,11}, { 271,10}, \ + { 543,11}, { 287,10}, { 575,12}, { 159,11}, \ + { 319,10}, { 639,11}, { 351,10}, { 703,12}, \ + { 191,11}, { 383,10}, { 767,11}, { 415,10}, \ + { 831,11}, { 447,13}, { 127,12}, { 255,11}, \ + { 543,12}, { 287,11}, { 575,10}, { 1151,12}, \ + { 319,11}, { 639,12}, { 351,11}, { 703,13}, \ + { 191,12}, { 383,11}, { 767,12}, { 415,11}, \ + { 831,12}, { 447,11}, { 895,14}, { 127,13}, \ + { 255,12}, { 543,11}, { 1087,12}, { 575,11}, \ + { 1151,12}, { 607,13}, { 319,12}, { 671,11}, \ + { 1343,12}, { 703,13}, { 383,12}, { 831,13}, \ + { 447,12}, { 927,14}, { 255,13}, { 511,12}, \ + { 1087,13}, { 575,12}, { 1151,13}, { 639,12}, \ + { 1279,13}, { 703,12}, { 1407,14}, { 383,13}, \ + { 767,15}, { 255,14}, { 511,13}, { 1215,14}, \ + { 639,13}, { 1407,14}, { 767,13}, { 1663,14}, \ + { 895,13}, { 1791,15}, { 32768,16}, { 65536,17}, \ + { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ + {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 151 +#define MUL_FFT_THRESHOLD 5760 + +#define SQR_FFT_MODF_THRESHOLD 476 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 476, 5}, { 19, 6}, { 10, 5}, { 23, 6}, \ + { 12, 5}, { 25, 6}, { 27, 7}, { 14, 6}, \ + { 29, 7}, { 28, 8}, { 15, 7}, { 31, 8}, \ + { 29, 9}, { 15, 8}, { 35, 9}, { 19, 8}, \ + { 41, 9}, { 23, 8}, { 49, 9}, { 27,10}, \ + { 15, 9}, { 35, 8}, { 71, 9}, { 39,10}, \ + { 23, 9}, { 51,11}, { 15,10}, { 31, 9}, \ + { 67,10}, { 39, 9}, { 79,10}, { 47, 9}, \ + { 95,10}, { 55,11}, { 31,10}, { 79,11}, \ + { 47,10}, { 103,12}, { 31,11}, { 63,10}, \ + { 135,11}, { 79,10}, { 159, 9}, { 319,11}, \ + { 95,10}, { 191, 9}, { 383,11}, { 111,12}, \ + { 63,11}, { 127,10}, { 255, 9}, { 511,10}, \ + { 271,11}, { 143,10}, { 287, 9}, { 575,10}, \ + { 303,11}, { 159,10}, { 319,12}, { 95,11}, \ + { 191,10}, { 383, 9}, { 767,13}, { 63,12}, \ + { 127,11}, { 255,10}, { 511,11}, { 271,10}, \ + { 543,11}, { 287,10}, { 575,11}, { 303,12}, \ + { 159,11}, { 319,10}, { 639,11}, { 335,10}, \ + { 671,11}, { 351,10}, { 703,11}, { 367,10}, \ + { 735,12}, { 191,11}, { 383,10}, { 767,11}, \ + { 415,10}, { 831,11}, { 447,10}, { 895,13}, \ + { 127,12}, { 255,11}, { 543,12}, { 287,11}, \ + { 575,10}, { 1151,11}, { 607,12}, { 319,11}, \ + { 671,12}, { 351,11}, { 735,13}, { 191,12}, \ + { 383,11}, { 767,12}, { 415,11}, { 831,12}, \ + { 447,11}, { 895,12}, { 479,14}, { 127,13}, \ + { 255,12}, { 575,11}, { 1151,12}, { 607,13}, \ + { 319,12}, { 735,13}, { 383,12}, { 831,13}, \ + { 447,12}, { 959,14}, { 255,13}, { 511,12}, \ + { 1023,13}, { 575,12}, { 1215,13}, { 639,12}, \ + { 1279,13}, { 703,12}, { 1407,14}, { 383,13}, \ + { 767,12}, { 1535,13}, { 831,12}, { 1663,13}, \ + { 895,12}, { 1791,15}, { 255,14}, { 511,13}, \ + { 1215,14}, { 639,13}, { 1407,14}, { 767,13}, \ + { 1663,14}, { 895,13}, { 1791,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 152 +#define SQR_FFT_THRESHOLD 3136 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 130 +#define MULLO_MUL_N_THRESHOLD 15604 + +#define DC_DIV_QR_THRESHOLD 119 +#define DC_DIVAPPR_Q_THRESHOLD 390 +#define DC_BDIV_QR_THRESHOLD 110 +#define DC_BDIV_Q_THRESHOLD 318 + +#define INV_MULMOD_BNM1_THRESHOLD 109 +#define INV_NEWTON_THRESHOLD 390 +#define INV_APPR_THRESHOLD 372 + +#define BINV_NEWTON_THRESHOLD 393 +#define REDC_1_TO_REDC_N_THRESHOLD 110 + +#define MU_DIV_QR_THRESHOLD 1718 +#define MU_DIVAPPR_Q_THRESHOLD 1895 +#define MUPI_DIV_QR_THRESHOLD 180 +#define MU_BDIV_QR_THRESHOLD 1387 +#define MU_BDIV_Q_THRESHOLD 1652 + +#define MATRIX22_STRASSEN_THRESHOLD 17 +#define HGCD_THRESHOLD 282 +#define GCD_DC_THRESHOLD 1138 +#define GCDEXT_DC_THRESHOLD 773 +#define JACOBI_BASE_METHOD 3 + +#define GET_STR_DC_THRESHOLD 14 +#define GET_STR_PRECOMPUTE_THRESHOLD 19 +#define SET_STR_DC_THRESHOLD 3754 +#define SET_STR_PRECOMPUTE_THRESHOLD 8097 diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev6/mul_1.asm gmp-5.0.2+dfsg/mpn/alpha/ev6/mul_1.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev6/mul_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev6/mul_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -49,7 +49,7 @@ C C We're doing 7 of the 8 carry propagations with a br fixup code and 1 with a C put-the-carry-into-hi. The idea is that these branches are very rarely -C taken, and since a non-taken branch consumes no resurces, that is better +C taken, and since a non-taken branch consumes no resources, that is better C than an addq. C C Software pipeline: a load in cycle #09, feeds a mul in cycle #16, feeds an @@ -126,7 +126,7 @@ mulq r2,r19,r3 C r3 = prod_low umulh r2,r19,r21 C r21 = prod_high beq r20,$Le1b C jump if size was == 1 - bis r31, r31, r0 C FIXME: shouldtn't need this + bis r31, r31, r0 C FIXME: shouldn't need this ldq r2,0(r17) C r2 = s1_limb lda r17,8(r17) C s1_ptr++ lda r20,-1(r20) C size-- diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev6/nails/addmul_1.asm gmp-5.0.2+dfsg/mpn/alpha/ev6/nails/addmul_1.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev6/nails/addmul_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev6/nails/addmul_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -25,7 +25,7 @@ C EV6: 4 C TODO -C * Reroll loop for 3.75 c/l with current 4-way unrulling. +C * Reroll loop for 3.75 c/l with current 4-way unrolling. C * The loop is overscheduled wrt loads and wrt multiplies, in particular C umulh. C * Use FP loop count and multiple exit points, that would simplify feed-in lp0 diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev6/nails/gmp-mparam.h gmp-5.0.2+dfsg/mpn/alpha/ev6/nails/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/alpha/ev6/nails/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev6/nails/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,16 +18,16 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 /* Generated by tuneup.c, 2004-02-07, gcc 3.3 */ -#define MUL_KARATSUBA_THRESHOLD 40 -#define MUL_TOOM3_THRESHOLD 236 +#define MUL_TOOM22_THRESHOLD 40 +#define MUL_TOOM33_THRESHOLD 236 #define SQR_BASECASE_THRESHOLD 7 /* karatsuba */ -#define SQR_KARATSUBA_THRESHOLD 0 /* never sqr_basecase */ +#define SQR_TOOM2_THRESHOLD 0 /* never sqr_basecase */ #define SQR_TOOM3_THRESHOLD 120 #define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX /* no preinv with nails */ diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev6/nails/mul_1.asm gmp-5.0.2+dfsg/mpn/alpha/ev6/nails/mul_1.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev6/nails/mul_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev6/nails/mul_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -25,10 +25,10 @@ C EV6: 3.25 C TODO -C * Reroll loop for 3.0 c/l with current 4-way unrulling. +C * Reroll loop for 3.0 c/l with current 4-way unrolling. C * The loop is overscheduled wrt loads and wrt multiplies, in particular C umulh. -C * Use FP loop count and multiple exit points, that would simpily feed-in lp0 +C * Use FP loop count and multiple exit points, that would simplify feed-in lp0 C and would work since the loop structure is really regular. C INPUT PARAMETERS diff -Nru gmp-4.3.2+dfsg/mpn/alpha/ev6/nails/submul_1.asm gmp-5.0.2+dfsg/mpn/alpha/ev6/nails/submul_1.asm --- gmp-4.3.2+dfsg/mpn/alpha/ev6/nails/submul_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/ev6/nails/submul_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -25,10 +25,10 @@ C EV6: 4 C TODO -C * Reroll loop for 3.75 c/l with current 4-way unrulling. +C * Reroll loop for 3.75 c/l with current 4-way unrolling. C * The loop is overscheduled wrt loads and wrt multiplies, in particular C umulh. -C * Use FP loop count and multiple exit points, that would simpily feed-in lp0 +C * Use FP loop count and multiple exit points, that would simplify feed-in lp0 C and would work since the loop structure is really regular. C INPUT PARAMETERS diff -Nru gmp-4.3.2+dfsg/mpn/alpha/gmp-mparam.h gmp-5.0.2+dfsg/mpn/alpha/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/alpha/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 @@ -26,18 +26,18 @@ /* Generated by tuneup.c, 2009-01-15, gcc 3.2 */ -#define MUL_KARATSUBA_THRESHOLD 12 -#define MUL_TOOM3_THRESHOLD 69 +#define MUL_TOOM22_THRESHOLD 12 +#define MUL_TOOM33_THRESHOLD 69 #define MUL_TOOM44_THRESHOLD 88 #define SQR_BASECASE_THRESHOLD 4 -#define SQR_KARATSUBA_THRESHOLD 20 +#define SQR_TOOM2_THRESHOLD 20 #define SQR_TOOM3_THRESHOLD 62 #define SQR_TOOM4_THRESHOLD 155 -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 40 -#define MULLOW_MUL_N_THRESHOLD 202 +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 40 +#define MULLO_MUL_N_THRESHOLD 202 #define DIV_SB_PREINV_THRESHOLD 0 /* preinv always */ #define DIV_DC_THRESHOLD 38 diff -Nru gmp-4.3.2+dfsg/mpn/alpha/lshift.asm gmp-5.0.2+dfsg/mpn/alpha/lshift.asm --- gmp-4.3.2+dfsg/mpn/alpha/lshift.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/lshift.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl Alpha mpn_lshift -- Shift a number left. -dnl Copyright 1994, 1995, 2000, 2002, 2003 Free Software Foundation, Inc. +dnl Copyright 1994, 1995, 2000, 2003, 2009 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -20,9 +20,9 @@ include(`../config.m4') C cycles/limb -C EV4: 4.75 -C EV5: 4 -C EV6: 2 +C EV4: ? +C EV5: 3.25 +C EV6: 1.75 C INPUT PARAMETERS C rp r16 @@ -35,63 +35,137 @@ PROLOGUE(mpn_lshift) s8addq r18,r17,r17 C make r17 point at end of s1 ldq r4,-8(r17) C load first limb - subq r17,8,r17 - subq r31,r19,r7 + subq r31,r19,r20 s8addq r18,r16,r16 C make r16 point at end of RES subq r18,1,r18 - and r18,4-1,r20 C number of limbs in first loop - srl r4,r7,r0 C compute function result + and r18,4-1,r28 C number of limbs in first loop + srl r4,r20,r0 C compute function result - beq r20,$L0 - subq r18,r20,r18 + beq r28,L(L0) + subq r18,r28,r18 ALIGN(8) -$Loop0: ldq r3,-8(r17) +L(top0): + ldq r3,-16(r17) subq r16,8,r16 - subq r17,8,r17 - subq r20,1,r20 sll r4,r19,r5 - srl r3,r7,r6 + subq r17,8,r17 + subq r28,1,r28 + srl r3,r20,r6 bis r3,r3,r4 bis r5,r6,r8 stq r8,0(r16) - bne r20,$Loop0 - -$L0: beq r18,$Lend + bne r28,L(top0) - ALIGN(8) -$Loop: ldq r3,-8(r17) - subq r16,32,r16 +L(L0): sll r4,r19,r24 + beq r18,L(end) +C warm up phase 1 + ldq r1,-16(r17) subq r18,4,r18 - sll r4,r19,r5 - srl r3,r7,r6 + ldq r2,-24(r17) + ldq r3,-32(r17) + ldq r4,-40(r17) +C warm up phase 2 + srl r1,r20,r7 + sll r1,r19,r21 + srl r2,r20,r8 + beq r18,L(end1) + ldq r1,-48(r17) + sll r2,r19,r22 + ldq r2,-56(r17) + srl r3,r20,r5 + bis r7,r24,r7 + sll r3,r19,r23 + bis r8,r21,r8 + srl r4,r20,r6 + ldq r3,-64(r17) + sll r4,r19,r24 + ldq r4,-72(r17) + subq r18,4,r18 + beq r18,L(end2) + ALIGN(16) +C main loop +L(top): stq r7,-8(r16) + bis r5,r22,r5 + stq r8,-16(r16) + bis r6,r23,r6 - ldq r4,-16(r17) - sll r3,r19,r1 - bis r5,r6,r8 - stq r8,24(r16) - srl r4,r7,r2 + srl r1,r20,r7 + subq r18,4,r18 + sll r1,r19,r21 + unop C ldq r31,-96(r17) - ldq r3,-24(r17) - sll r4,r19,r5 - bis r1,r2,r8 - stq r8,16(r16) - srl r3,r7,r6 + srl r2,r20,r8 + ldq r1,-80(r17) + sll r2,r19,r22 + ldq r2,-88(r17) + + stq r5,-24(r16) + bis r7,r24,r7 + stq r6,-32(r16) + bis r8,r21,r8 + + srl r3,r20,r5 + unop C ldq r31,-96(r17) + sll r3,r19,r23 + subq r16,32,r16 - ldq r4,-32(r17) - sll r3,r19,r1 - bis r5,r6,r8 - stq r8,8(r16) - srl r4,r7,r2 + srl r4,r20,r6 + ldq r3,-96(r17) + sll r4,r19,r24 + ldq r4,-104(r17) subq r17,32,r17 - bis r1,r2,r8 - stq r8,0(r16) + bne r18,L(top) +C cool down phase 2/1 +L(end2): + stq r7,-8(r16) + bis r5,r22,r5 + stq r8,-16(r16) + bis r6,r23,r6 + srl r1,r20,r7 + sll r1,r19,r21 + srl r2,r20,r8 + sll r2,r19,r22 + stq r5,-24(r16) + bis r7,r24,r7 + stq r6,-32(r16) + bis r8,r21,r8 + srl r3,r20,r5 + sll r3,r19,r23 + srl r4,r20,r6 + sll r4,r19,r24 +C cool down phase 2/2 + stq r7,-40(r16) + bis r5,r22,r5 + stq r8,-48(r16) + bis r6,r23,r6 + stq r5,-56(r16) + stq r6,-64(r16) +C cool down phase 2/3 + stq r24,-72(r16) + ret r31,(r26),1 - bgt r18,$Loop +C cool down phase 1/1 +L(end1): + sll r2,r19,r22 + srl r3,r20,r5 + bis r7,r24,r7 + sll r3,r19,r23 + bis r8,r21,r8 + srl r4,r20,r6 + sll r4,r19,r24 +C cool down phase 1/2 + stq r7,-8(r16) + bis r5,r22,r5 + stq r8,-16(r16) + bis r6,r23,r6 + stq r5,-24(r16) + stq r6,-32(r16) + stq r24,-40(r16) + ret r31,(r26),1 -$Lend: sll r4,r19,r8 - stq r8,-8(r16) +L(end): stq r24,-8(r16) ret r31,(r26),1 EPILOGUE(mpn_lshift) ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/README gmp-5.0.2+dfsg/mpn/alpha/README --- gmp-4.3.2+dfsg/mpn/alpha/README 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/README 2011-05-08 09:49:29.000000000 +0000 @@ -36,7 +36,7 @@ them to "$6" or "$f6" where necessary. "0x" introduces a hex constant in gas and DEC as, but on Unicos "^X" is -required. The X() macro accomodates this difference. +required. The X() macro accommodates this difference. "cvttqc" is required by DEC as, "cvttq/c" is required by Unicos, and gas will accept either. We use cvttqc and have an m4 define expand to cvttq/c where @@ -60,7 +60,7 @@ EV4 1. This chip has very limited store bandwidth. The on-chip L1 cache is write- - through, and a cache line is transfered from the store buffer to the off- + through, and a cache line is transferred from the store buffer to the off- chip L2 in as much 15 cycles on most systems. This delay hurts mpn_add_n, mpn_sub_n, mpn_lshift, and mpn_rshift. diff -Nru gmp-4.3.2+dfsg/mpn/alpha/rshift.asm gmp-5.0.2+dfsg/mpn/alpha/rshift.asm --- gmp-4.3.2+dfsg/mpn/alpha/rshift.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/rshift.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl Alpha mpn_rshift -- Shift a number right. -dnl Copyright 1994, 1995, 2000, 2002 Free Software Foundation, Inc. +dnl Copyright 1994, 1995, 2000, 2009 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -20,9 +20,9 @@ include(`../config.m4') C cycles/limb -C EV4: 4.75 -C EV5: 3.75 -C EV6: 2 +C EV4: ? +C EV5: 3.25 +C EV6: 1.75 C INPUT PARAMETERS C rp r16 @@ -34,62 +34,136 @@ ASM_START() PROLOGUE(mpn_rshift) ldq r4,0(r17) C load first limb - addq r17,8,r17 - subq r31,r19,r7 + subq r31,r19,r20 subq r18,1,r18 - and r18,4-1,r20 C number of limbs in first loop - sll r4,r7,r0 C compute function result + and r18,4-1,r28 C number of limbs in first loop + sll r4,r20,r0 C compute function result - beq r20,$L0 - subq r18,r20,r18 + beq r28,L(L0) + subq r18,r28,r18 ALIGN(8) -$Loop0: ldq r3,0(r17) +L(top0): + ldq r3,8(r17) addq r16,8,r16 - addq r17,8,r17 - subq r20,1,r20 srl r4,r19,r5 - sll r3,r7,r6 + addq r17,8,r17 + subq r28,1,r28 + sll r3,r20,r6 bis r3,r3,r4 bis r5,r6,r8 stq r8,-8(r16) - bne r20,$Loop0 - -$L0: beq r18,$Lend + bne r28,L(top0) - ALIGN(8) -$Loop: ldq r3,0(r17) - addq r16,32,r16 +L(L0): srl r4,r19,r24 + beq r18,L(end) +C warm up phase 1 + ldq r1,8(r17) subq r18,4,r18 - srl r4,r19,r5 - sll r3,r7,r6 + ldq r2,16(r17) + ldq r3,24(r17) + ldq r4,32(r17) +C warm up phase 2 + sll r1,r20,r7 + srl r1,r19,r21 + sll r2,r20,r8 + beq r18,L(end1) + ldq r1,40(r17) + srl r2,r19,r22 + ldq r2,48(r17) + sll r3,r20,r5 + bis r7,r24,r7 + srl r3,r19,r23 + bis r8,r21,r8 + sll r4,r20,r6 + ldq r3,56(r17) + srl r4,r19,r24 + ldq r4,64(r17) + subq r18,4,r18 + beq r18,L(end2) + ALIGN(16) +C main loop +L(top): stq r7,0(r16) + bis r5,r22,r5 + stq r8,8(r16) + bis r6,r23,r6 - ldq r4,8(r17) - srl r3,r19,r1 - bis r5,r6,r8 - stq r8,-32(r16) - sll r4,r7,r2 + sll r1,r20,r7 + subq r18,4,r18 + srl r1,r19,r21 + unop C ldq r31,-96(r17) - ldq r3,16(r17) - srl r4,r19,r5 - bis r1,r2,r8 - stq r8,-24(r16) - sll r3,r7,r6 + sll r2,r20,r8 + ldq r1,72(r17) + srl r2,r19,r22 + ldq r2,80(r17) + + stq r5,16(r16) + bis r7,r24,r7 + stq r6,24(r16) + bis r8,r21,r8 + + sll r3,r20,r5 + unop C ldq r31,-96(r17) + srl r3,r19,r23 + addq r16,32,r16 - ldq r4,24(r17) - srl r3,r19,r1 - bis r5,r6,r8 - stq r8,-16(r16) - sll r4,r7,r2 + sll r4,r20,r6 + ldq r3,88(r17) + srl r4,r19,r24 + ldq r4,96(r17) addq r17,32,r17 - bis r1,r2,r8 - stq r8,-8(r16) + bne r18,L(top) +C cool down phase 2/1 +L(end2): + stq r7,0(r16) + bis r5,r22,r5 + stq r8,8(r16) + bis r6,r23,r6 + sll r1,r20,r7 + srl r1,r19,r21 + sll r2,r20,r8 + srl r2,r19,r22 + stq r5,16(r16) + bis r7,r24,r7 + stq r6,24(r16) + bis r8,r21,r8 + sll r3,r20,r5 + srl r3,r19,r23 + sll r4,r20,r6 + srl r4,r19,r24 +C cool down phase 2/2 + stq r7,32(r16) + bis r5,r22,r5 + stq r8,40(r16) + bis r6,r23,r6 + stq r5,48(r16) + stq r6,56(r16) +C cool down phase 2/3 + stq r24,64(r16) + ret r31,(r26),1 - bgt r18,$Loop +C cool down phase 1/1 +L(end1): + srl r2,r19,r22 + sll r3,r20,r5 + bis r7,r24,r7 + srl r3,r19,r23 + bis r8,r21,r8 + sll r4,r20,r6 + srl r4,r19,r24 +C cool down phase 1/2 + stq r7,0(r16) + bis r5,r22,r5 + stq r8,8(r16) + bis r6,r23,r6 + stq r5,16(r16) + stq r6,24(r16) + stq r24,32(r16) + ret r31,(r26),1 -$Lend: srl r4,r19,r8 - stq r8,0(r16) +L(end): stq r24,0(r16) ret r31,(r26),1 EPILOGUE(mpn_rshift) ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/alpha/sub_n.asm gmp-5.0.2+dfsg/mpn/alpha/sub_n.asm --- gmp-4.3.2+dfsg/mpn/alpha/sub_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/alpha/sub_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ -dnl Alpha mpn_sub_n -- Subtract two limb vectors of the same length > 0 and -dnl store difference in a third limb vector. +dnl Alpha mpn_sub_n -- Subtract two limb vectors of the same length > 0 +dnl and store difference in a third limb vector. -dnl Copyright 1995, 2000, 2002, 2005 Free Software Foundation, Inc. +dnl Copyright 1995, 1999, 2000, 2005 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -21,97 +21,126 @@ include(`../config.m4') C cycles/limb -C EV4: 7.75 -C EV5: 5.75 -C EV6: 4 - -C INPUT PARAMETERS -C rp r16 -C up r17 -C vp r18 -C n r19 +C EV4: ? +C EV5: 4.75 +C EV6: 3 + +dnl INPUT PARAMETERS +dnl res_ptr r16 +dnl s1_ptr r17 +dnl s2_ptr r18 +dnl size r19 ASM_START() PROLOGUE(mpn_sub_n) - ldq r3,0(r17) - ldq r4,0(r18) - - subq r19,1,r19 - and r19,4-1,r2 C number of limbs in first loop - bis r31,r31,r0 - beq r2,$L0 C if multiple of 4 limbs, skip first loop - - subq r19,r2,r19 - -$Loop0: subq r2,1,r2 + bis r31,r31,r25 C clear cy + subq r19,4,r19 C decr loop cnt + blt r19,$Lend2 C if less than 4 limbs, goto 2nd loop +C Start software pipeline for 1st loop + ldq r0,0(r18) + ldq r4,0(r17) + ldq r1,8(r18) ldq r5,8(r17) - addq r4,r0,r4 - ldq r6,8(r18) - cmpult r4,r0,r1 - subq r3,r4,r4 - cmpult r3,r4,r0 - stq r4,0(r16) - bis r0,r1,r0 - - addq r17,8,r17 + addq r17,32,r17 C update s1_ptr + ldq r2,16(r18) + subq r4,r0,r20 C 1st main subtract + ldq r3,24(r18) + subq r19,4,r19 C decr loop cnt + ldq r6,-16(r17) + cmpult r4,r0,r25 C compute cy from last subtract + ldq r7,-8(r17) + subq r5,r1,r28 C 2nd main subtract + addq r18,32,r18 C update s2_ptr + subq r28,r25,r21 C 2nd carry subtract + cmpult r5,r1,r8 C compute cy from last subtract + blt r19,$Lend1 C if less than 4 limbs remain, jump +C 1st loop handles groups of 4 limbs in a software pipeline + ALIGN(16) +$Loop: cmpult r28,r25,r25 C compute cy from last subtract + ldq r0,0(r18) + bis r8,r25,r25 C combine cy from the two subtracts + ldq r1,8(r18) + subq r6,r2,r28 C 3rd main subtract + ldq r4,0(r17) + subq r28,r25,r22 C 3rd carry subtract + ldq r5,8(r17) + cmpult r6,r2,r8 C compute cy from last subtract + cmpult r28,r25,r25 C compute cy from last subtract + stq r20,0(r16) + bis r8,r25,r25 C combine cy from the two subtracts + stq r21,8(r16) + subq r7,r3,r28 C 4th main subtract + subq r28,r25,r23 C 4th carry subtract + cmpult r7,r3,r8 C compute cy from last subtract + cmpult r28,r25,r25 C compute cy from last subtract + addq r17,32,r17 C update s1_ptr + bis r8,r25,r25 C combine cy from the two subtracts + addq r16,32,r16 C update res_ptr + subq r4,r0,r28 C 1st main subtract + ldq r2,16(r18) + subq r28,r25,r20 C 1st carry subtract + ldq r3,24(r18) + cmpult r4,r0,r8 C compute cy from last subtract + ldq r6,-16(r17) + cmpult r28,r25,r25 C compute cy from last subtract + ldq r7,-8(r17) + bis r8,r25,r25 C combine cy from the two subtracts + subq r19,4,r19 C decr loop cnt + stq r22,-16(r16) + subq r5,r1,r28 C 2nd main subtract + stq r23,-8(r16) + subq r28,r25,r21 C 2nd carry subtract + addq r18,32,r18 C update s2_ptr + cmpult r5,r1,r8 C compute cy from last subtract + bge r19,$Loop +C Finish software pipeline for 1st loop +$Lend1: cmpult r28,r25,r25 C compute cy from last subtract + bis r8,r25,r25 C combine cy from the two subtracts + subq r6,r2,r28 C cy add + subq r28,r25,r22 C 3rd main subtract + cmpult r6,r2,r8 C compute cy from last subtract + cmpult r28,r25,r25 C compute cy from last subtract + stq r20,0(r16) + bis r8,r25,r25 C combine cy from the two subtracts + stq r21,8(r16) + subq r7,r3,r28 C cy add + subq r28,r25,r23 C 4th main subtract + cmpult r7,r3,r8 C compute cy from last subtract + cmpult r28,r25,r25 C compute cy from last subtract + bis r8,r25,r25 C combine cy from the two subtracts + addq r16,32,r16 C update res_ptr + stq r22,-16(r16) + stq r23,-8(r16) +$Lend2: addq r19,4,r19 C restore loop cnt + beq r19,$Lret +C Start software pipeline for 2nd loop + ldq r0,0(r18) + ldq r4,0(r17) + subq r19,1,r19 + beq r19,$Lend0 +C 2nd loop handles remaining 1-3 limbs + ALIGN(16) +$Loop0: subq r4,r0,r28 C main subtract + cmpult r4,r0,r8 C compute cy from last subtract + ldq r0,8(r18) + ldq r4,8(r17) + subq r28,r25,r20 C carry subtract addq r18,8,r18 - bis r5,r5,r3 - bis r6,r6,r4 + addq r17,8,r17 + stq r20,0(r16) + cmpult r28,r25,r25 C compute cy from last subtract + subq r19,1,r19 C decr loop cnt + bis r8,r25,r25 C combine cy from the two subtracts addq r16,8,r16 - bne r2,$Loop0 + bne r19,$Loop0 +$Lend0: subq r4,r0,r28 C main subtract + subq r28,r25,r20 C carry subtract + cmpult r4,r0,r8 C compute cy from last subtract + cmpult r28,r25,r25 C compute cy from last subtract + stq r20,0(r16) + bis r8,r25,r25 C combine cy from the two subtracts -$L0: beq r19,$Lend - - ALIGN(8) -$Loop: subq r19,4,r19 - - ldq r5,8(r17) - addq r4,r0,r4 - ldq r6,8(r18) - cmpult r4,r0,r1 - subq r3,r4,r4 - cmpult r3,r4,r0 - stq r4,0(r16) - bis r0,r1,r0 - - ldq r3,16(r17) - addq r6,r0,r6 - ldq r4,16(r18) - cmpult r6,r0,r1 - subq r5,r6,r6 - cmpult r5,r6,r0 - stq r6,8(r16) - bis r0,r1,r0 - - ldq r5,24(r17) - addq r4,r0,r4 - ldq r6,24(r18) - cmpult r4,r0,r1 - subq r3,r4,r4 - cmpult r3,r4,r0 - stq r4,16(r16) - bis r0,r1,r0 - - ldq r3,32(r17) - addq r6,r0,r6 - ldq r4,32(r18) - cmpult r6,r0,r1 - subq r5,r6,r6 - cmpult r5,r6,r0 - stq r6,24(r16) - bis r0,r1,r0 - - addq r17,32,r17 - addq r18,32,r18 - addq r16,32,r16 - bne r19,$Loop - -$Lend: addq r4,r0,r4 - cmpult r4,r0,r1 - subq r3,r4,r4 - cmpult r3,r4,r0 - stq r4,0(r16) - bis r0,r1,r0 +$Lret: bis r25,r31,r0 C return cy ret r31,(r26),1 EPILOGUE(mpn_sub_n) ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/arm/gmp-mparam.h gmp-5.0.2+dfsg/mpn/arm/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/arm/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/arm/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009 Free Software -Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free +Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,58 +18,125 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 /* 593MHz ARM (gcc50.fsffrance.org) */ -/* Generated by tuneup.c, 2009-03-05, gcc 4.3 */ - -#define MUL_KARATSUBA_THRESHOLD 34 -#define MUL_TOOM3_THRESHOLD 125 -#define MUL_TOOM44_THRESHOLD 184 - -#define SQR_BASECASE_THRESHOLD 15 -#define SQR_KARATSUBA_THRESHOLD 82 -#define SQR_TOOM3_THRESHOLD 147 -#define SQR_TOOM4_THRESHOLD 212 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 128 -#define MULLOW_MUL_N_THRESHOLD 1095 - -#define DIV_SB_PREINV_THRESHOLD 0 /* preinv always */ -#define DIV_DC_THRESHOLD 130 -#define POWM_THRESHOLD 200 - -#define MATRIX22_STRASSEN_THRESHOLD 19 -#define HGCD_THRESHOLD 110 -#define GCD_DC_THRESHOLD 734 -#define GCDEXT_DC_THRESHOLD 748 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 10 -#define MOD_1_2_THRESHOLD 996 -#define MOD_1_4_THRESHOLD 997 -#define USE_PREINV_DIVREM_1 1 /* preinv always */ -#define USE_PREINV_MOD_1 1 /* preinv always */ -#define DIVREM_2_THRESHOLD 0 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 18 -#define GET_STR_PRECOMPUTE_THRESHOLD 35 -#define SET_STR_DC_THRESHOLD 321 -#define SET_STR_PRECOMPUTE_THRESHOLD 1057 - -#define MUL_FFT_TABLE { 400, 928, 1920, 4608, 14336, 40960, 0 } -#define MUL_FFT_MODF_THRESHOLD 416 -#define MUL_FFT_THRESHOLD 5888 - -#define SQR_FFT_TABLE { 432, 928, 1664, 4608, 10240, 40960, 0 } -#define SQR_FFT_MODF_THRESHOLD 376 -#define SQR_FFT_THRESHOLD 4352 +#define DIVREM_1_NORM_THRESHOLD 0 /* preinv always */ +#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 17 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 9 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 27 +#define USE_PREINV_DIVREM_1 1 /* preinv always */ +#define DIVREM_2_THRESHOLD 0 /* preinv always */ +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD 44 + +#define MUL_TOOM22_THRESHOLD 34 +#define MUL_TOOM33_THRESHOLD 121 +#define MUL_TOOM44_THRESHOLD 191 +#define MUL_TOOM6H_THRESHOLD 366 +#define MUL_TOOM8H_THRESHOLD 547 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 129 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 191 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 117 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 137 + +#define SQR_BASECASE_THRESHOLD 13 +#define SQR_TOOM2_THRESHOLD 78 +#define SQR_TOOM3_THRESHOLD 141 +#define SQR_TOOM4_THRESHOLD 212 +#define SQR_TOOM6_THRESHOLD 330 +#define SQR_TOOM8_THRESHOLD 422 + +#define MULMOD_BNM1_THRESHOLD 21 +#define SQRMOD_BNM1_THRESHOLD 25 + +#define MUL_FFT_MODF_THRESHOLD 404 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 404, 5}, { 21, 6}, { 11, 5}, { 25, 6}, \ + { 13, 5}, { 27, 6}, { 28, 7}, { 15, 6}, \ + { 32, 7}, { 17, 6}, { 35, 7}, { 19, 6}, \ + { 39, 7}, { 21, 6}, { 43, 7}, { 29, 8}, \ + { 15, 7}, { 35, 8}, { 19, 7}, { 41, 8}, \ + { 23, 7}, { 49, 8}, { 27, 7}, { 55, 9}, \ + { 15, 8}, { 31, 7}, { 63, 8}, { 43, 9}, \ + { 23, 8}, { 55, 9}, { 31, 8}, { 71, 9}, \ + { 39, 8}, { 83, 9}, { 47, 8}, { 99, 9}, \ + { 55,10}, { 31, 9}, { 63, 8}, { 127, 9}, \ + { 79,10}, { 47, 9}, { 103,11}, { 31,10}, \ + { 63, 9}, { 135,10}, { 95, 9}, { 191,10}, \ + { 111,11}, { 63,10}, { 127, 9}, { 255,10}, \ + { 143, 9}, { 287,10}, { 159, 9}, { 319,11}, \ + { 95,10}, { 191, 9}, { 383,10}, { 207,12}, \ + { 63,11}, { 127,10}, { 287,11}, { 159,10}, \ + { 351,11}, { 191,10}, { 415,11}, { 223,12}, \ + { 127,11}, { 255,10}, { 511,11}, { 319,10}, \ + { 639,11}, { 351,12}, { 191,11}, { 415,13}, \ + { 8192,14}, { 16384,15}, { 32768,16} } +#define MUL_FFT_TABLE3_SIZE 79 +#define MUL_FFT_THRESHOLD 5760 + +#define SQR_FFT_MODF_THRESHOLD 400 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 400, 5}, { 25, 6}, { 13, 5}, { 27, 6}, \ + { 25, 7}, { 13, 6}, { 28, 7}, { 15, 6}, \ + { 32, 7}, { 19, 6}, { 39, 7}, { 29, 8}, \ + { 15, 7}, { 35, 8}, { 19, 7}, { 41, 8}, \ + { 23, 7}, { 47, 8}, { 27, 7}, { 55, 9}, \ + { 15, 8}, { 39, 9}, { 23, 8}, { 55,10}, \ + { 15, 9}, { 31, 8}, { 67, 9}, { 39, 8}, \ + { 79, 9}, { 47, 8}, { 95, 9}, { 55,10}, \ + { 31, 9}, { 79,10}, { 47, 9}, { 103,11}, \ + { 31,10}, { 63, 9}, { 135,10}, { 79, 9}, \ + { 159, 8}, { 319,10}, { 95, 9}, { 191,10}, \ + { 111,11}, { 63,10}, { 127, 9}, { 271,10}, \ + { 143, 9}, { 303,10}, { 159,11}, { 95,10}, \ + { 191, 9}, { 383,10}, { 207,12}, { 63,11}, \ + { 127,10}, { 303,11}, { 159,10}, { 367,11}, \ + { 191,10}, { 415,11}, { 223,10}, { 447,12}, \ + { 127,11}, { 255,10}, { 511,11}, { 287,10}, \ + { 607,11}, { 319,10}, { 639,11}, { 351,12}, \ + { 191,11}, { 447,13}, { 8192,14}, { 16384,15}, \ + { 32768,16} } +#define SQR_FFT_TABLE3_SIZE 77 +#define SQR_FFT_THRESHOLD 3136 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 120 +#define MULLO_MUL_N_THRESHOLD 11317 + +#define DC_DIV_QR_THRESHOLD 134 +#define DC_DIVAPPR_Q_THRESHOLD 442 +#define DC_BDIV_QR_THRESHOLD 127 +#define DC_BDIV_Q_THRESHOLD 296 + +#define INV_MULMOD_BNM1_THRESHOLD 66 +#define INV_NEWTON_THRESHOLD 458 +#define INV_APPR_THRESHOLD 454 + +#define BINV_NEWTON_THRESHOLD 494 +#define REDC_1_TO_REDC_N_THRESHOLD 116 + +#define MU_DIV_QR_THRESHOLD 2914 +#define MU_DIVAPPR_Q_THRESHOLD 3091 +#define MUPI_DIV_QR_THRESHOLD 221 +#define MU_BDIV_QR_THRESHOLD 2259 +#define MU_BDIV_Q_THRESHOLD 2747 + +#define MATRIX22_STRASSEN_THRESHOLD 17 +#define HGCD_THRESHOLD 109 +#define GCD_DC_THRESHOLD 697 +#define GCDEXT_DC_THRESHOLD 535 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 14 +#define GET_STR_PRECOMPUTE_THRESHOLD 29 +#define SET_STR_DC_THRESHOLD 321 +#define SET_STR_PRECOMPUTE_THRESHOLD 1037 diff -Nru gmp-4.3.2+dfsg/mpn/arm/invert_limb.asm gmp-5.0.2+dfsg/mpn/arm/invert_limb.asm --- gmp-4.3.2+dfsg/mpn/arm/invert_limb.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/arm/invert_limb.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl ARM mpn_invert_limb -- Invert a normalized limb. -dnl Copyright 2001 Free Software Foundation, Inc. +dnl Copyright 2001, 2009 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -19,77 +19,68 @@ include(`../config.m4') -C INPUT PARAMETERS -define(`d',`r0') C number to be inverted - - +ASM_START() PROLOGUE(mpn_invert_limb) - stmfd sp!, {r4, lr} - mov r3, d, lsr #23 - sub r3, r3, #256 - add r2, pc, #invtab-.-8 - mov r3, r3, lsl #1 - ldrh r1, [r2, r3] C get initial approximation from table - mov r2, r1, lsl #6 C start iteration 1 - mul ip, r2, r2 - umull lr, r4, ip, d - mov r2, r4, lsl #1 - rsb r2, r2, r1, lsl #23 C iteration 1 complete - umull ip, r3, r2, r2 C start iteration 2 - umull lr, r4, r3, d - umull r3, r1, ip, d - adds lr, lr, r1 - addcs r4, r4, #1 - mov r3, lr, lsr #30 - orr r4, r3, r4, lsl #2 - mov lr, lr, lsl #2 - cmn lr, #1 - rsc r2, r4, r2, lsl #2 C iteration 2 complete - umull ip, r1, d, r2 C start adjustment step - add r1, r1, d - cmn r1, #1 - beq L(1) - adds ip, ip, d - adc r1, r1, #0 - add r2, r2, #1 -L(1): - adds r3, ip, d - adcs r1, r1, #0 - moveq r0, r2 - addne r0, r2, #1 - ldmfd sp!, {r4, pc} - -invtab: - .short 1023,1020,1016,1012,1008,1004,1000,996 - .short 992,989,985,981,978,974,970,967 - .short 963,960,956,953,949,946,942,939 - .short 936,932,929,926,923,919,916,913 - .short 910,907,903,900,897,894,891,888 - .short 885,882,879,876,873,870,868,865 - .short 862,859,856,853,851,848,845,842 - .short 840,837,834,832,829,826,824,821 - .short 819,816,814,811,809,806,804,801 - .short 799,796,794,791,789,787,784,782 - .short 780,777,775,773,771,768,766,764 - .short 762,759,757,755,753,751,748,746 - .short 744,742,740,738,736,734,732,730 - .short 728,726,724,722,720,718,716,714 - .short 712,710,708,706,704,702,700,699 - .short 697,695,693,691,689,688,686,684 - .short 682,680,679,677,675,673,672,670 - .short 668,667,665,663,661,660,658,657 - .short 655,653,652,650,648,647,645,644 - .short 642,640,639,637,636,634,633,631 - .short 630,628,627,625,624,622,621,619 - .short 618,616,615,613,612,611,609,608 - .short 606,605,604,602,601,599,598,597 - .short 595,594,593,591,590,589,587,586 - .short 585,583,582,581,579,578,577,576 - .short 574,573,572,571,569,568,567,566 - .short 564,563,562,561,560,558,557,556 - .short 555,554,553,551,550,549,548,547 - .short 546,544,543,542,541,540,539,538 - .short 537,536,534,533,532,531,530,529 - .short 528,527,526,525,524,523,522,521 - .short 520,519,518,517,516,515,514,513 -EPILOGUE(mpn_invert_limb) + ldr r2, L(4) +L(2): add r2, pc, r2 + mov r3, r0, lsr #23 + mov r3, r3, asl #1 + ldrh r3, [r3, r2] + mov r1, r3, asl #17 + mul r3, r3, r3 + umull r12, r2, r3, r0 + sub r1, r1, r2, asl #1 + umull r12, r2, r1, r1 + umull r3, r12, r0, r12 + umull r2, r3, r0, r2 + adds r2, r2, r12 + adc r3, r3, #0 + rsb r1, r3, r1 + mvn r2, r2, lsr #30 + add r2, r2, r1, asl #2 + umull r3, r12, r0, r2 + adds r1, r3, r0 + adc r12, r12, r0 + rsb r0, r12, r2 + bx lr + + ALIGN(4) +L(4): .word approx_tab-8-512-L(2) +EPILOGUE() + + .section .rodata + ALIGN(2) +approx_tab: + .short 0xffc0,0xfec0,0xfdc0,0xfcc0,0xfbc0,0xfac0,0xfa00,0xf900 + .short 0xf800,0xf700,0xf640,0xf540,0xf440,0xf380,0xf280,0xf180 + .short 0xf0c0,0xefc0,0xef00,0xee00,0xed40,0xec40,0xeb80,0xeac0 + .short 0xe9c0,0xe900,0xe840,0xe740,0xe680,0xe5c0,0xe500,0xe400 + .short 0xe340,0xe280,0xe1c0,0xe100,0xe040,0xdf80,0xdec0,0xde00 + .short 0xdd40,0xdc80,0xdbc0,0xdb00,0xda40,0xd980,0xd8c0,0xd800 + .short 0xd740,0xd680,0xd600,0xd540,0xd480,0xd3c0,0xd340,0xd280 + .short 0xd1c0,0xd140,0xd080,0xcfc0,0xcf40,0xce80,0xcdc0,0xcd40 + .short 0xcc80,0xcc00,0xcb40,0xcac0,0xca00,0xc980,0xc8c0,0xc840 + .short 0xc780,0xc700,0xc640,0xc5c0,0xc540,0xc480,0xc400,0xc380 + .short 0xc2c0,0xc240,0xc1c0,0xc100,0xc080,0xc000,0xbf80,0xbec0 + .short 0xbe40,0xbdc0,0xbd40,0xbc80,0xbc00,0xbb80,0xbb00,0xba80 + .short 0xba00,0xb980,0xb900,0xb840,0xb7c0,0xb740,0xb6c0,0xb640 + .short 0xb5c0,0xb540,0xb4c0,0xb440,0xb3c0,0xb340,0xb2c0,0xb240 + .short 0xb1c0,0xb140,0xb0c0,0xb080,0xb000,0xaf80,0xaf00,0xae80 + .short 0xae00,0xad80,0xad40,0xacc0,0xac40,0xabc0,0xab40,0xaac0 + .short 0xaa80,0xaa00,0xa980,0xa900,0xa8c0,0xa840,0xa7c0,0xa740 + .short 0xa700,0xa680,0xa600,0xa5c0,0xa540,0xa4c0,0xa480,0xa400 + .short 0xa380,0xa340,0xa2c0,0xa240,0xa200,0xa180,0xa140,0xa0c0 + .short 0xa080,0xa000,0x9f80,0x9f40,0x9ec0,0x9e80,0x9e00,0x9dc0 + .short 0x9d40,0x9d00,0x9c80,0x9c40,0x9bc0,0x9b80,0x9b00,0x9ac0 + .short 0x9a40,0x9a00,0x9980,0x9940,0x98c0,0x9880,0x9840,0x97c0 + .short 0x9780,0x9700,0x96c0,0x9680,0x9600,0x95c0,0x9580,0x9500 + .short 0x94c0,0x9440,0x9400,0x93c0,0x9340,0x9300,0x92c0,0x9240 + .short 0x9200,0x91c0,0x9180,0x9100,0x90c0,0x9080,0x9000,0x8fc0 + .short 0x8f80,0x8f40,0x8ec0,0x8e80,0x8e40,0x8e00,0x8d80,0x8d40 + .short 0x8d00,0x8cc0,0x8c80,0x8c00,0x8bc0,0x8b80,0x8b40,0x8b00 + .short 0x8a80,0x8a40,0x8a00,0x89c0,0x8980,0x8940,0x88c0,0x8880 + .short 0x8840,0x8800,0x87c0,0x8780,0x8740,0x8700,0x8680,0x8640 + .short 0x8600,0x85c0,0x8580,0x8540,0x8500,0x84c0,0x8480,0x8440 + .short 0x8400,0x8380,0x8340,0x8300,0x82c0,0x8280,0x8240,0x8200 + .short 0x81c0,0x8180,0x8140,0x8100,0x80c0,0x8080,0x8040,0x8000 +ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/arm/README gmp-5.0.2+dfsg/mpn/arm/README --- gmp-4.3.2+dfsg/mpn/arm/README 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/arm/README 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,34 @@ +Copyright 2002 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify it +under the terms of the GNU Lesser General Public License as published by the +Free Software Foundation; either version 3 of the License, or (at your option) +any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License +for more details. + +You should have received a copy of the GNU Lesser General Public License along +with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + + + + + +This directory contains mpn functions for ARM processors. +It has been optimized for StrongARM. + +TODO + +Write mpn_addmul_2. The speed of mpn_addmul_1 is 9.75 c/l; +mpn_addmul_2 could run at 8 c/l. mpn_addmul_N could +approach 6 c/l, but register shortage will make this hard. + +Perhaps nails is the way to go even for an embedded processor like +this, since the umlal accumulation could be used very effectively in +that case. with just 2 nail bits, we should get close to 5 c/l for a +mpn_addmul_N or mpn_mul_basecase. diff -Nru gmp-4.3.2+dfsg/mpn/asm-defs.m4 gmp-5.0.2+dfsg/mpn/asm-defs.m4 --- gmp-4.3.2+dfsg/mpn/asm-defs.m4 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/asm-defs.m4 2011-05-08 09:49:29.000000000 +0000 @@ -49,7 +49,7 @@ dnl But note that when a quoted string is being read, a # isn't special, so dnl apostrophes in comments in quoted strings must be avoided or they'll be dnl interpreted as a closing quote mark. But when the quoted text is -dnl re-read # will still act like a normal comment, supressing macro +dnl re-read # will still act like a normal comment, suppressing macro dnl expansion. dnl dnl For example, @@ -219,7 +219,7 @@ dnl Usage: m4wrap_prepend(string) dnl -dnl Prepend the given string to what will be exapanded under m4wrap at the +dnl Prepend the given string to what will be expanded under m4wrap at the dnl end of input. dnl dnl This macro exists to work around variations in m4wrap() behaviour in @@ -1079,6 +1079,12 @@ dnl aorslsh1_n m4_not_for_expansion(`OPERATION_addlsh1_n') m4_not_for_expansion(`OPERATION_sublsh1_n') +m4_not_for_expansion(`OPERATION_rsblsh1_n') + +dnl aorslsh2_n +m4_not_for_expansion(`OPERATION_addlsh2_n') +m4_not_for_expansion(`OPERATION_sublsh2_n') +m4_not_for_expansion(`OPERATION_rsblsh2_n') dnl rsh1aors_n m4_not_for_expansion(`OPERATION_rsh1add_n') @@ -1091,7 +1097,7 @@ dnl terminate immediately. The error message explains that the symbol dnl should be in config.m4, copied from gmp-mparam.h. dnl -dnl Termination is immediate since missing say SQR_KARATSUBA_THRESHOLD can +dnl Termination is immediate since missing say SQR_TOOM2_THRESHOLD can dnl lead to infinite loops and endless error messages. define(m4_config_gmp_mparam, @@ -1303,20 +1309,23 @@ define_mpn(add_n) define_mpn(add_nc) define_mpn(addlsh1_n) +define_mpn(addlsh2_n) +define_mpn(addlsh_n) define_mpn(addmul_1) define_mpn(addmul_1c) define_mpn(addmul_2) define_mpn(addmul_3) define_mpn(addmul_4) -define_mpn(addsub_n) -define_mpn(addsub_nc) +define_mpn(add_n_sub_n) +define_mpn(add_n_sub_nc) define_mpn(addaddmul_1msb0) define_mpn(and_n) define_mpn(andn_n) +define_mpn(bdiv_q_1) +define_mpn(pi1_bdiv_q_1) define_mpn(bdiv_dbm1c) -define_mpn(bdivmod) define_mpn(cmp) -define_mpn(com_n) +define_mpn(com) define_mpn(copyd) define_mpn(copyi) define_mpn(count_leading_zeros) @@ -1338,14 +1347,16 @@ define_mpn(invert_limb) define_mpn(ior_n) define_mpn(iorn_n) -define_mpn(kara_mul_n) -define_mpn(kara_sqr_n) define_mpn(lshift) define_mpn(lshiftc) -define_mpn(mod_1_1) -define_mpn(mod_1_2) -define_mpn(mod_1_3) -define_mpn(mod_1_4) +define_mpn(mod_1_1p) +define_mpn(mod_1_1p_cps) +define_mpn(mod_1s_2p) +define_mpn(mod_1s_2p_cps) +define_mpn(mod_1s_3p) +define_mpn(mod_1s_3p_cps) +define_mpn(mod_1s_4p) +define_mpn(mod_1s_4p_cps) define_mpn(mod_1) define_mpn(mod_1c) define_mpn(mod_34lsub1) @@ -1359,12 +1370,13 @@ define_mpn(mul_4) define_mpn(mul_basecase) define_mpn(mul_n) +define_mpn(mullo_basecase) define_mpn(perfect_square_p) define_mpn(popcount) define_mpn(preinv_divrem_1) define_mpn(preinv_mod_1) define_mpn(nand_n) -define_mpn(neg_n) +define_mpn(neg) define_mpn(nior_n) define_mpn(powm) define_mpn(powlo) @@ -1372,8 +1384,13 @@ define_mpn(random2) define_mpn(redc_1) define_mpn(redc_2) +define_mpn(rsblsh1_n) +define_mpn(rsblsh2_n) +define_mpn(rsblsh_n) define_mpn(rsh1add_n) +define_mpn(rsh1add_nc) define_mpn(rsh1sub_n) +define_mpn(rsh1sub_nc) define_mpn(rshift) define_mpn(rshiftc) define_mpn(scan0) @@ -1383,6 +1400,7 @@ define_mpn(sqr_diagonal) define_mpn(sub_n) define_mpn(sublsh1_n) +define_mpn(sublsh2_n) define_mpn(sqrtrem) define_mpn(sub) define_mpn(sub_1) @@ -1390,8 +1408,6 @@ define_mpn(sub_nc) define_mpn(submul_1) define_mpn(submul_1c) -define_mpn(toom3_mul_n) -define_mpn(toom3_sqr_n) define_mpn(umul_ppmm) define_mpn(umul_ppmm_r) define_mpn(udiv_qrnnd) diff -Nru gmp-4.3.2+dfsg/mpn/cray/gmp-mparam.h gmp-5.0.2+dfsg/mpn/cray/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/cray/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/cray/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 #if 0 @@ -30,11 +30,11 @@ /* Generated by tuneup.c, 2004-02-07, system compiler */ -#define MUL_KARATSUBA_THRESHOLD 71 -#define MUL_TOOM3_THRESHOLD 131 +#define MUL_TOOM22_THRESHOLD 71 +#define MUL_TOOM33_THRESHOLD 131 #define SQR_BASECASE_THRESHOLD 32 -#define SQR_KARATSUBA_THRESHOLD 199 +#define SQR_TOOM2_THRESHOLD 199 #define SQR_TOOM3_THRESHOLD 363 #define DIV_SB_PREINV_THRESHOLD 0 /* (preinv always) */ diff -Nru gmp-4.3.2+dfsg/mpn/cray/ieee/gmp-mparam.h gmp-5.0.2+dfsg/mpn/cray/ieee/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/cray/ieee/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/cray/ieee/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,16 +18,16 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 /* Generated by tuneup.c, 2004-02-07, system compiler */ -#define MUL_KARATSUBA_THRESHOLD 130 -#define MUL_TOOM3_THRESHOLD 260 +#define MUL_TOOM22_THRESHOLD 130 +#define MUL_TOOM33_THRESHOLD 260 #define SQR_BASECASE_THRESHOLD 9 /* karatsuba */ -#define SQR_KARATSUBA_THRESHOLD 0 /* never sqr_basecase */ +#define SQR_TOOM2_THRESHOLD 0 /* never sqr_basecase */ #define SQR_TOOM3_THRESHOLD 34 #define DIV_SB_PREINV_THRESHOLD 0 /* preinv always */ diff -Nru gmp-4.3.2+dfsg/mpn/cray/ieee/invert_limb.c gmp-5.0.2+dfsg/mpn/cray/ieee/invert_limb.c --- gmp-4.3.2+dfsg/mpn/cray/ieee/invert_limb.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/cray/ieee/invert_limb.c 2011-05-08 09:49:29.000000000 +0000 @@ -73,14 +73,14 @@ mp_limb_t xh, xl; mp_limb_t zh, zl; -#if BITS_PER_MP_LIMB == 32 +#if GMP_LIMB_BITS == 32 z = approx_tab[(d >> 23) - 0x100] << 6; /* z < 2^16 */ z2l = z * z; /* z2l < 2^32 */ umul_ppmm (th, tl, z2l, d); z = (z << 17) - (th << 1); #endif -#if BITS_PER_MP_LIMB == 64 +#if GMP_LIMB_BITS == 64 z = approx_tab[(d >> 55) - 0x100] << 6; /* z < 2^16 */ z2l = z * z; /* z2l < 2^32 */ @@ -97,7 +97,7 @@ umul_ppmm (xh, xl, z2l, d); tl += xh; th += tl < xh; - th = (th << 2) | (tl >> BITS_PER_MP_LIMB - 2); + th = (th << 2) | (tl >> GMP_LIMB_BITS - 2); tl = tl << 2; sub_ddmmss (zh, zl, z << 2, 0, th, tl); diff -Nru gmp-4.3.2+dfsg/mpn/cray/lshift.c gmp-5.0.2+dfsg/mpn/cray/lshift.c --- gmp-4.3.2+dfsg/mpn/cray/lshift.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/cray/lshift.c 2011-05-08 09:49:29.000000000 +0000 @@ -29,7 +29,7 @@ mp_limb_t retval; sh_1 = cnt; - sh_2 = BITS_PER_MP_LIMB - sh_1; + sh_2 = GMP_LIMB_BITS - sh_1; retval = up[n - 1] >> sh_2; #pragma _CRI ivdep diff -Nru gmp-4.3.2+dfsg/mpn/cray/README gmp-5.0.2+dfsg/mpn/cray/README --- gmp-4.3.2+dfsg/mpn/cray/README 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/cray/README 2011-05-08 09:49:29.000000000 +0000 @@ -34,7 +34,7 @@ 128-bit products. For IEEE systems, adding, and in particular computing carry is the main issue. There are no vectorizing unsigned-less-than instructions, and the sequence that implement that -opetration is very long. +operation is very long. Shifting is the only operation that is simple to make fast. All Cray systems have a bitblt instructions (Vi Vj,VjAk) that diff -Nru gmp-4.3.2+dfsg/mpn/cray/rshift.c gmp-5.0.2+dfsg/mpn/cray/rshift.c --- gmp-4.3.2+dfsg/mpn/cray/rshift.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/cray/rshift.c 2011-05-08 09:49:29.000000000 +0000 @@ -29,7 +29,7 @@ mp_limb_t retval; sh_1 = cnt; - sh_2 = BITS_PER_MP_LIMB - sh_1; + sh_2 = GMP_LIMB_BITS - sh_1; retval = up[0] << sh_2; #pragma _CRI ivdep diff -Nru gmp-4.3.2+dfsg/mpn/generic/add_n.c gmp-5.0.2+dfsg/mpn/generic/add_n.c --- gmp-4.3.2+dfsg/mpn/generic/add_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/add_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,7 @@ /* mpn_add_n -- Add equal length limb vectors. -Copyright 1992, 1993, 1994, 1996, 2000, 2002 Free Software Foundation, Inc. +Copyright 1992, 1993, 1994, 1996, 2000, 2002, 2009 Free Software Foundation, +Inc. This file is part of the GNU MP Library. @@ -29,8 +30,8 @@ mp_limb_t ul, vl, sl, rl, cy, cy1, cy2; ASSERT (n >= 1); - ASSERT (MPN_SAME_OR_SEPARATE_P (rp, up, n)); - ASSERT (MPN_SAME_OR_SEPARATE_P (rp, vp, n)); + ASSERT (MPN_SAME_OR_INCR_P (rp, up, n)); + ASSERT (MPN_SAME_OR_INCR_P (rp, vp, n)); cy = 0; do @@ -59,8 +60,8 @@ mp_limb_t ul, vl, rl, cy; ASSERT (n >= 1); - ASSERT (MPN_SAME_OR_SEPARATE_P (rp, up, n)); - ASSERT (MPN_SAME_OR_SEPARATE_P (rp, vp, n)); + ASSERT (MPN_SAME_OR_INCR_P (rp, up, n)); + ASSERT (MPN_SAME_OR_INCR_P (rp, vp, n)); cy = 0; do diff -Nru gmp-4.3.2+dfsg/mpn/generic/addsub_n.c gmp-5.0.2+dfsg/mpn/generic/addsub_n.c --- gmp-4.3.2+dfsg/mpn/generic/addsub_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/addsub_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,4 +1,4 @@ -/* mpn_addsub_n -- Add and Subtract two limb vectors of equal, non-zero length. +/* mpn_add_n_sub_n -- Add and Subtract two limb vectors of equal, non-zero length. THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST @@ -31,13 +31,13 @@ #define PART_SIZE (L1_CACHE_SIZE / BYTES_PER_MP_LIMB / 6) -/* mpn_addsub_n. +/* mpn_add_n_sub_n. r1[] = s1[] + s2[] r2[] = s1[] - s2[] All operands have n limbs. In-place operations allowed. */ mp_limb_t -mpn_addsub_n (mp_ptr r1p, mp_ptr r2p, mp_srcptr s1p, mp_srcptr s2p, mp_size_t n) +mpn_add_n_sub_n (mp_ptr r1p, mp_ptr r2p, mp_srcptr s1p, mp_srcptr s2p, mp_size_t n) { mp_limb_t acyn, acyo; /* carry for add */ mp_limb_t scyn, scyo; /* carry for subtract */ @@ -148,13 +148,13 @@ s2p = malloc (n * BYTES_PER_MP_LIMB); TIME (t,(mpn_add_n(r1p,s1p,s2p,n),mpn_sub_n(r1p,s1p,s2p,n))); printf (" separate add and sub: %.3f\n", t); - TIME (t,mpn_addsub_n(r1p,r2p,s1p,s2p,n)); + TIME (t,mpn_add_n_sub_n(r1p,r2p,s1p,s2p,n)); printf ("combined addsub separate variables: %.3f\n", t); - TIME (t,mpn_addsub_n(r1p,r2p,r1p,s2p,n)); + TIME (t,mpn_add_n_sub_n(r1p,r2p,r1p,s2p,n)); printf (" combined addsub r1 overlap: %.3f\n", t); - TIME (t,mpn_addsub_n(r1p,r2p,r1p,s2p,n)); + TIME (t,mpn_add_n_sub_n(r1p,r2p,r1p,s2p,n)); printf (" combined addsub r2 overlap: %.3f\n", t); - TIME (t,mpn_addsub_n(r1p,r2p,r1p,r2p,n)); + TIME (t,mpn_add_n_sub_n(r1p,r2p,r1p,r2p,n)); printf (" combined addsub in-place: %.3f\n", t); return 0; diff -Nru gmp-4.3.2+dfsg/mpn/generic/bdivmod.c gmp-5.0.2+dfsg/mpn/generic/bdivmod.c --- gmp-4.3.2+dfsg/mpn/generic/bdivmod.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/bdivmod.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,124 +0,0 @@ -/* mpn/bdivmod.c: mpn_bdivmod for computing U/V mod 2^d. - -Copyright 1991, 1993, 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -/* q_high = mpn_bdivmod (qp, up, usize, vp, vsize, d). - - Puts the low d/BITS_PER_MP_LIMB limbs of Q = U / V mod 2^d at qp, and - returns the high d%BITS_PER_MP_LIMB bits of Q as the result. - - Also, U - Q * V mod 2^(usize*BITS_PER_MP_LIMB) is placed at up. Since the - low d/BITS_PER_MP_LIMB limbs of this difference are zero, the code allows - the limb vectors at qp to overwrite the low limbs at up, provided qp <= up. - - Preconditions: - 1. V is odd. - 2. usize * BITS_PER_MP_LIMB >= d. - 3. If Q and U overlap, qp <= up. - - Ken Weber (kweber@mat.ufrgs.br, kweber@mcs.kent.edu) - - Funding for this work has been partially provided by Conselho Nacional - de Desenvolvimento Cienti'fico e Tecnolo'gico (CNPq) do Brazil, Grant - 301314194-2, and was done while I was a visiting reseacher in the Instituto - de Matema'tica at Universidade Federal do Rio Grande do Sul (UFRGS). - - References: - T. Jebelean, An algorithm for exact division, Journal of Symbolic - Computation, v. 15, 1993, pp. 169-180. - - K. Weber, The accelerated integer GCD algorithm, ACM Transactions on - Mathematical Software, v. 21 (March), 1995, pp. 111-122. */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" - - -mp_limb_t -mpn_bdivmod (mp_ptr qp, mp_ptr up, mp_size_t usize, - mp_srcptr vp, mp_size_t vsize, unsigned long int d) -{ - mp_limb_t v_inv; - - ASSERT (usize >= 1); - ASSERT (vsize >= 1); - ASSERT (usize * GMP_NUMB_BITS >= d); - ASSERT (! MPN_OVERLAP_P (up, usize, vp, vsize)); - ASSERT (! MPN_OVERLAP_P (qp, d/GMP_NUMB_BITS, vp, vsize)); - ASSERT (MPN_SAME_OR_INCR2_P (qp, d/GMP_NUMB_BITS, up, usize)); - ASSERT_MPN (up, usize); - ASSERT_MPN (vp, vsize); - - /* 1/V mod 2^GMP_NUMB_BITS. */ - binvert_limb (v_inv, vp[0]); - - /* Fast code for two cases previously used by the accel part of mpn_gcd. - (Could probably remove this now it's inlined there.) */ - if (usize == 2 && vsize == 2 && - (d == GMP_NUMB_BITS || d == 2*GMP_NUMB_BITS)) - { - mp_limb_t hi, lo; - mp_limb_t q = (up[0] * v_inv) & GMP_NUMB_MASK; - umul_ppmm (hi, lo, q, vp[0] << GMP_NAIL_BITS); - up[0] = 0; - up[1] -= hi + q*vp[1]; - qp[0] = q; - if (d == 2*GMP_NUMB_BITS) - { - q = (up[1] * v_inv) & GMP_NUMB_MASK; - up[1] = 0; - qp[1] = q; - } - return 0; - } - - /* Main loop. */ - while (d >= GMP_NUMB_BITS) - { - mp_limb_t q = (up[0] * v_inv) & GMP_NUMB_MASK; - mp_limb_t b = mpn_submul_1 (up, vp, MIN (usize, vsize), q); - if (usize > vsize) - mpn_sub_1 (up + vsize, up + vsize, usize - vsize, b); - d -= GMP_NUMB_BITS; - up += 1, usize -= 1; - *qp++ = q; - } - - if (d) - { - mp_limb_t b; - mp_limb_t q = (up[0] * v_inv) & (((mp_limb_t)1< vsize) - mpn_sub_1 (up + vsize, up + vsize, usize - vsize, b); - return q; - } - - return 0; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/bdiv_q_1.c gmp-5.0.2+dfsg/mpn/generic/bdiv_q_1.c --- gmp-4.3.2+dfsg/mpn/generic/bdiv_q_1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/bdiv_q_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,115 @@ +/* mpn_bdiv_q_1, mpn_pi1_bdiv_q_1 -- schoolbook Hensel division by 1-limb + divisor, returning quotient only. + + THE FUNCTIONS IN THIS FILE ARE FOR INTERNAL USE ONLY. THEY'RE ALMOST + CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN + FUTURE GNU MP RELEASES. + +Copyright 2000, 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +mp_limb_t +mpn_pi1_bdiv_q_1 (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_limb_t d, + mp_limb_t di, int shift) +{ + mp_size_t i; + mp_limb_t c, h, l, u, u_next, dummy; + + ASSERT (n >= 1); + ASSERT (d != 0); + ASSERT (MPN_SAME_OR_SEPARATE_P (rp, up, n)); + ASSERT_MPN (up, n); + ASSERT_LIMB (d); + + d <<= GMP_NAIL_BITS; + + if (shift != 0) + { + c = 0; + + u = up[0]; + rp--; + for (i = 1; i < n; i++) + { + u_next = up[i]; + u = ((u >> shift) | (u_next << (GMP_NUMB_BITS-shift))) & GMP_NUMB_MASK; + + SUBC_LIMB (c, l, u, c); + + l = (l * di) & GMP_NUMB_MASK; + rp[i] = l; + + umul_ppmm (h, dummy, l, d); + c += h; + u = u_next; + } + + u = u >> shift; + l = u - c; + l = (l * di) & GMP_NUMB_MASK; + rp[i] = l; + } + else + { + u = up[0]; + l = (u * di) & GMP_NUMB_MASK; + rp[0] = l; + c = 0; + + for (i = 1; i < n; i++) + { + umul_ppmm (h, dummy, l, d); + c += h; + + u = up[i]; + SUBC_LIMB (c, l, u, c); + + l = (l * di) & GMP_NUMB_MASK; + rp[i] = l; + } + } + + return c; +} + +mp_limb_t +mpn_bdiv_q_1 (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_limb_t d) +{ + mp_limb_t di; + int shift; + + ASSERT (n >= 1); + ASSERT (d != 0); + ASSERT (MPN_SAME_OR_SEPARATE_P (rp, up, n)); + ASSERT_MPN (up, n); + ASSERT_LIMB (d); + + if ((d & 1) == 0) + { + count_trailing_zeros (shift, d); + d >>= shift; + } + else + shift = 0; + + binvert_limb (di, d); + return mpn_pi1_bdiv_q_1 (rp, up, n, d, di, shift); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/bdiv_q.c gmp-5.0.2+dfsg/mpn/generic/bdiv_q.c --- gmp-4.3.2+dfsg/mpn/generic/bdiv_q.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/bdiv_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,66 @@ +/* mpn_bdiv_q -- Hensel division with precomputed inverse, returning quotient. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2006, 2007, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + + +/* Computes Q = N / D mod B^n. */ + +void +mpn_bdiv_q (mp_ptr qp, + mp_srcptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, + mp_ptr tp) +{ + mp_limb_t di; + + if (BELOW_THRESHOLD (dn, DC_BDIV_Q_THRESHOLD)) + { + MPN_COPY (tp, np, nn); + binvert_limb (di, dp[0]); di = -di; + mpn_sbpi1_bdiv_q (qp, tp, nn, dp, dn, di); + } + else if (BELOW_THRESHOLD (dn, MU_BDIV_Q_THRESHOLD)) + { + MPN_COPY (tp, np, nn); + binvert_limb (di, dp[0]); di = -di; + mpn_dcpi1_bdiv_q (qp, tp, nn, dp, dn, di); + } + else + { + mpn_mu_bdiv_q (qp, np, nn, dp, dn, tp); + } + return; +} + +mp_size_t +mpn_bdiv_q_itch (mp_size_t nn, mp_size_t dn) +{ + if (BELOW_THRESHOLD (dn, MU_BDIV_Q_THRESHOLD)) + return nn; + else + return mpn_mu_bdiv_q_itch (nn, dn); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/bdiv_qr.c gmp-5.0.2+dfsg/mpn/generic/bdiv_qr.c --- gmp-4.3.2+dfsg/mpn/generic/bdiv_qr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/bdiv_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,73 @@ +/* mpn_bdiv_qr -- Hensel division with precomputed inverse, returning quotient + and remainder. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2006, 2007, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + + +/* Computes Q = N / D mod B^n, + R = N - QD. */ + +mp_limb_t +mpn_bdiv_qr (mp_ptr qp, mp_ptr rp, + mp_srcptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, + mp_ptr tp) +{ + mp_limb_t di; + mp_limb_t rh; + + if (BELOW_THRESHOLD (dn, DC_BDIV_QR_THRESHOLD) || + BELOW_THRESHOLD (nn - dn, DC_BDIV_QR_THRESHOLD)) + { + MPN_COPY (tp, np, nn); + binvert_limb (di, dp[0]); di = -di; + rh = mpn_sbpi1_bdiv_qr (qp, tp, nn, dp, dn, di); + MPN_COPY (rp, tp + nn - dn, dn); + } + else if (BELOW_THRESHOLD (dn, MU_BDIV_QR_THRESHOLD)) + { + MPN_COPY (tp, np, nn); + binvert_limb (di, dp[0]); di = -di; + rh = mpn_dcpi1_bdiv_qr (qp, tp, nn, dp, dn, di); + MPN_COPY (rp, tp + nn - dn, dn); + } + else + { + rh = mpn_mu_bdiv_qr (qp, rp, np, nn, dp, dn, tp); + } + + return rh; +} + +mp_size_t +mpn_bdiv_qr_itch (mp_size_t nn, mp_size_t dn) +{ + if (BELOW_THRESHOLD (dn, MU_BDIV_QR_THRESHOLD)) + return nn; + else + return mpn_mu_bdiv_qr_itch (nn, dn); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/binvert.c gmp-5.0.2+dfsg/mpn/generic/binvert.c --- gmp-4.3.2+dfsg/mpn/generic/binvert.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/binvert.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,13 +1,12 @@ -/* Compute {up,n}^(-1) mod 2(n*GMP_NUMB_BITS). +/* Compute {up,n}^(-1) mod B^n. Contributed to the GNU project by Torbjorn Granlund. - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. -Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +Copyright (C) 2004, 2005, 2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -52,12 +51,9 @@ mp_size_t mpn_binvert_itch (mp_size_t n) { -#if WANT_FFT - if (ABOVE_THRESHOLD (n, 2 * MUL_FFT_MODF_THRESHOLD)) - return mpn_fft_next_size (n, mpn_fft_best_k (n, 0)); - else -#endif - return 3 * (n - (n >> 1)); + mp_size_t itch_local = mpn_mulmod_bnm1_next_size (n); + mp_size_t itch_out = mpn_mulmod_bnm1_itch (itch_local, n, (n + 1) >> 1); + return itch_local + itch_out; } void @@ -76,42 +72,28 @@ xp = scratch; - /* Compute a base value using a low-overhead O(n^2) algorithm. FIXME: We - should call some divide-and-conquer lsb division function here for an - operand subrange. */ + /* Compute a base value of rn limbs. */ MPN_ZERO (xp, rn); xp[0] = 1; binvert_limb (di, up[0]); if (BELOW_THRESHOLD (rn, DC_BDIV_Q_THRESHOLD)) - mpn_sb_bdiv_q (rp, xp, rn, up, rn, -di); + mpn_sbpi1_bdiv_q (rp, xp, rn, up, rn, -di); else - mpn_dc_bdiv_q (rp, xp, rn, up, rn, -di); + mpn_dcpi1_bdiv_q (rp, xp, rn, up, rn, -di); /* Use Newton iterations to get the desired precision. */ for (; rn < n; rn = newrn) { + mp_size_t m; newrn = *--sizp; -#if WANT_FFT - if (ABOVE_THRESHOLD (newrn, 2 * MUL_FFT_MODF_THRESHOLD)) - { - int k; - mp_size_t m, i; - - k = mpn_fft_best_k (newrn, 0); - m = mpn_fft_next_size (newrn, k); - mpn_mul_fft (xp, m, up, newrn, rp, rn, k); - for (i = rn - 1; i >= 0; i--) - if (xp[i] > (i == 0)) - { - mpn_add_1 (xp + rn, xp + rn, newrn - rn, 1); - break; - } - } - else -#endif - mpn_mul (xp, up, newrn, rp, rn); - mpn_mullow_n (rp + rn, rp, xp + rn, newrn - rn); - mpn_neg_n (rp + rn, rp + rn, newrn - rn); + /* X <- UR. */ + m = mpn_mulmod_bnm1_next_size (newrn); + mpn_mulmod_bnm1 (xp, m, up, newrn, rp, rn, xp + m); + mpn_sub_1 (xp + m, xp, rn - (m - newrn), 1); + + /* R = R(X/B^rn) */ + mpn_mullo_n (rp + rn, rp, xp + rn, newrn - rn); + mpn_neg (rp + rn, rp + rn, newrn - rn); } } diff -Nru gmp-4.3.2+dfsg/mpn/generic/com.c gmp-5.0.2+dfsg/mpn/generic/com.c --- gmp-4.3.2+dfsg/mpn/generic/com.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/com.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,34 @@ +/* mpn_com - complement an mpn. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +#undef mpn_com +#define mpn_com __MPN(com) + +void +mpn_com (mp_ptr rp, mp_srcptr up, mp_size_t n) +{ + mp_limb_t ul; + do { + ul = *up++; + *rp++ = ~ul & GMP_NUMB_MASK; + } while (--n != 0); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/copyd.c gmp-5.0.2+dfsg/mpn/generic/copyd.c --- gmp-4.3.2+dfsg/mpn/generic/copyd.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/copyd.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,30 @@ +/* mpn_copyd + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +void +mpn_copyd (mp_ptr rp, mp_srcptr up, mp_size_t n) +{ + mp_size_t i; + + for (i = n - 1; i >= 0; i--) + rp[i] = up[i]; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/copyi.c gmp-5.0.2+dfsg/mpn/generic/copyi.c --- gmp-4.3.2+dfsg/mpn/generic/copyi.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/copyi.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,32 @@ +/* mpn_copyi + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +void +mpn_copyi (mp_ptr rp, mp_srcptr up, mp_size_t n) +{ + mp_size_t i; + + up += n; + rp += n; + for (i = -n; i != 0; i++) + rp[i] = up[i]; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dc_bdiv_q.c gmp-5.0.2+dfsg/mpn/generic/dc_bdiv_q.c --- gmp-4.3.2+dfsg/mpn/generic/dc_bdiv_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dc_bdiv_q.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,137 +0,0 @@ -/* mpn_dc_bdiv_q -- divide-and-conquer Hensel division with precomputed - inverse, returning quotient. - - Contributed to the GNU project by Niels Möller and Torbjörn Granlund. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. - -Copyright 2006, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - - -/* Computes Q = N / D mod B^n, destroys N. */ - -mp_size_t -mpn_dc_bdiv_q_n_itch (mp_size_t n) -{ - /* NOTE: Depends om mullow_n interface */ - return n; -} - -void -mpn_dc_bdiv_q_n (mp_ptr qp, - mp_ptr np, mp_srcptr dp, mp_size_t n, - mp_limb_t dinv, mp_ptr tp) -{ - while (ABOVE_THRESHOLD (n, DC_BDIV_Q_THRESHOLD)) - { - mp_limb_t l, h; - mp_limb_t cy; - - l = n >> 1; - h = n - l; - - cy = mpn_dc_bdiv_qr_n (qp, np, dp, l, dinv, tp); - - mpn_mullow_n (tp, qp, dp + h, l); - mpn_sub_n (np + h, np + h, tp, l); - - if (l < h) - { - cy += mpn_submul_1 (np + l, qp, l, dp[l]); - np[n - 1] -= cy; - } - qp += l; - np += l; - n -= l; - } - mpn_sb_bdiv_q (qp, np, n, dp, n, dinv); -} - -void -mpn_dc_bdiv_q (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn, - mp_limb_t dinv) -{ - mp_size_t qn; - mp_limb_t cy; - mp_ptr tp; - TMP_DECL; - - TMP_MARK; - - tp = TMP_SALLOC_LIMBS (dn); - - qn = nn; - - if (qn > dn) - { - /* Reduce qn mod dn in a super-efficient manner. */ - do - qn -= dn; - while (qn > dn); - - /* Perform the typically smaller block first. */ - if (BELOW_THRESHOLD (qn, DC_BDIV_QR_THRESHOLD)) - cy = mpn_sb_bdiv_qr (qp, np, 2 * qn, dp, qn, dinv); - else - cy = mpn_dc_bdiv_qr_n (qp, np, dp, qn, dinv, tp); - - if (qn != dn) - { - if (qn > dn - qn) - mpn_mul (tp, qp, qn, dp + qn, dn - qn); - else - mpn_mul (tp, dp + qn, dn - qn, qp, qn); - mpn_incr_u (tp + qn, cy); - - mpn_sub (np + qn, np + qn, nn - qn, tp, dn); - cy = 0; - } - - np += qn; - qp += qn; - - qn = nn - qn; - while (qn > dn) - { - mpn_sub_1 (np + dn, np + dn, qn, cy); - cy = mpn_dc_bdiv_qr_n (qp, np, dp, dn, dinv, tp); - qp += dn; - np += dn; - qn -= dn; - } - mpn_sub_1 (np + dn, np + dn, qn, cy); - mpn_dc_bdiv_q_n (qp, np, dp, dn, dinv, tp); - TMP_FREE; - return; - } - - if (BELOW_THRESHOLD (qn, DC_BDIV_Q_THRESHOLD)) - mpn_sb_bdiv_q (qp, np, 2 * qn, dp, qn, dinv); - else - mpn_dc_bdiv_q_n (qp, np, dp, qn, dinv, tp); - - TMP_FREE; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dc_bdiv_qr.c gmp-5.0.2+dfsg/mpn/generic/dc_bdiv_qr.c --- gmp-4.3.2+dfsg/mpn/generic/dc_bdiv_qr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dc_bdiv_qr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,163 +0,0 @@ -/* mpn_dc_bdiv_qr -- divide-and-conquer Hensel division with precomputed - inverse, returning quotient and remainder. - - Contributed to the GNU project by Niels Möller and Torbjörn Granlund. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. - -Copyright 2006, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - - -/* Computes Hensel binary division of {np, 2*n} by {dp, n}. - - Output: - - q = n * d^{-1} mod 2^{qn * GMP_NUMB_BITS}, - - r = (n - q * d) * 2^{-qn * GMP_NUMB_BITS} - - Stores q at qp. Stores the n least significant limbs of r at the high half - of np, and returns the borrow from the subtraction n - q*d. - - d must be odd. dinv is (-d)^-1 mod 2^GMP_NUMB_BITS. */ - -mp_size_t -mpn_dc_bdiv_qr_n_itch (mp_size_t n) -{ - return n; -} - -mp_limb_t -mpn_dc_bdiv_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, - mp_limb_t dinv, mp_ptr tp) -{ - mp_size_t lo, hi; - mp_limb_t cy; - mp_limb_t rh; - - lo = n >> 1; /* floor(n/2) */ - hi = n - lo; /* ceil(n/2) */ - - if (BELOW_THRESHOLD (lo, DC_BDIV_QR_THRESHOLD)) - cy = mpn_sb_bdiv_qr (qp, np, 2 * lo, dp, lo, dinv); - else - cy = mpn_dc_bdiv_qr_n (qp, np, dp, lo, dinv, tp); - - mpn_mul (tp, dp + lo, hi, qp, lo); - - mpn_incr_u (tp + lo, cy); - rh = mpn_sub (np + lo, np + lo, n + hi, tp, n); - - if (BELOW_THRESHOLD (hi, DC_BDIV_QR_THRESHOLD)) - cy = mpn_sb_bdiv_qr (qp + lo, np + lo, 2 * hi, dp, hi, dinv); - else - cy = mpn_dc_bdiv_qr_n (qp + lo, np + lo, dp, hi, dinv, tp); - - mpn_mul (tp, qp + lo, hi, dp + hi, lo); - - mpn_incr_u (tp + hi, cy); - rh += mpn_sub_n (np + n, np + n, tp, n); - - return rh; -} - -mp_limb_t -mpn_dc_bdiv_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, - mp_limb_t dinv) -{ - mp_size_t qn; - mp_limb_t rr, cy; - mp_ptr tp; - TMP_DECL; - - TMP_MARK; - - tp = TMP_SALLOC_LIMBS (dn); - - qn = nn - dn; - - if (qn > dn) - { - /* Reduce qn mod dn without division, optimizing small operations. */ - do - qn -= dn; - while (qn > dn); - - /* Perform the typically smaller block first. */ - if (BELOW_THRESHOLD (qn, DC_BDIV_QR_THRESHOLD)) - cy = mpn_sb_bdiv_qr (qp, np, 2 * qn, dp, qn, dinv); - else - cy = mpn_dc_bdiv_qr_n (qp, np, dp, qn, dinv, tp); - - rr = 0; - if (qn != dn) - { - if (qn > dn - qn) - mpn_mul (tp, qp, qn, dp + qn, dn - qn); - else - mpn_mul (tp, dp + qn, dn - qn, qp, qn); - mpn_incr_u (tp + qn, cy); - - rr = mpn_sub (np + qn, np + qn, nn - qn, tp, dn); - cy = 0; - } - - np += qn; - qp += qn; - - qn = nn - dn - qn; - do - { - rr += mpn_sub_1 (np + dn, np + dn, qn, cy); - cy = mpn_dc_bdiv_qr_n (qp, np, dp, dn, dinv, tp); - qp += dn; - np += dn; - qn -= dn; - } - while (qn > 0); - TMP_FREE; - return rr + cy; - } - - if (BELOW_THRESHOLD (qn, DC_BDIV_QR_THRESHOLD)) - cy = mpn_sb_bdiv_qr (qp, np, 2 * qn, dp, qn, dinv); - else - cy = mpn_dc_bdiv_qr_n (qp, np, dp, qn, dinv, tp); - - rr = 0; - if (qn != dn) - { - if (qn > dn - qn) - mpn_mul (tp, qp, qn, dp + qn, dn - qn); - else - mpn_mul (tp, dp + qn, dn - qn, qp, qn); - mpn_incr_u (tp + qn, cy); - - rr = mpn_sub (np + qn, np + qn, nn - qn, tp, dn); - cy = 0; - } - - TMP_FREE; - return rr + cy; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dc_divappr_q.c gmp-5.0.2+dfsg/mpn/generic/dc_divappr_q.c --- gmp-4.3.2+dfsg/mpn/generic/dc_divappr_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dc_divappr_q.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,196 +0,0 @@ -/* mpn_dc_divappr_q -- divide-and-conquer division, returning only approximate - quotient. The quotient retuened is either correct, or unity too large. - - Contributed to the GNU project by Torbjörn Granlund. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. - -Copyright 2006, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - - -mp_limb_t -mpn_dc_divappr_q_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, - mp_srcptr dip, mp_ptr tp) -{ - mp_size_t lo, hi; - mp_limb_t cy, qh, ql; - - lo = n >> 1; /* floor(n/2) */ - hi = n - lo; /* ceil(n/2) */ - - if (BELOW_THRESHOLD (hi, DC_DIV_QR_THRESHOLD)) - qh = mpn_sb_div_qr (qp + lo, np + 2 * lo, 2 * hi, dp + lo, hi, dip); - else - qh = mpn_dc_div_qr_n (qp + lo, np + 2 * lo, dp + lo, hi, dip, tp); - - mpn_mul (tp, qp + lo, hi, dp, lo); - - cy = mpn_sub_n (np + lo, np + lo, tp, n); - if (qh != 0) - cy += mpn_sub_n (np + n, np + n, dp, lo); - - while (cy != 0) - { - qh -= mpn_sub_1 (qp + lo, qp + lo, hi, 1); - cy -= mpn_add_n (np + lo, np + lo, dp, n); - } - - if (BELOW_THRESHOLD (lo, DC_DIVAPPR_Q_THRESHOLD)) - ql = mpn_sb_divappr_q (qp, np + hi, 2 * lo, dp + hi, lo, dip); - else - ql = mpn_dc_divappr_q_n (qp, np + hi, dp + hi, lo, dip, tp); - - if (UNLIKELY (ql != 0)) - { - mp_size_t i; - for (i = 0; i < lo; i++) - qp[i] = GMP_NUMB_MASK; - } - - return qh; -} - -mp_limb_t -mpn_preinv_dc_divappr_q (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn, - mp_srcptr dip) -{ - mp_size_t qn; - mp_limb_t qh, cy, qsave; - mp_ptr tp; - TMP_DECL; - - TMP_MARK; - - tp = TMP_SALLOC_LIMBS (dn+1); - - qn = nn - dn; - qp += qn; - np += nn; - dp += dn; - - if (qn > dn) - { - qn++; /* pretend we'll need an extra limb */ - /* Reduce qn mod dn without division, optimizing small operations. */ - do - qn -= dn; - while (qn > dn); - - qp -= qn; /* point at low limb of next quotient block */ - np -= qn; /* point in the middle of partial remainder */ - - /* Perform the typically smaller block first. */ - if (BELOW_THRESHOLD (qn, DC_DIV_QR_THRESHOLD)) - qh = mpn_sb_div_qr (qp, np - qn, 2 * qn, dp - qn, qn, dip); - else - qh = mpn_dc_div_qr_n (qp, np - qn, dp - qn, qn, dip, tp); - - if (qn != dn) - { - if (qn > dn - qn) - mpn_mul (tp, qp, qn, dp - dn, dn - qn); - else - mpn_mul (tp, dp - dn, dn - qn, qp, qn); - - cy = mpn_sub_n (np - dn, np - dn, tp, dn); - if (qh != 0) - cy += mpn_sub_n (np - dn + qn, np - dn + qn, dp - dn, dn - qn); - - while (cy != 0) - { - qh -= mpn_sub_1 (qp, qp, qn, 1); - cy -= mpn_add_n (np - dn, np - dn, dp - dn, dn); - } - } - - qn = nn - dn - qn + 1; - while (qn > dn) - { - qp -= dn; - np -= dn; - mpn_dc_div_qr_n (qp, np - dn, dp - dn, dn, dip, tp); - qn -= dn; - } - - /* Since we pretended we'd need an extra quotient limb before, we now - have made sure the code above left just dn-1=qn quotient limbs to - develop. Develop that plus a guard limb. */ - qn--; - qp -= qn; - np -= dn; - qsave = qp[qn]; - mpn_dc_divappr_q_n (qp, np - dn, dp - dn, dn, dip, tp); - MPN_COPY_INCR (qp, qp + 1, qn); - qp[qn] = qsave; - } - else - { - if (qn == 0) - { - qh = mpn_cmp (np - dn, dp - dn, dn) >= 0; - if (qh) - mpn_sub_n (np - dn, np - dn, dp - dn, dn); - TMP_FREE; - return qh; - } - - qp -= qn; /* point at low limb of next quotient block */ - np -= qn; /* point in the middle of partial remainder */ - - if (BELOW_THRESHOLD (qn, DC_DIVAPPR_Q_THRESHOLD)) - /* Full precision. Optimal? */ - qh = mpn_sb_divappr_q (qp, np - dn, nn, dp - dn, dn, dip); - else - { - /* Put quotient in tp, use qp as temporary, since qp lacks a limb. */ - qh = mpn_dc_divappr_q_n (tp, np - qn - 2, dp - (qn + 1), qn + 1, dip, qp); - MPN_COPY (qp, tp + 1, qn); - } - } - - TMP_FREE; - return qh; -} - -mp_limb_t -mpn_dc_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn) -{ - mp_limb_t cy; - mp_limb_t xp[2], dip[2]; - - ASSERT (dn >= 2); - - cy = mpn_add_1 (xp, dp + dn - 2, 2, 1); - if (cy != 0) - dip[0] = dip[1] = 0; - else - { - mp_limb_t scratch[10]; /* FIXME */ - mpn_invert (dip, xp, 2, scratch); - } - - return mpn_preinv_dc_divappr_q (qp, np, nn, dp, dn, dip); -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dc_div_q.c gmp-5.0.2+dfsg/mpn/generic/dc_div_q.c --- gmp-4.3.2+dfsg/mpn/generic/dc_div_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dc_div_q.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,57 +0,0 @@ -/* mpn_dc_div_q -- divide-and-conquer division, returning exact quotient only. - - Contributed to the GNU project by Torbjörn Granlund. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. - -Copyright 2006, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - - -mp_limb_t -mpn_dc_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn) -{ - mp_ptr tp, wp; - mp_limb_t qh; - mp_size_t qn; - TMP_DECL; - - TMP_MARK; - - tp = TMP_SALLOC_LIMBS (nn + 1); - MPN_COPY (tp + 1, np, nn); - tp[0] = 0; - - qn = nn - dn; - wp = TMP_SALLOC_LIMBS (qn + 1); - - qh = mpn_dc_divappr_q (wp, tp, nn + 1, dp, dn); - - if (wp[0] == 0) - /* FIXME: Should multiply and subtract here, not recompute from scratch. */ - qh = mpn_dc_div_qr (qp, np, nn, dp, dn); - else - MPN_COPY (qp, wp + 1, qn); - - return qh; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dc_div_qr.c gmp-5.0.2+dfsg/mpn/generic/dc_div_qr.c --- gmp-4.3.2+dfsg/mpn/generic/dc_div_qr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dc_div_qr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,203 +0,0 @@ -/* mpn_dc_div_qr -- recursive divide-and-conquer division for arbitrary size - operands. - - Contributed to the GNU project by Torbjörn Granlund. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. - -Copyright 2006, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - - -mp_limb_t -mpn_dc_div_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, - mp_srcptr dip, mp_ptr tp) -{ - mp_size_t lo, hi; - mp_limb_t cy, qh, ql; - - lo = n >> 1; /* floor(n/2) */ - hi = n - lo; /* ceil(n/2) */ - - if (BELOW_THRESHOLD (hi, DC_DIV_QR_THRESHOLD)) - qh = mpn_sb_div_qr (qp + lo, np + 2 * lo, 2 * hi, dp + lo, hi, dip); - else - qh = mpn_dc_div_qr_n (qp + lo, np + 2 * lo, dp + lo, hi, dip, tp); - - mpn_mul (tp, qp + lo, hi, dp, lo); - - cy = mpn_sub_n (np + lo, np + lo, tp, n); - if (qh != 0) - cy += mpn_sub_n (np + n, np + n, dp, lo); - - while (cy != 0) - { - qh -= mpn_sub_1 (qp + lo, qp + lo, hi, 1); - cy -= mpn_add_n (np + lo, np + lo, dp, n); - } - - if (BELOW_THRESHOLD (lo, DC_DIV_QR_THRESHOLD)) - ql = mpn_sb_div_qr (qp, np + hi, 2 * lo, dp + hi, lo, dip); - else - ql = mpn_dc_div_qr_n (qp, np + hi, dp + hi, lo, dip, tp); - - mpn_mul (tp, dp, hi, qp, lo); - - cy = mpn_sub_n (np, np, tp, n); - if (ql != 0) - cy += mpn_sub_n (np + lo, np + lo, dp, hi); - - while (cy != 0) - { - mpn_sub_1 (qp, qp, lo, 1); - cy -= mpn_add_n (np, np, dp, n); - } - - return qh; -} - -mp_limb_t -mpn_preinv_dc_div_qr (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn, - mp_srcptr dip) -{ - mp_size_t qn; - mp_limb_t qh, cy; - mp_ptr tp; - TMP_DECL; - - TMP_MARK; - - tp = TMP_SALLOC_LIMBS (dn); - - qn = nn - dn; - qp += qn; - np += nn; - dp += dn; - - if (qn > dn) - { - /* Reduce qn mod dn without division, optimizing small operations. */ - do - qn -= dn; - while (qn > dn); - - qp -= qn; /* point at low limb of next quotient block */ - np -= qn; /* point in the middle of partial remainder */ - - /* Perform the typically smaller block first. */ - if (BELOW_THRESHOLD (qn, DC_DIV_QR_THRESHOLD)) - qh = mpn_sb_div_qr (qp, np - qn, 2 * qn, dp - qn, qn, dip); - else - qh = mpn_dc_div_qr_n (qp, np - qn, dp - qn, qn, dip, tp); - - if (qn != dn) - { - if (qn > dn - qn) - mpn_mul (tp, qp, qn, dp - dn, dn - qn); - else - mpn_mul (tp, dp - dn, dn - qn, qp, qn); - - cy = mpn_sub_n (np - dn, np - dn, tp, dn); - if (qh != 0) - cy += mpn_sub_n (np - dn + qn, np - dn + qn, dp - dn, dn - qn); - - while (cy != 0) - { - qh -= mpn_sub_1 (qp, qp, qn, 1); - cy -= mpn_add_n (np - dn, np - dn, dp - dn, dn); - } - } - - qn = nn - dn - qn; - do - { - qp -= dn; - np -= dn; - mpn_dc_div_qr_n (qp, np - dn, dp - dn, dn, dip, tp); - qn -= dn; - } - while (qn > 0); - } - else - { - if (qn == 0) - { - qh = mpn_cmp (np - dn, dp - dn, dn) >= 0; - if (qh) - mpn_sub_n (np - dn, np - dn, dp - dn, dn); - TMP_FREE; - return qh; - } - - qp -= qn; /* point at low limb of next quotient block */ - np -= qn; /* point in the middle of partial remainder */ - - if (BELOW_THRESHOLD (qn, DC_DIV_QR_THRESHOLD)) - qh = mpn_sb_div_qr (qp, np - qn, 2 * qn, dp - qn, qn, dip); - else - qh = mpn_dc_div_qr_n (qp, np - qn, dp - qn, qn, dip, tp); - - if (qn != dn) - { - if (qn > dn - qn) - mpn_mul (tp, qp, qn, dp - dn, dn - qn); - else - mpn_mul (tp, dp - dn, dn - qn, qp, qn); - - cy = mpn_sub_n (np - dn, np - dn, tp, dn); - if (qh != 0) - cy += mpn_sub_n (np - dn + qn, np - dn + qn, dp - dn, dn - qn); - - while (cy != 0) - { - qh -= mpn_sub_1 (qp, qp, qn, 1); - cy -= mpn_add_n (np - dn, np - dn, dp - dn, dn); - } - } - } - - TMP_FREE; - return qh; -} - -mp_limb_t -mpn_dc_div_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn) -{ - mp_limb_t cy; - mp_limb_t xp[2], dip[2]; - - ASSERT (dn >= 2); - - cy = mpn_add_1 (xp, dp + dn - 2, 2, 1); - if (cy != 0) - dip[0] = dip[1] = 0; - else - { - mp_limb_t scratch[10]; /* FIXME */ - mpn_invert (dip, xp, 2, scratch); - } - - return mpn_preinv_dc_div_qr (qp, np, nn, dp, dn, dip); -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dc_divrem_n.c gmp-5.0.2+dfsg/mpn/generic/dc_divrem_n.c --- gmp-4.3.2+dfsg/mpn/generic/dc_divrem_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dc_divrem_n.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,121 +0,0 @@ -/* mpn_dc_divrem_n and auxilliary routines. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL FUNCTIONS WITH MUTABLE - INTERFACES. IT IS ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. - IN FACT, IT IS ALMOST GUARANTEED THAT THEY'LL CHANGE OR DISAPPEAR IN A - FUTURE GNU MP RELEASE. - - -Copyright 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. -Contributed by Paul Zimmermann. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - -/* -[1] Fast Recursive Division, by Christoph Burnikel and Joachim Ziegler, - Technical report MPI-I-98-1-022, october 1998. - http://www.mpi-sb.mpg.de/~ziegler/TechRep.ps.gz -*/ - -static mp_limb_t mpn_dc_div_3_by_2 - __GMP_PROTO ((mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_ptr scratch)); -static mp_limb_t mpn_dc_div_2_by_1 - __GMP_PROTO ((mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_ptr scratch)); - -/* mpn_dc_divrem_n - Implements algorithm of page 8 in [1]: divides (np,2n) - by (dp,n) and puts the quotient in (qp,n), the remainder in (np,n). - Returns most significant limb of the quotient, which is 0 or 1. - Requires that the most significant bit of the divisor is set. */ - -mp_limb_t -mpn_dc_divrem_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n) -{ - mp_limb_t ret; - mp_ptr scratch; - TMP_DECL; - TMP_MARK; - - scratch = TMP_ALLOC_LIMBS (n); - ret = mpn_dc_div_2_by_1 (qp, np, dp, n, scratch); - - TMP_FREE; - return ret; -} - -static mp_limb_t -mpn_dc_div_2_by_1 (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_ptr scratch) -{ - mp_limb_t qhl, cc; - mp_size_t n2 = n/2; - - if (n % 2 != 0) - { - mp_ptr qp1 = qp + 1; - qhl = mpn_dc_div_3_by_2 (qp1 + n2, np + 2 + n2, dp + 1, n2, scratch); - qhl += mpn_add_1 (qp1 + n2, qp1 + n2, n2, - mpn_dc_div_3_by_2 (qp1, np + 2, dp + 1, n2, scratch)); - - cc = mpn_submul_1 (np + 1, qp1, n - 1, dp[0]); - cc = mpn_sub_1 (np + n, np + n, 1, cc); - if (qhl != 0) - cc += mpn_sub_1 (np + n, np + n, 1, dp[0]); - while (cc != 0) - { - qhl -= mpn_sub_1 (qp1, qp1, n - 1, (mp_limb_t) 1); - cc -= mpn_add_n (np + 1, np + 1, dp, n); - } - qhl += mpn_add_1 (qp1, qp1, n - 1, - mpn_sb_divrem_mn (qp, np, n + 1, dp, n)); - } - else - { - qhl = mpn_dc_div_3_by_2 (qp + n2, np + n2, dp, n2, scratch); - qhl += mpn_add_1 (qp + n2, qp + n2, n2, - mpn_dc_div_3_by_2 (qp, np, dp, n2, scratch)); - } - return qhl; -} - - -/* divides (np, 3n) by (dp, 2n) and puts the quotient in (qp, n), - the remainder in (np, 2n) */ - -static mp_limb_t -mpn_dc_div_3_by_2 (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, mp_ptr scratch) -{ - mp_size_t twon = n + n; - mp_limb_t qhl, cc; - - if (n < DIV_DC_THRESHOLD) - qhl = mpn_sb_divrem_mn (qp, np + n, twon, dp + n, n); - else - qhl = mpn_dc_div_2_by_1 (qp, np + n, dp + n, n, scratch); - - mpn_mul_n (scratch, qp, dp, n); - cc = mpn_sub_n (np, np, scratch, twon); - - if (qhl != 0) - cc += mpn_sub_n (np + n, np + n, dp, n); - while (cc != 0) - { - qhl -= mpn_sub_1 (qp, qp, n, (mp_limb_t) 1); - cc -= mpn_add_n (np, np, dp, twon); - } - return qhl; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dcpi1_bdiv_q.c gmp-5.0.2+dfsg/mpn/generic/dcpi1_bdiv_q.c --- gmp-4.3.2+dfsg/mpn/generic/dcpi1_bdiv_q.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dcpi1_bdiv_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,150 @@ +/* mpn_dcpi1_bdiv_q -- divide-and-conquer Hensel division with precomputed + inverse, returning quotient. + + Contributed to the GNU project by Niels Möller and Torbjorn Granlund. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + + + +mp_size_t +mpn_dcpi1_bdiv_q_n_itch (mp_size_t n) +{ + /* NOTE: Depends on mullo_n interface */ + return n; +} + +/* Computes Q = N / D mod B^n, destroys N. + + N = {np,n} + D = {dp,n} +*/ + +void +mpn_dcpi1_bdiv_q_n (mp_ptr qp, + mp_ptr np, mp_srcptr dp, mp_size_t n, + mp_limb_t dinv, mp_ptr tp) +{ + while (ABOVE_THRESHOLD (n, DC_BDIV_Q_THRESHOLD)) + { + mp_size_t lo, hi; + mp_limb_t cy; + + lo = n >> 1; /* floor(n/2) */ + hi = n - lo; /* ceil(n/2) */ + + cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, lo, dinv, tp); + + mpn_mullo_n (tp, qp, dp + hi, lo); + mpn_sub_n (np + hi, np + hi, tp, lo); + + if (lo < hi) + { + cy += mpn_submul_1 (np + lo, qp, lo, dp[lo]); + np[n - 1] -= cy; + } + qp += lo; + np += lo; + n -= lo; + } + mpn_sbpi1_bdiv_q (qp, np, n, dp, n, dinv); +} + +/* Computes Q = N / D mod B^nn, destroys N. + + N = {np,nn} + D = {dp,dn} +*/ + +void +mpn_dcpi1_bdiv_q (mp_ptr qp, + mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, + mp_limb_t dinv) +{ + mp_size_t qn; + mp_limb_t cy; + mp_ptr tp; + TMP_DECL; + + TMP_MARK; + + ASSERT (dn >= 2); + ASSERT (nn - dn >= 0); + ASSERT (dp[0] & 1); + + tp = TMP_SALLOC_LIMBS (dn); + + qn = nn; + + if (qn > dn) + { + /* Reduce qn mod dn in a super-efficient manner. */ + do + qn -= dn; + while (qn > dn); + + /* Perform the typically smaller block first. */ + if (BELOW_THRESHOLD (qn, DC_BDIV_QR_THRESHOLD)) + cy = mpn_sbpi1_bdiv_qr (qp, np, 2 * qn, dp, qn, dinv); + else + cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, qn, dinv, tp); + + if (qn != dn) + { + if (qn > dn - qn) + mpn_mul (tp, qp, qn, dp + qn, dn - qn); + else + mpn_mul (tp, dp + qn, dn - qn, qp, qn); + mpn_incr_u (tp + qn, cy); + + mpn_sub (np + qn, np + qn, nn - qn, tp, dn); + cy = 0; + } + + np += qn; + qp += qn; + + qn = nn - qn; + while (qn > dn) + { + mpn_sub_1 (np + dn, np + dn, qn, cy); + cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp); + qp += dn; + np += dn; + qn -= dn; + } + mpn_dcpi1_bdiv_q_n (qp, np, dp, dn, dinv, tp); + } + else + { + if (BELOW_THRESHOLD (qn, DC_BDIV_Q_THRESHOLD)) + mpn_sbpi1_bdiv_q (qp, np, qn, dp, qn, dinv); + else + mpn_dcpi1_bdiv_q_n (qp, np, dp, qn, dinv, tp); + } + + TMP_FREE; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dcpi1_bdiv_qr.c gmp-5.0.2+dfsg/mpn/generic/dcpi1_bdiv_qr.c --- gmp-4.3.2+dfsg/mpn/generic/dcpi1_bdiv_qr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dcpi1_bdiv_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,166 @@ +/* mpn_dcpi1_bdiv_qr -- divide-and-conquer Hensel division with precomputed + inverse, returning quotient and remainder. + + Contributed to the GNU project by Niels Möller and Torbjorn Granlund. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + + +/* Computes Hensel binary division of {np, 2*n} by {dp, n}. + + Output: + + q = n * d^{-1} mod 2^{qn * GMP_NUMB_BITS}, + + r = (n - q * d) * 2^{-qn * GMP_NUMB_BITS} + + Stores q at qp. Stores the n least significant limbs of r at the high half + of np, and returns the borrow from the subtraction n - q*d. + + d must be odd. dinv is (-d)^-1 mod 2^GMP_NUMB_BITS. */ + +mp_size_t +mpn_dcpi1_bdiv_qr_n_itch (mp_size_t n) +{ + return n; +} + +mp_limb_t +mpn_dcpi1_bdiv_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, + mp_limb_t dinv, mp_ptr tp) +{ + mp_size_t lo, hi; + mp_limb_t cy; + mp_limb_t rh; + + lo = n >> 1; /* floor(n/2) */ + hi = n - lo; /* ceil(n/2) */ + + if (BELOW_THRESHOLD (lo, DC_BDIV_QR_THRESHOLD)) + cy = mpn_sbpi1_bdiv_qr (qp, np, 2 * lo, dp, lo, dinv); + else + cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, lo, dinv, tp); + + mpn_mul (tp, dp + lo, hi, qp, lo); + + mpn_incr_u (tp + lo, cy); + rh = mpn_sub (np + lo, np + lo, n + hi, tp, n); + + if (BELOW_THRESHOLD (hi, DC_BDIV_QR_THRESHOLD)) + cy = mpn_sbpi1_bdiv_qr (qp + lo, np + lo, 2 * hi, dp, hi, dinv); + else + cy = mpn_dcpi1_bdiv_qr_n (qp + lo, np + lo, dp, hi, dinv, tp); + + mpn_mul (tp, qp + lo, hi, dp + hi, lo); + + mpn_incr_u (tp + hi, cy); + rh += mpn_sub_n (np + n, np + n, tp, n); + + return rh; +} + +mp_limb_t +mpn_dcpi1_bdiv_qr (mp_ptr qp, mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) +{ + mp_size_t qn; + mp_limb_t rr, cy; + mp_ptr tp; + TMP_DECL; + + TMP_MARK; + + ASSERT (dn >= 2); /* to adhere to mpn_sbpi1_div_qr's limits */ + ASSERT (nn - dn >= 1); /* to adhere to mpn_sbpi1_div_qr's limits */ + ASSERT (dp[0] & 1); + + tp = TMP_SALLOC_LIMBS (dn); + + qn = nn - dn; + + if (qn > dn) + { + /* Reduce qn mod dn without division, optimizing small operations. */ + do + qn -= dn; + while (qn > dn); + + /* Perform the typically smaller block first. */ + if (BELOW_THRESHOLD (qn, DC_BDIV_QR_THRESHOLD)) + cy = mpn_sbpi1_bdiv_qr (qp, np, 2 * qn, dp, qn, dinv); + else + cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, qn, dinv, tp); + + rr = 0; + if (qn != dn) + { + if (qn > dn - qn) + mpn_mul (tp, qp, qn, dp + qn, dn - qn); + else + mpn_mul (tp, dp + qn, dn - qn, qp, qn); + mpn_incr_u (tp + qn, cy); + + rr = mpn_sub (np + qn, np + qn, nn - qn, tp, dn); + cy = 0; + } + + np += qn; + qp += qn; + + qn = nn - dn - qn; + do + { + rr += mpn_sub_1 (np + dn, np + dn, qn, cy); + cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, dn, dinv, tp); + qp += dn; + np += dn; + qn -= dn; + } + while (qn > 0); + TMP_FREE; + return rr + cy; + } + + if (BELOW_THRESHOLD (qn, DC_BDIV_QR_THRESHOLD)) + cy = mpn_sbpi1_bdiv_qr (qp, np, 2 * qn, dp, qn, dinv); + else + cy = mpn_dcpi1_bdiv_qr_n (qp, np, dp, qn, dinv, tp); + + rr = 0; + if (qn != dn) + { + if (qn > dn - qn) + mpn_mul (tp, qp, qn, dp + qn, dn - qn); + else + mpn_mul (tp, dp + qn, dn - qn, qp, qn); + mpn_incr_u (tp + qn, cy); + + rr = mpn_sub (np + qn, np + qn, nn - qn, tp, dn); + cy = 0; + } + + TMP_FREE; + return rr + cy; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dcpi1_divappr_q.c gmp-5.0.2+dfsg/mpn/generic/dcpi1_divappr_q.c --- gmp-4.3.2+dfsg/mpn/generic/dcpi1_divappr_q.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dcpi1_divappr_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,246 @@ +/* mpn_dcpi1_divappr_q -- divide-and-conquer division, returning approximate + quotient. The quotient returned is either correct, or one too large. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + + +mp_limb_t +mpn_dcpi1_divappr_q_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, + gmp_pi1_t *dinv, mp_ptr tp) +{ + mp_size_t lo, hi; + mp_limb_t cy, qh, ql; + + lo = n >> 1; /* floor(n/2) */ + hi = n - lo; /* ceil(n/2) */ + + if (BELOW_THRESHOLD (hi, DC_DIV_QR_THRESHOLD)) + qh = mpn_sbpi1_div_qr (qp + lo, np + 2 * lo, 2 * hi, dp + lo, hi, dinv->inv32); + else + qh = mpn_dcpi1_div_qr_n (qp + lo, np + 2 * lo, dp + lo, hi, dinv, tp); + + mpn_mul (tp, qp + lo, hi, dp, lo); + + cy = mpn_sub_n (np + lo, np + lo, tp, n); + if (qh != 0) + cy += mpn_sub_n (np + n, np + n, dp, lo); + + while (cy != 0) + { + qh -= mpn_sub_1 (qp + lo, qp + lo, hi, 1); + cy -= mpn_add_n (np + lo, np + lo, dp, n); + } + + if (BELOW_THRESHOLD (lo, DC_DIVAPPR_Q_THRESHOLD)) + ql = mpn_sbpi1_divappr_q (qp, np + hi, 2 * lo, dp + hi, lo, dinv->inv32); + else + ql = mpn_dcpi1_divappr_q_n (qp, np + hi, dp + hi, lo, dinv, tp); + + if (UNLIKELY (ql != 0)) + { + mp_size_t i; + for (i = 0; i < lo; i++) + qp[i] = GMP_NUMB_MASK; + } + + return qh; +} + +mp_limb_t +mpn_dcpi1_divappr_q (mp_ptr qp, mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, gmp_pi1_t *dinv) +{ + mp_size_t qn; + mp_limb_t qh, cy, qsave; + mp_ptr tp; + TMP_DECL; + + TMP_MARK; + + ASSERT (dn >= 6); + ASSERT (nn > dn); + ASSERT (dp[dn-1] & GMP_NUMB_HIGHBIT); + + qn = nn - dn; + qp += qn; + np += nn; + dp += dn; + + if (qn >= dn) + { + qn++; /* pretend we'll need an extra limb */ + /* Reduce qn mod dn without division, optimizing small operations. */ + do + qn -= dn; + while (qn > dn); + + qp -= qn; /* point at low limb of next quotient block */ + np -= qn; /* point in the middle of partial remainder */ + + tp = TMP_SALLOC_LIMBS (dn); + + /* Perform the typically smaller block first. */ + if (qn == 1) + { + mp_limb_t q, n2, n1, n0, d1, d0; + + /* Handle qh up front, for simplicity. */ + qh = mpn_cmp (np - dn + 1, dp - dn, dn) >= 0; + if (qh) + ASSERT_NOCARRY (mpn_sub_n (np - dn + 1, np - dn + 1, dp - dn, dn)); + + /* A single iteration of schoolbook: One 3/2 division, + followed by the bignum update and adjustment. */ + n2 = np[0]; + n1 = np[-1]; + n0 = np[-2]; + d1 = dp[-1]; + d0 = dp[-2]; + + ASSERT (n2 < d1 || (n2 == d1 && n1 <= d0)); + + if (UNLIKELY (n2 == d1) && n1 == d0) + { + q = GMP_NUMB_MASK; + cy = mpn_submul_1 (np - dn, dp - dn, dn, q); + ASSERT (cy == n2); + } + else + { + udiv_qr_3by2 (q, n1, n0, n2, n1, n0, d1, d0, dinv->inv32); + + if (dn > 2) + { + mp_limb_t cy, cy1; + cy = mpn_submul_1 (np - dn, dp - dn, dn - 2, q); + + cy1 = n0 < cy; + n0 = (n0 - cy) & GMP_NUMB_MASK; + cy = n1 < cy1; + n1 = (n1 - cy1) & GMP_NUMB_MASK; + np[-2] = n0; + + if (UNLIKELY (cy != 0)) + { + n1 += d1 + mpn_add_n (np - dn, np - dn, dp - dn, dn - 1); + qh -= (q == 0); + q = (q - 1) & GMP_NUMB_MASK; + } + } + else + np[-2] = n0; + + np[-1] = n1; + } + qp[0] = q; + } + else + { + if (qn == 2) + qh = mpn_divrem_2 (qp, 0L, np - 2, 4, dp - 2); + else if (BELOW_THRESHOLD (qn, DC_DIV_QR_THRESHOLD)) + qh = mpn_sbpi1_div_qr (qp, np - qn, 2 * qn, dp - qn, qn, dinv->inv32); + else + qh = mpn_dcpi1_div_qr_n (qp, np - qn, dp - qn, qn, dinv, tp); + + if (qn != dn) + { + if (qn > dn - qn) + mpn_mul (tp, qp, qn, dp - dn, dn - qn); + else + mpn_mul (tp, dp - dn, dn - qn, qp, qn); + + cy = mpn_sub_n (np - dn, np - dn, tp, dn); + if (qh != 0) + cy += mpn_sub_n (np - dn + qn, np - dn + qn, dp - dn, dn - qn); + + while (cy != 0) + { + qh -= mpn_sub_1 (qp, qp, qn, 1); + cy -= mpn_add_n (np - dn, np - dn, dp - dn, dn); + } + } + } + qn = nn - dn - qn + 1; + while (qn > dn) + { + qp -= dn; + np -= dn; + mpn_dcpi1_div_qr_n (qp, np - dn, dp - dn, dn, dinv, tp); + qn -= dn; + } + + /* Since we pretended we'd need an extra quotient limb before, we now + have made sure the code above left just dn-1=qn quotient limbs to + develop. Develop that plus a guard limb. */ + qn--; + qp -= qn; + np -= dn; + qsave = qp[qn]; + mpn_dcpi1_divappr_q_n (qp, np - dn, dp - dn, dn, dinv, tp); + MPN_COPY_INCR (qp, qp + 1, qn); + qp[qn] = qsave; + } + else /* (qn < dn) */ + { + mp_ptr q2p; +#if 0 /* not possible since we demand nn > dn */ + if (qn == 0) + { + qh = mpn_cmp (np - dn, dp - dn, dn) >= 0; + if (qh) + mpn_sub_n (np - dn, np - dn, dp - dn, dn); + TMP_FREE; + return qh; + } +#endif + + qp -= qn; /* point at low limb of next quotient block */ + np -= qn; /* point in the middle of partial remainder */ + + q2p = TMP_SALLOC_LIMBS (qn + 1); + /* Should we at all check DC_DIVAPPR_Q_THRESHOLD here, or reply on + callers not to be silly? */ + if (BELOW_THRESHOLD (qn, DC_DIVAPPR_Q_THRESHOLD)) + { + qh = mpn_sbpi1_divappr_q (q2p, np - qn - 2, 2 * (qn + 1), + dp - (qn + 1), qn + 1, dinv->inv32); + } + else + { + /* It is tempting to use qp for recursive scratch and put quotient in + tp, but the recursive scratch needs one limb too many. */ + tp = TMP_SALLOC_LIMBS (qn + 1); + qh = mpn_dcpi1_divappr_q_n (q2p, np - qn - 2, dp - (qn + 1), qn + 1, dinv, tp); + } + MPN_COPY (qp, q2p + 1, qn); + } + + TMP_FREE; + return qh; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dcpi1_div_q.c gmp-5.0.2+dfsg/mpn/generic/dcpi1_div_q.c --- gmp-4.3.2+dfsg/mpn/generic/dcpi1_div_q.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dcpi1_div_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,76 @@ +/* mpn_dc_div_q -- divide-and-conquer division, returning exact quotient + only. + + Contributed to the GNU project by Torbjorn Granlund and Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + + +mp_limb_t +mpn_dcpi1_div_q (mp_ptr qp, mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, gmp_pi1_t *dinv) +{ + mp_ptr tp, wp; + mp_limb_t qh; + mp_size_t qn; + TMP_DECL; + + TMP_MARK; + + ASSERT (dn >= 6); + ASSERT (nn - dn >= 3); + ASSERT (dp[dn-1] & GMP_NUMB_HIGHBIT); + + tp = TMP_SALLOC_LIMBS (nn + 1); + MPN_COPY (tp + 1, np, nn); + tp[0] = 0; + + qn = nn - dn; + wp = TMP_SALLOC_LIMBS (qn + 1); + + qh = mpn_dcpi1_divappr_q (wp, tp, nn + 1, dp, dn, dinv); + + if (wp[0] == 0) + { + mp_limb_t cy; + + if (qn > dn) + mpn_mul (tp, wp + 1, qn, dp, dn); + else + mpn_mul (tp, dp, dn, wp + 1, qn); + + cy = (qh != 0) ? mpn_add_n (tp + qn, tp + qn, dp, dn) : 0; + + if (cy || mpn_cmp (tp, np, nn) > 0) /* At most is wrong by one, no cycle. */ + qh -= mpn_sub_1 (qp, wp + 1, qn, 1); + else /* Same as below */ + MPN_COPY (qp, wp + 1, qn); + } + else + MPN_COPY (qp, wp + 1, qn); + + TMP_FREE; + return qh; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dcpi1_div_qr.c gmp-5.0.2+dfsg/mpn/generic/dcpi1_div_qr.c --- gmp-4.3.2+dfsg/mpn/generic/dcpi1_div_qr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dcpi1_div_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,238 @@ +/* mpn_dcpi1_div_qr_n -- recursive divide-and-conquer division for arbitrary + size operands. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2006, 2007, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + + +mp_limb_t +mpn_dcpi1_div_qr_n (mp_ptr qp, mp_ptr np, mp_srcptr dp, mp_size_t n, + gmp_pi1_t *dinv, mp_ptr tp) +{ + mp_size_t lo, hi; + mp_limb_t cy, qh, ql; + + lo = n >> 1; /* floor(n/2) */ + hi = n - lo; /* ceil(n/2) */ + + if (BELOW_THRESHOLD (hi, DC_DIV_QR_THRESHOLD)) + qh = mpn_sbpi1_div_qr (qp + lo, np + 2 * lo, 2 * hi, dp + lo, hi, dinv->inv32); + else + qh = mpn_dcpi1_div_qr_n (qp + lo, np + 2 * lo, dp + lo, hi, dinv, tp); + + mpn_mul (tp, qp + lo, hi, dp, lo); + + cy = mpn_sub_n (np + lo, np + lo, tp, n); + if (qh != 0) + cy += mpn_sub_n (np + n, np + n, dp, lo); + + while (cy != 0) + { + qh -= mpn_sub_1 (qp + lo, qp + lo, hi, 1); + cy -= mpn_add_n (np + lo, np + lo, dp, n); + } + + if (BELOW_THRESHOLD (lo, DC_DIV_QR_THRESHOLD)) + ql = mpn_sbpi1_div_qr (qp, np + hi, 2 * lo, dp + hi, lo, dinv->inv32); + else + ql = mpn_dcpi1_div_qr_n (qp, np + hi, dp + hi, lo, dinv, tp); + + mpn_mul (tp, dp, hi, qp, lo); + + cy = mpn_sub_n (np, np, tp, n); + if (ql != 0) + cy += mpn_sub_n (np + lo, np + lo, dp, hi); + + while (cy != 0) + { + mpn_sub_1 (qp, qp, lo, 1); + cy -= mpn_add_n (np, np, dp, n); + } + + return qh; +} + +mp_limb_t +mpn_dcpi1_div_qr (mp_ptr qp, + mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, + gmp_pi1_t *dinv) +{ + mp_size_t qn; + mp_limb_t qh, cy; + mp_ptr tp; + TMP_DECL; + + TMP_MARK; + + ASSERT (dn >= 6); /* to adhere to mpn_sbpi1_div_qr's limits */ + ASSERT (nn - dn >= 3); /* to adhere to mpn_sbpi1_div_qr's limits */ + ASSERT (dp[dn-1] & GMP_NUMB_HIGHBIT); + + tp = TMP_SALLOC_LIMBS (dn); + + qn = nn - dn; + qp += qn; + np += nn; + dp += dn; + + if (qn > dn) + { + /* Reduce qn mod dn without division, optimizing small operations. */ + do + qn -= dn; + while (qn > dn); + + qp -= qn; /* point at low limb of next quotient block */ + np -= qn; /* point in the middle of partial remainder */ + + /* Perform the typically smaller block first. */ + if (qn == 1) + { + mp_limb_t q, n2, n1, n0, d1, d0; + + /* Handle qh up front, for simplicity. */ + qh = mpn_cmp (np - dn + 1, dp - dn, dn) >= 0; + if (qh) + ASSERT_NOCARRY (mpn_sub_n (np - dn + 1, np - dn + 1, dp - dn, dn)); + + /* A single iteration of schoolbook: One 3/2 division, + followed by the bignum update and adjustment. */ + n2 = np[0]; + n1 = np[-1]; + n0 = np[-2]; + d1 = dp[-1]; + d0 = dp[-2]; + + ASSERT (n2 < d1 || (n2 == d1 && n1 <= d0)); + + if (UNLIKELY (n2 == d1) && n1 == d0) + { + q = GMP_NUMB_MASK; + cy = mpn_submul_1 (np - dn, dp - dn, dn, q); + ASSERT (cy == n2); + } + else + { + udiv_qr_3by2 (q, n1, n0, n2, n1, n0, d1, d0, dinv->inv32); + + if (dn > 2) + { + mp_limb_t cy, cy1; + cy = mpn_submul_1 (np - dn, dp - dn, dn - 2, q); + + cy1 = n0 < cy; + n0 = (n0 - cy) & GMP_NUMB_MASK; + cy = n1 < cy1; + n1 = (n1 - cy1) & GMP_NUMB_MASK; + np[-2] = n0; + + if (UNLIKELY (cy != 0)) + { + n1 += d1 + mpn_add_n (np - dn, np - dn, dp - dn, dn - 1); + qh -= (q == 0); + q = (q - 1) & GMP_NUMB_MASK; + } + } + else + np[-2] = n0; + + np[-1] = n1; + } + qp[0] = q; + } + else + { + /* Do a 2qn / qn division */ + if (qn == 2) + qh = mpn_divrem_2 (qp, 0L, np - 2, 4, dp - 2); /* FIXME: obsolete function. Use 5/3 division? */ + else if (BELOW_THRESHOLD (qn, DC_DIV_QR_THRESHOLD)) + qh = mpn_sbpi1_div_qr (qp, np - qn, 2 * qn, dp - qn, qn, dinv->inv32); + else + qh = mpn_dcpi1_div_qr_n (qp, np - qn, dp - qn, qn, dinv, tp); + + if (qn != dn) + { + if (qn > dn - qn) + mpn_mul (tp, qp, qn, dp - dn, dn - qn); + else + mpn_mul (tp, dp - dn, dn - qn, qp, qn); + + cy = mpn_sub_n (np - dn, np - dn, tp, dn); + if (qh != 0) + cy += mpn_sub_n (np - dn + qn, np - dn + qn, dp - dn, dn - qn); + + while (cy != 0) + { + qh -= mpn_sub_1 (qp, qp, qn, 1); + cy -= mpn_add_n (np - dn, np - dn, dp - dn, dn); + } + } + } + + qn = nn - dn - qn; + do + { + qp -= dn; + np -= dn; + mpn_dcpi1_div_qr_n (qp, np - dn, dp - dn, dn, dinv, tp); + qn -= dn; + } + while (qn > 0); + } + else + { + qp -= qn; /* point at low limb of next quotient block */ + np -= qn; /* point in the middle of partial remainder */ + + if (BELOW_THRESHOLD (qn, DC_DIV_QR_THRESHOLD)) + qh = mpn_sbpi1_div_qr (qp, np - qn, 2 * qn, dp - qn, qn, dinv->inv32); + else + qh = mpn_dcpi1_div_qr_n (qp, np - qn, dp - qn, qn, dinv, tp); + + if (qn != dn) + { + if (qn > dn - qn) + mpn_mul (tp, qp, qn, dp - dn, dn - qn); + else + mpn_mul (tp, dp - dn, dn - qn, qp, qn); + + cy = mpn_sub_n (np - dn, np - dn, tp, dn); + if (qh != 0) + cy += mpn_sub_n (np - dn + qn, np - dn + qn, dp - dn, dn - qn); + + while (cy != 0) + { + qh -= mpn_sub_1 (qp, qp, qn, 1); + cy -= mpn_add_n (np - dn, np - dn, dp - dn, dn); + } + } + } + + TMP_FREE; + return qh; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/dive_1.c gmp-5.0.2+dfsg/mpn/generic/dive_1.c --- gmp-4.3.2+dfsg/mpn/generic/dive_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/dive_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -30,7 +30,7 @@ /* Divide a={src,size} by d=divisor and store the quotient in q={dst,size}. q will only be correct if d divides a exactly. - A separate loop is used for shift==0 because n< 0); + ASSERT (nn >= dn); + ASSERT (dp[dn-1] > 0); + + while (dp[0] == 0) + { + ASSERT (np[0] == 0); + dp++; + np++; + dn--; + nn--; + } + + if (dn == 1) + { + MPN_DIVREM_OR_DIVEXACT_1 (qp, np, nn, dp[0]); + return; + } + + TMP_MARK; + + qn = nn + 1 - dn; + count_trailing_zeros (shift, dp[0]); + + if (shift > 0) + { + mp_size_t ss = (dn > qn) ? qn + 1 : dn; + + tp = TMP_ALLOC_LIMBS (ss); + mpn_rshift (tp, dp, ss, shift); + dp = tp; + + /* Since we have excluded dn == 1, we have nn > qn, and we need + to shift one limb beyond qn. */ + wp = TMP_ALLOC_LIMBS (qn + 1); + mpn_rshift (wp, np, qn + 1, shift); + } + else + { + wp = TMP_ALLOC_LIMBS (qn); + MPN_COPY (wp, np, qn); + } + + if (dn > qn) + dn = qn; + + tp = TMP_ALLOC_LIMBS (mpn_bdiv_q_itch (qn, dn)); + mpn_bdiv_q (qp, wp, qn, dp, dn, tp); + TMP_FREE; +} + +#else + /* We use the Jebelean's bidirectional exact division algorithm. This is somewhat naively implemented, with equal quotient parts done by 2-adic division and truncating division. Since 2-adic division is faster, it @@ -44,17 +111,8 @@ * It makes the msb part 1 or 2 limbs larger than the lsb part, in spite of that the latter is faster. We should at least reverse this, but perhaps we should make the lsb part considerably larger. (How do we tune this?) - - Perhaps we could somehow use 2-adic division for both parts, not as now - truncating division for the upper part and 2-adic for the lower part. */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" - - mp_size_t mpn_divexact_itch (mp_size_t nn, mp_size_t dn) { @@ -76,7 +134,8 @@ int cnt; mp_ptr xdp; mp_limb_t di; - mp_limb_t dip[2], xp[2], cy; + mp_limb_t cy; + gmp_pi1_t dinv; TMP_DECL; TMP_MARK; @@ -90,7 +149,7 @@ MPN_COPY (tp, np, qn); binvert_limb (di, dp[0]); di = -di; dn = MIN (dn, qn); - mpn_sb_bdiv_q (qp, tp, qn, dp, dn, di); + mpn_sbpi1_bdiv_q (qp, tp, qn, dp, dn, di); TMP_FREE; return; } @@ -107,14 +166,14 @@ MPN_COPY (tp, np, qn); binvert_limb (di, dp[0]); di = -di; dn = MIN (dn, qn); - mpn_sb_bdiv_q (qp, tp, qn, dp, dn, di); + mpn_sbpi1_bdiv_q (qp, tp, qn, dp, dn, di); } else if (BELOW_THRESHOLD (dn, MU_BDIV_Q_THRESHOLD)) { tp = scratch; MPN_COPY (tp, np, qn); binvert_limb (di, dp[0]); di = -di; - mpn_dc_bdiv_q (qp, tp, qn, dp, dn, di); + mpn_dcpi1_bdiv_q (qp, tp, qn, dp, dn, di); } else { @@ -180,23 +239,14 @@ MPN_COPY (tp, np + nn - nn1, nn1); } + invert_pi1 (dinv, xdp[qn1 - 1], xdp[qn1 - 2]); if (BELOW_THRESHOLD (qn1, DC_DIVAPPR_Q_THRESHOLD)) { - /* Compute divisor inverse. */ - cy = mpn_add_1 (xp, xdp + qn1 - 2, 2, 1); - if (cy != 0) - dip[0] = dip[1] = 0; - else - { - mp_limb_t scratch[10]; /* FIXME */ - mpn_invert (dip, xp, 2, scratch); - } - - qp[qn0 - 1 + nn1 - qn1] = mpn_sb_divappr_q (qp + qn0 - 1, tp, nn1, xdp, qn1, dip); + qp[qn0 - 1 + nn1 - qn1] = mpn_sbpi1_divappr_q (qp + qn0 - 1, tp, nn1, xdp, qn1, dinv.inv32); } else if (BELOW_THRESHOLD (qn1, MU_DIVAPPR_Q_THRESHOLD)) { - qp[qn0 - 1 + nn1 - qn1] = mpn_dc_divappr_q (qp + qn0 - 1, tp, nn1, xdp, qn1); + qp[qn0 - 1 + nn1 - qn1] = mpn_dcpi1_divappr_q (qp + qn0 - 1, tp, nn1, xdp, qn1, &dinv); } else { @@ -215,12 +265,12 @@ if (BELOW_THRESHOLD (qn0, DC_BDIV_Q_THRESHOLD)) { MPN_COPY (tp, np, qn0); - mpn_sb_bdiv_q (qp, tp, qn0, dp, qn0, di); + mpn_sbpi1_bdiv_q (qp, tp, qn0, dp, qn0, di); } else if (BELOW_THRESHOLD (qn0, MU_BDIV_Q_THRESHOLD)) { MPN_COPY (tp, np, qn0); - mpn_dc_bdiv_q (qp, tp, qn0, dp, qn0, di); + mpn_dcpi1_bdiv_q (qp, tp, qn0, dp, qn0, di); } else { @@ -232,3 +282,4 @@ TMP_FREE; } +#endif diff -Nru gmp-4.3.2+dfsg/mpn/generic/divis.c gmp-5.0.2+dfsg/mpn/generic/divis.c --- gmp-4.3.2+dfsg/mpn/generic/divis.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/divis.c 2011-05-08 09:49:29.000000000 +0000 @@ -4,7 +4,7 @@ CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES. -Copyright 2001, 2002, 2005 Free Software Foundation, Inc. +Copyright 2001, 2002, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -26,8 +26,8 @@ #include "longlong.h" -/* Determine whether {ap,asize} is divisible by {dp,dsize}. Must have both - operands normalized, meaning high limbs non-zero, except that asize==0 is +/* Determine whether {ap,an} is divisible by {dp,dn}. Must have both + operands normalized, meaning high limbs non-zero, except that an==0 is allowed. There usually won't be many low zero bits on d, but the checks for this @@ -36,14 +36,6 @@ Future: - This is currently not much faster than the user doing an mpz_tdiv_r - and testing for a zero remainder, but hopefully it can be improved. - - mpn_bdivmod is one possibility, but it only trades udiv_qrnnd's for - multiplies, it won't save crossproducts the way it can in mpz_divexact. - Definitely worthwhile on small operands for most processors, but a - sub-quadratic version will be wanted before it can be used on all sizes. - Getting the remainder limb by limb would make an early exit possible on finding a non-zero. This would probably have to be bdivmod style so there's no addback, but it would need a multi-precision inverse and so @@ -53,37 +45,30 @@ just append a low zero limb to "a" rather than bit-shifting as mpn_tdiv_qr does internally, so long as it's already been checked that a has at least as many trailing zeros bits as d. Or equivalently, pass - qxn==1 to mpn_tdiv_qr, if/when it accepts that. - - When called from mpz_congruent_p, {ap,asize} is a temporary which can be - destroyed. Maybe it'd be possible to get into mpn_tdiv_qr at a lower - level to save copying it, or maybe that function could accept rp==ap. - - Could use __attribute__ ((regparm (2))) on i386, so the parameters - wouldn't need extra stack when called from mpz_divisible_p, but a - pre-release gcc 3 didn't generate particularly good register juggling in - that case, so this isn't done for now. */ + qxn==1 to mpn_tdiv_qr, if/when it accepts that. */ int -mpn_divisible_p (mp_srcptr ap, mp_size_t asize, - mp_srcptr dp, mp_size_t dsize) +mpn_divisible_p (mp_srcptr ap, mp_size_t an, + mp_srcptr dp, mp_size_t dn) { mp_limb_t alow, dlow, dmask; - mp_ptr qp, rp; + mp_ptr qp, rp, tp; mp_size_t i; + mp_limb_t di; + unsigned twos; TMP_DECL; - ASSERT (asize >= 0); - ASSERT (asize == 0 || ap[asize-1] != 0); - ASSERT (dsize >= 1); - ASSERT (dp[dsize-1] != 0); - ASSERT_MPN (ap, asize); - ASSERT_MPN (dp, dsize); + ASSERT (an >= 0); + ASSERT (an == 0 || ap[an-1] != 0); + ASSERT (dn >= 1); + ASSERT (dp[dn-1] != 0); + ASSERT_MPN (ap, an); + ASSERT_MPN (dp, dn); /* When a= 1); - dsize--; ASSERT (dsize >= 1); + /* a!=0 and d!=0 so won't get to n==0 */ + an--; ASSERT (an >= 1); + dn--; ASSERT (dn >= 1); ap++; dp++; } @@ -109,41 +94,88 @@ if ((alow & dmask) != 0) return 0; - if (dsize == 1) + if (dn == 1) { - if (BELOW_THRESHOLD (asize, MODEXACT_1_ODD_THRESHOLD)) - return mpn_mod_1 (ap, asize, dlow) == 0; + if (ABOVE_THRESHOLD (an, BMOD_1_TO_MOD_1_THRESHOLD)) + return mpn_mod_1 (ap, an, dlow) == 0; - if ((dlow & 1) == 0) - { - unsigned twos; - count_trailing_zeros (twos, dlow); - dlow >>= twos; - } - return mpn_modexact_1_odd (ap, asize, dlow) == 0; + count_trailing_zeros (twos, dlow); + dlow >>= twos; + return mpn_modexact_1_odd (ap, an, dlow) == 0; } - if (dsize == 2) + if (dn == 2) { mp_limb_t dsecond = dp[1]; if (dsecond <= dmask) { - unsigned twos; count_trailing_zeros (twos, dlow); dlow = (dlow >> twos) | (dsecond << (GMP_NUMB_BITS-twos)); ASSERT_LIMB (dlow); - return MPN_MOD_OR_MODEXACT_1_ODD (ap, asize, dlow) == 0; + return MPN_MOD_OR_MODEXACT_1_ODD (ap, an, dlow) == 0; } } + /* Should we compute Q = A * D^(-1) mod B^k, + R = A - Q * D mod B^k + here, for some small values of k? Then check if R = 0 (mod B^k). */ + + /* We could also compute A' = A mod T and D' = D mod P, for some + P = 3 * 5 * 7 * 11 ..., and then check if any prime factor from P + dividing D' also divides A'. */ + TMP_MARK; - rp = TMP_ALLOC_LIMBS (asize+1); - qp = rp + dsize; + rp = TMP_ALLOC_LIMBS (an + 1); + qp = TMP_ALLOC_LIMBS (an - dn + 1); /* FIXME: Could we avoid this */ - mpn_tdiv_qr (qp, rp, (mp_size_t) 0, ap, asize, dp, dsize); + count_trailing_zeros (twos, dp[0]); + + if (twos != 0) + { + tp = TMP_ALLOC_LIMBS (dn); + ASSERT_NOCARRY (mpn_rshift (tp, dp, dn, twos)); + dp = tp; + + ASSERT_NOCARRY (mpn_rshift (rp, ap, an, twos)); + } + else + { + MPN_COPY (rp, ap, an); + } + if (rp[an - 1] >= dp[dn - 1]) + { + rp[an] = 0; + an++; + } + else if (an == dn) + { + TMP_FREE; + return 0; + } + + ASSERT (an > dn); /* requirement of functions below */ + + if (BELOW_THRESHOLD (dn, DC_BDIV_QR_THRESHOLD) || + BELOW_THRESHOLD (an - dn, DC_BDIV_QR_THRESHOLD)) + { + binvert_limb (di, dp[0]); + mpn_sbpi1_bdiv_qr (qp, rp, an, dp, dn, -di); + rp += an - dn; + } + else if (BELOW_THRESHOLD (dn, MU_BDIV_QR_THRESHOLD)) + { + binvert_limb (di, dp[0]); + mpn_dcpi1_bdiv_qr (qp, rp, an, dp, dn, -di); + rp += an - dn; + } + else + { + tp = TMP_ALLOC_LIMBS (mpn_mu_bdiv_qr_itch (an, dn)); + mpn_mu_bdiv_qr (qp, rp, rp, an, dp, dn, tp); + } - /* test for {rp,dsize} zero or non-zero */ + /* test for {rp,dn} zero or non-zero */ i = 0; do { @@ -153,7 +185,7 @@ return 0; } } - while (++i < dsize); + while (++i < dn); TMP_FREE; return 1; diff -Nru gmp-4.3.2+dfsg/mpn/generic/div_q.c gmp-5.0.2+dfsg/mpn/generic/div_q.c --- gmp-4.3.2+dfsg/mpn/generic/div_q.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/div_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,312 @@ +/* mpn_div_q -- division for arbitrary size operands. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + + +/* Compute Q = N/D with truncation. + N = {np,nn} + D = {dp,dn} + Q = {qp,nn-dn+1} + T = {scratch,nn+1} is scratch space + N and D are both untouched by the computation. + N and T may overlap; pass the same space if N is irrelevant after the call, + but note that tp needs an extra limb. + + Operand requirements: + N >= D > 0 + dp[dn-1] != 0 + No overlap between the N, D, and Q areas. + + This division function does not clobber its input operands, since it is + intended to support average-O(qn) division, and for that to be effective, it + cannot put requirements on callers to copy a O(nn) operand. + + If a caller does not care about the value of {np,nn+1} after calling this + function, it should pass np also for the scratch argument. This function + will then save some time and space by avoiding allocation and copying. + (FIXME: Is this a good design? We only really save any copying for + already-normalised divisors, which should be rare. It also prevents us from + reasonably asking for all scratch space we need.) + + We write nn-dn+1 limbs for the quotient, but return void. Why not return + the most significant quotient limb? Look at the 4 main code blocks below + (consisting of an outer if-else where each arm contains an if-else). It is + tricky for the first code block, since the mpn_*_div_q calls will typically + generate all nn-dn+1 and return 0 or 1. I don't see how to fix that unless + we generate the most significant quotient limb here, before calling + mpn_*_div_q, or put the quotient in a temporary area. Since this is a + critical division case (the SB sub-case in particular) copying is not a good + idea. + + It might make sense to split the if-else parts of the (qn + FUDGE + >= dn) blocks into separate functions, since we could promise quite + different things to callers in these two cases. The 'then' case + benefits from np=scratch, and it could perhaps even tolerate qp=np, + saving some headache for many callers. + + FIXME: Scratch allocation leaves a lot to be desired. E.g., for the MU size + operands, we do not reuse the huge scratch for adjustments. This can be a + serious waste of memory for the largest operands. +*/ + +/* FUDGE determines when to try getting an approximate quotient from the upper + parts of the dividend and divisor, then adjust. N.B. FUDGE must be >= 2 + for the code to be correct. */ +#define FUDGE 5 /* FIXME: tune this */ + +#define DC_DIV_Q_THRESHOLD DC_DIVAPPR_Q_THRESHOLD +#define MU_DIV_Q_THRESHOLD MU_DIVAPPR_Q_THRESHOLD +#define MUPI_DIV_Q_THRESHOLD MUPI_DIVAPPR_Q_THRESHOLD +#ifndef MUPI_DIVAPPR_Q_THRESHOLD +#define MUPI_DIVAPPR_Q_THRESHOLD MUPI_DIV_QR_THRESHOLD +#endif + +void +mpn_div_q (mp_ptr qp, + mp_srcptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, mp_ptr scratch) +{ + mp_ptr new_dp, new_np, tp, rp; + mp_limb_t cy, dh, qh; + mp_size_t new_nn, qn; + gmp_pi1_t dinv; + int cnt; + TMP_DECL; + TMP_MARK; + + ASSERT (nn >= dn); + ASSERT (dn > 0); + ASSERT (dp[dn - 1] != 0); + ASSERT (! MPN_OVERLAP_P (qp, nn - dn + 1, np, nn)); + ASSERT (! MPN_OVERLAP_P (qp, nn - dn + 1, dp, dn)); + ASSERT (MPN_SAME_OR_SEPARATE_P (np, scratch, nn)); + + ASSERT_ALWAYS (FUDGE >= 2); + + if (dn == 1) + { + mpn_divrem_1 (qp, 0L, np, nn, dp[dn - 1]); + return; + } + + qn = nn - dn + 1; /* Quotient size, high limb might be zero */ + + if (qn + FUDGE >= dn) + { + /* |________________________| + |_______| */ + new_np = scratch; + + dh = dp[dn - 1]; + if (LIKELY ((dh & GMP_NUMB_HIGHBIT) == 0)) + { + count_leading_zeros (cnt, dh); + + cy = mpn_lshift (new_np, np, nn, cnt); + new_np[nn] = cy; + new_nn = nn + (cy != 0); + + new_dp = TMP_ALLOC_LIMBS (dn); + mpn_lshift (new_dp, dp, dn, cnt); + + if (dn == 2) + { + qh = mpn_divrem_2 (qp, 0L, new_np, new_nn, new_dp); + } + else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) || + BELOW_THRESHOLD (new_nn - dn, DC_DIV_Q_THRESHOLD)) + { + invert_pi1 (dinv, new_dp[dn - 1], new_dp[dn - 2]); + qh = mpn_sbpi1_div_q (qp, new_np, new_nn, new_dp, dn, dinv.inv32); + } + else if (BELOW_THRESHOLD (dn, MUPI_DIV_Q_THRESHOLD) || /* fast condition */ + BELOW_THRESHOLD (nn, 2 * MU_DIV_Q_THRESHOLD) || /* fast condition */ + (double) (2 * (MU_DIV_Q_THRESHOLD - MUPI_DIV_Q_THRESHOLD)) * dn /* slow... */ + + (double) MUPI_DIV_Q_THRESHOLD * nn > (double) dn * nn) /* ...condition */ + { + invert_pi1 (dinv, new_dp[dn - 1], new_dp[dn - 2]); + qh = mpn_dcpi1_div_q (qp, new_np, new_nn, new_dp, dn, &dinv); + } + else + { + mp_size_t itch = mpn_mu_div_q_itch (new_nn, dn, 0); + mp_ptr scratch = TMP_ALLOC_LIMBS (itch); + qh = mpn_mu_div_q (qp, new_np, new_nn, new_dp, dn, scratch); + } + if (cy == 0) + qp[qn - 1] = qh; + else if (UNLIKELY (qh != 0)) + { + /* This happens only when the quotient is close to B^n and + mpn_*_divappr_q returned B^n. */ + mp_size_t i, n; + n = new_nn - dn; + for (i = 0; i < n; i++) + qp[i] = GMP_NUMB_MAX; + qh = 0; /* currently ignored */ + } + } + else /* divisor is already normalised */ + { + if (new_np != np) + MPN_COPY (new_np, np, nn); + + if (dn == 2) + { + qh = mpn_divrem_2 (qp, 0L, new_np, nn, dp); + } + else if (BELOW_THRESHOLD (dn, DC_DIV_Q_THRESHOLD) || + BELOW_THRESHOLD (nn - dn, DC_DIV_Q_THRESHOLD)) + { + invert_pi1 (dinv, dh, dp[dn - 2]); + qh = mpn_sbpi1_div_q (qp, new_np, nn, dp, dn, dinv.inv32); + } + else if (BELOW_THRESHOLD (dn, MUPI_DIV_Q_THRESHOLD) || /* fast condition */ + BELOW_THRESHOLD (nn, 2 * MU_DIV_Q_THRESHOLD) || /* fast condition */ + (double) (2 * (MU_DIV_Q_THRESHOLD - MUPI_DIV_Q_THRESHOLD)) * dn /* slow... */ + + (double) MUPI_DIV_Q_THRESHOLD * nn > (double) dn * nn) /* ...condition */ + { + invert_pi1 (dinv, dh, dp[dn - 2]); + qh = mpn_dcpi1_div_q (qp, new_np, nn, dp, dn, &dinv); + } + else + { + mp_size_t itch = mpn_mu_div_q_itch (nn, dn, 0); + mp_ptr scratch = TMP_ALLOC_LIMBS (itch); + qh = mpn_mu_div_q (qp, np, nn, dp, dn, scratch); + } + qp[nn - dn] = qh; + } + } + else + { + /* |________________________| + |_________________| */ + tp = TMP_ALLOC_LIMBS (qn + 1); + + new_np = scratch; + new_nn = 2 * qn + 1; + if (new_np == np) + /* We need {np,nn} to remain untouched until the final adjustment, so + we need to allocate separate space for new_np. */ + new_np = TMP_ALLOC_LIMBS (new_nn + 1); + + + dh = dp[dn - 1]; + if (LIKELY ((dh & GMP_NUMB_HIGHBIT) == 0)) + { + count_leading_zeros (cnt, dh); + + cy = mpn_lshift (new_np, np + nn - new_nn, new_nn, cnt); + new_np[new_nn] = cy; + + new_nn += (cy != 0); + + new_dp = TMP_ALLOC_LIMBS (qn + 1); + mpn_lshift (new_dp, dp + dn - (qn + 1), qn + 1, cnt); + new_dp[0] |= dp[dn - (qn + 1) - 1] >> (GMP_NUMB_BITS - cnt); + + if (qn + 1 == 2) + { + qh = mpn_divrem_2 (tp, 0L, new_np, new_nn, new_dp); + } + else if (BELOW_THRESHOLD (qn, DC_DIVAPPR_Q_THRESHOLD - 1)) + { + invert_pi1 (dinv, new_dp[qn], new_dp[qn - 1]); + qh = mpn_sbpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, dinv.inv32); + } + else if (BELOW_THRESHOLD (qn, MU_DIVAPPR_Q_THRESHOLD - 1)) + { + invert_pi1 (dinv, new_dp[qn], new_dp[qn - 1]); + qh = mpn_dcpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, &dinv); + } + else + { + mp_size_t itch = mpn_mu_divappr_q_itch (new_nn, qn + 1, 0); + mp_ptr scratch = TMP_ALLOC_LIMBS (itch); + qh = mpn_mu_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, scratch); + } + if (cy == 0) + tp[qn] = qh; + else if (UNLIKELY (qh != 0)) + { + /* This happens only when the quotient is close to B^n and + mpn_*_divappr_q returned B^n. */ + mp_size_t i, n; + n = new_nn - (qn + 1); + for (i = 0; i < n; i++) + tp[i] = GMP_NUMB_MAX; + qh = 0; /* currently ignored */ + } + } + else /* divisor is already normalised */ + { + MPN_COPY (new_np, np + nn - new_nn, new_nn); /* pointless of MU will be used */ + + new_dp = (mp_ptr) dp + dn - (qn + 1); + + if (qn == 2 - 1) + { + qh = mpn_divrem_2 (tp, 0L, new_np, new_nn, new_dp); + } + else if (BELOW_THRESHOLD (qn, DC_DIVAPPR_Q_THRESHOLD - 1)) + { + invert_pi1 (dinv, dh, new_dp[qn - 1]); + qh = mpn_sbpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, dinv.inv32); + } + else if (BELOW_THRESHOLD (qn, MU_DIVAPPR_Q_THRESHOLD - 1)) + { + invert_pi1 (dinv, dh, new_dp[qn - 1]); + qh = mpn_dcpi1_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, &dinv); + } + else + { + mp_size_t itch = mpn_mu_divappr_q_itch (new_nn, qn + 1, 0); + mp_ptr scratch = TMP_ALLOC_LIMBS (itch); + qh = mpn_mu_divappr_q (tp, new_np, new_nn, new_dp, qn + 1, scratch); + } + tp[qn] = qh; + } + + MPN_COPY (qp, tp + 1, qn); + if (tp[0] <= 4) + { + mp_size_t rn; + + rp = TMP_ALLOC_LIMBS (dn + qn); + mpn_mul (rp, dp, dn, tp + 1, qn); + rn = dn + qn; + rn -= rp[rn - 1] == 0; + + if (rn > nn || mpn_cmp (np, rp, nn) < 0) + mpn_decr_u (qp, 1); + } + } + + TMP_FREE; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/divrem.c gmp-5.0.2+dfsg/mpn/generic/divrem.c --- gmp-4.3.2+dfsg/mpn/generic/divrem.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/divrem.c 2011-05-08 09:49:29.000000000 +0000 @@ -47,7 +47,7 @@ TMP_DECL; TMP_MARK; - q2p = (mp_ptr) TMP_ALLOC ((nn + qxn) * BYTES_PER_MP_LIMB); + q2p = TMP_ALLOC_LIMBS (nn + qxn); np[0] = mpn_divrem_1 (q2p, qxn, np, nn, dp[0]); qn = nn + qxn - 1; @@ -72,11 +72,11 @@ if (UNLIKELY (qxn != 0)) { mp_ptr n2p; - n2p = (mp_ptr) TMP_ALLOC ((nn + qxn) * BYTES_PER_MP_LIMB); + n2p = TMP_ALLOC_LIMBS (nn + qxn); MPN_ZERO (n2p, qxn); MPN_COPY (n2p + qxn, np, nn); - q2p = (mp_ptr) TMP_ALLOC ((nn - dn + qxn + 1) * BYTES_PER_MP_LIMB); - rp = (mp_ptr) TMP_ALLOC (dn * BYTES_PER_MP_LIMB); + q2p = TMP_ALLOC_LIMBS (nn - dn + qxn + 1); + rp = TMP_ALLOC_LIMBS (dn); mpn_tdiv_qr (q2p, rp, 0L, n2p, nn + qxn, dp, dn); MPN_COPY (np, rp, dn); qn = nn - dn + qxn; @@ -85,8 +85,8 @@ } else { - q2p = (mp_ptr) TMP_ALLOC ((nn - dn + 1) * BYTES_PER_MP_LIMB); - rp = (mp_ptr) TMP_ALLOC (dn * BYTES_PER_MP_LIMB); + q2p = TMP_ALLOC_LIMBS (nn - dn + 1); + rp = TMP_ALLOC_LIMBS (dn); mpn_tdiv_qr (q2p, rp, 0L, np, nn, dp, dn); MPN_COPY (np, rp, dn); /* overwrite np area with remainder */ qn = nn - dn; diff -Nru gmp-4.3.2+dfsg/mpn/generic/fib2_ui.c gmp-5.0.2+dfsg/mpn/generic/fib2_ui.c --- gmp-4.3.2+dfsg/mpn/generic/fib2_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/fib2_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -4,7 +4,7 @@ CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES. -Copyright 2001, 2002, 2005 Free Software Foundation, Inc. +Copyright 2001, 2002, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -24,8 +24,6 @@ #include #include "gmp.h" #include "gmp-impl.h" -#include "longlong.h" - /* change this to "#define TRACE(x) x" for diagnostics */ #define TRACE(x) @@ -52,20 +50,13 @@ This property of F[4m+3] can be verified by induction on F[4m+3] = 7*F[4m-1] - F[4m-5], that formula being a standard lucas sequence identity U[i+j] = U[i]*V[j] - U[i-j]*Q^j. - - Enhancements: - - If there was an mpn_addlshift, it'd be possible to eliminate the yp - temporary, using xp=F[k]^2, fp=F[k-1]^2, f1p=xp+fp, fp+=4*fp, fp-=f1p, - fp+=2*(-1)^n, etc. */ +*/ mp_size_t mpn_fib2_ui (mp_ptr fp, mp_ptr f1p, unsigned long int n) { - mp_ptr xp, yp; mp_size_t size; unsigned long nfirst, mask; - TMP_DECL; TRACE (printf ("mpn_fib2_ui n=%lu\n", n)); @@ -85,15 +76,15 @@ if (mask != 1) { mp_size_t alloc; + mp_ptr xp; + TMP_DECL; TMP_MARK; alloc = MPN_FIB2_SIZE (n); - TMP_ALLOC_LIMBS_2 (xp,alloc, yp,alloc); + xp = TMP_ALLOC_LIMBS (alloc); do { - mp_limb_t c; - /* Here fp==F[k] and f1p==F[k-1], with k being the bits of n from n&mask upwards. @@ -114,45 +105,65 @@ /* f1p[size-1] might be zero, but this occurs rarely, so it's not worth bothering checking for it */ ASSERT (alloc >= 2*size); - mpn_sqr_n (xp, fp, size); - mpn_sqr_n (yp, f1p, size); + mpn_sqr (xp, fp, size); + mpn_sqr (fp, f1p, size); size *= 2; /* Shrink if possible. Since fp was normalized there'll be at most one high zero on xp (and if there is then there's one on yp too). */ - ASSERT (xp[size-1] != 0 || yp[size-1] == 0); + ASSERT (xp[size-1] != 0 || fp[size-1] == 0); size -= (xp[size-1] == 0); ASSERT (xp[size-1] != 0); /* only one xp high zero */ + /* Calculate F[2k-1] = F[k]^2 + F[k-1]^2. */ + f1p[size] = mpn_add_n (f1p, xp, fp, size); + /* Calculate F[2k+1] = 4*F[k]^2 - F[k-1]^2 + 2*(-1)^k. n&mask is the low bit of our implied k. */ - c = mpn_lshift (fp, xp, size, 2); - fp[0] |= (n & mask ? 0 : 2); /* possible +2 */ - c -= mpn_sub_n (fp, fp, yp, size); - ASSERT (n & (mask << 1) ? fp[0] != 0 && fp[0] != 1 : 1); - fp[0] -= (n & mask ? 2 : 0); /* possible -2 */ +#if HAVE_NATIVE_mpn_rsblsh2_n || HAVE_NATIVE_mpn_rsblsh_n +#if HAVE_NATIVE_mpn_rsblsh2_n + fp[size] = mpn_rsblsh2_n (fp, fp, xp, size); +#else /* HAVE_NATIVE_mpn_rsblsh_n */ + fp[size] = mpn_rsblsh_n (fp, fp, xp, size, 2); +#endif + if ((n & mask) == 0) + MPN_INCR_U(fp, size + 1, 2); /* possible +2 */ + else + { + ASSERT (fp[0] >= 2); + fp[0] -= 2; /* possible -2 */ + } +#else + { + mp_limb_t c; + + c = mpn_lshift (xp, xp, size, 2); + xp[0] |= (n & mask ? 0 : 2); /* possible +2 */ + c -= mpn_sub_n (fp, xp, fp, size); + ASSERT (n & mask ? fp[0] != 0 && fp[0] != 1 : 1); + fp[0] -= (n & mask ? 2 : 0); /* possible -2 */ + fp[size] = c; + } +#endif ASSERT (alloc >= size+1); - xp[size] = 0; - yp[size] = 0; - fp[size] = c; - size += (c != 0); - - /* Calculate F[2k-1] = F[k]^2 + F[k-1]^2. - F[2k-1]>= 1; /* Calculate F[2k] = F[2k+1] - F[2k-1], replacing the unwanted one of F[2k+1] and F[2k-1]. */ - ASSERT_NOCARRY (mpn_sub_n ((n & mask ? f1p : fp), fp, f1p, size)); - - /* Can have a high zero after replacing F[2k+1] with F[2k]. - f1p will have a high zero if fp does. */ - ASSERT (fp[size-1] != 0 || f1p[size-1] == 0); - size -= (fp[size-1] == 0); + if (n & mask) + ASSERT_NOCARRY (mpn_sub_n (f1p, fp, f1p, size)); + else { + ASSERT_NOCARRY (mpn_sub_n ( fp, fp, f1p, size)); + + /* Can have a high zero after replacing F[2k+1] with F[2k]. + f1p will have a high zero if fp does. */ + ASSERT (fp[size-1] != 0 || f1p[size-1] == 0); + size -= (fp[size-1] == 0); + } } while (mask != 1); diff -Nru gmp-4.3.2+dfsg/mpn/generic/gcd_1.c gmp-5.0.2+dfsg/mpn/generic/gcd_1.c --- gmp-4.3.2+dfsg/mpn/generic/gcd_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/gcd_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -21,6 +21,17 @@ #include "gmp-impl.h" #include "longlong.h" +#ifndef GCD_1_METHOD +#define GCD_1_METHOD 2 +#endif + +#define USE_ZEROTAB 0 + +#if USE_ZEROTAB +static const unsigned char zerotab[16] = { + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 +}; +#endif /* Does not work for U == 0 or V == 0. It would be tough to make it work for V == 0 since gcd(x,0) = x, and U does not generally fit in an mp_limb_t. @@ -81,6 +92,10 @@ goto strip_u_maybe; } + ASSERT (ulimb & 1); + ASSERT (vlimb & 1); + +#if GCD_1_METHOD == 1 while (ulimb != vlimb) { ASSERT (ulimb & 1); @@ -109,6 +124,55 @@ while ((vlimb & 1) == 0); } } +#else +# if GCD_1_METHOD == 2 + + ulimb >>= 1; + vlimb >>= 1; + + while (ulimb != vlimb) + { + int c; + mp_limb_t t = ulimb - vlimb; + mp_limb_t vgtu = LIMB_HIGHBIT_TO_MASK (t); + + /* v <-- min (u, v) */ + vlimb += (vgtu & t); + + /* u <-- |u - v| */ + ulimb = (t ^ vgtu) - vgtu; + +#if USE_ZEROTAB + /* Number of trailing zeros is the same no matter if we look at + * t or ulimb, but using t gives more parallelism. */ + c = zerotab[t & 15]; + + while (UNLIKELY (c == 4)) + { + ulimb >>= 4; + if (0) + strip_u_maybe: + vlimb >>= 1; + + c = zerotab[ulimb & 15]; + } +#else + if (0) + { + strip_u_maybe: + vlimb >>= 1; + t = ulimb; + } + count_trailing_zeros (c, t); +#endif + ulimb >>= (c + 1); + } + + vlimb = (vlimb << 1) | 1; +# else +# error Unknown GCD_1_METHOD +# endif +#endif done: return vlimb << zero_bits; diff -Nru gmp-4.3.2+dfsg/mpn/generic/gcdext_1.c gmp-5.0.2+dfsg/mpn/generic/gcdext_1.c --- gmp-4.3.2+dfsg/mpn/generic/gcdext_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/gcdext_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -22,6 +22,242 @@ #include "gmp-impl.h" #include "longlong.h" +#ifndef GCDEXT_1_USE_BINARY +#define GCDEXT_1_USE_BINARY 0 +#endif + +#ifndef GCDEXT_1_BINARY_METHOD +#define GCDEXT_1_BINARY_METHOD 2 +#endif + +#ifndef USE_ZEROTAB +#define USE_ZEROTAB 1 +#endif + +#if GCDEXT_1_USE_BINARY + +#if USE_ZEROTAB +static unsigned char zerotab[0x40] = { + 6, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 5, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0, + 4, 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 +}; +#endif + +mp_limb_t +mpn_gcdext_1 (mp_limb_signed_t *sp, mp_limb_signed_t *tp, + mp_limb_t u, mp_limb_t v) +{ + /* Maintain + + U = t1 u + t0 v + V = s1 u + s0 v + + where U, V are the inputs (without any shared power of two), + and the matris has determinant ± 2^{shift}. + */ + mp_limb_t s0 = 1; + mp_limb_t t0 = 0; + mp_limb_t s1 = 0; + mp_limb_t t1 = 1; + mp_limb_t ug; + mp_limb_t vg; + mp_limb_t ugh; + mp_limb_t vgh; + unsigned zero_bits; + unsigned shift; + unsigned i; +#if GCDEXT_1_BINARY_METHOD == 2 + mp_limb_t det_sign; +#endif + + ASSERT (u > 0); + ASSERT (v > 0); + + count_trailing_zeros (zero_bits, u | v); + u >>= zero_bits; + v >>= zero_bits; + + if ((u & 1) == 0) + { + count_trailing_zeros (shift, u); + u >>= shift; + t1 <<= shift; + } + else if ((v & 1) == 0) + { + count_trailing_zeros (shift, v); + v >>= shift; + s0 <<= shift; + } + else + shift = 0; + +#if GCDEXT_1_BINARY_METHOD == 1 + while (u != v) + { + unsigned count; + if (u > v) + { + u -= v; +#if USE_ZEROTAB + count = zerotab [u & 0x3f]; + u >>= count; + if (UNLIKELY (count == 6)) + { + unsigned c; + do + { + c = zerotab[u & 0x3f]; + u >>= c; + count += c; + } + while (c == 6); + } +#else + count_trailing_zeros (count, u); + u >>= count; +#endif + t0 += t1; t1 <<= count; + s0 += s1; s1 <<= count; + } + else + { + v -= u; +#if USE_ZEROTAB + count = zerotab [v & 0x3f]; + v >>= count; + if (UNLIKELY (count == 6)) + { + unsigned c; + do + { + c = zerotab[v & 0x3f]; + v >>= c; + count += c; + } + while (c == 6); + } +#else + count_trailing_zeros (count, v); + v >>= count; +#endif + t1 += t0; t0 <<= count; + s1 += s0; s0 <<= count; + } + shift += count; + } +#else +# if GCDEXT_1_BINARY_METHOD == 2 + u >>= 1; + v >>= 1; + + det_sign = 0; + + while (u != v) + { + unsigned count; + mp_limb_t d = u - v; + mp_limb_t vgtu = LIMB_HIGHBIT_TO_MASK (d); + mp_limb_t sx; + mp_limb_t tx; + + /* When v <= u (vgtu == 0), the updates are: + + (u; v) <-- ( (u - v) >> count; v) (det = +(1< 0, the updates are + + (u; v) <-- ( (v - u) >> count; u) (det = -(1<>= c; + c = zerotab[d & 0x3f]; + count += c; + } + while (c == 6); + } +#else + count_trailing_zeros (count, d); +#endif + det_sign ^= vgtu; + + tx = vgtu & (t0 - t1); + sx = vgtu & (s0 - s1); + t0 += t1; + s0 += s1; + t1 += tx; + s1 += sx; + + count++; + u >>= count; + t1 <<= count; + s1 <<= count; + shift += count; + } + u = (u << 1) + 1; +# else /* GCDEXT_1_BINARY_METHOD == 2 */ +# error Unknown GCDEXT_1_BINARY_METHOD +# endif +#endif + + /* Now u = v = g = gcd (u,v). Compute U/g and V/g */ + ug = t0 + t1; + vg = s0 + s1; + + ugh = ug/2 + (ug & 1); + vgh = vg/2 + (vg & 1); + + /* Now ±2^{shift} g = s0 U - t0 V. Get rid of the power of two, using + s0 U - t0 V = (s0 + V/g) U - (t0 + U/g) V. */ + for (i = 0; i < shift; i++) + { + mp_limb_t mask = - ( (s0 | t0) & 1); + + s0 /= 2; + t0 /= 2; + s0 += mask & vgh; + t0 += mask & ugh; + } + /* FIXME: Try simplifying this condition. */ + if ( (s0 > 1 && 2*s0 >= vg) || (t0 > 1 && 2*t0 >= ug) ) + { + s0 -= vg; + t0 -= ug; + } +#if GCDEXT_1_BINARY_METHOD == 2 + /* Conditional negation. */ + s0 = (s0 ^ det_sign) - det_sign; + t0 = (t0 ^ det_sign) - det_sign; +#endif + *sp = s0; + *tp = -t0; + + return u << zero_bits; +} + +#else /* !GCDEXT_1_USE_BINARY */ + /* FIXME: Takes two single-word limbs. It could be extended to a * function that accepts a bignum for the first input, and only @@ -79,3 +315,4 @@ v1 -= q * v0; } } +#endif /* !GCDEXT_1_USE_BINARY */ diff -Nru gmp-4.3.2+dfsg/mpn/generic/gcdext.c gmp-5.0.2+dfsg/mpn/generic/gcdext.c --- gmp-4.3.2+dfsg/mpn/generic/gcdext.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/gcdext.c 2011-05-08 09:49:29.000000000 +0000 @@ -118,6 +118,7 @@ mpn_mul (tp, up, size, ap, an); size += an; + size -= tp[size - 1] == 0; ASSERT (gn <= size); @@ -146,21 +147,9 @@ vn = size + 1 - bn; ASSERT (vn <= n + 1); - /* FIXME: Use divexact. Or do the entire calculation mod 2^{n * - GMP_NUMB_BITS}. */ - mpn_tdiv_qr (vp, tp, 0, tp, size, bp, bn); + mpn_divexact (vp, tp, size, bp, bn); vn -= (vp[vn-1] == 0); - /* Remainder must be zero */ -#if WANT_ASSERT - { - mp_size_t i; - for (i = 0; i < bn; i++) - { - ASSERT (tp[i] == 0); - } - } -#endif return vn; } @@ -181,7 +170,8 @@ For the lehmer call after the loop, Let T denote GCDEXT_DC_THRESHOLD. For the gcdext_lehmer call, we need T each for u, a and b, and 4T+3 scratch space. Next, for compute_v, we need T - + 1 for v and 2T + 1 scratch space. In all, 7T + 3 is sufficient. + for u, T+1 for v and 2T + 1 scratch space. In all, 7T + 3 is + sufficient for both operations. */ diff -Nru gmp-4.3.2+dfsg/mpn/generic/get_d.c gmp-5.0.2+dfsg/mpn/generic/get_d.c --- gmp-4.3.2+dfsg/mpn/generic/get_d.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/get_d.c 2011-05-08 09:49:29.000000000 +0000 @@ -4,7 +4,7 @@ CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR COMPLETELY IN FUTURE GNU MP RELEASES. -Copyright 2003, 2004 Free Software Foundation, Inc. +Copyright 2003, 2004, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -124,10 +124,10 @@ Other: For reference, note that HPPA 8000, 8200, 8500 and 8600 trap FCNV,UDW,DBL - to the kernel for values >= 2^63. This makes it slow, and worse the - Linux kernel (what versions?) apparently uses untested code in its trap - handling routines, and gets the sign wrong. We don't use such a limb to - double cast, neither in the IEEE or generic code. */ + to the kernel for values >= 2^63. This makes it slow, and worse the kernel + Linux (what versions?) apparently uses untested code in its trap handling + routines, and gets the sign wrong. We don't use such a limb-to-double + cast, neither in the IEEE or generic code. */ double diff -Nru gmp-4.3.2+dfsg/mpn/generic/get_str.c gmp-5.0.2+dfsg/mpn/generic/get_str.c --- gmp-4.3.2+dfsg/mpn/generic/get_str.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/get_str.c 2011-05-08 09:49:29.000000000 +0000 @@ -382,7 +382,7 @@ int bit_pos; mp_size_t i; unsigned char *s = str; - unsigned long bits; + mp_bitcnt_t bits; n1 = up[un - 1]; count_leading_zeros (cnt, n1); @@ -391,11 +391,11 @@ R + bits_per_digit * n when input ends in nth least significant nibble. */ - bits = GMP_NUMB_BITS * un - cnt + GMP_NAIL_BITS; + bits = (mp_bitcnt_t) GMP_NUMB_BITS * un - cnt + GMP_NAIL_BITS; cnt = bits % bits_per_digit; if (cnt != 0) bits += bits_per_digit - cnt; - bit_pos = bits - (un - 1) * GMP_NUMB_BITS; + bit_pos = bits - (mp_bitcnt_t) (un - 1) * GMP_NUMB_BITS; /* Fast loop for bit output. */ i = un - 1; @@ -473,7 +473,7 @@ ASSERT_ALWAYS (powtab_mem_ptr < powtab_mem + mpn_dc_get_str_powtab_alloc (un)); - mpn_sqr_n (t, p, n); + mpn_sqr (t, p, n); digits_in_base *= 2; n *= 2; n -= t[n - 1] == 0; diff -Nru gmp-4.3.2+dfsg/mpn/generic/gmp-mparam.h gmp-5.0.2+dfsg/mpn/generic/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/generic/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,5 +18,5 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* Values for BITS_PER_MP_LIMB etc will be determined by ./configure and put +/* Values for GMP_LIMB_BITS etc will be determined by ./configure and put in config.h. */ diff -Nru gmp-4.3.2+dfsg/mpn/generic/hgcd.c gmp-5.0.2+dfsg/mpn/generic/hgcd.c --- gmp-4.3.2+dfsg/mpn/generic/hgcd.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/hgcd.c 2011-05-08 09:49:29.000000000 +0000 @@ -383,7 +383,7 @@ } } -/* Multiply M by M1 from the right. Needs 4*(M->n + M1->n) + 5 limbs +/* Multiply M by M1 from the right. Needs 3*(M->n + M1->n) + 5 limbs of temporary storage (see mpn_matrix22_mul_itch). */ void mpn_hgcd_matrix_mul (struct hgcd_matrix *M, const struct hgcd_matrix *M1, @@ -395,7 +395,13 @@ are > 0, no element can decrease. The new elements are of size M->n + M1->n, one limb more or less. The computation of the matrix product produces elements of size M->n + M1->n + 1. But - the true size, after normalization, may be three limbs smaller. */ + the true size, after normalization, may be three limbs smaller. + + The reason that the product has normalized size >= M->n + M1->n - + 2 is subtle. It depends on the fact that M and M1 can be factored + as products of (1,1; 0,1) and (1,0; 1,1), and that we can't have + M ending with a large power and M1 starting with a large power of + the same matrix. */ /* FIXME: Strassen multiplication gives only a small speedup. In FFT multiplication range, this function could be sped up quite a lot @@ -505,16 +511,15 @@ Let S(r) denote the required storage. For M1 we need 4 * (ceil(n1/2) + 1) = 4 * (ceil(n/4) + 1), for the hgcd_matrix_adjust call, we need n + 2, - and for the hgcd_matrix_mul, we may need 4 ceil(n/2) + 1. In total, - 4 * ceil(n/4) + 4 ceil(n/2) + 5 <= 12 ceil(n/4) + 5. + and for the hgcd_matrix_mul, we may need 3 ceil(n/2) + 8. In total, + 4 * ceil(n/4) + 3 ceil(n/2) + 12 <= 10 ceil(n/4) + 12. For the recursive call, we need S(n1) = S(ceil(n/2)). - S(n) <= 12*ceil(n/4) + 5 + S(ceil(n/2)) - <= 12*(ceil(n/4) + ... + ceil(n/2^(1+k))) + 5k + S(ceil(n/2^k)) - <= 12*(2 ceil(n/4) + k) + 5k + S(n/2^k) - <= 24 ceil(n/4) + 17k + S(n/2^k) - + S(n) <= 10*ceil(n/4) + 12 + S(ceil(n/2)) + <= 10*(ceil(n/4) + ... + ceil(n/2^(1+k))) + 12k + S(ceil(n/2^k)) + <= 10*(2 ceil(n/4) + k) + 12k + S(ceil(n/2^k)) + <= 20 ceil(n/4) + 22k + S(ceil(n/2^k)) */ mp_size_t @@ -532,7 +537,7 @@ count_leading_zeros (count, nscaled); k = GMP_LIMB_BITS - count; - return 24 * ((n+3) / 4) + 17 * k + return 20 * ((n+3) / 4) + 22 * k + MPN_HGCD_LEHMER_ITCH (HGCD_THRESHOLD); } @@ -607,7 +612,18 @@ /* Needs 2 (p + M->n) <= 2 (2*s - n2 + 1 + n2 - s - 1) = 2*s <= 2*(floor(n/2) + 1) <= n + 2. */ n = mpn_hgcd_matrix_adjust (&M1, p + nn, ap, bp, p, tp + scratch); - /* Needs 4 ceil(n/2) + 1 */ + + /* We need a bound for of M->n + M1.n. Let n be the original + input size. Then + + ceil(n/2) - 1 >= size of product >= M.n + M1.n - 2 + + and it follows that + + M.n + M1.n <= ceil(n/2) + 1 + + Then 3*(M.n + M1.n) + 5 <= 3 * ceil(n/2) + 8 is the + amount of needed scratch space. */ mpn_hgcd_matrix_mul (M, &M1, tp + scratch); success = 1; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/invertappr.c gmp-5.0.2+dfsg/mpn/generic/invertappr.c --- gmp-4.3.2+dfsg/mpn/generic/invertappr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/invertappr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,311 @@ +/* mpn_invertappr and helper functions. Compute I such that + floor((B^{2n}-1)/U - 1 <= I + B^n <= floor((B^{2n}-1)/U. + + Contributed to the GNU project by Marco Bodrato. + + The algorithm used here was inspired by ApproximateReciprocal from "Modern + Computer Arithmetic", by Richard P. Brent and Paul Zimmermann. Special + thanks to Paul Zimmermann for his very valuable suggestions on all the + theoretical aspects during the work on this code. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +/* FIXME: Remove NULL and TMP_*, as soon as all the callers properly + allocate and pass the scratch to the function. */ +#include /* for NULL */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +/* FIXME: The iterative version splits the operand in two slighty unbalanced + parts, the use of log_2 (or counting the bits) underestimate the maximum + number of iterations. */ + +/* This is intended for constant THRESHOLDs only, where the compiler + can completely fold the result. */ +#define LOG2C(n) \ + (((n) >= 0x1) + ((n) >= 0x2) + ((n) >= 0x4) + ((n) >= 0x8) + \ + ((n) >= 0x10) + ((n) >= 0x20) + ((n) >= 0x40) + ((n) >= 0x80) + \ + ((n) >= 0x100) + ((n) >= 0x200) + ((n) >= 0x400) + ((n) >= 0x800) + \ + ((n) >= 0x1000) + ((n) >= 0x2000) + ((n) >= 0x4000) + ((n) >= 0x8000)) + +#if TUNE_PROGRAM_BUILD +#define NPOWS \ + ((sizeof(mp_size_t) > 6 ? 48 : 8*sizeof(mp_size_t))) +#define MAYBE_dcpi1_divappr 1 +#else +#define NPOWS \ + ((sizeof(mp_size_t) > 6 ? 48 : 8*sizeof(mp_size_t)) - LOG2C (INV_NEWTON_THRESHOLD)) +#define MAYBE_dcpi1_divappr \ + (INV_NEWTON_THRESHOLD < DC_DIVAPPR_Q_THRESHOLD) +#if (INV_NEWTON_THRESHOLD > INV_MULMOD_BNM1_THRESHOLD) && \ + (INV_APPR_THRESHOLD > INV_MULMOD_BNM1_THRESHOLD) +#undef INV_MULMOD_BNM1_THRESHOLD +#define INV_MULMOD_BNM1_THRESHOLD 0 /* always when Newton */ +#endif +#endif + +/* All the three functions mpn{,_bc,_ni}_invertappr (ip, dp, n, scratch), take + the strictly normalised value {dp,n} (i.e., most significant bit must be set) + as an input, and compute {ip,n}: the approximate reciprocal of {dp,n}. + + Let e = mpn*_invertappr (ip, dp, n, scratch) be the returned value; the + following conditions are satisfied by the output: + 0 <= e <= 1; + {dp,n}*(B^n+{ip,n}) < B^{2n} <= {dp,n}*(B^n+{ip,n}+1+e) . + I.e. e=0 means that the result {ip,n} equals the one given by mpn_invert. + e=1 means that the result _may_ be one less than expected. + + The _bc version returns e=1 most of the time. + The _ni version should return e=0 most of the time; only about 1% of + possible random input should give e=1. + + When the strict result is needed, i.e., e=0 in the relation above: + {dp,n}*(B^n+{ip,n}) < B^{2n} <= {dp,n}*(B^n+{ip,n}+1) ; + the function mpn_invert (ip, dp, n, scratch) should be used instead. */ + +/* Maximum scratch needed by this branch (at tp): 3*n + 2 */ +static mp_limb_t +mpn_bc_invertappr (mp_ptr ip, mp_srcptr dp, mp_size_t n, mp_ptr tp) +{ + mp_ptr xp; + + ASSERT (n > 0); + ASSERT (dp[n-1] & GMP_NUMB_HIGHBIT); + ASSERT (! MPN_OVERLAP_P (ip, n, dp, n)); + ASSERT (! MPN_OVERLAP_P (ip, n, tp, mpn_invertappr_itch(n))); + ASSERT (! MPN_OVERLAP_P (dp, n, tp, mpn_invertappr_itch(n))); + + /* Compute a base value of r limbs. */ + if (n == 1) + invert_limb (*ip, *dp); + else { + mp_size_t i; + xp = tp + n + 2; /* 2 * n limbs */ + + for (i = n - 1; i >= 0; i--) + xp[i] = GMP_NUMB_MAX; + mpn_com (xp + n, dp, n); + + /* Now xp contains B^2n - {dp,n}*B^n - 1 */ + + /* FIXME: if mpn_*pi1_divappr_q handles n==2, use it! */ + if (n == 2) { + mpn_divrem_2 (ip, 0, xp, 4, dp); + } else { + gmp_pi1_t inv; + invert_pi1 (inv, dp[n-1], dp[n-2]); + if (! MAYBE_dcpi1_divappr + || BELOW_THRESHOLD (n, DC_DIVAPPR_Q_THRESHOLD)) + mpn_sbpi1_divappr_q (ip, xp, 2 * n, dp, n, inv.inv32); + else + mpn_dcpi1_divappr_q (ip, xp, 2 * n, dp, n, &inv); + MPN_DECR_U(ip, n, 1); + return 1; + } + } + return 0; +} + +/* mpn_ni_invertappr: computes the approximate reciprocal using Newton's + iterations (at least one). + + Inspired by Algorithm "ApproximateReciprocal", published in "Modern Computer + Arithmetic" by Richard P. Brent and Paul Zimmermann, algorithm 3.5, page 121 + in version 0.4 of the book. + + Some adaptations were introduced, to allow product mod B^m-1 and return the + value e. + + USE_MUL_N = 1 (default) introduces a correction in such a way that "the + value of B^{n+h}-T computed at step 8 cannot exceed B^n-1" (the book reads + "2B^n-1"). This correction should not require to modify the proof. + + We use a wrapped product modulo B^m-1. NOTE: is there any normalisation + problem for the [0] class? It shouldn't: we compute 2*|A*X_h - B^{n+h}| < + B^m-1. We may get [0] if and only if we get AX_h = B^{n+h}. This can + happen only if A=B^{n}/2, but this implies X_h = B^{h}*2-1 i.e., AX_h = + B^{n+h} - A, then we get into the "negative" branch, where X_h is not + incremented (because A < B^n). + + FIXME: the scratch for mulmod_bnm1 does not currently fit in the scratch, it + is allocated apart. */ + +#define USE_MUL_N 1 + +mp_limb_t +mpn_ni_invertappr (mp_ptr ip, mp_srcptr dp, mp_size_t n, mp_ptr scratch) +{ + mp_limb_t cy; + mp_ptr xp; + mp_size_t rn, mn; + mp_size_t sizes[NPOWS], *sizp; + mp_ptr tp; + TMP_DECL; +#define rp scratch + + ASSERT (n > 2); + ASSERT (dp[n-1] & GMP_NUMB_HIGHBIT); + ASSERT (! MPN_OVERLAP_P (ip, n, dp, n)); + ASSERT (! MPN_OVERLAP_P (ip, n, scratch, mpn_invertappr_itch(n))); + ASSERT (! MPN_OVERLAP_P (dp, n, scratch, mpn_invertappr_itch(n))); + + /* Compute the computation precisions from highest to lowest, leaving the + base case size in 'rn'. */ + sizp = sizes; + rn = n; + do { + *sizp = rn; + rn = ((rn) >> 1) + 1; + sizp ++; + } while (ABOVE_THRESHOLD (rn, INV_NEWTON_THRESHOLD)); + + /* We search the inverse of 0.{dp,n}, we compute it as 1.{ip,n} */ + dp += n; + ip += n; + + /* Compute a base value of rn limbs. */ + mpn_bc_invertappr (ip - rn, dp - rn, rn, scratch); + + TMP_MARK; + + if (ABOVE_THRESHOLD (n, INV_MULMOD_BNM1_THRESHOLD)) + { + mn = mpn_mulmod_bnm1_next_size (n + 1); + tp = TMP_ALLOC_LIMBS (mpn_mulmod_bnm1_itch (mn, n, (n >> 1) + 1)); + } + /* Use Newton's iterations to get the desired precision.*/ + + /* define rp scratch; 2rn + 1 limbs <= 2(n>>1 + 1) + 1 <= n + 3 limbs */ + /* Maximum scratch needed by this branch <= 3*n + 2 */ + xp = scratch + n + 3; /* n + rn limbs */ + while (1) { + mp_limb_t method; + + n = *--sizp; + /* + v n v + +----+--+ + ^ rn ^ + */ + + /* Compute i_jd . */ + if (BELOW_THRESHOLD (n, INV_MULMOD_BNM1_THRESHOLD) + || ((mn = mpn_mulmod_bnm1_next_size (n + 1)) > (n + rn))) { + /* FIXME: We do only need {xp,n+1}*/ + mpn_mul (xp, dp - n, n, ip - rn, rn); + mpn_add_n (xp + rn, xp + rn, dp - n, n - rn + 1); + method = 1; /* Remember we used (truncated) product */ + /* We computed cy.{xp,rn+n} <- 1.{ip,rn} * 0.{dp,n} */ + } else { /* Use B^n-1 wraparound */ + mpn_mulmod_bnm1 (xp, mn, dp - n, n, ip - rn, rn, tp); + /* We computed {xp,mn} <- {ip,rn} * {dp,n} mod (B^mn-1) */ + /* We know that 2*|ip*dp + dp*B^rn - B^{rn+n}| < B^mn-1 */ + /* Add dp*B^rn mod (B^mn-1) */ + ASSERT (n >= mn - rn); + xp[mn] = 1 + mpn_add_n (xp + rn, xp + rn, dp - n, mn - rn); + cy = mpn_add_n (xp, xp, dp - (n - (mn - rn)), n - (mn - rn)); + MPN_INCR_U (xp + n - (mn - rn), mn + 1 - n + (mn - rn), cy); + ASSERT (n + rn >= mn); + /* Subtract B^{rn+n} */ + MPN_DECR_U (xp + rn + n - mn, 2*mn + 1 - rn - n, 1); + if (xp[mn]) + MPN_INCR_U (xp, mn, xp[mn] - 1); + else + MPN_DECR_U (xp, mn, 1); + method = 0; /* Remember we are working Mod B^m-1 */ + } + + if (xp[n] < 2) { /* "positive" residue class */ + cy = 1; + while (xp[n] || mpn_cmp (xp, dp - n, n)>0) { + xp[n] -= mpn_sub_n (xp, xp, dp - n, n); + cy ++; + } + MPN_DECR_U(ip - rn, rn, cy); + ASSERT (cy <= 4); /* at most 3 cycles for the while above */ + ASSERT_NOCARRY (mpn_sub_n (xp, dp - n, xp, n)); + ASSERT (xp[n] == 0); + } else { /* "negative" residue class */ + mpn_com (xp, xp, n + 1); + MPN_INCR_U(xp, n + 1, method); + ASSERT (xp[n] <= 1); +#if USE_MUL_N + if (xp[n]) { + MPN_INCR_U(ip - rn, rn, 1); + ASSERT_CARRY (mpn_sub_n (xp, xp, dp - n, n)); + } +#endif + } + + /* Compute x_ju_j. FIXME:We need {rp+rn,rn}, mulhi? */ +#if USE_MUL_N + mpn_mul_n (rp, xp + n - rn, ip - rn, rn); +#else + rp[2*rn] = 0; + mpn_mul (rp, xp + n - rn, rn + xp[n], ip - rn, rn); +#endif + /* We need _only_ the carry from the next addition */ + /* Anyway 2rn-n <= 2... we don't need to optimise. */ + cy = mpn_add_n (rp + rn, rp + rn, xp + n - rn, 2*rn - n); + cy = mpn_add_nc (ip - n, rp + 3*rn - n, xp + rn, n - rn, cy); + MPN_INCR_U (ip - rn, rn, cy + (1-USE_MUL_N)*(rp[2*rn] + xp[n])); + if (sizp == sizes) { /* Get out of the cycle */ + /* Check for possible carry propagation from below. */ + cy = rp[3*rn - n - 1] > GMP_NUMB_MAX - 7; /* Be conservative. */ +/* cy = mpn_add_1 (rp + rn, rp + rn, 2*rn - n, 4); */ + break; + } + rn = n; + } + TMP_FREE; + + return cy; +#undef rp +} + +mp_limb_t +mpn_invertappr (mp_ptr ip, mp_srcptr dp, mp_size_t n, mp_ptr scratch) +{ + mp_limb_t res; + TMP_DECL; + + TMP_MARK; + + if (scratch == NULL) + scratch = TMP_ALLOC_LIMBS (mpn_invertappr_itch (n)); + + ASSERT (n > 0); + ASSERT (dp[n-1] & GMP_NUMB_HIGHBIT); + ASSERT (! MPN_OVERLAP_P (ip, n, dp, n)); + ASSERT (! MPN_OVERLAP_P (ip, n, scratch, mpn_invertappr_itch(n))); + ASSERT (! MPN_OVERLAP_P (dp, n, scratch, mpn_invertappr_itch(n))); + + if (BELOW_THRESHOLD (n, INV_NEWTON_THRESHOLD)) + res = mpn_bc_invertappr (ip, dp, n, scratch); + else + res = mpn_ni_invertappr (ip, dp, n, scratch); + + TMP_FREE; + return res; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/invert.c gmp-5.0.2+dfsg/mpn/generic/invert.c --- gmp-4.3.2+dfsg/mpn/generic/invert.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/invert.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,12 @@ -/* Compute {up,n}^(-1). +/* invert.c -- Compute floor((B^{2n}-1)/U) - B^n. -Copyright (C) 2007 Free Software Foundation, Inc. + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -17,44 +23,65 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#include +/* FIXME: Remove NULL and TMP_*, as soon as all the callers properly + allocate and pass the scratch to the function. */ +#include /* for NULL */ + #include "gmp.h" #include "gmp-impl.h" - -/* Formulas: - z = 2z-(zz)d - z = 2z-(zd)z - z = z(2-zd) - z = z-z*(zd-1) - z = z+z*(1-zd) -*/ - -mp_size_t -mpn_invert_itch (mp_size_t n) -{ - return 3 * n + 2; -} +#include "longlong.h" void mpn_invert (mp_ptr ip, mp_srcptr dp, mp_size_t n, mp_ptr scratch) { - mp_ptr np, rp; - mp_size_t i; - TMP_DECL; - - TMP_MARK; - if (scratch == NULL) - { - scratch = TMP_ALLOC_LIMBS (mpn_invert_itch (n)); - } + ASSERT (n > 0); + ASSERT (dp[n-1] & GMP_NUMB_HIGHBIT); + ASSERT (! MPN_OVERLAP_P (ip, n, dp, n)); + ASSERT (! MPN_OVERLAP_P (ip, n, scratch, mpn_invertappr_itch(n))); + ASSERT (! MPN_OVERLAP_P (dp, n, scratch, mpn_invertappr_itch(n))); + + if (n == 1) + invert_limb (*ip, *dp); + else { + TMP_DECL; - np = scratch; /* 2 * n limbs */ - rp = scratch + 2 * n; /* n + 2 limbs */ - for (i = n - 1; i >= 0; i--) - np[i] = ~CNST_LIMB(0); - mpn_com_n (np + n, dp, n); - mpn_tdiv_qr (rp, ip, 0L, np, 2 * n, dp, n); - MPN_COPY (ip, rp, n); + TMP_MARK; + if (scratch == NULL) + scratch = TMP_ALLOC_LIMBS (mpn_invert_itch (n)); - TMP_FREE; + if (BELOW_THRESHOLD (n, INV_APPR_THRESHOLD)) + { + /* Maximum scratch needed by this branch: 2*n */ + mp_size_t i; + mp_ptr xp; + + xp = scratch; /* 2 * n limbs */ + for (i = n - 1; i >= 0; i--) + xp[i] = GMP_NUMB_MAX; + mpn_com (xp + n, dp, n); + if (n == 2) { + mpn_divrem_2 (ip, 0, xp, 4, dp); + } else { + gmp_pi1_t inv; + invert_pi1 (inv, dp[n-1], dp[n-2]); + /* FIXME: should we use dcpi1_div_q, for big sizes? */ + mpn_sbpi1_div_q (ip, xp, 2 * n, dp, n, inv.inv32); + } + } + else { /* Use approximated inverse; correct the result if needed. */ + mp_limb_t e; /* The possible error in the approximate inverse */ + + ASSERT ( mpn_invert_itch (n) >= mpn_invertappr_itch (n) ); + e = mpn_ni_invertappr (ip, dp, n, scratch); + + if (e) { /* Assume the error can only be "0" (no error) or "1". */ + /* Code to detect and correct the "off by one" approximation. */ + mpn_mul_n (scratch, ip, dp, n); + ASSERT_NOCARRY (mpn_add_n (scratch + n, scratch + n, dp, n)); + if (! mpn_add (scratch, scratch, 2*n, dp, n)) + MPN_INCR_U (ip, n, 1); /* The value was wrong, correct it. */ + } + } + TMP_FREE; + } } diff -Nru gmp-4.3.2+dfsg/mpn/generic/logops_n.c gmp-5.0.2+dfsg/mpn/generic/logops_n.c --- gmp-4.3.2+dfsg/mpn/generic/logops_n.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/logops_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,67 @@ +/* mpn_and_n, mpn_ior_n, etc -- mpn logical operations. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +#ifdef OPERATION_and_n +#define func __MPN(and_n) +#define call mpn_and_n +#endif + +#ifdef OPERATION_andn_n +#define func __MPN(andn_n) +#define call mpn_andn_n +#endif + +#ifdef OPERATION_nand_n +#define func __MPN(nand_n) +#define call mpn_nand_n +#endif + +#ifdef OPERATION_ior_n +#define func __MPN(ior_n) +#define call mpn_ior_n +#endif + +#ifdef OPERATION_iorn_n +#define func __MPN(iorn_n) +#define call mpn_iorn_n +#endif + +#ifdef OPERATION_nior_n +#define func __MPN(nior_n) +#define call mpn_nior_n +#endif + +#ifdef OPERATION_xor_n +#define func __MPN(xor_n) +#define call mpn_xor_n +#endif + +#ifdef OPERATION_xnor_n +#define func __MPN(xnor_n) +#define call mpn_xnor_n +#endif + +void +func (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +{ + call (rp, up, vp, n); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/lshiftc.c gmp-5.0.2+dfsg/mpn/generic/lshiftc.c --- gmp-4.3.2+dfsg/mpn/generic/lshiftc.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/lshiftc.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,63 @@ +/* mpn_lshiftc -- Shift left low level with complement. + +Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2002, 2009 Free Software Foundation, +Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +/* Shift U (pointed to by up and n limbs long) cnt bits to the left + and store the n least significant limbs of the result at rp. + Return the bits shifted out from the most significant limb. + + Argument constraints: + 1. 0 < cnt < GMP_NUMB_BITS. + 2. If the result is to be written over the input, rp must be >= up. +*/ + +mp_limb_t +mpn_lshiftc (mp_ptr rp, mp_srcptr up, mp_size_t n, unsigned int cnt) +{ + mp_limb_t high_limb, low_limb; + unsigned int tnc; + mp_size_t i; + mp_limb_t retval; + + ASSERT (n >= 1); + ASSERT (cnt >= 1); + ASSERT (cnt < GMP_NUMB_BITS); + ASSERT (MPN_SAME_OR_DECR_P (rp, up, n)); + + up += n; + rp += n; + + tnc = GMP_NUMB_BITS - cnt; + low_limb = *--up; + retval = low_limb >> tnc; + high_limb = (low_limb << cnt); + + for (i = n - 1; i != 0; i--) + { + low_limb = *--up; + *--rp = (~(high_limb | (low_limb >> tnc))) & GMP_NUMB_MASK; + high_limb = low_limb << cnt; + } + *--rp = (~high_limb) & GMP_NUMB_MASK; + + return retval; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/matrix22_mul.c gmp-5.0.2+dfsg/mpn/generic/matrix22_mul.c --- gmp-4.3.2+dfsg/mpn/generic/matrix22_mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/matrix22_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,10 +1,12 @@ /* matrix22_mul.c. + Contributed by Niels Möller and Marco Bodrato. + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT THEY'LL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2003, 2004, 2005, 2008 Free Software Foundation, Inc. +Copyright 2003, 2004, 2005, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -70,143 +72,198 @@ || BELOW_THRESHOLD (mn, MATRIX22_STRASSEN_THRESHOLD)) return 3*rn + 2*mn; else - return 4*(rn + mn) + 5; + return 3*(rn + mn) + 5; } /* Algorithm: / s0 \ / 1 0 0 0 \ / r0 \ - | s1 | | 0 1 0 0 | | r1 | - | s2 | | 0 0 1 1 | | r2 | - | s3 | = | -1 0 1 1 | \ r3 / - | s4 | | 1 0 -1 0 | - | s5 | | 1 1 -1 -1 | - \ s6 / \ 0 0 0 1 / + | s1 | | 0 1 0 1 | | r1 | + | s2 | | 0 0 -1 1 | | r2 | + | s3 | = | 0 1 -1 1 | \ r3 / + | s4 | | -1 1 -1 1 | + | s5 | | 0 1 0 0 | + \ s6 / \ 0 0 1 0 / / t0 \ / 1 0 0 0 \ / m0 \ - | t1 | | 0 0 1 0 | | m1 | - | t2 | | -1 1 0 0 | | m2 | - | t3 | = | 1 -1 0 1 | \ m3 / - | t4 | | 0 -1 0 1 | - | t5 | | 0 0 0 1 | - \ t6 / \ -1 1 1 -1 / - - / r0 \ / 1 1 0 0 0 0 0 \ / s0 * t0 \ - | r1 | = | 1 0 1 1 0 1 0 | | s1 * t1 | - | r2 | | 1 0 0 1 1 0 1 | | s2 * t2 | - \ r3 / \ 1 0 1 1 1 0 0 / | s3 * t3 | - | s4 * t4 | - | s5 * t5 | - \ s6 * t6 / + | t1 | | 0 1 0 1 | | m1 | + | t2 | | 0 0 -1 1 | | m2 | + | t3 | = | 0 1 -1 1 | \ m3 / + | t4 | | -1 1 -1 1 | + | t5 | | 0 1 0 0 | + \ t6 / \ 0 0 1 0 / + + Note: the two matrices above are the same, but s_i and t_i are used + in the same product, only for i<4, see "A Strassen-like Matrix + Multiplication suited for squaring and higher power computation" by + M. Bodrato, in Proceedings of ISSAC 2010. + + / r0 \ / 1 0 0 0 0 1 0 \ / s0*t0 \ + | r1 | = | 0 0 -1 1 -1 1 0 | | s1*t1 | + | r2 | | 0 1 0 -1 0 -1 -1 | | s2*t2 | + \ r3 / \ 0 1 1 -1 0 -1 0 / | s3*t3 | + | s4*t5 | + | s5*t6 | + \ s6*t4 / + + The scheduling uses two temporaries U0 and U1 to store products, and + two, S0 and T0, to store combinations of entries of the two + operands. */ /* Computes R = R * M. Elements are numbers R = (r0, r1; r2, r3). * * Resulting elements are of size up to rn + mn + 1. * - * Temporary storage: 4 rn + 4 mn + 5. */ + * Temporary storage: 3 rn + 3 mn + 5. */ void mpn_matrix22_mul_strassen (mp_ptr r0, mp_ptr r1, mp_ptr r2, mp_ptr r3, mp_size_t rn, mp_srcptr m0, mp_srcptr m1, mp_srcptr m2, mp_srcptr m3, mp_size_t mn, mp_ptr tp) { - mp_ptr s2, s3, t2, t3, u0, u1; - int r2s, r3s, s3s, t2s, t3s, u0s, u1s; - s2 = tp; tp += rn; - s3 = tp; tp += rn + 1; - t2 = tp; tp += mn; - t3 = tp; tp += mn + 1; + mp_ptr s0, t0, u0, u1; + int r1s, r3s, s0s, t0s, u1s; + s0 = tp; tp += rn + 1; + t0 = tp; tp += mn + 1; u0 = tp; tp += rn + mn + 1; u1 = tp; /* rn + mn + 2 */ - MUL (u0, r0, rn, m0, mn); /* 0 */ - MUL (u1, r1, rn, m2, mn); /* 1 */ - - MPN_COPY (s2, r3, rn); + MUL (u0, r1, rn, m2, mn); /* u5 = s5 * t6 */ + r3s = abs_sub_n (r3, r3, r2, rn); /* r3 - r2 */ + if (r3s) + { + r1s = abs_sub_n (r1, r1, r3, rn); + r1[rn] = 0; + } + else + { + r1[rn] = mpn_add_n (r1, r1, r3, rn); + r1s = 0; /* r1 - r2 + r3 */ + } + if (r1s) + { + s0[rn] = mpn_add_n (s0, r1, r0, rn); + s0s = 0; + } + else if (r1[rn] != 0) + { + s0[rn] = r1[rn] - mpn_sub_n (s0, r1, r0, rn); + s0s = 1; /* s4 = -r0 + r1 - r2 + r3 */ + /* Reverse sign! */ + } + else + { + s0s = abs_sub_n (s0, r0, r1, rn); + s0[rn] = 0; + } + MUL (u1, r0, rn, m0, mn); /* u0 = s0 * t0 */ + r0[rn+mn] = mpn_add_n (r0, u0, u1, rn + mn); + ASSERT (r0[rn+mn] < 2); /* u0 + u5 */ - r3[rn] = mpn_add_n (r3, r3, r2, rn); - r0[rn] = 0; - s3s = abs_sub_n (s3, r3, r0, rn + 1); - t2s = abs_sub_n (t2, m1, m0, mn); - if (t2s) + t0s = abs_sub_n (t0, m3, m2, mn); + u1s = r3s^t0s^1; /* Reverse sign! */ + MUL (u1, r3, rn, t0, mn); /* u2 = s2 * t2 */ + u1[rn+mn] = 0; + if (t0s) { - t3[mn] = mpn_add_n (t3, m3, t2, mn); - t3s = 0; + t0s = abs_sub_n (t0, m1, t0, mn); + t0[mn] = 0; } else { - t3s = abs_sub_n (t3, m3, t2, mn); - t3[mn] = 0; + t0[mn] = mpn_add_n (t0, t0, m1, mn); } - r2s = abs_sub_n (r2, r0, r2, rn); - r0[rn+mn] = mpn_add_n (r0, u0, u1, rn + mn); + /* FIXME: Could be simplified if we had space for rn + mn + 2 limbs + at r3. I'd expect that for matrices of random size, the high + words t0[mn] and r1[rn] are non-zero with a pretty small + probability. If that can be confirmed this should be done as an + unconditional rn x (mn+1) followed by an if (UNLIKELY (r1[rn])) + add_n. */ + if (t0[mn] != 0) + { + MUL (r3, r1, rn, t0, mn + 1); /* u3 = s3 * t3 */ + ASSERT (r1[rn] < 2); + if (r1[rn] != 0) + mpn_add_n (r3 + rn, r3 + rn, t0, mn + 1); + } + else + { + MUL (r3, r1, rn + 1, t0, mn); + } - MUL(u1, s3, rn+1, t3, mn+1); /* 3 */ - u1s = s3s ^ t3s; - ASSERT (u1[rn+mn+1] == 0); - ASSERT (u1[rn+mn] < 4); + ASSERT (r3[rn+mn] < 4); - if (u1s) + u0[rn+mn] = 0; + if (r1s^t0s) { - u0[rn+mn] = 0; - u0s = abs_sub_n (u0, u0, u1, rn + mn + 1); + r3s = abs_sub_n (r3, u0, r3, rn + mn + 1); } else { - u0[rn+mn] = u1[rn+mn] + mpn_add_n (u0, u0, u1, rn + mn); - u0s = 0; + ASSERT_NOCARRY (mpn_add_n (r3, r3, u0, rn + mn + 1)); + r3s = 0; /* u3 + u5 */ } - MUL(u1, r3, rn + 1, t2, mn); /* 2 */ - u1s = t2s; - ASSERT (u1[rn+mn] < 2); - u1s = add_signed_n (u1, u0, u0s, u1, u1s, rn + mn + 1); - - t2s = abs_sub_n (t2, m3, m1, mn); - if (s3s) + if (t0s) { - s3[rn] += mpn_add_n (s3, s3, r1, rn); - s3s = 0; + t0[mn] = mpn_add_n (t0, t0, m0, mn); } - else if (s3[rn] > 0) + else if (t0[mn] != 0) { - s3[rn] -= mpn_sub_n (s3, s3, r1, rn); - s3s = 1; + t0[mn] -= mpn_sub_n (t0, t0, m0, mn); } else { - s3s = abs_sub_n (s3, r1, s3, rn); + t0s = abs_sub_n (t0, t0, m0, mn); } - MUL (r1, s3, rn+1, m3, mn); /* 5 */ - ASSERT_NOCARRY(add_signed_n (r1, r1, s3s, u1, u1s, rn + mn + 1)); - ASSERT (r1[rn + mn] < 2); - - MUL (r3, r2, rn, t2, mn); /* 4 */ - r3s = r2s ^ t2s; - r3[rn + mn] = 0; - u0s = add_signed_n (u0, u0, u0s, r3, r3s, rn + mn + 1); - ASSERT_NOCARRY (add_signed_n (r3, r3, r3s, u1, u1s, rn + mn + 1)); - ASSERT (r3[rn + mn] < 2); - - if (t3s) + MUL (u0, r2, rn, t0, mn + 1); /* u6 = s6 * t4 */ + ASSERT (u0[rn+mn] < 2); + if (r1s) + { + ASSERT_NOCARRY (mpn_sub_n (r1, r2, r1, rn)); + } + else { - t3[mn] += mpn_add_n (t3, m2, t3, mn); - t3s = 0; + r1[rn] += mpn_add_n (r1, r1, r2, rn); } - else if (t3[mn] > 0) + rn++; + t0s = add_signed_n (r2, r3, r3s, u0, t0s, rn + mn); + /* u3 + u5 + u6 */ + ASSERT (r2[rn+mn-1] < 4); + r3s = add_signed_n (r3, r3, r3s, u1, u1s, rn + mn); + /* -u2 + u3 + u5 */ + ASSERT (r3[rn+mn-1] < 3); + MUL (u0, s0, rn, m1, mn); /* u4 = s4 * t5 */ + ASSERT (u0[rn+mn-1] < 2); + t0[mn] = mpn_add_n (t0, m3, m1, mn); + MUL (u1, r1, rn, t0, mn + 1); /* u1 = s1 * t1 */ + mn += rn; + ASSERT (u1[mn-1] < 4); + ASSERT (u1[mn] == 0); + ASSERT_NOCARRY (add_signed_n (r1, r3, r3s, u0, s0s, mn)); + /* -u2 + u3 - u4 + u5 */ + ASSERT (r1[mn-1] < 2); + if (r3s) { - t3[mn] -= mpn_sub_n (t3, t3, m2, mn); - t3s = 1; + ASSERT_NOCARRY (mpn_add_n (r3, u1, r3, mn)); } else { - t3s = abs_sub_n (t3, m2, t3, mn); + ASSERT_NOCARRY (mpn_sub_n (r3, u1, r3, mn)); + /* u1 + u2 - u3 - u5 */ } - MUL (r2, s2, rn, t3, mn + 1); /* 6 */ - - ASSERT_NOCARRY (add_signed_n (r2, r2, t3s, u0, u0s, rn + mn + 1)); - ASSERT (r2[rn + mn] < 2); + ASSERT (r3[mn-1] < 2); + if (t0s) + { + ASSERT_NOCARRY (mpn_add_n (r2, u1, r2, mn)); + } + else + { + ASSERT_NOCARRY (mpn_sub_n (r2, u1, r2, mn)); + /* u1 - u3 - u5 - u6 */ + } + ASSERT (r2[mn-1] < 2); } void diff -Nru gmp-4.3.2+dfsg/mpn/generic/mod_1_1.c gmp-5.0.2+dfsg/mpn/generic/mod_1_1.c --- gmp-4.3.2+dfsg/mpn/generic/mod_1_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mod_1_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,8 +1,8 @@ -/* mpn_mod_1s_1p (ap, n, b, cps) +/* mpn_mod_1_1p (ap, n, b, cps) Divide (ap,,n) by b. Return the single-limb remainder. - Requires that b < B / 2. Contributed to the GNU project by Torbjorn Granlund. + Based on a suggestion by Peter L. Montgomery. THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST @@ -30,39 +30,40 @@ #include "longlong.h" void -mpn_mod_1s_1p_cps (mp_limb_t cps[4], mp_limb_t b) +mpn_mod_1_1p_cps (mp_limb_t cps[4], mp_limb_t b) { mp_limb_t bi; mp_limb_t B1modb, B2modb; int cnt; - ASSERT (b <= GMP_NUMB_MAX / 2); - count_leading_zeros (cnt, b); b <<= cnt; invert_limb (bi, b); - B1modb = -b * ((bi >> (GMP_LIMB_BITS-cnt)) | (CNST_LIMB(1) << cnt)); + if (UNLIKELY (cnt == 0)) + B1modb = -b; + else + B1modb = -b * ((bi >> (GMP_LIMB_BITS-cnt)) | (CNST_LIMB(1) << cnt)); ASSERT (B1modb <= b); /* NB: not fully reduced mod b */ udiv_rnd_preinv (B2modb, B1modb, b, bi); - B1modb >>= cnt; - B2modb >>= cnt; - cps[0] = bi; cps[1] = cnt; - cps[2] = B1modb; - cps[3] = B2modb; + cps[2] = B1modb >> cnt; + cps[3] = B2modb >> cnt; } mp_limb_t -mpn_mod_1s_1p (mp_srcptr ap, mp_size_t n, mp_limb_t b, mp_limb_t bmodb[4]) +mpn_mod_1_1p (mp_srcptr ap, mp_size_t n, mp_limb_t b, mp_limb_t bmodb[4]) { mp_limb_t rh, rl, bi, q, ph, pl, r; mp_limb_t B1modb, B2modb; mp_size_t i; int cnt; + mp_limb_t mask; + + ASSERT (n >= 2); /* fix tuneup.c if this is changed */ B1modb = bmodb[2]; B2modb = bmodb[3]; @@ -85,20 +86,14 @@ bi = bmodb[0]; cnt = bmodb[1]; -#if 1 - { - mp_limb_t mask; - r = (rh << cnt) | (rl >> (GMP_LIMB_BITS - cnt)); - mask = -(mp_limb_t) (r >= b); - r -= mask & b; - } -#else - udiv_qrnnd_preinv (q, r, rh >> (GMP_LIMB_BITS - cnt), - (rh << cnt) | (rl >> (GMP_LIMB_BITS - cnt)), b, bi); - ASSERT (q <= 1); /* optimize for small quotient? */ -#endif - udiv_qrnnd_preinv (q, r, r, rl << cnt, b, bi); + if (LIKELY (cnt != 0)) + rh = (rh << cnt) | (rl >> (GMP_LIMB_BITS - cnt)); + + mask = -(mp_limb_t) (rh >= b); + rh -= mask & b; + + udiv_qrnnd_preinv (q, r, rh, rl << cnt, b, bi); return r >> cnt; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mod_1_2.c gmp-5.0.2+dfsg/mpn/generic/mod_1_2.c --- gmp-4.3.2+dfsg/mpn/generic/mod_1_2.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mod_1_2.c 2011-05-08 09:49:29.000000000 +0000 @@ -36,7 +36,7 @@ mp_limb_t B1modb, B2modb, B3modb; int cnt; - ASSERT (b <= GMP_NUMB_MAX / 2); + ASSERT (b <= (~(mp_limb_t) 0) / 2); count_leading_zeros (cnt, b); @@ -53,6 +53,18 @@ cps[2] = B1modb >> cnt; cps[3] = B2modb >> cnt; cps[4] = B3modb >> cnt; + +#if WANT_ASSERT + { + int i; + b = cps[2]; + for (i = 3; i <= 4; i++) + { + b += cps[i]; + ASSERT (b >= cps[i]); + } + } +#endif } mp_limb_t @@ -63,15 +75,27 @@ mp_size_t i; int cnt; + ASSERT (n >= 1); + B1modb = cps[2]; B2modb = cps[3]; B3modb = cps[4]; if ((n & 1) != 0) { - umul_ppmm (rh, rl, ap[n - 1], B2modb); + if (n == 1) + { + rl = ap[n - 1]; + bi = cps[0]; + cnt = cps[1]; + udiv_qrnnd_preinv (q, r, rl >> (GMP_LIMB_BITS - cnt), + rl << cnt, b, bi); + return r >> cnt; + } + umul_ppmm (ph, pl, ap[n - 2], B1modb); add_ssaaaa (ph, pl, ph, pl, 0, ap[n - 3]); + umul_ppmm (rh, rl, ap[n - 1], B2modb); add_ssaaaa (rh, rl, rh, rl, ph, pl); n--; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mod_1_3.c gmp-5.0.2+dfsg/mpn/generic/mod_1_3.c --- gmp-4.3.2+dfsg/mpn/generic/mod_1_3.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mod_1_3.c 2011-05-08 09:49:29.000000000 +0000 @@ -8,7 +8,7 @@ SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2008, 2009 Free Software Foundation, Inc. +Copyright 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -36,7 +36,7 @@ mp_limb_t B1modb, B2modb, B3modb, B4modb; int cnt; - ASSERT (b <= GMP_NUMB_MAX / 3); + ASSERT (b <= (~(mp_limb_t) 0) / 3); count_leading_zeros (cnt, b); @@ -55,6 +55,18 @@ cps[3] = B2modb >> cnt; cps[4] = B3modb >> cnt; cps[5] = B4modb >> cnt; + +#if WANT_ASSERT + { + int i; + b = cps[2]; + for (i = 3; i <= 5; i++) + { + b += cps[i]; + ASSERT (b >= cps[i]); + } + } +#endif } mp_limb_t @@ -65,17 +77,38 @@ mp_size_t i; int cnt; + ASSERT (n >= 1); + B1modb = cps[2]; B2modb = cps[3]; B3modb = cps[4]; B4modb = cps[5]; - umul_ppmm (ph, pl, ap[n - 2], B1modb); - add_ssaaaa (ph, pl, ph, pl, 0, ap[n - 3]); - umul_ppmm (ch, cl, ap[n - 1], B2modb); - add_ssaaaa (rh, rl, ph, pl, ch, cl); + /* We compute n mod 3 in a tricky way, which works except for when n is so + close to the maximum size that we don't need to support it. The final + cast to int is a workaround for HP cc. */ + switch ((int) ((mp_limb_t) n * MODLIMB_INVERSE_3 >> (GMP_NUMB_BITS - 2))) + { + case 0: + umul_ppmm (ph, pl, ap[n - 2], B1modb); + add_ssaaaa (ph, pl, ph, pl, 0, ap[n - 3]); + umul_ppmm (rh, rl, ap[n - 1], B2modb); + add_ssaaaa (rh, rl, rh, rl, ph, pl); + n -= 3; + break; + case 2: /* n mod 3 = 1 */ + rh = 0; + rl = ap[n - 1]; + n -= 1; + break; + case 1: /* n mod 3 = 2 */ + umul_ppmm (ph, pl, ap[n - 1], B1modb); + add_ssaaaa (rh, rl, ph, pl, 0, ap[n - 2]); + n -= 2; + break; + } - for (i = n - 6; i >= 0; i -= 3) + for (i = n - 3; i >= 0; i -= 3) { /* rr = ap[i] < B + ap[i+1] * (B mod b) <= (B-1)(b-1) @@ -96,21 +129,6 @@ add_ssaaaa (rh, rl, rh, rl, ph, pl); } - if (i >= -2) - { - umul_ppmm (ph, pl, rl, B1modb); - add_ssaaaa (ph, pl, ph, pl, 0, ap[i + 2]); - umul_ppmm (rh, rl, rh, B2modb); - add_ssaaaa (rh, rl, rh, rl, ph, pl); - if (i >= -1) - { - umul_ppmm (ph, pl, rl, B1modb); - add_ssaaaa (ph, pl, ph, pl, 0, ap[0]); - umul_ppmm (rh, rl, rh, B2modb); - add_ssaaaa (rh, rl, rh, rl, ph, pl); - } - } - bi = cps[0]; cnt = cps[1]; diff -Nru gmp-4.3.2+dfsg/mpn/generic/mod_1_4.c gmp-5.0.2+dfsg/mpn/generic/mod_1_4.c --- gmp-4.3.2+dfsg/mpn/generic/mod_1_4.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mod_1_4.c 2011-05-08 09:49:29.000000000 +0000 @@ -36,7 +36,7 @@ mp_limb_t B1modb, B2modb, B3modb, B4modb, B5modb; int cnt; - ASSERT (b <= GMP_NUMB_MAX / 4); + ASSERT (b <= (~(mp_limb_t) 0) / 4); count_leading_zeros (cnt, b); @@ -57,6 +57,18 @@ cps[4] = B3modb >> cnt; cps[5] = B4modb >> cnt; cps[6] = B5modb >> cnt; + +#if WANT_ASSERT + { + int i; + b = cps[2]; + for (i = 3; i <= 6; i++) + { + b += cps[i]; + ASSERT (b >= cps[i]); + } + } +#endif } mp_limb_t @@ -67,22 +79,45 @@ mp_size_t i; int cnt; + ASSERT (n >= 1); + B1modb = cps[2]; B2modb = cps[3]; B3modb = cps[4]; B4modb = cps[5]; B5modb = cps[6]; - umul_ppmm (ph, pl, ap[n - 3], B1modb); - add_ssaaaa (ph, pl, ph, pl, 0, ap[n - 4]); - - umul_ppmm (ch, cl, ap[n - 2], B2modb); - add_ssaaaa (ph, pl, ph, pl, ch, cl); - - umul_ppmm (ch, cl, ap[n - 1], B3modb); - add_ssaaaa (rh, rl, ph, pl, ch, cl); + switch (n & 3) + { + case 0: + umul_ppmm (ph, pl, ap[n - 3], B1modb); + add_ssaaaa (ph, pl, ph, pl, 0, ap[n - 4]); + umul_ppmm (ch, cl, ap[n - 2], B2modb); + add_ssaaaa (ph, pl, ph, pl, ch, cl); + umul_ppmm (rh, rl, ap[n - 1], B3modb); + add_ssaaaa (rh, rl, rh, rl, ph, pl); + n -= 4; + break; + case 1: + rh = 0; + rl = ap[n - 1]; + n -= 1; + break; + case 2: + umul_ppmm (ph, pl, ap[n - 1], B1modb); + add_ssaaaa (rh, rl, ph, pl, 0, ap[n - 2]); + n -= 2; + break; + case 3: + umul_ppmm (ph, pl, ap[n - 2], B1modb); + add_ssaaaa (ph, pl, ph, pl, 0, ap[n - 3]); + umul_ppmm (rh, rl, ap[n - 1], B2modb); + add_ssaaaa (rh, rl, rh, rl, ph, pl); + n -= 3; + break; + } - for (i = n - 8; i >= 0; i -= 4) + for (i = n - 4; i >= 0; i -= 4) { /* rr = ap[i] < B + ap[i+1] * (B mod b) <= (B-1)(b-1) @@ -107,28 +142,6 @@ add_ssaaaa (rh, rl, rh, rl, ph, pl); } - if (i >= -3) - { - umul_ppmm (ph, pl, rl, B1modb); - add_ssaaaa (ph, pl, ph, pl, 0, ap[i + 3]); - umul_ppmm (rh, rl, rh, B2modb); - add_ssaaaa (rh, rl, rh, rl, ph, pl); - if (i >= -2) - { - umul_ppmm (ph, pl, rl, B1modb); - add_ssaaaa (ph, pl, ph, pl, 0, ap[i + 2]); - umul_ppmm (rh, rl, rh, B2modb); - add_ssaaaa (rh, rl, rh, rl, ph, pl); - if (i >= -1) - { - umul_ppmm (ph, pl, rl, B1modb); - add_ssaaaa (ph, pl, ph, pl, 0, ap[0]); - umul_ppmm (rh, rl, rh, B2modb); - add_ssaaaa (rh, rl, rh, rl, ph, pl); - } - } - } - bi = cps[0]; cnt = cps[1]; diff -Nru gmp-4.3.2+dfsg/mpn/generic/mod_1.c gmp-5.0.2+dfsg/mpn/generic/mod_1.c --- gmp-4.3.2+dfsg/mpn/generic/mod_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mod_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -42,16 +42,20 @@ #define MOD_1_UNNORM_THRESHOLD 0 #endif -#ifndef MOD_1_1_THRESHOLD -#define MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* default is not to use mpn_mod_1s */ +#ifndef MOD_1U_TO_MOD_1_1_THRESHOLD +#define MOD_1U_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* default is not to use mpn_mod_1s */ #endif -#ifndef MOD_1_2_THRESHOLD -#define MOD_1_2_THRESHOLD 10 +#ifndef MOD_1N_TO_MOD_1_1_THRESHOLD +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* default is not to use mpn_mod_1s */ #endif -#ifndef MOD_1_4_THRESHOLD -#define MOD_1_4_THRESHOLD 120 +#ifndef MOD_1_1_TO_MOD_1_2_THRESHOLD +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 10 +#endif + +#ifndef MOD_1_2_TO_MOD_1_4_THRESHOLD +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 20 #endif @@ -207,29 +211,40 @@ if (UNLIKELY ((b & GMP_NUMB_HIGHBIT) != 0)) { - /* The functions below do not handle this large divisor. */ - return mpn_mod_1_norm (ap, n, b); - } - else if (BELOW_THRESHOLD (n, MOD_1_1_THRESHOLD)) - { - return mpn_mod_1_unnorm (ap, n, b); - } - else if (BELOW_THRESHOLD (n, MOD_1_2_THRESHOLD)) - { - mp_limb_t pre[4]; - mpn_mod_1s_1p_cps (pre, b); - return mpn_mod_1s_1p (ap, n, b << pre[1], pre); - } - else if (BELOW_THRESHOLD (n, MOD_1_4_THRESHOLD) || UNLIKELY (b > GMP_NUMB_MASK / 4)) - { - mp_limb_t pre[5]; - mpn_mod_1s_2p_cps (pre, b); - return mpn_mod_1s_2p (ap, n, b << pre[1], pre); + if (BELOW_THRESHOLD (n, MOD_1N_TO_MOD_1_1_THRESHOLD)) + { + return mpn_mod_1_norm (ap, n, b); + } + else + { + mp_limb_t pre[4]; + mpn_mod_1_1p_cps (pre, b); + return mpn_mod_1_1p (ap, n, b, pre); + } } else { - mp_limb_t pre[7]; - mpn_mod_1s_4p_cps (pre, b); - return mpn_mod_1s_4p (ap, n, b << pre[1], pre); + if (BELOW_THRESHOLD (n, MOD_1U_TO_MOD_1_1_THRESHOLD)) + { + return mpn_mod_1_unnorm (ap, n, b); + } + else if (BELOW_THRESHOLD (n, MOD_1_1_TO_MOD_1_2_THRESHOLD)) + { + mp_limb_t pre[4]; + mpn_mod_1_1p_cps (pre, b); + return mpn_mod_1_1p (ap, n, b << pre[1], pre); + } + else if (BELOW_THRESHOLD (n, MOD_1_2_TO_MOD_1_4_THRESHOLD) || UNLIKELY (b > GMP_NUMB_MASK / 4)) + { + mp_limb_t pre[5]; + mpn_mod_1s_2p_cps (pre, b); + return mpn_mod_1s_2p (ap, n, b << pre[1], pre); + } + else + { + mp_limb_t pre[7]; + mpn_mod_1s_4p_cps (pre, b); + return mpn_mod_1s_4p (ap, n, b << pre[1], pre); + } } } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mode1o.c gmp-5.0.2+dfsg/mpn/generic/mode1o.c --- gmp-4.3.2+dfsg/mpn/generic/mode1o.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mode1o.c 2011-05-08 09:49:29.000000000 +0000 @@ -30,7 +30,7 @@ r*B^k + a - c == q*d - where B=2^BITS_PER_MP_LIMB, a is {src,size}, k is either size or size-1 + where B=2^GMP_LIMB_BITS, a is {src,size}, k is either size or size-1 (the caller won't know which), and q is the quotient (discarded). d must be odd, c can be any limb value. diff -Nru gmp-4.3.2+dfsg/mpn/generic/mu_bdiv_q.c gmp-5.0.2+dfsg/mpn/generic/mu_bdiv_q.c --- gmp-4.3.2+dfsg/mpn/generic/mu_bdiv_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mu_bdiv_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -4,12 +4,11 @@ Contributed to the GNU project by Torbjorn Granlund. - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. -Copyright 2005, 2006, 2007 Free Software Foundation, Inc. +Copyright 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -27,17 +26,11 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* We use the "misunderstanding algorithm" (MU), discovered by Paul Zimmermann - and Torbjorn Granlund when Torbjorn misunderstood Paul's explanation of - Jebelean's bidirectional exact division algorithm. - - The idea of this algorithm is to compute a smaller inverted value than used - in the standard Barrett algorithm, and thus save time in the Newton - iterations, and pay just a small price when using the inverted value for - developing quotient bits. - - Written by Torbjorn Granlund. Paul Zimmermann suggested the use of the - "wrap around" trick. +/* + The idea of the algorithm used herein is to compute a smaller inverted value + than used in the standard Barrett algorithm, and thus save time in the + Newton iterations, and pay just a small price when using the inverted value + for developing quotient bits. This algorithm was presented at ICMS 2006. */ #include "gmp.h" @@ -49,11 +42,10 @@ Requirements: N >= D D >= 1 - N mod D = 0 D odd dn >= 2 nn >= 2 - scratch space as determined by mpn_divexact_itch(nn,dn). + scratch space as determined by mpn_mu_bdiv_q_itch(nn,dn). Write quotient to Q = {qp,nn}. @@ -69,10 +61,10 @@ mp_srcptr dp, mp_size_t dn, mp_ptr scratch) { - mp_ptr ip; - mp_ptr rp; mp_size_t qn; mp_size_t in; + int cy, c0; + mp_size_t tn, wn; qn = nn; @@ -82,74 +74,52 @@ if (qn > dn) { mp_size_t b; - mp_ptr tp; - mp_limb_t cy; - int k; - mp_size_t m, wn; - mp_size_t i; /* |_______________________| dividend |________| divisor */ +#define ip scratch /* in */ +#define rp (scratch + in) /* dn or rest >= binvert_itch(in) */ +#define tp (scratch + in + dn) /* dn+in or next_size(dn) */ +#define scratch_out (scratch + in + dn + tn) /* mulmod_bnm1_itch(next_size(dn)) */ + /* Compute an inverse size that is a nice partition of the quotient. */ b = (qn - 1) / dn + 1; /* ceil(qn/dn), number of blocks */ in = (qn - 1) / b + 1; /* ceil(qn/b) = ceil(qn / ceil(qn/dn)) */ /* Some notes on allocation: - When in = dn, R dies when mpn_mullow returns, if in < dn the low in + When in = dn, R dies when mpn_mullo returns, if in < dn the low in limbs of R dies at that point. We could save memory by letting T live just under R, and let the upper part of T expand into R. These changes should reduce itch to perhaps 3dn. */ - ip = scratch; /* in limbs */ - rp = scratch + in; /* dn limbs */ - tp = scratch + in + dn; /* dn + in limbs FIXME: mpn_fft_next_size */ - scratch += in; /* Roughly 2in+1 limbs */ - - mpn_binvert (ip, dp, in, scratch); + mpn_binvert (ip, dp, in, rp); cy = 0; MPN_COPY (rp, np, dn); np += dn; - mpn_mullow_n (qp, rp, ip, in); + mpn_mullo_n (qp, rp, ip, in); qn -= in; - if (ABOVE_THRESHOLD (dn, MUL_FFT_MODF_THRESHOLD)) - { - k = mpn_fft_best_k (dn, 0); - m = mpn_fft_next_size (dn, k); - wn = dn + in - m; /* number of wrapped limbs */ - ASSERT_ALWAYS (wn >= 0); /* could handle this below */ - } - while (qn > in) { -#if WANT_FFT - if (ABOVE_THRESHOLD (dn, MUL_FFT_MODF_THRESHOLD)) + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + mpn_mul (tp, dp, dn, qp, in); /* mulhi, need tp[dn+in-1...in] */ + else { - /* The two multiplicands are dn and 'in' limbs, with dn >= in. - The relevant part of the result will typically partially wrap, - and that part will come out as subtracted to the right. The - unwrapped part, m-in limbs at the high end of tp, is the lower - part of the sought product. The wrapped part, at the low end - of tp, will be subtracted from the low part of the partial - remainder; we undo that operation with another subtraction. */ - int c0; - - mpn_mul_fft (tp, m, dp, dn, qp, in, k); - - c0 = mpn_sub_n (tp + m, rp, tp, wn); - - for (i = wn; c0 != 0 && i < in; i++) - c0 = tp[i] == GMP_NUMB_MASK; - mpn_incr_u (tp + in, c0); + tn = mpn_mulmod_bnm1_next_size (dn); + mpn_mulmod_bnm1 (tp, tn, dp, dn, qp, in, scratch_out); + wn = dn + in - tn; /* number of wrapped limbs */ + if (wn > 0) + { + c0 = mpn_sub_n (tp + tn, tp, rp, wn); + mpn_decr_u (tp + wn, c0); + } } - else -#endif - mpn_mul (tp, dp, dn, qp, in); /* mulhi, need tp[dn+in-1...in] */ + qp += in; if (dn != in) { @@ -164,29 +134,28 @@ /* Subtract tp[dn+in-1...dn] from dividend. */ cy = mpn_sub_nc (rp + dn - in, np, tp + dn, in, cy); np += in; - mpn_mullow_n (qp, rp, ip, in); + mpn_mullo_n (qp, rp, ip, in); qn -= in; } /* Generate last qn limbs. FIXME: It should be possible to limit precision here, since qn is typically somewhat smaller than dn. No big gains expected. */ -#if WANT_FFT - if (ABOVE_THRESHOLD (dn, MUL_FFT_MODF_THRESHOLD)) - { - int c0; - - mpn_mul_fft (tp, m, dp, dn, qp, in, k); - - c0 = mpn_sub_n (tp + m, rp, tp, wn); - for (i = wn; c0 != 0 && i < in; i++) - c0 = tp[i] == GMP_NUMB_MASK; - mpn_incr_u (tp + in, c0); - } - else -#endif + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) mpn_mul (tp, dp, dn, qp, in); /* mulhi, need tp[qn+in-1...in] */ + else + { + tn = mpn_mulmod_bnm1_next_size (dn); + mpn_mulmod_bnm1 (tp, tn, dp, dn, qp, in, scratch_out); + wn = dn + in - tn; /* number of wrapped limbs */ + if (wn > 0) + { + c0 = mpn_sub_n (tp + tn, tp, rp, wn); + mpn_decr_u (tp + wn, c0); + } + } + qp += in; if (dn != in) { @@ -199,57 +168,93 @@ } mpn_sub_nc (rp + dn - in, np, tp + dn, qn - (dn - in), cy); - mpn_mullow_n (qp, rp, ip, qn); - } + mpn_mullo_n (qp, rp, ip, qn); + +#undef ip +#undef rp +#undef tp +#undef scratch_out + } else { /* |_______________________| dividend |________________| divisor */ +#define ip scratch /* in */ +#define tp (scratch + in) /* qn+in or next_size(qn) or rest >= binvert_itch(in) */ +#define scratch_out (scratch + in + tn)/* mulmod_bnm1_itch(next_size(qn)) */ + /* Compute half-sized inverse. */ in = qn - (qn >> 1); - ip = scratch; /* ceil(qn/2) limbs */ - rp = scratch + in; /* ceil(qn/2)+qn limbs */ - scratch += in; /* 2*ceil(qn/2)+2 */ - - mpn_binvert (ip, dp, in, scratch); - - mpn_mullow_n (qp, np, ip, in); /* low `in' quotient limbs */ -#if WANT_FFT - if (ABOVE_THRESHOLD (qn, MUL_FFT_MODF_THRESHOLD)) - { - int k; - mp_size_t m; - - k = mpn_fft_best_k (qn, 0); - m = mpn_fft_next_size (qn, k); - mpn_mul_fft (rp, m, dp, qn, qp, in, k); - if (mpn_cmp (np, rp, in) < 0) - mpn_incr_u (rp + in, 1); - } + mpn_binvert (ip, dp, in, tp); + + mpn_mullo_n (qp, np, ip, in); /* low `in' quotient limbs */ + + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + mpn_mul (tp, dp, qn, qp, in); /* mulhigh */ else -#endif - mpn_mul (rp, dp, qn, qp, in); /* mulhigh */ + { + tn = mpn_mulmod_bnm1_next_size (qn); + mpn_mulmod_bnm1 (tp, tn, dp, qn, qp, in, scratch_out); + wn = qn + in - tn; /* number of wrapped limbs */ + if (wn > 0) + { + c0 = mpn_cmp (tp, np, wn) < 0; + mpn_decr_u (tp + wn, c0); + } + } - mpn_sub_n (rp, np + in, rp + in, qn - in); - mpn_mullow_n (qp + in, rp, ip, qn - in); /* high qn-in quotient limbs */ + mpn_sub_n (tp, np + in, tp + in, qn - in); + mpn_mullo_n (qp + in, tp, ip, qn - in); /* high qn-in quotient limbs */ + +#undef ip +#undef tp +#undef scratch_out } } mp_size_t mpn_mu_bdiv_q_itch (mp_size_t nn, mp_size_t dn) { - mp_size_t qn; + mp_size_t qn, in, tn, itch_binvert, itch_out, itches; + mp_size_t b; qn = nn; if (qn > dn) { - return 4 * dn; /* FIXME FIXME FIXME need mpn_fft_next_size */ + b = (qn - 1) / dn + 1; /* ceil(qn/dn), number of blocks */ + in = (qn - 1) / b + 1; /* ceil(qn/b) = ceil(qn / ceil(qn/dn)) */ + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + { + tn = dn + in; + itch_out = 0; + } + else + { + tn = mpn_mulmod_bnm1_next_size (dn); + itch_out = mpn_mulmod_bnm1_itch (tn, dn, in); + } + itch_binvert = mpn_binvert_itch (in); + itches = dn + tn + itch_out; + return in + MAX (itches, itch_binvert); } else { - return 2 * qn + 1 + 2; /* FIXME FIXME FIXME need mpn_fft_next_size */ + in = qn - (qn >> 1); + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + { + tn = qn + in; + itch_out = 0; + } + else + { + tn = mpn_mulmod_bnm1_next_size (qn); + itch_out = mpn_mulmod_bnm1_itch (tn, qn, in); + } + itch_binvert = mpn_binvert_itch (in); + itches = tn + itch_out; + return in + MAX (itches, itch_binvert); } } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mu_bdiv_qr.c gmp-5.0.2+dfsg/mpn/generic/mu_bdiv_qr.c --- gmp-4.3.2+dfsg/mpn/generic/mu_bdiv_qr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mu_bdiv_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,12 +1,14 @@ -/* mpn_mu_bdiv_qr -- divide-and-conquer Hensel division using a variant of - Barrett's algorithm, returning quotient and remainder. +/* mpn_mu_bdiv_qr(qp,rp,np,nn,dp,dn,tp) -- Compute {np,nn} / {dp,dn} mod B^qn, + where qn = nn-dn, storing the result in {qp,qn}. Overlap allowed between Q + and N; all other overlap disallowed. - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. + Contributed to the GNU project by Torbjorn Granlund. -Copyright 2005, 2006, 2007 Free Software Foundation, Inc. + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -23,29 +25,256 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#include "gmp.h" -#include "gmp-impl.h" - -/* Computes Hensel binary division of {np, 2*n} by {dp, n}. +/* + The idea of the algorithm used herein is to compute a smaller inverted value + than used in the standard Barrett algorithm, and thus save time in the + Newton iterations, and pay just a small price when using the inverted value + for developing quotient bits. This algorithm was presented at ICMS 2006. +*/ - Output: - - q = n * d^{-1} mod 2^{qn * GMP_NUMB_BITS}, - - r = (n - q * d) * 2^{-qn * GMP_NUMB_BITS} +#include "gmp.h" +#include "gmp-impl.h" - Stores q at qp. Stores the n least significant limbs of r at the high half - of np, and returns the borrow from the subtraction n - q*d. - d must be odd. dinv is (-d)^-1 mod 2^GMP_NUMB_BITS. */ +/* N = {np,nn} + D = {dp,dn} -void + Requirements: N >= D + D >= 1 + D odd + dn >= 2 + nn >= 2 + scratch space as determined by mpn_mu_bdiv_qr_itch(nn,dn). + + Write quotient to Q = {qp,nn-dn}. + + FIXME: When iterating, perhaps do the small step before loop, not after. + FIXME: Try to avoid the scalar divisions when computing inverse size. + FIXME: Trim allocation for (qn > dn) case, 3*dn might be possible. In + particular, when dn==in, tp and rp could use the same space. +*/ +mp_limb_t mpn_mu_bdiv_qr (mp_ptr qp, mp_ptr rp, mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_ptr scratch) { - ASSERT_ALWAYS (0); + mp_size_t qn; + mp_size_t in; + mp_limb_t cy, c0; + int k; + mp_size_t tn, wn; + mp_size_t i; + + qn = nn - dn; + + ASSERT (dn >= 2); + ASSERT (qn >= 2); + + if (qn > dn) + { + mp_size_t b; + + /* |_______________________| dividend + |________| divisor */ + +#define ip scratch /* in */ +#define tp (scratch + in) /* dn+in or next_size(dn) or rest >= binvert_itch(in) */ +#define scratch_out (scratch + in + tn)/* mulmod_bnm1_itch(next_size(dn)) */ + + /* Compute an inverse size that is a nice partition of the quotient. */ + b = (qn - 1) / dn + 1; /* ceil(qn/dn), number of blocks */ + in = (qn - 1) / b + 1; /* ceil(qn/b) = ceil(qn / ceil(qn/dn)) */ + + /* Some notes on allocation: + + When in = dn, R dies when mpn_mullo returns, if in < dn the low in + limbs of R dies at that point. We could save memory by letting T live + just under R, and let the upper part of T expand into R. These changes + should reduce itch to perhaps 3dn. + */ + + mpn_binvert (ip, dp, in, tp); + + MPN_COPY (rp, np, dn); + np += dn; + cy = 0; + + while (qn > in) + { + mpn_mullo_n (qp, rp, ip, in); + + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + mpn_mul (tp, dp, dn, qp, in); /* mulhi, need tp[dn+in-1...in] */ + else + { + tn = mpn_mulmod_bnm1_next_size (dn); + mpn_mulmod_bnm1 (tp, tn, dp, dn, qp, in, scratch_out); + wn = dn + in - tn; /* number of wrapped limbs */ + if (wn > 0) + { + c0 = mpn_sub_n (tp + tn, tp, rp, wn); + mpn_decr_u (tp + wn, c0); + } + } + + qp += in; + qn -= in; + + if (dn != in) + { + /* Subtract tp[dn-1...in] from partial remainder. */ + cy += mpn_sub_n (rp, rp + in, tp + in, dn - in); + if (cy == 2) + { + mpn_incr_u (tp + dn, 1); + cy = 1; + } + } + /* Subtract tp[dn+in-1...dn] from dividend. */ + cy = mpn_sub_nc (rp + dn - in, np, tp + dn, in, cy); + np += in; + } + + /* Generate last qn limbs. */ + mpn_mullo_n (qp, rp, ip, qn); + + if (BELOW_THRESHOLD (qn, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + mpn_mul (tp, dp, dn, qp, qn); /* mulhi, need tp[qn+in-1...in] */ + else + { + tn = mpn_mulmod_bnm1_next_size (dn); + mpn_mulmod_bnm1 (tp, tn, dp, dn, qp, qn, scratch_out); + wn = dn + qn - tn; /* number of wrapped limbs */ + if (wn > 0) + { + c0 = mpn_sub_n (tp + tn, tp, rp, wn); + mpn_decr_u (tp + wn, c0); + } + } + + if (dn != qn) + { + cy += mpn_sub_n (rp, rp + qn, tp + qn, dn - qn); + if (cy == 2) + { + mpn_incr_u (tp + dn, 1); + cy = 1; + } + } + return mpn_sub_nc (rp + dn - qn, np, tp + dn, qn, cy); + +#undef ip +#undef tp +#undef scratch_out + } + else + { + /* |_______________________| dividend + |________________| divisor */ + +#define ip scratch /* in */ +#define tp (scratch + in) /* dn+in or next_size(dn) or rest >= binvert_itch(in) */ +#define scratch_out (scratch + in + tn)/* mulmod_bnm1_itch(next_size(dn)) */ + + /* Compute half-sized inverse. */ + in = qn - (qn >> 1); + + mpn_binvert (ip, dp, in, tp); + + mpn_mullo_n (qp, np, ip, in); /* low `in' quotient limbs */ + + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + mpn_mul (tp, dp, dn, qp, in); /* mulhigh */ + else + { + tn = mpn_mulmod_bnm1_next_size (dn); + mpn_mulmod_bnm1 (tp, tn, dp, dn, qp, in, scratch_out); + wn = dn + in - tn; /* number of wrapped limbs */ + if (wn > 0) + { + c0 = mpn_sub_n (tp + tn, tp, np, wn); + mpn_decr_u (tp + wn, c0); + } + } + + qp += in; + qn -= in; + + cy = mpn_sub_n (rp, np + in, tp + in, dn); + mpn_mullo_n (qp, rp, ip, qn); /* high qn quotient limbs */ + + if (BELOW_THRESHOLD (qn, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + mpn_mul (tp, dp, dn, qp, qn); /* mulhigh */ + else + { + tn = mpn_mulmod_bnm1_next_size (dn); + mpn_mulmod_bnm1 (tp, tn, dp, dn, qp, qn, scratch_out); + wn = dn + qn - tn; /* number of wrapped limbs */ + if (wn > 0) + { + c0 = mpn_sub_n (tp + tn, tp, rp, wn); + mpn_decr_u (tp + wn, c0); + } + } + + cy += mpn_sub_n (rp, rp + qn, tp + qn, dn - qn); + if (cy == 2) + { + mpn_incr_u (tp + dn, 1); + cy = 1; + } + return mpn_sub_nc (rp + dn - qn, np + dn + in, tp + dn, qn, cy); + +#undef ip +#undef tp +#undef scratch_out + } +} + +mp_size_t +mpn_mu_bdiv_qr_itch (mp_size_t nn, mp_size_t dn) +{ + mp_size_t qn, in, tn, itch_binvert, itch_out, itches; + mp_size_t b; + + qn = nn - dn; + + if (qn > dn) + { + b = (qn - 1) / dn + 1; /* ceil(qn/dn), number of blocks */ + in = (qn - 1) / b + 1; /* ceil(qn/b) = ceil(qn / ceil(qn/dn)) */ + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + { + tn = dn + in; + itch_out = 0; + } + else + { + tn = mpn_mulmod_bnm1_next_size (dn); + itch_out = mpn_mulmod_bnm1_itch (tn, dn, in); + } + itch_binvert = mpn_binvert_itch (in); + itches = tn + itch_out; + return in + MAX (itches, itch_binvert); + } + else + { + in = qn - (qn >> 1); + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + { + tn = dn + in; + itch_out = 0; + } + else + { + tn = mpn_mulmod_bnm1_next_size (dn); + itch_out = mpn_mulmod_bnm1_itch (tn, dn, in); + } + } + itch_binvert = mpn_binvert_itch (in); + itches = tn + itch_out; + return in + MAX (itches, itch_binvert); } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mu_divappr_q.c gmp-5.0.2+dfsg/mpn/generic/mu_divappr_q.c --- gmp-4.3.2+dfsg/mpn/generic/mu_divappr_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mu_divappr_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -7,12 +7,11 @@ Contributed to the GNU project by Torbjorn Granlund. - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. -Copyright 2005, 2006, 2007 Free Software Foundation, Inc. +Copyright 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -30,64 +29,30 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* We use the "misunderstanding algorithm" (MUA), discovered by Paul Zimmermann - and Torbjorn Granlund when Torbjorn misunderstood Paul's explanation of - Jebelean's bidirectional exact division algorithm. - - The idea of this algorithm is to compute a smaller inverted value than used - in the standard Barrett algorithm, and thus save time in the Newton - iterations, and pay just a small price when using the inverted value for - developing quotient bits. - - Written by Torbjorn Granlund. Paul Zimmermann suggested the use of the - "wrap around" trick. Based on the GMP divexact code and inspired by code - contributed to GMP by Karl Hasselstroem. +/* + The idea of the algorithm used herein is to compute a smaller inverted value + than used in the standard Barrett algorithm, and thus save time in the + Newton iterations, and pay just a small price when using the inverted value + for developing quotient bits. This algorithm was presented at ICMS 2006. */ - -/* CAUTION: This code and the code in mu_div_qr.c should be edited in lockstep. +/* CAUTION: This code and the code in mu_div_qr.c should be edited in sync. Things to work on: - * Passing k isn't a great interface. Either 'in' should be passed, or - determined by the code. - - * The current mpn_mu_div_qr_itch isn't exactly scientifically written. - Scratch space buffer overruns are not unlikely before some analysis is - applied. Since scratch requirements are expected to change, such an - analysis will have to wait til things settle. - - * This isn't optimal when the remainder isn't needed, since the final - multiplication could be made special and take O(1) time on average, in that - case. This is particularly bad when qn << dn. At some level, code as in - GMP 4 mpn_tdiv_qr should be used, effectively dividing the leading 2qn - dividend limbs by the qn divisor limbs. - - * This isn't optimal when the quotient isn't needed, as it might take a lot - of space. The computation is always needed, though, so there is not time - to save with special code. - * The itch/scratch scheme isn't perhaps such a good idea as it once seemed, - demonstrated by the fact that the mpn_inv function's scratch needs means - that we need to keep a large allocation long after it is needed. Things - are worse as mpn_mul_fft does not accept any scratch parameter, which means - we'll have a large memory hole while in mpn_mul_fft. In general, a peak - scratch need in the beginning of a function isn't well-handled by the - itch/scratch scheme. - - * Some ideas from comments in divexact.c apply to this code too. + demonstrated by the fact that the mpn_invertappr function's scratch needs + mean that we need to keep a large allocation long after it is needed. + Things are worse as mpn_mul_fft does not accept any scratch parameter, + which means we'll have a large memory hole while in mpn_mul_fft. In + general, a peak scratch need in the beginning of a function isn't + well-handled by the itch/scratch scheme. */ -/* the NOSTAT stuff handles properly the case where files are concatenated */ -#ifdef NOSTAT -#undef STAT -#endif - #ifdef STAT #undef STAT #define STAT(x) x #else -#define NOSTAT #define STAT(x) #endif @@ -96,68 +61,22 @@ #include "gmp-impl.h" -/* In case k=0 (automatic choice), we distinguish 3 cases: - (a) dn < qn: in = ceil(qn / ceil(qn/dn)) - (b) dn/3 < qn <= dn: in = ceil(qn / 2) - (c) qn < dn/3: in = qn - In all cases we have in <= dn. - */ -mp_size_t -mpn_mu_divappr_q_choose_in (mp_size_t qn, mp_size_t dn, int k) -{ - mp_size_t in; - - if (k == 0) - { - mp_size_t b; - if (qn > dn) - { - /* Compute an inverse size that is a nice partition of the quotient. */ - b = (qn - 1) / dn + 1; /* ceil(qn/dn), number of blocks */ - in = (qn - 1) / b + 1; /* ceil(qn/b) = ceil(qn / ceil(qn/dn)) */ - } - else if (3 * qn > dn) - { - in = (qn - 1) / 2 + 1; /* b = 2 */ - } - else - { - in = (qn - 1) / 1 + 1; /* b = 1 */ - } - } - else - { - mp_size_t xn; - xn = MIN (dn, qn); - in = (xn - 1) / k + 1; - } - - return in; -} - mp_limb_t mpn_mu_divappr_q (mp_ptr qp, - mp_ptr np, + mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_ptr scratch) { mp_size_t qn, in; - mp_limb_t cy; + mp_limb_t cy, qh; mp_ptr ip, tp; - /* FIXME: We should probably not handle tiny operands, but do it for now. */ - if (dn == 1) - { - mpn_divrem_1 (scratch, 0L, np, nn, dp[0]); - MPN_COPY (qp, scratch, nn - 1); - return scratch[nn - 1]; - } + ASSERT (dn > 1); qn = nn - dn; -#if 1 /* If Q is smaller than D, truncate operands. */ if (qn + 1 < dn) { @@ -165,18 +84,7 @@ nn -= dn - (qn + 1); dp += dn - (qn + 1); dn = qn + 1; - - /* Since D is cut here, we can have a carry in N'/D' even if we don't - have it for N/D. */ - if (mpn_cmp (np + nn - (qn + 1), dp, qn + 1) >= 0) - { /* quotient is 111...111 */ - mp_size_t i; - for (i = 0; i <= qn; i ++) - qp[i] = ~ (mp_limb_t) 0; - return 0; - } } -#endif /* Compute the inverse size. */ in = mpn_mu_divappr_q_choose_in (qn, dn, 0); @@ -185,7 +93,7 @@ #if 1 /* This alternative inverse computation method gets slightly more accurate results. FIXMEs: (1) Temp allocation needs not analysed (2) itch function - not adapted (3) mpn_invert scratch needs not met. */ + not adapted (3) mpn_invertappr scratch needs not met. */ ip = scratch; tp = scratch + in + 1; @@ -194,7 +102,7 @@ { MPN_COPY (tp + 1, dp, in); tp[0] = 1; - mpn_invert (ip, tp, in + 1, NULL); + mpn_invertappr (ip, tp, in + 1, NULL); MPN_COPY_INCR (ip, ip + 1, in); } else @@ -204,7 +112,7 @@ MPN_ZERO (ip, in); else { - mpn_invert (ip, tp, in + 1, NULL); + mpn_invertappr (ip, tp, in + 1, NULL); MPN_COPY_INCR (ip, ip + 1, in); } } @@ -220,11 +128,11 @@ { tp[in + 1] = 0; MPN_COPY (tp + in + 2, dp, in); - mpn_invert (tp, tp + in + 1, in + 1, NULL); + mpn_invertappr (tp, tp + in + 1, in + 1, NULL); } else { - mpn_invert (tp, dp + dn - (in + 1), in + 1, NULL); + mpn_invertappr (tp, dp + dn - (in + 1), in + 1, NULL); } cy = mpn_sub_1 (tp, tp, in + 1, GMP_NUMB_HIGHBIT); if (UNLIKELY (cy != 0)) @@ -232,23 +140,14 @@ MPN_COPY (ip, tp + 1, in); #endif -/* We can't really handle qh = 1 like this since we'd here clobber N, which is - not allowed in the way we've defined this function's API. */ -#if 0 - qh = mpn_cmp (np + qn, dp, dn) >= 0; - if (qh != 0) - mpn_sub_n (np + qn, np + qn, dp, dn); -#endif - - mpn_preinv_mu_divappr_q (qp, np, nn, dp, dn, ip, in, scratch + in); + qh = mpn_preinv_mu_divappr_q (qp, np, nn, dp, dn, ip, in, scratch + in); -/* return qh; */ - return 0; + return qh; } -void +mp_limb_t mpn_preinv_mu_divappr_q (mp_ptr qp, - mp_ptr np, + mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, @@ -256,24 +155,28 @@ mp_size_t in, mp_ptr scratch) { - mp_ptr rp; mp_size_t qn; - mp_limb_t cy; - mp_ptr tp; + mp_limb_t cy, cx, qh; mp_limb_t r; + mp_size_t tn, wn; - qn = nn - dn; - - if (qn == 0) - return; +#define rp scratch +#define tp (scratch + dn) +#define scratch_out (scratch + dn + tn) - rp = scratch; - tp = scratch + dn; + qn = nn - dn; np += qn; qp += qn; - MPN_COPY (rp, np, dn); + qh = mpn_cmp (np, dp, dn) >= 0; + if (qh != 0) + mpn_sub_n (rp, np, dp, dn); + else + MPN_COPY (rp, np, dn); + + if (qn == 0) + return qh; /* Degenerate use. Should we allow this? */ while (qn > 0) { @@ -289,7 +192,7 @@ by the upper part of the partial remainder R. */ mpn_mul_n (tp, rp + dn - in, ip, in); /* mulhi */ cy = mpn_add_n (qp, tp + in, rp + dn - in, in); /* I's msb implicit */ - ASSERT_ALWAYS (cy == 0); /* FIXME */ + ASSERT_ALWAYS (cy == 0); qn -= in; if (qn == 0) @@ -298,31 +201,23 @@ /* Compute the product of the quotient block and the divisor D, to be subtracted from the partial remainder combined with new limbs from the dividend N. We only really need the low dn limbs. */ -#if WANT_FFT - if (ABOVE_THRESHOLD (dn, MUL_FFT_MODF_THRESHOLD)) - { - /* Use the wrap-around trick. */ - mp_size_t m, wn; - int k; - - k = mpn_fft_best_k (dn + 1, 0); - m = mpn_fft_next_size (dn + 1, k); - wn = dn + in - m; /* number of wrapped limbs */ - - mpn_mul_fft (tp, m, dp, dn, qp, in, k); + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + mpn_mul (tp, dp, dn, qp, in); /* dn+in limbs, high 'in' cancels */ + else + { + tn = mpn_mulmod_bnm1_next_size (dn + 1); + mpn_mulmod_bnm1 (tp, tn, dp, dn, qp, in, scratch_out); + wn = dn + in - tn; /* number of wrapped limbs */ if (wn > 0) { - cy = mpn_add_n (tp, tp, rp + dn - wn, wn); - mpn_incr_u (tp + wn, cy); - - cy = mpn_cmp (rp + dn - in, tp + dn, m - dn) < 0; - mpn_decr_u (tp, cy); + cy = mpn_sub_n (tp, tp, rp + dn - wn, wn); + cy = mpn_sub_1 (tp + wn, tp + wn, tn - wn, cy); + cx = mpn_cmp (rp + dn - in, tp + dn, tn - dn) < 0; + ASSERT_ALWAYS (cx >= cy); + mpn_incr_u (tp, cx - cy); } } - else -#endif - mpn_mul (tp, dp, dn, qp, in); /* dn+in limbs, high 'in' cancels */ r = rp[dn - in] - tp[dn]; @@ -378,45 +273,80 @@ /* FIXME: We should perhaps be somewhat more elegant in our rounding of the quotient. For now, just make sure the returned quotient is >= the real - quotient. */ + quotient; add 3 with saturating arithmetic. */ qn = nn - dn; - cy = mpn_add_1 (qp, qp, qn, 3); + cy += mpn_add_1 (qp, qp, qn, 3); if (cy != 0) { - MPN_ZERO (qp, qn); - mpn_sub_1 (qp, qp, qn, 1); + if (qh != 0) + { + /* Return a quotient of just 1-bits, with qh set. */ + mp_size_t i; + for (i = 0; i < qn; i++) + qp[i] = GMP_NUMB_MAX; + } + else + { + /* Propagate carry into qh. */ + qh = 1; + } } + + return qh; } +/* In case k=0 (automatic choice), we distinguish 3 cases: + (a) dn < qn: in = ceil(qn / ceil(qn/dn)) + (b) dn/3 < qn <= dn: in = ceil(qn / 2) + (c) qn < dn/3: in = qn + In all cases we have in <= dn. + */ mp_size_t -mpn_mu_divappr_q_itch (mp_size_t nn, mp_size_t dn, int mua_k) +mpn_mu_divappr_q_choose_in (mp_size_t qn, mp_size_t dn, int k) { - mp_size_t qn, m; - int k; - - /* FIXME: This isn't very carefully written, and might grossly overestimate - the amount of scratch needed, and might perhaps also underestimate it, - leading to potential buffer overruns. In particular k=0 might lead to - gross overestimates. */ - - if (dn == 1) - return nn; + mp_size_t in; - qn = nn - dn; - if (qn >= dn) + if (k == 0) { - k = mpn_fft_best_k (dn + 1, 0); - m = mpn_fft_next_size (dn + 1, k); - return dn + (mua_k <= 1 - ? 6 * dn - : m + 2 * dn); + mp_size_t b; + if (qn > dn) + { + /* Compute an inverse size that is a nice partition of the quotient. */ + b = (qn - 1) / dn + 1; /* ceil(qn/dn), number of blocks */ + in = (qn - 1) / b + 1; /* ceil(qn/b) = ceil(qn / ceil(qn/dn)) */ + } + else if (3 * qn > dn) + { + in = (qn - 1) / 2 + 1; /* b = 2 */ + } + else + { + in = (qn - 1) / 1 + 1; /* b = 1 */ + } } else { - k = mpn_fft_best_k (dn + 1, 0); - m = mpn_fft_next_size (dn + 1, k); - return dn + (mua_k <= 1 - ? m + 4 * qn - : m + 2 * qn); + mp_size_t xn; + xn = MIN (dn, qn); + in = (xn - 1) / k + 1; } + + return in; +} + +mp_size_t +mpn_mu_divappr_q_itch (mp_size_t nn, mp_size_t dn, int mua_k) +{ + mp_size_t qn, in, itch_local, itch_out; + + qn = nn - dn; + if (qn + 1 < dn) + { + dn = qn + 1; + } + in = mpn_mu_divappr_q_choose_in (qn, dn, mua_k); + + itch_local = mpn_mulmod_bnm1_next_size (dn + 1); + itch_out = mpn_mulmod_bnm1_itch (itch_local, dn, in); + return in + dn + itch_local + itch_out; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mu_div_q.c gmp-5.0.2+dfsg/mpn/generic/mu_div_q.c --- gmp-4.3.2+dfsg/mpn/generic/mu_div_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mu_div_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,13 +1,12 @@ -/* mpn_mu_div_q, mpn_preinv_mu_div_q. +/* mpn_mu_div_q. - Contributed to the GNU project by Torbjörn Granlund. + Contributed to the GNU project by Torbjorn Granlund and Marco Bodrato. - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. -Copyright 2005, 2006, 2007 Free Software Foundation, Inc. +Copyright 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -26,6 +25,13 @@ /* + The idea of the algorithm used herein is to compute a smaller inverted value + than used in the standard Barrett algorithm, and thus save time in the + Newton iterations, and pay just a small price when using the inverted value + for developing quotient bits. This algorithm was presented at ICMS 2006. +*/ + +/* Things to work on: 1. This is a rudimentary implementation of mpn_mu_div_q. The algorithm is @@ -36,13 +42,14 @@ simply call mpn_mu_divappr_q. Such a temporary allocation is unfortunately very large. - 2. Instead of falling back to mpn_mu_div_qr when we detect a possible - mpn_mu_divappr_q rounding problem, we could multiply and compare. + 2. We used to fall back to mpn_mu_div_qr when we detect a possible + mpn_mu_divappr_q rounding problem, now we multiply and compare. Unfortunately, since mpn_mu_divappr_q does not return the partial - remainder, this also doesn't become optimal. A mpn_mu_divappr_qr - could solve that. + remainder, this also doesn't become optimal. A mpn_mu_divappr_qr could + solve that. - 3. The allocations done here should be made from the scratch area. + 3. The allocations done here should be made from the scratch area, which + then would need to be amended. */ #include /* for NULL */ @@ -52,13 +59,13 @@ mp_limb_t mpn_mu_div_q (mp_ptr qp, - mp_ptr np, mp_size_t nn, + mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_ptr scratch) { mp_ptr tp, rp, ip, this_ip; mp_size_t qn, in, this_in; - mp_limb_t cy; + mp_limb_t cy, qh; TMP_DECL; TMP_MARK; @@ -69,7 +76,8 @@ if (qn >= dn) /* nn >= 2*dn + 1 */ { - /* Find max inverse size needed by the two preinv calls. */ + /* Find max inverse size needed by the two preinv calls. FIXME: This is + not optimal, it underestimates the invariance. */ if (dn != qn) { mp_size_t in1, in2; @@ -89,7 +97,7 @@ { MPN_COPY (scratch + 1, dp, in); scratch[0] = 1; - mpn_invert (ip, scratch, in + 1, NULL); + mpn_invertappr (ip, scratch, in + 1, NULL); MPN_COPY_INCR (ip, ip + 1, in); } else @@ -99,7 +107,7 @@ MPN_ZERO (ip, in); else { - mpn_invert (ip, scratch, in + 1, NULL); + mpn_invertappr (ip, scratch, in + 1, NULL); MPN_COPY_INCR (ip, ip + 1, in); } } @@ -107,21 +115,28 @@ /* |_______________________| dividend |________| divisor */ rp = TMP_BALLOC_LIMBS (2 * dn + 1); - if (dn != qn) /* FIXME: perhaps mpn_mu_div_qr should DTRT */ - { - this_in = mpn_mu_div_qr_choose_in (qn - dn, dn, 0); - this_ip = ip + in - this_in; - mpn_preinv_mu_div_qr (tp + dn + 1, rp + dn + 1, np + dn, qn, dp, dn, - this_ip, this_in, scratch); - } - else - MPN_COPY (rp + dn + 1, np + dn, dn); + + this_in = mpn_mu_div_qr_choose_in (qn - dn, dn, 0); + this_ip = ip + in - this_in; + qh = mpn_preinv_mu_div_qr (tp + dn + 1, rp + dn + 1, np + dn, qn, dp, dn, + this_ip, this_in, scratch); MPN_COPY (rp + 1, np, dn); rp[0] = 0; this_in = mpn_mu_divappr_q_choose_in (dn + 1, dn, 0); this_ip = ip + in - this_in; - mpn_preinv_mu_divappr_q (tp, rp, 2*dn + 1, dp, dn, this_ip, this_in, scratch); + cy = mpn_preinv_mu_divappr_q (tp, rp, 2 * dn + 1, dp, dn, + this_ip, this_in, scratch); + + if (UNLIKELY (cy != 0)) + { + /* Since the partial remainder fed to mpn_preinv_mu_divappr_q was + canonically reduced, replace the returned value of B^(qn-dn)+eps + by the largest possible value. */ + mp_size_t i; + for (i = 0; i < dn + 1; i++) + tp[i] = GMP_NUMB_MAX; + } /* The max error of mpn_mu_divappr_q is +4. If the low quotient limb is greater than the max error, we cannot trust the quotient. */ @@ -131,27 +146,77 @@ } else { - /* Fall back to plain mpn_mu_div_qr. */ - mpn_mu_div_qr (qp, rp, np, nn, dp, dn, scratch); + mp_limb_t cy; + mp_ptr pp; + + /* FIXME: can we use already allocated space? */ + pp = TMP_BALLOC_LIMBS (nn); + mpn_mul (pp, tp + 1, qn, dp, dn); + + cy = (qh != 0) ? mpn_add_n (pp + qn, pp + qn, dp, dn) : 0; + + if (cy || mpn_cmp (pp, np, nn) > 0) /* At most is wrong by one, no cycle. */ + qh -= mpn_sub_1 (qp, tp + 1, qn, 1); + else /* Same as above */ + MPN_COPY (qp, tp + 1, qn); } } else { /* |_______________________| dividend |________________| divisor */ - mpn_mu_divappr_q (tp, np + nn - (2*qn + 2), 2*qn + 2, dp + dn - (qn + 1), qn + 1, scratch); - if (tp[0] > 4) + /* FIXME: When nn = 2dn-1, qn becomes dn-1, and the numerator size passed + here becomes 2dn, i.e., more than nn. This shouldn't hurt, since only + the most significant dn-1 limbs will actually be read, but it is not + pretty. */ + + qh = mpn_mu_divappr_q (tp, np + nn - (2 * qn + 2), 2 * qn + 2, + dp + dn - (qn + 1), qn + 1, scratch); + + /* The max error of mpn_mu_divappr_q is +4, but we get an additional + error from the divisor truncation. */ + if (tp[0] > 6) { MPN_COPY (qp, tp + 1, qn); } else { - rp = TMP_BALLOC_LIMBS (dn); - mpn_mu_div_qr (qp, rp, np, nn, dp, dn, scratch); + mp_limb_t cy; + + /* FIXME: a shorter product should be enough; we may use already + allocated space... */ + rp = TMP_BALLOC_LIMBS (nn); + mpn_mul (rp, dp, dn, tp + 1, qn); + + cy = (qh != 0) ? mpn_add_n (rp + qn, rp + qn, dp, dn) : 0; + + if (cy || mpn_cmp (rp, np, nn) > 0) /* At most is wrong by one, no cycle. */ + qh -= mpn_sub_1 (qp, tp + 1, qn, 1); + else /* Same as above */ + MPN_COPY (qp, tp + 1, qn); } } TMP_FREE; - return 0; + return qh; +} + +mp_size_t +mpn_mu_div_q_itch (mp_size_t nn, mp_size_t dn, int mua_k) +{ + mp_size_t qn, itch1, itch2; + + qn = nn - dn; + if (qn >= dn) + { + itch1 = mpn_mu_div_qr_itch (qn, dn, mua_k); + itch2 = mpn_mu_divappr_q_itch (2 * dn + 1, dn, mua_k); + return MAX (itch1, itch2); + } + else + { + itch1 = mpn_mu_divappr_q_itch (2 * qn + 2, qn + 1, mua_k); + return itch1; + } } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mu_div_qr.c gmp-5.0.2+dfsg/mpn/generic/mu_div_qr.c --- gmp-4.3.2+dfsg/mpn/generic/mu_div_qr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mu_div_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -7,12 +7,11 @@ Contributed to the GNU project by Torbjorn Granlund. - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. -Copyright 2005, 2006, 2007 Free Software Foundation, Inc. +Copyright 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -30,64 +29,34 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* We use the "misunderstanding algorithm" (MUA), discovered by Paul Zimmermann - and Torbjorn Granlund when Torbjorn misunderstood Paul's explanation of - Jebelean's bidirectional exact division algorithm. - - The idea of this algorithm is to compute a smaller inverted value than used - in the standard Barrett algorithm, and thus save time in the Newton - iterations, and pay just a small price when using the inverted value for - developing quotient bits. - - Written by Torbjorn Granlund. Paul Zimmermann suggested the use of the - "wrap around" trick. Based on the GMP divexact code and inspired by code - contributed to GMP by Karl Hasselstroem. +/* + The idea of the algorithm used herein is to compute a smaller inverted value + than used in the standard Barrett algorithm, and thus save time in the + Newton iterations, and pay just a small price when using the inverted value + for developing quotient bits. This algorithm was presented at ICMS 2006. */ - -/* CAUTION: This code and the code in mu_divappr_q.c should be edited in lockstep. +/* CAUTION: This code and the code in mu_divappr_q.c should be edited in sync. Things to work on: - * Passing k isn't a great interface. Either 'in' should be passed, or - determined by the code. - - * The current mpn_mu_div_qr_itch isn't exactly scientifically written. - Scratch space buffer overruns are not unlikely before some analysis is - applied. Since scratch requirements are expected to change, such an - analysis will have to wait til things settle. - - * This isn't optimal when the remainder isn't needed, since the final - multiplication could be made special and take O(1) time on average, in that - case. This is particularly bad when qn << dn. At some level, code as in - GMP 4 mpn_tdiv_qr should be used, effectively dividing the leading 2qn - dividend limbs by the qn divisor limbs. - * This isn't optimal when the quotient isn't needed, as it might take a lot - of space. The computation is always needed, though, so there is not time - to save with special code. + of space. The computation is always needed, though, so there is no time to + save with special code. * The itch/scratch scheme isn't perhaps such a good idea as it once seemed, - demonstrated by the fact that the mpn_inv function's scratch needs means - that we need to keep a large allocation long after it is needed. Things - are worse as mpn_mul_fft does not accept any scratch parameter, which means - we'll have a large memory hole while in mpn_mul_fft. In general, a peak - scratch need in the beginning of a function isn't well-handled by the - itch/scratch scheme. - - * Some ideas from comments in divexact.c apply to this code too. + demonstrated by the fact that the mpn_invertappr function's scratch needs + mean that we need to keep a large allocation long after it is needed. + Things are worse as mpn_mul_fft does not accept any scratch parameter, + which means we'll have a large memory hole while in mpn_mul_fft. In + general, a peak scratch need in the beginning of a function isn't + well-handled by the itch/scratch scheme. */ -/* the NOSTAT stuff handles properly the case where files are concatenated */ -#ifdef NOSTAT -#undef STAT -#endif - #ifdef STAT #undef STAT #define STAT(x) x #else -#define NOSTAT #define STAT(x) #endif @@ -96,65 +65,98 @@ #include "gmp-impl.h" -/* In case k=0 (automatic choice), we distinguish 3 cases: - (a) dn < qn: in = ceil(qn / ceil(qn/dn)) - (b) dn/3 < qn <= dn: in = ceil(qn / 2) - (c) qn < dn/3: in = qn - In all cases we have in <= dn. - */ -mp_size_t -mpn_mu_div_qr_choose_in (mp_size_t qn, mp_size_t dn, int k) +/* FIXME: The MU_DIV_QR_SKEW_THRESHOLD was not analysed properly. It gives a + speedup according to old measurements, but does the decision mechanism + really make sense? It seem like the quotient between dn and qn might be + what we really should be checking. */ +#ifndef MU_DIV_QR_SKEW_THRESHOLD +#define MU_DIV_QR_SKEW_THRESHOLD 100 +#endif + +#ifdef CHECK /* FIXME: Enable in minithres */ +#undef MU_DIV_QR_SKEW_THRESHOLD +#define MU_DIV_QR_SKEW_THRESHOLD 1 +#endif + + +static mp_limb_t mpn_mu_div_qr2 (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t, mp_ptr); + + +mp_limb_t +mpn_mu_div_qr (mp_ptr qp, + mp_ptr rp, + mp_srcptr np, + mp_size_t nn, + mp_srcptr dp, + mp_size_t dn, + mp_ptr scratch) { - mp_size_t in; + mp_size_t qn; + mp_limb_t cy, qh; - if (k == 0) + qn = nn - dn; + if (qn + MU_DIV_QR_SKEW_THRESHOLD < dn) { - mp_size_t b; - if (qn > dn) - { - /* Compute an inverse size that is a nice partition of the quotient. */ - b = (qn - 1) / dn + 1; /* ceil(qn/dn), number of blocks */ - in = (qn - 1) / b + 1; /* ceil(qn/b) = ceil(qn / ceil(qn/dn)) */ - } - else if (3 * qn > dn) - { - in = (qn - 1) / 2 + 1; /* b = 2 */ - } + /* |______________|_ign_first__| dividend nn + |_______|_ign_first__| divisor dn + + |______| quotient (prel) qn + + |___________________| quotient * ignored-divisor-part dn-1 + */ + + /* Compute a preliminary quotient and a partial remainder by dividing the + most significant limbs of each operand. */ + qh = mpn_mu_div_qr2 (qp, rp + nn - (2 * qn + 1), + np + nn - (2 * qn + 1), 2 * qn + 1, + dp + dn - (qn + 1), qn + 1, + scratch); + + /* Multiply the quotient by the divisor limbs ignored above. */ + if (dn - (qn + 1) > qn) + mpn_mul (scratch, dp, dn - (qn + 1), qp, qn); /* prod is dn-1 limbs */ + else + mpn_mul (scratch, qp, qn, dp, dn - (qn + 1)); /* prod is dn-1 limbs */ + + if (qh) + cy = mpn_add_n (scratch + qn, scratch + qn, dp, dn - (qn + 1)); else + cy = 0; + scratch[dn - 1] = cy; + + cy = mpn_sub_n (rp, np, scratch, nn - (2 * qn + 1)); + cy = mpn_sub_nc (rp + nn - (2 * qn + 1), + rp + nn - (2 * qn + 1), + scratch + nn - (2 * qn + 1), + qn + 1, cy); + if (cy) { - in = (qn - 1) / 1 + 1; /* b = 1 */ + qh -= mpn_sub_1 (qp, qp, qn, 1); + mpn_add_n (rp, rp, dp, dn); } } else { - mp_size_t xn; - xn = MIN (dn, qn); - in = (xn - 1) / k + 1; + qh = mpn_mu_div_qr2 (qp, rp, np, nn, dp, dn, scratch); } - return in; + return qh; } static mp_limb_t mpn_mu_div_qr2 (mp_ptr qp, mp_ptr rp, - mp_ptr np, + mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, mp_ptr scratch) { mp_size_t qn, in; - mp_limb_t cy; + mp_limb_t cy, qh; mp_ptr ip, tp; - /* FIXME: We should probably not handle tiny operands, but do it for now. */ - if (dn == 1) - { - rp[0] = mpn_divrem_1 (scratch, 0L, np, nn, dp[0]); - MPN_COPY (qp, scratch, nn - 1); - return scratch[nn - 1]; - } + ASSERT (dn > 1); qn = nn - dn; @@ -165,7 +167,7 @@ #if 1 /* This alternative inverse computation method gets slightly more accurate results. FIXMEs: (1) Temp allocation needs not analysed (2) itch function - not adapted (3) mpn_invert scratch needs not met. */ + not adapted (3) mpn_invertappr scratch needs not met. */ ip = scratch; tp = scratch + in + 1; @@ -174,7 +176,7 @@ { MPN_COPY (tp + 1, dp, in); tp[0] = 1; - mpn_invert (ip, tp, in + 1, NULL); + mpn_invertappr (ip, tp, in + 1, NULL); MPN_COPY_INCR (ip, ip + 1, in); } else @@ -184,7 +186,7 @@ MPN_ZERO (ip, in); else { - mpn_invert (ip, tp, in + 1, NULL); + mpn_invertappr (ip, tp, in + 1, NULL); MPN_COPY_INCR (ip, ip + 1, in); } } @@ -200,11 +202,11 @@ { tp[in + 1] = 0; MPN_COPY (tp + in + 2, dp, in); - mpn_invert (tp, tp + in + 1, in + 1, NULL); + mpn_invertappr (tp, tp + in + 1, in + 1, NULL); } else { - mpn_invert (tp, dp + dn - (in + 1), in + 1, NULL); + mpn_invertappr (tp, dp + dn - (in + 1), in + 1, NULL); } cy = mpn_sub_1 (tp, tp, in + 1, GMP_NUMB_HIGHBIT); if (UNLIKELY (cy != 0)) @@ -212,24 +214,15 @@ MPN_COPY (ip, tp + 1, in); #endif -/* We can't really handle qh = 1 like this since we'd here clobber N, which is - not allowed in the way we've defined this function's API. */ -#if 0 - qh = mpn_cmp (np + qn, dp, dn) >= 0; - if (qh != 0) - mpn_sub_n (np + qn, np + qn, dp, dn); -#endif - - mpn_preinv_mu_div_qr (qp, rp, np, nn, dp, dn, ip, in, scratch + in); + qh = mpn_preinv_mu_div_qr (qp, rp, np, nn, dp, dn, ip, in, scratch + in); -/* return qh; */ - return 0; + return qh; } -void +mp_limb_t mpn_preinv_mu_div_qr (mp_ptr qp, mp_ptr rp, - mp_ptr np, + mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, @@ -238,24 +231,26 @@ mp_ptr scratch) { mp_size_t qn; - mp_limb_t cy; - mp_ptr tp; + mp_limb_t cy, cx, qh; mp_limb_t r; + mp_size_t tn, wn; - qn = nn - dn; - - if (qn == 0) - { - MPN_COPY (rp, np, dn); - return; - } +#define tp scratch +#define scratch_out (scratch + tn) - tp = scratch; + qn = nn - dn; np += qn; qp += qn; - MPN_COPY (rp, np, dn); + qh = mpn_cmp (np, dp, dn) >= 0; + if (qh != 0) + mpn_sub_n (rp, np, dp, dn); + else + MPN_COPY (rp, np, dn); + + if (qn == 0) + return qh; /* Degenerate use. Should we allow this? */ while (qn > 0) { @@ -271,36 +266,30 @@ by the upper part of the partial remainder R. */ mpn_mul_n (tp, rp + dn - in, ip, in); /* mulhi */ cy = mpn_add_n (qp, tp + in, rp + dn - in, in); /* I's msb implicit */ - ASSERT_ALWAYS (cy == 0); /* FIXME */ + ASSERT_ALWAYS (cy == 0); + + qn -= in; /* Compute the product of the quotient block and the divisor D, to be subtracted from the partial remainder combined with new limbs from the - dividend N. We only really need the low dn limbs. */ -#if WANT_FFT - if (ABOVE_THRESHOLD (dn, MUL_FFT_MODF_THRESHOLD)) - { - /* Use the wrap-around trick. */ - mp_size_t m, wn; - int k; - - k = mpn_fft_best_k (dn + 1, 0); - m = mpn_fft_next_size (dn + 1, k); - wn = dn + in - m; /* number of wrapped limbs */ - - mpn_mul_fft (tp, m, dp, dn, qp, in, k); + dividend N. We only really need the low dn+1 limbs. */ + if (BELOW_THRESHOLD (in, MUL_TO_MULMOD_BNM1_FOR_2NXN_THRESHOLD)) + mpn_mul (tp, dp, dn, qp, in); /* dn+in limbs, high 'in' cancels */ + else + { + tn = mpn_mulmod_bnm1_next_size (dn + 1); + mpn_mulmod_bnm1 (tp, tn, dp, dn, qp, in, scratch_out); + wn = dn + in - tn; /* number of wrapped limbs */ if (wn > 0) { - cy = mpn_add_n (tp, tp, rp + dn - wn, wn); - mpn_incr_u (tp + wn, cy); - - cy = mpn_cmp (rp + dn - in, tp + dn, m - dn) < 0; - mpn_decr_u (tp, cy); + cy = mpn_sub_n (tp, tp, rp + dn - wn, wn); + cy = mpn_sub_1 (tp + wn, tp + wn, tn - wn, cy); + cx = mpn_cmp (rp + dn - in, tp + dn, tn - dn) < 0; + ASSERT_ALWAYS (cx >= cy); + mpn_incr_u (tp, cx - cy); } } - else -#endif - mpn_mul (tp, dp, dn, qp, in); /* dn+in limbs, high 'in' cancels */ r = rp[dn - in] - tp[dn]; @@ -352,112 +341,65 @@ printf ("\n"); } ); - - qn -= in; } -} -#define THRES 100 /* FIXME: somewhat arbitrary */ - -#ifdef CHECK -#undef THRES -#define THRES 1 -#endif + return qh; +} -mp_limb_t -mpn_mu_div_qr (mp_ptr qp, - mp_ptr rp, - mp_ptr np, - mp_size_t nn, - mp_srcptr dp, - mp_size_t dn, - mp_ptr scratch) +/* In case k=0 (automatic choice), we distinguish 3 cases: + (a) dn < qn: in = ceil(qn / ceil(qn/dn)) + (b) dn/3 < qn <= dn: in = ceil(qn / 2) + (c) qn < dn/3: in = qn + In all cases we have in <= dn. + */ +mp_size_t +mpn_mu_div_qr_choose_in (mp_size_t qn, mp_size_t dn, int k) { - mp_size_t qn; + mp_size_t in; - qn = nn - dn; - if (qn + THRES < dn) + if (k == 0) { - /* |______________|________| dividend nn - |_______|________| divisor dn - - |______| quotient (prel) qn - - |_______________| quotient * ignored-part-of(divisor) dn-1 - */ - - mp_limb_t cy, x; - - if (mpn_cmp (np + nn - (qn + 1), dp + dn - (qn + 1), qn + 1) >= 0) + mp_size_t b; + if (qn > dn) { - /* Quotient is 111...111, could optimize this rare case at some point. */ - mpn_mu_div_qr2 (qp, rp, np, nn, dp, dn, scratch); - return 0; + /* Compute an inverse size that is a nice partition of the quotient. */ + b = (qn - 1) / dn + 1; /* ceil(qn/dn), number of blocks */ + in = (qn - 1) / b + 1; /* ceil(qn/b) = ceil(qn / ceil(qn/dn)) */ + } + else if (3 * qn > dn) + { + in = (qn - 1) / 2 + 1; /* b = 2 */ } - - /* Compute a preliminary quotient and a partial remainder by dividing the - most significant limbs of each operand. */ - mpn_mu_div_qr2 (qp, rp + nn - (2 * qn + 1), - np + nn - (2 * qn + 1), 2 * qn + 1, - dp + dn - (qn + 1), qn + 1, - scratch); - - /* Multiply the quotient by the divisor limbs ignored above. */ - if (dn - (qn + 1) > qn) - mpn_mul (scratch, dp, dn - (qn + 1), qp, qn); /* prod is dn-1 limbs */ else - mpn_mul (scratch, qp, qn, dp, dn - (qn + 1)); /* prod is dn-1 limbs */ - - cy = mpn_sub_n (rp, np, scratch, nn - (2 * qn + 1)); - cy = mpn_sub_nc (rp + nn - (2 * qn + 1), - rp + nn - (2 * qn + 1), - scratch + nn - (2 * qn + 1), - qn, cy); - x = rp[dn - 1]; - rp[dn - 1] = x - cy; - if (cy > x) { - mpn_decr_u (qp, 1); - mpn_add_n (rp, rp, dp, dn); + in = (qn - 1) / 1 + 1; /* b = 1 */ } } else { - return mpn_mu_div_qr2 (qp, rp, np, nn, dp, dn, scratch); + mp_size_t xn; + xn = MIN (dn, qn); + in = (xn - 1) / k + 1; } - return 0; /* FIXME */ + return in; } mp_size_t mpn_mu_div_qr_itch (mp_size_t nn, mp_size_t dn, int mua_k) { - mp_size_t qn, m; - int k; + mp_size_t itch_local = mpn_mulmod_bnm1_next_size (dn + 1); + mp_size_t in = mpn_mu_div_qr_choose_in (nn - dn, dn, mua_k); + mp_size_t itch_out = mpn_mulmod_bnm1_itch (itch_local, dn, in); - /* FIXME: This isn't very carefully written, and might grossly overestimate - the amount of scratch needed, and might perhaps also underestimate it, - leading to potential buffer overruns. In particular k=0 might lead to - gross overestimates. */ + return in + itch_local + itch_out; +} - if (dn == 1) - return nn; +mp_size_t +mpn_preinv_mu_div_qr_itch (mp_size_t nn, mp_size_t dn, mp_size_t in) +{ + mp_size_t itch_local = mpn_mulmod_bnm1_next_size (dn + 1); + mp_size_t itch_out = mpn_mulmod_bnm1_itch (itch_local, dn, in); - qn = nn - dn; - if (qn >= dn) - { - k = mpn_fft_best_k (dn + 1, 0); - m = mpn_fft_next_size (dn + 1, k); - return (mua_k <= 1 - ? 6 * dn - : m + 2 * dn); - } - else - { - k = mpn_fft_best_k (dn + 1, 0); - m = mpn_fft_next_size (dn + 1, k); - return (mua_k <= 1 - ? m + 4 * qn - : m + 2 * qn); - } + return itch_local + itch_out; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mul_basecase.c gmp-5.0.2+dfsg/mpn/generic/mul_basecase.c --- gmp-4.3.2+dfsg/mpn/generic/mul_basecase.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mul_basecase.c 2011-05-08 09:49:29.000000000 +0000 @@ -33,7 +33,7 @@ Note that prodp gets usize+vsize limbs stored, even if the actual result only needs usize+vsize-1. - There's no good reason to call here with vsize>=MUL_KARATSUBA_THRESHOLD. + There's no good reason to call here with vsize>=MUL_TOOM22_THRESHOLD. Currently this is allowed, but it might not be in the future. This is the most critical code for multiplication. All multiplies rely diff -Nru gmp-4.3.2+dfsg/mpn/generic/mul.c gmp-5.0.2+dfsg/mpn/generic/mul.c --- gmp-4.3.2+dfsg/mpn/generic/mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -3,7 +3,7 @@ Contributed to the GNU project by Torbjorn Granlund. Copyright 1991, 1993, 1994, 1996, 1997, 1999, 2000, 2001, 2002, 2003, 2005, -2006, 2007 Free Software Foundation, Inc. +2006, 2007, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -28,6 +28,9 @@ #define MUL_BASECASE_MAX_UN 500 #endif +#define TOOM33_OK(an,bn) (6 + 2 * an < 3 * bn) +#define TOOM44_OK(an,bn) (12 + 3 * an < 4 * bn) + /* Multiply the natural numbers u (pointed to by UP, with UN limbs) and v (pointed to by VP, with VN limbs), and store the result at PRODP. The result is UN + VN limbs. Return the most significant limb of the result. @@ -40,6 +43,34 @@ 2. PRODP != UP and PRODP != VP, i.e. the destination must be distinct from the multiplier and the multiplicand. */ +/* + * The cutoff lines in the toomX2 and toomX3 code are now exactly between the + ideal lines of the surrounding algorithms. Is that optimal? + + * The toomX3 code now uses a structure similar to the one of toomX2, except + that it loops longer in the unbalanced case. The result is that the + remaining area might have un < vn. Should we fix the toomX2 code in a + similar way? + + * The toomX3 code is used for the largest non-FFT unbalanced operands. It + therefore calls mpn_mul recursively for certain cases. + + * Allocate static temp space using THRESHOLD variables (except for toom44 + when !WANT_FFT). That way, we can typically have no TMP_ALLOC at all. + + * We sort ToomX2 algorithms together, assuming the toom22, toom32, toom42 + have the same vn threshold. This is not true, we should actually use + mul_basecase for slightly larger operands for toom32 than for toom22, and + even larger for toom42. + + * That problem is even more prevalent for toomX3. We therefore use special + THRESHOLD variables there. + + * Is our ITCH allocation correct? +*/ + +#define ITCH (16*vn + 100) + mp_limb_t mpn_mul (mp_ptr prodp, mp_srcptr up, mp_size_t un, @@ -53,13 +84,11 @@ if (un == vn) { if (up == vp) - mpn_sqr_n (prodp, up, un); + mpn_sqr (prodp, up, un); else mpn_mul_n (prodp, up, vp, un); - return prodp[2 * un - 1]; } - - if (vn < MUL_KARATSUBA_THRESHOLD) + else if (vn < MUL_TOOM22_THRESHOLD) { /* plain schoolbook multiplication */ /* Unless un is very large, or else if have an applicable mpn_mul_N, @@ -98,9 +127,9 @@ The parts marked with X are the parts whose sums are copied into the temporary buffer. */ - mp_limb_t tp[MUL_KARATSUBA_THRESHOLD_LIMIT]; + mp_limb_t tp[MUL_TOOM22_THRESHOLD_LIMIT]; mp_limb_t cy; - ASSERT (MUL_KARATSUBA_THRESHOLD <= MUL_KARATSUBA_THRESHOLD_LIMIT); + ASSERT (MUL_TOOM22_THRESHOLD <= MUL_TOOM22_THRESHOLD_LIMIT); mpn_mul_basecase (prodp, up, MUL_BASECASE_MAX_UN, vp, vn); prodp += MUL_BASECASE_MAX_UN; @@ -111,7 +140,7 @@ { mpn_mul_basecase (prodp, up, MUL_BASECASE_MAX_UN, vp, vn); cy = mpn_add_n (prodp, prodp, tp, vn); /* add back preserved triangle */ - mpn_incr_u (prodp + vn, cy); /* safe? */ + mpn_incr_u (prodp + vn, cy); prodp += MUL_BASECASE_MAX_UN; MPN_COPY (tp, prodp, vn); /* preserve high triangle */ up += MUL_BASECASE_MAX_UN; @@ -123,100 +152,233 @@ } else { - ASSERT_ALWAYS (un > 0); + ASSERT (un > 0); mpn_mul_basecase (prodp, vp, vn, up, un); } cy = mpn_add_n (prodp, prodp, tp, vn); /* add back preserved triangle */ - mpn_incr_u (prodp + vn, cy); /* safe? */ + mpn_incr_u (prodp + vn, cy); } - return prodp[un + vn - 1]; } + else if (BELOW_THRESHOLD (vn, MUL_TOOM33_THRESHOLD)) + { + /* Use ToomX2 variants */ + mp_ptr scratch; + TMP_SDECL; TMP_SMARK; + + scratch = TMP_SALLOC_LIMBS (ITCH); + + /* FIXME: This condition (repeated in the loop below) leaves from a vn*vn + square to a (3vn-1)*vn rectangle. Leaving such a rectangle is hardly + wise; we would get better balance by slightly moving the bound. We + will sometimes end up with un < vn, like the the X3 arm below. */ + if (un >= 3 * vn) + { + mp_limb_t cy; + mp_ptr ws; + + /* The maximum ws usage is for the mpn_mul result. */ + ws = TMP_SALLOC_LIMBS (4 * vn); + + mpn_toom42_mul (prodp, up, 2 * vn, vp, vn, scratch); + un -= 2 * vn; + up += 2 * vn; + prodp += 2 * vn; + + while (un >= 3 * vn) + { + mpn_toom42_mul (ws, up, 2 * vn, vp, vn, scratch); + un -= 2 * vn; + up += 2 * vn; + cy = mpn_add_n (prodp, prodp, ws, vn); + MPN_COPY (prodp + vn, ws + vn, 2 * vn); + mpn_incr_u (prodp + vn, cy); + prodp += 2 * vn; + } - if (ABOVE_THRESHOLD ((un + vn) >> 1, MUL_FFT_THRESHOLD) && - ABOVE_THRESHOLD (vn, MUL_FFT_THRESHOLD / 3)) /* FIXME */ + /* vn <= un < 3vn */ + + if (4 * un < 5 * vn) + mpn_toom22_mul (ws, up, un, vp, vn, scratch); + else if (4 * un < 7 * vn) + mpn_toom32_mul (ws, up, un, vp, vn, scratch); + else + mpn_toom42_mul (ws, up, un, vp, vn, scratch); + + cy = mpn_add_n (prodp, prodp, ws, vn); + MPN_COPY (prodp + vn, ws + vn, un); + mpn_incr_u (prodp + vn, cy); + } + else + { + if (4 * un < 5 * vn) + mpn_toom22_mul (prodp, up, un, vp, vn, scratch); + else if (4 * un < 7 * vn) + mpn_toom32_mul (prodp, up, un, vp, vn, scratch); + else + mpn_toom42_mul (prodp, up, un, vp, vn, scratch); + } + TMP_SFREE; + } + else if (BELOW_THRESHOLD ((un + vn) >> 1, MUL_FFT_THRESHOLD) || + BELOW_THRESHOLD (3 * vn, MUL_FFT_THRESHOLD)) { - mpn_mul_fft_full (prodp, up, un, vp, vn); - return prodp[un + vn - 1]; + /* Handle the largest operands that are not in the FFT range. The 2nd + condition makes very unbalanced operands avoid the FFT code (except + perhaps as coefficient products of the Toom code. */ + + if (BELOW_THRESHOLD (vn, MUL_TOOM44_THRESHOLD) || !TOOM44_OK (un, vn)) + { + /* Use ToomX3 variants */ + mp_ptr scratch; + TMP_SDECL; TMP_SMARK; + + scratch = TMP_SALLOC_LIMBS (ITCH); + + if (2 * un >= 5 * vn) + { + mp_limb_t cy; + mp_ptr ws; + + /* The maximum ws usage is for the mpn_mul result. */ + ws = TMP_SALLOC_LIMBS (7 * vn >> 1); + + if (BELOW_THRESHOLD (vn, MUL_TOOM42_TO_TOOM63_THRESHOLD)) + mpn_toom42_mul (prodp, up, 2 * vn, vp, vn, scratch); + else + mpn_toom63_mul (prodp, up, 2 * vn, vp, vn, scratch); + un -= 2 * vn; + up += 2 * vn; + prodp += 2 * vn; + + while (2 * un >= 5 * vn) /* un >= 2.5vn */ + { + if (BELOW_THRESHOLD (vn, MUL_TOOM42_TO_TOOM63_THRESHOLD)) + mpn_toom42_mul (ws, up, 2 * vn, vp, vn, scratch); + else + mpn_toom63_mul (ws, up, 2 * vn, vp, vn, scratch); + un -= 2 * vn; + up += 2 * vn; + cy = mpn_add_n (prodp, prodp, ws, vn); + MPN_COPY (prodp + vn, ws + vn, 2 * vn); + mpn_incr_u (prodp + vn, cy); + prodp += 2 * vn; + } + + /* vn / 2 <= un < 2.5vn */ + + if (un < vn) + mpn_mul (ws, vp, vn, up, un); + else + mpn_mul (ws, up, un, vp, vn); + + cy = mpn_add_n (prodp, prodp, ws, vn); + MPN_COPY (prodp + vn, ws + vn, un); + mpn_incr_u (prodp + vn, cy); + } + else + { + if (6 * un < 7 * vn) + mpn_toom33_mul (prodp, up, un, vp, vn, scratch); + else if (2 * un < 3 * vn) + { + if (BELOW_THRESHOLD (vn, MUL_TOOM32_TO_TOOM43_THRESHOLD)) + mpn_toom32_mul (prodp, up, un, vp, vn, scratch); + else + mpn_toom43_mul (prodp, up, un, vp, vn, scratch); + } + else if (6 * un < 11 * vn) + { + if (4 * un < 7 * vn) + { + if (BELOW_THRESHOLD (vn, MUL_TOOM32_TO_TOOM53_THRESHOLD)) + mpn_toom32_mul (prodp, up, un, vp, vn, scratch); + else + mpn_toom53_mul (prodp, up, un, vp, vn, scratch); + } + else + { + if (BELOW_THRESHOLD (vn, MUL_TOOM42_TO_TOOM53_THRESHOLD)) + mpn_toom42_mul (prodp, up, un, vp, vn, scratch); + else + mpn_toom53_mul (prodp, up, un, vp, vn, scratch); + } + } + else + { + if (BELOW_THRESHOLD (vn, MUL_TOOM42_TO_TOOM63_THRESHOLD)) + mpn_toom42_mul (prodp, up, un, vp, vn, scratch); + else + mpn_toom63_mul (prodp, up, un, vp, vn, scratch); + } + } + TMP_SFREE; + } + else + { + mp_ptr scratch; + TMP_DECL; TMP_MARK; + + if (BELOW_THRESHOLD (vn, MUL_TOOM6H_THRESHOLD)) + { + scratch = TMP_ALLOC_LIMBS (mpn_toom44_mul_itch (un, vn)); + mpn_toom44_mul (prodp, up, un, vp, vn, scratch); + } + else if (BELOW_THRESHOLD (vn, MUL_TOOM8H_THRESHOLD)) + { + scratch = TMP_ALLOC_LIMBS (mpn_toom6h_mul_itch (un, vn)); + mpn_toom6h_mul (prodp, up, un, vp, vn, scratch); + } + else + { + scratch = TMP_ALLOC_LIMBS (mpn_toom8h_mul_itch (un, vn)); + mpn_toom8h_mul (prodp, up, un, vp, vn, scratch); + } + TMP_FREE; + } } + else + { + if (un >= 8 * vn) + { + mp_limb_t cy; + mp_ptr ws; + TMP_DECL; TMP_MARK; - { - mp_ptr ws; - mp_ptr scratch; -#if WANT_ASSERT - mp_ptr ssssp; -#endif - TMP_DECL; - TMP_MARK; + /* The maximum ws usage is for the mpn_mul result. */ + ws = TMP_BALLOC_LIMBS (9 * vn >> 1); -#define WSALL (4 * vn) - ws = TMP_SALLOC_LIMBS (WSALL + 1); + mpn_fft_mul (prodp, up, 3 * vn, vp, vn); + un -= 3 * vn; + up += 3 * vn; + prodp += 3 * vn; -#define ITCH ((un + vn) * 4 + 100) - scratch = TMP_ALLOC_LIMBS (ITCH + 1); -#if WANT_ASSERT - ssssp = scratch + ITCH; - ws[WSALL] = 0xbabecafe; - ssssp[0] = 0xbeef; -#endif + while (2 * un >= 7 * vn) /* un >= 3.5vn */ + { + mpn_fft_mul (ws, up, 3 * vn, vp, vn); + un -= 3 * vn; + up += 3 * vn; + cy = mpn_add_n (prodp, prodp, ws, vn); + MPN_COPY (prodp + vn, ws + vn, 3 * vn); + mpn_incr_u (prodp + vn, cy); + prodp += 3 * vn; + } - if (un >= 3 * vn) - { - mp_limb_t cy; - - mpn_toom42_mul (prodp, up, 2 * vn, vp, vn, scratch); - un -= 2 * vn; - up += 2 * vn; - prodp += 2 * vn; - - while (un >= 3 * vn) - { - mpn_toom42_mul (ws, up, 2 * vn, vp, vn, scratch); - un -= 2 * vn; - up += 2 * vn; - cy = mpn_add_n (prodp, prodp, ws, vn); - MPN_COPY (prodp + vn, ws + vn, 2 * vn); - mpn_incr_u (prodp + vn, cy); - prodp += 2 * vn; - } + /* vn / 2 <= un < 3.5vn */ - if (5 * un > 9 * vn) - { - mpn_toom42_mul (ws, up, un, vp, vn, scratch); - cy = mpn_add_n (prodp, prodp, ws, vn); - MPN_COPY (prodp + vn, ws + vn, un); - mpn_incr_u (prodp + vn, cy); - } - else if (9 * un > 10 * vn) - { - mpn_toom32_mul (ws, up, un, vp, vn, scratch); - cy = mpn_add_n (prodp, prodp, ws, vn); - MPN_COPY (prodp + vn, ws + vn, un); - mpn_incr_u (prodp + vn, cy); - } - else - { - mpn_toom22_mul (ws, up, un, vp, vn, scratch); - cy = mpn_add_n (prodp, prodp, ws, vn); - MPN_COPY (prodp + vn, ws + vn, un); - mpn_incr_u (prodp + vn, cy); - } - - ASSERT (ws[WSALL] == 0xbabecafe); - ASSERT (ssssp[0] == 0xbeef); - TMP_FREE; - return prodp[un + vn - 1]; - } - - if (un * 5 > vn * 9) - mpn_toom42_mul (prodp, up, un, vp, vn, scratch); - else if (9 * un > 10 * vn) - mpn_toom32_mul (prodp, up, un, vp, vn, scratch); - else - mpn_toom22_mul (prodp, up, un, vp, vn, scratch); - - ASSERT (ws[WSALL] == 0xbabecafe); - ASSERT (ssssp[0] == 0xbeef); - TMP_FREE; - return prodp[un + vn - 1]; - } + if (un < vn) + mpn_mul (ws, vp, vn, up, un); + else + mpn_mul (ws, up, un, vp, vn); + + cy = mpn_add_n (prodp, prodp, ws, vn); + MPN_COPY (prodp + vn, ws + vn, un); + mpn_incr_u (prodp + vn, cy); + + TMP_FREE; + } + else + mpn_fft_mul (prodp, up, un, vp, vn); + } + + return prodp[un + vn - 1]; /* historic */ } diff -Nru gmp-4.3.2+dfsg/mpn/generic/mul_fft.c gmp-5.0.2+dfsg/mpn/generic/mul_fft.c --- gmp-4.3.2+dfsg/mpn/generic/mul_fft.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mul_fft.c 2011-05-08 09:49:29.000000000 +0000 @@ -6,8 +6,8 @@ SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 -Free Software Foundation, Inc. +Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, +2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -60,76 +60,79 @@ #include "gmp-impl.h" #ifdef WANT_ADDSUB -#include "generic/addsub_n.c" -#define HAVE_NATIVE_mpn_addsub_n 1 +#include "generic/add_n_sub_n.c" +#define HAVE_NATIVE_mpn_add_n_sub_n 1 #endif static mp_limb_t mpn_mul_fft_internal -__GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, int, int, mp_ptr *, mp_ptr *, - mp_ptr, mp_ptr, mp_size_t, mp_size_t, mp_size_t, int **, mp_ptr, - int)); +__GMP_PROTO ((mp_ptr, mp_size_t, int, mp_ptr *, mp_ptr *, + mp_ptr, mp_ptr, mp_size_t, mp_size_t, mp_size_t, int **, mp_ptr, int)); +static void mpn_mul_fft_decompose +__GMP_PROTO ((mp_ptr, mp_ptr *, int, int, mp_srcptr, mp_size_t, int, int, mp_ptr)); /* Find the best k to use for a mod 2^(m*GMP_NUMB_BITS)+1 FFT for m >= n. - sqr==0 if for a multiply, sqr==1 for a square. - Don't declare it static since it is needed by tuneup. -*/ -#ifdef MUL_FFT_TABLE2 + We have sqr=0 if for a multiply, sqr=1 for a square. + There are three generations of this code; we keep the old ones as long as + some gmp-mparam.h is not updated. */ + + +/*****************************************************************************/ + +#if TUNE_PROGRAM_BUILD || (defined (MUL_FFT_TABLE3) && defined (SQR_FFT_TABLE3)) -#if defined (MUL_FFT_TABLE2_SIZE) && defined (SQR_FFT_TABLE2_SIZE) -#if MUL_FFT_TABLE2_SIZE > SQR_FFT_TABLE2_SIZE -#define FFT_TABLE2_SIZE MUL_FFT_TABLE2_SIZE +#ifndef FFT_TABLE3_SIZE /* When tuning, this is define in gmp-impl.h */ +#if defined (MUL_FFT_TABLE3_SIZE) && defined (SQR_FFT_TABLE3_SIZE) +#if MUL_FFT_TABLE3_SIZE > SQR_FFT_TABLE3_SIZE +#define FFT_TABLE3_SIZE MUL_FFT_TABLE3_SIZE #else -#define FFT_TABLE2_SIZE SQR_FFT_TABLE2_SIZE +#define FFT_TABLE3_SIZE SQR_FFT_TABLE3_SIZE #endif #endif - -#ifndef FFT_TABLE2_SIZE -#define FFT_TABLE2_SIZE 200 #endif -/* FIXME: The format of this should change to need less space. - Perhaps put n and k in the same 32-bit word, with n shifted-down - (k-2) steps, and k using the 4-5 lowest bits. That's possible since - n-1 is highly divisible. - Alternatively, separate n and k out into separate arrays. */ -struct nk { - unsigned int n:27; - unsigned int k:5; -}; +#ifndef FFT_TABLE3_SIZE +#define FFT_TABLE3_SIZE 200 +#endif -static struct nk mpn_fft_table2[2][FFT_TABLE2_SIZE] = +FFT_TABLE_ATTRS struct fft_table_nk mpn_fft_table3[2][FFT_TABLE3_SIZE] = { - MUL_FFT_TABLE2, - SQR_FFT_TABLE2 + MUL_FFT_TABLE3, + SQR_FFT_TABLE3 }; int mpn_fft_best_k (mp_size_t n, int sqr) { - struct nk *tab; + FFT_TABLE_ATTRS struct fft_table_nk *fft_tab, *tab; + mp_size_t tab_n, thres; int last_k; - last_k = 4; - for (tab = mpn_fft_table2[sqr] + 1; ; tab++) - { - if (n < tab->n) + fft_tab = mpn_fft_table3[sqr]; + last_k = fft_tab->k; + for (tab = fft_tab + 1; ; tab++) + { + tab_n = tab->n; + thres = tab_n << last_k; + if (n <= thres) break; last_k = tab->k; } return last_k; } + +#define MPN_FFT_BEST_READY 1 #endif -#if !defined (MUL_FFT_TABLE2) || TUNE_PROGRAM_BUILD +/*****************************************************************************/ + +#if ! defined (MPN_FFT_BEST_READY) FFT_TABLE_ATTRS mp_size_t mpn_fft_table[2][MPN_FFT_TABLE_SIZE] = { MUL_FFT_TABLE, SQR_FFT_TABLE }; -#endif -#if !defined (MUL_FFT_TABLE2) int mpn_fft_best_k (mp_size_t n, int sqr) { @@ -147,6 +150,9 @@ } #endif +/*****************************************************************************/ + + /* Returns smallest possible number of limbs >= pl for a fft of size 2^k, i.e. smallest multiple of 2^k >= pl. @@ -180,65 +186,26 @@ } } -/* Shift {up, n} of cnt bits to the left, store the complemented result - in {rp, n}, and output the shifted bits (not complemented). - Same as: - cc = mpn_lshift (rp, up, n, cnt); - mpn_com_n (rp, rp, n); - return cc; - Assumes n >= 1, 1 < cnt < GMP_NUMB_BITS, rp >= up. -*/ -#ifndef HAVE_NATIVE_mpn_lshiftc -#undef mpn_lshiftc -static mp_limb_t -mpn_lshiftc (mp_ptr rp, mp_srcptr up, mp_size_t n, unsigned int cnt) -{ - mp_limb_t high_limb, low_limb; - unsigned int tnc; - mp_size_t i; - mp_limb_t retval; - - up += n; - rp += n; - - tnc = GMP_NUMB_BITS - cnt; - low_limb = *--up; - retval = low_limb >> tnc; - high_limb = (low_limb << cnt); - - for (i = n - 1; i != 0; i--) - { - low_limb = *--up; - *--rp = (~(high_limb | (low_limb >> tnc))) & GMP_NUMB_MASK; - high_limb = low_limb << cnt; - } - *--rp = (~high_limb) & GMP_NUMB_MASK; - - return retval; -} -#endif - -/* r <- a*2^e mod 2^(n*GMP_NUMB_BITS)+1 with a = {a, n+1} +/* r <- a*2^d mod 2^(n*GMP_NUMB_BITS)+1 with a = {a, n+1} Assumes a is semi-normalized, i.e. a[n] <= 1. r and a must have n+1 limbs, and not overlap. */ static void mpn_fft_mul_2exp_modF (mp_ptr r, mp_srcptr a, unsigned int d, mp_size_t n) { - int sh, negate; + int sh; mp_limb_t cc, rd; sh = d % GMP_NUMB_BITS; d /= GMP_NUMB_BITS; - negate = d >= n; - if (negate) - d -= n; - if (negate) + if (d >= n) /* negate */ { /* r[0..d-1] <-- lshift(a[n-d]..a[n-1], sh) r[d..n-1] <-- -lshift(a[0]..a[n-d-1], sh) */ + + d -= n; if (sh != 0) { /* no out shift below since a[n] <= 1 */ @@ -250,7 +217,7 @@ { MPN_COPY (r, a + n - d, d); rd = a[n]; - mpn_com_n (r + d, a, n - d); + mpn_com (r + d, a, n - d); cc = 0; } @@ -263,54 +230,52 @@ cc++; mpn_incr_u (r, cc); - rd ++; + rd++; /* rd might overflow when sh=GMP_NUMB_BITS-1 */ cc = (rd == 0) ? 1 : rd; r = r + d + (rd == 0); mpn_incr_u (r, cc); - - return; - } - - /* if negate=0, - r[0..d-1] <-- -lshift(a[n-d]..a[n-1], sh) - r[d..n-1] <-- lshift(a[0]..a[n-d-1], sh) - */ - if (sh != 0) - { - /* no out bits below since a[n] <= 1 */ - mpn_lshiftc (r, a + n - d, d + 1, sh); - rd = ~r[d]; - /* {r, d+1} = {a+n-d, d+1} << sh */ - cc = mpn_lshift (r + d, a, n - d, sh); /* {r+d, n-d} = {a, n-d}<= (sqr ? SQR_FFT_MODF_THRESHOLD : MUL_FFT_MODF_THRESHOLD)) { int k, K2, nprime2, Nprime2, M2, maxLK, l, Mp2; - int **_fft_l; + int **fft_l; mp_ptr *Ap, *Bp, A, B, T; k = mpn_fft_best_k (n, sqr); @@ -497,23 +462,30 @@ Ap = TMP_ALLOC_MP_PTRS (K2); Bp = TMP_ALLOC_MP_PTRS (K2); - A = TMP_ALLOC_LIMBS (2 * K2 * (nprime2 + 1)); + A = TMP_ALLOC_LIMBS (2 * (nprime2 + 1) << k); T = TMP_ALLOC_LIMBS (2 * (nprime2 + 1)); - B = A + K2 * (nprime2 + 1); - _fft_l = TMP_ALLOC_TYPE (k + 1, int *); + B = A + ((nprime2 + 1) << k); + fft_l = TMP_ALLOC_TYPE (k + 1, int *); for (i = 0; i <= k; i++) - _fft_l[i] = TMP_ALLOC_TYPE (1< %d times %dx%d (%1.2f)\n", n, n, K2, nprime2, nprime2, 2.0*(double)n/nprime2/K2)); for (i = 0; i < K; i++, ap++, bp++) { + mp_limb_t cy; mpn_fft_normalize (*ap, n); if (!sqr) mpn_fft_normalize (*bp, n); - mpn_mul_fft_internal (*ap, *ap, *bp, n, k, K2, Ap, Bp, A, B, nprime2, - l, Mp2, _fft_l, T, 1); + + mpn_mul_fft_decompose (A, Ap, K2, nprime2, *ap, (l << k) + 1, l, Mp2, T); + if (!sqr) + mpn_mul_fft_decompose (B, Bp, K2, nprime2, *bp, (l << k) + 1, l, Mp2, T); + + cy = mpn_mul_fft_internal (*ap, n, k, Ap, Bp, A, B, nprime2, + l, Mp2, fft_l, T, sqr); + (*ap)[n] = cy; } } else @@ -529,7 +501,7 @@ a = *ap++; b = *bp++; if (sqr) - mpn_sqr_n (tp, a, n); + mpn_sqr (tp, a, n); else mpn_mul_n (tp, b, a, n); if (a[n] != 0) @@ -562,8 +534,8 @@ if (K == 2) { mp_limb_t cy; -#if HAVE_NATIVE_mpn_addsub_n - cy = mpn_addsub_n (Ap[0], Ap[1], Ap[0], Ap[1], n + 1) & 1; +#if HAVE_NATIVE_mpn_add_n_sub_n + cy = mpn_add_n_sub_n (Ap[0], Ap[1], Ap[0], Ap[1], n + 1) & 1; #else MPN_COPY (tp, Ap[0], n + 1); mpn_add_n (Ap[0], Ap[0], Ap[1], n + 1); @@ -594,15 +566,14 @@ } -/* A <- A/2^k mod 2^(n*GMP_NUMB_BITS)+1 */ +/* R <- A/2^k mod 2^(n*GMP_NUMB_BITS)+1 */ static void mpn_fft_div_2exp_modF (mp_ptr r, mp_srcptr a, int k, mp_size_t n) { int i; ASSERT (r != a); - i = 2 * n * GMP_NUMB_BITS; - i = (i - k) % i; /* FIXME: This % looks superfluous */ + i = 2 * n * GMP_NUMB_BITS - k; mpn_fft_mul_2exp_modF (r, a, i, n); /* 1/2^k = 2^(2nL-k) mod 2^(n*GMP_NUMB_BITS)+1 */ /* normalize so that R < 2^(n*GMP_NUMB_BITS)+1 */ @@ -730,48 +701,30 @@ } /* op <- n*m mod 2^N+1 with fft of size 2^k where N=pl*GMP_NUMB_BITS - n and m have respectively nl and ml limbs - op must have space for pl+1 limbs if rec=1 (and pl limbs if rec=0). + op is pl limbs, its high bit is returned. One must have pl = mpn_fft_next_size (pl, k). T must have space for 2 * (nprime + 1) limbs. - - If rec=0, then store only the pl low bits of the result, and return - the out carry. */ static mp_limb_t -mpn_mul_fft_internal (mp_ptr op, mp_srcptr n, mp_srcptr m, mp_size_t pl, - int k, int K, - mp_ptr *Ap, mp_ptr *Bp, - mp_ptr A, mp_ptr B, +mpn_mul_fft_internal (mp_ptr op, mp_size_t pl, int k, + mp_ptr *Ap, mp_ptr *Bp, mp_ptr A, mp_ptr B, mp_size_t nprime, mp_size_t l, mp_size_t Mp, - int **_fft_l, - mp_ptr T, int rec) + int **fft_l, mp_ptr T, int sqr) { - int i, sqr, pla, lo, sh, j; + int K, i, pla, lo, sh, j; mp_ptr p; mp_limb_t cc; - sqr = n == m; - - TRACE (printf ("pl=%ld k=%d K=%d np=%ld l=%ld Mp=%ld rec=%d sqr=%d\n", - pl,k,K,nprime,l,Mp,rec,sqr)); - - /* decomposition of inputs into arrays Ap[i] and Bp[i] */ - if (rec) - { - mpn_mul_fft_decompose (A, Ap, K, nprime, n, K * l + 1, l, Mp, T); - if (!sqr) - mpn_mul_fft_decompose (B, Bp, K, nprime, m, K * l + 1, l, Mp, T); - } + K = 1 << k; /* direct fft's */ - mpn_fft_fft (Ap, K, _fft_l + k, 2 * Mp, nprime, 1, T); + mpn_fft_fft (Ap, K, fft_l + k, 2 * Mp, nprime, 1, T); if (!sqr) - mpn_fft_fft (Bp, K, _fft_l + k, 2 * Mp, nprime, 1, T); + mpn_fft_fft (Bp, K, fft_l + k, 2 * Mp, nprime, 1, T); /* term to term multiplications */ - mpn_fft_mul_modF_K (Ap, (sqr) ? Ap : Bp, nprime, K); + mpn_fft_mul_modF_K (Ap, sqr ? Ap : Bp, nprime, K); /* inverse fft's */ mpn_fft_fftinv (Ap, K, 2 * Mp, nprime, T); @@ -835,11 +788,7 @@ /* here p < 2^(2M) [K 2^(M(K-1)) + (K-1) 2^(M(K-2)) + ... ] < K 2^(2M) [2^(M(K-1)) + 2^(M(K-2)) + ... ] < K 2^(2M) 2^(M(K-1))*2 = 2^(M*K+M+k+1) */ - i = mpn_fft_norm_modF (op, pl, p, pla); - if (rec) /* store the carry out */ - op[pl] = i; - - return i; + return mpn_fft_norm_modF (op, pl, p, pla); } /* return the lcm of a and 2^k */ @@ -866,7 +815,7 @@ int K, maxLK, i; mp_size_t N, Nprime, nprime, M, Mp, l; mp_ptr *Ap, *Bp, A, T, B; - int **_fft_l; + int **fft_l; int sqr = (n == m && nl == ml); mp_limb_t h; TMP_DECL; @@ -876,10 +825,10 @@ TMP_MARK; N = pl * GMP_NUMB_BITS; - _fft_l = TMP_ALLOC_TYPE (k + 1, int *); + fft_l = TMP_ALLOC_TYPE (k + 1, int *); for (i = 0; i <= k; i++) - _fft_l[i] = TMP_ALLOC_TYPE (1 << i, int); - mpn_fft_initl (_fft_l, k); + fft_l[i] = TMP_ALLOC_TYPE (1 << i, int); + mpn_fft_initl (fft_l, k); K = 1 << k; M = N >> k; /* N = 2^k M */ l = 1 + (M - 1) / GMP_NUMB_BITS; @@ -914,25 +863,29 @@ pl, pl, K, nprime, nprime, 2.0 * (double) N / Nprime / K); printf (" temp space %ld\n", 2 * K * (nprime + 1))); - A = __GMP_ALLOCATE_FUNC_LIMBS (2 * K * (nprime + 1)); - B = A + K * (nprime + 1); + A = TMP_ALLOC_LIMBS (K * (nprime + 1)); Ap = TMP_ALLOC_MP_PTRS (K); - Bp = TMP_ALLOC_MP_PTRS (K); - - /* special decomposition for main call */ - /* nl is the number of significant limbs in n */ mpn_mul_fft_decompose (A, Ap, K, nprime, n, nl, l, Mp, T); - if (n != m) - mpn_mul_fft_decompose (B, Bp, K, nprime, m, ml, l, Mp, T); - - h = mpn_mul_fft_internal (op, n, m, pl, k, K, Ap, Bp, A, B, nprime, l, Mp, _fft_l, T, 0); + if (sqr) + { + mp_size_t pla; + pla = l * (K - 1) + nprime + 1; /* number of required limbs for p */ + B = TMP_ALLOC_LIMBS (pla); + Bp = TMP_ALLOC_MP_PTRS (K); + } + else + { + B = TMP_ALLOC_LIMBS (K * (nprime + 1)); + Bp = TMP_ALLOC_MP_PTRS (K); + mpn_mul_fft_decompose (B, Bp, K, nprime, m, ml, l, Mp, T); + } + h = mpn_mul_fft_internal (op, pl, k, Ap, Bp, A, B, nprime, l, Mp, fft_l, T, sqr); TMP_FREE; - __GMP_FREE_FUNC_LIMBS (A, 2 * K * (nprime + 1)); - return h; } +#if WANT_OLD_FFT_FULL /* multiply {n, nl} by {m, ml}, and put the result in {op, nl+ml} */ void mpn_mul_fft_full (mp_ptr op, @@ -960,7 +913,7 @@ pl2 = (2 * pl - 1) / 5; /* ceil (2pl/5) - 1 */ do { - pl2 ++; + pl2++; k2 = mpn_fft_best_k (pl2, sqr); /* best fft size for pl2 limbs */ pl2 = mpn_fft_next_size (pl2, k2); pl3 = 3 * pl2 / 2; /* since k>=FFT_FIRST_K=4, pl2 is a multiple of 2^4, @@ -974,23 +927,23 @@ ASSERT_ALWAYS(pl3 <= pl); cc = mpn_mul_fft (op, pl3, n, nl, m, ml, k3); /* mu */ - ASSERT_ALWAYS(cc == 0); + ASSERT(cc == 0); pad_op = __GMP_ALLOCATE_FUNC_LIMBS (pl2); cc = mpn_mul_fft (pad_op, pl2, n, nl, m, ml, k2); /* lambda */ cc = -cc + mpn_sub_n (pad_op, pad_op, op, pl2); /* lambda - low(mu) */ /* 0 <= cc <= 1 */ - ASSERT_ALWAYS(0 <= cc && cc <= 1); + ASSERT(0 <= cc && cc <= 1); l = pl3 - pl2; /* l = pl2 / 2 since pl3 = 3/2 * pl2 */ c2 = mpn_add_n (pad_op, pad_op, op + pl2, l); cc = mpn_add_1 (pad_op + l, pad_op + l, l, (mp_limb_t) c2) - cc; - ASSERT_ALWAYS(-1 <= cc && cc <= 1); + ASSERT(-1 <= cc && cc <= 1); if (cc < 0) cc = mpn_add_1 (pad_op, pad_op, pl2, (mp_limb_t) -cc); - ASSERT_ALWAYS(0 <= cc && cc <= 1); + ASSERT(0 <= cc && cc <= 1); /* now lambda-mu = {pad_op, pl2} - cc mod 2^(pl2*GMP_NUMB_BITS)+1 */ oldcc = cc; -#if HAVE_NATIVE_mpn_addsub_n - c2 = mpn_addsub_n (pad_op + l, pad_op, pad_op, pad_op + l, l); +#if HAVE_NATIVE_mpn_add_n_sub_n + c2 = mpn_add_n_sub_n (pad_op + l, pad_op, pad_op, pad_op + l, l); /* c2 & 1 is the borrow, c2 & 2 is the carry */ cc += c2 >> 1; /* carry out from high <- low + high */ c2 = c2 & 1; /* borrow out from low <- low - high */ @@ -1036,3 +989,4 @@ /* since the final result has at most pl limbs, no carry out below */ mpn_add_1 (op + pl2, op + pl2, pl - pl2, (mp_limb_t) c2); } +#endif diff -Nru gmp-4.3.2+dfsg/mpn/generic/mullo_basecase.c gmp-5.0.2+dfsg/mpn/generic/mullo_basecase.c --- gmp-4.3.2+dfsg/mpn/generic/mullo_basecase.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mullo_basecase.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,41 @@ +/* mpn_mullo_basecase -- Internal routine to multiply two natural + numbers of length m and n and return the low part. + + THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH THIS FUNCTION THROUGH DOCUMENTED INTERFACES. + + +Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +/* + FIXME: Should use mpn_addmul_2 (and higher). +*/ + +void +mpn_mullo_basecase (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +{ + mp_size_t i; + + mpn_mul_1 (rp, up, n, vp[0]); + + for (i = 1; i < n; i++) + mpn_addmul_1 (rp + i, up, n - i, vp[i]); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/mullo_n.c gmp-5.0.2+dfsg/mpn/generic/mullo_n.c --- gmp-4.3.2+dfsg/mpn/generic/mullo_n.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mullo_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,245 @@ +/* mpn_mullo_n -- multiply two n-limb numbers and return the low n limbs + of their products. + + Contributed to the GNU project by Torbjorn Granlund and Marco Bodrato. + + THIS IS (FOR NOW) AN INTERNAL FUNCTION. IT IS ONLY SAFE TO REACH THIS + FUNCTION THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED + THAT IT'LL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2004, 2005, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + + +#ifndef MULLO_BASECASE_THRESHOLD +#define MULLO_BASECASE_THRESHOLD 0 /* never use mpn_mul_basecase */ +#endif + +#ifndef MULLO_DC_THRESHOLD +#define MULLO_DC_THRESHOLD 3*MUL_TOOM22_THRESHOLD +#endif + +#ifndef MULLO_MUL_N_THRESHOLD +#define MULLO_MUL_N_THRESHOLD MUL_FFT_THRESHOLD +#endif + +#if TUNE_PROGRAM_BUILD +#define MAYBE_range_basecase 1 +#define MAYBE_range_toom22 1 +#else +#define MAYBE_range_basecase \ + ((MULLO_DC_THRESHOLD == 0 ? MULLO_BASECASE_THRESHOLD : MULLO_DC_THRESHOLD) < MUL_TOOM22_THRESHOLD*36/(36-11)) +#define MAYBE_range_toom22 \ + ((MULLO_DC_THRESHOLD == 0 ? MULLO_BASECASE_THRESHOLD : MULLO_DC_THRESHOLD) < MUL_TOOM33_THRESHOLD*36/(36-11) ) +#endif + +/* THINK: The DC strategy uses different constants in different Toom's + ranges. Something smoother? +*/ + +/* + Compute the least significant half of the product {xy,n}*{yp,n}, or + formally {rp,n} = {xy,n}*{yp,n} Mod (B^n). + + Above the given threshold, the Divide and Conquer strategy is used. + The operands are split in two, and a full product plus two mullo + are used to obtain the final result. The more natural strategy is to + split in two halves, but this is far from optimal when a + sub-quadratic multiplication is used. + + Mulders suggests an unbalanced split in favour of the full product, + split n = n1 + n2, where an = n1 <= n2 = (1-a)n; i.e. 0 < a <= 1/2. + + To compute the value of a, we assume that the cost of mullo for a + given size ML(n) is a fraction of the cost of a full product with + same size M(n), and the cost M(n)=n^e for some exponent 1 < e <= 2; + then we can write: + + ML(n) = 2*ML(an) + M((1-a)n) => k*M(n) = 2*k*M(n)*a^e + M(n)*(1-a)^e + + Given a value for e, want to minimise the value of k, i.e. the + function k=(1-a)^e/(1-2*a^e). + + With e=2, the exponent for schoolbook multiplication, the minimum is + given by the values a=1-a=1/2. + + With e=log(3)/log(2), the exponent for Karatsuba (aka toom22), + Mulders compute (1-a) = 0.694... and we approximate a with 11/36. + + Other possible approximations follow: + e=log(5)/log(3) [Toom-3] -> a ~= 9/40 + e=log(7)/log(4) [Toom-4] -> a ~= 7/39 + e=log(11)/log(6) [Toom-6] -> a ~= 1/8 + e=log(15)/log(8) [Toom-8] -> a ~= 1/10 + + The values above where obtained with the following trivial commands + in the gp-pari shell: + +fun(e,a)=(1-a)^e/(1-2*a^e) +mul(a,b,c)={local(m,x,p);if(b-c<1/10000,(b+c)/2,m=1;x=b;forstep(p=c,b,(b-c)/8,if(fun(a,p)= 2); + ASSERT (! MPN_OVERLAP_P (rp, n, xp, n)); + ASSERT (! MPN_OVERLAP_P (rp, n, yp, n)); + ASSERT (MPN_SAME_OR_SEPARATE2_P(rp, n, tp, 2*n)); + + /* Divide-and-conquer */ + + /* We need fractional approximation of the value 0 < a <= 1/2 + giving the minimum in the function k=(1-a)^e/(1-2*a^e). + */ + if (MAYBE_range_basecase && BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD*36/(36-11))) + n1 = n >> 1; + else if (MAYBE_range_toom22 && BELOW_THRESHOLD (n, MUL_TOOM33_THRESHOLD*36/(36-11))) + n1 = n * 11 / (size_t) 36; /* n1 ~= n*(1-.694...) */ + else if (BELOW_THRESHOLD (n, MUL_TOOM44_THRESHOLD*40/(40-9))) + n1 = n * 9 / (size_t) 40; /* n1 ~= n*(1-.775...) */ + else if (BELOW_THRESHOLD (n, MUL_TOOM8H_THRESHOLD*10/9)) + n1 = n * 7 / (size_t) 39; /* n1 ~= n*(1-.821...) */ + /* n1 = n * 4 / (size_t) 31; // n1 ~= n*(1-.871...) [TOOM66] */ + else + n1 = n / (size_t) 10; /* n1 ~= n*(1-.899...) [TOOM88] */ + + n2 = n - n1; + + /* Split as x = x1 2^(n2 GMP_NUMB_BITS) + x0, + y = y1 2^(n2 GMP_NUMB_BITS) + y0 */ + + /* x0 * y0 */ + mpn_mul_n (tp, xp, yp, n2); + MPN_COPY (rp, tp, n2); + + /* x1 * y0 * 2^(n2 GMP_NUMB_BITS) */ + if (BELOW_THRESHOLD (n1, MULLO_BASECASE_THRESHOLD)) + mpn_mul_basecase (tp + n, xp + n2, n1, yp, n1); + else if (BELOW_THRESHOLD (n1, MULLO_DC_THRESHOLD)) + mpn_mullo_basecase (tp + n, xp + n2, yp, n1); + else + mpn_dc_mullo_n (tp + n, xp + n2, yp, n1, tp + n); + mpn_add_n (rp + n2, tp + n2, tp + n, n1); + + /* x0 * y1 * 2^(n2 GMP_NUMB_BITS) */ + if (BELOW_THRESHOLD (n1, MULLO_BASECASE_THRESHOLD)) + mpn_mul_basecase (tp + n, xp, n1, yp + n2, n1); + else if (BELOW_THRESHOLD (n1, MULLO_DC_THRESHOLD)) + mpn_mullo_basecase (tp + n, xp, yp + n2, n1); + else + mpn_dc_mullo_n (tp + n, xp, yp + n2, n1, tp + n); + mpn_add_n (rp + n2, rp + n2, tp + n, n1); +} + +/* Avoid zero allocations when MULLO_BASECASE_THRESHOLD is 0. */ +#define MUL_BASECASE_ALLOC \ + (MULLO_BASECASE_THRESHOLD_LIMIT == 0 ? 1 : 2*MULLO_BASECASE_THRESHOLD_LIMIT) + +/* FIXME: This function should accept a temporary area; dc_mullow_n + accepts a pointer tp, and handle the case tp == rp, do the same here. + Maybe recombine the two functions. + THINK: If mpn_mul_basecase is always faster than mpn_mullo_basecase + (typically thanks to mpn_addmul_2) should we unconditionally use + mpn_mul_n? +*/ + +void +mpn_mullo_n (mp_ptr rp, mp_srcptr xp, mp_srcptr yp, mp_size_t n) +{ + ASSERT (n >= 1); + ASSERT (! MPN_OVERLAP_P (rp, n, xp, n)); + ASSERT (! MPN_OVERLAP_P (rp, n, yp, n)); + + if (BELOW_THRESHOLD (n, MULLO_BASECASE_THRESHOLD)) + { + /* Allocate workspace of fixed size on stack: fast! */ + mp_limb_t tp[MUL_BASECASE_ALLOC]; + mpn_mul_basecase (tp, xp, n, yp, n); + MPN_COPY (rp, tp, n); + } + else if (BELOW_THRESHOLD (n, MULLO_DC_THRESHOLD)) + { + mpn_mullo_basecase (rp, xp, yp, n); + } + else + { + mp_ptr tp; + TMP_DECL; + TMP_MARK; + tp = TMP_ALLOC_LIMBS (mpn_mullo_n_itch (n)); + if (BELOW_THRESHOLD (n, MULLO_MUL_N_THRESHOLD)) + { + mpn_dc_mullo_n (rp, xp, yp, n, tp); + } + else + { + /* For really large operands, use plain mpn_mul_n but throw away upper n + limbs of result. */ +#if !TUNE_PROGRAM_BUILD && (MULLO_MUL_N_THRESHOLD > MUL_FFT_THRESHOLD) + mpn_fft_mul (tp, xp, n, yp, n); +#else + mpn_mul_n (tp, xp, yp, n); +#endif + MPN_COPY (rp, tp, n); + } + TMP_FREE; + } +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/mullow_basecase.c gmp-5.0.2+dfsg/mpn/generic/mullow_basecase.c --- gmp-4.3.2+dfsg/mpn/generic/mullow_basecase.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mullow_basecase.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -/* mpn_mullow_basecase -- Internal routine to multiply two natural - numbers of length m and n and return the low part. - - THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE. IT IS ONLY - SAFE TO REACH THIS FUNCTION THROUGH DOCUMENTED INTERFACES. - - -Copyright (C) 2000, 2002, 2004 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - -/* - FIXME: Should use mpn_addmul_2 (and higher). -*/ - -void -mpn_mullow_basecase (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) -{ - mp_size_t i; - - mpn_mul_1 (rp, up, n, vp[0]); - - for (i = 1; i < n; i++) - mpn_addmul_1 (rp + i, up, n - i, vp[i]); -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/mullow_n.c gmp-5.0.2+dfsg/mpn/generic/mullow_n.c --- gmp-4.3.2+dfsg/mpn/generic/mullow_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mullow_n.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,111 +0,0 @@ -/* mpn_mullow_n -- multiply two n-limb nunbers and return the low n limbs - of their products. - - THIS IS (FOR NOW) AN INTERNAL FUNCTION. IT IS ONLY SAFE TO REACH THIS - FUNCTION THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED - THAT IT'LL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. - -Copyright 2004, 2005 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - - -#ifndef MULLOW_BASECASE_THRESHOLD -#define MULLOW_BASECASE_THRESHOLD 0 /* never use mpn_mul_basecase */ -#endif - -#ifndef MULLOW_DC_THRESHOLD -#define MULLOW_DC_THRESHOLD 3*MUL_KARATSUBA_THRESHOLD -#endif - -#ifndef MULLOW_MUL_N_THRESHOLD -#define MULLOW_MUL_N_THRESHOLD 10*MULLOW_DC_THRESHOLD -#endif - -/* Avoid zero allocations when MULLOW_BASECASE_THRESHOLD is 0. */ -#define MUL_BASECASE_ALLOC \ - (MULLOW_BASECASE_THRESHOLD_LIMIT == 0 ? 1 : 2*MULLOW_BASECASE_THRESHOLD_LIMIT) - -/* - FIXME: This function should accept a temporary area. - FIXME: Perhaps call mpn_kara_mul_n instead of mpn_mul_n? - THINK: If mpn_mul_basecase is always faster than mpn_mullow_basecase - (typically thanks to mpn_addmul_2) should we unconditionally use - mpn_mul_n? - FIXME: The recursive calls to mpn_mullow_n use sizes n/2 (one uses floor(n/2) - and the other ceil(n/2)). Depending on the values of the various - _THRESHOLDs, this may never trigger MULLOW_BASECASE_THRESHOLD. - Should we worry about this overhead? -*/ - -void -mpn_mullow_n (mp_ptr rp, mp_srcptr xp, mp_srcptr yp, mp_size_t n) -{ - if (BELOW_THRESHOLD (n, MULLOW_BASECASE_THRESHOLD)) - { - /* Allocate workspace of fixed size on stack: fast! */ - mp_limb_t ws[MUL_BASECASE_ALLOC]; - mpn_mul_basecase (ws, xp, n, yp, n); - MPN_COPY (rp, ws, n); - } - else if (BELOW_THRESHOLD (n, MULLOW_DC_THRESHOLD)) - { - mpn_mullow_basecase (rp, xp, yp, n); - } - else if (BELOW_THRESHOLD (n, MULLOW_MUL_N_THRESHOLD)) - { - /* Divide-and-conquer */ - mp_size_t n2 = n >> 1; /* floor(n/2) */ - mp_size_t n1 = n - n2; /* ceil(n/2) */ - mp_ptr tp; - TMP_SDECL; - TMP_SMARK; - tp = TMP_SALLOC_LIMBS (n1); - - /* Split as x = x1 2^(n1 GMP_NUMB_BITS) + x0, - y = y1 2^(n2 GMP_NUMB_BITS) + y0 */ - - /* x0 * y0 */ - mpn_mul_n (rp, xp, yp, n2); - if (n1 != n2) - rp[2 * n2] = mpn_addmul_1 (rp + n2, yp, n2, xp[n2]); - - /* x1 * y0 * 2^(n1 GMP_NUMB_BITS) */ - mpn_mullow_n (tp, xp + n1, yp, n2); - mpn_add_n (rp + n1, rp + n1, tp, n2); - - /* x0 * y1 * 2^(n2 GMP_NUMB_BITS) */ - mpn_mullow_n (tp, yp + n2, xp, n1); - mpn_add_n (rp + n2, rp + n2, tp, n1); - TMP_SFREE; - } - else - { - /* For really large operands, use plain mpn_mul_n but throw away upper n - limbs of result. */ - mp_ptr tp; - TMP_DECL; - TMP_MARK; - tp = TMP_ALLOC_LIMBS (2 * n); - - mpn_mul_n (tp, xp, yp, n); - MPN_COPY (rp, tp, n); - TMP_FREE; - } -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/mulmod_bnm1.c gmp-5.0.2+dfsg/mpn/generic/mulmod_bnm1.c --- gmp-4.3.2+dfsg/mpn/generic/mulmod_bnm1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mulmod_bnm1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,351 @@ +/* mulmod_bnm1.c -- multiplication mod B^n-1. + + Contributed to the GNU project by Niels Möller, Torbjorn Granlund and + Marco Bodrato. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +/* Inputs are {ap,rn} and {bp,rn}; output is {rp,rn}, computation is + mod B^rn - 1, and values are semi-normalised; zero is represented + as either 0 or B^n - 1. Needs a scratch of 2rn limbs at tp. + tp==rp is allowed. */ +void +mpn_bc_mulmod_bnm1 (mp_ptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t rn, + mp_ptr tp) +{ + mp_limb_t cy; + + ASSERT (0 < rn); + + mpn_mul_n (tp, ap, bp, rn); + cy = mpn_add_n (rp, tp, tp + rn, rn); + /* If cy == 1, then the value of rp is at most B^rn - 2, so there can + * be no overflow when adding in the carry. */ + MPN_INCR_U (rp, rn, cy); +} + + +/* Inputs are {ap,rn+1} and {bp,rn+1}; output is {rp,rn+1}, in + semi-normalised representation, computation is mod B^rn + 1. Needs + a scratch area of 2rn + 2 limbs at tp; tp == rp is allowed. + Output is normalised. */ +static void +mpn_bc_mulmod_bnp1 (mp_ptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t rn, + mp_ptr tp) +{ + mp_limb_t cy; + + ASSERT (0 < rn); + + mpn_mul_n (tp, ap, bp, rn + 1); + ASSERT (tp[2*rn+1] == 0); + ASSERT (tp[2*rn] < GMP_NUMB_MAX); + cy = tp[2*rn] + mpn_sub_n (rp, tp, tp+rn, rn); + rp[rn] = 0; + MPN_INCR_U (rp, rn+1, cy ); +} + + +/* Computes {rp,MIN(rn,an+bn)} <- {ap,an}*{bp,bn} Mod(B^rn-1) + * + * The result is expected to be ZERO if and only if one of the operand + * already is. Otherwise the class [0] Mod(B^rn-1) is represented by + * B^rn-1. This should not be a problem if mulmod_bnm1 is used to + * combine results and obtain a natural number when one knows in + * advance that the final value is less than (B^rn-1). + * Moreover it should not be a problem if mulmod_bnm1 is used to + * compute the full product with an+bn <= rn, because this condition + * implies (B^an-1)(B^bn-1) < (B^rn-1) . + * + * Requires 0 < bn <= an <= rn and an + bn > rn/2 + * Scratch need: rn + (need for recursive call OR rn + 4). This gives + * + * S(n) <= rn + MAX (rn + 4, S(n/2)) <= 2rn + 4 + */ +void +mpn_mulmod_bnm1 (mp_ptr rp, mp_size_t rn, mp_srcptr ap, mp_size_t an, mp_srcptr bp, mp_size_t bn, mp_ptr tp) +{ + ASSERT (0 < bn); + ASSERT (bn <= an); + ASSERT (an <= rn); + + if ((rn & 1) != 0 || BELOW_THRESHOLD (rn, MULMOD_BNM1_THRESHOLD)) + { + if (UNLIKELY (bn < rn)) + { + if (UNLIKELY (an + bn <= rn)) + { + mpn_mul (rp, ap, an, bp, bn); + } + else + { + mp_limb_t cy; + mpn_mul (tp, ap, an, bp, bn); + cy = mpn_add (rp, tp, rn, tp + rn, an + bn - rn); + MPN_INCR_U (rp, rn, cy); + } + } + else + mpn_bc_mulmod_bnm1 (rp, ap, bp, rn, tp); + } + else + { + mp_size_t n; + mp_limb_t cy; + mp_limb_t hi; + + n = rn >> 1; + + /* We need at least an + bn >= n, to be able to fit one of the + recursive products at rp. Requiring strict inequality makes + the coded slightly simpler. If desired, we could avoid this + restriction by initially halving rn as long as rn is even and + an + bn <= rn/2. */ + + ASSERT (an + bn > n); + + /* Compute xm = a*b mod (B^n - 1), xp = a*b mod (B^n + 1) + and crt together as + + x = -xp * B^n + (B^n + 1) * [ (xp + xm)/2 mod (B^n-1)] + */ + +#define a0 ap +#define a1 (ap + n) +#define b0 bp +#define b1 (bp + n) + +#define xp tp /* 2n + 2 */ + /* am1 maybe in {xp, n} */ + /* bm1 maybe in {xp + n, n} */ +#define sp1 (tp + 2*n + 2) + /* ap1 maybe in {sp1, n + 1} */ + /* bp1 maybe in {sp1 + n + 1, n + 1} */ + + { + mp_srcptr am1, bm1; + mp_size_t anm, bnm; + mp_ptr so; + + if (LIKELY (an > n)) + { + am1 = xp; + cy = mpn_add (xp, a0, n, a1, an - n); + MPN_INCR_U (xp, n, cy); + anm = n; + if (LIKELY (bn > n)) + { + bm1 = xp + n; + cy = mpn_add (xp + n, b0, n, b1, bn - n); + MPN_INCR_U (xp + n, n, cy); + bnm = n; + so = xp + 2*n; + } + else + { + so = xp + n; + bm1 = b0; + bnm = bn; + } + } + else + { + so = xp; + am1 = a0; + anm = an; + bm1 = b0; + bnm = bn; + } + + mpn_mulmod_bnm1 (rp, n, am1, anm, bm1, bnm, so); + } + + { + int k; + mp_srcptr ap1, bp1; + mp_size_t anp, bnp; + + if (LIKELY (an > n)) { + ap1 = sp1; + cy = mpn_sub (sp1, a0, n, a1, an - n); + sp1[n] = 0; + MPN_INCR_U (sp1, n + 1, cy); + anp = n + ap1[n]; + } else { + ap1 = a0; + anp = an; + } + + if (LIKELY (bn > n)) { + bp1 = sp1 + n + 1; + cy = mpn_sub (sp1 + n + 1, b0, n, b1, bn - n); + sp1[2*n+1] = 0; + MPN_INCR_U (sp1 + n + 1, n + 1, cy); + bnp = n + bp1[n]; + } else { + bp1 = b0; + bnp = bn; + } + + if (BELOW_THRESHOLD (n, MUL_FFT_MODF_THRESHOLD)) + k=0; + else + { + int mask; + k = mpn_fft_best_k (n, 0); + mask = (1<>=1;}; + } + if (k >= FFT_FIRST_K) + xp[n] = mpn_mul_fft (xp, n, ap1, anp, bp1, bnp, k); + else if (UNLIKELY (bp1 == b0)) + { + ASSERT (anp + bnp <= 2*n+1); + ASSERT (anp + bnp > n); + ASSERT (anp >= bnp); + mpn_mul (xp, ap1, anp, bp1, bnp); + anp = anp + bnp - n; + ASSERT (anp <= n || xp[2*n]==0); + anp-= anp > n; + cy = mpn_sub (xp, xp, n, xp + n, anp); + xp[n] = 0; + MPN_INCR_U (xp, n+1, cy); + } + else + mpn_bc_mulmod_bnp1 (xp, ap1, bp1, n, xp); + } + + /* Here the CRT recomposition begins. + + xm <- (xp + xm)/2 = (xp + xm)B^n/2 mod (B^n-1) + Division by 2 is a bitwise rotation. + + Assumes xp normalised mod (B^n+1). + + The residue class [0] is represented by [B^n-1]; except when + both input are ZERO. + */ + +#if HAVE_NATIVE_mpn_rsh1add_n || HAVE_NATIVE_mpn_rsh1add_nc +#if HAVE_NATIVE_mpn_rsh1add_nc + cy = mpn_rsh1add_nc(rp, rp, xp, n, xp[n]); /* B^n = 1 */ + hi = cy << (GMP_NUMB_BITS - 1); + cy = 0; + /* next update of rp[n-1] will set cy = 1 only if rp[n-1]+=hi + overflows, i.e. a further increment will not overflow again. */ +#else /* ! _nc */ + cy = xp[n] + mpn_rsh1add_n(rp, rp, xp, n); /* B^n = 1 */ + hi = (cy<<(GMP_NUMB_BITS-1))&GMP_NUMB_MASK; /* (cy&1) << ... */ + cy >>= 1; + /* cy = 1 only if xp[n] = 1 i.e. {xp,n} = ZERO, this implies that + the rsh1add was a simple rshift: the top bit is 0. cy=1 => hi=0. */ +#endif +#if GMP_NAIL_BITS == 0 + add_ssaaaa(cy, rp[n-1], cy, rp[n-1], 0, hi); +#else + cy += (hi & rp[n-1]) >> (GMP_NUMB_BITS-1); + rp[n-1] ^= hi; +#endif +#else /* ! HAVE_NATIVE_mpn_rsh1add_n */ +#if HAVE_NATIVE_mpn_add_nc + cy = mpn_add_nc(rp, rp, xp, n, xp[n]); +#else /* ! _nc */ + cy = xp[n] + mpn_add_n(rp, rp, xp, n); /* xp[n] == 1 implies {xp,n} == ZERO */ +#endif + cy += (rp[0]&1); + mpn_rshift(rp, rp, n, 1); + ASSERT (cy <= 2); + hi = (cy<<(GMP_NUMB_BITS-1))&GMP_NUMB_MASK; /* (cy&1) << ... */ + cy >>= 1; + /* We can have cy != 0 only if hi = 0... */ + ASSERT ((rp[n-1] & GMP_NUMB_HIGHBIT) == 0); + rp[n-1] |= hi; + /* ... rp[n-1] + cy can not overflow, the following INCR is correct. */ +#endif + ASSERT (cy <= 1); + /* Next increment can not overflow, read the previous comments about cy. */ + ASSERT ((cy == 0) || ((rp[n-1] & GMP_NUMB_HIGHBIT) == 0)); + MPN_INCR_U(rp, n, cy); + + /* Compute the highest half: + ([(xp + xm)/2 mod (B^n-1)] - xp ) * B^n + */ + if (UNLIKELY (an + bn < rn)) + { + /* Note that in this case, the only way the result can equal + zero mod B^{rn} - 1 is if one of the inputs is zero, and + then the output of both the recursive calls and this CRT + reconstruction is zero, not B^{rn} - 1. Which is good, + since the latter representation doesn't fit in the output + area.*/ + cy = mpn_sub_n (rp + n, rp, xp, an + bn - n); + + /* FIXME: This subtraction of the high parts is not really + necessary, we do it to get the carry out, and for sanity + checking. */ + cy = xp[n] + mpn_sub_nc (xp + an + bn - n, rp + an + bn - n, + xp + an + bn - n, rn - (an + bn), cy); + ASSERT (an + bn == rn - 1 || + mpn_zero_p (xp + an + bn - n + 1, rn - 1 - (an + bn))); + cy = mpn_sub_1 (rp, rp, an + bn, cy); + ASSERT (cy == (xp + an + bn - n)[0]); + } + else + { + cy = xp[n] + mpn_sub_n (rp + n, rp, xp, n); + /* cy = 1 only if {xp,n+1} is not ZERO, i.e. {rp,n} is not ZERO. + DECR will affect _at most_ the lowest n limbs. */ + MPN_DECR_U (rp, 2*n, cy); + } +#undef a0 +#undef a1 +#undef b0 +#undef b1 +#undef xp +#undef sp1 + } +} + +mp_size_t +mpn_mulmod_bnm1_next_size (mp_size_t n) +{ + mp_size_t nh; + + if (BELOW_THRESHOLD (n, MULMOD_BNM1_THRESHOLD)) + return n; + if (BELOW_THRESHOLD (n, 4 * (MULMOD_BNM1_THRESHOLD - 1) + 1)) + return (n + (2-1)) & (-2); + if (BELOW_THRESHOLD (n, 8 * (MULMOD_BNM1_THRESHOLD - 1) + 1)) + return (n + (4-1)) & (-4); + + nh = (n + 1) >> 1; + + if (BELOW_THRESHOLD (nh, MUL_FFT_MODF_THRESHOLD)) + return (n + (8-1)) & (-8); + + return 2 * mpn_fft_next_size (nh, mpn_fft_best_k (nh, 0)); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/mul_n.c gmp-5.0.2+dfsg/mpn/generic/mul_n.c --- gmp-4.3.2+dfsg/mpn/generic/mul_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/mul_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,12 +1,7 @@ -/* mpn_mul_n and helper function -- Multiply/square natural numbers. - - THE HELPER FUNCTIONS IN THIS FILE (meaning everything except mpn_mul_n) ARE - INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY SAFE TO REACH THEM THROUGH - DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT THEY'LL CHANGE - OR DISAPPEAR IN A FUTURE GNU MP RELEASE. +/* mpn_mul_n -- multiply natural numbers. Copyright 1991, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, -2005 Free Software Foundation, Inc. +2005, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -27,669 +22,6 @@ #include "gmp-impl.h" #include "longlong.h" - -/* Multiplies using 3 half-sized mults and so on recursively. - * p[0..2*n-1] := product of a[0..n-1] and b[0..n-1]. - * No overlap of p[...] with a[...] or b[...]. - * ws is workspace. - */ - -void -mpn_kara_mul_n (mp_ptr p, mp_srcptr a, mp_srcptr b, mp_size_t n, mp_ptr ws) -{ - mp_limb_t w, w0, w1; - mp_size_t n2; - mp_srcptr x, y; - mp_size_t i; - int sign; - - n2 = n >> 1; - ASSERT (n2 > 0); - - if ((n & 1) != 0) - { - /* Odd length. */ - mp_size_t n1, n3, nm1; - - n3 = n - n2; - - sign = 0; - w = a[n2]; - if (w != 0) - w -= mpn_sub_n (p, a, a + n3, n2); - else - { - i = n2; - do - { - --i; - w0 = a[i]; - w1 = a[n3 + i]; - } - while (w0 == w1 && i != 0); - if (w0 < w1) - { - x = a + n3; - y = a; - sign = ~0; - } - else - { - x = a; - y = a + n3; - } - mpn_sub_n (p, x, y, n2); - } - p[n2] = w; - - w = b[n2]; - if (w != 0) - w -= mpn_sub_n (p + n3, b, b + n3, n2); - else - { - i = n2; - do - { - --i; - w0 = b[i]; - w1 = b[n3 + i]; - } - while (w0 == w1 && i != 0); - if (w0 < w1) - { - x = b + n3; - y = b; - sign = ~sign; - } - else - { - x = b; - y = b + n3; - } - mpn_sub_n (p + n3, x, y, n2); - } - p[n] = w; - - n1 = n + 1; - if (n2 < MUL_KARATSUBA_THRESHOLD) - { - if (n3 < MUL_KARATSUBA_THRESHOLD) - { - mpn_mul_basecase (ws, p, n3, p + n3, n3); - mpn_mul_basecase (p, a, n3, b, n3); - } - else - { - mpn_kara_mul_n (ws, p, p + n3, n3, ws + n1); - mpn_kara_mul_n (p, a, b, n3, ws + n1); - } - mpn_mul_basecase (p + n1, a + n3, n2, b + n3, n2); - } - else - { - mpn_kara_mul_n (ws, p, p + n3, n3, ws + n1); - mpn_kara_mul_n (p, a, b, n3, ws + n1); - mpn_kara_mul_n (p + n1, a + n3, b + n3, n2, ws + n1); - } - - if (sign) - mpn_add_n (ws, p, ws, n1); - else - mpn_sub_n (ws, p, ws, n1); - - nm1 = n - 1; - if (mpn_add_n (ws, p + n1, ws, nm1)) - { - mp_limb_t x = (ws[nm1] + 1) & GMP_NUMB_MASK; - ws[nm1] = x; - if (x == 0) - ws[n] = (ws[n] + 1) & GMP_NUMB_MASK; - } - if (mpn_add_n (p + n3, p + n3, ws, n1)) - { - mpn_incr_u (p + n1 + n3, 1); - } - } - else - { - /* Even length. */ - i = n2; - do - { - --i; - w0 = a[i]; - w1 = a[n2 + i]; - } - while (w0 == w1 && i != 0); - sign = 0; - if (w0 < w1) - { - x = a + n2; - y = a; - sign = ~0; - } - else - { - x = a; - y = a + n2; - } - mpn_sub_n (p, x, y, n2); - - i = n2; - do - { - --i; - w0 = b[i]; - w1 = b[n2 + i]; - } - while (w0 == w1 && i != 0); - if (w0 < w1) - { - x = b + n2; - y = b; - sign = ~sign; - } - else - { - x = b; - y = b + n2; - } - mpn_sub_n (p + n2, x, y, n2); - - /* Pointwise products. */ - if (n2 < MUL_KARATSUBA_THRESHOLD) - { - mpn_mul_basecase (ws, p, n2, p + n2, n2); - mpn_mul_basecase (p, a, n2, b, n2); - mpn_mul_basecase (p + n, a + n2, n2, b + n2, n2); - } - else - { - mpn_kara_mul_n (ws, p, p + n2, n2, ws + n); - mpn_kara_mul_n (p, a, b, n2, ws + n); - mpn_kara_mul_n (p + n, a + n2, b + n2, n2, ws + n); - } - - /* Interpolate. */ - if (sign) - w = mpn_add_n (ws, p, ws, n); - else - w = -mpn_sub_n (ws, p, ws, n); - w += mpn_add_n (ws, p + n, ws, n); - w += mpn_add_n (p + n2, p + n2, ws, n); - MPN_INCR_U (p + n2 + n, 2 * n - (n2 + n), w); - } -} - -void -mpn_kara_sqr_n (mp_ptr p, mp_srcptr a, mp_size_t n, mp_ptr ws) -{ - mp_limb_t w, w0, w1; - mp_size_t n2; - mp_srcptr x, y; - mp_size_t i; - - n2 = n >> 1; - ASSERT (n2 > 0); - - if ((n & 1) != 0) - { - /* Odd length. */ - mp_size_t n1, n3, nm1; - - n3 = n - n2; - - w = a[n2]; - if (w != 0) - w -= mpn_sub_n (p, a, a + n3, n2); - else - { - i = n2; - do - { - --i; - w0 = a[i]; - w1 = a[n3 + i]; - } - while (w0 == w1 && i != 0); - if (w0 < w1) - { - x = a + n3; - y = a; - } - else - { - x = a; - y = a + n3; - } - mpn_sub_n (p, x, y, n2); - } - p[n2] = w; - - n1 = n + 1; - - /* n2 is always either n3 or n3-1 so maybe the two sets of tests here - could be combined. But that's not important, since the tests will - take a miniscule amount of time compared to the function calls. */ - if (BELOW_THRESHOLD (n3, SQR_BASECASE_THRESHOLD)) - { - mpn_mul_basecase (ws, p, n3, p, n3); - mpn_mul_basecase (p, a, n3, a, n3); - } - else if (BELOW_THRESHOLD (n3, SQR_KARATSUBA_THRESHOLD)) - { - mpn_sqr_basecase (ws, p, n3); - mpn_sqr_basecase (p, a, n3); - } - else - { - mpn_kara_sqr_n (ws, p, n3, ws + n1); /* (x-y)^2 */ - mpn_kara_sqr_n (p, a, n3, ws + n1); /* x^2 */ - } - if (BELOW_THRESHOLD (n2, SQR_BASECASE_THRESHOLD)) - mpn_mul_basecase (p + n1, a + n3, n2, a + n3, n2); - else if (BELOW_THRESHOLD (n2, SQR_KARATSUBA_THRESHOLD)) - mpn_sqr_basecase (p + n1, a + n3, n2); - else - mpn_kara_sqr_n (p + n1, a + n3, n2, ws + n1); /* y^2 */ - - /* Since x^2+y^2-(x-y)^2 = 2xy >= 0 there's no need to track the - borrow from mpn_sub_n. If it occurs then it'll be cancelled by a - carry from ws[n]. Further, since 2xy fits in n1 limbs there won't - be any carry out of ws[n] other than cancelling that borrow. */ - - mpn_sub_n (ws, p, ws, n1); /* x^2-(x-y)^2 */ - - nm1 = n - 1; - if (mpn_add_n (ws, p + n1, ws, nm1)) /* x^2+y^2-(x-y)^2 = 2xy */ - { - mp_limb_t x = (ws[nm1] + 1) & GMP_NUMB_MASK; - ws[nm1] = x; - if (x == 0) - ws[n] = (ws[n] + 1) & GMP_NUMB_MASK; - } - if (mpn_add_n (p + n3, p + n3, ws, n1)) - { - mpn_incr_u (p + n1 + n3, 1); - } - } - else - { - /* Even length. */ - i = n2; - do - { - --i; - w0 = a[i]; - w1 = a[n2 + i]; - } - while (w0 == w1 && i != 0); - if (w0 < w1) - { - x = a + n2; - y = a; - } - else - { - x = a; - y = a + n2; - } - mpn_sub_n (p, x, y, n2); - - /* Pointwise products. */ - if (BELOW_THRESHOLD (n2, SQR_BASECASE_THRESHOLD)) - { - mpn_mul_basecase (ws, p, n2, p, n2); - mpn_mul_basecase (p, a, n2, a, n2); - mpn_mul_basecase (p + n, a + n2, n2, a + n2, n2); - } - else if (BELOW_THRESHOLD (n2, SQR_KARATSUBA_THRESHOLD)) - { - mpn_sqr_basecase (ws, p, n2); - mpn_sqr_basecase (p, a, n2); - mpn_sqr_basecase (p + n, a + n2, n2); - } - else - { - mpn_kara_sqr_n (ws, p, n2, ws + n); - mpn_kara_sqr_n (p, a, n2, ws + n); - mpn_kara_sqr_n (p + n, a + n2, n2, ws + n); - } - - /* Interpolate. */ - w = -mpn_sub_n (ws, p, ws, n); - w += mpn_add_n (ws, p + n, ws, n); - w += mpn_add_n (p + n2, p + n2, ws, n); - MPN_INCR_U (p + n2 + n, 2 * n - (n2 + n), w); - } -} - -/****************************************************************************** - * * - * Toom 3-way multiplication and squaring * - * * - *****************************************************************************/ - -/* Starts from: - {v0,2k} (stored in {c,2k}) - {vm1,2k+1} (which sign is sa, and absolute value is stored in {vm1,2k+1}) - {v1,2k+1} (stored in {c+2k,2k+1}) - {v2,2k+1} - {vinf,twor} (stored in {c+4k,twor}, except the first limb, saved in vinf0) - - ws is temporary space, and should have at least twor limbs. - - put in {c, 2n} where n = 2k+twor the value of {v0,2k} (already in place) - + B^k * {tm1, 2k+1} - + B^(2k) * {t1, 2k+1} - + B^(3k) * {t2, 2k+1} - + B^(4k) * {vinf,twor} (high twor-1 limbs already in place) - where {t1, 2k+1} = ({v1, 2k+1} + sa * {vm1, 2k+1}- 2*{v0,2k})/2-*{vinf,twor} - {t2, 2k+1} = (3*({v1,2k+1}-{v0,2k})-sa*{vm1,2k+1}+{v2,2k+1})/6-2*{vinf,twor} - {tm1,2k+1} = ({v1,2k+1}-sa*{vm1,2k+1}/2-{t2,2k+1} - - Exact sequence described in a comment in mpn_toom3_mul_n. - mpn_toom3_mul_n() and mpn_toom3_sqr_n() implement steps 1-2. - mpn_toom_interpolate_5pts() implements steps 3-4. - - Reference: What About Toom-Cook Matrices Optimality? Marco Bodrato - and Alberto Zanoni, October 19, 2006, http://bodrato.it/papers/#CIVV2006 - - ************* saved note **************** - Think about: - - The evaluated point a-b+c stands a good chance of having a zero carry - limb, a+b+c would have a 1/4 chance, and 4*a+2*b+c a 1/8 chance, roughly. - Perhaps this could be tested and stripped. Doing so before recursing - would be better than stripping at the start of mpn_toom3_mul_n/sqr_n, - since then the recursion could be based on the new size. Although in - truth the kara vs toom3 crossover is never so exact that one limb either - way makes a difference. - - A small value like 1 or 2 for the carry could perhaps also be handled - with an add_n or addlsh1_n. Would that be faster than an extra limb on a - (recursed) multiply/square? -*/ - -#define TOOM3_MUL_REC(p, a, b, n, ws) \ - do { \ - if (MUL_TOOM3_THRESHOLD / 3 < MUL_KARATSUBA_THRESHOLD \ - && BELOW_THRESHOLD (n, MUL_KARATSUBA_THRESHOLD)) \ - mpn_mul_basecase (p, a, n, b, n); \ - else if (BELOW_THRESHOLD (n, MUL_TOOM3_THRESHOLD)) \ - mpn_kara_mul_n (p, a, b, n, ws); \ - else \ - mpn_toom3_mul_n (p, a, b, n, ws); \ - } while (0) - -#define TOOM3_SQR_REC(p, a, n, ws) \ - do { \ - if (SQR_TOOM3_THRESHOLD / 3 < SQR_BASECASE_THRESHOLD \ - && BELOW_THRESHOLD (n, SQR_BASECASE_THRESHOLD)) \ - mpn_mul_basecase (p, a, n, a, n); \ - else if (SQR_TOOM3_THRESHOLD / 3 < SQR_KARATSUBA_THRESHOLD \ - && BELOW_THRESHOLD (n, SQR_KARATSUBA_THRESHOLD)) \ - mpn_sqr_basecase (p, a, n); \ - else if (BELOW_THRESHOLD (n, SQR_TOOM3_THRESHOLD)) \ - mpn_kara_sqr_n (p, a, n, ws); \ - else \ - mpn_toom3_sqr_n (p, a, n, ws); \ - } while (0) - -/* The necessary temporary space T(n) satisfies T(n)=0 for n < THRESHOLD, - and T(n) <= max(2n+2, 6k+3, 4k+3+T(k+1)) otherwise, where k = ceil(n/3). - - Assuming T(n) >= 2n, 6k+3 <= 4k+3+T(k+1). - Similarly, 2n+2 <= 6k+2 <= 4k+3+T(k+1). - - With T(n) = 2n+S(n), this simplifies to S(n) <= 9 + S(k+1). - Since THRESHOLD >= 17, we have n/(k+1) >= 19/8 - thus S(n) <= S(n/(19/8)) + 9 thus S(n) <= 9*log(n)/log(19/8) <= 8*log2(n). -*/ - -void -mpn_toom3_mul_n (mp_ptr c, mp_srcptr a, mp_srcptr b, mp_size_t n, mp_ptr t) -{ - mp_size_t k, k1, kk1, r, twok, twor; - mp_limb_t cy, cc, saved, vinf0; - mp_ptr trec; - int sa, sb; - mp_ptr c1, c2, c3, c4, c5; - - ASSERT(GMP_NUMB_BITS >= 6); - ASSERT(n >= 17); /* so that r <> 0 and 5k+3 <= 2n */ - - /* - The algorithm is the following: - - 0. k = ceil(n/3), r = n - 2k, B = 2^(GMP_NUMB_BITS), t = B^k - 1. split a and b in three parts each a0, a1, a2 and b0, b1, b2 - with a0, a1, b0, b1 of k limbs, and a2, b2 of r limbs - 2. Evaluation: vm1 may be negative, the other can not. - v0 <- a0*b0 - v1 <- (a0+a1+a2)*(b0+b1+b2) - v2 <- (a0+2*a1+4*a2)*(b0+2*b1+4*b2) - vm1 <- (a0-a1+a2)*(b0-b1+b2) - vinf <- a2*b2 - 3. Interpolation: every result is positive, all divisions are exact - t2 <- (v2 - vm1)/3 - tm1 <- (v1 - vm1)/2 - t1 <- (v1 - v0) - t2 <- (t2 - t1)/2 - t1 <- (t1 - tm1 - vinf) - t2 <- (t2 - 2*vinf) - tm1 <- (tm1 - t2) - 4. result is c0+c1*t+c2*t^2+c3*t^3+c4*t^4 where - c0 <- v0 - c1 <- tm1 - c2 <- t1 - c3 <- t2 - c4 <- vinf - */ - - k = (n + 2) / 3; /* ceil(n/3) */ - twok = 2 * k; - k1 = k + 1; - kk1 = k + k1; - r = n - twok; /* last chunk */ - twor = 2 * r; - - c1 = c + k; - c2 = c1 + k; - c3 = c2 + k; - c4 = c3 + k; - c5 = c4 + k; - - trec = t + 4 * k + 3; /* trec = v2 + (2k+2) */ - - /* put a0+a2 in {c, k+1}, and b0+b2 in {c+4k+2, k+1}; - put a0+a1+a2 in {t, k+1} and b0+b1+b2 in {t+k+1,k+1} - [????requires 5k+3 <= 2n, ie. n >= 9] */ - cy = mpn_add_n (c, a, a + twok, r); - cc = mpn_add_n (c4 + 2, b, b + twok, r); - if (r < k) - { - __GMPN_ADD_1 (cy, c + r, a + r, k - r, cy); - __GMPN_ADD_1 (cc, c4 + 2 + r, b + r, k - r, cc); - } - - /* Put in {t, k+1} the sum - * (a_0+a_2) - stored in {c, k+1} - - * + - * a_1 - stored in {a+k, k} */ - t[k] = (c1[0] = cy) + mpn_add_n (t, c, a + k, k); - /* ^ ^ - * carry of a_0 + a_2 carry of (a_0+a_2) + a_1 - - */ - - /* Put in {t+k+1, k+1} the sum of the two values - * (b_0+b_2) - stored in {c1+1, k+1} - - * + - * b_1 - stored in {b+k, k} */ - t[kk1] = (c5[3] = cc) + mpn_add_n (t + k1, c4 + 2, b + k, k); - /* ^ ^ - * carry of b_0 + b_2 carry of (b_0+b_2) + b_1 */ - -#define v2 (t+2*k+1) - - /* compute v1 := (a0+a1+a2)*(b0+b1+b2) in {t, 2k+1}; - since v1 < 9*B^(2k), v1 uses only 2k+1 words if GMP_NUMB_BITS >= 4 */ - TOOM3_MUL_REC (c2, t, t + k1, k1, trec); - - /* c c2 c4 t - {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} - v1 */ - - /* put |a0-a1+a2| in {c, k+1} and |b0-b1+b2| in {c+4k+2,k+1} */ - /* (They're already there, actually) */ - - /* sa = sign(a0-a1+a2) */ - sa = (cy != 0) ? 1 : mpn_cmp (c, a + k, k); - c[k] = (sa >= 0) ? cy - mpn_sub_n (c, c, a + k, k) - : mpn_sub_n (c, a + k, c, k); - - sb = (cc != 0) ? 1 : mpn_cmp (c4 + 2, b + k, k); - c5[2] = (sb >= 0) ? cc - mpn_sub_n (c4 + 2, c4 + 2, b + k, k) - : mpn_sub_n (c4 + 2, b + k, c4 + 2, k); - sa *= sb; /* sign of vm1 */ - - /* compute vm1 := (a0-a1+a2)*(b0-b1+b2) in {t, 2k+1}; - since |vm1| < 4*B^(2k), vm1 uses only 2k+1 limbs */ - TOOM3_MUL_REC (t, c, c4 + 2, k1, trec); - - /* {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} - v1 vm1 - */ - - /* compute a0+2a1+4a2 in {c, k+1} and b0+2b1+4b2 in {c+4k+2, k+1} - [requires 5k+3 <= 2n, i.e. n >= 17] */ -#ifdef HAVE_NATIVE_mpn_addlsh1_n - c1[0] = mpn_addlsh1_n (c, a + k, a + twok, r); - c5[2] = mpn_addlsh1_n (c4 + 2, b + k, b + twok, r); - if (r < k) - { - __GMPN_ADD_1 (c1[0], c + r, a + k + r, k - r, c1[0]); - __GMPN_ADD_1 (c5[2], c4 + 2 + r, b + k + r, k - r, c5[2]); - } - c1[0] = 2 * c1[0] + mpn_addlsh1_n (c, a, c, k); - c5[2] = 2 * c5[2] + mpn_addlsh1_n (c4 + 2, b, c4 + 2, k); -#else - c[r] = mpn_lshift (c, a + twok, r, 1); - c4[r + 2] = mpn_lshift (c4 + 2, b + twok, r, 1); - if (r < k) - { - MPN_ZERO(c + r + 1, k - r); - MPN_ZERO(c4 + r + 3, k - r); - } - c1[0] += mpn_add_n (c, c, a + k, k); - c5[2] += mpn_add_n (c4 + 2, c4 + 2, b + k, k); - mpn_lshift (c, c, k1, 1); - mpn_lshift (c4 + 2, c4 + 2, k1, 1); - c1[0] += mpn_add_n (c, c, a, k); - c5[2] += mpn_add_n (c4 + 2, c4 + 2, b, k); -#endif - - /* compute v2 := (a0+2a1+4a2)*(b0+2b1+4b2) in {t+2k+1, 2k+1} - v2 < 49*B^k so v2 uses at most 2k+1 limbs if GMP_NUMB_BITS >= 6 */ - TOOM3_MUL_REC (v2, c, c4 + 2, k1, trec); - - /* {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} - v1 vm1 v2 - */ - - /* compute v0 := a0*b0 in {c, 2k} */ - TOOM3_MUL_REC (c, a, b, k, trec); - - /* {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} - v0 v1 vm1 v2 */ - - /* compute vinf := a2*b2 in {t+4k+2, 2r}: in {c4, 2r} */ - - saved = c4[0]; /* Remember v1's highest byte (will be overwritten). */ - TOOM3_MUL_REC (c4, a + twok, b + twok, r, trec); /* Overwrites c4[0]. */ - vinf0 = c4[0]; /* Remember vinf's lowest byte (will be overwritten).*/ - c4[0] = saved; /* Overwriting. Now v1 value is correct. */ - - /* {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} - v0 v1 vinf[1..] vm1 v2 */ - - mpn_toom_interpolate_5pts (c, v2, t, k, 2*r, sa, vinf0, trec); - -#undef v2 -} - -void -mpn_toom3_sqr_n (mp_ptr c, mp_srcptr a, mp_size_t n, mp_ptr t) -{ - mp_size_t k, k1, kk1, r, twok, twor; - mp_limb_t cy, saved, vinf0; - mp_ptr trec; - int sa; - mp_ptr c1, c2, c3, c4; - - ASSERT(GMP_NUMB_BITS >= 6); - ASSERT(n >= 17); /* so that r <> 0 and 5k+3 <= 2n */ - - /* the algorithm is the same as mpn_toom3_mul_n, with b=a */ - - k = (n + 2) / 3; /* ceil(n/3) */ - twok = 2 * k; - k1 = k + 1; - kk1 = k + k1; - r = n - twok; /* last chunk */ - twor = 2 * r; - - c1 = c + k; - c2 = c1 + k; - c3 = c2 + k; - c4 = c3 + k; - - trec = t + 4 * k + 3; /* trec = v2 + (2k+2) */ - - cy = mpn_add_n (c, a, a + twok, r); - if (r < k) - __GMPN_ADD_1 (cy, c + r, a + r, k - r, cy); - t[k] = (c1[0] = cy) + mpn_add_n (t, c, a + k, k); - -#define v2 (t+2*k+1) - - TOOM3_SQR_REC (c2, t, k1, trec); - - sa = (cy != 0) ? 1 : mpn_cmp (c, a + k, k); - c[k] = (sa >= 0) ? cy - mpn_sub_n (c, c, a + k, k) - : mpn_sub_n (c, a + k, c, k); - - TOOM3_SQR_REC (t, c, k1, trec); - -#ifdef HAVE_NATIVE_mpn_addlsh1_n - c1[0] = mpn_addlsh1_n (c, a + k, a + twok, r); - if (r < k) - __GMPN_ADD_1 (c1[0], c + r, a + k + r, k - r, c1[0]); - c1[0] = 2 * c1[0] + mpn_addlsh1_n (c, a, c, k); -#else - c[r] = mpn_lshift (c, a + twok, r, 1); - if (r < k) - MPN_ZERO(c + r + 1, k - r); - c1[0] += mpn_add_n (c, c, a + k, k); - mpn_lshift (c, c, k1, 1); - c1[0] += mpn_add_n (c, c, a, k); -#endif - - TOOM3_SQR_REC (v2, c, k1, trec); - - TOOM3_SQR_REC (c, a, k, trec); - - saved = c4[0]; - TOOM3_SQR_REC (c4, a + twok, r, trec); - vinf0 = c4[0]; - c4[0] = saved; - - mpn_toom_interpolate_5pts (c, v2, t, k, 2*r, 1, vinf0, trec); - -#undef v2 -} - void mpn_mul_n (mp_ptr p, mp_srcptr a, mp_srcptr b, mp_size_t n) { @@ -697,31 +29,28 @@ ASSERT (! MPN_OVERLAP_P (p, 2 * n, a, n)); ASSERT (! MPN_OVERLAP_P (p, 2 * n, b, n)); - if (BELOW_THRESHOLD (n, MUL_KARATSUBA_THRESHOLD)) + if (BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) { mpn_mul_basecase (p, a, n, b, n); } - else if (BELOW_THRESHOLD (n, MUL_TOOM3_THRESHOLD)) + else if (BELOW_THRESHOLD (n, MUL_TOOM33_THRESHOLD)) { /* Allocate workspace of fixed size on stack: fast! */ - mp_limb_t ws[MPN_KARA_MUL_N_TSIZE (MUL_TOOM3_THRESHOLD_LIMIT-1)]; - ASSERT (MUL_TOOM3_THRESHOLD <= MUL_TOOM3_THRESHOLD_LIMIT); - mpn_kara_mul_n (p, a, b, n, ws); + mp_limb_t ws[mpn_toom22_mul_itch (MUL_TOOM33_THRESHOLD_LIMIT-1, + MUL_TOOM33_THRESHOLD_LIMIT-1)]; + ASSERT (MUL_TOOM33_THRESHOLD <= MUL_TOOM33_THRESHOLD_LIMIT); + mpn_toom22_mul (p, a, n, b, n, ws); } else if (BELOW_THRESHOLD (n, MUL_TOOM44_THRESHOLD)) { mp_ptr ws; TMP_SDECL; TMP_SMARK; - ws = TMP_SALLOC_LIMBS (MPN_TOOM3_MUL_N_TSIZE (n)); - mpn_toom3_mul_n (p, a, b, n, ws); + ws = TMP_SALLOC_LIMBS (mpn_toom33_mul_itch (n, n)); + mpn_toom33_mul (p, a, n, b, n, ws); TMP_SFREE; } -#if WANT_FFT || TUNE_PROGRAM_BUILD - else if (BELOW_THRESHOLD (n, MUL_FFT_THRESHOLD)) -#else - else if (BELOW_THRESHOLD (n, MPN_TOOM44_MAX_N)) -#endif + else if (BELOW_THRESHOLD (n, MUL_TOOM6H_THRESHOLD)) { mp_ptr ws; TMP_SDECL; @@ -730,91 +59,28 @@ mpn_toom44_mul (p, a, n, b, n, ws); TMP_SFREE; } - else -#if WANT_FFT || TUNE_PROGRAM_BUILD - { - /* The current FFT code allocates its own space. That should probably - change. */ - mpn_mul_fft_full (p, a, n, b, n); - } -#else - { - /* Toom4 for large operands. */ - mp_ptr ws; - TMP_DECL; - TMP_MARK; - ws = TMP_BALLOC_LIMBS (mpn_toom44_mul_itch (n, n)); - mpn_toom44_mul (p, a, n, b, n, ws); - TMP_FREE; - } -#endif -} - -void -mpn_sqr (mp_ptr p, mp_srcptr a, mp_size_t n) -{ - ASSERT (n >= 1); - ASSERT (! MPN_OVERLAP_P (p, 2 * n, a, n)); - -#if 0 - /* FIXME: Can this be removed? */ - if (n == 0) - return; -#endif - - if (BELOW_THRESHOLD (n, SQR_BASECASE_THRESHOLD)) - { /* mul_basecase is faster than sqr_basecase on small sizes sometimes */ - mpn_mul_basecase (p, a, n, a, n); - } - else if (BELOW_THRESHOLD (n, SQR_KARATSUBA_THRESHOLD)) - { - mpn_sqr_basecase (p, a, n); - } - else if (BELOW_THRESHOLD (n, SQR_TOOM3_THRESHOLD)) - { - /* Allocate workspace of fixed size on stack: fast! */ - mp_limb_t ws[MPN_KARA_SQR_N_TSIZE (SQR_TOOM3_THRESHOLD_LIMIT-1)]; - ASSERT (SQR_TOOM3_THRESHOLD <= SQR_TOOM3_THRESHOLD_LIMIT); - mpn_kara_sqr_n (p, a, n, ws); - } - else if (BELOW_THRESHOLD (n, SQR_TOOM4_THRESHOLD)) + else if (BELOW_THRESHOLD (n, MUL_TOOM8H_THRESHOLD)) { mp_ptr ws; TMP_SDECL; TMP_SMARK; - ws = TMP_SALLOC_LIMBS (MPN_TOOM3_SQR_N_TSIZE (n)); - mpn_toom3_sqr_n (p, a, n, ws); + ws = TMP_SALLOC_LIMBS (mpn_toom6_mul_n_itch (n)); + mpn_toom6h_mul (p, a, n, b, n, ws); TMP_SFREE; } -#if WANT_FFT || TUNE_PROGRAM_BUILD - else if (BELOW_THRESHOLD (n, SQR_FFT_THRESHOLD)) -#else - else if (BELOW_THRESHOLD (n, MPN_TOOM44_MAX_N)) -#endif + else if (BELOW_THRESHOLD (n, MUL_FFT_THRESHOLD)) { mp_ptr ws; - TMP_SDECL; - TMP_SMARK; - ws = TMP_SALLOC_LIMBS (mpn_toom4_sqr_itch (n)); - mpn_toom4_sqr (p, a, n, ws); - TMP_SFREE; + TMP_DECL; + TMP_MARK; + ws = TMP_ALLOC_LIMBS (mpn_toom8_mul_n_itch (n)); + mpn_toom8h_mul (p, a, n, b, n, ws); + TMP_FREE; } else -#if WANT_FFT || TUNE_PROGRAM_BUILD { /* The current FFT code allocates its own space. That should probably change. */ - mpn_mul_fft_full (p, a, n, a, n); - } -#else - { - /* Toom4 for large operands. */ - mp_ptr ws; - TMP_DECL; - TMP_MARK; - ws = TMP_BALLOC_LIMBS (mpn_toom4_sqr_itch (n)); - mpn_toom4_sqr (p, a, n, ws); - TMP_FREE; + mpn_fft_mul (p, a, n, b, n); } -#endif } diff -Nru gmp-4.3.2+dfsg/mpn/generic/neg.c gmp-5.0.2+dfsg/mpn/generic/neg.c --- gmp-4.3.2+dfsg/mpn/generic/neg.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/neg.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,23 @@ +/* mpn_neg - negate an mpn. + +Copyright 2001, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define __GMP_FORCE_mpn_neg 1 + +#include "gmp.h" +#include "gmp-impl.h" diff -Nru gmp-4.3.2+dfsg/mpn/generic/neg_n.c gmp-5.0.2+dfsg/mpn/generic/neg_n.c --- gmp-4.3.2+dfsg/mpn/generic/neg_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/neg_n.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,23 +0,0 @@ -/* mpn_neg_n - negate an mpn. - -Copyright 2001, 2009 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define __GMP_FORCE_mpn_neg_n 1 - -#include "gmp.h" -#include "gmp-impl.h" diff -Nru gmp-4.3.2+dfsg/mpn/generic/nussbaumer_mul.c gmp-5.0.2+dfsg/mpn/generic/nussbaumer_mul.c --- gmp-4.3.2+dfsg/mpn/generic/nussbaumer_mul.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/nussbaumer_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,60 @@ +/* mpn_nussbaumer_mul -- Multiply {ap,an} and {bp,bn} using + Nussbaumer's negacyclic convolution. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +/* Multiply {ap,an} by {bp,bn}, and put the result in {pp, an+bn} */ +void +mpn_nussbaumer_mul (mp_ptr pp, + mp_srcptr ap, mp_size_t an, + mp_srcptr bp, mp_size_t bn) +{ + mp_size_t rn; + mp_ptr tp; + TMP_DECL; + + ASSERT (an >= bn); + ASSERT (bn > 0); + + TMP_MARK; + + if ((ap == bp) && (an == bn)) + { + rn = mpn_sqrmod_bnm1_next_size (2*an); + tp = TMP_ALLOC_LIMBS (mpn_sqrmod_bnm1_itch (rn, an)); + mpn_sqrmod_bnm1 (pp, rn, ap, an, tp); + } + else + { + rn = mpn_mulmod_bnm1_next_size (an + bn); + tp = TMP_ALLOC_LIMBS (mpn_mulmod_bnm1_itch (rn, an, bn)); + mpn_mulmod_bnm1 (pp, rn, ap, an, bp, bn, tp); + } + + TMP_FREE; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/perfpow.c gmp-5.0.2+dfsg/mpn/generic/perfpow.c --- gmp-4.3.2+dfsg/mpn/generic/perfpow.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/perfpow.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,493 @@ +/* mpn_perfect_power_p -- mpn perfect power detection. + + Contributed to the GNU project by Martin Boij. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +#define SMALL 20 +#define MEDIUM 100 + +/* + Returns non-zero if {np,nn} == {xp,xn} ^ k. + Algorithm: + For s = 1, 2, 4, ..., s_max, compute the s least significant + limbs of {xp,xn}^k. Stop if they don't match the s least + significant limbs of {np,nn}. +*/ +static int +pow_equals (mp_srcptr np, mp_size_t nn, + mp_srcptr xp,mp_size_t xn, + mp_limb_t k, mp_bitcnt_t f, + mp_ptr tp) +{ + mp_limb_t *tp2; + mp_bitcnt_t y, z, count; + mp_size_t i, bn; + int ans; + mp_limb_t h, l; + TMP_DECL; + + ASSERT (nn > 1 || (nn == 1 && np[0] > 1)); + ASSERT (np[nn - 1] > 0); + ASSERT (xn > 0); + + if (xn == 1 && xp[0] == 1) + return 0; + + z = 1 + (nn >> 1); + for (bn = 1; bn < z; bn <<= 1) + { + mpn_powlo (tp, xp, &k, 1, bn, tp + bn); + if (mpn_cmp (tp, np, bn) != 0) + return 0; + } + + TMP_MARK; + + /* Final check. Estimate the size of {xp,xn}^k before computing + the power with full precision. + Optimization: It might pay off to make a more accurate estimation of + the logarithm of {xp,xn}, rather than using the index of the MSB. + */ + + count_leading_zeros (count, xp[xn - 1]); + y = xn * GMP_LIMB_BITS - count - 1; /* msb_index (xp, xn) */ + + umul_ppmm (h, l, k, y); + h -= l == 0; l--; /* two-limb decrement */ + + z = f - 1; /* msb_index (np, nn) */ + if (h == 0 && l <= z) + { + mp_limb_t size; + size = l + k; + ASSERT_ALWAYS (size >= k); + + y = 2 + size / GMP_LIMB_BITS; + tp2 = TMP_ALLOC_LIMBS (y); + + i = mpn_pow_1 (tp, xp, xn, k, tp2); + if (i == nn && mpn_cmp (tp, np, nn) == 0) + ans = 1; + else + ans = 0; + } + else + { + ans = 0; + } + + TMP_FREE; + return ans; +} + +/* + Computes rp such that rp^k * yp = 1 (mod 2^b). + Algorithm: + Apply Hensel lifting repeatedly, each time + doubling (approx.) the number of known bits in rp. +*/ +static void +binv_root (mp_ptr rp, mp_srcptr yp, + mp_limb_t k, mp_size_t bn, + mp_bitcnt_t b, mp_ptr tp) +{ + mp_limb_t *tp2 = tp + bn, *tp3 = tp + 2 * bn, di, k2 = k + 1; + mp_bitcnt_t order[GMP_LIMB_BITS * 2]; + int i, d = 0; + + ASSERT (bn > 0); + ASSERT (b > 0); + ASSERT ((k & 1) != 0); + + binvert_limb (di, k); + + rp[0] = 1; + for (; b != 1; b = (b + 1) >> 1) + order[d++] = b; + + for (i = d - 1; i >= 0; i--) + { + b = order[i]; + bn = 1 + (b - 1) / GMP_LIMB_BITS; + + mpn_mul_1 (tp, rp, bn, k2); + + mpn_powlo (tp2, rp, &k2, 1, bn, tp3); + mpn_mullo_n (rp, yp, tp2, bn); + + mpn_sub_n (tp2, tp, rp, bn); + mpn_pi1_bdiv_q_1 (rp, tp2, bn, k, di, 0); + if ((b % GMP_LIMB_BITS) != 0) + rp[(b - 1) / GMP_LIMB_BITS] &= (((mp_limb_t) 1) << (b % GMP_LIMB_BITS)) - 1; + } + return; +} + +/* + Computes rp such that rp^2 * yp = 1 (mod 2^{b+1}). + Returns non-zero if such an integer rp exists. +*/ +static int +binv_sqroot (mp_ptr rp, mp_srcptr yp, + mp_size_t bn, mp_bitcnt_t b, + mp_ptr tp) +{ + mp_limb_t k = 3, *tp2 = tp + bn, *tp3 = tp + (bn << 1); + mp_bitcnt_t order[GMP_LIMB_BITS * 2]; + int i, d = 0; + + ASSERT (bn > 0); + ASSERT (b > 0); + + rp[0] = 1; + if (b == 1) + { + if ((yp[0] & 3) != 1) + return 0; + } + else + { + if ((yp[0] & 7) != 1) + return 0; + + for (; b != 2; b = (b + 2) >> 1) + order[d++] = b; + + for (i = d - 1; i >= 0; i--) + { + b = order[i]; + bn = 1 + b / GMP_LIMB_BITS; + + mpn_mul_1 (tp, rp, bn, k); + + mpn_powlo (tp2, rp, &k, 1, bn, tp3); + mpn_mullo_n (rp, yp, tp2, bn); + +#if HAVE_NATIVE_mpn_rsh1sub_n + mpn_rsh1sub_n (rp, tp, rp, bn); +#else + mpn_sub_n (tp2, tp, rp, bn); + mpn_rshift (rp, tp2, bn, 1); +#endif + rp[b / GMP_LIMB_BITS] &= (((mp_limb_t) 1) << (b % GMP_LIMB_BITS)) - 1; + } + } + return 1; +} + +/* + Returns non-zero if {np,nn} is a kth power. +*/ +static int +is_kth_power (mp_ptr rp, mp_srcptr np, + mp_limb_t k, mp_srcptr yp, + mp_size_t nn, mp_bitcnt_t f, + mp_ptr tp) +{ + mp_limb_t x, c; + mp_bitcnt_t b; + mp_size_t i, rn, xn; + + ASSERT (nn > 0); + ASSERT (((k & 1) != 0) || (k == 2)); + ASSERT ((np[0] & 1) != 0); + + if (k == 2) + { + b = (f + 1) >> 1; + rn = 1 + b / GMP_LIMB_BITS; + if (binv_sqroot (rp, yp, rn, b, tp) != 0) + { + xn = rn; + MPN_NORMALIZE (rp, xn); + if (pow_equals (np, nn, rp, xn, k, f, tp) != 0) + return 1; + + /* Check if (2^b - rp)^2 == np */ + c = 0; + for (i = 0; i < rn; i++) + { + x = rp[i]; + rp[i] = -x - c; + c |= (x != 0); + } + rp[rn - 1] &= (((mp_limb_t) 1) << (b % GMP_LIMB_BITS)) - 1; + MPN_NORMALIZE (rp, rn); + if (pow_equals (np, nn, rp, rn, k, f, tp) != 0) + return 1; + } + } + else + { + b = 1 + (f - 1) / k; + rn = 1 + (b - 1) / GMP_LIMB_BITS; + binv_root (rp, yp, k, rn, b, tp); + MPN_NORMALIZE (rp, rn); + if (pow_equals (np, nn, rp, rn, k, f, tp) != 0) + return 1; + } + MPN_ZERO (rp, rn); /* Untrash rp */ + return 0; +} + +static int +perfpow (mp_srcptr np, mp_size_t nn, + mp_limb_t ub, mp_limb_t g, + mp_bitcnt_t f, int neg) +{ + mp_limb_t *yp, *tp, k = 0, *rp1; + int ans = 0; + mp_bitcnt_t b; + gmp_primesieve_t ps; + TMP_DECL; + + ASSERT (nn > 0); + ASSERT ((np[0] & 1) != 0); + ASSERT (ub > 0); + + TMP_MARK; + gmp_init_primesieve (&ps); + b = (f + 3) >> 1; + + yp = TMP_ALLOC_LIMBS (nn); + rp1 = TMP_ALLOC_LIMBS (nn); + tp = TMP_ALLOC_LIMBS (5 * nn); /* FIXME */ + MPN_ZERO (rp1, nn); + + mpn_binvert (yp, np, 1 + (b - 1) / GMP_LIMB_BITS, tp); + if (b % GMP_LIMB_BITS) + yp[(b - 1) / GMP_LIMB_BITS] &= (((mp_limb_t) 1) << (b % GMP_LIMB_BITS)) - 1; + + if (neg) + gmp_nextprime (&ps); + + if (g > 0) + { + ub = MIN (ub, g + 1); + while ((k = gmp_nextprime (&ps)) < ub) + { + if ((g % k) == 0) + { + if (is_kth_power (rp1, np, k, yp, nn, f, tp) != 0) + { + ans = 1; + goto ret; + } + } + } + } + else + { + while ((k = gmp_nextprime (&ps)) < ub) + { + if (is_kth_power (rp1, np, k, yp, nn, f, tp) != 0) + { + ans = 1; + goto ret; + } + } + } + ret: + TMP_FREE; + return ans; +} + +static const unsigned short nrtrial[] = { 100, 500, 1000 }; + +/* Table of (log_{p_i} 2) values, where p_i is + the (nrtrial[i] + 1)'th prime number. +*/ +static const double logs[] = { 0.1099457228193620, 0.0847016403115322, 0.0772048195144415 }; + +int +mpn_perfect_power_p (mp_srcptr np, mp_size_t nn) +{ + mp_size_t ncn, s, pn, xn; + mp_limb_t *nc, factor, g = 0; + mp_limb_t exp, *prev, *next, d, l, r, c, *tp, cry; + mp_bitcnt_t twos = 0, count; + int ans, where = 0, neg = 0, trial; + TMP_DECL; + + nc = (mp_ptr) np; + + if (nn < 0) + { + neg = 1; + nn = -nn; + } + + if (nn == 0 || (nn == 1 && np[0] == 1)) + return 1; + + TMP_MARK; + + ncn = nn; + twos = mpn_scan1 (np, 0); + if (twos > 0) + { + if (twos == 1) + { + ans = 0; + goto ret; + } + s = twos / GMP_LIMB_BITS; + if (s + 1 == nn && POW2_P (np[s])) + { + ans = ! (neg && POW2_P (twos)); + goto ret; + } + count = twos % GMP_LIMB_BITS; + ncn = nn - s; + nc = TMP_ALLOC_LIMBS (ncn); + if (count > 0) + { + mpn_rshift (nc, np + s, ncn, count); + ncn -= (nc[ncn - 1] == 0); + } + else + { + MPN_COPY (nc, np + s, ncn); + } + g = twos; + } + + if (ncn <= SMALL) + trial = 0; + else if (ncn <= MEDIUM) + trial = 1; + else + trial = 2; + + factor = mpn_trialdiv (nc, ncn, nrtrial[trial], &where); + + if (factor != 0) + { + if (twos == 0) + { + nc = TMP_ALLOC_LIMBS (ncn); + MPN_COPY (nc, np, ncn); + } + + /* Remove factors found by trialdiv. + Optimization: Perhaps better to use + the strategy in mpz_remove (). + */ + prev = TMP_ALLOC_LIMBS (ncn + 2); + next = TMP_ALLOC_LIMBS (ncn + 2); + tp = TMP_ALLOC_LIMBS (4 * ncn); + + do + { + binvert_limb (d, factor); + prev[0] = d; + pn = 1; + exp = 1; + while (2 * pn - 1 <= ncn) + { + mpn_sqr (next, prev, pn); + xn = 2 * pn; + xn -= (next[xn - 1] == 0); + + if (mpn_divisible_p (nc, ncn, next, xn) == 0) + break; + + exp <<= 1; + pn = xn; + MP_PTR_SWAP (next, prev); + } + + /* Binary search for the exponent */ + l = exp + 1; + r = 2 * exp - 1; + while (l <= r) + { + c = (l + r) >> 1; + if (c - exp > 1) + { + xn = mpn_pow_1 (tp, &d, 1, c - exp, next); + if (pn + xn - 1 > ncn) + { + r = c - 1; + continue; + } + mpn_mul (next, prev, pn, tp, xn); + xn += pn; + xn -= (next[xn - 1] == 0); + } + else + { + cry = mpn_mul_1 (next, prev, pn, d); + next[pn] = cry; + xn = pn + (cry != 0); + } + + if (mpn_divisible_p (nc, ncn, next, xn) == 0) + { + r = c - 1; + } + else + { + exp = c; + l = c + 1; + MP_PTR_SWAP (next, prev); + pn = xn; + } + } + + if (g == 0) + g = exp; + else + g = mpn_gcd_1 (&g, 1, exp); + + if (g == 1) + { + ans = 0; + goto ret; + } + + mpn_divexact (next, nc, ncn, prev, pn); + ncn = ncn - pn; + ncn += next[ncn] != 0; + MPN_COPY (nc, next, ncn); + + if (ncn == 1 && nc[0] == 1) + { + ans = ! (neg && POW2_P (g)); + goto ret; + } + + factor = mpn_trialdiv (nc, ncn, nrtrial[trial], &where); + } + while (factor != 0); + } + + count_leading_zeros (count, nc[ncn-1]); + count = GMP_LIMB_BITS * ncn - count; /* log (nc) + 1 */ + d = (mp_limb_t) (count * logs[trial] + 1e-9) + 1; + ans = perfpow (nc, ncn, d, g, count, neg); + + ret: + TMP_FREE; + return ans; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/perfsqr.c gmp-5.0.2+dfsg/mpn/generic/perfsqr.c --- gmp-4.3.2+dfsg/mpn/generic/perfsqr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/perfsqr.c 2011-05-08 09:49:29.000000000 +0000 @@ -104,18 +104,18 @@ Maybe a new sort of mpn_preinv_mod_1 could accept an unnormalized divisor and a shift count, like mpn_preinv_divrem_1. But mod_34lsub1 is our normal case, so lets not worry too much about mod_1. */ -#define PERFSQR_MOD_PP(r, up, usize) \ - do { \ - if (USE_PREINV_MOD_1) \ - { \ - (r) = mpn_preinv_mod_1 (up, usize, PERFSQR_PP_NORM, \ - PERFSQR_PP_INVERTED); \ - (r) %= PERFSQR_PP; \ - } \ - else \ - { \ - (r) = mpn_mod_1 (up, usize, PERFSQR_PP); \ - } \ +#define PERFSQR_MOD_PP(r, up, usize) \ + do { \ + if (BELOW_THRESHOLD (usize, PREINV_MOD_1_TO_MOD_1_THRESHOLD)) \ + { \ + (r) = mpn_preinv_mod_1 (up, usize, PERFSQR_PP_NORM, \ + PERFSQR_PP_INVERTED); \ + (r) %= PERFSQR_PP; \ + } \ + else \ + { \ + (r) = mpn_mod_1 (up, usize, PERFSQR_PP); \ + } \ } while (0) #define PERFSQR_MOD_IDX(idx, r, d, inv) \ @@ -218,7 +218,7 @@ TMP_DECL; TMP_MARK; - root_ptr = (mp_ptr) TMP_ALLOC ((usize + 1) / 2 * BYTES_PER_MP_LIMB); + root_ptr = TMP_ALLOC_LIMBS ((usize + 1) / 2); /* Iff mpn_sqrtrem returns zero, the square is perfect. */ res = ! mpn_sqrtrem (root_ptr, NULL, up, usize); diff -Nru gmp-4.3.2+dfsg/mpn/generic/popham.c gmp-5.0.2+dfsg/mpn/generic/popham.c --- gmp-4.3.2+dfsg/mpn/generic/popham.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/popham.c 2011-05-08 09:49:29.000000000 +0000 @@ -30,14 +30,14 @@ #define POPHAM(u,v) u ^ v #endif -unsigned long +mp_bitcnt_t FNAME (mp_srcptr up, #if OPERATION_hamdist mp_srcptr vp, #endif mp_size_t n) { - unsigned long result = 0; + mp_bitcnt_t result = 0; mp_limb_t p0, p1, p2, p3, x, p01, p23; mp_size_t i; diff -Nru gmp-4.3.2+dfsg/mpn/generic/pow_1.c gmp-5.0.2+dfsg/mpn/generic/pow_1.c --- gmp-4.3.2+dfsg/mpn/generic/pow_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/pow_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -34,6 +34,9 @@ mp_size_t rn; int par; + ASSERT (bn >= 1); + /* FIXME: Add operand overlap criteria */ + if (exp <= 1) { if (exp == 0) @@ -68,7 +71,7 @@ if ((cnt & 1) != 0) MP_PTR_SWAP (rp, tp); - mpn_sqr_n (rp, bp, bn); + mpn_sqr (rp, bp, bn); rn = 2 * bn; rn -= rp[rn - 1] == 0; for (i = GMP_LIMB_BITS - cnt - 1;;) @@ -83,7 +86,7 @@ if (--i == 0) break; - mpn_sqr_n (tp, rp, rn); + mpn_sqr (tp, rp, rn); rn = 2 * rn; rn -= tp[rn - 1] == 0; MP_PTR_SWAP (rp, tp); } @@ -93,7 +96,7 @@ if (((par ^ cnt) & 1) == 0) MP_PTR_SWAP (rp, tp); - mpn_sqr_n (rp, bp, bn); + mpn_sqr (rp, bp, bn); rn = 2 * bn; rn -= rp[rn - 1] == 0; for (i = GMP_LIMB_BITS - cnt - 1;;) @@ -108,7 +111,7 @@ if (--i == 0) break; - mpn_sqr_n (tp, rp, rn); + mpn_sqr (tp, rp, rn); rn = 2 * rn; rn -= tp[rn - 1] == 0; MP_PTR_SWAP (rp, tp); } diff -Nru gmp-4.3.2+dfsg/mpn/generic/powlo.c gmp-5.0.2+dfsg/mpn/generic/powlo.c --- gmp-4.3.2+dfsg/mpn/generic/powlo.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/powlo.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,4 +1,4 @@ -/* mpn_powlo -- Compute R = U^E mod R^n, where R is the limb base. +/* mpn_powlo -- Compute R = U^E mod B^n, where B is the limb base. Copyright 2007, 2008, 2009 Free Software Foundation, Inc. @@ -27,7 +27,7 @@ ((p[(bi - 1) / GMP_LIMB_BITS] >> (bi - 1) % GMP_LIMB_BITS) & 1) static inline mp_limb_t -getbits (const mp_limb_t *p, unsigned long bi, int nbits) +getbits (const mp_limb_t *p, mp_bitcnt_t bi, int nbits) { int nbits_in_r; mp_limb_t r; @@ -40,10 +40,10 @@ else { bi -= nbits; /* bit index of low bit to extract */ - i = bi / GMP_LIMB_BITS; /* word index of low bit to extract */ - bi %= GMP_LIMB_BITS; /* bit index in low word */ + i = bi / GMP_NUMB_BITS; /* word index of low bit to extract */ + bi %= GMP_NUMB_BITS; /* bit index in low word */ r = p[i] >> bi; /* extract (low) bits */ - nbits_in_r = GMP_LIMB_BITS - bi; /* number of bits now in r */ + nbits_in_r = GMP_NUMB_BITS - bi; /* number of bits now in r */ if (nbits_in_r < nbits) /* did we get enough bits? */ r += p[i + 1] << nbits_in_r; /* prepend bits from higher word */ return r & (((mp_limb_t ) 1 << nbits) - 1); @@ -51,16 +51,16 @@ } static inline int -win_size (unsigned long eb) +win_size (mp_bitcnt_t eb) { int k; - static unsigned long x[] = {1,7,25,81,241,673,1793,4609,11521,28161,~0ul}; + static mp_bitcnt_t x[] = {1,7,25,81,241,673,1793,4609,11521,28161,~(mp_bitcnt_t)0}; for (k = 0; eb > x[k]; k++) ; return k; } -/* rp[n-1..0] = bp[n-1..0] ^ ep[en-1..0] mod R^n, R is the limb base. +/* rp[n-1..0] = bp[n-1..0] ^ ep[en-1..0] mod B^n, B is the limb base. Requires that ep[en-1] is non-zero. Uses scratch space tp[3n-1..0], i.e., 3n words. */ void @@ -69,7 +69,7 @@ mp_size_t n, mp_ptr tp) { int cnt; - long ebi; + mp_bitcnt_t ebi; int windowsize, this_windowsize; mp_limb_t expbits; mp_limb_t *pp, *this_pp, *last_pp; @@ -82,11 +82,11 @@ TMP_MARK; count_leading_zeros (cnt, ep[en - 1]); - ebi = en * GMP_LIMB_BITS - cnt; + ebi = (mp_bitcnt_t) en * GMP_LIMB_BITS - cnt; windowsize = win_size (ebi); - pp = TMP_ALLOC_LIMBS ((n << (windowsize - 1)) + n); /* + n is for mullow ign part */ + pp = TMP_ALLOC_LIMBS ((n << (windowsize - 1)) + n); /* + n is for mullo ign part */ this_pp = pp; @@ -95,7 +95,7 @@ b2p = tp + 2*n; /* Store b^2 in b2. */ - mpn_sqr_n (tp, bp, n); /* FIXME: Use "mpn_sqrlo" */ + mpn_sqr (tp, bp, n); /* FIXME: Use "mpn_sqrlo" */ MPN_COPY (b2p, tp, n); /* Precompute odd powers of b and put them in the temporary area at pp. */ @@ -103,13 +103,14 @@ { last_pp = this_pp; this_pp += n; - mpn_mullow_n (this_pp, last_pp, b2p, n); + mpn_mullo_n (this_pp, last_pp, b2p, n); } expbits = getbits (ep, ebi, windowsize); - ebi -= windowsize; - if (ebi < 0) + if (ebi < windowsize) ebi = 0; + else + ebi -= windowsize; count_trailing_zeros (cnt, expbits); ebi += cnt; @@ -121,7 +122,7 @@ { while (getbit (ep, ebi) == 0) { - mpn_sqr_n (tp, rp, n); /* FIXME: Use "mpn_sqrlo" */ + mpn_sqr (tp, rp, n); /* FIXME: Use "mpn_sqrlo" */ MPN_COPY (rp, tp, n); ebi--; if (ebi == 0) @@ -132,13 +133,14 @@ bits <= windowsize, and such that the least significant bit is 1. */ expbits = getbits (ep, ebi, windowsize); - ebi -= windowsize; this_windowsize = windowsize; - if (ebi < 0) + if (ebi < windowsize) { - this_windowsize += ebi; + this_windowsize -= windowsize - ebi; ebi = 0; } + else + ebi -= windowsize; count_trailing_zeros (cnt, expbits); this_windowsize -= cnt; @@ -147,13 +149,13 @@ do { - mpn_sqr_n (tp, rp, n); + mpn_sqr (tp, rp, n); MPN_COPY (rp, tp, n); this_windowsize--; } while (this_windowsize != 0); - mpn_mullow_n (tp, rp, pp + n * (expbits >> 1), n); + mpn_mullo_n (tp, rp, pp + n * (expbits >> 1), n); MPN_COPY (rp, tp, n); } diff -Nru gmp-4.3.2+dfsg/mpn/generic/powm.c gmp-5.0.2+dfsg/mpn/generic/powm.c --- gmp-4.3.2+dfsg/mpn/generic/powm.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/powm.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,5 +1,11 @@ /* mpn_powm -- Compute R = U^E mod M. + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + Copyright 2007, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -19,19 +25,16 @@ /* - BASIC ALGORITHM, Compute b^e mod n, where n is odd. - - 1. w <- b + BASIC ALGORITHM, Compute U^E mod M, where M < B^n is odd. - 2. While w^2 < n (and there are more bits in e) - w <- power left-to-right base-2 without reduction + 1. W <- U - 3. t <- (B^n * b) / n Convert to REDC form + 2. T <- (B^n * U) mod M Convert to REDC form - 4. Compute power table of e-dependent size + 3. Compute table U^1, U^3, U^5... of E-dependent size - 5. While there are more bits in e - w <- power left-to-right base-k with reduction + 4. While there are more bits in E + W <- power left-to-right base-k TODO: @@ -40,51 +43,46 @@ That will simplify the code using getbits. (Perhaps make getbits' sibling getbit then have similar form, for symmetry.) - * Write an itch function. + * Write an itch function. Or perhaps get rid of tp parameter since the huge + pp area is allocated locally anyway? * Choose window size without looping. (Superoptimize or think(tm).) - * How do we handle small bases? - - * This is slower than old mpz code, in particular if we base it on redc_1 - (use: #undef HAVE_NATIVE_mpn_addmul_2). Why? - - * Make it sub-quadratic. + * Handle small bases with initial, reduction-free exponentiation. * Call new division functions, not mpn_tdiv_qr. - * Is redc obsolete with improved SB division? - * Consider special code for one-limb M. - * CRT for N = odd*2^t: - Using Newton's method and 2-adic arithmetic: - m1_inv_m2 = 1/odd mod 2^t - Plain 2-adic (REDC) modexp: - r1 = a ^ b mod odd - Mullo+sqrlo-based modexp: - r2 = a ^ b mod 2^t - mullo, mul, add: - r = ((r2 - r1) * m1_i_m2 mod 2^t) * odd + r1 - - * How should we handle the redc1/redc2/redc2/redc4/redc_subquad choice? - - redc1: T(binvert_1limb) + e * (n) * (T(mullo1x1) + n*T(addmul_1)) - - redc2: T(binvert_2limbs) + e * (n/2) * (T(mullo2x2) + n*T(addmul_2)) - - redc3: T(binvert_3limbs) + e * (n/3) * (T(mullo3x3) + n*T(addmul_3)) + * How should we handle the redc1/redc2/redc_n choice? + - redc1: T(binvert_1limb) + e * (n) * (T(mullo-1x1) + n*T(addmul_1)) + - redc2: T(binvert_2limbs) + e * (n/2) * (T(mullo-2x2) + n*T(addmul_2)) + - redc_n: T(binvert_nlimbs) + e * (T(mullo-nxn) + T(M(n))) This disregards the addmul_N constant term, but we could think of - that as part of the respective mulloNxN. + that as part of the respective mullo. + + * When U (the base) is small, we should start the exponentiation with plain + operations, then convert that partial result to REDC form. + + * When U is just one limb, should it be handled without the k-ary tricks? + We could keep a factor of B^n in W, but use U' = BU as base. After + multiplying by this (pseudo two-limb) number, we need to multiply by 1/B + mod M. */ #include "gmp.h" #include "gmp-impl.h" #include "longlong.h" +#if HAVE_NATIVE_mpn_addmul_2 || HAVE_NATIVE_mpn_redc_2 +#define WANT_REDC_2 1 +#endif #define getbit(p,bi) \ ((p[(bi - 1) / GMP_LIMB_BITS] >> (bi - 1) % GMP_LIMB_BITS) & 1) static inline mp_limb_t -getbits (const mp_limb_t *p, unsigned long bi, int nbits) +getbits (const mp_limb_t *p, mp_bitcnt_t bi, int nbits) { int nbits_in_r; mp_limb_t r; @@ -97,49 +95,27 @@ else { bi -= nbits; /* bit index of low bit to extract */ - i = bi / GMP_LIMB_BITS; /* word index of low bit to extract */ - bi %= GMP_LIMB_BITS; /* bit index in low word */ + i = bi / GMP_NUMB_BITS; /* word index of low bit to extract */ + bi %= GMP_NUMB_BITS; /* bit index in low word */ r = p[i] >> bi; /* extract (low) bits */ - nbits_in_r = GMP_LIMB_BITS - bi; /* number of bits now in r */ + nbits_in_r = GMP_NUMB_BITS - bi; /* number of bits now in r */ if (nbits_in_r < nbits) /* did we get enough bits? */ r += p[i + 1] << nbits_in_r; /* prepend bits from higher word */ return r & (((mp_limb_t ) 1 << nbits) - 1); } } -#undef HAVE_NATIVE_mpn_addmul_2 - -#ifndef HAVE_NATIVE_mpn_addmul_2 -#define REDC_2_THRESHOLD MP_SIZE_T_MAX -#endif - -#ifndef REDC_2_THRESHOLD -#define REDC_2_THRESHOLD 4 -#endif - -static void mpn_redc_n () {ASSERT_ALWAYS(0);} - static inline int -win_size (unsigned long eb) +win_size (mp_bitcnt_t eb) { int k; - static unsigned long x[] = {1,7,25,81,241,673,1793,4609,11521,28161,~0ul}; - for (k = 0; eb > x[k]; k++) + static mp_bitcnt_t x[] = {0,7,25,81,241,673,1793,4609,11521,28161,~(mp_bitcnt_t)0}; + for (k = 1; eb > x[k]; k++) ; return k; } -#define MPN_REDC_X(rp, tp, mp, n, mip) \ - do { \ - if (redc_x == 1) \ - mpn_redc_1 (rp, tp, mp, n, mip[0]); \ - else if (redc_x == 2) \ - mpn_redc_2 (rp, tp, mp, n, mip); \ - else \ - mpn_redc_n (rp, tp, mp, n, mip); \ - } while (0) - - /* Convert U to REDC form, U_r = B^n * U mod M */ +/* Convert U to REDC form, U_r = B^n * U mod M */ static void redcify (mp_ptr rp, mp_srcptr up, mp_size_t un, mp_srcptr mp, mp_size_t n) { @@ -159,21 +135,19 @@ /* rp[n-1..0] = bp[bn-1..0] ^ ep[en-1..0] mod mp[n-1..0] Requires that mp[n-1..0] is odd. Requires that ep[en-1..0] is > 1. - Uses scratch space tp[3n..0], i.e., 3n+1 words. */ + Uses scratch space at tp of MAX(mpn_binvert_itch(n),2n) limbs. */ void mpn_powm (mp_ptr rp, mp_srcptr bp, mp_size_t bn, mp_srcptr ep, mp_size_t en, mp_srcptr mp, mp_size_t n, mp_ptr tp) { - mp_limb_t mip[2]; + mp_limb_t ip[2], *mip; int cnt; - long ebi; + mp_bitcnt_t ebi; int windowsize, this_windowsize; mp_limb_t expbits; - mp_ptr pp, this_pp, last_pp; - mp_ptr b2p; + mp_ptr pp, this_pp; long i; - int redc_x; TMP_DECL; ASSERT (en > 1 || (en == 1 && ep[0] > 1)); @@ -182,7 +156,7 @@ TMP_MARK; count_leading_zeros (cnt, ep[en - 1]); - ebi = en * GMP_LIMB_BITS - cnt; + ebi = (mp_bitcnt_t) en * GMP_LIMB_BITS - cnt; #if 0 if (bn < n) @@ -191,7 +165,7 @@ until the result is greater than the mod argument. */ for (;;) { - mpn_sqr_n (tp, this_pp, tn); + mpn_sqr (tp, this_pp, tn); tn = tn * 2 - 1, tn += tp[tn] != 0; if (getbit (ep, ebi) != 0) mpn_mul (..., tp, tn, bp, bn); @@ -202,49 +176,75 @@ windowsize = win_size (ebi); - if (BELOW_THRESHOLD (n, REDC_2_THRESHOLD)) +#if WANT_REDC_2 + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_2_THRESHOLD)) { + mip = ip; binvert_limb (mip[0], mp[0]); mip[0] = -mip[0]; - redc_x = 1; } -#if defined (HAVE_NATIVE_mpn_addmul_2) - else + else if (BELOW_THRESHOLD (n, REDC_2_TO_REDC_N_THRESHOLD)) { + mip = ip; mpn_binvert (mip, mp, 2, tp); mip[0] = -mip[0]; mip[1] = ~mip[1]; - redc_x = 2; + } +#else + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_N_THRESHOLD)) + { + mip = ip; + binvert_limb (mip[0], mp[0]); + mip[0] = -mip[0]; } #endif -#if 0 - mpn_binvert (mip, mp, n, tp); - redc_x = 0; -#endif + else + { + mip = TMP_ALLOC_LIMBS (n); + mpn_binvert (mip, mp, n, tp); + } pp = TMP_ALLOC_LIMBS (n << (windowsize - 1)); this_pp = pp; redcify (this_pp, bp, bn, mp, n); - b2p = tp + 2*n; - - /* Store b^2 in b2. */ - mpn_sqr_n (tp, this_pp, n); - MPN_REDC_X (b2p, tp, mp, n, mip); + /* Store b^2 at rp. */ + mpn_sqr (tp, this_pp, n); +#if WANT_REDC_2 + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_2_THRESHOLD)) + mpn_redc_1 (rp, tp, mp, n, mip[0]); + else if (BELOW_THRESHOLD (n, REDC_2_TO_REDC_N_THRESHOLD)) + mpn_redc_2 (rp, tp, mp, n, mip); +#else + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_N_THRESHOLD)) + mpn_redc_1 (rp, tp, mp, n, mip[0]); +#endif + else + mpn_redc_n (rp, tp, mp, n, mip); /* Precompute odd powers of b and put them in the temporary area at pp. */ for (i = (1 << (windowsize - 1)) - 1; i > 0; i--) { - last_pp = this_pp; + mpn_mul_n (tp, this_pp, rp, n); this_pp += n; - mpn_mul_n (tp, last_pp, b2p, n); - MPN_REDC_X (this_pp, tp, mp, n, mip); +#if WANT_REDC_2 + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_2_THRESHOLD)) + mpn_redc_1 (this_pp, tp, mp, n, mip[0]); + else if (BELOW_THRESHOLD (n, REDC_2_TO_REDC_N_THRESHOLD)) + mpn_redc_2 (this_pp, tp, mp, n, mip); +#else + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_N_THRESHOLD)) + mpn_redc_1 (this_pp, tp, mp, n, mip[0]); +#endif + else + mpn_redc_n (this_pp, tp, mp, n, mip); } expbits = getbits (ep, ebi, windowsize); - ebi -= windowsize; - if (ebi < 0) + if (ebi < windowsize) ebi = 0; + else + ebi -= windowsize; count_trailing_zeros (cnt, expbits); ebi += cnt; @@ -252,51 +252,227 @@ MPN_COPY (rp, pp + n * (expbits >> 1), n); - while (ebi != 0) +#define INNERLOOP \ + while (ebi != 0) \ + { \ + while (getbit (ep, ebi) == 0) \ + { \ + MPN_SQR (tp, rp, n); \ + MPN_REDUCE (rp, tp, mp, n, mip); \ + ebi--; \ + if (ebi == 0) \ + goto done; \ + } \ + \ + /* The next bit of the exponent is 1. Now extract the largest \ + block of bits <= windowsize, and such that the least \ + significant bit is 1. */ \ + \ + expbits = getbits (ep, ebi, windowsize); \ + this_windowsize = windowsize; \ + if (ebi < windowsize) \ + { \ + this_windowsize -= windowsize - ebi; \ + ebi = 0; \ + } \ + else \ + ebi -= windowsize; \ + \ + count_trailing_zeros (cnt, expbits); \ + this_windowsize -= cnt; \ + ebi += cnt; \ + expbits >>= cnt; \ + \ + do \ + { \ + MPN_SQR (tp, rp, n); \ + MPN_REDUCE (rp, tp, mp, n, mip); \ + this_windowsize--; \ + } \ + while (this_windowsize != 0); \ + \ + MPN_MUL_N (tp, rp, pp + n * (expbits >> 1), n); \ + MPN_REDUCE (rp, tp, mp, n, mip); \ + } + + +#if WANT_REDC_2 + if (REDC_1_TO_REDC_2_THRESHOLD < MUL_TOOM22_THRESHOLD) { - while (getbit (ep, ebi) == 0) + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_2_THRESHOLD)) { - mpn_sqr_n (tp, rp, n); - MPN_REDC_X (rp, tp, mp, n, mip); - ebi--; - if (ebi == 0) - goto done; +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_basecase (r,a,n,b,n) +#define MPN_SQR(r,a,n) mpn_sqr_basecase (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_1 (rp, tp, mp, n, mip[0]) + INNERLOOP; } - - /* The next bit of the exponent is 1. Now extract the largest block of - bits <= windowsize, and such that the least significant bit is 1. */ - - expbits = getbits (ep, ebi, windowsize); - ebi -= windowsize; - this_windowsize = windowsize; - if (ebi < 0) + else if (BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) { - this_windowsize += ebi; - ebi = 0; +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_basecase (r,a,n,b,n) +#define MPN_SQR(r,a,n) mpn_sqr_basecase (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_2 (rp, tp, mp, n, mip) + INNERLOOP; } + else if (BELOW_THRESHOLD (n, REDC_2_TO_REDC_N_THRESHOLD)) + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_n (r,a,b,n) +#define MPN_SQR(r,a,n) mpn_sqr (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_2 (rp, tp, mp, n, mip) + INNERLOOP; + } + else + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_n (r,a,b,n) +#define MPN_SQR(r,a,n) mpn_sqr (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_n (rp, tp, mp, n, mip) + INNERLOOP; + } + } + else + { + if (BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_basecase (r,a,n,b,n) +#define MPN_SQR(r,a,n) mpn_sqr_basecase (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_1 (rp, tp, mp, n, mip[0]) + INNERLOOP; + } + else if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_2_THRESHOLD)) + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_n (r,a,b,n) +#define MPN_SQR(r,a,n) mpn_sqr (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_1 (rp, tp, mp, n, mip[0]) + INNERLOOP; + } + else if (BELOW_THRESHOLD (n, REDC_2_TO_REDC_N_THRESHOLD)) + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_n (r,a,b,n) +#define MPN_SQR(r,a,n) mpn_sqr (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_2 (rp, tp, mp, n, mip) + INNERLOOP; + } + else + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_n (r,a,b,n) +#define MPN_SQR(r,a,n) mpn_sqr (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_n (rp, tp, mp, n, mip) + INNERLOOP; + } + } - count_trailing_zeros (cnt, expbits); - this_windowsize -= cnt; - ebi += cnt; - expbits >>= cnt; +#else /* WANT_REDC_2 */ - do + if (REDC_1_TO_REDC_N_THRESHOLD < MUL_TOOM22_THRESHOLD) + { + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_N_THRESHOLD)) { - mpn_sqr_n (tp, rp, n); - MPN_REDC_X (rp, tp, mp, n, mip); - this_windowsize--; +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_basecase (r,a,n,b,n) +#define MPN_SQR(r,a,n) mpn_sqr_basecase (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_1 (rp, tp, mp, n, mip[0]) + INNERLOOP; + } + else if (BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_basecase (r,a,n,b,n) +#define MPN_SQR(r,a,n) mpn_sqr_basecase (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_n (rp, tp, mp, n, mip) + INNERLOOP; + } + else + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_n (r,a,b,n) +#define MPN_SQR(r,a,n) mpn_sqr (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_n (rp, tp, mp, n, mip) + INNERLOOP; + } + } + else + { + if (BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_basecase (r,a,n,b,n) +#define MPN_SQR(r,a,n) mpn_sqr_basecase (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_1 (rp, tp, mp, n, mip[0]) + INNERLOOP; + } + else if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_N_THRESHOLD)) + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_n (r,a,b,n) +#define MPN_SQR(r,a,n) mpn_sqr (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_1 (rp, tp, mp, n, mip[0]) + INNERLOOP; + } + else + { +#undef MPN_MUL_N +#undef MPN_SQR +#undef MPN_REDUCE +#define MPN_MUL_N(r,a,b,n) mpn_mul_n (r,a,b,n) +#define MPN_SQR(r,a,n) mpn_sqr (r,a,n) +#define MPN_REDUCE(rp,tp,mp,n,mip) mpn_redc_n (rp, tp, mp, n, mip) + INNERLOOP; } - while (this_windowsize != 0); - - mpn_mul_n (tp, rp, pp + n * (expbits >> 1), n); - MPN_REDC_X (rp, tp, mp, n, mip); } +#endif /* WANT_REDC_2 */ done: + MPN_COPY (tp, rp, n); MPN_ZERO (tp + n, n); - MPN_REDC_X (rp, tp, mp, n, mip); + +#if WANT_REDC_2 + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_2_THRESHOLD)) + mpn_redc_1 (rp, tp, mp, n, mip[0]); + else if (BELOW_THRESHOLD (n, REDC_2_TO_REDC_N_THRESHOLD)) + mpn_redc_2 (rp, tp, mp, n, mip); +#else + if (BELOW_THRESHOLD (n, REDC_1_TO_REDC_N_THRESHOLD)) + mpn_redc_1 (rp, tp, mp, n, mip[0]); +#endif + else + mpn_redc_n (rp, tp, mp, n, mip); + if (mpn_cmp (rp, mp, n) >= 0) mpn_sub_n (rp, rp, mp, n); + TMP_FREE; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/powm_sec.c gmp-5.0.2+dfsg/mpn/generic/powm_sec.c --- gmp-4.3.2+dfsg/mpn/generic/powm_sec.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/powm_sec.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,4 +1,11 @@ -/* mpn_powm_sec -- Compute R = U^E mod M. Safe variant, not leaking time info. +/* mpn_powm_sec -- Compute R = U^E mod M. Secure variant, side-channel silent + under the assumption that the multiply instruction is side channel silent. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. Copyright 2007, 2008, 2009 Free Software Foundation, Inc. @@ -19,19 +26,14 @@ /* - BASIC ALGORITHM, Compute b^e mod n, where n is odd. - - 1. w <- b - - 2. While w^2 < n (and there are more bits in e) - w <- power left-to-right base-2 without reduction + BASIC ALGORITHM, Compute U^E mod M, where M < B^n is odd. - 3. t <- (B^n * b) / n Convert to REDC form + 1. T <- (B^n * U) mod M Convert to REDC form - 4. Compute power table of e-dependent size + 2. Compute table U^0, U^1, U^2... of E-dependent size - 5. While there are more bits in e - w <- power left-to-right base-k with reduction + 3. While there are more bits in E + W <- power left-to-right base-k TODO: @@ -40,19 +42,12 @@ That will simplify the code using getbits. (Perhaps make getbits' sibling getbit then have similar form, for symmetry.) - * Write an itch function. + * Write an itch function. Or perhaps get rid of tp parameter since the huge + pp area is allocated locally anyway? * Choose window size without looping. (Superoptimize or think(tm).) - * Make it sub-quadratic. - * Call new division functions, not mpn_tdiv_qr. - - * Is redc obsolete with improved SB division? - - * Consider special code for one-limb M. - - * Handle even M (in mpz_powm_sec) with two modexps and CRT. */ #include "gmp.h" @@ -62,11 +57,108 @@ #define WANT_CACHE_SECURITY 1 +/* Define our own mpn squaring function. We do this since we cannot use a + native mpn_sqr_basecase over TUNE_SQR_TOOM2_MAX, or a non-native one over + SQR_TOOM2_THRESHOLD. This is so because of fixed size stack allocations + made inside mpn_sqr_basecase. */ + +#if HAVE_NATIVE_mpn_sqr_diagonal +#define MPN_SQR_DIAGONAL(rp, up, n) \ + mpn_sqr_diagonal (rp, up, n) +#else +#define MPN_SQR_DIAGONAL(rp, up, n) \ + do { \ + mp_size_t _i; \ + for (_i = 0; _i < (n); _i++) \ + { \ + mp_limb_t ul, lpl; \ + ul = (up)[_i]; \ + umul_ppmm ((rp)[2 * _i + 1], lpl, ul, ul << GMP_NAIL_BITS); \ + (rp)[2 * _i] = lpl >> GMP_NAIL_BITS; \ + } \ + } while (0) +#endif + + +#if ! HAVE_NATIVE_mpn_sqr_basecase +/* The limit of the generic code is SQR_TOOM2_THRESHOLD. */ +#define SQR_BASECASE_MAX SQR_TOOM2_THRESHOLD +#endif + +#if HAVE_NATIVE_mpn_sqr_basecase +#ifdef TUNE_SQR_TOOM2_MAX +/* We slightly abuse TUNE_SQR_TOOM2_MAX here. If it is set for an assembly + mpn_sqr_basecase, it comes from SQR_TOOM2_THRESHOLD_MAX in the assembly + file. An assembly mpn_sqr_basecase that does not define it, should allow + any size. */ +#define SQR_BASECASE_MAX SQR_TOOM2_THRESHOLD +#endif +#endif + +#ifndef SQR_BASECASE_MAX +/* If SQR_BASECASE_MAX is now not defined, use mpn_sqr_basecase for any operand + size. */ +#define mpn_local_sqr(rp,up,n,tp) mpn_sqr_basecase(rp,up,n) +#else +/* Define our own squaring function, which uses mpn_sqr_basecase for its + allowed sizes, but its own code for larger sizes. */ +static void +mpn_local_sqr (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_ptr tp) +{ + mp_size_t i; + + ASSERT (n >= 1); + ASSERT (! MPN_OVERLAP_P (rp, 2*n, up, n)); + + if (n < SQR_BASECASE_MAX) + { + mpn_sqr_basecase (rp, up, n); + return; + } + + { + mp_limb_t ul, lpl; + ul = up[0]; + umul_ppmm (rp[1], lpl, ul, ul << GMP_NAIL_BITS); + rp[0] = lpl >> GMP_NAIL_BITS; + } + if (n > 1) + { + mp_limb_t cy; + TMP_DECL; + TMP_MARK; + + cy = mpn_mul_1 (tp, up + 1, n - 1, up[0]); + tp[n - 1] = cy; + for (i = 2; i < n; i++) + { + mp_limb_t cy; + cy = mpn_addmul_1 (tp + 2 * i - 2, up + i, n - i, up[i - 1]); + tp[n + i - 2] = cy; + } + MPN_SQR_DIAGONAL (rp + 2, up + 1, n - 1); + + { + mp_limb_t cy; +#if HAVE_NATIVE_mpn_addlsh1_n + cy = mpn_addlsh1_n (rp + 1, rp + 1, tp, 2 * n - 2); +#else + cy = mpn_lshift (tp, tp, 2 * n - 2, 1); + cy += mpn_add_n (rp + 1, rp + 1, tp, 2 * n - 2); +#endif + rp[2 * n - 1] += cy; + } + + TMP_FREE; + } +} +#endif + #define getbit(p,bi) \ ((p[(bi - 1) / GMP_LIMB_BITS] >> (bi - 1) % GMP_LIMB_BITS) & 1) static inline mp_limb_t -getbits (const mp_limb_t *p, unsigned long bi, int nbits) +getbits (const mp_limb_t *p, mp_bitcnt_t bi, int nbits) { int nbits_in_r; mp_limb_t r; @@ -89,48 +181,25 @@ } } -#undef HAVE_NATIVE_mpn_addmul_2 - -#ifndef HAVE_NATIVE_mpn_addmul_2 -#define REDC_2_THRESHOLD MP_SIZE_T_MAX -#endif - -#ifndef REDC_2_THRESHOLD -#define REDC_2_THRESHOLD 4 -#endif - -static void mpn_redc_n () {ASSERT_ALWAYS(0);} - static inline int -win_size (unsigned long eb) +win_size (mp_bitcnt_t eb) { int k; - static unsigned long x[] = {1,4,27,100,325,1026,2905,7848,20457,51670,~0ul}; - for (k = 0; eb > x[k]; k++) + static mp_bitcnt_t x[] = {0,4,27,100,325,1026,2905,7848,20457,51670,~(mp_bitcnt_t)0}; + for (k = 1; eb > x[k]; k++) ; return k; } -#define MPN_REDC_X(rp, tp, mp, n, mip) \ - do { \ - if (redc_x == 1) \ - mpn_redc_1 (rp, tp, mp, n, mip[0]); \ - else if (redc_x == 2) \ - mpn_redc_2 (rp, tp, mp, n, mip); \ - else \ - mpn_redc_n (rp, tp, mp, n, mip); \ - } while (0) - - /* Convert U to REDC form, U_r = B^n * U mod M */ +/* Convert U to REDC form, U_r = B^n * U mod M */ static void -redcify (mp_ptr rp, mp_srcptr up, mp_size_t un, mp_srcptr mp, mp_size_t n) +redcify (mp_ptr rp, mp_srcptr up, mp_size_t un, mp_srcptr mp, mp_size_t n, mp_ptr tp) { - mp_ptr tp, qp; + mp_ptr qp; TMP_DECL; TMP_MARK; - tp = TMP_ALLOC_LIMBS (un + n); - qp = TMP_ALLOC_LIMBS (un + 1); /* FIXME: Put at tp+? */ + qp = tp + un + n; MPN_ZERO (tp, n); MPN_COPY (tp + n, up, un); @@ -139,118 +208,103 @@ } /* rp[n-1..0] = bp[bn-1..0] ^ ep[en-1..0] mod mp[n-1..0] - Requires that mp[n-1..0] is odd. + Requires that mp[n-1..0] is odd. FIXME: is this true? Requires that ep[en-1..0] is > 1. - Uses scratch space tp[3n..0], i.e., 3n+1 words. */ + Uses scratch space at tp of 3n+1 limbs. */ void mpn_powm_sec (mp_ptr rp, mp_srcptr bp, mp_size_t bn, mp_srcptr ep, mp_size_t en, mp_srcptr mp, mp_size_t n, mp_ptr tp) { - mp_limb_t mip[2]; + mp_limb_t minv; int cnt; - long ebi; + mp_bitcnt_t ebi; int windowsize, this_windowsize; mp_limb_t expbits; - mp_ptr pp, this_pp, last_pp; + mp_ptr pp, this_pp; long i; - int redc_x; + int cnd; TMP_DECL; - ASSERT (en > 1 || (en == 1 && ep[0] > 1)); + ASSERT (en > 1 || (en == 1 && ep[0] > 0)); ASSERT (n >= 1 && ((mp[0] & 1) != 0)); TMP_MARK; count_leading_zeros (cnt, ep[en - 1]); - ebi = en * GMP_LIMB_BITS - cnt; + ebi = (mp_bitcnt_t) en * GMP_LIMB_BITS - cnt; windowsize = win_size (ebi); - if (BELOW_THRESHOLD (n, REDC_2_THRESHOLD)) - { - binvert_limb (mip[0], mp[0]); - mip[0] = -mip[0]; - redc_x = 1; - } -#if defined (HAVE_NATIVE_mpn_addmul_2) - else - { - mpn_binvert (mip, mp, 2, tp); - mip[0] = -mip[0]; mip[1] = ~mip[1]; - redc_x = 2; - } -#endif -#if 0 - mpn_binvert (mip, mp, n, tp); - redc_x = 0; -#endif + binvert_limb (minv, mp[0]); + minv = -minv; - pp = TMP_ALLOC_LIMBS (n << windowsize); + pp = tp + 4 * n; this_pp = pp; this_pp[n] = 1; - redcify (this_pp, this_pp + n, 1, mp, n); + redcify (this_pp, this_pp + n, 1, mp, n, tp + 6 * n); this_pp += n; - redcify (this_pp, bp, bn, mp, n); + redcify (this_pp, bp, bn, mp, n, tp + 6 * n); /* Precompute powers of b and put them in the temporary area at pp. */ for (i = (1 << windowsize) - 2; i > 0; i--) { - last_pp = this_pp; + mpn_mul_basecase (tp, this_pp, n, pp + n, n); this_pp += n; - mpn_mul_n (tp, last_pp, pp + n, n); - MPN_REDC_X (this_pp, tp, mp, n, mip); + mpn_redc_1_sec (this_pp, tp, mp, n, minv); } expbits = getbits (ep, ebi, windowsize); - ebi -= windowsize; - if (ebi < 0) + if (ebi < windowsize) ebi = 0; + else + ebi -= windowsize; MPN_COPY (rp, pp + n * expbits, n); while (ebi != 0) { expbits = getbits (ep, ebi, windowsize); - ebi -= windowsize; this_windowsize = windowsize; - if (ebi < 0) + if (ebi < windowsize) { - this_windowsize += ebi; + this_windowsize -= windowsize - ebi; ebi = 0; } + else + ebi -= windowsize; do { - mpn_sqr_n (tp, rp, n); - MPN_REDC_X (rp, tp, mp, n, mip); + mpn_local_sqr (tp, rp, n, tp + 2 * n); + mpn_redc_1_sec (rp, tp, mp, n, minv); this_windowsize--; } while (this_windowsize != 0); #if WANT_CACHE_SECURITY mpn_tabselect (tp + 2*n, pp, n, 1 << windowsize, expbits); - mpn_mul_n (tp, rp, tp + 2*n, n); + mpn_mul_basecase (tp, rp, n, tp + 2*n, n); #else - mpn_mul_n (tp, rp, pp + n * expbits, n); + mpn_mul_basecase (tp, rp, n, pp + n * expbits, n); #endif - MPN_REDC_X (rp, tp, mp, n, mip); + mpn_redc_1_sec (rp, tp, mp, n, minv); } MPN_COPY (tp, rp, n); MPN_ZERO (tp + n, n); - MPN_REDC_X (rp, tp, mp, n, mip); - if (mpn_cmp (rp, mp, n) >= 0) - mpn_sub_n (rp, rp, mp, n); + mpn_redc_1_sec (rp, tp, mp, n, minv); + cnd = mpn_sub_n (tp, rp, mp, n); /* we need just retval */ + mpn_subcnd_n (rp, rp, mp, n, !cnd); TMP_FREE; } #if ! HAVE_NATIVE_mpn_tabselect /* Select entry `which' from table `tab', which has nents entries, each `n' limbs. Store the selected entry at rp. Reads entire table to avoid - sideband information leaks. O(n*nents). */ - + side-channel information leaks. O(n*nents). + FIXME: Move to its own file. */ void mpn_tabselect (volatile mp_limb_t *rp, volatile mp_limb_t *tab, mp_size_t n, mp_size_t nents, mp_size_t which) @@ -270,3 +324,17 @@ } } #endif + +mp_size_t +mpn_powm_sec_itch (mp_size_t bn, mp_size_t en, mp_size_t n) +{ + int windowsize; + mp_size_t redcify_itch, itch; + + windowsize = win_size (en * GMP_NUMB_BITS); /* slight over-estimate of exp */ + itch = 4 * n + (n << windowsize); + redcify_itch = 2 * bn + n + 1; + /* The 6n is due to the placement of reduce scratch 6n into the start of the + scratch area. */ + return MAX (itch, redcify_itch + 6 * n); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/pre_divrem_1.c gmp-5.0.2+dfsg/mpn/generic/pre_divrem_1.c --- gmp-4.3.2+dfsg/mpn/generic/pre_divrem_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/pre_divrem_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -32,8 +32,8 @@ /* Same test here for skipping one divide step as in mpn_divrem_1. The main reason for a separate shift==0 case is that not all CPUs give - zero for "n0 >> BITS_PER_MP_LIMB" which would arise in the general case - code used on shift==0. shift==0 is also reasonably common in __mp_bases + zero for "n0 >> GMP_LIMB_BITS" which would arise in the general case + code used on shift==0. shift==0 is also reasonably common in mp_bases big_base, for instance base==10 on a 64-bit limb. Under shift!=0 it would be possible to call mpn_lshift to adjust the @@ -106,14 +106,14 @@ } n1 = ap[size-1]; - r |= n1 >> (BITS_PER_MP_LIMB - shift); + r |= n1 >> (GMP_LIMB_BITS - shift); for (i = size-2; i >= 0; i--) { ASSERT (r < d); n0 = ap[i]; udiv_qrnnd_preinv (*qp, r, r, - ((n1 << shift) | (n0 >> (BITS_PER_MP_LIMB - shift))), + ((n1 << shift) | (n0 >> (GMP_LIMB_BITS - shift))), d, dinv); qp--; n1 = n0; diff -Nru gmp-4.3.2+dfsg/mpn/generic/random2.c gmp-5.0.2+dfsg/mpn/generic/random2.c --- gmp-4.3.2+dfsg/mpn/generic/random2.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/random2.c 2011-05-08 09:49:29.000000000 +0000 @@ -22,7 +22,7 @@ #include "gmp.h" #include "gmp-impl.h" -static void gmp_rrandomb __GMP_PROTO ((mp_ptr, gmp_randstate_t, unsigned long int)); +static void gmp_rrandomb __GMP_PROTO ((mp_ptr, gmp_randstate_t, mp_bitcnt_t)); /* Ask _gmp_rand for 32 bits per call unless that's more than a limb can hold. Thus, we get the same random number sequence in the common cases. @@ -54,9 +54,9 @@ } static void -gmp_rrandomb (mp_ptr rp, gmp_randstate_t rstate, unsigned long int nbits) +gmp_rrandomb (mp_ptr rp, gmp_randstate_t rstate, mp_bitcnt_t nbits) { - unsigned long int bi; + mp_bitcnt_t bi; mp_limb_t ranm; /* buffer for random bits */ unsigned cap_chunksize, chunksize; mp_size_t i; diff -Nru gmp-4.3.2+dfsg/mpn/generic/redc_1.c gmp-5.0.2+dfsg/mpn/generic/redc_1.c --- gmp-4.3.2+dfsg/mpn/generic/redc_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/redc_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -4,7 +4,7 @@ THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE. IT IS ONLY SAFE TO REACH THIS FUNCTION THROUGH DOCUMENTED INTERFACES. -Copyright (C) 2000, 2001, 2002, 2004, 2008 Free Software Foundation, Inc. +Copyright (C) 2000, 2001, 2002, 2004, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -30,11 +30,14 @@ mp_size_t j; mp_limb_t cy; + ASSERT (n > 0); ASSERT_MPN (up, 2*n); for (j = n - 1; j >= 0; j--) { - up[0] = mpn_addmul_1 (up, mp, n, (up[0] * invm) & GMP_NUMB_MASK); + cy = mpn_addmul_1 (up, mp, n, (up[0] * invm) & GMP_NUMB_MASK); + ASSERT (up[0] == 0); + up[0] = cy; up++; } cy = mpn_add_n (rp, up, up - n, n); diff -Nru gmp-4.3.2+dfsg/mpn/generic/redc_1_sec.c gmp-5.0.2+dfsg/mpn/generic/redc_1_sec.c --- gmp-4.3.2+dfsg/mpn/generic/redc_1_sec.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/redc_1_sec.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,45 @@ +/* mpn_redc_1_sec. Set cp[] <- up[]/R^n mod mp[]. Clobber up[]. + mp[] is n limbs; up[] is 2n limbs. + + THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH THIS FUNCTION THROUGH DOCUMENTED INTERFACES. + +Copyright (C) 2000, 2001, 2002, 2004, 2008, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +void +mpn_redc_1_sec (mp_ptr rp, mp_ptr up, mp_srcptr mp, mp_size_t n, mp_limb_t invm) +{ + mp_size_t j; + mp_limb_t cy; + + ASSERT (n > 0); + ASSERT_MPN (up, 2*n); + + for (j = n - 1; j >= 0; j--) + { + cy = mpn_addmul_1 (up, mp, n, (up[0] * invm) & GMP_NUMB_MASK); + ASSERT (up[0] == 0); + up[0] = cy; + up++; + } + cy = mpn_add_n (rp, up, up - n, n); + mpn_subcnd_n (rp, rp, mp, n, cy); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/redc_2.c gmp-5.0.2+dfsg/mpn/generic/redc_2.c --- gmp-4.3.2+dfsg/mpn/generic/redc_2.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/redc_2.c 2011-05-08 09:49:29.000000000 +0000 @@ -41,7 +41,7 @@ } #endif -#if defined (__ia64) && W_TYPE_SIZE == 64 +#if defined (__GNUC__) && defined (__ia64) && W_TYPE_SIZE == 64 #define umul2low(ph, pl, uh, ul, vh, vl) \ do { \ mp_limb_t _ph, _pl; \ @@ -74,6 +74,7 @@ mp_limb_t upn; mp_limb_t cy; + ASSERT (n > 0); ASSERT_MPN (up, 2*n); if ((n & 1) != 0) diff -Nru gmp-4.3.2+dfsg/mpn/generic/redc_n.c gmp-5.0.2+dfsg/mpn/generic/redc_n.c --- gmp-4.3.2+dfsg/mpn/generic/redc_n.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/redc_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,66 @@ +/* mpn_redc_n. Set cp[] <- up[]/R^n mod mp[]. Clobber up[]. + mp[] is n limbs; up[] is 2n limbs, the inverse ip[] is n limbs. + + THIS IS AN INTERNAL FUNCTION WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH THIS FUNCTION THROUGH DOCUMENTED INTERFACES. + +Copyright (C) 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +/* + TODO + + * We assume mpn_mulmod_bnm1 is always faster than plain mpn_mul_n (or a + future mpn_mulhi) for the range we will be called. Follow up that + assumption. + + * Decrease scratch usage. +*/ + +void +mpn_redc_n (mp_ptr rp, mp_ptr up, mp_srcptr mp, mp_size_t n, mp_srcptr ip) +{ + mp_ptr xp, yp, scratch; + mp_limb_t cy; + mp_size_t rn; + TMP_DECL; + TMP_MARK; + + rn = mpn_mulmod_bnm1_next_size (n); + + scratch = TMP_ALLOC_LIMBS (n + rn + mpn_mulmod_bnm1_itch (rn, n, n)); + + xp = scratch; + mpn_mullo_n (xp, up, ip, n); + + yp = scratch + n; + mpn_mulmod_bnm1 (yp, rn, xp, n, mp, n, scratch + n + rn); + + ASSERT_ALWAYS (2 * n > rn); /* could handle this */ + + cy = mpn_sub_n (yp + rn, yp, up, 2*n - rn); /* undo wrap around */ + MPN_DECR_U (yp + 2*n - rn, rn, cy); + + cy = mpn_sub_n (rp, up + n, yp + n, n); + if (cy != 0) + mpn_add_n (rp, rp, mp, n); + + TMP_FREE; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/remove.c gmp-5.0.2+dfsg/mpn/generic/remove.c --- gmp-4.3.2+dfsg/mpn/generic/remove.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/remove.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,143 @@ +/* mpn_remove -- divide out all multiples of odd mpn number from another mpn + number. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +#if GMP_LIMB_BITS > 50 +#define LOG 50 +#else +#define LOG GMP_LIMB_BITS +#endif + + +/* Input: U = {up,un}, V = {vp,vn} must be odd, cap + Ouput W = {wp,*wn} allocation need is exactly *wn + + Set W = U / V^k, where k is the largest integer <= cap such that the + division yields an integer. + + FIXME: We currently allow any operand overlap. This is quite non mpn-ish + and might be changed, since it cost significant temporary space. + * If we require W to have space for un limbs, we could save qp or qp2 (but + we will still need to copy things into wp 50% of the time). + * If we allow ourselves to clobber U, we could save the other of qp and qp2. +*/ + +mp_bitcnt_t +mpn_remove (mp_ptr wp, mp_size_t *wn, + mp_ptr up, mp_size_t un, mp_ptr vp, mp_size_t vn, + mp_bitcnt_t cap) +{ + mp_ptr pwpsp[LOG]; + mp_size_t pwpsn[LOG]; + mp_size_t npowers; + mp_ptr tp, qp, np, pp, qp2, scratch_out; + mp_size_t pn, nn, qn, i; + mp_bitcnt_t pwr; + TMP_DECL; + + ASSERT (un > 0); + ASSERT (vn > 0); + ASSERT (vp[0] % 2 != 0); /* 2-adic division wants odd numbers */ + ASSERT (vn > 1 || vp[0] > 1); /* else we would loop indefinitely */ + + TMP_MARK; + + tp = TMP_ALLOC_LIMBS ((un + vn) / 2); /* remainder */ + qp = TMP_ALLOC_LIMBS (un); /* quotient, alternating */ + qp2 = TMP_ALLOC_LIMBS (un); /* quotient, alternating */ + np = TMP_ALLOC_LIMBS (un + LOG); /* powers of V */ + pp = vp; + pn = vn; + + /* FIXME: This allocation need indicate a flaw in the current itch mechanism: + Which operands not greater than un,un will incur the worst itch? We need + a parallel foo_maxitch set of functions. */ + scratch_out = TMP_ALLOC_LIMBS (mpn_bdiv_qr_itch (un, un >> 1)); + + MPN_COPY (qp, up, un); + qn = un; + + npowers = 0; + while (qn >= pn) + { + mpn_bdiv_qr (qp2, tp, qp, qn, pp, pn, scratch_out); + if (!mpn_zero_p (tp, pn)) + break; /* could not divide by V^npowers */ + + MP_PTR_SWAP (qp, qp2); + qn = qn - pn; + qn += qp[qn] != 0; + + pwpsp[npowers] = pp; + pwpsn[npowers] = pn; + npowers++; + + if (((mp_bitcnt_t) 2 << npowers) - 1 > cap) + break; + + nn = 2 * pn - 1; /* next power will be at least this many limbs */ + if (nn > qn) + break; /* next power would be overlarge */ + + mpn_sqr (np, pp, pn); + nn += np[nn] != 0; + pp = np; + pn = nn; + np += nn; + } + + pwr = ((mp_bitcnt_t) 1 << npowers) - 1; + + for (i = npowers - 1; i >= 0; i--) + { + pp = pwpsp[i]; + pn = pwpsn[i]; + if (qn < pn) + continue; + + if (pwr + ((mp_bitcnt_t) 1 << i) > cap) + continue; /* V^i would bring us past cap */ + + mpn_bdiv_qr (qp2, tp, qp, qn, pp, pn, scratch_out); + if (!mpn_zero_p (tp, pn)) + continue; /* could not divide by V^i */ + + MP_PTR_SWAP (qp, qp2); + qn = qn - pn; + qn += qp[qn] != 0; + + pwr += (mp_bitcnt_t) 1 << i; + } + + MPN_COPY (wp, qp, qn); + *wn = qn; + + TMP_FREE; + + return pwr; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/rootrem.c gmp-5.0.2+dfsg/mpn/generic/rootrem.c --- gmp-4.3.2+dfsg/mpn/generic/rootrem.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/rootrem.c 2011-05-08 09:49:29.000000000 +0000 @@ -8,7 +8,7 @@ ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT'S ALMOST GUARANTEED THAT THEY'LL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2002, 2005, 2009 Free Software Foundation, Inc. +Copyright 2002, 2005, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -26,11 +26,8 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ /* FIXME: - (a) Once there is a native mpn_tdiv_q function in GMP (division without - remainder), replace the quick-and-dirty implementation below by it. - (b) The implementation below is not optimal when remp == NULL, since the - complexity is M(n) where n is the input size, whereas it should be - only M(n/k) on average. + This implementation is not optimal when remp == NULL, since the complexity + is M(n), whereas it should be M(n/k) on average. */ #include /* for NULL */ @@ -41,8 +38,6 @@ static mp_size_t mpn_rootrem_internal (mp_ptr, mp_ptr, mp_srcptr, mp_size_t, mp_limb_t, int); -static void mpn_tdiv_q (mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t, - mp_srcptr, mp_size_t); #define MPN_RSHIFT(cy,rp,up,un,cnt) \ do { \ @@ -124,7 +119,7 @@ mpn_rootrem_internal (mp_ptr rootp, mp_ptr remp, mp_srcptr up, mp_size_t un, mp_limb_t k, int approx) { - mp_ptr qp, rp, sp, wp; + mp_ptr qp, rp, sp, wp, scratch; mp_size_t qn, rn, sn, wn, nl, bn; mp_limb_t save, save2, cy; unsigned long int unb; /* number of significant bits of {up,un} */ @@ -150,9 +145,15 @@ qp = TMP_ALLOC_LIMBS (un + EXTRA); /* will contain quotient and remainder of R/(k*S^(k-1)), and S^k */ if (remp == NULL) - rp = TMP_ALLOC_LIMBS (un); /* will contain the remainder */ + { + rp = TMP_ALLOC_LIMBS (un + 1); /* will contain the remainder */ + scratch = rp; /* used by mpn_div_q */ + } else - rp = remp; + { + scratch = TMP_ALLOC_LIMBS (un + 1); /* used by mpn_div_q */ + rp = remp; + } sp = rootp; wp = TMP_ALLOC_LIMBS (un + EXTRA); /* will contain S^(k-1), k*S^(k-1), and temporary for mpn_pow_1 */ @@ -297,7 +298,7 @@ The quotient needs rn-wn+1 limbs, thus quotient+remainder need altogether rn+1 limbs. */ tp = qp + qn + 1; /* put remainder in Q buffer */ - mpn_tdiv_q (qp, tp, 0, rp, rn, wp, wn); + mpn_div_q (qp, rp, rn, wp, wn, scratch); qn += qp[qn] != 0; } @@ -405,47 +406,3 @@ TMP_FREE; return rn; } - -/* return the quotient Q = {np, nn} divided by {dp, dn} only */ -static void -mpn_tdiv_q (mp_ptr qp, mp_ptr rp, mp_size_t qxn, mp_srcptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn) -{ - mp_size_t qn = nn - dn; /* expected quotient size is qn+1 */ - mp_size_t cut; - - ASSERT_ALWAYS (qxn == 0); - if (dn <= qn + 3) - { - mpn_tdiv_qr (qp, rp, 0, np, nn, dp, dn); - } - else - { - mp_ptr tp; - TMP_DECL; - TMP_MARK; - tp = TMP_ALLOC_LIMBS (qn + 2); - cut = dn - (qn + 3); - /* perform a first division with divisor cut to dn-cut=qn+3 limbs - and dividend to nn-(cut-1) limbs, i.e. the quotient will be one - limb more than the final quotient. - The quotient will have qn+2 < dn-cut limbs, - and the remainder dn-cut = qn+3 limbs. */ - mpn_tdiv_qr (tp, rp, 0, np + cut - 1, nn - cut + 1, dp + cut, dn - cut); - /* let Q' be the quotient of B * {np, nn} by {dp, dn} [qn+2 limbs] - and T be the approximation of Q' computed above, where - B = 2^GMP_NUMB_BITS. - We have Q' <= T <= Q'+1, and since floor(Q'/B) = Q, we have - Q = floor(T/B), unless the last limb of T only consists of zeroes. */ - if (tp[0] != 0) - { - /* simply truncate one limb of T */ - MPN_COPY (qp, tp + 1, qn + 1); - } - else /* too bad: perform the expensive division */ - { - mpn_tdiv_qr (qp, rp, 0, np, nn, dp, dn); - } - TMP_FREE; - } -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sb_bdiv_q.c gmp-5.0.2+dfsg/mpn/generic/sb_bdiv_q.c --- gmp-4.3.2+dfsg/mpn/generic/sb_bdiv_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sb_bdiv_q.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -/* mpn_sb_bdiv_q -- schoolbook Hensel division with precomputed inverse, - returning quotient only. - - Contributed to the GNU project by Niels Möller. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL FUNCTIONS WITH MUTABLE INTERFACES. - IT IS ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY'LL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. - -Copyright 2005, 2006 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - - -/* Computes Q = N / D mod B^nn, destroys N. - Clobbers N. - - D must be odd. dinv is (-D)^-1 mod B. - - - The straightforward way to compute Q is to cancel one limb at a time, using - - qp[i] = D^{-1} * np[i] (mod B) - N -= B^i * qp[i] * D - - But we prefer addition to subtraction, since mpn_addmul_1 is often faster - than mpn_submul_1. Q = - N / D can be computed by iterating - - qp[i] = (-D)^{-1} * np[i] (mod B) - N += B^i * qp[i] * D - - And then we flip the sign, -Q = (not Q) + 1. -*/ - -void -mpn_sb_bdiv_q (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn, - mp_limb_t dinv) -{ - mp_size_t i; - mp_limb_t qh; - - ASSERT (nn > 0); - ASSERT (dn > 0); - ASSERT (nn >= dn); - ASSERT (dp[0] & 1); - - for (i = 0; i < nn - dn; i++) - { - mp_limb_t cy; - mp_limb_t q; - - q = dinv * np[i]; - qp[i] = ~q; - cy = mpn_addmul_1 (np + i, dp, dn, q); - mpn_add_1 (np + i + dn, np + i + dn, nn - i - dn, cy); - ASSERT (np[i] == 0); - } - - for (; i < nn - 1; i++) - { - mp_limb_t q; - - q = dinv * np[i]; - qp[i] = ~q; - mpn_addmul_1 (np + i, dp, nn - i, q); - - ASSERT (np[i] == 0); - } - - /* Final limb */ - qp[nn - 1] = ~(dinv * np[nn - 1]); - qh = mpn_add_1 (qp, qp, nn, 1); /* FIXME: can we get carry? */ -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sb_bdiv_qr.c gmp-5.0.2+dfsg/mpn/generic/sb_bdiv_qr.c --- gmp-4.3.2+dfsg/mpn/generic/sb_bdiv_qr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sb_bdiv_qr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,108 +0,0 @@ -/* mpn_sb_bdiv_qr -- schoolbook Hensel division with precomputed inverse, - returning quotient and remainder. - - Contributed to the GNU project by Niels Möller. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL FUNCTIONS WITH MUTABLE INTERFACES. - IT IS ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. - -Copyright 2006 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - - -/* Computes a binary quotient of size qn = nn - dn. - Output: - - Q = N * D^{-1} mod B^qn, - - R = (N - Q * D) * B^(-qn) - - Stores the dn least significant limbs of R at {np + nn - dn, dn}, - and returns the borrow from the subtraction N - Q*D. - - D must be odd. dinv is (-D)^-1 mod B. */ - -mp_limb_t -mpn_sb_bdiv_qr (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) -{ - mp_size_t qn; - mp_size_t i; - mp_limb_t rh; - mp_limb_t ql; - - ASSERT (nn > 0); - ASSERT (dn > 0); - ASSERT (nn > dn); - ASSERT (dp[0] & 1); - - qn = nn - dn; - - rh = 0; - - /* To complete the negation, this value is added to q. */ - ql = 1; - while (qn > dn) - { - for (i = 0; i < dn; i++) - { - mp_limb_t q; - - q = dinv * np[i]; - qp[i] = ~q; - - np[i] = mpn_addmul_1 (np + i, dp, dn, q); - } - rh += mpn_add (np + dn, np + dn, qn, np, dn); - ql = mpn_add_1 (qp, qp, dn, ql); - - qp += dn; qn -= dn; - np += dn; nn -= dn; - } - - for (i = 0; i < qn; i++) - { - mp_limb_t q; - - q = dinv * np[i]; - qp[i] = ~q; - - np[i] = mpn_addmul_1 (np + i, dp, dn, q); - } - - rh += mpn_add_n (np + dn, np + dn, np, qn); - ql = mpn_add_1 (qp, qp, qn, ql); - - if (UNLIKELY (ql > 0)) - { - /* q == 0 */ - ASSERT (rh == 0); - return 0; - } - else - { - mp_limb_t cy; - - cy = mpn_sub_n (np + qn, np + qn, dp, dn); - ASSERT (cy >= rh); - return cy - rh; - } -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sb_divappr_q.c gmp-5.0.2+dfsg/mpn/generic/sb_divappr_q.c --- gmp-4.3.2+dfsg/mpn/generic/sb_divappr_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sb_divappr_q.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,136 +0,0 @@ -/* mpn_sb_divappr_q -- schoolbook division with 2-limb sloppy non-greater - precomputed inverse, returning approximate quotient. - - Contributed to the GNU project by Torbjörn Granlund. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. - -Copyright 2006, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" - -/* - CAVEATS: - 1. Should it demand normalized operands like now, or normalize on-the-fly? - 2. Overwrites {np,nn}. - 3. Uses mpn_submul_1. It would be nice to somehow make it use mpn_addmul_1 - instead. (That would open for mpn_addmul_2 straightforwardly.) -*/ - -mp_limb_t -mpn_sb_divappr_q (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn, - mp_srcptr dip) -{ - mp_limb_t q, q10, q01a, q00a, q01b, q00b; - mp_limb_t cy; - mp_size_t i; - mp_limb_t qh; - mp_limb_t di1, di0; - mp_size_t qn; - - ASSERT (dn > 0); - ASSERT (nn >= dn); - ASSERT ((dp[dn-1] & GMP_NUMB_HIGHBIT) != 0); - ASSERT (! MPN_OVERLAP_P (np, nn, dp, dn)); - ASSERT (! MPN_OVERLAP_P (qp, nn-dn, dp, dn)); - ASSERT (! MPN_OVERLAP_P (qp, nn-dn, np, nn) || qp+dn >= np); - ASSERT_MPN (np, nn); - ASSERT_MPN (dp, dn); - - np += nn; - qn = nn - dn; - if (qn + 1 < dn) - { - dp += dn - (qn + 1); - dn = qn + 1; - } - - qh = mpn_cmp (np - dn, dp, dn) >= 0; - if (qh != 0) - mpn_sub_n (np - dn, np - dn, dp, dn); - - qp += qn; - di1 = dip[1]; di0 = dip[0]; - for (i = qn; i >= dn; i--) - { - np--; - umul_ppmm (q, q10, np[0], di1); - umul_ppmm (q01a, q00a, np[-1], di1); - add_ssaaaa (q, q10, q, q10, np[0], q01a); - umul_ppmm (q01b, q00b, np[0], di0); - add_ssaaaa (q, q10, q, q10, 0, q01b); - add_ssaaaa (q, q10, q, q10, 0, np[-1]); - - cy = mpn_submul_1 (np - dn, dp, dn, q); - - if (UNLIKELY (np[0] > cy || mpn_cmp (np - dn, dp, dn) >= 0)) - { - q = q + 1; - mpn_sub_n (np - dn, np - dn, dp, dn); - } - - *--qp = q; - } - - for (i = dn - 1; i > 0; i--) - { - np--; - umul_ppmm (q, q10, np[0], di1); - umul_ppmm (q01a, q00a, np[-1], di1); - add_ssaaaa (q, q10, q, q10, np[0], q01a); - umul_ppmm (q01b, q00b, np[0], di0); - add_ssaaaa (q, q10, q, q10, 0, q01b); - add_ssaaaa (q, q10, q, q10, 0, np[-1]); - - cy = mpn_submul_1 (np - dn, dp, dn, q); - - if (UNLIKELY (np[0] > cy || mpn_cmp (np - dn, dp, dn) >= 0)) - { - q = q + 1; - if (q == 0) - q = GMP_NUMB_MAX; - else - mpn_sub_n (np - dn, np - dn, dp, dn); - } - - *--qp = q; - - /* Truncate operands. */ - dn--; - dp++; - - /* The partial remainder might be equal to the truncated divisor, - thus non-canonical. When that happens, the rest of the quotient - should be all ones. */ - if (UNLIKELY (mpn_cmp (np - dn, dp, dn) == 0)) - { - while (--i) - *--qp = GMP_NUMB_MAX; - break; - } - } - - return qh; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sb_div_q.c gmp-5.0.2+dfsg/mpn/generic/sb_div_q.c --- gmp-4.3.2+dfsg/mpn/generic/sb_div_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sb_div_q.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,240 +0,0 @@ -/* mpn_sb_div_q -- schoolbook division with 2-limb sloppy non-greater - precomputed inverse, returning an accurate quotient. - - Contributed to the GNU project by Torbjörn Granlund. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. - -Copyright 2006, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" - -/* - CAVEATS: - 1. Should it demand normalized operands like now, or normalize on-the-fly? - 2. Overwrites {np,nn}. - 3. Uses mpn_submul_1. It would be nice to somehow make it use mpn_addmul_1 - instead. (That would open for mpn_addmul_2 straightforwardly.) -*/ - -mp_limb_t -mpn_sb_div_q (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn, - mp_srcptr dip) -{ - mp_limb_t q, q10, q01a, q00a, q01b, q00b; - mp_limb_t cy; - mp_size_t i; - mp_limb_t qh; - mp_limb_t di1, di0; - mp_size_t qn; - - mp_size_t dn_orig = dn; - mp_srcptr dp_orig = dp; - mp_ptr np_orig = np; - - ASSERT (dn > 0); - ASSERT (nn >= dn); - ASSERT ((dp[dn-1] & GMP_NUMB_HIGHBIT) != 0); - ASSERT (! MPN_OVERLAP_P (np, nn, dp, dn)); - ASSERT (! MPN_OVERLAP_P (qp, nn-dn, dp, dn)); - ASSERT (! MPN_OVERLAP_P (qp, nn-dn, np, nn) || qp+dn >= np); - ASSERT_MPN (np, nn); - ASSERT_MPN (dp, dn); - - np += nn; - qn = nn - dn; - if (qn + 1 < dn) - { - dp += dn - (qn + 1); - dn = qn + 1; - } - - qh = mpn_cmp (np - dn, dp, dn) >= 0; - if (qh != 0) - mpn_sub_n (np - dn, np - dn, dp, dn); - - qp += qn; - di1 = dip[1]; di0 = dip[0]; - for (i = qn; i >= dn; i--) - { - np--; - umul_ppmm (q, q10, np[0], di1); - umul_ppmm (q01a, q00a, np[-1], di1); - add_ssaaaa (q, q10, q, q10, np[0], q01a); - umul_ppmm (q01b, q00b, np[0], di0); - add_ssaaaa (q, q10, q, q10, 0, q01b); - add_ssaaaa (q, q10, q, q10, 0, np[-1]); - - cy = mpn_submul_1 (np - dn, dp, dn, q); - - if (UNLIKELY (np[0] > cy || mpn_cmp (np - dn, dp, dn) >= 0)) - { - q = q + 1; - mpn_sub_n (np - dn, np - dn, dp, dn); - } - - *--qp = q; - } - - for (i = dn - 1; i > 0; i--) - { - np--; - umul_ppmm (q, q10, np[0], di1); - umul_ppmm (q01a, q00a, np[-1], di1); - add_ssaaaa (q, q10, q, q10, np[0], q01a); - umul_ppmm (q01b, q00b, np[0], di0); - add_ssaaaa (q, q10, q, q10, 0, q01b); - add_ssaaaa (q, q10, q, q10, 0, np[-1]); - - cy = mpn_submul_1 (np - dn, dp, dn, q); - - if (UNLIKELY (np[0] > cy || mpn_cmp (np - dn, dp, dn) >= 0)) - { - q = q + 1; - if (q == 0) - q = GMP_NUMB_MAX; - else - mpn_sub_n (np - dn, np - dn, dp, dn); - } - - *--qp = q; - - /* Truncate operands. */ - dn--; - dp++; - - /* The partial remainder might be equal to the truncated divisor, - thus non-canonical. When that happens, the rest of the quotient - should be all ones. */ - if (UNLIKELY (mpn_cmp (np - dn, dp, dn) == 0)) - { - while (--i) - *--qp = GMP_NUMB_MAX; - break; - } - } - - dn = dn_orig; - if (UNLIKELY (np[-1] < dn)) - { - mp_limb_t q, x; - - /* The quotient may be too large if the remainder is small. Recompute - for above ignored operand parts, until the remainder spills. - - FIXME: The quality of this code isn't the same as the code above. - 1. We don't compute things in an optimal order, high-to-low, in order - to terminate as quickly as possible. - 2. We mess with pointers and sizes, adding and subtracting and - adjusting to get things right. It surely could be streamlined. - 3. The only termination criteria are that we determine that the - quotient needs to be adjusted, or that we have recomputed - everything. We should stop when the remainder is so large - that no additional subtracting could make it spill. - 4. If nothing else, we should not do two loops of submul_1 over the - data, instead handle both the triangularization and chopping at - once. */ - - x = np[-1]; - - if (dn > 2) - { - /* Compensate for triangularization. */ - mp_limb_t y; - - dp = dp_orig; - if (qn + 1 < dn) - { - dp += dn - (qn + 1); - dn = qn + 1; - } - - y = np[-2]; - - for (i = dn - 3; i >= 0; i--) - { - q = qp[i]; - cy = mpn_submul_1 (np - (dn - i), dp, dn - i - 2, q); - - if (y < cy) - { - if (x == 0) - { - cy = mpn_sub_1 (qp, qp, qn, 1); - ASSERT_ALWAYS (cy == 0); - return qh - cy; - } - x--; - } - y -= cy; - } - np[-2] = y; - } - - dn = dn_orig; - if (qn + 1 < dn) - { - /* Compensate for ignored dividend and divisor tails. */ - - if (qn == 0) - return qh; - - dp = dp_orig; - np = np_orig; - - if (qh != 0) - { - cy = mpn_sub_n (np + qn, np + qn, dp, dn - (qn + 1)); - if (cy != 0) - { - if (x == 0) - { - cy = mpn_sub_1 (qp, qp, qn, 1); - return qh - cy; - } - x--; - } - } - - for (i = dn - qn - 2; i >= 0; i--) - { - cy = mpn_submul_1 (np + i, qp, qn, dp[i]); - cy = mpn_sub_1 (np + qn + i, np + qn + i, dn - qn - i - 1, cy); - if (cy != 0) - { - if (x == 0) - { - cy = mpn_sub_1 (qp, qp, qn, 1); - ASSERT_ALWAYS (cy == 0); - return qh - cy; - } - x--; - } - } - } - } - - return qh; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sb_div_qr.c gmp-5.0.2+dfsg/mpn/generic/sb_div_qr.c --- gmp-4.3.2+dfsg/mpn/generic/sb_div_qr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sb_div_qr.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,91 +0,0 @@ -/* mpn_sb_div_qr -- schoolbook division with 2-limb sloppy non-greater - precomputed inverse, returning quotient and remainder. - - Contributed to the GNU project by Torbjörn Granlund. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH A MUTABLE INTERFACE. IT IS - ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS - ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP - RELEASE. - -Copyright 2006, 2007 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" - -/* - CAVEATS: - 1. Should it demand normalized operands like now, or normalize on-the-fly? - 2. Overwrites {np,nn} instead of writing remainder to a designated area. - 3. Uses mpn_submul_1. It would be nice to somehow make it use mpn_addmul_1 - instead. (That would open for mpn_addmul_2 straightforwardly.) -*/ - -mp_limb_t -mpn_sb_div_qr (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn, - mp_srcptr dip) -{ - mp_limb_t q, q10, q01a, q00a, q01b, q00b; - mp_limb_t cy; - mp_size_t i; - mp_limb_t qh; - mp_limb_t di1, di0; - - ASSERT (dn > 0); - ASSERT (nn >= dn); - ASSERT ((dp[dn-1] & GMP_NUMB_HIGHBIT) != 0); - ASSERT (! MPN_OVERLAP_P (np, nn, dp, dn)); - ASSERT (! MPN_OVERLAP_P (qp, nn-dn, dp, dn)); - ASSERT (! MPN_OVERLAP_P (qp, nn-dn, np, nn) || qp+dn >= np); - ASSERT_MPN (np, nn); - ASSERT_MPN (dp, dn); - - np += nn; - - qh = mpn_cmp (np - dn, dp, dn) >= 0; - if (qh != 0) - mpn_sub_n (np - dn, np - dn, dp, dn); - - qp += nn - dn; - di1 = dip[1]; di0 = dip[0]; - for (i = nn - dn; i > 0; i--) - { - np--; - umul_ppmm (q, q10, np[0], di1); - umul_ppmm (q01a, q00a, np[-1], di1); - add_ssaaaa (q, q10, q, q10, np[0], q01a); - umul_ppmm (q01b, q00b, np[0], di0); - add_ssaaaa (q, q10, q, q10, 0, q01b); - add_ssaaaa (q, q10, q, q10, 0, np[-1]); - - cy = mpn_submul_1 (np - dn, dp, dn, q); - - if (UNLIKELY (np[0] > cy || mpn_cmp (np - dn, dp, dn) >= 0)) - { - q = q + 1; - mpn_sub_n (np - dn, np - dn, dp, dn); - } - - *--qp = q; - } - - return qh; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sb_divrem_mn.c gmp-5.0.2+dfsg/mpn/generic/sb_divrem_mn.c --- gmp-4.3.2+dfsg/mpn/generic/sb_divrem_mn.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sb_divrem_mn.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,205 +0,0 @@ -/* mpn_sb_divrem_mn -- Divide natural numbers, producing both remainder and - quotient. - - THE FUNCTIONS IN THIS FILE ARE INTERNAL FUNCTIONS WITH MUTABLE - INTERFACES. IT IS ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. - IN FACT, IT IS ALMOST GUARANTEED THAT THEY'LL CHANGE OR DISAPPEAR IN A - FUTURE GNU MP RELEASE. - - -Copyright 1993, 1994, 1995, 1996, 2000, 2001, 2002 Free Software Foundation, -Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" -#include "longlong.h" - - -/* The size where udiv_qrnnd_preinv should be used rather than udiv_qrnnd, - meaning the quotient size where that should happen, the quotient size - being how many udiv divisions will be done. - - The default is to use preinv always, CPUs where this doesn't suit have - tuned thresholds. Note in particular that preinv should certainly be - used if that's the only division available (USE_PREINV_ALWAYS). */ - -#ifndef DIV_SB_PREINV_THRESHOLD -#define DIV_SB_PREINV_THRESHOLD 0 -#endif - - -/* Divide num (NP/NSIZE) by den (DP/DSIZE) and write - the NSIZE-DSIZE least significant quotient limbs at QP - and the DSIZE long remainder at NP. - Return the most significant limb of the quotient, this is always 0 or 1. - - Preconditions: - 0. NSIZE >= DSIZE. - 1. The most significant bit of the divisor must be set. - 2. QP must either not overlap with the input operands at all, or - QP + DSIZE >= NP must hold true. (This means that it's - possible to put the quotient in the high part of NUM, right after the - remainder in NUM. - 3. NSIZE >= DSIZE. - 4. DSIZE > 2. */ - - -mp_limb_t -mpn_sb_divrem_mn (mp_ptr qp, - mp_ptr np, mp_size_t nn, - mp_srcptr dp, mp_size_t dn) -{ - mp_limb_t most_significant_q_limb = 0; - mp_size_t qn = nn - dn; - mp_size_t i; - mp_limb_t dx, d1, n0; - mp_limb_t dxinv; - int use_preinv; - - ASSERT (dn > 2); - ASSERT (nn >= dn); - ASSERT (dp[dn-1] & GMP_NUMB_HIGHBIT); - ASSERT (! MPN_OVERLAP_P (np, nn, dp, dn)); - ASSERT (! MPN_OVERLAP_P (qp, nn-dn, dp, dn)); - ASSERT (! MPN_OVERLAP_P (qp, nn-dn, np, nn) || qp+dn >= np); - ASSERT_MPN (np, nn); - ASSERT_MPN (dp, dn); - - np += qn; - dx = dp[dn - 1]; - d1 = dp[dn - 2]; - n0 = np[dn - 1]; - - if (n0 >= dx) - { - if (n0 > dx || mpn_cmp (np, dp, dn - 1) >= 0) - { - mpn_sub_n (np, np, dp, dn); - most_significant_q_limb = 1; - } - } - - use_preinv = ABOVE_THRESHOLD (qn, DIV_SB_PREINV_THRESHOLD); - if (use_preinv) - invert_limb (dxinv, dx); - - for (i = qn - 1; i >= 0; i--) - { - mp_limb_t q; - mp_limb_t nx; - mp_limb_t cy_limb; - - nx = np[dn - 1]; /* FIXME: could get value from r1 */ - np--; - - if (nx == dx) - { - /* This might over-estimate q, but it's probably not worth - the extra code here to find out. */ - q = GMP_NUMB_MASK; - -#if 1 - cy_limb = mpn_submul_1 (np, dp, dn, q); -#else - /* This should be faster on many machines */ - cy_limb = mpn_sub_n (np + 1, np + 1, dp, dn); - cy = mpn_add_n (np, np, dp, dn); - np[dn] += cy; -#endif - - if (nx != cy_limb) - { - mpn_add_n (np, np, dp, dn); - q--; - } - - qp[i] = q; - } - else - { - mp_limb_t rx, r1, r0, p1, p0; - - /* "workaround" avoids a problem with gcc 2.7.2.3 i386 register usage - when np[dn-1] is used in an asm statement like umul_ppmm in - udiv_qrnnd_preinv. The symptom is seg faults due to registers - being clobbered. gcc 2.95 i386 doesn't have the problem. */ - { - mp_limb_t workaround = np[dn - 1]; - if (CACHED_ABOVE_THRESHOLD (use_preinv, DIV_SB_PREINV_THRESHOLD)) - udiv_qrnnd_preinv (q, r1, nx, workaround, dx, dxinv); - else - { - udiv_qrnnd (q, r1, nx, workaround << GMP_NAIL_BITS, - dx << GMP_NAIL_BITS); - r1 >>= GMP_NAIL_BITS; - } - } - umul_ppmm (p1, p0, d1, q << GMP_NAIL_BITS); - p0 >>= GMP_NAIL_BITS; - - r0 = np[dn - 2]; - rx = 0; - if (r1 < p1 || (r1 == p1 && r0 < p0)) - { - p1 -= p0 < d1; - p0 = (p0 - d1) & GMP_NUMB_MASK; - q--; - r1 = (r1 + dx) & GMP_NUMB_MASK; - rx = r1 < dx; - } - - p1 += r0 < p0; /* cannot carry! */ - rx -= r1 < p1; /* may become 11..1 if q is still too large */ - r1 = (r1 - p1) & GMP_NUMB_MASK; - r0 = (r0 - p0) & GMP_NUMB_MASK; - - cy_limb = mpn_submul_1 (np, dp, dn - 2, q); - - /* Check if we've over-estimated q, and adjust as needed. */ - { - mp_limb_t cy1, cy2; - cy1 = r0 < cy_limb; - r0 = (r0 - cy_limb) & GMP_NUMB_MASK; - cy2 = r1 < cy1; - r1 -= cy1; - np[dn - 1] = r1; - np[dn - 2] = r0; - if (cy2 != rx) - { - mpn_add_n (np, np, dp, dn); - q--; - } - } - qp[i] = q; - } - } - - /* ______ ______ ______ - |__rx__|__r1__|__r0__| partial remainder - ______ ______ - - |__p1__|__p0__| partial product to subtract - ______ ______ - - |______|cylimb| - - rx is -1, 0 or 1. If rx=1, then q is correct (it should match - carry out). If rx=-1 then q is too large. If rx=0, then q might - be too large, but it is most likely correct. - */ - - return most_significant_q_limb; -} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sbpi1_bdiv_q.c gmp-5.0.2+dfsg/mpn/generic/sbpi1_bdiv_q.c --- gmp-4.3.2+dfsg/mpn/generic/sbpi1_bdiv_q.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sbpi1_bdiv_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,87 @@ +/* mpn_sbpi1_bdiv_q -- schoolbook Hensel division with precomputed inverse, + returning quotient only. + + Contributed to the GNU project by Niels Möller. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL FUNCTIONS WITH MUTABLE INTERFACES. + IT IS ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS + ALMOST GUARANTEED THAT THEY'LL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2005, 2006, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + + +/* Computes Q = N / D mod B^nn, destroys N. + + D must be odd. dinv is (-D)^-1 mod B. + + + The straightforward way to compute Q is to cancel one limb at a time, using + + qp[i] = D^{-1} * np[i] (mod B) + N -= B^i * qp[i] * D + + But we prefer addition to subtraction, since mpn_addmul_1 is often faster + than mpn_submul_1. Q = - N / D can be computed by iterating + + qp[i] = (-D)^{-1} * np[i] (mod B) + N += B^i * qp[i] * D + + And then we flip the sign, -Q = (not Q) + 1. */ + +void +mpn_sbpi1_bdiv_q (mp_ptr qp, + mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, + mp_limb_t dinv) +{ + mp_size_t i; + mp_limb_t cy, q; + + ASSERT (dn > 0); + ASSERT (nn >= dn); + ASSERT ((dp[0] & 1) != 0); + + for (i = nn - dn; i > 0; i--) + { + q = dinv * np[0]; + qp[0] = ~q; + qp++; + cy = mpn_addmul_1 (np, dp, dn, q); + mpn_add_1 (np + dn, np + dn, i, cy); + ASSERT (np[0] == 0); + np++; + } + + for (i = dn; i > 1; i--) + { + q = dinv * np[0]; + qp[0] = ~q; + qp++; + mpn_addmul_1 (np, dp, i, q); + ASSERT (np[0] == 0); + np++; + } + + /* Final limb */ + q = dinv * np[0]; + qp[0] = ~q; + mpn_add_1 (qp - nn + 1, qp - nn + 1, nn, 1); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sbpi1_bdiv_qr.c gmp-5.0.2+dfsg/mpn/generic/sbpi1_bdiv_qr.c --- gmp-4.3.2+dfsg/mpn/generic/sbpi1_bdiv_qr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sbpi1_bdiv_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,108 @@ +/* mpn_sbpi1_bdiv_qr -- schoolbook Hensel division with precomputed inverse, + returning quotient and remainder. + + Contributed to the GNU project by Niels Möller. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL FUNCTIONS WITH MUTABLE INTERFACES. + IT IS ONLY SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS + ALMOST GUARANTEED THAT THEY'LL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2006, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + + +/* Computes a binary quotient of size qn = nn - dn. + Output: + + Q = N * D^{-1} mod B^qn, + + R = (N - Q * D) * B^(-qn) + + Stores the dn least significant limbs of R at {np + nn - dn, dn}, + and returns the borrow from the subtraction N - Q*D. + + D must be odd. dinv is (-D)^-1 mod B. */ + +mp_limb_t +mpn_sbpi1_bdiv_qr (mp_ptr qp, + mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, mp_limb_t dinv) +{ + mp_size_t qn; + mp_size_t i; + mp_limb_t rh; + mp_limb_t ql; + + ASSERT (dn > 0); + ASSERT (nn > dn); + ASSERT ((dp[0] & 1) != 0); + + qn = nn - dn; + + rh = 0; + + /* To complete the negation, this value is added to q. */ + ql = 1; + while (qn > dn) + { + for (i = 0; i < dn; i++) + { + mp_limb_t q; + + q = dinv * np[i]; + qp[i] = ~q; + + np[i] = mpn_addmul_1 (np + i, dp, dn, q); + } + rh += mpn_add (np + dn, np + dn, qn, np, dn); + ql = mpn_add_1 (qp, qp, dn, ql); + + qp += dn; qn -= dn; + np += dn; nn -= dn; + } + + for (i = 0; i < qn; i++) + { + mp_limb_t q; + + q = dinv * np[i]; + qp[i] = ~q; + + np[i] = mpn_addmul_1 (np + i, dp, dn, q); + } + + rh += mpn_add_n (np + dn, np + dn, np, qn); + ql = mpn_add_1 (qp, qp, qn, ql); + + if (UNLIKELY (ql > 0)) + { + /* q == 0 */ + ASSERT (rh == 0); + return 0; + } + else + { + mp_limb_t cy; + + cy = mpn_sub_n (np + qn, np + qn, dp, dn); + ASSERT (cy >= rh); + return cy - rh; + } +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sbpi1_divappr_q.c gmp-5.0.2+dfsg/mpn/generic/sbpi1_divappr_q.c --- gmp-4.3.2+dfsg/mpn/generic/sbpi1_divappr_q.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sbpi1_divappr_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,188 @@ +/* mpn_sbpi1_divappr_q -- Schoolbook division using the Möller-Granlund 3/2 + division algorithm, returning approximate quotient. The quotient returned + is either correct, or one too large. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2007, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +mp_limb_t +mpn_sbpi1_divappr_q (mp_ptr qp, + mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, + mp_limb_t dinv) +{ + mp_limb_t qh; + mp_size_t qn, i; + mp_limb_t n1, n0; + mp_limb_t d1, d0; + mp_limb_t cy, cy1; + mp_limb_t q; + mp_limb_t flag; + + ASSERT (dn > 2); + ASSERT (nn >= dn); + ASSERT ((dp[dn-1] & GMP_NUMB_HIGHBIT) != 0); + + np += nn; + + qn = nn - dn; + if (qn + 1 < dn) + { + dp += dn - (qn + 1); + dn = qn + 1; + } + + qh = mpn_cmp (np - dn, dp, dn) >= 0; + if (qh != 0) + mpn_sub_n (np - dn, np - dn, dp, dn); + + qp += qn; + + dn -= 2; /* offset dn by 2 for main division loops, + saving two iterations in mpn_submul_1. */ + d1 = dp[dn + 1]; + d0 = dp[dn + 0]; + + np -= 2; + + n1 = np[1]; + + for (i = qn - (dn + 2); i >= 0; i--) + { + np--; + if (UNLIKELY (n1 == d1) && np[1] == d0) + { + q = GMP_NUMB_MASK; + mpn_submul_1 (np - dn, dp, dn + 2, q); + n1 = np[1]; /* update n1, last loop's value will now be invalid */ + } + else + { + udiv_qr_3by2 (q, n1, n0, n1, np[1], np[0], d1, d0, dinv); + + cy = mpn_submul_1 (np - dn, dp, dn, q); + + cy1 = n0 < cy; + n0 = (n0 - cy) & GMP_NUMB_MASK; + cy = n1 < cy1; + n1 -= cy1; + np[0] = n0; + + if (UNLIKELY (cy != 0)) + { + n1 += d1 + mpn_add_n (np - dn, np - dn, dp, dn + 1); + q--; + } + } + + *--qp = q; + } + + flag = ~CNST_LIMB(0); + + if (dn >= 0) + { + for (i = dn; i > 0; i--) + { + np--; + if (UNLIKELY (n1 >= (d1 & flag))) + { + q = GMP_NUMB_MASK; + cy = mpn_submul_1 (np - dn, dp, dn + 2, q); + + if (UNLIKELY (n1 != cy)) + { + if (n1 < (cy & flag)) + { + q--; + mpn_add_n (np - dn, np - dn, dp, dn + 2); + } + else + flag = 0; + } + n1 = np[1]; + } + else + { + udiv_qr_3by2 (q, n1, n0, n1, np[1], np[0], d1, d0, dinv); + + cy = mpn_submul_1 (np - dn, dp, dn, q); + + cy1 = n0 < cy; + n0 = (n0 - cy) & GMP_NUMB_MASK; + cy = n1 < cy1; + n1 -= cy1; + np[0] = n0; + + if (UNLIKELY (cy != 0)) + { + n1 += d1 + mpn_add_n (np - dn, np - dn, dp, dn + 1); + q--; + } + } + + *--qp = q; + + /* Truncate operands. */ + dn--; + dp++; + } + + np--; + if (UNLIKELY (n1 >= (d1 & flag))) + { + q = GMP_NUMB_MASK; + cy = mpn_submul_1 (np, dp, 2, q); + + if (UNLIKELY (n1 != cy)) + { + if (n1 < (cy & flag)) + { + q--; + add_ssaaaa (np[1], np[0], np[1], np[0], dp[1], dp[0]); + } + else + flag = 0; + } + n1 = np[1]; + } + else + { + udiv_qr_3by2 (q, n1, n0, n1, np[1], np[0], d1, d0, dinv); + + np[1] = n1; + np[0] = n0; + } + + *--qp = q; + } + + ASSERT_ALWAYS (np[1] == n1); + + return qh; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sbpi1_div_q.c gmp-5.0.2+dfsg/mpn/generic/sbpi1_div_q.c --- gmp-4.3.2+dfsg/mpn/generic/sbpi1_div_q.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sbpi1_div_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,292 @@ +/* mpn_sbpi1_div_q -- Schoolbook division using the Möller-Granlund 3/2 + division algorithm. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2007, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +mp_limb_t +mpn_sbpi1_div_q (mp_ptr qp, + mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, + mp_limb_t dinv) +{ + mp_limb_t qh; + mp_size_t qn, i; + mp_limb_t n1, n0; + mp_limb_t d1, d0; + mp_limb_t cy, cy1; + mp_limb_t q; + mp_limb_t flag; + + mp_size_t dn_orig = dn; + mp_srcptr dp_orig = dp; + mp_ptr np_orig = np; + + ASSERT (dn > 2); + ASSERT (nn >= dn); + ASSERT ((dp[dn-1] & GMP_NUMB_HIGHBIT) != 0); + + np += nn; + + qn = nn - dn; + if (qn + 1 < dn) + { + dp += dn - (qn + 1); + dn = qn + 1; + } + + qh = mpn_cmp (np - dn, dp, dn) >= 0; + if (qh != 0) + mpn_sub_n (np - dn, np - dn, dp, dn); + + qp += qn; + + dn -= 2; /* offset dn by 2 for main division loops, + saving two iterations in mpn_submul_1. */ + d1 = dp[dn + 1]; + d0 = dp[dn + 0]; + + np -= 2; + + n1 = np[1]; + + for (i = qn - (dn + 2); i >= 0; i--) + { + np--; + if (UNLIKELY (n1 == d1) && np[1] == d0) + { + q = GMP_NUMB_MASK; + mpn_submul_1 (np - dn, dp, dn + 2, q); + n1 = np[1]; /* update n1, last loop's value will now be invalid */ + } + else + { + udiv_qr_3by2 (q, n1, n0, n1, np[1], np[0], d1, d0, dinv); + + cy = mpn_submul_1 (np - dn, dp, dn, q); + + cy1 = n0 < cy; + n0 = (n0 - cy) & GMP_NUMB_MASK; + cy = n1 < cy1; + n1 -= cy1; + np[0] = n0; + + if (UNLIKELY (cy != 0)) + { + n1 += d1 + mpn_add_n (np - dn, np - dn, dp, dn + 1); + q--; + } + } + + *--qp = q; + } + + flag = ~CNST_LIMB(0); + + if (dn >= 0) + { + for (i = dn; i > 0; i--) + { + np--; + if (UNLIKELY (n1 >= (d1 & flag))) + { + q = GMP_NUMB_MASK; + cy = mpn_submul_1 (np - dn, dp, dn + 2, q); + + if (UNLIKELY (n1 != cy)) + { + if (n1 < (cy & flag)) + { + q--; + mpn_add_n (np - dn, np - dn, dp, dn + 2); + } + else + flag = 0; + } + n1 = np[1]; + } + else + { + udiv_qr_3by2 (q, n1, n0, n1, np[1], np[0], d1, d0, dinv); + + cy = mpn_submul_1 (np - dn, dp, dn, q); + + cy1 = n0 < cy; + n0 = (n0 - cy) & GMP_NUMB_MASK; + cy = n1 < cy1; + n1 -= cy1; + np[0] = n0; + + if (UNLIKELY (cy != 0)) + { + n1 += d1 + mpn_add_n (np - dn, np - dn, dp, dn + 1); + q--; + } + } + + *--qp = q; + + /* Truncate operands. */ + dn--; + dp++; + } + + np--; + if (UNLIKELY (n1 >= (d1 & flag))) + { + q = GMP_NUMB_MASK; + cy = mpn_submul_1 (np, dp, 2, q); + + if (UNLIKELY (n1 != cy)) + { + if (n1 < (cy & flag)) + { + q--; + add_ssaaaa (np[1], np[0], np[1], np[0], dp[1], dp[0]); + } + else + flag = 0; + } + n1 = np[1]; + } + else + { + udiv_qr_3by2 (q, n1, n0, n1, np[1], np[0], d1, d0, dinv); + + np[0] = n0; + np[1] = n1; + } + + *--qp = q; + } + ASSERT_ALWAYS (np[1] == n1); + np += 2; + + + dn = dn_orig; + if (UNLIKELY (n1 < (dn & flag))) + { + mp_limb_t q, x; + + /* The quotient may be too large if the remainder is small. Recompute + for above ignored operand parts, until the remainder spills. + + FIXME: The quality of this code isn't the same as the code above. + 1. We don't compute things in an optimal order, high-to-low, in order + to terminate as quickly as possible. + 2. We mess with pointers and sizes, adding and subtracting and + adjusting to get things right. It surely could be streamlined. + 3. The only termination criteria are that we determine that the + quotient needs to be adjusted, or that we have recomputed + everything. We should stop when the remainder is so large + that no additional subtracting could make it spill. + 4. If nothing else, we should not do two loops of submul_1 over the + data, instead handle both the triangularization and chopping at + once. */ + + x = n1; + + if (dn > 2) + { + /* Compensate for triangularization. */ + mp_limb_t y; + + dp = dp_orig; + if (qn + 1 < dn) + { + dp += dn - (qn + 1); + dn = qn + 1; + } + + y = np[-2]; + + for (i = dn - 3; i >= 0; i--) + { + q = qp[i]; + cy = mpn_submul_1 (np - (dn - i), dp, dn - i - 2, q); + + if (y < cy) + { + if (x == 0) + { + cy = mpn_sub_1 (qp, qp, qn, 1); + ASSERT_ALWAYS (cy == 0); + return qh - cy; + } + x--; + } + y -= cy; + } + np[-2] = y; + } + + dn = dn_orig; + if (qn + 1 < dn) + { + /* Compensate for ignored dividend and divisor tails. */ + + dp = dp_orig; + np = np_orig; + + if (qh != 0) + { + cy = mpn_sub_n (np + qn, np + qn, dp, dn - (qn + 1)); + if (cy != 0) + { + if (x == 0) + { + if (qn != 0) + cy = mpn_sub_1 (qp, qp, qn, 1); + return qh - cy; + } + x--; + } + } + + if (qn == 0) + return qh; + + for (i = dn - qn - 2; i >= 0; i--) + { + cy = mpn_submul_1 (np + i, qp, qn, dp[i]); + cy = mpn_sub_1 (np + qn + i, np + qn + i, dn - qn - i - 1, cy); + if (cy != 0) + { + if (x == 0) + { + cy = mpn_sub_1 (qp, qp, qn, 1); + return qh; + } + x--; + } + } + } + } + + return qh; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sbpi1_div_qr.c gmp-5.0.2+dfsg/mpn/generic/sbpi1_div_qr.c --- gmp-4.3.2+dfsg/mpn/generic/sbpi1_div_qr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sbpi1_div_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,99 @@ +/* mpn_sbpi1_div_qr -- Schoolbook division using the Möller-Granlund 3/2 + division algorithm. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. + +Copyright 2007, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +mp_limb_t +mpn_sbpi1_div_qr (mp_ptr qp, + mp_ptr np, mp_size_t nn, + mp_srcptr dp, mp_size_t dn, + mp_limb_t dinv) +{ + mp_limb_t qh; + mp_size_t i; + mp_limb_t n1, n0; + mp_limb_t d1, d0; + mp_limb_t cy, cy1; + mp_limb_t q; + + ASSERT (dn > 2); + ASSERT (nn >= dn); + ASSERT ((dp[dn-1] & GMP_NUMB_HIGHBIT) != 0); + + np += nn; + + qh = mpn_cmp (np - dn, dp, dn) >= 0; + if (qh != 0) + mpn_sub_n (np - dn, np - dn, dp, dn); + + qp += nn - dn; + + dn -= 2; /* offset dn by 2 for main division loops, + saving two iterations in mpn_submul_1. */ + d1 = dp[dn + 1]; + d0 = dp[dn + 0]; + + np -= 2; + + n1 = np[1]; + + for (i = nn - (dn + 2); i > 0; i--) + { + np--; + if (UNLIKELY (n1 == d1) && np[1] == d0) + { + q = GMP_NUMB_MASK; + mpn_submul_1 (np - dn, dp, dn + 2, q); + n1 = np[1]; /* update n1, last loop's value will now be invalid */ + } + else + { + udiv_qr_3by2 (q, n1, n0, n1, np[1], np[0], d1, d0, dinv); + + cy = mpn_submul_1 (np - dn, dp, dn, q); + + cy1 = n0 < cy; + n0 = (n0 - cy) & GMP_NUMB_MASK; + cy = n1 < cy1; + n1 = (n1 - cy1) & GMP_NUMB_MASK; + np[0] = n0; + + if (UNLIKELY (cy != 0)) + { + n1 += d1 + mpn_add_n (np - dn, np - dn, dp, dn + 1); + q--; + } + } + + *--qp = q; + } + np[1] = n1; + + return qh; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/scan0.c gmp-5.0.2+dfsg/mpn/generic/scan0.c --- gmp-4.3.2+dfsg/mpn/generic/scan0.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/scan0.c 2011-05-08 09:49:29.000000000 +0000 @@ -25,9 +25,8 @@ 1. U must sooner or later have a limb with a clear bit. */ -unsigned long int -mpn_scan0 (register mp_srcptr up, - register unsigned long int starting_bit) +mp_bitcnt_t +mpn_scan0 (mp_srcptr up, mp_bitcnt_t starting_bit) { mp_size_t starting_word; mp_limb_t alimb; diff -Nru gmp-4.3.2+dfsg/mpn/generic/scan1.c gmp-5.0.2+dfsg/mpn/generic/scan1.c --- gmp-4.3.2+dfsg/mpn/generic/scan1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/scan1.c 2011-05-08 09:49:29.000000000 +0000 @@ -25,9 +25,8 @@ 1. U must sooner or later have a limb != 0. */ -unsigned long int -mpn_scan1 (register mp_srcptr up, - register unsigned long int starting_bit) +mp_bitcnt_t +mpn_scan1 (mp_srcptr up, mp_bitcnt_t starting_bit) { mp_size_t starting_word; mp_limb_t alimb; diff -Nru gmp-4.3.2+dfsg/mpn/generic/set_str.c gmp-5.0.2+dfsg/mpn/generic/set_str.c --- gmp-4.3.2+dfsg/mpn/generic/set_str.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/set_str.c 2011-05-08 09:49:29.000000000 +0000 @@ -69,7 +69,7 @@ int next_bitpos; mp_limb_t res_digit; mp_size_t size; - int bits_per_indigit = __mp_bases[base].big_base; + int bits_per_indigit = mp_bases[base].big_base; size = 0; res_digit = 0; @@ -107,7 +107,7 @@ TMP_MARK; - chars_per_limb = __mp_bases[base].chars_per_limb; + chars_per_limb = mp_bases[base].chars_per_limb; un = str_len / chars_per_limb + 1; @@ -139,9 +139,9 @@ powtab_mem_ptr = powtab_mem; - chars_per_limb = __mp_bases[base].chars_per_limb; - big_base = __mp_bases[base].big_base; - big_base_inverted = __mp_bases[base].big_base_inverted; + chars_per_limb = mp_bases[base].chars_per_limb; + big_base = mp_bases[base].big_base; + big_base_inverted = mp_bases[base].big_base_inverted; count_leading_zeros (normalization_steps, big_base); p = powtab_mem_ptr; @@ -169,7 +169,7 @@ ASSERT_ALWAYS (powtab_mem_ptr < powtab_mem + mpn_dc_set_str_powtab_alloc (un)); - mpn_sqr_n (t, p, n); + mpn_sqr (t, p, n); n = 2 * n - 1; n += t[n] != 0; digits_in_base *= 2; #if 1 @@ -278,11 +278,11 @@ mp_limb_t res_digit; ASSERT (base >= 2); - ASSERT (base < numberof (__mp_bases)); + ASSERT (base < numberof (mp_bases)); ASSERT (str_len >= 1); - big_base = __mp_bases[base].big_base; - chars_per_limb = __mp_bases[base].chars_per_limb; + big_base = mp_bases[base].big_base; + chars_per_limb = mp_bases[base].chars_per_limb; size = 0; for (i = chars_per_limb; i < str_len; i += chars_per_limb) diff -Nru gmp-4.3.2+dfsg/mpn/generic/sizeinbase.c gmp-5.0.2+dfsg/mpn/generic/sizeinbase.c --- gmp-4.3.2+dfsg/mpn/generic/sizeinbase.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sizeinbase.c 2011-05-08 09:49:29.000000000 +0000 @@ -37,7 +37,7 @@ ASSERT (xsize >= 0); ASSERT (base >= 2); - ASSERT (base < numberof (__mp_bases)); + ASSERT (base < numberof (mp_bases)); /* Special case for X == 0. */ if (xsize == 0) @@ -45,14 +45,14 @@ /* Calculate the total number of significant bits of X. */ count_leading_zeros (cnt, xp[xsize-1]); - totbits = xsize * BITS_PER_MP_LIMB - cnt; + totbits = xsize * GMP_LIMB_BITS - cnt; if (POW2_P (base)) { /* Special case for powers of 2, giving exact result. */ - lb_base = __mp_bases[base].big_base; + lb_base = mp_bases[base].big_base; return (totbits + lb_base - 1) / lb_base; } else - return (size_t) (totbits * __mp_bases[base].chars_per_bit_exactly) + 1; + return (size_t) (totbits * mp_bases[base].chars_per_bit_exactly) + 1; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/sqr_basecase.c gmp-5.0.2+dfsg/mpn/generic/sqr_basecase.c --- gmp-4.3.2+dfsg/mpn/generic/sqr_basecase.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sqr_basecase.c 2011-05-08 09:49:29.000000000 +0000 @@ -54,12 +54,12 @@ mpn_sqr_basecase (mp_ptr rp, mp_srcptr up, mp_size_t n) { mp_size_t i; - mp_limb_t tarr[2 * SQR_KARATSUBA_THRESHOLD]; + mp_limb_t tarr[2 * SQR_TOOM2_THRESHOLD]; mp_ptr tp = tarr; mp_limb_t cy; /* must fit 2*n limbs in tarr */ - ASSERT (n <= SQR_KARATSUBA_THRESHOLD); + ASSERT (n <= SQR_TOOM2_THRESHOLD); if ((n & 1) != 0) { @@ -136,12 +136,12 @@ mpn_sqr_basecase (mp_ptr rp, mp_srcptr up, mp_size_t n) { mp_size_t i; - mp_limb_t tarr[2 * SQR_KARATSUBA_THRESHOLD]; + mp_limb_t tarr[2 * SQR_TOOM2_THRESHOLD]; mp_ptr tp = tarr; mp_limb_t cy; /* must fit 2*n limbs in tarr */ - ASSERT (n <= SQR_KARATSUBA_THRESHOLD); + ASSERT (n <= SQR_TOOM2_THRESHOLD); if ((n & 1) != 0) { @@ -268,12 +268,12 @@ } if (n > 1) { - mp_limb_t tarr[2 * SQR_KARATSUBA_THRESHOLD]; + mp_limb_t tarr[2 * SQR_TOOM2_THRESHOLD]; mp_ptr tp = tarr; mp_limb_t cy; /* must fit 2*n limbs in tarr */ - ASSERT (n <= SQR_KARATSUBA_THRESHOLD); + ASSERT (n <= SQR_TOOM2_THRESHOLD); cy = mpn_mul_1 (tp, up + 1, n - 1, up[0]); tp[n - 1] = cy; diff -Nru gmp-4.3.2+dfsg/mpn/generic/sqr.c gmp-5.0.2+dfsg/mpn/generic/sqr.c --- gmp-4.3.2+dfsg/mpn/generic/sqr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sqr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,88 @@ +/* mpn_sqr -- square natural numbers. + +Copyright 1991, 1993, 1994, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, +2005, 2008, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +void +mpn_sqr (mp_ptr p, mp_srcptr a, mp_size_t n) +{ + ASSERT (n >= 1); + ASSERT (! MPN_OVERLAP_P (p, 2 * n, a, n)); + + if (BELOW_THRESHOLD (n, SQR_BASECASE_THRESHOLD)) + { /* mul_basecase is faster than sqr_basecase on small sizes sometimes */ + mpn_mul_basecase (p, a, n, a, n); + } + else if (BELOW_THRESHOLD (n, SQR_TOOM2_THRESHOLD)) + { + mpn_sqr_basecase (p, a, n); + } + else if (BELOW_THRESHOLD (n, SQR_TOOM3_THRESHOLD)) + { + /* Allocate workspace of fixed size on stack: fast! */ + mp_limb_t ws[mpn_toom2_sqr_itch (SQR_TOOM3_THRESHOLD_LIMIT-1)]; + ASSERT (SQR_TOOM3_THRESHOLD <= SQR_TOOM3_THRESHOLD_LIMIT); + mpn_toom2_sqr (p, a, n, ws); + } + else if (BELOW_THRESHOLD (n, SQR_TOOM4_THRESHOLD)) + { + mp_ptr ws; + TMP_SDECL; + TMP_SMARK; + ws = TMP_SALLOC_LIMBS (mpn_toom3_sqr_itch (n)); + mpn_toom3_sqr (p, a, n, ws); + TMP_SFREE; + } + else if (BELOW_THRESHOLD (n, SQR_TOOM6_THRESHOLD)) + { + mp_ptr ws; + TMP_SDECL; + TMP_SMARK; + ws = TMP_SALLOC_LIMBS (mpn_toom4_sqr_itch (n)); + mpn_toom4_sqr (p, a, n, ws); + TMP_SFREE; + } + else if (BELOW_THRESHOLD (n, SQR_TOOM8_THRESHOLD)) + { + mp_ptr ws; + TMP_SDECL; + TMP_SMARK; + ws = TMP_SALLOC_LIMBS (mpn_toom6_sqr_itch (n)); + mpn_toom6_sqr (p, a, n, ws); + TMP_SFREE; + } + else if (BELOW_THRESHOLD (n, SQR_FFT_THRESHOLD)) + { + mp_ptr ws; + TMP_DECL; + TMP_MARK; + ws = TMP_ALLOC_LIMBS (mpn_toom8_sqr_itch (n)); + mpn_toom8_sqr (p, a, n, ws); + TMP_FREE; + } + else + { + /* The current FFT code allocates its own space. That should probably + change. */ + mpn_fft_mul (p, a, n, a, n); + } +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sqrmod_bnm1.c gmp-5.0.2+dfsg/mpn/generic/sqrmod_bnm1.c --- gmp-4.3.2+dfsg/mpn/generic/sqrmod_bnm1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sqrmod_bnm1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,302 @@ +/* sqrmod_bnm1.c -- squaring mod B^n-1. + + Contributed to the GNU project by Niels Möller, Torbjorn Granlund and + Marco Bodrato. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" + +/* Input is {ap,rn}; output is {rp,rn}, computation is + mod B^rn - 1, and values are semi-normalised; zero is represented + as either 0 or B^n - 1. Needs a scratch of 2rn limbs at tp. + tp==rp is allowed. */ +static void +mpn_bc_sqrmod_bnm1 (mp_ptr rp, mp_srcptr ap, mp_size_t rn, mp_ptr tp) +{ + mp_limb_t cy; + + ASSERT (0 < rn); + + mpn_sqr (tp, ap, rn); + cy = mpn_add_n (rp, tp, tp + rn, rn); + /* If cy == 1, then the value of rp is at most B^rn - 2, so there can + * be no overflow when adding in the carry. */ + MPN_INCR_U (rp, rn, cy); +} + + +/* Input is {ap,rn+1}; output is {rp,rn+1}, in + semi-normalised representation, computation is mod B^rn + 1. Needs + a scratch area of 2rn + 2 limbs at tp; tp == rp is allowed. + Output is normalised. */ +static void +mpn_bc_sqrmod_bnp1 (mp_ptr rp, mp_srcptr ap, mp_size_t rn, mp_ptr tp) +{ + mp_limb_t cy; + + ASSERT (0 < rn); + + mpn_sqr (tp, ap, rn + 1); + ASSERT (tp[2*rn+1] == 0); + ASSERT (tp[2*rn] < GMP_NUMB_MAX); + cy = tp[2*rn] + mpn_sub_n (rp, tp, tp+rn, rn); + rp[rn] = 0; + MPN_INCR_U (rp, rn+1, cy ); +} + + +/* Computes {rp,MIN(rn,2an)} <- {ap,an}^2 Mod(B^rn-1) + * + * The result is expected to be ZERO if and only if the operand + * already is. Otherwise the class [0] Mod(B^rn-1) is represented by + * B^rn-1. + * It should not be a problem if sqrmod_bnm1 is used to + * compute the full square with an <= 2*rn, because this condition + * implies (B^an-1)^2 < (B^rn-1) . + * + * Requires rn/4 < an <= rn + * Scratch need: rn/2 + (need for recursive call OR rn + 3). This gives + * + * S(n) <= rn/2 + MAX (rn + 4, S(n/2)) <= 3/2 rn + 4 + */ +void +mpn_sqrmod_bnm1 (mp_ptr rp, mp_size_t rn, mp_srcptr ap, mp_size_t an, mp_ptr tp) +{ + ASSERT (0 < an); + ASSERT (an <= rn); + + if ((rn & 1) != 0 || BELOW_THRESHOLD (rn, SQRMOD_BNM1_THRESHOLD)) + { + if (UNLIKELY (an < rn)) + { + if (UNLIKELY (2*an <= rn)) + { + mpn_sqr (rp, ap, an); + } + else + { + mp_limb_t cy; + mpn_sqr (tp, ap, an); + cy = mpn_add (rp, tp, rn, tp + rn, 2*an - rn); + MPN_INCR_U (rp, rn, cy); + } + } + else + mpn_bc_sqrmod_bnm1 (rp, ap, rn, tp); + } + else + { + mp_size_t n; + mp_limb_t cy; + mp_limb_t hi; + + n = rn >> 1; + + ASSERT (2*an > n); + + /* Compute xm = a^2 mod (B^n - 1), xp = a^2 mod (B^n + 1) + and crt together as + + x = -xp * B^n + (B^n + 1) * [ (xp + xm)/2 mod (B^n-1)] + */ + +#define a0 ap +#define a1 (ap + n) + +#define xp tp /* 2n + 2 */ + /* am1 maybe in {xp, n} */ +#define sp1 (tp + 2*n + 2) + /* ap1 maybe in {sp1, n + 1} */ + + { + mp_srcptr am1; + mp_size_t anm; + mp_ptr so; + + if (LIKELY (an > n)) + { + so = xp + n; + am1 = xp; + cy = mpn_add (xp, a0, n, a1, an - n); + MPN_INCR_U (xp, n, cy); + anm = n; + } + else + { + so = xp; + am1 = a0; + anm = an; + } + + mpn_sqrmod_bnm1 (rp, n, am1, anm, so); + } + + { + int k; + mp_srcptr ap1; + mp_size_t anp; + + if (LIKELY (an > n)) { + ap1 = sp1; + cy = mpn_sub (sp1, a0, n, a1, an - n); + sp1[n] = 0; + MPN_INCR_U (sp1, n + 1, cy); + anp = n + ap1[n]; + } else { + ap1 = a0; + anp = an; + } + + if (BELOW_THRESHOLD (n, MUL_FFT_MODF_THRESHOLD)) + k=0; + else + { + int mask; + k = mpn_fft_best_k (n, 1); + mask = (1<>=1;}; + } + if (k >= FFT_FIRST_K) + xp[n] = mpn_mul_fft (xp, n, ap1, anp, ap1, anp, k); + else if (UNLIKELY (ap1 == a0)) + { + ASSERT (anp <= n); + ASSERT (2*anp > n); + mpn_sqr (xp, a0, an); + anp = 2*an - n; + cy = mpn_sub (xp, xp, n, xp + n, anp); + xp[n] = 0; + MPN_INCR_U (xp, n+1, cy); + } + else + mpn_bc_sqrmod_bnp1 (xp, ap1, n, xp); + } + + /* Here the CRT recomposition begins. + + xm <- (xp + xm)/2 = (xp + xm)B^n/2 mod (B^n-1) + Division by 2 is a bitwise rotation. + + Assumes xp normalised mod (B^n+1). + + The residue class [0] is represented by [B^n-1]; except when + both input are ZERO. + */ + +#if HAVE_NATIVE_mpn_rsh1add_n || HAVE_NATIVE_mpn_rsh1add_nc +#if HAVE_NATIVE_mpn_rsh1add_nc + cy = mpn_rsh1add_nc(rp, rp, xp, n, xp[n]); /* B^n = 1 */ + hi = cy << (GMP_NUMB_BITS - 1); + cy = 0; + /* next update of rp[n-1] will set cy = 1 only if rp[n-1]+=hi + overflows, i.e. a further increment will not overflow again. */ +#else /* ! _nc */ + cy = xp[n] + mpn_rsh1add_n(rp, rp, xp, n); /* B^n = 1 */ + hi = (cy<<(GMP_NUMB_BITS-1))&GMP_NUMB_MASK; /* (cy&1) << ... */ + cy >>= 1; + /* cy = 1 only if xp[n] = 1 i.e. {xp,n} = ZERO, this implies that + the rsh1add was a simple rshift: the top bit is 0. cy=1 => hi=0. */ +#endif +#if GMP_NAIL_BITS == 0 + add_ssaaaa(cy, rp[n-1], cy, rp[n-1], 0, hi); +#else + cy += (hi & rp[n-1]) >> (GMP_NUMB_BITS-1); + rp[n-1] ^= hi; +#endif +#else /* ! HAVE_NATIVE_mpn_rsh1add_n */ +#if HAVE_NATIVE_mpn_add_nc + cy = mpn_add_nc(rp, rp, xp, n, xp[n]); +#else /* ! _nc */ + cy = xp[n] + mpn_add_n(rp, rp, xp, n); /* xp[n] == 1 implies {xp,n} == ZERO */ +#endif + cy += (rp[0]&1); + mpn_rshift(rp, rp, n, 1); + ASSERT (cy <= 2); + hi = (cy<<(GMP_NUMB_BITS-1))&GMP_NUMB_MASK; /* (cy&1) << ... */ + cy >>= 1; + /* We can have cy != 0 only if hi = 0... */ + ASSERT ((rp[n-1] & GMP_NUMB_HIGHBIT) == 0); + rp[n-1] |= hi; + /* ... rp[n-1] + cy can not overflow, the following INCR is correct. */ +#endif + ASSERT (cy <= 1); + /* Next increment can not overflow, read the previous comments about cy. */ + ASSERT ((cy == 0) || ((rp[n-1] & GMP_NUMB_HIGHBIT) == 0)); + MPN_INCR_U(rp, n, cy); + + /* Compute the highest half: + ([(xp + xm)/2 mod (B^n-1)] - xp ) * B^n + */ + if (UNLIKELY (2*an < rn)) + { + /* Note that in this case, the only way the result can equal + zero mod B^{rn} - 1 is if the input is zero, and + then the output of both the recursive calls and this CRT + reconstruction is zero, not B^{rn} - 1. */ + cy = mpn_sub_n (rp + n, rp, xp, 2*an - n); + + /* FIXME: This subtraction of the high parts is not really + necessary, we do it to get the carry out, and for sanity + checking. */ + cy = xp[n] + mpn_sub_nc (xp + 2*an - n, rp + 2*an - n, + xp + 2*an - n, rn - 2*an, cy); + ASSERT (mpn_zero_p (xp + 2*an - n+1, rn - 1 - 2*an)); + cy = mpn_sub_1 (rp, rp, 2*an, cy); + ASSERT (cy == (xp + 2*an - n)[0]); + } + else + { + cy = xp[n] + mpn_sub_n (rp + n, rp, xp, n); + /* cy = 1 only if {xp,n+1} is not ZERO, i.e. {rp,n} is not ZERO. + DECR will affect _at most_ the lowest n limbs. */ + MPN_DECR_U (rp, 2*n, cy); + } +#undef a0 +#undef a1 +#undef xp +#undef sp1 + } +} + +mp_size_t +mpn_sqrmod_bnm1_next_size (mp_size_t n) +{ + mp_size_t nh; + + if (BELOW_THRESHOLD (n, SQRMOD_BNM1_THRESHOLD)) + return n; + if (BELOW_THRESHOLD (n, 4 * (SQRMOD_BNM1_THRESHOLD - 1) + 1)) + return (n + (2-1)) & (-2); + if (BELOW_THRESHOLD (n, 8 * (SQRMOD_BNM1_THRESHOLD - 1) + 1)) + return (n + (4-1)) & (-4); + + nh = (n + 1) >> 1; + + if (BELOW_THRESHOLD (nh, SQR_FFT_MODF_THRESHOLD)) + return (n + (8-1)) & (-8); + + return 2 * mpn_fft_next_size (nh, mpn_fft_best_k (nh, 1)); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/sqrtrem.c gmp-5.0.2+dfsg/mpn/generic/sqrtrem.c --- gmp-4.3.2+dfsg/mpn/generic/sqrtrem.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sqrtrem.c 2011-05-08 09:49:29.000000000 +0000 @@ -8,8 +8,8 @@ INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GMP RELEASE. -Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2008 Free Software Foundation, -Inc. +Copyright 1999, 2000, 2001, 2002, 2004, 2005, 2008, 2010 Free Software +Foundation, Inc. This file is part of the GNU MP Library. @@ -92,9 +92,9 @@ /* Compute s = floor(sqrt(a0)), and *rp = a0 - s^2. */ #if GMP_NUMB_BITS > 32 -#define MAGIC 0x10000000000 /* 0xffe7debbfc < MAGIC < 0x232b1850f410 */ +#define MAGIC CNST_LIMB(0x10000000000) /* 0xffe7debbfc < MAGIC < 0x232b1850f410 */ #else -#define MAGIC 0x100000 /* 0xfee6f < MAGIC < 0x29cbc8 */ +#define MAGIC CNST_LIMB(0x100000) /* 0xfee6f < MAGIC < 0x29cbc8 */ #endif static mp_limb_t @@ -121,7 +121,7 @@ #if GMP_NUMB_BITS > 32 a1 = a0 >> (GMP_LIMB_BITS - 1 - 32); - t = (mp_limb_signed_t) (0x2000000000000l - 0x30000 - a1 * x0 * x0) >> 16; + t = (mp_limb_signed_t) (CNST_LIMB(0x2000000000000) - 0x30000 - a1 * x0 * x0) >> 16; x0 = (x0 << 16) + ((mp_limb_signed_t) (x0 * t) >> (16+2)); /* x0 is now an 16 bits approximation of 1/sqrt(a0) */ @@ -239,7 +239,7 @@ q >>= 1; if (c != 0) c = mpn_add_n (np + l, np + l, sp + l, h); - mpn_sqr_n (np + n, sp, l); + mpn_sqr (np + n, sp, l); b = q + mpn_sub_n (np, np, np + n, 2 * l); c -= (l == h) ? b : mpn_sub_1 (np + 2 * l, np + 2 * l, 1, (mp_limb_t) b); q = mpn_add_1 (sp + l, sp + l, h, q); diff -Nru gmp-4.3.2+dfsg/mpn/generic/sub_n.c gmp-5.0.2+dfsg/mpn/generic/sub_n.c --- gmp-4.3.2+dfsg/mpn/generic/sub_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/sub_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,7 @@ /* mpn_sub_n -- Subtract equal length limb vectors. -Copyright 1992, 1993, 1994, 1996, 2000, 2002 Free Software Foundation, Inc. +Copyright 1992, 1993, 1994, 1996, 2000, 2002, 2009 Free Software Foundation, +Inc. This file is part of the GNU MP Library. @@ -29,8 +30,8 @@ mp_limb_t ul, vl, sl, rl, cy, cy1, cy2; ASSERT (n >= 1); - ASSERT (MPN_SAME_OR_SEPARATE_P (rp, up, n)); - ASSERT (MPN_SAME_OR_SEPARATE_P (rp, vp, n)); + ASSERT (MPN_SAME_OR_INCR_P (rp, up, n)); + ASSERT (MPN_SAME_OR_INCR_P (rp, vp, n)); cy = 0; do @@ -59,8 +60,8 @@ mp_limb_t ul, vl, rl, cy; ASSERT (n >= 1); - ASSERT (MPN_SAME_OR_SEPARATE_P (rp, up, n)); - ASSERT (MPN_SAME_OR_SEPARATE_P (rp, vp, n)); + ASSERT (MPN_SAME_OR_INCR_P (rp, up, n)); + ASSERT (MPN_SAME_OR_INCR_P (rp, vp, n)); cy = 0; do diff -Nru gmp-4.3.2+dfsg/mpn/generic/tdiv_qr.c gmp-5.0.2+dfsg/mpn/generic/tdiv_qr.c --- gmp-4.3.2+dfsg/mpn/generic/tdiv_qr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/tdiv_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,18 +1,17 @@ /* mpn_tdiv_qr -- Divide the numerator (np,nn) by the denominator (dp,dn) and write the nn-dn+1 quotient limbs at qp and the dn remainder limbs at rp. If qxn is non-zero, generate that many fraction limbs and append them after the - other quotient limbs, and update the remainder accordningly. The input + other quotient limbs, and update the remainder accordingly. The input operands are unaffected. Preconditions: 1. The most significant limb of of the divisor must be non-zero. - 2. No argument overlap is permitted. (??? relax this ???) - 3. nn >= dn, even if qxn is non-zero. (??? relax this ???) + 2. nn >= dn, even if qxn is non-zero. (??? relax this ???) The time complexity of this is O(qn*qn+M(dn,qn)), where M(m,n) is the time complexity of multiplication. -Copyright 1997, 2000, 2001, 2002, 2005 Free Software Foundation, Inc. +Copyright 1997, 2000, 2001, 2002, 2005, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -38,13 +37,8 @@ mpn_tdiv_qr (mp_ptr qp, mp_ptr rp, mp_size_t qxn, mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn) { - /* FIXME: - 1. qxn - 2. pass allocated storage in additional parameter? - */ ASSERT_ALWAYS (qxn == 0); - ASSERT (qxn >= 0); ASSERT (nn >= 0); ASSERT (dn >= 0); ASSERT (dn == 0 || dp[dn - 1] != 0); @@ -58,7 +52,7 @@ case 1: { - rp[0] = mpn_divmod_1 (qp, np, nn, dp[0]); + rp[0] = mpn_divrem_1 (qp, (mp_size_t) 0, np, nn, dp[0]); return; } @@ -77,7 +71,7 @@ d2p = dtmp; d2p[1] = (dp[1] << cnt) | (dp[0] >> (GMP_NUMB_BITS - cnt)); d2p[0] = (dp[0] << cnt) & GMP_NUMB_MASK; - n2p = (mp_ptr) TMP_ALLOC ((nn + 1) * BYTES_PER_MP_LIMB); + n2p = TMP_ALLOC_LIMBS (nn + 1); cy = mpn_lshift (n2p, np, nn, cnt); n2p[nn] = cy; qhl = mpn_divrem_2 (qp, 0L, n2p, nn + (cy != 0), d2p); @@ -90,7 +84,7 @@ else { d2p = (mp_ptr) dp; - n2p = (mp_ptr) TMP_ALLOC (nn * BYTES_PER_MP_LIMB); + n2p = TMP_ALLOC_LIMBS (nn); MPN_COPY (n2p, np, nn); qhl = mpn_divrem_2 (qp, 0L, n2p, nn, d2p); qp[nn - 2] = qhl; /* always store nn-2+1 quotient limbs */ @@ -104,12 +98,13 @@ default: { int adjust; + gmp_pi1_t dinv; TMP_DECL; TMP_MARK; adjust = np[nn - 1] >= dp[dn - 1]; /* conservative tests for quotient size */ if (nn + adjust >= 2 * dn) { - mp_ptr n2p, d2p, q2p; + mp_ptr n2p, d2p; mp_limb_t cy; int cnt; @@ -118,9 +113,9 @@ { count_leading_zeros (cnt, dp[dn - 1]); cnt -= GMP_NAIL_BITS; - d2p = (mp_ptr) TMP_ALLOC (dn * BYTES_PER_MP_LIMB); + d2p = TMP_ALLOC_LIMBS (dn); mpn_lshift (d2p, dp, dn, cnt); - n2p = (mp_ptr) TMP_ALLOC ((nn + 1) * BYTES_PER_MP_LIMB); + n2p = TMP_ALLOC_LIMBS (nn + 1); cy = mpn_lshift (n2p, np, nn, cnt); n2p[nn] = cy; nn += adjust; @@ -129,51 +124,28 @@ { cnt = 0; d2p = (mp_ptr) dp; - n2p = (mp_ptr) TMP_ALLOC ((nn + 1) * BYTES_PER_MP_LIMB); + n2p = TMP_ALLOC_LIMBS (nn + 1); MPN_COPY (n2p, np, nn); n2p[nn] = 0; nn += adjust; } - if (dn < DIV_DC_THRESHOLD) - mpn_sb_divrem_mn (qp, n2p, nn, d2p, dn); + invert_pi1 (dinv, d2p[dn - 1], d2p[dn - 2]); + if (BELOW_THRESHOLD (dn, DC_DIV_QR_THRESHOLD)) + mpn_sbpi1_div_qr (qp, n2p, nn, d2p, dn, dinv.inv32); + else if (BELOW_THRESHOLD (dn, MUPI_DIV_QR_THRESHOLD) || /* fast condition */ + BELOW_THRESHOLD (nn, 2 * MU_DIV_QR_THRESHOLD) || /* fast condition */ + (double) (2 * (MU_DIV_QR_THRESHOLD - MUPI_DIV_QR_THRESHOLD)) * dn /* slow... */ + + (double) MUPI_DIV_QR_THRESHOLD * nn > (double) dn * nn) /* ...condition */ + mpn_dcpi1_div_qr (qp, n2p, nn, d2p, dn, &dinv); else { - /* Divide 2*dn / dn limbs as long as the limbs in np last. */ - q2p = qp + nn - dn; - n2p += nn - dn; - do - { - q2p -= dn; n2p -= dn; - mpn_dc_divrem_n (q2p, n2p, d2p, dn); - nn -= dn; - } - while (nn >= 2 * dn); - - if (nn != dn) - { - mp_limb_t ql; - n2p -= nn - dn; - - /* We have now dn < nn - dn < 2dn. Make a recursive call, - since falling out to the code below isn't pretty. - Unfortunately, mpn_tdiv_qr returns nn-dn+1 quotient - limbs, which would overwrite one already generated - quotient limbs. Preserve it with an ugly hack. */ - /* FIXME: This suggests that we should have an - mpn_tdiv_qr_internal that instead returns the most - significant quotient limb and move the meat of this - function there. */ - /* FIXME: Perhaps call mpn_sb_divrem_mn here for certain - operand ranges, to decrease overhead for small - operands? */ - ql = qp[nn - dn]; /* preserve quotient limb... */ - mpn_tdiv_qr (qp, n2p, 0L, n2p, nn, d2p, dn); - qp[nn - dn] = ql; /* ...restore it again */ - } + mp_size_t itch = mpn_mu_div_qr_itch (nn, dn, 0); + mp_ptr scratch = TMP_ALLOC_LIMBS (itch); + mpn_mu_div_qr (qp, rp, n2p, nn, d2p, dn, scratch); + n2p = rp; } - if (cnt != 0) mpn_rshift (rp, n2p, dn, cnt); else @@ -246,11 +218,11 @@ count_leading_zeros (cnt, dp[dn - 1]); cnt -= GMP_NAIL_BITS; - d2p = (mp_ptr) TMP_ALLOC (qn * BYTES_PER_MP_LIMB); + d2p = TMP_ALLOC_LIMBS (qn); mpn_lshift (d2p, dp + in, qn, cnt); d2p[0] |= dp[in - 1] >> (GMP_NUMB_BITS - cnt); - n2p = (mp_ptr) TMP_ALLOC ((2 * qn + 1) * BYTES_PER_MP_LIMB); + n2p = TMP_ALLOC_LIMBS (2 * qn + 1); cy = mpn_lshift (n2p, np + nn - 2 * qn, 2 * qn, cnt); if (adjust) { @@ -267,7 +239,7 @@ cnt = 0; d2p = (mp_ptr) dp + in; - n2p = (mp_ptr) TMP_ALLOC ((2 * qn + 1) * BYTES_PER_MP_LIMB); + n2p = TMP_ALLOC_LIMBS (2 * qn + 1); MPN_COPY (n2p, np + nn - 2 * qn, 2 * qn); if (adjust) { @@ -280,25 +252,30 @@ if (qn == 1) { mp_limb_t q0, r0; - mp_limb_t gcc272bug_n1, gcc272bug_n0, gcc272bug_d0; - /* Due to a gcc 2.7.2.3 reload pass bug, we have to use some - temps here. This doesn't hurt code quality on any machines - so we do it unconditionally. */ - gcc272bug_n1 = n2p[1]; - gcc272bug_n0 = n2p[0]; - gcc272bug_d0 = d2p[0]; - udiv_qrnnd (q0, r0, gcc272bug_n1, gcc272bug_n0 << GMP_NAIL_BITS, - gcc272bug_d0 << GMP_NAIL_BITS); - r0 >>= GMP_NAIL_BITS; - n2p[0] = r0; + udiv_qrnnd (q0, r0, n2p[1], n2p[0] << GMP_NAIL_BITS, d2p[0] << GMP_NAIL_BITS); + n2p[0] = r0 >> GMP_NAIL_BITS; qp[0] = q0; } else if (qn == 2) - mpn_divrem_2 (qp, 0L, n2p, 4L, d2p); - else if (qn < DIV_DC_THRESHOLD) - mpn_sb_divrem_mn (qp, n2p, 2 * qn, d2p, qn); + mpn_divrem_2 (qp, 0L, n2p, 4L, d2p); /* FIXME: obsolete function */ else - mpn_dc_divrem_n (qp, n2p, d2p, qn); + { + invert_pi1 (dinv, d2p[qn - 1], d2p[qn - 2]); + if (BELOW_THRESHOLD (qn, DC_DIV_QR_THRESHOLD)) + mpn_sbpi1_div_qr (qp, n2p, 2 * qn, d2p, qn, dinv.inv32); + else if (BELOW_THRESHOLD (qn, MU_DIV_QR_THRESHOLD)) + mpn_dcpi1_div_qr (qp, n2p, 2 * qn, d2p, qn, &dinv); + else + { + mp_size_t itch = mpn_mu_div_qr_itch (2 * qn, qn, 0); + mp_ptr scratch = TMP_ALLOC_LIMBS (itch); + mp_ptr r2p = rp; + if (np == r2p) /* If N and R share space, put ... */ + r2p += nn - qn; /* intermediate remainder at N's upper end. */ + mpn_mu_div_qr (qp, r2p, n2p, 2 * qn, d2p, qn, scratch); + MPN_COPY (n2p, r2p, qn); + } + } rn = qn; /* Multiply the first ignored divisor limb by the most significant @@ -316,7 +293,7 @@ dl = dp[in - 2]; #if GMP_NAIL_BITS == 0 - x = (dp[in - 1] << cnt) | ((dl >> 1) >> ((~cnt) % BITS_PER_MP_LIMB)); + x = (dp[in - 1] << cnt) | ((dl >> 1) >> ((~cnt) % GMP_LIMB_BITS)); #else x = (dp[in - 1] << cnt) & GMP_NUMB_MASK; if (cnt != 0) @@ -366,7 +343,7 @@ } /* True: partial remainder now is neutral, i.e., it is not shifted up. */ - tp = (mp_ptr) TMP_ALLOC (dn * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (dn); if (in < qn) { diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom22_mul.c gmp-5.0.2+dfsg/mpn/generic/toom22_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom22_mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom22_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -7,7 +7,7 @@ SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -51,12 +51,29 @@ #define TOOM22_MUL_N_REC(p, a, b, n, ws) \ do { \ if (! MAYBE_mul_toom22 \ - || BELOW_THRESHOLD (n, MUL_KARATSUBA_THRESHOLD)) \ + || BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) \ mpn_mul_basecase (p, a, n, b, n); \ else \ mpn_toom22_mul (p, a, n, b, n, ws); \ } while (0) +/* Normally, this calls mul_basecase or toom22_mul. But when when the fraction + MUL_TOOM33_THRESHOLD / MUL_TOOM22_THRESHOLD is large, an initially small + relative unbalance will become a larger and larger relative unbalance with + each recursion (the difference s-t will be invariant over recursive calls). + Therefore, we need to call toom32_mul. FIXME: Suppress depending on + MUL_TOOM33_THRESHOLD / MUL_TOOM22_THRESHOLD and on MUL_TOOM22_THRESHOLD. */ +#define TOOM22_MUL_REC(p, a, an, b, bn, ws) \ + do { \ + if (! MAYBE_mul_toom22 \ + || BELOW_THRESHOLD (bn, MUL_TOOM22_THRESHOLD)) \ + mpn_mul_basecase (p, a, an, b, bn); \ + else if (4 * an < 5 * bn) \ + mpn_toom22_mul (p, a, an, b, bn, ws); \ + else \ + mpn_toom32_mul (p, a, an, b, bn, ws); \ + } while (0) + void mpn_toom22_mul (mp_ptr pp, mp_srcptr ap, mp_size_t an, @@ -150,8 +167,8 @@ /* vm1, 2n limbs */ TOOM22_MUL_N_REC (vm1, asm1, bsm1, n, scratch_out); - /* vinf, s+t limbs */ - mpn_mul (vinf, a1, s, b1, t); + if (s > t) TOOM22_MUL_REC (vinf, a1, s, b1, t, scratch_out); + else TOOM22_MUL_N_REC (vinf, a1, b1, s, scratch_out); /* v0, 2n limbs */ TOOM22_MUL_N_REC (v0, ap, bp, n, scratch_out); diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom2_sqr.c gmp-5.0.2+dfsg/mpn/generic/toom2_sqr.c --- gmp-4.3.2+dfsg/mpn/generic/toom2_sqr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom2_sqr.c 2011-05-08 09:49:29.000000000 +0000 @@ -6,7 +6,7 @@ SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -32,12 +32,10 @@ <-s--><--n--> ____ ______ |_a1_|___a0_| - |b1_|___b0_| - <-t-><--n--> - v0 = a0 * b0 # A(0)*B(0) - vm1 = (a0- a1)*(b0- b1) # A(-1)*B(-1) - vinf= a1 * b1 # A(inf)*B(inf) + v0 = a0 ^2 # A(0)^2 + vm1 = (a0- a1)^2 # A(-1)^2 + vinf= a1 ^2 # A(inf)^2 */ #if TUNE_PROGRAM_BUILD @@ -47,10 +45,10 @@ (SQR_TOOM3_THRESHOLD >= 2 * SQR_TOOM2_THRESHOLD) #endif -#define TOOM2_SQR_N_REC(p, a, n, ws) \ +#define TOOM2_SQR_REC(p, a, n, ws) \ do { \ if (! MAYBE_sqr_toom2 \ - || BELOW_THRESHOLD (n, SQR_KARATSUBA_THRESHOLD)) \ + || BELOW_THRESHOLD (n, SQR_TOOM2_THRESHOLD)) \ mpn_sqr_basecase (p, a, n); \ else \ mpn_toom2_sqr (p, a, n, ws); \ @@ -103,15 +101,16 @@ #define v0 pp /* 2n */ #define vinf (pp + 2 * n) /* s+s */ #define vm1 scratch /* 2n */ +#define scratch_out scratch + 2 * n /* vm1, 2n limbs */ - TOOM2_SQR_N_REC (vm1, asm1, n, scratch); + TOOM2_SQR_REC (vm1, asm1, n, scratch_out); /* vinf, s+s limbs */ - TOOM2_SQR_N_REC (vinf, a1, s, scratch); + TOOM2_SQR_REC (vinf, a1, s, scratch_out); /* v0, 2n limbs */ - TOOM2_SQR_N_REC (v0, ap, n, scratch); + TOOM2_SQR_REC (v0, ap, n, scratch_out); /* H(v0) + L(vinf) */ cy = mpn_add_n (pp + 2 * n, v0 + n, vinf, n); diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom32_mul.c gmp-5.0.2+dfsg/mpn/generic/toom32_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom32_mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom32_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -2,6 +2,7 @@ times as large as bn. Or more accurately, bn < an < 3bn. Contributed to the GNU project by Torbjorn Granlund. + Improvements by Marco Bodrato and Niels Möller. The idea of applying toom to unbalanced multiplication is due to Marco Bodrato and Alberto Zanoni. @@ -10,7 +11,7 @@ SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -28,15 +29,6 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - Things to work on: - - 1. Trim allocation. The allocations for as1, asm1, bs1, and bsm1 could be - avoided by instead reusing the pp area and the scratch allocation. - - 2. Apply optimizations also to mul_toom42.c. -*/ - #include "gmp.h" #include "gmp-impl.h" @@ -54,20 +46,9 @@ vinf= a2 * b1 # A(inf)*B(inf) */ -#if TUNE_PROGRAM_BUILD -#define MAYBE_mul_toom22 1 -#else -#define MAYBE_mul_toom22 \ - (MUL_TOOM33_THRESHOLD >= 2 * MUL_TOOM22_THRESHOLD) -#endif - -#define TOOM22_MUL_N_REC(p, a, b, n, ws) \ +#define TOOM32_MUL_N_REC(p, a, b, n, ws) \ do { \ - if (! MAYBE_mul_toom22 \ - || BELOW_THRESHOLD (n, MUL_KARATSUBA_THRESHOLD)) \ - mpn_mul_basecase (p, a, n, b, n); \ - else \ - mpn_toom22_mul (p, a, n, b, n, ws); \ + mpn_mul_n (p, a, b, n); \ } while (0) void @@ -78,15 +59,9 @@ { mp_size_t n, s, t; int vm1_neg; -#if HAVE_NATIVE_mpn_add_nc mp_limb_t cy; -#else - mp_limb_t cy, cy2; -#endif - mp_ptr a0_a2; - mp_ptr as1, asm1; - mp_ptr bs1, bsm1; - TMP_DECL; + int hi; + mp_limb_t ap1_hi, bp1_hi; #define a0 ap #define a1 (ap + n) @@ -94,6 +69,9 @@ #define b0 bp #define b1 (bp + n) + /* Required, to ensure that s + t >= n. */ + ASSERT (bn + 2 <= an && an + 6 <= 3*bn); + n = 1 + (2 * an >= 3 * bn ? (an - 1) / (size_t) 3 : (bn - 1) >> 1); s = an - 2 * n; @@ -101,191 +79,234 @@ ASSERT (0 < s && s <= n); ASSERT (0 < t && t <= n); + ASSERT (s + t >= n); - TMP_MARK; - - as1 = TMP_SALLOC_LIMBS (n + 1); - asm1 = TMP_SALLOC_LIMBS (n + 1); - - bs1 = TMP_SALLOC_LIMBS (n + 1); - bsm1 = TMP_SALLOC_LIMBS (n); - - a0_a2 = pp; - - /* Compute as1 and asm1. */ - a0_a2[n] = mpn_add (a0_a2, a0, n, a2, s); -#if HAVE_NATIVE_mpn_addsub_n - if (a0_a2[n] == 0 && mpn_cmp (a0_a2, a1, n) < 0) + /* Product area of size an + bn = 3*n + s + t >= 4*n + 2. */ +#define ap1 (pp) /* n, most significant limb in ap1_hi */ +#define bp1 (pp + n) /* n, most significant bit in bp1_hi */ +#define am1 (pp + 2*n) /* n, most significant bit in hi */ +#define bm1 (pp + 3*n) /* n */ +#define v1 (scratch) /* 2n + 1 */ +#define vm1 (pp) /* 2n + 1 */ +#define scratch_out (scratch + 2*n + 1) /* Currently unused. */ + + /* Scratch need: 2*n + 1 + scratch for the recursive multiplications. */ + + /* FIXME: Keep v1[2*n] and vm1[2*n] in scalar variables? */ + + /* Compute ap1 = a0 + a1 + a3, am1 = a0 - a1 + a3 */ + ap1_hi = mpn_add (ap1, a0, n, a2, s); +#if HAVE_NATIVE_mpn_add_n_sub_n + if (ap1_hi == 0 && mpn_cmp (ap1, a1, n) < 0) { - cy = mpn_addsub_n (as1, asm1, a1, a0_a2, n); - as1[n] = cy >> 1; - asm1[n] = 0; + ap1_hi = mpn_add_n_sub_n (ap1, am1, a1, ap1, n) >> 1; + hi = 0; vm1_neg = 1; } else { - cy = mpn_addsub_n (as1, asm1, a0_a2, a1, n); - as1[n] = a0_a2[n] + (cy >> 1); - asm1[n] = a0_a2[n] - (cy & 1); + cy = mpn_add_n_sub_n (ap1, am1, ap1, a1, n); + hi = ap1_hi - (cy & 1); + ap1_hi += (cy >> 1); vm1_neg = 0; } #else - as1[n] = a0_a2[n] + mpn_add_n (as1, a0_a2, a1, n); - if (a0_a2[n] == 0 && mpn_cmp (a0_a2, a1, n) < 0) + if (ap1_hi == 0 && mpn_cmp (ap1, a1, n) < 0) { - mpn_sub_n (asm1, a1, a0_a2, n); - asm1[n] = 0; + ASSERT_NOCARRY (mpn_sub_n (am1, a1, ap1, n)); + hi = 0; vm1_neg = 1; } else { - cy = mpn_sub_n (asm1, a0_a2, a1, n); - asm1[n] = a0_a2[n] - cy; + hi = ap1_hi - mpn_sub_n (am1, ap1, a1, n); vm1_neg = 0; } + ap1_hi += mpn_add_n (ap1, ap1, a1, n); #endif - /* Compute bs1 and bsm1. */ + /* Compute bp1 = b0 + b1 and bm1 = b0 - b1. */ if (t == n) { -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n if (mpn_cmp (b0, b1, n) < 0) { - cy = mpn_addsub_n (bs1, bsm1, b1, b0, n); + cy = mpn_add_n_sub_n (bp1, bm1, b1, b0, n); vm1_neg ^= 1; } else { - cy = mpn_addsub_n (bs1, bsm1, b0, b1, n); + cy = mpn_add_n_sub_n (bp1, bm1, b0, b1, n); } - bs1[n] = cy >> 1; + bp1_hi = cy >> 1; #else - bs1[n] = mpn_add_n (bs1, b0, b1, n); + bp1_hi = mpn_add_n (bp1, b0, b1, n); if (mpn_cmp (b0, b1, n) < 0) { - mpn_sub_n (bsm1, b1, b0, n); + ASSERT_NOCARRY (mpn_sub_n (bm1, b1, b0, n)); vm1_neg ^= 1; } else { - mpn_sub_n (bsm1, b0, b1, n); + ASSERT_NOCARRY (mpn_sub_n (bm1, b0, b1, n)); } #endif } else { - bs1[n] = mpn_add (bs1, b0, n, b1, t); + /* FIXME: Should still use mpn_add_n_sub_n for the main part. */ + bp1_hi = mpn_add (bp1, b0, n, b1, t); if (mpn_zero_p (b0 + t, n - t) && mpn_cmp (b0, b1, t) < 0) { - mpn_sub_n (bsm1, b1, b0, t); - MPN_ZERO (bsm1 + t, n - t); + ASSERT_NOCARRY (mpn_sub_n (bm1, b1, b0, t)); + MPN_ZERO (bm1 + t, n - t); vm1_neg ^= 1; } else { - mpn_sub (bsm1, b0, n, b1, t); + ASSERT_NOCARRY (mpn_sub (bm1, b0, n, b1, t)); } } - ASSERT (as1[n] <= 2); - ASSERT (bs1[n] <= 1); - ASSERT (asm1[n] <= 1); -/*ASSERT (bsm1[n] == 0); */ - -#define v0 pp /* 2n */ -#define v1 (scratch) /* 2n+1 */ -#define vinf (pp + 3 * n) /* s+t */ -#define vm1 (scratch + 2 * n + 1) /* 2n+1 */ -#define scratch_out scratch + 4 * n + 2 - - /* vm1, 2n+1 limbs */ - TOOM22_MUL_N_REC (vm1, asm1, bsm1, n, scratch_out); - cy = 0; - if (asm1[n] != 0) - cy = mpn_add_n (vm1 + n, vm1 + n, bsm1, n); - vm1[2 * n] = cy; - - /* vinf, s+t limbs */ - if (s > t) mpn_mul (vinf, a2, s, b1, t); - else mpn_mul (vinf, b1, t, a2, s); - - /* v1, 2n+1 limbs */ - TOOM22_MUL_N_REC (v1, as1, bs1, n, scratch_out); - if (as1[n] == 1) + TOOM32_MUL_N_REC (v1, ap1, bp1, n, scratch_out); + if (ap1_hi == 1) { - cy = bs1[n] + mpn_add_n (v1 + n, v1 + n, bs1, n); + cy = bp1_hi + mpn_add_n (v1 + n, v1 + n, bp1, n); } - else if (as1[n] == 2) + else if (ap1_hi == 2) { #if HAVE_NATIVE_mpn_addlsh1_n - cy = 2 * bs1[n] + mpn_addlsh1_n (v1 + n, v1 + n, bs1, n); + cy = 2 * bp1_hi + mpn_addlsh1_n (v1 + n, v1 + n, bp1, n); #else - cy = 2 * bs1[n] + mpn_addmul_1 (v1 + n, bs1, n, CNST_LIMB(2)); + cy = 2 * bp1_hi + mpn_addmul_1 (v1 + n, bp1, n, CNST_LIMB(2)); #endif } else cy = 0; - if (bs1[n] != 0) - cy += mpn_add_n (v1 + n, v1 + n, as1, n); + if (bp1_hi != 0) + cy += mpn_add_n (v1 + n, v1 + n, ap1, n); v1[2 * n] = cy; - mpn_mul_n (v0, ap, bp, n); /* v0, 2n limbs */ + TOOM32_MUL_N_REC (vm1, am1, bm1, n, scratch_out); + if (hi) + hi = mpn_add_n (vm1+n, vm1+n, bm1, n); - /* Interpolate */ + vm1[2*n] = hi; + /* v1 <-- (v1 + vm1) / 2 = x0 + x2 */ if (vm1_neg) { -#if HAVE_NATIVE_mpn_rsh1add_n - mpn_rsh1add_n (vm1, v1, vm1, 2 * n + 1); +#if HAVE_NATIVE_mpn_rsh1sub_n + mpn_rsh1sub_n (v1, v1, vm1, 2*n+1); #else - mpn_add_n (vm1, v1, vm1, 2 * n + 1); - mpn_rshift (vm1, vm1, 2 * n + 1, 1); + mpn_sub_n (v1, v1, vm1, 2*n+1); + ASSERT_NOCARRY (mpn_rshift (v1, v1, 2*n+1, 1)); #endif } else { -#if HAVE_NATIVE_mpn_rsh1sub_n - mpn_rsh1sub_n (vm1, v1, vm1, 2 * n + 1); +#if HAVE_NATIVE_mpn_rsh1add_n + mpn_rsh1add_n (v1, v1, vm1, 2*n+1); #else - mpn_sub_n (vm1, v1, vm1, 2 * n + 1); - mpn_rshift (vm1, vm1, 2 * n + 1, 1); + mpn_add_n (v1, v1, vm1, 2*n+1); + ASSERT_NOCARRY (mpn_rshift (v1, v1, 2*n+1, 1)); #endif } - mpn_sub_n (v1, v1, vm1, 2 * n + 1); - v1[2 * n] -= mpn_sub_n (v1, v1, v0, 2 * n); + /* We get x1 + x3 = (x0 + x2) - (x0 - x1 + x2 - x3), and hence + + y = x1 + x3 + (x0 + x2) * B + = (x0 + x2) * B + (x0 + x2) - vm1. - /* - pp[] prior to operations: - |_H vinf|_L vinf|_______|_______|_______| - - summation scheme for remaining operations: - |_______|_______|_______|_______|_______| - |_Hvinf_|_Lvinf_| |_H v0__|_L v0__| - | H vm1 | L vm1 | - |-H vinf|-L vinf| - | H v1 | L v1 | + y is 3*n + 1 limbs, y = y0 + y1 B + y2 B^2. We store them as + follows: y0 at scratch, y1 at pp + 2*n, and y2 at scratch + n + (already in place, except for carry propagation). + + We thus add + + B^3 B^2 B 1 + | | | | + +-----+----+ + + | x0 + x2 | + +----+-----+----+ + + | x0 + x2 | + +----------+ + - | vm1 | + --+----++----+----+- + | y2 | y1 | y0 | + +-----+----+----+ + + Since we store y0 at the same location as the low half of x0 + x2, we + need to do the middle sum first. */ + + hi = vm1[2*n]; + cy = mpn_add_n (pp + 2*n, v1, v1 + n, n); + MPN_INCR_U (v1 + n, n + 1, cy + v1[2*n]); + + /* FIXME: Can we get rid of this second vm1_neg conditional by + swapping the location of +1 and -1 values? */ + if (vm1_neg) + { + cy = mpn_add_n (v1, v1, vm1, n); + hi += mpn_add_nc (pp + 2*n, pp + 2*n, vm1 + n, n, cy); + MPN_INCR_U (v1 + n, n+1, hi); + } + else + { + cy = mpn_sub_n (v1, v1, vm1, n); + hi += mpn_sub_nc (pp + 2*n, pp + 2*n, vm1 + n, n, cy); + MPN_DECR_U (v1 + n, n+1, hi); + } + + TOOM32_MUL_N_REC (pp, a0, b0, n, scratch_out); + /* vinf, s+t limbs. Use mpn_mul for now, to handle unbalanced operands */ + if (s > t) mpn_mul (pp+3*n, a2, s, b1, t); + else mpn_mul (pp+3*n, b1, t, a2, s); + + /* Remaining interpolation. + + y * B + x0 + x3 B^3 - x0 B^2 - x3 B + = (x1 + x3) B + (x0 + x2) B^2 + x0 + x3 B^3 - x0 B^2 - x3 B + = y0 B + y1 B^2 + y3 B^3 + Lx0 + H x0 B + + L x3 B^3 + H x3 B^4 - Lx0 B^2 - H x0 B^3 - L x3 B - H x3 B^2 + = L x0 + (y0 + H x0 - L x3) B + (y1 - L x0 - H x3) B^2 + + (y2 - (H x0 - L x3)) B^3 + H x3 B^4 + + B^4 B^3 B^2 B 1 + | | | | | | + +-------+ +---------+---------+ + | Hx3 | | Hx0-Lx3 | Lx0 | + +------+----------+---------+---------+---------+ + | y2 | y1 | y0 | + ++---------+---------+---------+ + -| Hx0-Lx3 | - Lx0 | + +---------+---------+ + | - Hx3 | + +--------+ + + We must take into account the carry from Hx0 - Lx3. */ - mpn_sub (vm1, vm1, 2 * n + 1, vinf, s + t); -#if HAVE_NATIVE_mpn_add_nc - cy = mpn_add_n (pp + n, pp + n, vm1, n); - cy = mpn_add_nc (pp + 2 * n, v1, vm1 + n, n, cy); - cy = mpn_add_nc (pp + 3 * n, pp + 3 * n, v1 + n, n, cy); - mpn_incr_u (pp + 3 * n, vm1[2 * n]); - if (LIKELY (n != s + t)) /* FIXME: Limit operand range to avoid condition */ - mpn_incr_u (pp + 4 * n, cy + v1[2 * n]); -#else - cy2 = mpn_add_n (pp + n, pp + n, vm1, n); - cy = mpn_add_n (pp + 2 * n, v1, vm1 + n, n); - mpn_incr_u (pp + 2 * n, cy2); - mpn_incr_u (pp + 3 * n, cy + vm1[2 * n]); - cy = mpn_add_n (pp + 3 * n, pp + 3 * n, v1 + n, n); - if (LIKELY (n != s + t)) /* FIXME: Limit operand range to avoid condition */ - mpn_incr_u (pp + 4 * n, cy + v1[2 * n]); -#endif + cy = mpn_sub_n (pp + n, pp + n, pp+3*n, n); + hi = scratch[2*n] + cy; + + cy = mpn_sub_nc (pp + 2*n, pp + 2*n, pp, n, cy); + hi -= mpn_sub_nc (pp + 3*n, scratch + n, pp + n, n, cy); - TMP_FREE; + hi += mpn_add (pp + n, pp + n, 3*n, scratch, n); + + /* FIXME: Is support for s + t == n needed? */ + if (LIKELY (s + t > n)) + { + hi -= mpn_sub (pp + 2*n, pp + 2*n, 2*n, pp + 4*n, s+t-n); + + if (hi < 0) + MPN_DECR_U (pp + 4*n, s+t-n, -hi); + else + MPN_INCR_U (pp + 4*n, s+t-n, hi); + } + else + ASSERT (hi == 0); } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom33_mul.c gmp-5.0.2+dfsg/mpn/generic/toom33_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom33_mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom33_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,13 +1,14 @@ -/* mpn_toom33_mul -- Multiply {ap,an} and {bp,bn} where an and bn are close in +/* mpn_toom33_mul -- Multiply {ap,an} and {p,bn} where an and bn are close in size. Or more accurately, bn <= an < (3/2)bn. Contributed to the GNU project by Torbjorn Granlund. + Additional improvements by Marco Bodrato. THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright 2006, 2007, 2008, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -25,24 +26,16 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - Things to work on: - - 1. Trim allocation. The allocations for as1, asm1, bs1, and bsm1 could be - avoided by instead reusing the pp area and the scratch area. - 2. Use new toom functions for the recursive calls. -*/ - #include "gmp.h" #include "gmp-impl.h" /* Evaluate in: -1, 0, +1, +2, +inf - <-s-><--n--><--n--><--n--> - ___ ______ ______ ______ - |a3_|___a2_|___a1_|___a0_| - |_b1_|___b0_| - <-t--><--n--> + <-s--><--n--><--n--><--n--> + ____ ______ ______ ______ + |_a3_|___a2_|___a1_|___a0_| + |b3_|___b2_|___b1_|___b0_| + <-t-><--n--><--n--><--n--> v0 = a0 * b0 # A(0)*B(0) v1 = (a0+ a1+ a2)*(b0+ b1+ b2) # A(1)*B(1) ah <= 2 bh <= 2 @@ -56,21 +49,28 @@ #define MAYBE_mul_toom33 1 #else #define MAYBE_mul_basecase \ - (MUL_TOOM33_THRESHOLD < 3 * MUL_KARATSUBA_THRESHOLD) + (MUL_TOOM33_THRESHOLD < 3 * MUL_TOOM22_THRESHOLD) #define MAYBE_mul_toom33 \ (MUL_TOOM44_THRESHOLD >= 3 * MUL_TOOM33_THRESHOLD) #endif +/* FIXME: TOOM33_MUL_N_REC is not quite right for a balanced + multiplication at the infinity point. We may have + MAYBE_mul_basecase == 0, and still get s just below + MUL_TOOM22_THRESHOLD. If MUL_TOOM33_THRESHOLD == 7, we can even get + s == 1 and mpn_toom22_mul will crash. +*/ + #define TOOM33_MUL_N_REC(p, a, b, n, ws) \ do { \ if (MAYBE_mul_basecase \ - && BELOW_THRESHOLD (n, MUL_KARATSUBA_THRESHOLD)) \ + && BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) \ mpn_mul_basecase (p, a, n, b, n); \ else if (! MAYBE_mul_toom33 \ || BELOW_THRESHOLD (n, MUL_TOOM33_THRESHOLD)) \ - mpn_kara_mul_n (p, a, b, n, ws); \ + mpn_toom22_mul (p, a, n, b, n, ws); \ else \ - mpn_toom3_mul_n (p, a, b, n, ws); \ + mpn_toom33_mul (p, a, n, b, n, ws); \ } while (0) void @@ -85,7 +85,6 @@ mp_ptr gp; mp_ptr as1, asm1, as2; mp_ptr bs1, bsm1, bs2; - TMP_DECL; #define a0 ap #define a1 (ap + n) @@ -104,35 +103,34 @@ ASSERT (0 < s && s <= n); ASSERT (0 < t && t <= n); - TMP_MARK; - - as1 = TMP_SALLOC_LIMBS (n + 1); - asm1 = TMP_SALLOC_LIMBS (n + 1); - as2 = TMP_SALLOC_LIMBS (n + 1); + as1 = scratch + 4 * n + 4; + asm1 = scratch + 2 * n + 2; + as2 = pp + n + 1; + + bs1 = pp; + bsm1 = scratch + 3 * n + 3; /* we need 4n+4 <= 4n+s+t */ + bs2 = pp + 2 * n + 2; - bs1 = TMP_SALLOC_LIMBS (n + 1); - bsm1 = TMP_SALLOC_LIMBS (n + 1); - bs2 = TMP_SALLOC_LIMBS (n + 1); - - gp = pp; + gp = scratch; vm1_neg = 0; /* Compute as1 and asm1. */ cy = mpn_add (gp, a0, n, a2, s); -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n if (cy == 0 && mpn_cmp (gp, a1, n) < 0) { - cy = mpn_addsub_n (as1, asm1, a1, gp, n); - as1[n] = 0; + cy = mpn_add_n_sub_n (as1, asm1, a1, gp, n); + as1[n] = cy >> 1; asm1[n] = 0; vm1_neg = 1; } else { - cy2 = mpn_addsub_n (as1, asm1, gp, a1, n); + mp_limb_t cy2; + cy2 = mpn_add_n_sub_n (as1, asm1, gp, a1, n); as1[n] = cy + (cy2 >> 1); - asm1[n] = cy - (cy & 1); + asm1[n] = cy - (cy2 & 1); } #else as1[n] = cy + mpn_add_n (as1, gp, a1, n); @@ -150,36 +148,45 @@ #endif /* Compute as2. */ +#if HAVE_NATIVE_mpn_rsblsh1_n + cy = mpn_add_n (as2, a2, as1, s); + if (s != n) + cy = mpn_add_1 (as2 + s, as1 + s, n - s, cy); + cy += as1[n]; + cy = 2 * cy + mpn_rsblsh1_n (as2, a0, as2, n); +#else #if HAVE_NATIVE_mpn_addlsh1_n cy = mpn_addlsh1_n (as2, a1, a2, s); if (s != n) cy = mpn_add_1 (as2 + s, a1 + s, n - s, cy); cy = 2 * cy + mpn_addlsh1_n (as2, a0, as2, n); #else - cy = mpn_lshift (as2, a2, s, 1); - cy += mpn_add_n (as2, a1, as2, s); + cy = mpn_add_n (as2, a2, as1, s); if (s != n) - cy = mpn_add_1 (as2 + s, a1 + s, n - s, cy); + cy = mpn_add_1 (as2 + s, as1 + s, n - s, cy); + cy += as1[n]; cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a0, as2, n); + cy -= mpn_sub_n (as2, as2, a0, n); +#endif #endif as2[n] = cy; /* Compute bs1 and bsm1. */ cy = mpn_add (gp, b0, n, b2, t); -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n if (cy == 0 && mpn_cmp (gp, b1, n) < 0) { - cy = mpn_addsub_n (bs1, bsm1, b1, gp, n); - bs1[n] = 0; + cy = mpn_add_n_sub_n (bs1, bsm1, b1, gp, n); + bs1[n] = cy >> 1; bsm1[n] = 0; vm1_neg ^= 1; } else { - cy2 = mpn_addsub_n (bs1, bsm1, gp, b1, n); + mp_limb_t cy2; + cy2 = mpn_add_n_sub_n (bs1, bsm1, gp, b1, n); bs1[n] = cy + (cy2 >> 1); - bsm1[n] = cy - (cy & 1); + bsm1[n] = cy - (cy2 & 1); } #else bs1[n] = cy + mpn_add_n (bs1, gp, b1, n); @@ -197,18 +204,26 @@ #endif /* Compute bs2. */ +#if HAVE_NATIVE_mpn_rsblsh1_n + cy = mpn_add_n (bs2, b2, bs1, t); + if (t != n) + cy = mpn_add_1 (bs2 + t, bs1 + t, n - t, cy); + cy += bs1[n]; + cy = 2 * cy + mpn_rsblsh1_n (bs2, b0, bs2, n); +#else #if HAVE_NATIVE_mpn_addlsh1_n cy = mpn_addlsh1_n (bs2, b1, b2, t); if (t != n) cy = mpn_add_1 (bs2 + t, b1 + t, n - t, cy); cy = 2 * cy + mpn_addlsh1_n (bs2, b0, bs2, n); #else - cy = mpn_lshift (bs2, b2, t, 1); - cy += mpn_add_n (bs2, b1, bs2, t); + cy = mpn_add_n (bs2, bs1, b2, t); if (t != n) - cy = mpn_add_1 (bs2 + t, b1 + t, n - t, cy); + cy = mpn_add_1 (bs2 + t, bs1 + t, n - t, cy); + cy += bs1[n]; cy = 2 * cy + mpn_lshift (bs2, bs2, n, 1); - cy += mpn_add_n (bs2, b0, bs2, n); + cy -= mpn_sub_n (bs2, bs2, b0, n); +#endif #endif bs2[n] = cy; @@ -224,7 +239,7 @@ #define vinf (pp + 4 * n) /* s+t */ #define vm1 scratch /* 2n+1 */ #define v2 (scratch + 2 * n + 1) /* 2n+2 */ -#define scratch_out (scratch + 4 * n + 4) +#define scratch_out (scratch + 5 * n + 5) /* vm1, 2n+1 limbs */ #ifdef SMALLER_RECURSION @@ -285,7 +300,5 @@ TOOM33_MUL_N_REC (v0, ap, bp, n, scratch_out); /* v0, 2n limbs */ - mpn_toom_interpolate_5pts (pp, v2, vm1, n, s + t, 1^vm1_neg, vinf0, scratch_out); - - TMP_FREE; + mpn_toom_interpolate_5pts (pp, v2, vm1, n, s + t, vm1_neg, vinf0); } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom3_sqr.c gmp-5.0.2+dfsg/mpn/generic/toom3_sqr.c --- gmp-4.3.2+dfsg/mpn/generic/toom3_sqr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom3_sqr.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,12 +1,13 @@ /* mpn_toom3_sqr -- Square {ap,an}. Contributed to the GNU project by Torbjorn Granlund. + Additional improvements by Marco Bodrato. THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -24,30 +25,20 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - Things to work on: - - 1. Trim allocation. The allocations for as1 and asm1 could be - avoided by instead reusing the pp area and the scratch area. - 2. Use new toom functions for the recursive calls. -*/ - #include "gmp.h" #include "gmp-impl.h" /* Evaluate in: -1, 0, +1, +2, +inf - <-s-><--n--><--n--><--n--> - ___ ______ ______ ______ - |a3_|___a2_|___a1_|___a0_| - |_b1_|___b0_| - <-t--><--n--> - - v0 = a0 * b0 # A(0)*B(0) - v1 = (a0+ a1+ a2)*(b0+ b1+ b2) # A(1)*B(1) ah <= 2 bh <= 2 - vm1 = (a0- a1+ a2)*(b0- b1+ b2) # A(-1)*B(-1) |ah| <= 1 bh <= 1 - v2 = (a0+2a1+4a2)*(b0+2b1+4b2) # A(2)*B(2) ah <= 6 bh <= 6 - vinf= a2 * b2 # A(inf)*B(inf) + <-s--><--n--><--n--> + ____ ______ ______ + |_a2_|___a1_|___a0_| + + v0 = a0 ^2 # A(0)^2 + v1 = (a0+ a1+ a2)^2 # A(1)^2 ah <= 2 + vm1 = (a0- a1+ a2)^2 # A(-1)^2 |ah| <= 1 + v2 = (a0+2a1+4a2)^2 # A(2)^2 ah <= 6 + vinf= a2 ^2 # A(inf)^2 */ #if TUNE_PROGRAM_BUILD @@ -55,21 +46,21 @@ #define MAYBE_sqr_toom3 1 #else #define MAYBE_sqr_basecase \ - (SQR_TOOM3_THRESHOLD < 3 * SQR_KARATSUBA_THRESHOLD) + (SQR_TOOM3_THRESHOLD < 3 * SQR_TOOM2_THRESHOLD) #define MAYBE_sqr_toom3 \ (SQR_TOOM4_THRESHOLD >= 3 * SQR_TOOM3_THRESHOLD) #endif -#define TOOM3_SQR_N_REC(p, a, n, ws) \ +#define TOOM3_SQR_REC(p, a, n, ws) \ do { \ if (MAYBE_sqr_basecase \ - && BELOW_THRESHOLD (n, SQR_KARATSUBA_THRESHOLD)) \ + && BELOW_THRESHOLD (n, SQR_TOOM2_THRESHOLD)) \ mpn_sqr_basecase (p, a, n); \ else if (! MAYBE_sqr_toom3 \ || BELOW_THRESHOLD (n, SQR_TOOM3_THRESHOLD)) \ - mpn_kara_sqr_n (p, a, n, ws); \ + mpn_toom2_sqr (p, a, n, ws); \ else \ - mpn_toom3_sqr_n (p, a, n, ws); \ + mpn_toom3_sqr (p, a, n, ws); \ } while (0) void @@ -81,7 +72,6 @@ mp_limb_t cy, vinf0; mp_ptr gp; mp_ptr as1, asm1, as2; - TMP_DECL; #define a0 ap #define a1 (ap + n) @@ -93,28 +83,27 @@ ASSERT (0 < s && s <= n); - TMP_MARK; + as1 = scratch + 4 * n + 4; + asm1 = scratch + 2 * n + 2; + as2 = pp + n + 1; - as1 = TMP_SALLOC_LIMBS (n + 1); - asm1 = TMP_SALLOC_LIMBS (n + 1); - as2 = TMP_SALLOC_LIMBS (n + 1); - - gp = pp; + gp = scratch; /* Compute as1 and asm1. */ cy = mpn_add (gp, a0, n, a2, s); -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n if (cy == 0 && mpn_cmp (gp, a1, n) < 0) { - cy = mpn_addsub_n (as1, asm1, a1, gp, n); - as1[n] = 0; + cy = mpn_add_n_sub_n (as1, asm1, a1, gp, n); + as1[n] = cy >> 1; asm1[n] = 0; } else { - cy2 = mpn_addsub_n (as1, asm1, gp, a1, n); + mp_limb_t cy2; + cy2 = mpn_add_n_sub_n (as1, asm1, gp, a1, n); as1[n] = cy + (cy2 >> 1); - asm1[n] = cy - (cy & 1); + asm1[n] = cy - (cy2 & 1); } #else as1[n] = cy + mpn_add_n (as1, gp, a1, n); @@ -131,18 +120,26 @@ #endif /* Compute as2. */ +#if HAVE_NATIVE_mpn_rsblsh1_n + cy = mpn_add_n (as2, a2, as1, s); + if (s != n) + cy = mpn_add_1 (as2 + s, as1 + s, n - s, cy); + cy += as1[n]; + cy = 2 * cy + mpn_rsblsh1_n (as2, a0, as2, n); +#else #if HAVE_NATIVE_mpn_addlsh1_n cy = mpn_addlsh1_n (as2, a1, a2, s); if (s != n) cy = mpn_add_1 (as2 + s, a1 + s, n - s, cy); cy = 2 * cy + mpn_addlsh1_n (as2, a0, as2, n); #else - cy = mpn_lshift (as2, a2, s, 1); - cy += mpn_add_n (as2, a1, as2, s); + cy = mpn_add_n (as2, a2, as1, s); if (s != n) - cy = mpn_add_1 (as2 + s, a1 + s, n - s, cy); + cy = mpn_add_1 (as2 + s, as1 + s, n - s, cy); + cy += as1[n]; cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a0, as2, n); + cy -= mpn_sub_n (as2, as2, a0, n); +#endif #endif as2[n] = cy; @@ -154,11 +151,11 @@ #define vinf (pp + 4 * n) /* s+s */ #define vm1 scratch /* 2n+1 */ #define v2 (scratch + 2 * n + 1) /* 2n+2 */ -#define scratch_out (scratch + 4 * n + 4) +#define scratch_out (scratch + 5 * n + 5) /* vm1, 2n+1 limbs */ #ifdef SMALLER_RECURSION - TOOM3_SQR_N_REC (vm1, asm1, n, scratch_out); + TOOM3_SQR_REC (vm1, asm1, n, scratch_out); cy = 0; if (asm1[n] != 0) cy = asm1[n] + mpn_add_n (vm1 + n, vm1 + n, asm1, n); @@ -166,18 +163,18 @@ cy += mpn_add_n (vm1 + n, vm1 + n, asm1, n); vm1[2 * n] = cy; #else - TOOM3_SQR_N_REC (vm1, asm1, n + 1, scratch_out); + TOOM3_SQR_REC (vm1, asm1, n + 1, scratch_out); #endif - TOOM3_SQR_N_REC (v2, as2, n + 1, scratch_out); /* v2, 2n+1 limbs */ + TOOM3_SQR_REC (v2, as2, n + 1, scratch_out); /* v2, 2n+1 limbs */ - TOOM3_SQR_N_REC (vinf, a2, s, scratch_out); /* vinf, s+s limbs */ + TOOM3_SQR_REC (vinf, a2, s, scratch_out); /* vinf, s+s limbs */ vinf0 = vinf[0]; /* v1 overlaps with this */ #ifdef SMALLER_RECURSION /* v1, 2n+1 limbs */ - TOOM3_SQR_N_REC (v1, as1, n, scratch_out); + TOOM3_SQR_REC (v1, as1, n, scratch_out); if (as1[n] == 1) { cy = as1[n] + mpn_add_n (v1 + n, v1 + n, as1, n); @@ -207,13 +204,11 @@ v1[2 * n] = cy; #else cy = vinf[1]; - TOOM3_SQR_N_REC (v1, as1, n + 1, scratch_out); + TOOM3_SQR_REC (v1, as1, n + 1, scratch_out); vinf[1] = cy; #endif - TOOM3_SQR_N_REC (v0, ap, n, scratch_out); /* v0, 2n limbs */ - - mpn_toom_interpolate_5pts (pp, v2, vm1, n, s + s, 1, vinf0, scratch_out); + TOOM3_SQR_REC (v0, ap, n, scratch_out); /* v0, 2n limbs */ - TMP_FREE; + mpn_toom_interpolate_5pts (pp, v2, vm1, n, s + s, 0, vinf0); } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom42_mul.c gmp-5.0.2+dfsg/mpn/generic/toom42_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom42_mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom42_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -29,15 +29,6 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - Things to work on: - - 1. Trim allocation. The allocations for as1, asm1, bs1, and bsm1 could be - avoided by instead reusing the pp area and the scratch allocation. - - 2. Apply optimizations also to mul_toom32.c. -*/ - #include "gmp.h" #include "gmp-impl.h" @@ -56,20 +47,9 @@ vinf= a3 * b1 # A(inf)*B(inf) */ -#if TUNE_PROGRAM_BUILD -#define MAYBE_mul_toom22 1 -#else -#define MAYBE_mul_toom22 \ - (MUL_TOOM33_THRESHOLD >= 2 * MUL_TOOM22_THRESHOLD) -#endif - -#define TOOM22_MUL_N_REC(p, a, b, n, ws) \ +#define TOOM42_MUL_N_REC(p, a, b, n, ws) \ do { \ - if (! MAYBE_mul_toom22 \ - || BELOW_THRESHOLD (n, MUL_KARATSUBA_THRESHOLD)) \ - mpn_mul_basecase (p, a, n, b, n); \ - else \ - mpn_toom22_mul (p, a, n, b, n, ws); \ + mpn_mul_n (p, a, b, n); \ } while (0) void @@ -115,32 +95,7 @@ a1_a3 = pp + n + 1; /* Compute as1 and asm1. */ - a0_a2[n] = mpn_add_n (a0_a2, a0, a2, n); - a1_a3[n] = mpn_add (a1_a3, a1, n, a3, s); -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0) - { - mpn_addsub_n (as1, asm1, a1_a3, a0_a2, n + 1); - vm1_neg = 1; - } - else - { - mpn_addsub_n (as1, asm1, a0_a2, a1_a3, n + 1); - vm1_neg = 0; - } -#else - mpn_add_n (as1, a0_a2, a1_a3, n + 1); - if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0) - { - mpn_sub_n (asm1, a1_a3, a0_a2, n + 1); - vm1_neg = 1; - } - else - { - mpn_sub_n (asm1, a0_a2, a1_a3, n + 1); - vm1_neg = 0; - } -#endif + vm1_neg = mpn_toom_eval_dgr3_pm1 (as1, asm1, ap, n, s, a0_a2) & 1; /* Compute as2. */ #if HAVE_NATIVE_mpn_addlsh1_n @@ -164,15 +119,15 @@ /* Compute bs1 and bsm1. */ if (t == n) { -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n if (mpn_cmp (b0, b1, n) < 0) { - cy = mpn_addsub_n (bs1, bsm1, b1, b0, n); + cy = mpn_add_n_sub_n (bs1, bsm1, b1, b0, n); vm1_neg ^= 1; } else { - cy = mpn_addsub_n (bs1, bsm1, b0, b1, n); + cy = mpn_add_n_sub_n (bs1, bsm1, b0, b1, n); } bs1[n] = cy >> 1; #else @@ -220,16 +175,16 @@ #define vinf (pp + 4 * n) /* s+t */ #define vm1 scratch /* 2n+1 */ #define v2 (scratch + 2 * n + 1) /* 2n+2 */ -#define scratch_out scratch + 4 * n + 4 +#define scratch_out scratch + 4 * n + 4 /* Currently unused. */ /* vm1, 2n+1 limbs */ - TOOM22_MUL_N_REC (vm1, asm1, bsm1, n, scratch_out); + TOOM42_MUL_N_REC (vm1, asm1, bsm1, n, scratch_out); cy = 0; if (asm1[n] != 0) cy = mpn_add_n (vm1 + n, vm1 + n, bsm1, n); vm1[2 * n] = cy; - TOOM22_MUL_N_REC (v2, as2, bs2, n + 1, scratch_out); /* v2, 2n+1 limbs */ + TOOM42_MUL_N_REC (v2, as2, bs2, n + 1, scratch_out); /* v2, 2n+1 limbs */ /* vinf, s+t limbs */ if (s > t) mpn_mul (vinf, a3, s, b1, t); @@ -238,7 +193,7 @@ vinf0 = vinf[0]; /* v1 overlaps with this */ /* v1, 2n+1 limbs */ - TOOM22_MUL_N_REC (v1, as1, bs1, n, scratch_out); + TOOM42_MUL_N_REC (v1, as1, bs1, n, scratch_out); if (as1[n] == 1) { cy = bs1[n] + mpn_add_n (v1 + n, v1 + n, bs1, n); @@ -261,9 +216,9 @@ cy += mpn_add_n (v1 + n, v1 + n, as1, n); v1[2 * n] = cy; - TOOM22_MUL_N_REC (v0, ap, bp, n, scratch_out); /* v0, 2n limbs */ + TOOM42_MUL_N_REC (v0, ap, bp, n, scratch_out); /* v0, 2n limbs */ - mpn_toom_interpolate_5pts (pp, v2, vm1, n, s + t, 1^vm1_neg, vinf0, scratch + 4 * n + 4); + mpn_toom_interpolate_5pts (pp, v2, vm1, n, s + t, vm1_neg, vinf0); TMP_FREE; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom43_mul.c gmp-5.0.2+dfsg/mpn/generic/toom43_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom43_mul.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom43_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,223 @@ +/* mpn_toom43_mul -- Multiply {ap,an} and {bp,bn} where an is nominally 4/3 + times as large as bn. Or more accurately, bn < an < 2 bn. + + Contributed to the GNU project by Marco Bodrato. + + The idea of applying toom to unbalanced multiplication is due to Marco + Bodrato and Alberto Zanoni. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +/* Evaluate in: -2, -1, 0, +1, +2, +inf + + <-s-><--n--><--n--><--n--> + ___ ______ ______ ______ + |a3_|___a2_|___a1_|___a0_| + |_b2_|___b1_|___b0_| + <-t--><--n--><--n--> + + v0 = a0 * b0 # A(0)*B(0) + v1 = (a0+ a1+ a2+ a3)*(b0+ b1+ b2) # A(1)*B(1) ah <= 3 bh <= 2 + vm1 = (a0- a1+ a2- a3)*(b0- b1+ b2) # A(-1)*B(-1) |ah| <= 1 |bh|<= 1 + v2 = (a0+2a1+4a2+8a3)*(b0+2b1+4b2) # A(2)*B(2) ah <= 14 bh <= 6 + vm2 = (a0-2a1+4a2-8a3)*(b0-2b1+4b2) # A(-2)*B(-2) |ah| <= 9 |bh|<= 4 + vinf= a3 * b2 # A(inf)*B(inf) +*/ + +void +mpn_toom43_mul (mp_ptr pp, + mp_srcptr ap, mp_size_t an, + mp_srcptr bp, mp_size_t bn, mp_ptr scratch) +{ + mp_size_t n, s, t; + enum toom6_flags flags; + mp_limb_t cy; + +#define a0 ap +#define a1 (ap + n) +#define a2 (ap + 2 * n) +#define a3 (ap + 3 * n) +#define b0 bp +#define b1 (bp + n) +#define b2 (bp + 2 * n) + + n = 1 + (3 * an >= 4 * bn ? (an - 1) >> 2 : (bn - 1) / (size_t) 3); + + s = an - 3 * n; + t = bn - 2 * n; + + ASSERT (0 < s && s <= n); + ASSERT (0 < t && t <= n); + + /* This is true whenever an >= 25 or bn >= 19, I think. It + guarantees that we can fit 5 values of size n+1 in the product + area. */ + ASSERT (s+t >= 5); + +#define v0 pp /* 2n */ +#define vm1 (scratch) /* 2n+1 */ +#define v1 (pp + 2*n) /* 2n+1 */ +#define vm2 (scratch + 2 * n + 1) /* 2n+1 */ +#define v2 (scratch + 4 * n + 2) /* 2n+1 */ +#define vinf (pp + 5 * n) /* s+t */ +#define bs1 pp /* n+1 */ +#define bsm1 (scratch + 2 * n + 2) /* n+1 */ +#define asm1 (scratch + 3 * n + 3) /* n+1 */ +#define asm2 (scratch + 4 * n + 4) /* n+1 */ +#define bsm2 (pp + n + 1) /* n+1 */ +#define bs2 (pp + 2 * n + 2) /* n+1 */ +#define as2 (pp + 3 * n + 3) /* n+1 */ +#define as1 (pp + 4 * n + 4) /* n+1 */ + + /* Total sccratch need is 6 * n + 3 + 1; we allocate one extra + limb, because products will overwrite 2n+2 limbs. */ + +#define a0a2 scratch +#define b0b2 scratch +#define a1a3 asm1 +#define b1d bsm1 + + /* Compute as2 and asm2. */ + flags = toom6_vm2_neg & mpn_toom_eval_dgr3_pm2 (as2, asm2, ap, n, s, a1a3); + + /* Compute bs2 and bsm2. */ + b1d[n] = mpn_lshift (b1d, b1, n, 1); /* 2b1 */ + cy = mpn_lshift (b0b2, b2, t, 2); /* 4b2 */ + cy += mpn_add_n (b0b2, b0b2, b0, t); /* 4b2 + b0 */ + if (t != n) + cy = mpn_add_1 (b0b2 + t, b0 + t, n - t, cy); + b0b2[n] = cy; + +#if HAVE_NATIVE_mpn_add_n_sub_n + if (mpn_cmp (b0b2, b1d, n+1) < 0) + { + mpn_add_n_sub_n (bs2, bsm2, b1d, b0b2, n+1); + flags ^= toom6_vm2_neg; + } + else + { + mpn_add_n_sub_n (bs2, bsm2, b0b2, b1d, n+1); + } +#else + mpn_add_n (bs2, b0b2, b1d, n+1); + if (mpn_cmp (b0b2, b1d, n+1) < 0) + { + mpn_sub_n (bsm2, b1d, b0b2, n+1); + flags ^= toom6_vm2_neg; + } + else + { + mpn_sub_n (bsm2, b0b2, b1d, n+1); + } +#endif + + /* Compute as1 and asm1. */ + flags ^= toom6_vm1_neg & mpn_toom_eval_dgr3_pm1 (as1, asm1, ap, n, s, a0a2); + + /* Compute bs1 and bsm1. */ + bsm1[n] = mpn_add (bsm1, b0, n, b2, t); +#if HAVE_NATIVE_mpn_add_n_sub_n + if (bsm1[n] == 0 && mpn_cmp (bsm1, b1, n) < 0) + { + cy = mpn_add_n_sub_n (bs1, bsm1, b1, bsm1, n); + bs1[n] = cy >> 1; + flags ^= toom6_vm1_neg; + } + else + { + cy = mpn_add_n_sub_n (bs1, bsm1, bsm1, b1, n); + bs1[n] = bsm1[n] + (cy >> 1); + bsm1[n]-= cy & 1; + } +#else + bs1[n] = bsm1[n] + mpn_add_n (bs1, bsm1, b1, n); + if (bsm1[n] == 0 && mpn_cmp (bsm1, b1, n) < 0) + { + mpn_sub_n (bsm1, b1, bsm1, n); + flags ^= toom6_vm1_neg; + } + else + { + bsm1[n] -= mpn_sub_n (bsm1, bsm1, b1, n); + } +#endif + + ASSERT (as1[n] <= 3); + ASSERT (bs1[n] <= 2); + ASSERT (asm1[n] <= 1); + ASSERT (bsm1[n] <= 1); + ASSERT (as2[n] <=14); + ASSERT (bs2[n] <= 6); + ASSERT (asm2[n] <= 9); + ASSERT (bsm2[n] <= 4); + + /* vm1, 2n+1 limbs */ + mpn_mul_n (vm1, asm1, bsm1, n+1); /* W4 */ + + /* vm2, 2n+1 limbs */ + mpn_mul_n (vm2, asm2, bsm2, n+1); /* W2 */ + + /* v2, 2n+1 limbs */ + mpn_mul_n (v2, as2, bs2, n+1); /* W1 */ + + /* v1, 2n+1 limbs */ + mpn_mul_n (v1, as1, bs1, n+1); /* W3 */ + + /* vinf, s+t limbs */ /* W0 */ + if (s > t) mpn_mul (vinf, a3, s, b2, t); + else mpn_mul (vinf, b2, t, a3, s); + + /* v0, 2n limbs */ + mpn_mul_n (v0, ap, bp, n); /* W5 */ + + mpn_toom_interpolate_6pts (pp, n, flags, vm1, vm2, v2, t + s); + +#undef v0 +#undef vm1 +#undef v1 +#undef vm2 +#undef v2 +#undef vinf +#undef bs1 +#undef bs2 +#undef bsm1 +#undef bsm2 +#undef asm1 +#undef asm2 +/* #undef as1 */ +/* #undef as2 */ +#undef a0a2 +#undef b0b2 +#undef a1a3 +#undef b1d +#undef a0 +#undef a1 +#undef a2 +#undef a3 +#undef b0 +#undef b1 +#undef b2 +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom44_mul.c gmp-5.0.2+dfsg/mpn/generic/toom44_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom44_mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom44_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -25,18 +25,10 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - Things to work on: - - 1. Trim allocation. The allocations for as1, asm1, bs1, and bsm1 could be - avoided by instead reusing the pp area and the scratch area. - 2. Use new toom functions for the recursive calls. -*/ - #include "gmp.h" #include "gmp-impl.h" -/* Evaluate in: -1, -1/2, 0, +1/2, +1, +2, +inf +/* Evaluate in: 0, +1, -1, +2, -2, 1/2, +inf <-s--><--n--><--n--><--n--> ____ ______ ______ ______ @@ -48,8 +40,8 @@ v1 = ( a0+ a1+ a2+ a3)*( b0+ b1+ b2+ b3) # A(1)*B(1) ah <= 3 bh <= 3 vm1 = ( a0- a1+ a2- a3)*( b0- b1+ b2- b3) # A(-1)*B(-1) |ah| <= 1 |bh| <= 1 v2 = ( a0+2a1+4a2+8a3)*( b0+2b1+4b2+8b3) # A(2)*B(2) ah <= 14 bh <= 14 + vm2 = ( a0-2a1+4a2-8a3)*( b0-2b1+4b2-8b3) # A(2)*B(2) ah <= 9 |bh| <= 9 vh = (8a0+4a1+2a2+ a3)*(8b0+4b1+2b2+ b3) # A(1/2)*B(1/2) ah <= 14 bh <= 14 - vmh = (8a0-4a1+2a2- a3)*(8b0-4b1+2b2- b3) # A(-1/2)*B(-1/2) -4<=ah<=9 -4<=bh<=9 vinf= a3 * b2 # A(inf)*B(inf) */ @@ -59,7 +51,7 @@ #define MAYBE_mul_toom44 1 #else #define MAYBE_mul_basecase \ - (MUL_TOOM44_THRESHOLD < 4 * MUL_KARATSUBA_THRESHOLD) + (MUL_TOOM44_THRESHOLD < 4 * MUL_TOOM22_THRESHOLD) #define MAYBE_mul_toom22 \ (MUL_TOOM44_THRESHOLD < 4 * MUL_TOOM33_THRESHOLD) #define MAYBE_mul_toom44 \ @@ -69,18 +61,41 @@ #define TOOM44_MUL_N_REC(p, a, b, n, ws) \ do { \ if (MAYBE_mul_basecase \ - && BELOW_THRESHOLD (n, MUL_KARATSUBA_THRESHOLD)) \ + && BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) \ mpn_mul_basecase (p, a, n, b, n); \ else if (MAYBE_mul_toom22 \ && BELOW_THRESHOLD (n, MUL_TOOM33_THRESHOLD)) \ - mpn_kara_mul_n (p, a, b, n, ws); \ + mpn_toom22_mul (p, a, n, b, n, ws); \ else if (! MAYBE_mul_toom44 \ || BELOW_THRESHOLD (n, MUL_TOOM44_THRESHOLD)) \ - mpn_toom3_mul_n (p, a, b, n, ws); \ + mpn_toom33_mul (p, a, n, b, n, ws); \ else \ mpn_toom44_mul (p, a, n, b, n, ws); \ } while (0) +/* Use of scratch space. In the product area, we store + + ___________________ + |vinf|____|_v1_|_v0_| + s+t 2n-1 2n+1 2n + + The other recursive products, vm1, v2, vm2, vh are stored in the + scratch area. When computing them, we use the product area for + intermediate values. + + Next, we compute v1. We can store the intermediate factors at v0 + and at vh + 2n + 2. + + Finally, for v0 and vinf, factors are parts of the input operands, + and we need scratch space only for the recursive multiplication. + + In all, if S(an) is the scratch need, the needed space is bounded by + + S(an) <= 4 (2*ceil(an/4) + 1) + 1 + S(ceil(an/4) + 1) + + which should give S(n) = 8 n/3 + c log(n) for some constant c. +*/ + void mpn_toom44_mul (mp_ptr pp, mp_srcptr ap, mp_size_t an, @@ -89,11 +104,7 @@ { mp_size_t n, s, t; mp_limb_t cy; - mp_ptr gp, hp; - mp_ptr as1, asm1, as2, ash, asmh; - mp_ptr bs1, bsm1, bs2, bsh, bsmh; - enum toom4_flags flags; - TMP_DECL; + enum toom7_flags flags; #define a0 ap #define a1 (ap + n) @@ -104,227 +115,111 @@ #define b2 (bp + 2*n) #define b3 (bp + 3*n) + ASSERT (an >= bn); + n = (an + 3) >> 2; s = an - 3 * n; t = bn - 3 * n; - ASSERT (an >= bn); - ASSERT (0 < s && s <= n); ASSERT (0 < t && t <= n); + ASSERT (s >= t); - TMP_MARK; + /* NOTE: The multiplications to v2, vm2, vh and vm1 overwrites the + * following limb, so these must be computed in order, and we need a + * one limb gap to tp. */ +#define v0 pp /* 2n */ +#define v1 (pp + 2 * n) /* 2n+1 */ +#define vinf (pp + 6 * n) /* s+t */ +#define v2 scratch /* 2n+1 */ +#define vm2 (scratch + 2 * n + 1) /* 2n+1 */ +#define vh (scratch + 4 * n + 2) /* 2n+1 */ +#define vm1 (scratch + 6 * n + 3) /* 2n+1 */ +#define tp (scratch + 8*n + 5) + + /* apx and bpx must not overlap with v1 */ +#define apx pp /* n+1 */ +#define amx (pp + n + 1) /* n+1 */ +#define bmx (pp + 2*n + 2) /* n+1 */ +#define bpx (pp + 4*n + 2) /* n+1 */ + + /* Total scratch need: 8*n + 5 + scratch for recursive calls. This + gives roughly 32 n/3 + log term. */ + + /* Compute apx = a0 + 2 a1 + 4 a2 + 8 a3 and amx = a0 - 2 a1 + 4 a2 - 8 a3. */ + flags = toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (apx, amx, ap, n, s, tp); - as1 = TMP_ALLOC_LIMBS (10 * n + 10); - asm1 = as1 + n + 1; - as2 = asm1 + n + 1; - ash = as2 + n + 1; - asmh = ash + n + 1; - bs1 = asmh + n + 1; - bsm1 = bs1 + n + 1; - bs2 = bsm1 + n + 1; - bsh = bs2 + n + 1; - bsmh = bsh + n + 1; - - gp = pp; - hp = pp + n + 1; - - flags = 0; - - /* Compute as1 and asm1. */ - gp[n] = mpn_add_n (gp, a0, a2, n); - hp[n] = mpn_add (hp, a1, n, a3, s); -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_addsub_n (as1, asm1, hp, gp, n + 1); - flags ^= toom4_w3_neg; - } - else - { - mpn_addsub_n (as1, asm1, gp, hp, n + 1); - } -#else - mpn_add_n (as1, gp, hp, n + 1); - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_sub_n (asm1, hp, gp, n + 1); - flags ^= toom4_w3_neg; - } - else - { - mpn_sub_n (asm1, gp, hp, n + 1); - } -#endif + /* Compute bpx = b0 + 2 b1 + 4 b2 + 8 b3 and bmx = b0 - 2 b1 + 4 b2 - 8 b3. */ + flags ^= toom7_w1_neg & mpn_toom_eval_dgr3_pm2 (bpx, bmx, bp, n, t, tp); - /* Compute as2. */ -#if HAVE_NATIVE_mpn_addlsh1_n - cy = mpn_addlsh1_n (as2, a2, a3, s); - if (s != n) - cy = mpn_add_1 (as2 + s, a2 + s, n - s, cy); - cy = 2 * cy + mpn_addlsh1_n (as2, a1, as2, n); - cy = 2 * cy + mpn_addlsh1_n (as2, a0, as2, n); -#else - cy = mpn_lshift (as2, a3, s, 1); - cy += mpn_add_n (as2, a2, as2, s); - if (s != n) - cy = mpn_add_1 (as2 + s, a2 + s, n - s, cy); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a1, as2, n); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a0, as2, n); -#endif - as2[n] = cy; + TOOM44_MUL_N_REC (v2, apx, bpx, n + 1, tp); /* v2, 2n+1 limbs */ + TOOM44_MUL_N_REC (vm2, amx, bmx, n + 1, tp); /* vm2, 2n+1 limbs */ - /* Compute ash and asmh. */ - cy = mpn_lshift (gp, a0, n, 3); /* 8a0 */ + /* Compute apx = 8 a0 + 4 a1 + 2 a2 + a3 = (((2*a0 + a1) * 2 + a2) * 2 + a3 */ #if HAVE_NATIVE_mpn_addlsh1_n - gp[n] = cy + mpn_addlsh1_n (gp, gp, a2, n); /* 8a0 + 2a2 */ -#else - cy += mpn_lshift (hp, a2, n, 1); /* 2a2 */ - gp[n] = cy + mpn_add_n (gp, gp, hp, n); /* 8a0 + 2a2 */ -#endif - cy = mpn_lshift (hp, a1, n, 2); /* 4a1 */ - hp[n] = cy + mpn_add (hp, hp, n, a3, s); /* 4a1 + a3 */ -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) + cy = mpn_addlsh1_n (apx, a1, a0, n); + cy = 2*cy + mpn_addlsh1_n (apx, a2, apx, n); + if (s < n) { - mpn_addsub_n (ash, asmh, hp, gp, n + 1); - flags ^= toom4_w1_neg; + mp_limb_t cy2; + cy2 = mpn_addlsh1_n (apx, a3, apx, s); + apx[n] = 2*cy + mpn_lshift (apx + s, apx + s, n - s, 1); + MPN_INCR_U (apx + s, n+1-s, cy2); } else - { - mpn_addsub_n (ash, asmh, gp, hp, n + 1); - } + apx[n] = 2*cy + mpn_addlsh1_n (apx, a3, apx, n); #else - mpn_add_n (ash, gp, hp, n + 1); - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_sub_n (asmh, hp, gp, n + 1); - flags ^= toom4_w1_neg; - } - else - { - mpn_sub_n (asmh, gp, hp, n + 1); - } + cy = mpn_lshift (apx, a0, n, 1); + cy += mpn_add_n (apx, apx, a1, n); + cy = 2*cy + mpn_lshift (apx, apx, n, 1); + cy += mpn_add_n (apx, apx, a2, n); + cy = 2*cy + mpn_lshift (apx, apx, n, 1); + apx[n] = cy + mpn_add (apx, apx, n, a3, s); #endif - /* Compute bs1 and bsm1. */ - gp[n] = mpn_add_n (gp, b0, b2, n); - hp[n] = mpn_add (hp, b1, n, b3, t); -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_addsub_n (bs1, bsm1, hp, gp, n + 1); - flags ^= toom4_w3_neg; - } - else - { - mpn_addsub_n (bs1, bsm1, gp, hp, n + 1); - } -#else - mpn_add_n (bs1, gp, hp, n + 1); - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_sub_n (bsm1, hp, gp, n + 1); - flags ^= toom4_w3_neg; - } - else - { - mpn_sub_n (bsm1, gp, hp, n + 1); - } -#endif - - /* Compute bs2. */ + /* Compute bpx = 8 b0 + 4 b1 + 2 b2 + b3 = (((2*b0 + b1) * 2 + b2) * 2 + b3 */ #if HAVE_NATIVE_mpn_addlsh1_n - cy = mpn_addlsh1_n (bs2, b2, b3, t); - if (t != n) - cy = mpn_add_1 (bs2 + t, b2 + t, n - t, cy); - cy = 2 * cy + mpn_addlsh1_n (bs2, b1, bs2, n); - cy = 2 * cy + mpn_addlsh1_n (bs2, b0, bs2, n); -#else - cy = mpn_lshift (bs2, b3, t, 1); - cy += mpn_add_n (bs2, b2, bs2, t); - if (t != n) - cy = mpn_add_1 (bs2 + t, b2 + t, n - t, cy); - cy = 2 * cy + mpn_lshift (bs2, bs2, n, 1); - cy += mpn_add_n (bs2, b1, bs2, n); - cy = 2 * cy + mpn_lshift (bs2, bs2, n, 1); - cy += mpn_add_n (bs2, b0, bs2, n); -#endif - bs2[n] = cy; - - /* Compute bsh and bsmh. */ - cy = mpn_lshift (gp, b0, n, 3); /* 8b0 */ -#if HAVE_NATIVE_mpn_addlsh1_n - gp[n] = cy + mpn_addlsh1_n (gp, gp, b2, n); /* 8b0 + 2b2 */ -#else - cy += mpn_lshift (hp, b2, n, 1); /* 2b2 */ - gp[n] = cy + mpn_add_n (gp, gp, hp, n); /* 8b0 + 2b2 */ -#endif - cy = mpn_lshift (hp, b1, n, 2); /* 4b1 */ - hp[n] = cy + mpn_add (hp, hp, n, b3, t); /* 4b1 + b3 */ -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) + cy = mpn_addlsh1_n (bpx, b1, b0, n); + cy = 2*cy + mpn_addlsh1_n (bpx, b2, bpx, n); + if (t < n) { - mpn_addsub_n (bsh, bsmh, hp, gp, n + 1); - flags ^= toom4_w1_neg; + mp_limb_t cy2; + cy2 = mpn_addlsh1_n (bpx, b3, bpx, t); + bpx[n] = 2*cy + mpn_lshift (bpx + t, bpx + t, n - t, 1); + MPN_INCR_U (bpx + t, n+1-t, cy2); } else - { - mpn_addsub_n (bsh, bsmh, gp, hp, n + 1); - } + bpx[n] = 2*cy + mpn_addlsh1_n (bpx, b3, bpx, n); #else - mpn_add_n (bsh, gp, hp, n + 1); - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_sub_n (bsmh, hp, gp, n + 1); - flags ^= toom4_w1_neg; - } - else - { - mpn_sub_n (bsmh, gp, hp, n + 1); - } + cy = mpn_lshift (bpx, b0, n, 1); + cy += mpn_add_n (bpx, bpx, b1, n); + cy = 2*cy + mpn_lshift (bpx, bpx, n, 1); + cy += mpn_add_n (bpx, bpx, b2, n); + cy = 2*cy + mpn_lshift (bpx, bpx, n, 1); + bpx[n] = cy + mpn_add (bpx, bpx, n, b3, t); #endif - ASSERT (as1[n] <= 3); - ASSERT (bs1[n] <= 3); - ASSERT (asm1[n] <= 1); - ASSERT (bsm1[n] <= 1); - ASSERT (as2[n] <= 14); - ASSERT (bs2[n] <= 14); - ASSERT (ash[n] <= 14); - ASSERT (bsh[n] <= 14); - ASSERT (asmh[n] <= 9); - ASSERT (bsmh[n] <= 9); - -#define v0 pp /* 2n */ -#define v1 (scratch + 6 * n + 6) /* 2n+1 */ -#define vm1 scratch /* 2n+1 */ -#define v2 (scratch + 2 * n + 2) /* 2n+1 */ -#define vinf (pp + 6 * n) /* s+t */ -#define vh (pp + 2 * n) /* 2n+1 */ -#define vmh (scratch + 4 * n + 4) -#define scratch_out (scratch + 8 * n + 8) + ASSERT (apx[n] < 15); + ASSERT (bpx[n] < 15); - /* vm1, 2n+1 limbs */ - TOOM44_MUL_N_REC (vm1, asm1, bsm1, n + 1, scratch_out); /* vm1, 2n+1 limbs */ + TOOM44_MUL_N_REC (vh, apx, bpx, n + 1, tp); /* vh, 2n+1 limbs */ - TOOM44_MUL_N_REC (v2 , as2 , bs2 , n + 1, scratch_out); /* v2, 2n+1 limbs */ + /* Compute apx = a0 + a1 + a2 + a3 and amx = a0 - a1 + a2 - a3. */ + flags |= toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (apx, amx, ap, n, s, tp); - if (s > t) mpn_mul (vinf, a3, s, b3, t); - else TOOM44_MUL_N_REC (vinf, a3, b3, s, scratch_out); /* vinf, s+t limbs */ + /* Compute bpx = b0 + b1 + b2 + b3 bnd bmx = b0 - b1 + b2 - b3. */ + flags ^= toom7_w3_neg & mpn_toom_eval_dgr3_pm1 (bpx, bmx, bp, n, t, tp); - TOOM44_MUL_N_REC (v1 , as1 , bs1 , n + 1, scratch_out); /* v1, 2n+1 limbs */ + TOOM44_MUL_N_REC (vm1, amx, bmx, n + 1, tp); /* vm1, 2n+1 limbs */ + /* Clobbers amx, bmx. */ + TOOM44_MUL_N_REC (v1, apx, bpx, n + 1, tp); /* v1, 2n+1 limbs */ - TOOM44_MUL_N_REC (vh , ash , bsh , n + 1, scratch_out); - - TOOM44_MUL_N_REC (vmh, asmh, bsmh, n + 1, scratch_out); - - TOOM44_MUL_N_REC (v0 , ap , bp , n , scratch_out); /* v0, 2n limbs */ - - mpn_toom_interpolate_7pts (pp, n, flags, vmh, vm1, v1, v2, s + t, scratch_out); + TOOM44_MUL_N_REC (v0, a0, b0, n, tp); + if (s > t) + mpn_mul (vinf, a3, s, b3, t); + else + TOOM44_MUL_N_REC (vinf, a3, b3, s, tp); /* vinf, s+t limbs */ - TMP_FREE; + mpn_toom_interpolate_7pts (pp, n, flags, vm2, vm1, v2, vh, s + t, tp); } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom4_sqr.c gmp-5.0.2+dfsg/mpn/generic/toom4_sqr.c --- gmp-4.3.2+dfsg/mpn/generic/toom4_sqr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom4_sqr.c 2011-05-08 09:49:29.000000000 +0000 @@ -6,7 +6,7 @@ SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2006, 2007, 2008 Free Software Foundation, Inc. +Copyright 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -24,14 +24,6 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - Things to work on: - - 1. Trim allocation. The allocations for as1, asm1, bs1, and bsm1 could be - avoided by instead reusing the pp area and the scratch area. - 2. Use new toom functions for the recursive calls. -*/ - #include "gmp.h" #include "gmp-impl.h" @@ -40,16 +32,14 @@ <-s--><--n--><--n--><--n--> ____ ______ ______ ______ |_a3_|___a2_|___a1_|___a0_| - |b3_|___b2_|___b1_|___b0_| - <-t-><--n--><--n--><--n--> - v0 = a0 * b0 # A(0)*B(0) - v1 = ( a0+ a1+ a2+ a3)*( b0+ b1+ b2+ b3) # A(1)*B(1) ah <= 3 bh <= 3 - vm1 = ( a0- a1+ a2- a3)*( b0- b1+ b2- b3) # A(-1)*B(-1) |ah| <= 1 |bh| <= 1 - v2 = ( a0+2a1+4a2+8a3)*( b0+2b1+4b2+8b3) # A(2)*B(2) ah <= 14 bh <= 14 - vh = (8a0+4a1+2a2+ a3)*(8b0+4b1+2b2+ b3) # A(1/2)*B(1/2) ah <= 14 bh <= 14 - vmh = (8a0-4a1+2a2- a3)*(8b0-4b1+2b2- b3) # A(-1/2)*B(-1/2) -4<=ah<=9 -4<=bh<=9 - vinf= a3 * b2 # A(inf)*B(inf) + v0 = a0 ^2 # A(0)^2 + v1 = ( a0+ a1+ a2+ a3)^2 # A(1)^2 ah <= 3 + vm1 = ( a0- a1+ a2- a3)^2 # A(-1)^2 |ah| <= 1 + v2 = ( a0+2a1+4a2+8a3)^2 # A(2)^2 ah <= 14 + vh = (8a0+4a1+2a2+ a3)^2 # A(1/2)^2 ah <= 14 + vmh = (8a0-4a1+2a2- a3)^2 # A(-1/2)^2 -4<=ah<=9 + vinf= a3 ^2 # A(inf)^2 */ #if TUNE_PROGRAM_BUILD @@ -58,24 +48,24 @@ #define MAYBE_sqr_toom4 1 #else #define MAYBE_sqr_basecase \ - (SQR_TOOM4_THRESHOLD < 4 * SQR_KARATSUBA_THRESHOLD) + (SQR_TOOM4_THRESHOLD < 4 * SQR_TOOM2_THRESHOLD) #define MAYBE_sqr_toom2 \ (SQR_TOOM4_THRESHOLD < 4 * SQR_TOOM3_THRESHOLD) #define MAYBE_sqr_toom4 \ (SQR_FFT_THRESHOLD >= 4 * SQR_TOOM4_THRESHOLD) #endif -#define TOOM4_SQR_N_REC(p, a, n, ws) \ +#define TOOM4_SQR_REC(p, a, n, ws) \ do { \ if (MAYBE_sqr_basecase \ - && BELOW_THRESHOLD (n, SQR_KARATSUBA_THRESHOLD)) \ + && BELOW_THRESHOLD (n, SQR_TOOM2_THRESHOLD)) \ mpn_sqr_basecase (p, a, n); \ else if (MAYBE_sqr_toom2 \ && BELOW_THRESHOLD (n, SQR_TOOM3_THRESHOLD)) \ - mpn_kara_sqr_n (p, a, n, ws); \ + mpn_toom2_sqr (p, a, n, ws); \ else if (! MAYBE_sqr_toom4 \ || BELOW_THRESHOLD (n, SQR_TOOM4_THRESHOLD)) \ - mpn_toom3_sqr_n (p, a, n, ws); \ + mpn_toom3_sqr (p, a, n, ws); \ else \ mpn_toom4_sqr (p, a, n, ws); \ } while (0) @@ -87,9 +77,6 @@ { mp_size_t n, s; mp_limb_t cy; - mp_ptr gp, hp; - mp_ptr as1, asm1, as2, ash, asmh; - TMP_DECL; #define a0 ap #define a1 (ap + n) @@ -102,122 +89,65 @@ ASSERT (0 < s && s <= n); - TMP_MARK; + /* NOTE: The multiplications to v2, vm2, vh and vm1 overwrites the + * following limb, so these must be computed in order, and we need a + * one limb gap to tp. */ +#define v0 pp /* 2n */ +#define v1 (pp + 2 * n) /* 2n+1 */ +#define vinf (pp + 6 * n) /* s+t */ +#define v2 scratch /* 2n+1 */ +#define vm2 (scratch + 2 * n + 1) /* 2n+1 */ +#define vh (scratch + 4 * n + 2) /* 2n+1 */ +#define vm1 (scratch + 6 * n + 3) /* 2n+1 */ +#define tp (scratch + 8*n + 5) + + /* No overlap with v1 */ +#define apx pp /* n+1 */ +#define amx (pp + 4*n + 2) /* n+1 */ + + /* Total scratch need: 8*n + 5 + scratch for recursive calls. This + gives roughly 32 n/3 + log term. */ - as1 = TMP_SALLOC_LIMBS (n + 1); - asm1 = TMP_SALLOC_LIMBS (n + 1); - as2 = TMP_SALLOC_LIMBS (n + 1); - ash = TMP_SALLOC_LIMBS (n + 1); - asmh = TMP_SALLOC_LIMBS (n + 1); - - gp = pp; - hp = pp + n + 1; - - /* Compute as1 and asm1. */ - gp[n] = mpn_add_n (gp, a0, a2, n); - hp[n] = mpn_add (hp, a1, n, a3, s); -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_addsub_n (as1, asm1, hp, gp, n + 1); - } - else - { - mpn_addsub_n (as1, asm1, gp, hp, n + 1); - } -#else - mpn_add_n (as1, gp, hp, n + 1); - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_sub_n (asm1, hp, gp, n + 1); - } - else - { - mpn_sub_n (asm1, gp, hp, n + 1); - } -#endif + /* Compute apx = a0 + 2 a1 + 4 a2 + 8 a3 and amx = a0 - 2 a1 + 4 a2 - 8 a3. */ + mpn_toom_eval_dgr3_pm2 (apx, amx, ap, n, s, tp); - /* Compute as2. */ -#if HAVE_NATIVE_mpn_addlsh1_n - cy = mpn_addlsh1_n (as2, a2, a3, s); - if (s != n) - cy = mpn_add_1 (as2 + s, a2 + s, n - s, cy); - cy = 2 * cy + mpn_addlsh1_n (as2, a1, as2, n); - cy = 2 * cy + mpn_addlsh1_n (as2, a0, as2, n); -#else - cy = mpn_lshift (as2, a3, s, 1); - cy += mpn_add_n (as2, a2, as2, s); - if (s != n) - cy = mpn_add_1 (as2 + s, a2 + s, n - s, cy); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a1, as2, n); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a0, as2, n); -#endif - as2[n] = cy; + TOOM4_SQR_REC (v2, apx, n + 1, tp); /* v2, 2n+1 limbs */ + TOOM4_SQR_REC (vm2, amx, n + 1, tp); /* vm2, 2n+1 limbs */ - /* Compute ash and asmh. */ - cy = mpn_lshift (gp, a0, n, 3); /* 8a0 */ + /* Compute apx = 8 a0 + 4 a1 + 2 a2 + a3 = (((2*a0 + a1) * 2 + a2) * 2 + a3 */ #if HAVE_NATIVE_mpn_addlsh1_n - gp[n] = cy + mpn_addlsh1_n (gp, gp, a2, n); /* 8a0 + 2a2 */ -#else - cy += mpn_lshift (hp, a2, n, 1); /* 2a2 */ - gp[n] = cy + mpn_add_n (gp, gp, hp, n); /* 8a0 + 2a2 */ -#endif - cy = mpn_lshift (hp, a1, n, 2); /* 4a1 */ - hp[n] = cy + mpn_add (hp, hp, n, a3, s); /* 4a1 + a3 */ -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_addsub_n (ash, asmh, hp, gp, n + 1); + cy = mpn_addlsh1_n (apx, a1, a0, n); + cy = 2*cy + mpn_addlsh1_n (apx, a2, apx, n); + if (s < n) + { + mp_limb_t cy2; + cy2 = mpn_addlsh1_n (apx, a3, apx, s); + apx[n] = 2*cy + mpn_lshift (apx + s, apx + s, n - s, 1); + MPN_INCR_U (apx + s, n+1-s, cy2); } else - { - mpn_addsub_n (ash, asmh, gp, hp, n + 1); - } + apx[n] = 2*cy + mpn_addlsh1_n (apx, a3, apx, n); #else - mpn_add_n (ash, gp, hp, n + 1); - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_sub_n (asmh, hp, gp, n + 1); - } - else - { - mpn_sub_n (asmh, gp, hp, n + 1); - } + cy = mpn_lshift (apx, a0, n, 1); + cy += mpn_add_n (apx, apx, a1, n); + cy = 2*cy + mpn_lshift (apx, apx, n, 1); + cy += mpn_add_n (apx, apx, a2, n); + cy = 2*cy + mpn_lshift (apx, apx, n, 1); + apx[n] = cy + mpn_add (apx, apx, n, a3, s); #endif - ASSERT (as1[n] <= 3); - ASSERT (asm1[n] <= 1); - ASSERT (as2[n] <= 14); - ASSERT (ash[n] <= 14); - ASSERT (asmh[n] <= 9); - -#define v0 pp /* 2n */ -#define v1 (scratch + 6 * n + 6) /* 2n+1 */ -#define vm1 scratch /* 2n+1 */ -#define v2 (scratch + 2 * n + 2) /* 2n+1 */ -#define vinf (pp + 6 * n) /* s+t */ -#define vh (pp + 2 * n) /* 2n+1 */ -#define vmh (scratch + 4 * n + 4) -#define scratch_out (scratch + 8 * n + 8) - - /* vm1, 2n+1 limbs */ - TOOM4_SQR_N_REC (vm1, asm1, n + 1, scratch_out); /* vm1, 2n+1 limbs */ - - TOOM4_SQR_N_REC (v2 , as2 , n + 1, scratch_out); /* v2, 2n+1 limbs */ - - TOOM4_SQR_N_REC (vinf, a3 , s, scratch_out); /* vinf, 2s limbs */ - - TOOM4_SQR_N_REC (v1 , as1 , n + 1, scratch_out); /* v1, 2n+1 limbs */ + ASSERT (apx[n] < 15); - TOOM4_SQR_N_REC (vh , ash , n + 1, scratch_out); + TOOM4_SQR_REC (vh, apx, n + 1, tp); /* vh, 2n+1 limbs */ - TOOM4_SQR_N_REC (vmh, asmh, n + 1, scratch_out); + /* Compute apx = a0 + a1 + a2 + a3 and amx = a0 - a1 + a2 - a3. */ + mpn_toom_eval_dgr3_pm1 (apx, amx, ap, n, s, tp); - TOOM4_SQR_N_REC (v0 , ap , n , scratch_out); /* v0, 2n limbs */ + TOOM4_SQR_REC (v1, apx, n + 1, tp); /* v1, 2n+1 limbs */ + TOOM4_SQR_REC (vm1, amx, n + 1, tp); /* vm1, 2n+1 limbs */ - mpn_toom_interpolate_7pts (pp, n, 0, vmh, vm1, v1, v2, s + s, scratch_out); + TOOM4_SQR_REC (v0, a0, n, tp); + TOOM4_SQR_REC (vinf, a3, s, tp); /* vinf, 2s limbs */ - TMP_FREE; + mpn_toom_interpolate_7pts (pp, n, 0, vm2, vm1, v2, vh, 2*s, tp); } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom52_mul.c gmp-5.0.2+dfsg/mpn/generic/toom52_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom52_mul.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom52_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,246 @@ +/* mpn_toom52_mul -- Multiply {ap,an} and {bp,bn} where an is nominally 4/3 + times as large as bn. Or more accurately, bn < an < 2 bn. + + Contributed to the GNU project by Marco Bodrato. + + The idea of applying toom to unbalanced multiplication is due to Marco + Bodrato and Alberto Zanoni. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +/* Evaluate in: -2, -1, 0, +1, +2, +inf + + <-s-><--n--><--n--><--n--><--n--> + ___ ______ ______ ______ ______ + |a4_|___a3_|___a2_|___a1_|___a0_| + |b1|___b0_| + <--n--> + + v0 = a0 * b0 # A(0)*B(0) + v1 = (a0+ a1+ a2+ a3+ a4)*(b0+ b1) # A(1)*B(1) ah <= 4 bh <= 1 + vm1 = (a0- a1+ a2- a3+ a4)*(b0- b1) # A(-1)*B(-1) |ah| <= 2 bh = 0 + v2 = (a0+2a1+4a2+8a3+16a4)*(b0+2b1) # A(2)*B(2) ah <= 30 bh <= 2 + vm2 = (a0-2a1+4a2-8a3+16a4)*(b0-2b1) # A(-2)*B(-2) |ah| <= 20 |bh|<= 1 + vinf= a4 * b1 # A(inf)*B(inf) + + Some slight optimization in evaluation are taken from the paper: + "Towards Optimal Toom-Cook Multiplication for Univariate and + Multivariate Polynomials in Characteristic 2 and 0." +*/ + +void +mpn_toom52_mul (mp_ptr pp, + mp_srcptr ap, mp_size_t an, + mp_srcptr bp, mp_size_t bn, mp_ptr scratch) +{ + mp_size_t n, s, t; + enum toom6_flags flags; + +#define a0 ap +#define a1 (ap + n) +#define a2 (ap + 2 * n) +#define a3 (ap + 3 * n) +#define a4 (ap + 4 * n) +#define b0 bp +#define b1 (bp + n) + + n = 1 + (2 * an >= 5 * bn ? (an - 1) / (size_t) 5 : (bn - 1) >> 1); + + s = an - 4 * n; + t = bn - n; + + ASSERT (0 < s && s <= n); + ASSERT (0 < t && t <= n); + + /* Ensures that 5 values of n+1 limbs each fits in the product area. + Borderline cases are an = 32, bn = 8, n = 7, and an = 36, bn = 9, + n = 8. */ + ASSERT (s+t >= 5); + +#define v0 pp /* 2n */ +#define vm1 (scratch) /* 2n+1 */ +#define v1 (pp + 2 * n) /* 2n+1 */ +#define vm2 (scratch + 2 * n + 1) /* 2n+1 */ +#define v2 (scratch + 4 * n + 2) /* 2n+1 */ +#define vinf (pp + 5 * n) /* s+t */ +#define bs1 pp /* n+1 */ +#define bsm1 (scratch + 2 * n + 2) /* n */ +#define asm1 (scratch + 3 * n + 3) /* n+1 */ +#define asm2 (scratch + 4 * n + 4) /* n+1 */ +#define bsm2 (pp + n + 1) /* n+1 */ +#define bs2 (pp + 2 * n + 2) /* n+1 */ +#define as2 (pp + 3 * n + 3) /* n+1 */ +#define as1 (pp + 4 * n + 4) /* n+1 */ + + /* Scratch need is 6 * n + 3 + 1. We need one extra limb, because + products will overwrite 2n+2 limbs. */ + +#define a0a2 scratch +#define a1a3 asm1 + + /* Compute as2 and asm2. */ + flags = toom6_vm2_neg & mpn_toom_eval_pm2 (as2, asm2, 4, ap, n, s, a1a3); + + /* Compute bs1 and bsm1. */ + if (t == n) + { +#if HAVE_NATIVE_mpn_add_n_sub_n + mp_limb_t cy; + + if (mpn_cmp (b0, b1, n) < 0) + { + cy = mpn_add_n_sub_n (bs1, bsm1, b1, b0, n); + flags ^= toom6_vm1_neg; + } + else + { + cy = mpn_add_n_sub_n (bs1, bsm1, b0, b1, n); + } + bs1[n] = cy >> 1; +#else + bs1[n] = mpn_add_n (bs1, b0, b1, n); + if (mpn_cmp (b0, b1, n) < 0) + { + mpn_sub_n (bsm1, b1, b0, n); + flags ^= toom6_vm1_neg; + } + else + { + mpn_sub_n (bsm1, b0, b1, n); + } +#endif + } + else + { + bs1[n] = mpn_add (bs1, b0, n, b1, t); + if (mpn_zero_p (b0 + t, n - t) && mpn_cmp (b0, b1, t) < 0) + { + mpn_sub_n (bsm1, b1, b0, t); + MPN_ZERO (bsm1 + t, n - t); + flags ^= toom6_vm1_neg; + } + else + { + mpn_sub (bsm1, b0, n, b1, t); + } + } + + /* Compute bs2 and bsm2, recycling bs1 and bsm1. bs2=bs1+b1; bsm2=bsm1-b1 */ + mpn_add (bs2, bs1, n+1, b1, t); + if (flags & toom6_vm1_neg ) + { + bsm2[n] = mpn_add (bsm2, bsm1, n, b1, t); + flags ^= toom6_vm2_neg; + } + else + { + bsm2[n] = 0; + if (t == n) + { + if (mpn_cmp (bsm1, b1, n) < 0) + { + mpn_sub_n (bsm2, b1, bsm1, n); + flags ^= toom6_vm2_neg; + } + else + { + mpn_sub_n (bsm2, bsm1, b1, n); + } + } + else + { + if (mpn_zero_p (bsm1 + t, n - t) && mpn_cmp (bsm1, b1, t) < 0) + { + mpn_sub_n (bsm2, b1, bsm1, t); + MPN_ZERO (bsm2 + t, n - t); + flags ^= toom6_vm2_neg; + } + else + { + mpn_sub (bsm2, bsm1, n, b1, t); + } + } + } + + /* Compute as1 and asm1. */ + flags ^= toom6_vm1_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, a0a2); + + ASSERT (as1[n] <= 4); + ASSERT (bs1[n] <= 1); + ASSERT (asm1[n] <= 2); +/* ASSERT (bsm1[n] <= 1); */ + ASSERT (as2[n] <=30); + ASSERT (bs2[n] <= 2); + ASSERT (asm2[n] <= 20); + ASSERT (bsm2[n] <= 1); + + /* vm1, 2n+1 limbs */ + mpn_mul (vm1, asm1, n+1, bsm1, n); /* W4 */ + + /* vm2, 2n+1 limbs */ + mpn_mul_n (vm2, asm2, bsm2, n+1); /* W2 */ + + /* v2, 2n+1 limbs */ + mpn_mul_n (v2, as2, bs2, n+1); /* W1 */ + + /* v1, 2n+1 limbs */ + mpn_mul_n (v1, as1, bs1, n+1); /* W3 */ + + /* vinf, s+t limbs */ /* W0 */ + if (s > t) mpn_mul (vinf, a4, s, b1, t); + else mpn_mul (vinf, b1, t, a4, s); + + /* v0, 2n limbs */ + mpn_mul_n (v0, ap, bp, n); /* W5 */ + + mpn_toom_interpolate_6pts (pp, n, flags, vm1, vm2, v2, t + s); + +#undef v0 +#undef vm1 +#undef v1 +#undef vm2 +#undef v2 +#undef vinf +#undef bs1 +#undef bs2 +#undef bsm1 +#undef bsm2 +#undef asm1 +#undef asm2 +#undef as1 +#undef as2 +#undef a0a2 +#undef b0b2 +#undef a1a3 +#undef a0 +#undef a1 +#undef a2 +#undef a3 +#undef b0 +#undef b1 +#undef b2 + +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom53_mul.c gmp-5.0.2+dfsg/mpn/generic/toom53_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom53_mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom53_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -28,17 +28,10 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - Things to work on: - - 1. Trim allocation. The allocations for as1, asm1, bs1, and bsm1 could be - avoided by instead reusing the pp area and the scratch allocation. -*/ - #include "gmp.h" #include "gmp-impl.h" -/* Evaluate in: -1, -1/2, 0, +1/2, +1, +2, +inf +/* Evaluate in: 0, +1, -1, +2, -2, 1/2, +inf <-s-><--n--><--n--><--n--><--n--> ___ ______ ______ ______ ______ @@ -50,8 +43,8 @@ v1 = ( a0+ a1+ a2+ a3+ a4)*( b0+ b1+ b2) # A(1)*B(1) ah <= 4 bh <= 2 vm1 = ( a0- a1+ a2- a3+ a4)*( b0- b1+ b2) # A(-1)*B(-1) |ah| <= 2 bh <= 1 v2 = ( a0+2a1+4a2+8a3+16a4)*( b0+2b1+4b2) # A(2)*B(2) ah <= 30 bh <= 6 + vm2 = ( a0-2a1+4a2-8a3+16a4)*( b0-2b1+4b2) # A(2)*B(2) -9<=ah<=20 -1<=bh<=4 vh = (16a0+8a1+4a2+2a3+ a4)*(4b0+2b1+ b2) # A(1/2)*B(1/2) ah <= 30 bh <= 6 - vmh = (16a0-8a1+4a2-2a3+ a4)*(4b0-2b1+ b2) # A(-1/2)*B(-1/2) -9<=ah<=20 -1<=bh<=4 vinf= a4 * b2 # A(inf)*B(inf) */ @@ -62,12 +55,11 @@ mp_ptr scratch) { mp_size_t n, s, t; - int vm1_neg, vmh_neg; mp_limb_t cy; - mp_ptr gp, hp; - mp_ptr as1, asm1, as2, ash, asmh; - mp_ptr bs1, bsm1, bs2, bsh, bsmh; - enum toom4_flags flags; + mp_ptr gp; + mp_ptr as1, asm1, as2, asm2, ash; + mp_ptr bs1, bsm1, bs2, bsm2, bsh; + enum toom7_flags flags; TMP_DECL; #define a0 ap @@ -92,124 +84,61 @@ as1 = TMP_SALLOC_LIMBS (n + 1); asm1 = TMP_SALLOC_LIMBS (n + 1); as2 = TMP_SALLOC_LIMBS (n + 1); + asm2 = TMP_SALLOC_LIMBS (n + 1); ash = TMP_SALLOC_LIMBS (n + 1); - asmh = TMP_SALLOC_LIMBS (n + 1); bs1 = TMP_SALLOC_LIMBS (n + 1); bsm1 = TMP_SALLOC_LIMBS (n + 1); bs2 = TMP_SALLOC_LIMBS (n + 1); + bsm2 = TMP_SALLOC_LIMBS (n + 1); bsh = TMP_SALLOC_LIMBS (n + 1); - bsmh = TMP_SALLOC_LIMBS (n + 1); gp = pp; - hp = pp + n + 1; /* Compute as1 and asm1. */ - gp[n] = mpn_add_n (gp, a0, a2, n); - gp[n] += mpn_add (gp, gp, n, a4, s); - hp[n] = mpn_add_n (hp, a1, a3, n); -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_addsub_n (as1, asm1, hp, gp, n + 1); - vm1_neg = 1; - } - else - { - mpn_addsub_n (as1, asm1, gp, hp, n + 1); - vm1_neg = 0; - } -#else - mpn_add_n (as1, gp, hp, n + 1); - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_sub_n (asm1, hp, gp, n + 1); - vm1_neg = 1; - } - else - { - mpn_sub_n (asm1, gp, hp, n + 1); - vm1_neg = 0; - } -#endif + flags = toom7_w3_neg & mpn_toom_eval_pm1 (as1, asm1, 4, ap, n, s, gp); - /* Compute as2. */ -#if !HAVE_NATIVE_mpn_addlsh_n - ash[n] = mpn_lshift (ash, a2, n, 2); /* 4a2 */ -#endif -#if HAVE_NATIVE_mpn_addlsh1_n - cy = mpn_addlsh1_n (as2, a3, a4, s); - if (s != n) - cy = mpn_add_1 (as2 + s, a3 + s, n - s, cy); - cy = 2 * cy + mpn_addlsh1_n (as2, a2, as2, n); - cy = 2 * cy + mpn_addlsh1_n (as2, a1, as2, n); - as2[n] = 2 * cy + mpn_addlsh1_n (as2, a0, as2, n); -#else - cy = mpn_lshift (as2, a4, s, 1); - cy += mpn_add_n (as2, a3, as2, s); - if (s != n) - cy = mpn_add_1 (as2 + s, a3 + s, n - s, cy); - cy = 4 * cy + mpn_lshift (as2, as2, n, 2); - cy += mpn_add_n (as2, a1, as2, n); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - as2[n] = cy + mpn_add_n (as2, a0, as2, n); - mpn_add_n (as2, ash, as2, n + 1); -#endif + /* Compute as2 and asm2. */ + flags |= toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 4, ap, n, s, gp); - /* Compute ash and asmh. */ -#if HAVE_NATIVE_mpn_addlsh_n - cy = mpn_addlsh_n (gp, a2, a0, n, 2); /* 4a0 + a2 */ - cy = 4 * cy + mpn_addlsh_n (gp, a4, gp, n, 2); /* 16a0 + 4a2 + a4 */ /* FIXME s */ - gp[n] = cy; - cy = mpn_addlsh_n (hp, a3, a1, n, 2); /* 4a1 + a3 */ - cy = 2 * cy + mpn_lshift (hp, hp, n, 1); /* 8a1 + 2a3 */ - hp[n] = cy; -#else - gp[n] = mpn_lshift (gp, a0, n, 4); /* 16a0 */ - mpn_add (gp, gp, n + 1, a4, s); /* 16a0 + a4 */ - mpn_add_n (gp, ash, gp, n+1); /* 16a0 + 4a2 + a4 */ - cy = mpn_lshift (hp, a1, n, 3); /* 8a1 */ - cy += mpn_lshift (ash, a3, n, 1); /* 2a3 */ - cy += mpn_add_n (hp, ash, hp, n); /* 8a1 + 2a3 */ - hp[n] = cy; -#endif -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_addsub_n (ash, asmh, hp, gp, n + 1); - vmh_neg = 1; + /* Compute ash = 16 a0 + 8 a1 + 4 a2 + 2 a3 + a4 + = 2*(2*(2*(2*a0 + a1) + a2) + a3) + a4 */ +#if HAVE_NATIVE_mpn_addlsh1_n + cy = mpn_addlsh1_n (ash, a1, a0, n); + cy = 2*cy + mpn_addlsh1_n (ash, a2, ash, n); + cy = 2*cy + mpn_addlsh1_n (ash, a3, ash, n); + if (s < n) + { + mp_limb_t cy2; + cy2 = mpn_addlsh1_n (ash, a4, ash, s); + ash[n] = 2*cy + mpn_lshift (ash + s, ash + s, n - s, 1); + MPN_INCR_U (ash + s, n+1-s, cy2); } else - { - mpn_addsub_n (ash, asmh, gp, hp, n + 1); - vmh_neg = 0; - } + ash[n] = 2*cy + mpn_addlsh1_n (ash, a4, ash, n); #else - mpn_add_n (ash, gp, hp, n + 1); - if (mpn_cmp (gp, hp, n + 1) < 0) - { - mpn_sub_n (asmh, hp, gp, n + 1); - vmh_neg = 1; - } - else - { - mpn_sub_n (asmh, gp, hp, n + 1); - vmh_neg = 0; - } + cy = mpn_lshift (ash, a0, n, 1); + cy += mpn_add_n (ash, ash, a1, n); + cy = 2*cy + mpn_lshift (ash, ash, n, 1); + cy += mpn_add_n (ash, ash, a2, n); + cy = 2*cy + mpn_lshift (ash, ash, n, 1); + cy += mpn_add_n (ash, ash, a3, n); + cy = 2*cy + mpn_lshift (ash, ash, n, 1); + ash[n] = cy + mpn_add (ash, ash, n, a4, s); #endif /* Compute bs1 and bsm1. */ bs1[n] = mpn_add (bs1, b0, n, b2, t); /* b0 + b2 */ -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n if (bs1[n] == 0 && mpn_cmp (bs1, b1, n) < 0) { - bs1[n] = mpn_addsub_n (bs1, bsm1, b1, bs1, n) >> 1; + bs1[n] = mpn_add_n_sub_n (bs1, bsm1, b1, bs1, n) >> 1; bsm1[n] = 0; - vm1_neg ^= 1; + flags ^= toom7_w3_neg; } else { - cy = mpn_addsub_n (bs1, bsm1, bs1, b1, n); + cy = mpn_add_n_sub_n (bs1, bsm1, bs1, b1, n); bsm1[n] = bs1[n] - (cy & 1); bs1[n] += (cy >> 1); } @@ -218,7 +147,7 @@ { mpn_sub_n (bsm1, b1, bs1, n); bsm1[n] = 0; - vm1_neg ^= 1; + flags ^= toom7_w3_neg; } else { @@ -227,46 +156,64 @@ bs1[n] += mpn_add_n (bs1, bs1, b1, n); /* b0+b1+b2 */ #endif - /* Compute bs2 */ - hp[n] = mpn_lshift (hp, b1, n, 1); /* 2b1 */ - -#ifdef HAVE_NATIVE_mpn_addlsh1_n - cy = mpn_addlsh1_n (bs2, b1, b2, t); - if (t != n) - cy = mpn_add_1 (bs2 + t, b1 + t, n - t, cy); - bs2[n] = 2 * cy + mpn_addlsh1_n (bs2, b0, bs2, n); -#else - bs2[t] = mpn_lshift (bs2, b2, t, 2); - mpn_add (bs2, hp, n + 1, bs2, t + 1); - bs2[n] += mpn_add_n (bs2, bs2, b0, n); + /* Compute bs2 and bsm2. */ +#if HAVE_NATIVE_mpn_addlsh_n || HAVE_NATIVE_mpn_addlsh2_n +#if HAVE_NATIVE_mpn_addlsh2_n + cy = mpn_addlsh2_n (bs2, b0, b2, t); +#else /* HAVE_NATIVE_mpn_addlsh_n */ + cy = mpn_addlsh_n (bs2, b0, b2, t, 2); #endif - - /* Compute bsh and bsmh. */ -#if HAVE_NATIVE_mpn_addlsh_n - gp[n] = mpn_addlsh_n (gp, b2, b0, n, 2); /* 4a0 + a2 */ + if (t < n) + cy = mpn_add_1 (bs2 + t, b0 + t, n - t, cy); + bs2[n] = cy; #else - cy = mpn_lshift (gp, b0, n, 2); /* 4b0 */ - gp[n] = cy + mpn_add (gp, gp, n, b2, t); /* 4b0 + b2 */ + cy = mpn_lshift (gp, b2, t, 2); + bs2[n] = mpn_add (bs2, b0, n, gp, t); + MPN_INCR_U (bs2 + t, n+1-t, cy); #endif -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (gp, hp, n + 1) < 0) + + gp[n] = mpn_lshift (gp, b1, n, 1); + +#if HAVE_NATIVE_mpn_add_n_sub_n + if (mpn_cmp (bs2, gp, n+1) < 0) { - mpn_addsub_n (bsh, bsmh, hp, gp, n + 1); - vmh_neg^= 1; + ASSERT_NOCARRY (mpn_add_n_sub_n (bs2, bsm2, gp, bs2, n+1)); + flags ^= toom7_w1_neg; } else - mpn_addsub_n (bsh, bsmh, gp, hp, n + 1); + { + ASSERT_NOCARRY (mpn_add_n_sub_n (bs2, bsm2, bs2, gp, n+1)); + } #else - mpn_add_n (bsh, gp, hp, n + 1); /* 4b0 + 2b1 + b2 */ - if (mpn_cmp (gp, hp, n + 1) < 0) + if (mpn_cmp (bs2, gp, n+1) < 0) { - mpn_sub_n (bsmh, hp, gp, n + 1); - vmh_neg ^= 1; + ASSERT_NOCARRY (mpn_sub_n (bsm2, gp, bs2, n+1)); + flags ^= toom7_w1_neg; } else { - mpn_sub_n (bsmh, gp, hp, n + 1); + ASSERT_NOCARRY (mpn_sub_n (bsm2, bs2, gp, n+1)); } + mpn_add_n (bs2, bs2, gp, n+1); +#endif + + /* Compute bsh = 4 b0 + 2 b1 + b0 = 2*(2*b0 + b1)+b0. */ +#if HAVE_NATIVE_mpn_addlsh1_n + cy = mpn_addlsh1_n (bsh, b1, b0, n); + if (t < n) + { + mp_limb_t cy2; + cy2 = mpn_addlsh1_n (bsh, b2, bsh, t); + bsh[n] = 2*cy + mpn_lshift (bsh + t, bsh + t, n - t, 1); + MPN_INCR_U (bsh + t, n+1-t, cy2); + } + else + bsh[n] = 2*cy + mpn_addlsh1_n (bsh, b2, bsh, n); +#else + cy = mpn_lshift (bsh, b0, n, 1); + cy += mpn_add_n (bsh, bsh, b1, n); + cy = 2*cy + mpn_lshift (bsh, bsh, n, 1); + bsh[n] = cy + mpn_add (bsh, bsh, n, b2, t); #endif ASSERT (as1[n] <= 4); @@ -275,18 +222,26 @@ ASSERT (bsm1[n] <= 1); ASSERT (as2[n] <= 30); ASSERT (bs2[n] <= 6); + ASSERT (asm2[n] <= 20); + ASSERT (bsm2[n] <= 4); ASSERT (ash[n] <= 30); ASSERT (bsh[n] <= 6); - ASSERT (asmh[n] <= 20); - ASSERT (bsmh[n] <= 4); #define v0 pp /* 2n */ -#define v1 (scratch + 6 * n + 6) /* 2n+1 */ -#define vm1 scratch /* 2n+1 */ -#define v2 (scratch + 2 * n + 2) /* 2n+1 */ +#define v1 (pp + 2 * n) /* 2n+1 */ #define vinf (pp + 6 * n) /* s+t */ -#define vh (pp + 2 * n) /* 2n+1 */ -#define vmh (scratch + 4 * n + 4) +#define v2 scratch /* 2n+1 */ +#define vm2 (scratch + 2 * n + 1) /* 2n+1 */ +#define vh (scratch + 4 * n + 2) /* 2n+1 */ +#define vm1 (scratch + 6 * n + 3) /* 2n+1 */ +#define scratch_out (scratch + 8 * n + 4) /* 2n+1 */ + /* Total scratch need: 10*n+5 */ + + /* Must be in allocation order, as they overwrite one limb beyond + * 2n+1. */ + mpn_mul_n (v2, as2, bs2, n + 1); /* v2, 2n+1 limbs */ + mpn_mul_n (vm2, asm2, bsm2, n + 1); /* vm2, 2n+1 limbs */ + mpn_mul_n (vh, ash, bsh, n + 1); /* vh, 2n+1 limbs */ /* vm1, 2n+1 limbs */ #ifdef SMALLER_RECURSION @@ -313,12 +268,6 @@ mpn_mul_n (vm1, asm1, bsm1, n + ((asm1[n] | bsm1[n]) != 0)); #endif /* SMALLER_RECURSION */ - mpn_mul_n (v2, as2, bs2, n + 1); /* v2, 2n+1 limbs */ - - /* vinf, s+t limbs */ - if (s > t) mpn_mul (vinf, a4, s, b2, t); - else mpn_mul (vinf, b2, t, a4, s); - /* v1, 2n+1 limbs */ #ifdef SMALLER_RECURSION mpn_mul_n (v1, as1, bs1, n); @@ -358,16 +307,14 @@ mpn_mul_n (v1, as1, bs1, n + ((as1[n] | bs1[n]) != 0)); #endif /* SMALLER_RECURSION */ - mpn_mul_n (vh, ash, bsh, n + 1); - - mpn_mul_n (vmh, asmh, bsmh, n + 1); - - mpn_mul_n (v0, ap, bp, n); /* v0, 2n limbs */ + mpn_mul_n (v0, a0, b0, n); /* v0, 2n limbs */ - flags = vm1_neg ? toom4_w3_neg : 0; - flags |= vmh_neg ? toom4_w1_neg : 0; + /* vinf, s+t limbs */ + if (s > t) mpn_mul (vinf, a4, s, b2, t); + else mpn_mul (vinf, b2, t, a4, s); - mpn_toom_interpolate_7pts (pp, n, flags, vmh, vm1, v1, v2, s + t, scratch + 8 * n + 8); + mpn_toom_interpolate_7pts (pp, n, flags, vm2, vm1, v2, vh, s + t, + scratch_out); TMP_FREE; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom62_mul.c gmp-5.0.2+dfsg/mpn/generic/toom62_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom62_mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom62_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -28,20 +28,13 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - Things to work on: - - 1. Trim allocation. The allocations for as1, asm1, bs1, and bsm1 could be - avoided by instead reusing the pp area and the scratch allocation. -*/ - #include "gmp.h" #include "gmp-impl.h" +/* Evaluate in: + 0, +1, -1, +2, -2, 1/2, +inf -/* Evaluate in: -1, -1/2, 0, +1/2, +1, +2, +inf - - <-s-><--n--><--n--><--n--> + <-s-><--n--><--n--><--n--><--n--><--n--> ___ ______ ______ ______ ______ ______ |a5_|___a4_|___a3_|___a2_|___a1_|___a0_| |_b1_|___b0_| @@ -51,8 +44,8 @@ v1 = ( a0+ a1+ a2+ a3+ a4+ a5)*( b0+ b1) # A(1)*B(1) ah <= 5 bh <= 1 vm1 = ( a0- a1+ a2- a3+ a4- a5)*( b0- b1) # A(-1)*B(-1) |ah| <= 2 bh = 0 v2 = ( a0+ 2a1+4a2+8a3+16a4+32a5)*( b0+2b1) # A(2)*B(2) ah <= 62 bh <= 2 + vm2 = ( a0- 2a1+4a2-8a3+16a4-32a5)*( b0-2b1) # A(-2)*B(-2) -41<=ah<=20 -1<=bh<=0 vh = (32a0+16a1+8a2+4a3+ 2a4+ a5)*(2b0+ b1) # A(1/2)*B(1/2) ah <= 62 bh <= 2 - vmh = (32a0-16a1+8a2-4a3+ 2a4- a5)*(2b0- b1) # A(-1/2)*B(-1/2) -20<=ah<=41 0<=bh<=1 vinf= a5 * b1 # A(inf)*B(inf) */ @@ -63,12 +56,11 @@ mp_ptr scratch) { mp_size_t n, s, t; - int vm1_neg, vmh_neg, bsm_neg; mp_limb_t cy; - mp_ptr a0_a2, a1_a3; - mp_ptr as1, asm1, as2, ash, asmh; - mp_ptr bs1, bsm1, bs2, bsh, bsmh; - enum toom4_flags flags; + mp_ptr as1, asm1, as2, asm2, ash; + mp_ptr bs1, bsm1, bs2, bsm2, bsh; + mp_ptr gp; + enum toom7_flags aflags, bflags; TMP_DECL; #define a0 ap @@ -80,7 +72,7 @@ #define b0 bp #define b1 (bp + n) - n = 1 + (an >= 3 * bn ? (an - 1) / (unsigned long) 6 : (bn - 1) >> 1); + n = 1 + (an >= 3 * bn ? (an - 1) / (size_t) 6 : (bn - 1) >> 1); s = an - 5 * n; t = bn - n; @@ -93,133 +85,66 @@ as1 = TMP_SALLOC_LIMBS (n + 1); asm1 = TMP_SALLOC_LIMBS (n + 1); as2 = TMP_SALLOC_LIMBS (n + 1); + asm2 = TMP_SALLOC_LIMBS (n + 1); ash = TMP_SALLOC_LIMBS (n + 1); - asmh = TMP_SALLOC_LIMBS (n + 1); bs1 = TMP_SALLOC_LIMBS (n + 1); bsm1 = TMP_SALLOC_LIMBS (n); bs2 = TMP_SALLOC_LIMBS (n + 1); + bsm2 = TMP_SALLOC_LIMBS (n + 1); bsh = TMP_SALLOC_LIMBS (n + 1); - bsmh = TMP_SALLOC_LIMBS (n + 1); - a0_a2 = pp; - a1_a3 = pp + n + 1; + gp = pp; /* Compute as1 and asm1. */ - a0_a2[n] = mpn_add_n (a0_a2, a0, a2, n); - a0_a2[n] += mpn_add_n (a0_a2, a0_a2, a4, n); - a1_a3[n] = mpn_add_n (a1_a3, a1, a3, n); - a1_a3[n] += mpn_add (a1_a3, a1_a3, n, a5, s); -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0) - { - mpn_addsub_n (as1, asm1, a1_a3, a0_a2, n + 1); - vm1_neg = 1; - } - else - { - mpn_addsub_n (as1, asm1, a0_a2, a1_a3, n + 1); - vm1_neg = 0; - } -#else - mpn_add_n (as1, a0_a2, a1_a3, n + 1); - if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0) - { - mpn_sub_n (asm1, a1_a3, a0_a2, n + 1); - vm1_neg = 1; - } - else - { - mpn_sub_n (asm1, a0_a2, a1_a3, n + 1); - vm1_neg = 0; - } -#endif + aflags = toom7_w3_neg & mpn_toom_eval_pm1 (as1, asm1, 5, ap, n, s, gp); - /* Compute as2. */ -#if HAVE_NATIVE_mpn_addlsh1_n - cy = mpn_addlsh1_n (as2, a4, a5, s); - if (s != n) - cy = mpn_add_1 (as2 + s, a4 + s, n - s, cy); - cy = 2 * cy + mpn_addlsh1_n (as2, a3, as2, n); - cy = 2 * cy + mpn_addlsh1_n (as2, a2, as2, n); - cy = 2 * cy + mpn_addlsh1_n (as2, a1, as2, n); - cy = 2 * cy + mpn_addlsh1_n (as2, a0, as2, n); -#else - cy = mpn_lshift (as2, a5, s, 1); - cy += mpn_add_n (as2, a4, as2, s); - if (s != n) - cy = mpn_add_1 (as2 + s, a4 + s, n - s, cy); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a3, as2, n); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a2, as2, n); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a1, as2, n); - cy = 2 * cy + mpn_lshift (as2, as2, n, 1); - cy += mpn_add_n (as2, a0, as2, n); -#endif - as2[n] = cy; + /* Compute as2 and asm2. */ + aflags |= toom7_w1_neg & mpn_toom_eval_pm2 (as2, asm2, 5, ap, n, s, gp); - /* Compute ash and asmh. */ -#if HAVE_NATIVE_mpn_addlsh_n - cy = mpn_addlsh_n (a0_a2, a2, a0, n, 2); /* 4a0 + a2 */ - cy = 4 * cy + mpn_addlsh_n (a0_a2, a4, a0_a2, n, 2); /* 16a0 + 4a2 + a4 */ - cy = 2 * cy + mpn_lshift (a0_a2, a0_a2, n, 1); /* 32a0 + 8a2 + 2a4 */ - a0_a2[n] = cy; - cy = mpn_addlsh_n (a1_a3, a3, a1, n, 2); /* 4a1 */ - cy = 4 * cy + mpn_addlsh_n (a1_a3, a5, a1_a3, n, 2); /* 16a1 + 4a3 */ - a1_a3[n] = cy; -#else - cy = mpn_lshift (a0_a2, a0, n, 2); /* 4a0 */ - cy += mpn_add_n (a0_a2, a2, a0_a2, n); /* 4a0 + a2 */ - cy = 4 * cy + mpn_lshift (a0_a2, a0_a2, n, 2); /* 16a0 + 4a2 */ - cy += mpn_add_n (a0_a2, a4, a0_a2, n); /* 16a0 + 4a2 + a4 */ - cy = 2 * cy + mpn_lshift (a0_a2, a0_a2, n, 1); /* 32a0 + 8a2 + 2a4 */ - a0_a2[n] = cy; - cy = mpn_lshift (a1_a3, a1, n, 2); /* 4a1 */ - cy += mpn_add_n (a1_a3, a3, a1_a3, n); /* 4a1 + a3 */ - cy = 4 * cy + mpn_lshift (a1_a3, a1_a3, n, 2); /* 16a1 + 4a3 */ - cy += mpn_add (a1_a3, a1_a3, n, a5, s); /* 16a1 + 4a3 + a5 */ - a1_a3[n] = cy; -#endif -#if HAVE_NATIVE_mpn_addsub_n - if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0) - { - mpn_addsub_n (ash, asmh, a1_a3, a0_a2, n + 1); - vmh_neg = 1; + /* Compute ash = 32 a0 + 16 a1 + 8 a2 + 4 a3 + 2 a4 + a5 + = 2*(2*(2*(2*(2*a0 + a1) + a2) + a3) + a4) + a5 */ + +#if HAVE_NATIVE_mpn_addlsh1_n + cy = mpn_addlsh1_n (ash, a1, a0, n); + cy = 2*cy + mpn_addlsh1_n (ash, a2, ash, n); + cy = 2*cy + mpn_addlsh1_n (ash, a3, ash, n); + cy = 2*cy + mpn_addlsh1_n (ash, a4, ash, n); + if (s < n) + { + mp_limb_t cy2; + cy2 = mpn_addlsh1_n (ash, a5, ash, s); + ash[n] = 2*cy + mpn_lshift (ash + s, ash + s, n - s, 1); + MPN_INCR_U (ash + s, n+1-s, cy2); } else - { - mpn_addsub_n (ash, asmh, a0_a2, a1_a3, n + 1); - vmh_neg = 0; - } + ash[n] = 2*cy + mpn_addlsh1_n (ash, a5, ash, n); #else - mpn_add_n (ash, a0_a2, a1_a3, n + 1); - if (mpn_cmp (a0_a2, a1_a3, n + 1) < 0) - { - mpn_sub_n (asmh, a1_a3, a0_a2, n + 1); - vmh_neg = 1; - } - else - { - mpn_sub_n (asmh, a0_a2, a1_a3, n + 1); - vmh_neg = 0; - } + cy = mpn_lshift (ash, a0, n, 1); + cy += mpn_add_n (ash, ash, a1, n); + cy = 2*cy + mpn_lshift (ash, ash, n, 1); + cy += mpn_add_n (ash, ash, a2, n); + cy = 2*cy + mpn_lshift (ash, ash, n, 1); + cy += mpn_add_n (ash, ash, a3, n); + cy = 2*cy + mpn_lshift (ash, ash, n, 1); + cy += mpn_add_n (ash, ash, a4, n); + cy = 2*cy + mpn_lshift (ash, ash, n, 1); + ash[n] = cy + mpn_add (ash, ash, n, a5, s); #endif /* Compute bs1 and bsm1. */ if (t == n) { -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n if (mpn_cmp (b0, b1, n) < 0) { - cy = mpn_addsub_n (bs1, bsm1, b1, b0, n); - bsm_neg = 1; + cy = mpn_add_n_sub_n (bs1, bsm1, b1, b0, n); + bflags = toom7_w3_neg; } else { - cy = mpn_addsub_n (bs1, bsm1, b0, b1, n); - bsm_neg = 0; + cy = mpn_add_n_sub_n (bs1, bsm1, b0, b1, n); + bflags = 0; } bs1[n] = cy >> 1; #else @@ -227,12 +152,12 @@ if (mpn_cmp (b0, b1, n) < 0) { mpn_sub_n (bsm1, b1, b0, n); - bsm_neg = 1; + bflags = toom7_w3_neg; } else { mpn_sub_n (bsm1, b0, b1, n); - bsm_neg = 0; + bflags = 0; } #endif } @@ -243,56 +168,83 @@ { mpn_sub_n (bsm1, b1, b0, t); MPN_ZERO (bsm1 + t, n - t); - bsm_neg = 1; + bflags = toom7_w3_neg; } else { mpn_sub (bsm1, b0, n, b1, t); - bsm_neg = 0; + bflags = 0; } } - vm1_neg ^= bsm_neg; - - /* Compute bs2, recycling bs1. bs2=bs1+b1 */ + /* Compute bs2 and bsm2. Recycling bs1 and bsm1; bs2=bs1+b1, bsm2 = + bsm1 - b1 */ mpn_add (bs2, bs1, n + 1, b1, t); - - /* Compute bsh and bsmh, recycling bs1 and bsm1. bsh=bs1+b0; bsmh=bsmh+b0 */ - if (bsm_neg == 1) + if (bflags & toom7_w3_neg) + { + bsm2[n] = mpn_add (bsm2, bsm1, n, b1, t); + bflags |= toom7_w1_neg; + } + else { - bsmh[n] = 0; - if (mpn_cmp (bsm1, b0, n) < 0) + /* FIXME: Simplify this logic? */ + if (t < n) { - bsm_neg = 0; - mpn_sub_n (bsmh, b0, bsm1, n); + if (mpn_zero_p (bsm1 + t, n - t) && mpn_cmp (bsm1, b1, t) < 0) + { + ASSERT_NOCARRY (mpn_sub_n (bsm2, b1, bsm1, t)); + MPN_ZERO (bsm2 + t, n + 1 - t); + bflags |= toom7_w1_neg; + } + else + { + ASSERT_NOCARRY (mpn_sub (bsm2, bsm1, n, b1, t)); + bsm2[n] = 0; + } } else - mpn_sub_n (bsmh, bsm1, b0, n); + { + if (mpn_cmp (bsm1, b1, n) < 0) + { + ASSERT_NOCARRY (mpn_sub_n (bsm2, b1, bsm1, n)); + bflags |= toom7_w1_neg; + } + else + { + ASSERT_NOCARRY (mpn_sub (bsm2, bsm1, n, b1, n)); + } + bsm2[n] = 0; + } } - else - bsmh[n] = mpn_add_n (bsmh, bsm1, b0, n); - mpn_add (bsh, bs1, n + 1, b0, n); - vmh_neg ^= bsm_neg; + /* Compute bsh, recycling bs1 and bsm1. bsh=bs1+b0; */ + mpn_add (bsh, bs1, n + 1, b0, n); ASSERT (as1[n] <= 5); ASSERT (bs1[n] <= 1); ASSERT (asm1[n] <= 2); -/*ASSERT (bsm1[n] == 0);*/ ASSERT (as2[n] <= 62); ASSERT (bs2[n] <= 2); + ASSERT (asm2[n] <= 41); + ASSERT (bsm2[n] <= 1); ASSERT (ash[n] <= 62); ASSERT (bsh[n] <= 2); - ASSERT (asmh[n] <= 41); - ASSERT (bsmh[n] <= 1); #define v0 pp /* 2n */ -#define v1 (scratch + 6 * n + 6) /* 2n+1 */ +#define v1 (pp + 2 * n) /* 2n+1 */ #define vinf (pp + 6 * n) /* s+t */ -#define vm1 scratch /* 2n+1 */ -#define v2 (scratch + 2 * n + 2) /* 2n+1 */ -#define vh (pp + 2 * n) /* 2n+1 */ -#define vmh (scratch + 4 * n + 4) +#define v2 scratch /* 2n+1 */ +#define vm2 (scratch + 2 * n + 1) /* 2n+1 */ +#define vh (scratch + 4 * n + 2) /* 2n+1 */ +#define vm1 (scratch + 6 * n + 3) /* 2n+1 */ +#define scratch_out (scratch + 8 * n + 4) /* 2n+1 */ + /* Total scratch need: 10*n+5 */ + + /* Must be in allocation order, as they overwrite one limb beyond + * 2n+1. */ + mpn_mul_n (v2, as2, bs2, n + 1); /* v2, 2n+1 limbs */ + mpn_mul_n (vm2, asm2, bsm2, n + 1); /* vm2, 2n+1 limbs */ + mpn_mul_n (vh, ash, bsh, n + 1); /* vh, 2n+1 limbs */ /* vm1, 2n+1 limbs */ mpn_mul_n (vm1, asm1, bsm1, n); @@ -311,12 +263,6 @@ } vm1[2 * n] = cy; - mpn_mul_n (v2, as2, bs2, n + 1); /* v2, 2n+1 limbs */ - - /* vinf, s+t limbs */ - if (s > t) mpn_mul (vinf, a5, s, b1, t); - else mpn_mul (vinf, b1, t, a5, s); - /* v1, 2n+1 limbs */ mpn_mul_n (v1, as1, bs1, n); if (as1[n] == 1) @@ -341,16 +287,14 @@ cy += mpn_add_n (v1 + n, v1 + n, as1, n); v1[2 * n] = cy; - mpn_mul_n (vh, ash, bsh, n + 1); - - mpn_mul_n (vmh, asmh, bsmh, n + 1); - - mpn_mul_n (v0, ap, bp, n); /* v0, 2n limbs */ + mpn_mul_n (v0, a0, b0, n); /* v0, 2n limbs */ - flags = vm1_neg ? toom4_w3_neg : 0; - flags |= vmh_neg ? toom4_w1_neg : 0; + /* vinf, s+t limbs */ + if (s > t) mpn_mul (vinf, a5, s, b1, t); + else mpn_mul (vinf, b1, t, a5, s); - mpn_toom_interpolate_7pts (pp, n, flags, vmh, vm1, v1, v2, s + t, scratch + 8 * n + 8); + mpn_toom_interpolate_7pts (pp, n, aflags ^ bflags, + vm2, vm1, v2, vh, s + t, scratch_out); TMP_FREE; } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom63_mul.c gmp-5.0.2+dfsg/mpn/generic/toom63_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom63_mul.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom63_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,221 @@ +/* Implementation of the algorithm for Toom-Cook 4.5-way. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +/* Stores |{ap,n}-{bp,n}| in {rp,n}, returns the sign. */ +static int +abs_sub_n (mp_ptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t n) +{ + mp_limb_t x, y; + while (--n >= 0) + { + x = ap[n]; + y = bp[n]; + if (x != y) + { + n++; + if (x > y) + { + mpn_sub_n (rp, ap, bp, n); + return 0; + } + else + { + mpn_sub_n (rp, bp, ap, n); + return ~0; + } + } + rp[n] = 0; + } + return 0; +} + +static int +abs_sub_add_n (mp_ptr rm, mp_ptr rp, mp_srcptr rs, mp_size_t n) { + int result; + result = abs_sub_n (rm, rp, rs, n); + ASSERT_NOCARRY(mpn_add_n (rp, rp, rs, n)); + return result; +} + + +/* Toom-4.5, the splitting 6x3 unbalanced version. + Evaluate in: infinity, +4, -4, +2, -2, +1, -1, 0. + + <--s-><--n--><--n--><--n--><--n--><--n--> + ____ ______ ______ ______ ______ ______ + |_a5_|__a4__|__a3__|__a2__|__a1__|__a0__| + |b2_|__b1__|__b0__| + <-t-><--n--><--n--> + +*/ +#define TOOM_63_MUL_N_REC(p, a, b, n, ws) \ + do { mpn_mul_n (p, a, b, n); \ + } while (0) + +#define TOOM_63_MUL_REC(p, a, na, b, nb, ws) \ + do { mpn_mul (p, a, na, b, nb); \ + } while (0) + +void +mpn_toom63_mul (mp_ptr pp, + mp_srcptr ap, mp_size_t an, + mp_srcptr bp, mp_size_t bn, mp_ptr scratch) +{ + mp_size_t n, s, t; + mp_limb_t cy; + int sign; + + /***************************** decomposition *******************************/ +#define a5 (ap + 5 * n) +#define b0 (bp + 0 * n) +#define b1 (bp + 1 * n) +#define b2 (bp + 2 * n) + + ASSERT (an >= bn); + n = 1 + (an >= 2 * bn ? (an - 1) / (size_t) 6 : (bn - 1) / (size_t) 3); + + s = an - 5 * n; + t = bn - 2 * n; + + ASSERT (0 < s && s <= n); + ASSERT (0 < t && t <= n); + /* WARNING! it assumes s+t>n */ + ASSERT ( s + t > n ); + ASSERT ( s + t > 4); + /* WARNING! it assumes n>1 */ + ASSERT ( n > 2); + +#define r8 pp /* 2n */ +#define r7 scratch /* 3n+1 */ +#define r5 (pp + 3*n) /* 3n+1 */ +#define v0 (pp + 3*n) /* n+1 */ +#define v1 (pp + 4*n+1) /* n+1 */ +#define v2 (pp + 5*n+2) /* n+1 */ +#define v3 (pp + 6*n+3) /* n+1 */ +#define r3 (scratch + 3 * n + 1) /* 3n+1 */ +#define r1 (pp + 7*n) /* s+t <= 2*n */ +#define ws (scratch + 6 * n + 2) /* ??? */ + + /* Alloc also 3n+1 limbs for ws... mpn_toom_interpolate_8pts may + need all of them, when DO_mpn_sublsh_n usea a scratch */ +/* if (scratch == NULL) scratch = TMP_SALLOC_LIMBS (9 * n + 3); */ + + /********************** evaluation and recursive calls *********************/ + /* $\pm4$ */ + sign = mpn_toom_eval_pm2exp (v2, v0, 5, ap, n, s, 2, pp); + pp[n] = mpn_lshift (pp, b1, n, 2); /* 4b1 */ + /* FIXME: use addlsh */ + v3[t] = mpn_lshift (v3, b2, t, 4);/* 16b2 */ + if ( n == t ) + v3[n]+= mpn_add_n (v3, v3, b0, n); /* 16b2+b0 */ + else + v3[n] = mpn_add (v3, b0, n, v3, t+1); /* 16b2+b0 */ + sign ^= abs_sub_add_n (v1, v3, pp, n + 1); + TOOM_63_MUL_N_REC(pp, v0, v1, n + 1, ws); /* A(-4)*B(-4) */ + TOOM_63_MUL_N_REC(r3, v2, v3, n + 1, ws); /* A(+4)*B(+4) */ + mpn_toom_couple_handling (r3, 2*n+1, pp, sign, n, 2, 4); + + /* $\pm1$ */ + sign = mpn_toom_eval_pm1 (v2, v0, 5, ap, n, s, pp); + /* Compute bs1 and bsm1. Code taken from toom33 */ + cy = mpn_add (ws, b0, n, b2, t); +#if HAVE_NATIVE_mpn_add_n_sub_n + if (cy == 0 && mpn_cmp (ws, b1, n) < 0) + { + cy = mpn_add_n_sub_n (v3, v1, b1, ws, n); + v3[n] = cy >> 1; + v1[n] = 0; + sign = ~sign; + } + else + { + mp_limb_t cy2; + cy2 = mpn_add_n_sub_n (v3, v1, ws, b1, n); + v3[n] = cy + (cy2 >> 1); + v1[n] = cy - (cy2 & 1); + } +#else + v3[n] = cy + mpn_add_n (v3, ws, b1, n); + if (cy == 0 && mpn_cmp (ws, b1, n) < 0) + { + mpn_sub_n (v1, b1, ws, n); + v1[n] = 0; + sign = ~sign; + } + else + { + cy -= mpn_sub_n (v1, ws, b1, n); + v1[n] = cy; + } +#endif + TOOM_63_MUL_N_REC(pp, v0, v1, n + 1, ws); /* A(-1)*B(-1) */ + TOOM_63_MUL_N_REC(r7, v2, v3, n + 1, ws); /* A(1)*B(1) */ + mpn_toom_couple_handling (r7, 2*n+1, pp, sign, n, 0, 0); + + /* $\pm2$ */ + sign = mpn_toom_eval_pm2 (v2, v0, 5, ap, n, s, pp); + pp[n] = mpn_lshift (pp, b1, n, 1); /* 2b1 */ + /* FIXME: use addlsh or addlsh2 */ + v3[t] = mpn_lshift (v3, b2, t, 2);/* 4b2 */ + if ( n == t ) + v3[n]+= mpn_add_n (v3, v3, b0, n); /* 4b2+b0 */ + else + v3[n] = mpn_add (v3, b0, n, v3, t+1); /* 4b2+b0 */ + sign ^= abs_sub_add_n (v1, v3, pp, n + 1); + TOOM_63_MUL_N_REC(pp, v0, v1, n + 1, ws); /* A(-2)*B(-2) */ + TOOM_63_MUL_N_REC(r5, v2, v3, n + 1, ws); /* A(+2)*B(+2) */ + mpn_toom_couple_handling (r5, 2*n+1, pp, sign, n, 1, 2); + + /* A(0)*B(0) */ + TOOM_63_MUL_N_REC(pp, ap, bp, n, ws); + + /* Infinity */ + if (s > t) { + TOOM_63_MUL_REC(r1, a5, s, b2, t, ws); + } else { + TOOM_63_MUL_REC(r1, b2, t, a5, s, ws); + }; + + mpn_toom_interpolate_8pts (pp, n, r3, r7, s + t, ws); + +#undef a5 +#undef b0 +#undef b1 +#undef b2 +#undef r1 +#undef r3 +#undef r5 +#undef v0 +#undef v1 +#undef v2 +#undef v3 +#undef r7 +#undef r8 +#undef ws +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom6h_mul.c gmp-5.0.2+dfsg/mpn/generic/toom6h_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom6h_mul.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom6h_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,232 @@ +/* Implementation of the multiplication algorithm for Toom-Cook 6.5-way. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + + +#if GMP_NUMB_BITS < 21 +#error Not implemented. +#endif + +#if TUNE_PROGRAM_BUILD +#define MAYBE_mul_basecase 1 +#define MAYBE_mul_toom22 1 +#define MAYBE_mul_toom33 1 +#define MAYBE_mul_toom6h 1 +#else +#define MAYBE_mul_basecase \ + (MUL_TOOM6H_THRESHOLD < 6 * MUL_TOOM22_THRESHOLD) +#define MAYBE_mul_toom22 \ + (MUL_TOOM6H_THRESHOLD < 6 * MUL_TOOM33_THRESHOLD) +#define MAYBE_mul_toom33 \ + (MUL_TOOM6H_THRESHOLD < 6 * MUL_TOOM44_THRESHOLD) +#define MAYBE_mul_toom6h \ + (MUL_FFT_THRESHOLD >= 6 * MUL_TOOM6H_THRESHOLD) +#endif + +#define TOOM6H_MUL_N_REC(p, a, b, n, ws) \ + do { \ + if (MAYBE_mul_basecase \ + && BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) \ + mpn_mul_basecase (p, a, n, b, n); \ + else if (MAYBE_mul_toom22 \ + && BELOW_THRESHOLD (n, MUL_TOOM33_THRESHOLD)) \ + mpn_toom22_mul (p, a, n, b, n, ws); \ + else if (MAYBE_mul_toom33 \ + && BELOW_THRESHOLD (n, MUL_TOOM44_THRESHOLD)) \ + mpn_toom33_mul (p, a, n, b, n, ws); \ + else if (! MAYBE_mul_toom6h \ + || BELOW_THRESHOLD (n, MUL_TOOM6H_THRESHOLD)) \ + mpn_toom44_mul (p, a, n, b, n, ws); \ + else \ + mpn_toom6h_mul (p, a, n, b, n, ws); \ + } while (0) + +#define TOOM6H_MUL_REC(p, a, na, b, nb, ws) \ + do { mpn_mul (p, a, na, b, nb); \ + } while (0) + +/* Toom-6.5 , compute the product {pp,an+bn} <- {ap,an} * {bp,bn} + With: an >= bn >= 46, an*6 < bn * 17. + It _may_ work with bn<=46 and bn*17 < an*6 < bn*18 + + Evaluate in: infinity, +4, -4, +2, -2, +1, -1, +1/2, -1/2, +1/4, -1/4, 0. +*/ +/* Estimate on needed scratch: + S(n) <= (n+5)\6*10+4+MAX(S((n+5)\6),1+2*(n+5)\6), + since n>42; S(n) <= ceil(log(n)/log(6))*(10+4)+n*12\6 < n*2 + lg2(n)*6 + */ + +void +mpn_toom6h_mul (mp_ptr pp, + mp_srcptr ap, mp_size_t an, + mp_srcptr bp, mp_size_t bn, mp_ptr scratch) +{ + mp_size_t n, s, t; + int p, q, half; + int sign; + + /***************************** decomposition *******************************/ + + ASSERT( an >= bn); + /* Can not handle too much unbalancement */ + ASSERT( bn >= 42 ); + /* Can not handle too much unbalancement */ + ASSERT((an*3 < bn * 8) || ( bn >= 46 && an*6 < bn * 17 )); + + /* Limit num/den is a rational number between + (12/11)^(log(4)/log(2*4-1)) and (12/11)^(log(6)/log(2*6-1)) */ +#define LIMIT_numerator (18) +#define LIMIT_denominat (17) + + if( an * LIMIT_denominat < LIMIT_numerator * bn ) /* is 6*... < 6*... */ + { p = q = 6; } + else if( an * 5 * LIMIT_numerator < LIMIT_denominat * 7 * bn ) + { p = 7; q = 6; } + else if( an * 5 * LIMIT_denominat < LIMIT_numerator * 7 * bn ) + { p = 7; q = 5; } + else if( an * LIMIT_numerator < LIMIT_denominat * 2 * bn ) /* is 4*... < 8*... */ + { p = 8; q = 5; } + else if( an * LIMIT_denominat < LIMIT_numerator * 2 * bn ) /* is 4*... < 8*... */ + { p = 8; q = 4; } + else + { p = 9; q = 4; } + + half = (p ^ q) & 1; + n = 1 + (q * an >= p * bn ? (an - 1) / (size_t) p : (bn - 1) / (size_t) q); + p--; q--; + + s = an - p * n; + t = bn - q * n; + + /* With LIMIT = 16/15, the following recover is needed only if bn<=73*/ + if (half) { /* Recover from badly chosen splitting */ + if (s<1) {p--; s+=n; half=0;} + else if (t<1) {q--; t+=n; half=0;} + } +#undef LIMIT_numerator +#undef LIMIT_denominat + + ASSERT (0 < s && s <= n); + ASSERT (0 < t && t <= n); + ASSERT (half || s + t > 3); + ASSERT (n > 2); + +#define r4 (pp + 3 * n) /* 3n+1 */ +#define r2 (pp + 7 * n) /* 3n+1 */ +#define r0 (pp +11 * n) /* s+t <= 2*n */ +#define r5 (scratch) /* 3n+1 */ +#define r3 (scratch + 3 * n + 1) /* 3n+1 */ +#define r1 (scratch + 6 * n + 2) /* 3n+1 */ +#define v0 (pp + 7 * n) /* n+1 */ +#define v1 (pp + 8 * n+1) /* n+1 */ +#define v2 (pp + 9 * n+2) /* n+1 */ +#define v3 (scratch + 9 * n + 3) /* n+1 */ +#define wsi (scratch + 9 * n + 3) /* 3n+1 */ +#define wse (scratch +10 * n + 4) /* 2n+1 */ + + /* Alloc also 3n+1 limbs for wsi... toom_interpolate_12pts may + need all of them */ +/* if (scratch == NULL) */ +/* scratch = TMP_SALLOC_LIMBS(mpn_toom6_sqr_itch(n * 6)); */ + ASSERT (12 * n + 6 <= mpn_toom6h_mul_itch(an,bn)); + ASSERT (12 * n + 6 <= mpn_toom6_sqr_itch(n * 6)); + + /********************** evaluation and recursive calls *********************/ + /* $\pm1/2$ */ + sign = mpn_toom_eval_pm2rexp (v2, v0, p, ap, n, s, 1, pp) ^ + mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 1, pp); + TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/2)*B(-1/2)*2^. */ + TOOM6H_MUL_N_REC(r5, v2, v3, n + 1, wse); /* A(+1/2)*B(+1/2)*2^. */ + mpn_toom_couple_handling (r5, 2 * n + 1, pp, sign, n, 1+half , half); + + /* $\pm1$ */ + sign = mpn_toom_eval_pm1 (v2, v0, p, ap, n, s, pp); + if (q == 3) + sign ^= mpn_toom_eval_dgr3_pm1 (v3, v1, bp, n, t, pp); + else + sign ^= mpn_toom_eval_pm1 (v3, v1, q, bp, n, t, pp); + TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1)*B(-1) */ + TOOM6H_MUL_N_REC(r3, v2, v3, n + 1, wse); /* A(1)*B(1) */ + mpn_toom_couple_handling (r3, 2 * n + 1, pp, sign, n, 0, 0); + + /* $\pm4$ */ + sign = mpn_toom_eval_pm2exp (v2, v0, p, ap, n, s, 2, pp) ^ + mpn_toom_eval_pm2exp (v3, v1, q, bp, n, t, 2, pp); + TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-4)*B(-4) */ + TOOM6H_MUL_N_REC(r1, v2, v3, n + 1, wse); /* A(+4)*B(+4) */ + mpn_toom_couple_handling (r1, 2 * n + 1, pp, sign, n, 2, 4); + + /* $\pm1/4$ */ + sign = mpn_toom_eval_pm2rexp (v2, v0, p, ap, n, s, 2, pp) ^ + mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 2, pp); + TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/4)*B(-1/4)*4^. */ + TOOM6H_MUL_N_REC(r4, v2, v3, n + 1, wse); /* A(+1/4)*B(+1/4)*4^. */ + mpn_toom_couple_handling (r4, 2 * n + 1, pp, sign, n, 2*(1+half), 2*(half)); + + /* $\pm2$ */ + sign = mpn_toom_eval_pm2 (v2, v0, p, ap, n, s, pp) ^ + mpn_toom_eval_pm2 (v3, v1, q, bp, n, t, pp); + TOOM6H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-2)*B(-2) */ + TOOM6H_MUL_N_REC(r2, v2, v3, n + 1, wse); /* A(+2)*B(+2) */ + mpn_toom_couple_handling (r2, 2 * n + 1, pp, sign, n, 1, 2); + +#undef v0 +#undef v1 +#undef v2 +#undef v3 +#undef wse + + /* A(0)*B(0) */ + TOOM6H_MUL_N_REC(pp, ap, bp, n, wsi); + + /* Infinity */ + if( half != 0) { + if(s>t) { + TOOM6H_MUL_REC(r0, ap + p * n, s, bp + q * n, t, wsi); + } else { + TOOM6H_MUL_REC(r0, bp + q * n, t, ap + p * n, s, wsi); + }; + }; + + mpn_toom_interpolate_12pts (pp, r1, r3, r5, n, s+t, half, wsi); + +#undef r0 +#undef r1 +#undef r2 +#undef r3 +#undef r4 +#undef r5 +#undef wsi +} + +#undef TOOM6H_MUL_N_REC +#undef TOOM6H_MUL_REC +#undef MAYBE_mul_basecase +#undef MAYBE_mul_toom22 +#undef MAYBE_mul_toom33 +#undef MAYBE_mul_toom6h diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom6_sqr.c gmp-5.0.2+dfsg/mpn/generic/toom6_sqr.c --- gmp-4.3.2+dfsg/mpn/generic/toom6_sqr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom6_sqr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,171 @@ +/* Implementation of the squaring algorithm with Toom-Cook 6.5-way. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + + +#if GMP_NUMB_BITS < 21 +#error Not implemented. +#endif + + +#if TUNE_PROGRAM_BUILD +#define MAYBE_sqr_basecase 1 +#define MAYBE_sqr_above_basecase 1 +#define MAYBE_sqr_toom2 1 +#define MAYBE_sqr_above_toom2 1 +#define MAYBE_sqr_toom3 1 +#define MAYBE_sqr_above_toom3 1 +#define MAYBE_sqr_above_toom4 1 +#else +#ifdef SQR_TOOM8_THRESHOLD +#define SQR_TOOM6_MAX ((SQR_TOOM8_THRESHOLD+6*2-1+5)/6) +#else +#define SQR_TOOM6_MAX \ + ((SQR_FFT_THRESHOLD <= MP_SIZE_T_MAX - (6*2-1+5)) ? \ + ((SQR_FFT_THRESHOLD+6*2-1+5)/6) \ + : MP_SIZE_T_MAX ) +#endif +#define MAYBE_sqr_basecase \ + (SQR_TOOM6_THRESHOLD < 6 * SQR_TOOM2_THRESHOLD) +#define MAYBE_sqr_above_basecase \ + (SQR_TOOM6_MAX >= SQR_TOOM2_THRESHOLD) +#define MAYBE_sqr_toom2 \ + (SQR_TOOM6_THRESHOLD < 6 * SQR_TOOM3_THRESHOLD) +#define MAYBE_sqr_above_toom2 \ + (SQR_TOOM6_MAX >= SQR_TOOM3_THRESHOLD) +#define MAYBE_sqr_toom3 \ + (SQR_TOOM6_THRESHOLD < 6 * SQR_TOOM4_THRESHOLD) +#define MAYBE_sqr_above_toom3 \ + (SQR_TOOM6_MAX >= SQR_TOOM4_THRESHOLD) +#define MAYBE_sqr_above_toom4 \ + (SQR_TOOM6_MAX >= SQR_TOOM6_THRESHOLD) +#endif + +#define TOOM6_SQR_REC(p, a, n, ws) \ + do { \ + if (MAYBE_sqr_basecase && ( !MAYBE_sqr_above_basecase \ + || BELOW_THRESHOLD (n, SQR_TOOM2_THRESHOLD))) \ + mpn_sqr_basecase (p, a, n); \ + else if (MAYBE_sqr_toom2 && ( !MAYBE_sqr_above_toom2 \ + || BELOW_THRESHOLD (n, SQR_TOOM3_THRESHOLD))) \ + mpn_toom2_sqr (p, a, n, ws); \ + else if (MAYBE_sqr_toom3 && ( !MAYBE_sqr_above_toom3 \ + || BELOW_THRESHOLD (n, SQR_TOOM4_THRESHOLD))) \ + mpn_toom3_sqr (p, a, n, ws); \ + else if (! MAYBE_sqr_above_toom4 \ + || BELOW_THRESHOLD (n, SQR_TOOM6_THRESHOLD)) \ + mpn_toom4_sqr (p, a, n, ws); \ + else \ + mpn_toom6_sqr (p, a, n, ws); \ + } while (0) + +void +mpn_toom6_sqr (mp_ptr pp, mp_srcptr ap, mp_size_t an, mp_ptr scratch) +{ + mp_size_t n, s; + + /***************************** decomposition *******************************/ + + ASSERT( an >= 18 ); + + n = 1 + (an - 1) / (size_t) 6; + + s = an - 5 * n; + + ASSERT (0 < s && s <= n); + +#define r4 (pp + 3 * n) /* 3n+1 */ +#define r2 (pp + 7 * n) /* 3n+1 */ +#define r0 (pp +11 * n) /* s+t <= 2*n */ +#define r5 (scratch) /* 3n+1 */ +#define r3 (scratch + 3 * n + 1) /* 3n+1 */ +#define r1 (scratch + 6 * n + 2) /* 3n+1 */ +#define v0 (pp + 7 * n) /* n+1 */ +#define v2 (pp + 9 * n+2) /* n+1 */ +#define wse (scratch + 9 * n + 3) /* 3n+1 */ + + /* Alloc also 3n+1 limbs for ws... toom_interpolate_12pts may + need all of them, when DO_mpn_sublsh_n usea a scratch */ +/* if (scratch== NULL) */ +/* scratch = TMP_SALLOC_LIMBS (12 * n + 6); */ + + /********************** evaluation and recursive calls *********************/ + /* $\pm1/2$ */ + mpn_toom_eval_pm2rexp (v2, v0, 5, ap, n, s, 1, pp); + TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-1/2)*B(-1/2)*2^. */ + TOOM6_SQR_REC(r5, v2, n + 1, wse); /* A(+1/2)*B(+1/2)*2^. */ + mpn_toom_couple_handling (r5, 2 * n + 1, pp, 0, n, 1, 0); + + /* $\pm1$ */ + mpn_toom_eval_pm1 (v2, v0, 5, ap, n, s, pp); + TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-1)*B(-1) */ + TOOM6_SQR_REC(r3, v2, n + 1, wse); /* A(1)*B(1) */ + mpn_toom_couple_handling (r3, 2 * n + 1, pp, 0, n, 0, 0); + + /* $\pm4$ */ + mpn_toom_eval_pm2exp (v2, v0, 5, ap, n, s, 2, pp); + TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-4)*B(-4) */ + TOOM6_SQR_REC(r1, v2, n + 1, wse); /* A(+4)*B(+4) */ + mpn_toom_couple_handling (r1, 2 * n + 1, pp, 0, n, 2, 4); + + /* $\pm1/4$ */ + mpn_toom_eval_pm2rexp (v2, v0, 5, ap, n, s, 2, pp); + TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-1/4)*B(-1/4)*4^. */ + TOOM6_SQR_REC(r4, v2, n + 1, wse); /* A(+1/4)*B(+1/4)*4^. */ + mpn_toom_couple_handling (r4, 2 * n + 1, pp, 0, n, 2, 0); + + /* $\pm2$ */ + mpn_toom_eval_pm2 (v2, v0, 5, ap, n, s, pp); + TOOM6_SQR_REC(pp, v0, n + 1, wse); /* A(-2)*B(-2) */ + TOOM6_SQR_REC(r2, v2, n + 1, wse); /* A(+2)*B(+2) */ + mpn_toom_couple_handling (r2, 2 * n + 1, pp, 0, n, 1, 2); + +#undef v0 +#undef v2 + + /* A(0)*B(0) */ + TOOM6_SQR_REC(pp, ap, n, wse); + + mpn_toom_interpolate_12pts (pp, r1, r3, r5, n, 2 * s, 0, wse); + +#undef r0 +#undef r1 +#undef r2 +#undef r3 +#undef r4 +#undef r5 + +} +#undef TOOM6_SQR_REC +#undef MAYBE_sqr_basecase +#undef MAYBE_sqr_above_basecase +#undef MAYBE_sqr_toom2 +#undef MAYBE_sqr_above_toom2 +#undef MAYBE_sqr_toom3 +#undef MAYBE_sqr_above_toom3 +#undef MAYBE_sqr_above_toom4 diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom8h_mul.c gmp-5.0.2+dfsg/mpn/generic/toom8h_mul.c --- gmp-4.3.2+dfsg/mpn/generic/toom8h_mul.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom8h_mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,290 @@ +/* Implementation of the multiplication algorithm for Toom-Cook 8.5-way. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + + +#if GMP_NUMB_BITS < 29 +#error Not implemented. +#endif + +#if GMP_NUMB_BITS < 43 +#define BIT_CORRECTION 1 +#define CORRECTION_BITS GMP_NUMB_BITS +#else +#define BIT_CORRECTION 0 +#define CORRECTION_BITS 0 +#endif + + +#if TUNE_PROGRAM_BUILD +#define MAYBE_mul_basecase 1 +#define MAYBE_mul_toom22 1 +#define MAYBE_mul_toom33 1 +#define MAYBE_mul_toom44 1 +#define MAYBE_mul_toom8h 1 +#else +#define MAYBE_mul_basecase \ + (MUL_TOOM8H_THRESHOLD < 8 * MUL_TOOM22_THRESHOLD) +#define MAYBE_mul_toom22 \ + (MUL_TOOM8H_THRESHOLD < 8 * MUL_TOOM33_THRESHOLD) +#define MAYBE_mul_toom33 \ + (MUL_TOOM8H_THRESHOLD < 8 * MUL_TOOM44_THRESHOLD) +#define MAYBE_mul_toom44 \ + (MUL_TOOM8H_THRESHOLD < 8 * MUL_TOOM6H_THRESHOLD) +#define MAYBE_mul_toom8h \ + (MUL_FFT_THRESHOLD >= 8 * MUL_TOOM8H_THRESHOLD) +#endif + +#define TOOM8H_MUL_N_REC(p, a, b, n, ws) \ + do { \ + if (MAYBE_mul_basecase \ + && BELOW_THRESHOLD (n, MUL_TOOM22_THRESHOLD)) \ + mpn_mul_basecase (p, a, n, b, n); \ + else if (MAYBE_mul_toom22 \ + && BELOW_THRESHOLD (n, MUL_TOOM33_THRESHOLD)) \ + mpn_toom22_mul (p, a, n, b, n, ws); \ + else if (MAYBE_mul_toom33 \ + && BELOW_THRESHOLD (n, MUL_TOOM44_THRESHOLD)) \ + mpn_toom33_mul (p, a, n, b, n, ws); \ + else if (MAYBE_mul_toom44 \ + && BELOW_THRESHOLD (n, MUL_TOOM6H_THRESHOLD)) \ + mpn_toom44_mul (p, a, n, b, n, ws); \ + else if (! MAYBE_mul_toom8h \ + || BELOW_THRESHOLD (n, MUL_TOOM8H_THRESHOLD)) \ + mpn_toom6h_mul (p, a, n, b, n, ws); \ + else \ + mpn_toom8h_mul (p, a, n, b, n, ws); \ + } while (0) + +#define TOOM8H_MUL_REC(p, a, na, b, nb, ws) \ + do { mpn_mul (p, a, na, b, nb); \ + } while (0) + +/* Toom-8.5 , compute the product {pp,an+bn} <- {ap,an} * {bp,bn} + With: an >= bn >= 86, an*5 < bn * 11. + It _may_ work with bn<=?? and bn*?? < an*? < bn*?? + + Evaluate in: infinity, +8,-8,+4,-4,+2,-2,+1,-1,+1/2,-1/2,+1/4,-1/4,+1/8,-1/8,0. +*/ +/* Estimate on needed scratch: + S(n) <= (n+7)\8*13+5+MAX(S((n+7)\8),1+2*(n+7)\8), + since n>80; S(n) <= ceil(log(n/10)/log(8))*(13+5)+n*15\8 < n*15\8 + lg2(n)*6 + */ + +void +mpn_toom8h_mul (mp_ptr pp, + mp_srcptr ap, mp_size_t an, + mp_srcptr bp, mp_size_t bn, mp_ptr scratch) +{ + mp_size_t n, s, t; + int p, q, half; + int sign; + + /***************************** decomposition *******************************/ + + ASSERT (an >= bn); + /* Can not handle too small operands */ + ASSERT (bn >= 86); + /* Can not handle too much unbalancement */ + ASSERT (an*4 <= bn*13); + ASSERT (GMP_NUMB_BITS > 12*3 || an*4 <= bn*12); + ASSERT (GMP_NUMB_BITS > 11*3 || an*5 <= bn*11); + ASSERT (GMP_NUMB_BITS > 10*3 || an*6 <= bn*10); + ASSERT (GMP_NUMB_BITS > 9*3 || an*7 <= bn* 9); + + /* Limit num/den is a rational number between + (16/15)^(log(6)/log(2*6-1)) and (16/15)^(log(8)/log(2*8-1)) */ +#define LIMIT_numerator (21) +#define LIMIT_denominat (20) + + if (LIKELY (an == bn) || an * (LIMIT_denominat>>1) < LIMIT_numerator * (bn>>1) ) /* is 8*... < 8*... */ + { + half = 0; + n = 1 + ((an - 1)>>3); + p = q = 7; + s = an - p * n; + t = bn - q * n; + } + else + { + if (an * 13 < 16 * bn) /* (an*7*LIMIT_numerator>1) < (LIMIT_numerator/7*9) * (bn>>1)) + { p = 9; q = 7; } + else if (an * 10 < 33 * (bn>>1)) /* (an*3*LIMIT_numerator= p * bn ? (an - 1) / (size_t) p : (bn - 1) / (size_t) q); + p--; q--; + + s = an - p * n; + t = bn - q * n; + + if(half) { /* Recover from badly chosen splitting */ + if (s<1) {p--; s+=n; half=0;} + else if (t<1) {q--; t+=n; half=0;} + } + } +#undef LIMIT_numerator +#undef LIMIT_denominat + + ASSERT (0 < s && s <= n); + ASSERT (0 < t && t <= n); + ASSERT (half || s + t > 3); + ASSERT (n > 2); + +#define r6 (pp + 3 * n) /* 3n+1 */ +#define r4 (pp + 7 * n) /* 3n+1 */ +#define r2 (pp +11 * n) /* 3n+1 */ +#define r0 (pp +15 * n) /* s+t <= 2*n */ +#define r7 (scratch) /* 3n+1 */ +#define r5 (scratch + 3 * n + 1) /* 3n+1 */ +#define r3 (scratch + 6 * n + 2) /* 3n+1 */ +#define r1 (scratch + 9 * n + 3) /* 3n+1 */ +#define v0 (pp +11 * n) /* n+1 */ +#define v1 (pp +12 * n+1) /* n+1 */ +#define v2 (pp +13 * n+2) /* n+1 */ +#define v3 (scratch +12 * n + 4) /* n+1 */ +#define wsi (scratch +12 * n + 4) /* 3n+1 */ +#define wse (scratch +13 * n + 5) /* 2n+1 */ + + /* Alloc also 3n+1 limbs for wsi... toom_interpolate_16pts may + need all of them */ +/* if (scratch == NULL) */ +/* scratch = TMP_SALLOC_LIMBS(mpn_toom8_sqr_itch(n * 8)); */ + ASSERT (15 * n + 6 <= mpn_toom8h_mul_itch (an, bn)); + ASSERT (15 * n + 6 <= mpn_toom8_sqr_itch (n * 8)); + + /********************** evaluation and recursive calls *********************/ + + /* $\pm1/8$ */ + sign = mpn_toom_eval_pm2rexp (v2, v0, p, ap, n, s, 3, pp) ^ + mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 3, pp); + TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/8)*B(-1/8)*8^. */ + TOOM8H_MUL_N_REC(r7, v2, v3, n + 1, wse); /* A(+1/8)*B(+1/8)*8^. */ + mpn_toom_couple_handling (r7, 2 * n + 1 + BIT_CORRECTION, pp, sign, n, 3*(1+half), 3*(half)); + + /* $\pm1/4$ */ + sign = mpn_toom_eval_pm2rexp (v2, v0, p, ap, n, s, 2, pp) ^ + mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 2, pp); + TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/4)*B(-1/4)*4^. */ + TOOM8H_MUL_N_REC(r5, v2, v3, n + 1, wse); /* A(+1/4)*B(+1/4)*4^. */ + mpn_toom_couple_handling (r5, 2 * n + 1, pp, sign, n, 2*(1+half), 2*(half)); + + /* $\pm2$ */ + sign = mpn_toom_eval_pm2 (v2, v0, p, ap, n, s, pp) ^ + mpn_toom_eval_pm2 (v3, v1, q, bp, n, t, pp); + TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-2)*B(-2) */ + TOOM8H_MUL_N_REC(r3, v2, v3, n + 1, wse); /* A(+2)*B(+2) */ + mpn_toom_couple_handling (r3, 2 * n + 1, pp, sign, n, 1, 2); + + /* $\pm8$ */ + sign = mpn_toom_eval_pm2exp (v2, v0, p, ap, n, s, 3, pp) ^ + mpn_toom_eval_pm2exp (v3, v1, q, bp, n, t, 3, pp); + TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-8)*B(-8) */ + TOOM8H_MUL_N_REC(r1, v2, v3, n + 1, wse); /* A(+8)*B(+8) */ + mpn_toom_couple_handling (r1, 2 * n + 1 + BIT_CORRECTION, pp, sign, n, 3, 6); + + /* $\pm1/2$ */ + sign = mpn_toom_eval_pm2rexp (v2, v0, p, ap, n, s, 1, pp) ^ + mpn_toom_eval_pm2rexp (v3, v1, q, bp, n, t, 1, pp); + TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1/2)*B(-1/2)*2^. */ + TOOM8H_MUL_N_REC(r6, v2, v3, n + 1, wse); /* A(+1/2)*B(+1/2)*2^. */ + mpn_toom_couple_handling (r6, 2 * n + 1, pp, sign, n, 1+half, half); + + /* $\pm1$ */ + sign = mpn_toom_eval_pm1 (v2, v0, p, ap, n, s, pp); + if (q == 3) + sign ^= mpn_toom_eval_dgr3_pm1 (v3, v1, bp, n, t, pp); + else + sign ^= mpn_toom_eval_pm1 (v3, v1, q, bp, n, t, pp); + TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-1)*B(-1) */ + TOOM8H_MUL_N_REC(r4, v2, v3, n + 1, wse); /* A(1)*B(1) */ + mpn_toom_couple_handling (r4, 2 * n + 1, pp, sign, n, 0, 0); + + /* $\pm4$ */ + sign = mpn_toom_eval_pm2exp (v2, v0, p, ap, n, s, 2, pp) ^ + mpn_toom_eval_pm2exp (v3, v1, q, bp, n, t, 2, pp); + TOOM8H_MUL_N_REC(pp, v0, v1, n + 1, wse); /* A(-4)*B(-4) */ + TOOM8H_MUL_N_REC(r2, v2, v3, n + 1, wse); /* A(+4)*B(+4) */ + mpn_toom_couple_handling (r2, 2 * n + 1, pp, sign, n, 2, 4); + +#undef v0 +#undef v1 +#undef v2 +#undef v3 +#undef wse + + /* A(0)*B(0) */ + TOOM8H_MUL_N_REC(pp, ap, bp, n, wsi); + + /* Infinity */ + if( half != 0) { + if(s>t) { + TOOM8H_MUL_REC(r0, ap + p * n, s, bp + q * n, t, wsi); + } else { + TOOM8H_MUL_REC(r0, bp + q * n, t, ap + p * n, s, wsi); + }; + }; + + mpn_toom_interpolate_16pts (pp, r1, r3, r5, r7, n, s+t, half, wsi); + +#undef r0 +#undef r1 +#undef r2 +#undef r3 +#undef r4 +#undef r5 +#undef r6 +#undef wsi +} + +#undef TOOM8H_MUL_N_REC +#undef TOOM8H_MUL_REC +#undef MAYBE_mul_basecase +#undef MAYBE_mul_toom22 +#undef MAYBE_mul_toom33 +#undef MAYBE_mul_toom44 +#undef MAYBE_mul_toom8h diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom8_sqr.c gmp-5.0.2+dfsg/mpn/generic/toom8_sqr.c --- gmp-4.3.2+dfsg/mpn/generic/toom8_sqr.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom8_sqr.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,208 @@ +/* Implementation of the squaring algorithm with Toom-Cook 8.5-way. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +#if GMP_NUMB_BITS < 29 +#error Not implemented. +#endif + +#if GMP_NUMB_BITS < 43 +#define BIT_CORRECTION 1 +#define CORRECTION_BITS GMP_NUMB_BITS +#else +#define BIT_CORRECTION 0 +#define CORRECTION_BITS 0 +#endif + +#ifndef SQR_TOOM8_THRESHOLD +#define SQR_TOOM8_THRESHOLD MUL_TOOM8H_THRESHOLD +#endif + +#ifndef SQR_TOOM6_THRESHOLD +#define SQR_TOOM6_THRESHOLD MUL_TOOM6H_THRESHOLD +#endif + +#if TUNE_PROGRAM_BUILD +#define MAYBE_sqr_basecase 1 +#define MAYBE_sqr_above_basecase 1 +#define MAYBE_sqr_toom2 1 +#define MAYBE_sqr_above_toom2 1 +#define MAYBE_sqr_toom3 1 +#define MAYBE_sqr_above_toom3 1 +#define MAYBE_sqr_toom4 1 +#define MAYBE_sqr_above_toom4 1 +#define MAYBE_sqr_above_toom6 1 +#else +#define SQR_TOOM8_MAX \ + ((SQR_FFT_THRESHOLD <= MP_SIZE_T_MAX - (8*2-1+7)) ? \ + ((SQR_FFT_THRESHOLD+8*2-1+7)/8) \ + : MP_SIZE_T_MAX ) +#define MAYBE_sqr_basecase \ + (SQR_TOOM8_THRESHOLD < 8 * SQR_TOOM2_THRESHOLD) +#define MAYBE_sqr_above_basecase \ + (SQR_TOOM8_MAX >= SQR_TOOM2_THRESHOLD) +#define MAYBE_sqr_toom2 \ + (SQR_TOOM8_THRESHOLD < 8 * SQR_TOOM3_THRESHOLD) +#define MAYBE_sqr_above_toom2 \ + (SQR_TOOM8_MAX >= SQR_TOOM3_THRESHOLD) +#define MAYBE_sqr_toom3 \ + (SQR_TOOM8_THRESHOLD < 8 * SQR_TOOM4_THRESHOLD) +#define MAYBE_sqr_above_toom3 \ + (SQR_TOOM8_MAX >= SQR_TOOM4_THRESHOLD) +#define MAYBE_sqr_toom4 \ + (SQR_TOOM8_THRESHOLD < 8 * SQR_TOOM6_THRESHOLD) +#define MAYBE_sqr_above_toom4 \ + (SQR_TOOM8_MAX >= SQR_TOOM6_THRESHOLD) +#define MAYBE_sqr_above_toom6 \ + (SQR_TOOM8_MAX >= SQR_TOOM8_THRESHOLD) +#endif + +#define TOOM8_SQR_REC(p, a, n, ws) \ + do { \ + if (MAYBE_sqr_basecase && ( !MAYBE_sqr_above_basecase \ + || BELOW_THRESHOLD (n, SQR_TOOM2_THRESHOLD))) \ + mpn_sqr_basecase (p, a, n); \ + else if (MAYBE_sqr_toom2 && ( !MAYBE_sqr_above_toom2 \ + || BELOW_THRESHOLD (n, SQR_TOOM3_THRESHOLD))) \ + mpn_toom2_sqr (p, a, n, ws); \ + else if (MAYBE_sqr_toom3 && ( !MAYBE_sqr_above_toom3 \ + || BELOW_THRESHOLD (n, SQR_TOOM4_THRESHOLD))) \ + mpn_toom3_sqr (p, a, n, ws); \ + else if (MAYBE_sqr_toom4 && ( !MAYBE_sqr_above_toom4 \ + || BELOW_THRESHOLD (n, SQR_TOOM6_THRESHOLD))) \ + mpn_toom4_sqr (p, a, n, ws); \ + else if (! MAYBE_sqr_above_toom6 \ + || BELOW_THRESHOLD (n, SQR_TOOM8_THRESHOLD)) \ + mpn_toom6_sqr (p, a, n, ws); \ + else \ + mpn_toom8_sqr (p, a, n, ws); \ + } while (0) + +void +mpn_toom8_sqr (mp_ptr pp, mp_srcptr ap, mp_size_t an, mp_ptr scratch) +{ + mp_size_t n, s; + + /***************************** decomposition *******************************/ + + ASSERT ( an >= 40 ); + + n = 1 + ((an - 1)>>3); + + s = an - 7 * n; + + ASSERT (0 < s && s <= n); + ASSERT ( s + s > 3 ); + +#define r6 (pp + 3 * n) /* 3n+1 */ +#define r4 (pp + 7 * n) /* 3n+1 */ +#define r2 (pp +11 * n) /* 3n+1 */ +#define r0 (pp +15 * n) /* s+t <= 2*n */ +#define r7 (scratch) /* 3n+1 */ +#define r5 (scratch + 3 * n + 1) /* 3n+1 */ +#define r3 (scratch + 6 * n + 2) /* 3n+1 */ +#define r1 (scratch + 9 * n + 3) /* 3n+1 */ +#define v0 (pp +11 * n) /* n+1 */ +#define v2 (pp +13 * n+2) /* n+1 */ +#define wse (scratch +12 * n + 4) /* 3n+1 */ + + /* Alloc also 3n+1 limbs for ws... toom_interpolate_16pts may + need all of them, when DO_mpn_sublsh_n usea a scratch */ +/* if (scratch == NULL) */ +/* scratch = TMP_SALLOC_LIMBS (30 * n + 6); */ + + /********************** evaluation and recursive calls *********************/ + /* $\pm1/8$ */ + mpn_toom_eval_pm2rexp (v2, v0, 7, ap, n, s, 3, pp); + TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-1/8)*B(-1/8)*8^. */ + TOOM8_SQR_REC(r7, v2, n + 1, wse); /* A(+1/8)*B(+1/8)*8^. */ + mpn_toom_couple_handling (r7, 2 * n + 1 + BIT_CORRECTION, pp, 0, n, 3, 0); + + /* $\pm1/4$ */ + mpn_toom_eval_pm2rexp (v2, v0, 7, ap, n, s, 2, pp); + TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-1/4)*B(-1/4)*4^. */ + TOOM8_SQR_REC(r5, v2, n + 1, wse); /* A(+1/4)*B(+1/4)*4^. */ + mpn_toom_couple_handling (r5, 2 * n + 1, pp, 0, n, 2, 0); + + /* $\pm2$ */ + mpn_toom_eval_pm2 (v2, v0, 7, ap, n, s, pp); + TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-2)*B(-2) */ + TOOM8_SQR_REC(r3, v2, n + 1, wse); /* A(+2)*B(+2) */ + mpn_toom_couple_handling (r3, 2 * n + 1, pp, 0, n, 1, 2); + + /* $\pm8$ */ + mpn_toom_eval_pm2exp (v2, v0, 7, ap, n, s, 3, pp); + TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-8)*B(-8) */ + TOOM8_SQR_REC(r1, v2, n + 1, wse); /* A(+8)*B(+8) */ + mpn_toom_couple_handling (r1, 2 * n + 1 + BIT_CORRECTION, pp, 0, n, 3, 6); + + /* $\pm1/2$ */ + mpn_toom_eval_pm2rexp (v2, v0, 7, ap, n, s, 1, pp); + TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-1/2)*B(-1/2)*2^. */ + TOOM8_SQR_REC(r6, v2, n + 1, wse); /* A(+1/2)*B(+1/2)*2^. */ + mpn_toom_couple_handling (r6, 2 * n + 1, pp, 0, n, 1, 0); + + /* $\pm1$ */ + mpn_toom_eval_pm1 (v2, v0, 7, ap, n, s, pp); + TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-1)*B(-1) */ + TOOM8_SQR_REC(r4, v2, n + 1, wse); /* A(1)*B(1) */ + mpn_toom_couple_handling (r4, 2 * n + 1, pp, 0, n, 0, 0); + + /* $\pm4$ */ + mpn_toom_eval_pm2exp (v2, v0, 7, ap, n, s, 2, pp); + TOOM8_SQR_REC(pp, v0, n + 1, wse); /* A(-4)*B(-4) */ + TOOM8_SQR_REC(r2, v2, n + 1, wse); /* A(+4)*B(+4) */ + mpn_toom_couple_handling (r2, 2 * n + 1, pp, 0, n, 2, 4); + +#undef v0 +#undef v2 + + /* A(0)*B(0) */ + TOOM8_SQR_REC(pp, ap, n, wse); + + mpn_toom_interpolate_16pts (pp, r1, r3, r5, r7, n, 2 * s, 0, wse); + +#undef r0 +#undef r1 +#undef r2 +#undef r3 +#undef r4 +#undef r5 +#undef r6 +#undef wse + +} + +#undef TOOM8_SQR_REC +#undef MAYBE_sqr_basecase +#undef MAYBE_sqr_above_basecase +#undef MAYBE_sqr_toom2 +#undef MAYBE_sqr_above_toom2 +#undef MAYBE_sqr_toom3 +#undef MAYBE_sqr_above_toom3 +#undef MAYBE_sqr_above_toom4 diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_couple_handling.c gmp-5.0.2+dfsg/mpn/generic/toom_couple_handling.c --- gmp-4.3.2+dfsg/mpn/generic/toom_couple_handling.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_couple_handling.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,70 @@ +/* Helper function for high degree Toom-Cook algorithms. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +/* Gets {pp,n} and (sign?-1:1)*{np,n}. Computes at once: + {pp,n} <- ({pp,n}+{np,n})/2^{ps+1} + {pn,n} <- ({pp,n}-{np,n})/2^{ns+1} + Finally recompose them obtaining: + {pp,n+off} <- {pp,n}+{np,n}*2^{off*GMP_NUMB_BITS} +*/ +void +mpn_toom_couple_handling (mp_ptr pp, mp_size_t n, mp_ptr np, + int nsign, mp_size_t off, int ps, int ns) +{ + if (nsign) { +#ifdef HAVE_NATIVE_mpn_rsh1sub_n + mpn_rsh1sub_n (np, pp, np, n); +#else + mpn_sub_n (np, pp, np, n); + mpn_rshift (np, np, n, 1); +#endif + } else { +#ifdef HAVE_NATIVE_mpn_rsh1add_n + mpn_rsh1add_n (np, pp, np, n); +#else + mpn_add_n (np, pp, np, n); + mpn_rshift (np, np, n, 1); +#endif + } + +#ifdef HAVE_NATIVE_mpn_rsh1sub_n + if (ps == 1) + mpn_rsh1sub_n (pp, pp, np, n); + else +#endif + { + mpn_sub_n (pp, pp, np, n); + if (ps > 0) + mpn_rshift (pp, pp, n, ps); + } + if (ns > 0) + mpn_rshift (np, np, n, ns); + pp[n] = mpn_add_n (pp+off, pp+off, np, n-off); + ASSERT_NOCARRY (mpn_add_1(pp+n, np+n-off, off, pp[n]) ); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_eval_dgr3_pm1.c gmp-5.0.2+dfsg/mpn/generic/toom_eval_dgr3_pm1.c --- gmp-4.3.2+dfsg/mpn/generic/toom_eval_dgr3_pm1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_eval_dgr3_pm1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,62 @@ +/* mpn_toom_eval_dgr3_pm1 -- Evaluate a degree 3 polynomial in +1 and -1 + + Contributed to the GNU project by Niels Möller + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +int +mpn_toom_eval_dgr3_pm1 (mp_ptr xp1, mp_ptr xm1, + mp_srcptr xp, mp_size_t n, mp_size_t x3n, mp_ptr tp) +{ + int neg; + + ASSERT (x3n > 0); + ASSERT (x3n <= n); + + xp1[n] = mpn_add_n (xp1, xp, xp + 2*n, n); + tp[n] = mpn_add (tp, xp + n, n, xp + 3*n, x3n); + + neg = (mpn_cmp (xp1, tp, n + 1) < 0) ? ~0 : 0; + +#if HAVE_NATIVE_mpn_add_n_sub_n + if (neg) + mpn_add_n_sub_n (xp1, xm1, tp, xp1, n + 1); + else + mpn_add_n_sub_n (xp1, xm1, xp1, tp, n + 1); +#else + if (neg) + mpn_sub_n (xm1, tp, xp1, n + 1); + else + mpn_sub_n (xm1, xp1, tp, n + 1); + + mpn_add_n (xp1, xp1, tp, n + 1); +#endif + + ASSERT (xp1[n] <= 3); + ASSERT (xm1[n] <= 1); + + return neg; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_eval_dgr3_pm2.c gmp-5.0.2+dfsg/mpn/generic/toom_eval_dgr3_pm2.c --- gmp-4.3.2+dfsg/mpn/generic/toom_eval_dgr3_pm2.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_eval_dgr3_pm2.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,87 @@ +/* mpn_toom_eval_dgr3_pm2 -- Evaluate a degree 3 polynomial in +2 and -2 + + Contributed to the GNU project by Niels Möller + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +/* Needs n+1 limbs of temporary storage. */ +int +mpn_toom_eval_dgr3_pm2 (mp_ptr xp2, mp_ptr xm2, + mp_srcptr xp, mp_size_t n, mp_size_t x3n, mp_ptr tp) +{ + mp_limb_t cy; + int neg; + + ASSERT (x3n > 0); + ASSERT (x3n <= n); + + /* (x0 + 4 * x2) +/- (2 x1 + 8 x_3) */ +#if HAVE_NATIVE_mpn_addlsh_n || HAVE_NATIVE_mpn_addlsh2_n +#if HAVE_NATIVE_mpn_addlsh2_n + xp2[n] = mpn_addlsh2_n (xp2, xp, xp + 2*n, n); + + cy = mpn_addlsh2_n (tp, xp + n, xp + 3*n, x3n); +#else /* HAVE_NATIVE_mpn_addlsh_n */ + xp2[n] = mpn_addlsh_n (xp2, xp, xp + 2*n, n, 2); + + cy = mpn_addlsh_n (tp, xp + n, xp + 3*n, x3n, 2); +#endif + if (x3n < n) + cy = mpn_add_1 (tp + x3n, xp + n + x3n, n - x3n, cy); + tp[n] = cy; +#else + cy = mpn_lshift (tp, xp + 2*n, n, 2); + xp2[n] = cy + mpn_add_n (xp2, tp, xp, n); + + tp[x3n] = mpn_lshift (tp, xp + 3*n, x3n, 2); + if (x3n < n) + tp[n] = mpn_add (tp, xp + n, n, tp, x3n + 1); + else + tp[n] += mpn_add_n (tp, xp + n, tp, n); +#endif + mpn_lshift (tp, tp, n+1, 1); + + neg = (mpn_cmp (xp2, tp, n + 1) < 0) ? ~0 : 0; + +#if HAVE_NATIVE_mpn_add_n_sub_n + if (neg) + mpn_add_n_sub_n (xp2, xm2, tp, xp2, n + 1); + else + mpn_add_n_sub_n (xp2, xm2, xp2, tp, n + 1); +#else + if (neg) + mpn_sub_n (xm2, tp, xp2, n + 1); + else + mpn_sub_n (xm2, xp2, tp, n + 1); + + mpn_add_n (xp2, xp2, tp, n + 1); +#endif + + ASSERT (xp2[n] < 15); + ASSERT (xm2[n] < 10); + + return neg; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_eval_pm1.c gmp-5.0.2+dfsg/mpn/generic/toom_eval_pm1.c --- gmp-4.3.2+dfsg/mpn/generic/toom_eval_pm1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_eval_pm1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,79 @@ +/* mpn_toom_eval_pm1 -- Evaluate a polynomial in +1 and -1 + + Contributed to the GNU project by Niels Möller + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +/* Evaluates a polynomial of degree k > 3, in the points +1 and -1. */ +int +mpn_toom_eval_pm1 (mp_ptr xp1, mp_ptr xm1, unsigned k, + mp_srcptr xp, mp_size_t n, mp_size_t hn, mp_ptr tp) +{ + unsigned i; + int neg; + + ASSERT (k >= 4); + + ASSERT (hn > 0); + ASSERT (hn <= n); + + /* The degree k is also the number of full-size coefficients, so + * that last coefficient, of size hn, starts at xp + k*n. */ + + xp1[n] = mpn_add_n (xp1, xp, xp + 2*n, n); + for (i = 4; i < k; i += 2) + ASSERT_NOCARRY (mpn_add (xp1, xp1, n+1, xp+i*n, n)); + + tp[n] = mpn_add_n (tp, xp + n, xp + 3*n, n); + for (i = 5; i < k; i += 2) + ASSERT_NOCARRY (mpn_add (tp, tp, n+1, xp+i*n, n)); + + if (k & 1) + ASSERT_NOCARRY (mpn_add (tp, tp, n+1, xp+k*n, hn)); + else + ASSERT_NOCARRY (mpn_add (xp1, xp1, n+1, xp+k*n, hn)); + + neg = (mpn_cmp (xp1, tp, n + 1) < 0) ? ~0 : 0; + +#if HAVE_NATIVE_mpn_add_n_sub_n + if (neg) + mpn_add_n_sub_n (xp1, xm1, tp, xp1, n + 1); + else + mpn_add_n_sub_n (xp1, xm1, xp1, tp, n + 1); +#else + if (neg) + mpn_sub_n (xm1, tp, xp1, n + 1); + else + mpn_sub_n (xm1, xp1, tp, n + 1); + + mpn_add_n (xp1, xp1, tp, n + 1); +#endif + + ASSERT (xp1[n] <= k); + ASSERT (xm1[n] <= k/2 + 1); + + return neg; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_eval_pm2.c gmp-5.0.2+dfsg/mpn/generic/toom_eval_pm2.c --- gmp-4.3.2+dfsg/mpn/generic/toom_eval_pm2.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_eval_pm2.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,120 @@ +/* mpn_toom_eval_pm2 -- Evaluate a polynomial in +2 and -2 + + Contributed to the GNU project by Niels Möller and Marco Bodrato + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +/* DO_addlsh2(d,a,b,n,cy) computes cy,{d,n} <- {a,n} + 4*(cy,{b,n}), it + can be used as DO_addlsh2(d,a,d,n,d[n]), for accumulation on {d,n+1}. */ +#if HAVE_NATIVE_mpn_addlsh2_n +#define DO_addlsh2(d, a, b, n, cy) \ +do { \ + (cy) <<= 2; \ + (cy) += mpn_addlsh2_n(d, a, b, n); \ +} while (0) +#else +#if HAVE_NATIVE_mpn_addlsh_n +#define DO_addlsh2(d, a, b, n, cy) \ +do { \ + (cy) <<= 2; \ + (cy) += mpn_addlsh_n(d, a, b, n, 2); \ +} while (0) +#else +/* The following is not a general substitute for addlsh2. + It is correct if d == b, but it is not if d == a. */ +#define DO_addlsh2(d, a, b, n, cy) \ +do { \ + (cy) <<= 2; \ + (cy) += mpn_lshift(d, b, n, 2); \ + (cy) += mpn_add_n(d, d, a, n); \ +} while (0) +#endif +#endif + +/* Evaluates a polynomial of degree 2 < k < GMP_NUMB_BITS, in the + points +2 and -2. */ +int +mpn_toom_eval_pm2 (mp_ptr xp2, mp_ptr xm2, unsigned k, + mp_srcptr xp, mp_size_t n, mp_size_t hn, mp_ptr tp) +{ + int i; + int neg; + mp_limb_t cy; + + ASSERT (k >= 3); + ASSERT (k < GMP_NUMB_BITS); + + ASSERT (hn > 0); + ASSERT (hn <= n); + + /* The degree k is also the number of full-size coefficients, so + * that last coefficient, of size hn, starts at xp + k*n. */ + + cy = 0; + DO_addlsh2 (xp2, xp + (k-2) * n, xp + k * n, hn, cy); + if (hn != n) + cy = mpn_add_1 (xp2 + hn, xp + (k-2) * n + hn, n - hn, cy); + for (i = k - 4; i >= 0; i -= 2) + DO_addlsh2 (xp2, xp + i * n, xp2, n, cy); + xp2[n] = cy; + + k--; + + cy = 0; + DO_addlsh2 (tp, xp + (k-2) * n, xp + k * n, n, cy); + for (i = k - 4; i >= 0; i -= 2) + DO_addlsh2 (tp, xp + i * n, tp, n, cy); + tp[n] = cy; + + if (k & 1) + ASSERT_NOCARRY(mpn_lshift (tp , tp , n + 1, 1)); + else + ASSERT_NOCARRY(mpn_lshift (xp2, xp2, n + 1, 1)); + + neg = (mpn_cmp (xp2, tp, n + 1) < 0) ? ~0 : 0; + +#if HAVE_NATIVE_mpn_add_n_sub_n + if (neg) + mpn_add_n_sub_n (xp2, xm2, tp, xp2, n + 1); + else + mpn_add_n_sub_n (xp2, xm2, xp2, tp, n + 1); +#else /* !HAVE_NATIVE_mpn_add_n_sub_n */ + if (neg) + mpn_sub_n (xm2, tp, xp2, n + 1); + else + mpn_sub_n (xm2, xp2, tp, n + 1); + + mpn_add_n (xp2, xp2, tp, n + 1); +#endif /* !HAVE_NATIVE_mpn_add_n_sub_n */ + + ASSERT (xp2[n] < (1<<(k+2))-1); + ASSERT (xm2[n] < ((1<<(k+3))-1 - (1^k&1))/3); + + neg ^= ((k & 1) - 1); + + return neg; +} + +#undef DO_addlsh2 diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_eval_pm2exp.c gmp-5.0.2+dfsg/mpn/generic/toom_eval_pm2exp.c --- gmp-4.3.2+dfsg/mpn/generic/toom_eval_pm2exp.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_eval_pm2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,117 @@ +/* mpn_toom_eval_pm2exp -- Evaluate a polynomial in +2^k and -2^k + + Contributed to the GNU project by Niels Möller + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +/* Evaluates a polynomial of degree k > 2, in the points +2^shift and -2^shift. */ +int +mpn_toom_eval_pm2exp (mp_ptr xp2, mp_ptr xm2, unsigned k, + mp_srcptr xp, mp_size_t n, mp_size_t hn, unsigned shift, + mp_ptr tp) +{ + unsigned i; + int neg; +#if HAVE_NATIVE_mpn_addlsh_n + mp_limb_t cy; +#endif + + ASSERT (k >= 3); + ASSERT (shift*k < GMP_NUMB_BITS); + + ASSERT (hn > 0); + ASSERT (hn <= n); + + /* The degree k is also the number of full-size coefficients, so + * that last coefficient, of size hn, starts at xp + k*n. */ + +#if HAVE_NATIVE_mpn_addlsh_n + xp2[n] = mpn_addlsh_n (xp2, xp, xp + 2*n, n, 2*shift); + for (i = 4; i < k; i += 2) + xp2[n] += mpn_addlsh_n (xp2, xp2, xp + i*n, n, i*shift); + + tp[n] = mpn_lshift (tp, xp+n, n, shift); + for (i = 3; i < k; i+= 2) + tp[n] += mpn_addlsh_n (tp, tp, xp+i*n, n, i*shift); + + if (k & 1) + { + cy = mpn_addlsh_n (tp, tp, xp+k*n, hn, k*shift); + MPN_INCR_U (tp + hn, n+1 - hn, cy); + } + else + { + cy = mpn_addlsh_n (xp2, xp2, xp+k*n, hn, k*shift); + MPN_INCR_U (xp2 + hn, n+1 - hn, cy); + } + +#else /* !HAVE_NATIVE_mpn_addlsh_n */ + xp2[n] = mpn_lshift (tp, xp+2*n, n, 2*shift); + xp2[n] += mpn_add_n (xp2, xp, tp, n); + for (i = 4; i < k; i += 2) + { + xp2[n] += mpn_lshift (tp, xp + i*n, n, i*shift); + xp2[n] += mpn_add_n (xp2, xp2, tp, n); + } + + tp[n] = mpn_lshift (tp, xp+n, n, shift); + for (i = 3; i < k; i+= 2) + { + tp[n] += mpn_lshift (xm2, xp + i*n, n, i*shift); + tp[n] += mpn_add_n (tp, tp, xm2, n); + } + + xm2[hn] = mpn_lshift (xm2, xp + k*n, hn, k*shift); + if (k & 1) + mpn_add (tp, tp, n+1, xm2, hn+1); + else + mpn_add (xp2, xp2, n+1, xm2, hn+1); +#endif /* !HAVE_NATIVE_mpn_addlsh_n */ + + neg = (mpn_cmp (xp2, tp, n + 1) < 0) ? ~0 : 0; + +#if HAVE_NATIVE_mpn_add_n_sub_n + if (neg) + mpn_add_n_sub_n (xp2, xm2, tp, xp2, n + 1); + else + mpn_add_n_sub_n (xp2, xm2, xp2, tp, n + 1); +#else /* !HAVE_NATIVE_mpn_add_n_sub_n */ + if (neg) + mpn_sub_n (xm2, tp, xp2, n + 1); + else + mpn_sub_n (xm2, xp2, tp, n + 1); + + mpn_add_n (xp2, xp2, tp, n + 1); +#endif /* !HAVE_NATIVE_mpn_add_n_sub_n */ + + /* FIXME: the following asserts are useless if (k+1)*shift >= GMP_LIMB_BITS */ + ASSERT ((k+1)*shift >= GMP_LIMB_BITS || + xp2[n] < ((CNST_LIMB(1)<<((k+1)*shift))-1)/((CNST_LIMB(1)<= GMP_LIMB_BITS || + xm2[n] < ((CNST_LIMB(1)<<((k+2)*shift))-((k&1)?(CNST_LIMB(1)<= 3. */ +int +mpn_toom_eval_pm2rexp (mp_ptr rp, mp_ptr rm, + unsigned int q, mp_srcptr ap, mp_size_t n, mp_size_t t, + unsigned int s, mp_ptr ws) +{ + unsigned int i; + int neg; + /* {ap,q*n+t} -> {rp,n+1} {rm,n+1} , with {ws, n+1}*/ + ASSERT (n >= t); + ASSERT (s != 0); /* or _eval_pm1 should be used */ + ASSERT (q > 1); + ASSERT (s*q < GMP_NUMB_BITS); + rp[n] = mpn_lshift(rp, ap, n, s*q); + ws[n] = mpn_lshift(ws, ap+n, n, s*(q-1)); + if( (q & 1) != 0) { + ASSERT_NOCARRY(mpn_add(ws,ws,n+1,ap+n*q,t)); + rp[n] += DO_mpn_addlsh_n(rp, ap+n*(q-1), n, s, rm); + } else { + ASSERT_NOCARRY(mpn_add(rp,rp,n+1,ap+n*q,t)); + } + for(i=2; i> s); \ + __cy = DO_mpn_sublsh_n (dst, src + 1, ns - 1, GMP_NUMB_BITS - s, ws); \ + MPN_DECR_U (dst + ns - 1, nd - ns + 1, __cy); \ +} while (0) +#endif + + +#if GMP_NUMB_BITS < 21 +#error Not implemented: Both sublsh_n(,,,20) should be corrected. +#endif + +#if GMP_NUMB_BITS < 16 +#error Not implemented: divexact_by42525 needs splitting. +#endif + +#if GMP_NUMB_BITS < 12 +#error Not implemented: Hard to adapt... +#endif + +/* FIXME: tuneup should decide the best variant */ +#ifndef AORSMUL_FASTER_AORS_AORSLSH +#define AORSMUL_FASTER_AORS_AORSLSH 1 +#endif +#ifndef AORSMUL_FASTER_AORS_2AORSLSH +#define AORSMUL_FASTER_AORS_2AORSLSH 1 +#endif +#ifndef AORSMUL_FASTER_2AORSLSH +#define AORSMUL_FASTER_2AORSLSH 1 +#endif +#ifndef AORSMUL_FASTER_3AORSLSH +#define AORSMUL_FASTER_3AORSLSH 1 +#endif + +#define BINVERT_9 \ + ((((GMP_NUMB_MAX / 9) << (6 - GMP_NUMB_BITS % 6)) * 8 & GMP_NUMB_MAX) | 0x39) + +#define BINVERT_255 \ + (GMP_NUMB_MAX - ((GMP_NUMB_MAX / 255) << (8 - GMP_NUMB_BITS % 8))) + + /* FIXME: find some more general expressions for 2835^-1, 42525^-1 */ +#if GMP_LIMB_BITS == 32 +#define BINVERT_2835 (GMP_NUMB_MASK & CNST_LIMB(0x53E3771B)) +#define BINVERT_42525 (GMP_NUMB_MASK & CNST_LIMB(0x9F314C35)) +#else +#if GMP_LIMB_BITS == 64 +#define BINVERT_2835 (GMP_NUMB_MASK & CNST_LIMB(0x938CC70553E3771B)) +#define BINVERT_42525 (GMP_NUMB_MASK & CNST_LIMB(0xE7B40D449F314C35)) +#endif +#endif + +#ifndef mpn_divexact_by255 +#if GMP_NUMB_BITS % 8 == 0 +#define mpn_divexact_by255(dst,src,size) \ + (255 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 255))) +#else +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by255(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(255),BINVERT_255,0) +#else +#define mpn_divexact_by255(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(255)) +#endif +#endif +#endif + +#ifndef mpn_divexact_by9x4 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by9x4(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(9),BINVERT_9,2) +#else +#define mpn_divexact_by9x4(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(9)<<2) +#endif +#endif + +#ifndef mpn_divexact_by42525 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_42525) +#define mpn_divexact_by42525(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(42525),BINVERT_42525,0) +#else +#define mpn_divexact_by42525(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(42525)) +#endif +#endif + +#ifndef mpn_divexact_by2835x4 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_2835) +#define mpn_divexact_by2835x4(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(2835),BINVERT_2835,2) +#else +#define mpn_divexact_by2835x4(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(2835)<<2) +#endif +#endif + +/* Interpolation for Toom-6.5 (or Toom-6), using the evaluation + points: infinity(6.5 only), +-4, +-2, +-1, +-1/4, +-1/2, 0. More precisely, + we want to compute f(2^(GMP_NUMB_BITS * n)) for a polynomial f of + degree 11 (or 10), given the 12 (rsp. 11) values: + + r0 = limit at infinity of f(x) / x^7, + r1 = f(4),f(-4), + r2 = f(2),f(-2), + r3 = f(1),f(-1), + r4 = f(1/4),f(-1/4), + r5 = f(1/2),f(-1/2), + r6 = f(0). + + All couples of the form f(n),f(-n) must be already mixed with + toom_couple_handling(f(n),...,f(-n),...) + + The result is stored in {pp, spt + 7*n (or 6*n)}. + At entry, r6 is stored at {pp, 2n}, + r4 is stored at {pp + 3n, 3n + 1}. + r2 is stored at {pp + 7n, 3n + 1}. + r0 is stored at {pp +11n, spt}. + + The other values are 3n+1 limbs each (with most significant limbs small). + + Negative intermediate results are stored two-complemented. + Inputs are destroyed. +*/ + +void +mpn_toom_interpolate_12pts (mp_ptr pp, mp_ptr r1, mp_ptr r3, mp_ptr r5, + mp_size_t n, mp_size_t spt, int half, mp_ptr wsi) +{ + mp_limb_t cy; + mp_size_t n3; + mp_size_t n3p1; + n3 = 3 * n; + n3p1 = n3 + 1; + +#define r4 (pp + n3) /* 3n+1 */ +#define r2 (pp + 7 * n) /* 3n+1 */ +#define r0 (pp +11 * n) /* s+t <= 2*n */ + + /******************************* interpolation *****************************/ + if (half != 0) { + cy = mpn_sub_n (r3, r3, r0, spt); + MPN_DECR_U (r3 + spt, n3p1 - spt, cy); + + cy = DO_mpn_sublsh_n (r2, r0, spt, 10, wsi); + MPN_DECR_U (r2 + spt, n3p1 - spt, cy); + DO_mpn_subrsh(r5, n3p1, r0, spt, 2, wsi); + + cy = DO_mpn_sublsh_n (r1, r0, spt, 20, wsi); + MPN_DECR_U (r1 + spt, n3p1 - spt, cy); + DO_mpn_subrsh(r4, n3p1, r0, spt, 4, wsi); + }; + + r4[n3] -= DO_mpn_sublsh_n (r4 + n, pp, 2 * n, 20, wsi); + DO_mpn_subrsh(r1 + n, 2 * n + 1, pp, 2 * n, 4, wsi); + +#if HAVE_NATIVE_mpn_add_n_sub_n + mpn_add_n_sub_n (r1, r4, r4, r1, n3p1); +#else + ASSERT_NOCARRY(mpn_add_n (wsi, r1, r4, n3p1)); + mpn_sub_n (r4, r4, r1, n3p1); /* can be negative */ + MP_PTR_SWAP(r1, wsi); +#endif + + r5[n3] -= DO_mpn_sublsh_n (r5 + n, pp, 2 * n, 10, wsi); + DO_mpn_subrsh(r2 + n, 2 * n + 1, pp, 2 * n, 2, wsi); + +#if HAVE_NATIVE_mpn_add_n_sub_n + mpn_add_n_sub_n (r2, r5, r5, r2, n3p1); +#else + mpn_sub_n (wsi, r5, r2, n3p1); /* can be negative */ + ASSERT_NOCARRY(mpn_add_n (r2, r2, r5, n3p1)); + MP_PTR_SWAP(r5, wsi); +#endif + + r3[n3] -= mpn_sub_n (r3+n, r3+n, pp, 2 * n); + +#if AORSMUL_FASTER_AORS_AORSLSH + mpn_submul_1 (r4, r5, n3p1, 257); /* can be negative */ +#else + mpn_sub_n (r4, r4, r5, n3p1); /* can be negative */ + DO_mpn_sublsh_n (r4, r5, n3p1, 8, wsi); /* can be negative */ +#endif + /* A division by 2835x4 followsi. Warning: the operand can be negative! */ + mpn_divexact_by2835x4(r4, r4, n3p1); + if ((r4[n3] & (GMP_NUMB_MAX << (GMP_NUMB_BITS-3))) != 0) + r4[n3] |= (GMP_NUMB_MAX << (GMP_NUMB_BITS-2)); + +#if AORSMUL_FASTER_2AORSLSH + mpn_addmul_1 (r5, r4, n3p1, 60); /* can be negative */ +#else + DO_mpn_sublsh_n (r5, r4, n3p1, 2, wsi); /* can be negative */ + DO_mpn_addlsh_n (r5, r4, n3p1, 6, wsi); /* can give a carry */ +#endif + mpn_divexact_by255(r5, r5, n3p1); + + ASSERT_NOCARRY(DO_mpn_sublsh_n (r2, r3, n3p1, 5, wsi)); + +#if AORSMUL_FASTER_3AORSLSH + ASSERT_NOCARRY(mpn_submul_1 (r1, r2, n3p1, 100)); +#else + ASSERT_NOCARRY(DO_mpn_sublsh_n (r1, r2, n3p1, 6, wsi)); + ASSERT_NOCARRY(DO_mpn_sublsh_n (r1, r2, n3p1, 5, wsi)); + ASSERT_NOCARRY(DO_mpn_sublsh_n (r1, r2, n3p1, 2, wsi)); +#endif + ASSERT_NOCARRY(DO_mpn_sublsh_n (r1, r3, n3p1, 9, wsi)); + mpn_divexact_by42525(r1, r1, n3p1); + +#if AORSMUL_FASTER_AORS_2AORSLSH + ASSERT_NOCARRY(mpn_submul_1 (r2, r1, n3p1, 225)); +#else + ASSERT_NOCARRY(mpn_sub_n (r2, r2, r1, n3p1)); + ASSERT_NOCARRY(DO_mpn_addlsh_n (r2, r1, n3p1, 5, wsi)); + ASSERT_NOCARRY(DO_mpn_sublsh_n (r2, r1, n3p1, 8, wsi)); +#endif + mpn_divexact_by9x4(r2, r2, n3p1); + + ASSERT_NOCARRY(mpn_sub_n (r3, r3, r2, n3p1)); + + mpn_sub_n (r4, r2, r4, n3p1); + ASSERT_NOCARRY(mpn_rshift(r4, r4, n3p1, 1)); + ASSERT_NOCARRY(mpn_sub_n (r2, r2, r4, n3p1)); + + mpn_add_n (r5, r5, r1, n3p1); + ASSERT_NOCARRY(mpn_rshift(r5, r5, n3p1, 1)); + + /* last interpolation steps... */ + ASSERT_NOCARRY(mpn_sub_n (r3, r3, r1, n3p1)); + ASSERT_NOCARRY(mpn_sub_n (r1, r1, r5, n3p1)); + /* ... could be mixed with recomposition + ||H-r5|M-r5|L-r5| ||H-r1|M-r1|L-r1| + */ + + /***************************** recomposition *******************************/ + /* + pp[] prior to operations: + |M r0|L r0|___||H r2|M r2|L r2|___||H r4|M r4|L r4|____|H_r6|L r6|pp + + summation scheme for remaining operations: + |__12|n_11|n_10|n__9|n__8|n__7|n__6|n__5|n__4|n__3|n__2|n___|n___|pp + |M r0|L r0|___||H r2|M r2|L r2|___||H r4|M r4|L r4|____|H_r6|L r6|pp + ||H r1|M r1|L r1| ||H r3|M r3|L r3| ||H_r5|M_r5|L_r5| + */ + + cy = mpn_add_n (pp + n, pp + n, r5, n); + cy = mpn_add_1 (pp + 2 * n, r5 + n, n, cy); +#if HAVE_NATIVE_mpn_add_nc + cy = r5[n3] + mpn_add_nc(pp + n3, pp + n3, r5 + 2 * n, n, cy); +#else + MPN_INCR_U (r5 + 2 * n, n + 1, cy); + cy = r5[n3] + mpn_add_n (pp + n3, pp + n3, r5 + 2 * n, n); +#endif + MPN_INCR_U (pp + n3 + n, 2 * n + 1, cy); + + pp[2 * n3]+= mpn_add_n (pp + 5 * n, pp + 5 * n, r3, n); + cy = mpn_add_1 (pp + 2 * n3, r3 + n, n, pp[2 * n3]); +#if HAVE_NATIVE_mpn_add_nc + cy = r3[n3] + mpn_add_nc(pp + 7 * n, pp + 7 * n, r3 + 2 * n, n, cy); +#else + MPN_INCR_U (r3 + 2 * n, n + 1, cy); + cy = r3[n3] + mpn_add_n (pp + 7 * n, pp + 7 * n, r3 + 2 * n, n); +#endif + MPN_INCR_U (pp + 8 * n, 2 * n + 1, cy); + + pp[10*n]+=mpn_add_n (pp + 9 * n, pp + 9 * n, r1, n); + if (half) { + cy = mpn_add_1 (pp + 10 * n, r1 + n, n, pp[10 * n]); +#if HAVE_NATIVE_mpn_add_nc + if (LIKELY (spt > n)) { + cy = r1[n3] + mpn_add_nc(pp + 11 * n, pp + 11 * n, r1 + 2 * n, n, cy); + MPN_INCR_U (pp + 4 * n3, spt - n, cy); + } else { + ASSERT_NOCARRY(mpn_add_nc(pp + 11 * n, pp + 11 * n, r1 + 2 * n, spt, cy)); + } +#else + MPN_INCR_U (r1 + 2 * n, n + 1, cy); + if (LIKELY (spt > n)) { + cy = r1[n3] + mpn_add_n (pp + 11 * n, pp + 11 * n, r1 + 2 * n, n); + MPN_INCR_U (pp + 4 * n3, spt - n, cy); + } else { + ASSERT_NOCARRY(mpn_add_n (pp + 11 * n, pp + 11 * n, r1 + 2 * n, spt)); + } +#endif + } else { + ASSERT_NOCARRY(mpn_add_1 (pp + 10 * n, r1 + n, spt, pp[10 * n])); + } + +#undef r0 +#undef r2 +#undef r4 +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_16pts.c gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_16pts.c --- gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_16pts.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_16pts.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,512 @@ +/* Interpolaton for the algorithm Toom-Cook 8.5-way. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + +#if GMP_NUMB_BITS < 29 +#error Not implemented: Both sublsh_n(,,,28) should be corrected; r2 and r5 need one more LIMB. +#endif + +#if GMP_NUMB_BITS < 28 +#error Not implemented: divexact_by188513325 and _by182712915 will not work. +#endif + + +#if HAVE_NATIVE_mpn_sublsh_n +#define DO_mpn_sublsh_n(dst,src,n,s,ws) mpn_sublsh_n(dst,dst,src,n,s) +#else +static mp_limb_t +DO_mpn_sublsh_n(mp_ptr dst, mp_srcptr src, mp_size_t n, unsigned int s, mp_ptr ws) +{ +#if USE_MUL_1 && 0 + return mpn_submul_1(dst,src,n,CNST_LIMB(1) <<(s)); +#else + mp_limb_t __cy; + __cy = mpn_lshift(ws,src,n,s); + return __cy + mpn_sub_n(dst,dst,ws,n); +#endif +} +#endif + +#if HAVE_NATIVE_mpn_addlsh_n +#define DO_mpn_addlsh_n(dst,src,n,s,ws) mpn_addlsh_n(dst,dst,src,n,s) +#else +static mp_limb_t +DO_mpn_addlsh_n(mp_ptr dst, mp_srcptr src, mp_size_t n, unsigned int s, mp_ptr ws) +{ +#if USE_MUL_1 && 0 + return mpn_addmul_1(dst,src,n,CNST_LIMB(1) <<(s)); +#else + mp_limb_t __cy; + __cy = mpn_lshift(ws,src,n,s); + return __cy + mpn_add_n(dst,dst,ws,n); +#endif +} +#endif + +#if HAVE_NATIVE_mpn_subrsh +#define DO_mpn_subrsh(dst,nd,src,ns,s,ws) mpn_subrsh(dst,nd,src,ns,s) +#else +/* FIXME: This is not a correct definition, it assumes no carry */ +#define DO_mpn_subrsh(dst,nd,src,ns,s,ws) \ +do { \ + mp_limb_t __cy; \ + MPN_DECR_U (dst, nd, src[0] >> s); \ + __cy = DO_mpn_sublsh_n (dst, src + 1, ns - 1, GMP_NUMB_BITS - s, ws); \ + MPN_DECR_U (dst + ns - 1, nd - ns + 1, __cy); \ +} while (0) +#endif + + +/* FIXME: tuneup should decide the best variant */ +#ifndef AORSMUL_FASTER_AORS_AORSLSH +#define AORSMUL_FASTER_AORS_AORSLSH 1 +#endif +#ifndef AORSMUL_FASTER_AORS_2AORSLSH +#define AORSMUL_FASTER_AORS_2AORSLSH 1 +#endif +#ifndef AORSMUL_FASTER_2AORSLSH +#define AORSMUL_FASTER_2AORSLSH 1 +#endif +#ifndef AORSMUL_FASTER_3AORSLSH +#define AORSMUL_FASTER_3AORSLSH 1 +#endif + +#if GMP_NUMB_BITS < 43 +#define BIT_CORRECTION 1 +#define CORRECTION_BITS GMP_NUMB_BITS +#else +#define BIT_CORRECTION 0 +#define CORRECTION_BITS 0 +#endif + +#define BINVERT_9 \ + ((((GMP_NUMB_MAX / 9) << (6 - GMP_NUMB_BITS % 6)) * 8 & GMP_NUMB_MAX) | 0x39) + +#define BINVERT_255 \ + (GMP_NUMB_MAX - ((GMP_NUMB_MAX / 255) << (8 - GMP_NUMB_BITS % 8))) + + /* FIXME: find some more general expressions for inverses */ +#if GMP_LIMB_BITS == 32 +#define BINVERT_2835 (GMP_NUMB_MASK & CNST_LIMB(0x53E3771B)) +#define BINVERT_42525 (GMP_NUMB_MASK & CNST_LIMB(0x9F314C35)) +#define BINVERT_182712915 (GMP_NUMB_MASK & CNST_LIMB(0x550659DB)) +#define BINVERT_188513325 (GMP_NUMB_MASK & CNST_LIMB(0xFBC333A5)) +#define BINVERT_255x182712915L (GMP_NUMB_MASK & CNST_LIMB(0x6FC4CB25)) +#define BINVERT_255x188513325L (GMP_NUMB_MASK & CNST_LIMB(0x6864275B)) +#if GMP_NAIL_BITS == 0 +#define BINVERT_255x182712915H CNST_LIMB(0x1B649A07) +#define BINVERT_255x188513325H CNST_LIMB(0x06DB993A) +#else /* GMP_NAIL_BITS != 0 */ +#define BINVERT_255x182712915H \ + (GMP_NUMB_MASK & CNST_LIMB((0x1B649A07<>GMP_NUMB_BITS))) +#define BINVERT_255x188513325H \ + (GMP_NUMB_MASK & CNST_LIMB((0x06DB993A<>GMP_NUMB_BITS))) +#endif +#else +#if GMP_LIMB_BITS == 64 +#define BINVERT_2835 (GMP_NUMB_MASK & CNST_LIMB(0x938CC70553E3771B)) +#define BINVERT_42525 (GMP_NUMB_MASK & CNST_LIMB(0xE7B40D449F314C35)) +#define BINVERT_255x182712915 (GMP_NUMB_MASK & CNST_LIMB(0x1B649A076FC4CB25)) +#define BINVERT_255x188513325 (GMP_NUMB_MASK & CNST_LIMB(0x06DB993A6864275B)) +#endif +#endif + +#ifndef mpn_divexact_by255 +#if GMP_NUMB_BITS % 8 == 0 +#define mpn_divexact_by255(dst,src,size) \ + (255 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 255))) +#else +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by255(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(255),BINVERT_255,0) +#else +#define mpn_divexact_by255(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(255)) +#endif +#endif +#endif + +#ifndef mpn_divexact_by255x4 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by255x4(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(255),BINVERT_255,2) +#else +#define mpn_divexact_by255x4(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(255)<<2) +#endif +#endif + +#ifndef mpn_divexact_by9x16 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by9x16(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(9),BINVERT_9,4) +#else +#define mpn_divexact_by9x16(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(9)<<4) +#endif +#endif + +#ifndef mpn_divexact_by42525x16 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_42525) +#define mpn_divexact_by42525x16(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(42525),BINVERT_42525,4) +#else +#define mpn_divexact_by42525x16(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(42525)<<4) +#endif +#endif + +#ifndef mpn_divexact_by2835x64 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_2835) +#define mpn_divexact_by2835x64(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(2835),BINVERT_2835,6) +#else +#define mpn_divexact_by2835x64(dst,src,size) mpn_divexact_1(dst,src,size,CNST_LIMB(2835)<<6) +#endif +#endif + +#ifndef mpn_divexact_by255x182712915 +#if GMP_NUMB_BITS < 36 +#if HAVE_NATIVE_mpn_bdiv_q_2_pi2 && defined(BINVERT_255x182712915H) +/* FIXME: use mpn_bdiv_q_2_pi2 */ +#endif +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_182712915) +#define mpn_divexact_by255x182712915(dst,src,size) \ + do { \ + mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(182712915),BINVERT_182712915,0); \ + mpn_divexact_by255(dst,dst,size); \ + } while(0) +#else +#define mpn_divexact_by255x182712915(dst,src,size) \ + do { \ + mpn_divexact_1(dst,src,size,CNST_LIMB(182712915)); \ + mpn_divexact_by255(dst,dst,size); \ + } while(0) +#endif +#else /* GMP_NUMB_BITS > 35 */ +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_255x182712915) +#define mpn_divexact_by255x182712915(dst,src,size) \ + mpn_pi1_bdiv_q_1(dst,src,size,255*CNST_LIMB(182712915),BINVERT_255x182712915,0) +#else +#define mpn_divexact_by255x182712915(dst,src,size) mpn_divexact_1(dst,src,size,255*CNST_LIMB(182712915)) +#endif +#endif /* GMP_NUMB_BITS >?< 36 */ +#endif + +#ifndef mpn_divexact_by255x188513325 +#if GMP_NUMB_BITS < 36 +#if HAVE_NATIVE_mpn_bdiv_q_1_pi2 && defined(BINVERT_255x188513325H) +/* FIXME: use mpn_bdiv_q_1_pi2 */ +#endif +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_188513325) +#define mpn_divexact_by255x188513325(dst,src,size) \ + do { \ + mpn_pi1_bdiv_q_1(dst,src,size,CNST_LIMB(188513325),BINVERT_188513325,0); \ + mpn_divexact_by255(dst,dst,size); \ + } while(0) +#else +#define mpn_divexact_by255x188513325(dst,src,size) \ + do { \ + mpn_divexact_1(dst,src,size,CNST_LIMB(188513325)); \ + mpn_divexact_by255(dst,dst,size); \ + } while(0) +#endif +#else /* GMP_NUMB_BITS > 35 */ +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && defined(BINVERT_255x188513325) +#define mpn_divexact_by255x188513325(dst,src,size) \ + mpn_pi1_bdiv_q_1(dst,src,size,255*CNST_LIMB(188513325),BINVERT_255x188513325,0) +#else +#define mpn_divexact_by255x188513325(dst,src,size) mpn_divexact_1(dst,src,size,255*CNST_LIMB(188513325)) +#endif +#endif /* GMP_NUMB_BITS >?< 36 */ +#endif + +/* Interpolation for Toom-8.5 (or Toom-8), using the evaluation + points: infinity(8.5 only), +-8, +-4, +-2, +-1, +-1/4, +-1/2, + +-1/8, 0. More precisely, we want to compute + f(2^(GMP_NUMB_BITS * n)) for a polynomial f of degree 15 (or + 14), given the 16 (rsp. 15) values: + + r0 = limit at infinity of f(x) / x^7, + r1 = f(8),f(-8), + r2 = f(4),f(-4), + r3 = f(2),f(-2), + r4 = f(1),f(-1), + r5 = f(1/4),f(-1/4), + r6 = f(1/2),f(-1/2), + r7 = f(1/8),f(-1/8), + r8 = f(0). + + All couples of the form f(n),f(-n) must be already mixed with + toom_couple_handling(f(n),...,f(-n),...) + + The result is stored in {pp, spt + 7*n (or 8*n)}. + At entry, r8 is stored at {pp, 2n}, + r6 is stored at {pp + 3n, 3n + 1}. + r4 is stored at {pp + 7n, 3n + 1}. + r2 is stored at {pp +11n, 3n + 1}. + r0 is stored at {pp +15n, spt}. + + The other values are 3n+1 limbs each (with most significant limbs small). + + Negative intermediate results are stored two-complemented. + Inputs are destroyed. +*/ + +void +mpn_toom_interpolate_16pts (mp_ptr pp, mp_ptr r1, mp_ptr r3, mp_ptr r5, mp_ptr r7, + mp_size_t n, mp_size_t spt, int half, mp_ptr wsi) +{ + mp_limb_t cy; + mp_size_t n3; + mp_size_t n3p1; + n3 = 3 * n; + n3p1 = n3 + 1; + +#define r6 (pp + n3) /* 3n+1 */ +#define r4 (pp + 7 * n) /* 3n+1 */ +#define r2 (pp +11 * n) /* 3n+1 */ +#define r0 (pp +15 * n) /* s+t <= 2*n */ + + ASSERT( spt <= 2 * n ); + /******************************* interpolation *****************************/ + if( half != 0) { + cy = mpn_sub_n (r4, r4, r0, spt); + MPN_DECR_U (r4 + spt, n3p1 - spt, cy); + + cy = DO_mpn_sublsh_n (r3, r0, spt, 14, wsi); + MPN_DECR_U (r3 + spt, n3p1 - spt, cy); + DO_mpn_subrsh(r6, n3p1, r0, spt, 2, wsi); + + cy = DO_mpn_sublsh_n (r2, r0, spt, 28, wsi); + MPN_DECR_U (r2 + spt, n3p1 - spt, cy); + DO_mpn_subrsh(r5, n3p1, r0, spt, 4, wsi); + + cy = DO_mpn_sublsh_n (r1 + BIT_CORRECTION, r0, spt, 42 - CORRECTION_BITS, wsi); + MPN_DECR_U (r1 + spt + BIT_CORRECTION, n3p1 - spt - BIT_CORRECTION, cy); +#if BIT_CORRECTION + /* FIXME: assumes r7[n3p1] is writable (it is if r5 follows). */ + cy = r7[n3p1]; + r7[n3p1] = 0x80; +#endif + DO_mpn_subrsh(r7, n3p1 + BIT_CORRECTION, r0, spt, 6, wsi); +#if BIT_CORRECTION + /* FIXME: assumes r7[n3p1] is writable. */ + ASSERT ( BIT_CORRECTION > 0 || r7[n3p1] == 0x80 ); + r7[n3p1] = cy; +#endif + }; + + r5[n3] -= DO_mpn_sublsh_n (r5 + n, pp, 2 * n, 28, wsi); + DO_mpn_subrsh(r2 + n, 2 * n + 1, pp, 2 * n, 4, wsi); + +#if HAVE_NATIVE_mpn_add_n_sub_n + mpn_add_n_sub_n (r2, r5, r5, r2, n3p1); +#else + mpn_sub_n (wsi, r5, r2, n3p1); /* can be negative */ + ASSERT_NOCARRY(mpn_add_n (r2, r2, r5, n3p1)); + MP_PTR_SWAP(r5, wsi); +#endif + + r6[n3] -= DO_mpn_sublsh_n (r6 + n, pp, 2 * n, 14, wsi); + DO_mpn_subrsh(r3 + n, 2 * n + 1, pp, 2 * n, 2, wsi); + +#if HAVE_NATIVE_mpn_add_n_sub_n + mpn_add_n_sub_n (r3, r6, r6, r3, n3p1); +#else + ASSERT_NOCARRY(mpn_add_n (wsi, r3, r6, n3p1)); + mpn_sub_n (r6, r6, r3, n3p1); /* can be negative */ + MP_PTR_SWAP(r3, wsi); +#endif + + cy = DO_mpn_sublsh_n (r7 + n + BIT_CORRECTION, pp, 2 * n, 42 - CORRECTION_BITS, wsi); +#if BIT_CORRECTION + MPN_DECR_U (r1 + n, 2 * n + 1, pp[0] >> 6); + cy = DO_mpn_sublsh_n (r1 + n, pp + 1, 2 * n - 1, GMP_NUMB_BITS - 6, wsi); + cy = mpn_sub_1(r1 + 3 * n - 1, r1 + 3 * n - 1, 2, cy); + ASSERT ( BIT_CORRECTION > 0 || cy != 0 ); +#else + r7[n3] -= cy; + DO_mpn_subrsh(r1 + n, 2 * n + 1, pp, 2 * n, 6, wsi); +#endif + +#if HAVE_NATIVE_mpn_add_n_sub_n + mpn_add_n_sub_n (r1, r7, r7, r1, n3p1); +#else + mpn_sub_n (wsi, r7, r1, n3p1); /* can be negative */ + mpn_add_n (r1, r1, r7, n3p1); /* if BIT_CORRECTION != 0, can give a carry. */ + MP_PTR_SWAP(r7, wsi); +#endif + + r4[n3] -= mpn_sub_n (r4+n, r4+n, pp, 2 * n); + +#if AORSMUL_FASTER_2AORSLSH + mpn_submul_1 (r5, r6, n3p1, 1028); /* can be negative */ +#else + DO_mpn_sublsh_n (r5, r6, n3p1, 2, wsi); /* can be negative */ + DO_mpn_sublsh_n (r5, r6, n3p1,10, wsi); /* can be negative */ +#endif + + mpn_submul_1 (r7, r5, n3p1, 1300); /* can be negative */ +#if AORSMUL_FASTER_3AORSLSH + mpn_submul_1 (r7, r6, n3p1, 1052688); /* can be negative */ +#else + DO_mpn_sublsh_n (r7, r6, n3p1, 4, wsi); /* can be negative */ + DO_mpn_sublsh_n (r7, r6, n3p1,12, wsi); /* can be negative */ + DO_mpn_sublsh_n (r7, r6, n3p1,20, wsi); /* can be negative */ +#endif + mpn_divexact_by255x188513325(r7, r7, n3p1); + + mpn_submul_1 (r5, r7, n3p1, 12567555); /* can be negative */ + /* A division by 2835x64 followsi. Warning: the operand can be negative! */ + mpn_divexact_by2835x64(r5, r5, n3p1); + if ((r5[n3] & (GMP_NUMB_MAX << (GMP_NUMB_BITS-7))) != 0) + r5[n3] |= (GMP_NUMB_MAX << (GMP_NUMB_BITS-6)); + +#if AORSMUL_FASTER_AORS_AORSLSH + mpn_submul_1 (r6, r7, n3p1, 4095); /* can be negative */ +#else + mpn_add_n (r6, r6, r7, n3p1); /* can give a carry */ + DO_mpn_sublsh_n (r6, r7, n3p1, 12, wsi); /* can be negative */ +#endif +#if AORSMUL_FASTER_2AORSLSH + mpn_addmul_1 (r6, r5, n3p1, 240); /* can be negative */ +#else + DO_mpn_addlsh_n (r6, r5, n3p1, 8, wsi); /* can give a carry */ + DO_mpn_sublsh_n (r6, r5, n3p1, 4, wsi); /* can be negative */ +#endif + /* A division by 255x4 followsi. Warning: the operand can be negative! */ + mpn_divexact_by255x4(r6, r6, n3p1); + if ((r6[n3] & (GMP_NUMB_MAX << (GMP_NUMB_BITS-3))) != 0) + r6[n3] |= (GMP_NUMB_MAX << (GMP_NUMB_BITS-2)); + + ASSERT_NOCARRY(DO_mpn_sublsh_n (r3, r4, n3p1, 7, wsi)); + + ASSERT_NOCARRY(DO_mpn_sublsh_n (r2, r4, n3p1, 13, wsi)); + ASSERT_NOCARRY(mpn_submul_1 (r2, r3, n3p1, 400)); + + /* If GMP_NUMB_BITS < 42 next operations on r1 can give a carry!*/ + DO_mpn_sublsh_n (r1, r4, n3p1, 19, wsi); + mpn_submul_1 (r1, r2, n3p1, 1428); + mpn_submul_1 (r1, r3, n3p1, 112896); + mpn_divexact_by255x182712915(r1, r1, n3p1); + + ASSERT_NOCARRY(mpn_submul_1 (r2, r1, n3p1, 15181425)); + mpn_divexact_by42525x16(r2, r2, n3p1); + +#if AORSMUL_FASTER_AORS_2AORSLSH + ASSERT_NOCARRY(mpn_submul_1 (r3, r1, n3p1, 3969)); +#else + ASSERT_NOCARRY(mpn_sub_n (r3, r3, r1, n3p1)); + ASSERT_NOCARRY(DO_mpn_addlsh_n (r3, r1, n3p1, 7, wsi)); + ASSERT_NOCARRY(DO_mpn_sublsh_n (r3, r1, n3p1, 12, wsi)); +#endif + ASSERT_NOCARRY(mpn_submul_1 (r3, r2, n3p1, 900)); + mpn_divexact_by9x16(r3, r3, n3p1); + + ASSERT_NOCARRY(mpn_sub_n (r4, r4, r1, n3p1)); + ASSERT_NOCARRY(mpn_sub_n (r4, r4, r3, n3p1)); + ASSERT_NOCARRY(mpn_sub_n (r4, r4, r2, n3p1)); + + mpn_add_n (r6, r2, r6, n3p1); + ASSERT_NOCARRY(mpn_rshift(r6, r6, n3p1, 1)); + ASSERT_NOCARRY(mpn_sub_n (r2, r2, r6, n3p1)); + + mpn_sub_n (r5, r3, r5, n3p1); + ASSERT_NOCARRY(mpn_rshift(r5, r5, n3p1, 1)); + ASSERT_NOCARRY(mpn_sub_n (r3, r3, r5, n3p1)); + + mpn_add_n (r7, r1, r7, n3p1); + ASSERT_NOCARRY(mpn_rshift(r7, r7, n3p1, 1)); + ASSERT_NOCARRY(mpn_sub_n (r1, r1, r7, n3p1)); + + /* last interpolation steps... */ + /* ... could be mixed with recomposition + ||H-r7|M-r7|L-r7| ||H-r5|M-r5|L-r5| + */ + + /***************************** recomposition *******************************/ + /* + pp[] prior to operations: + |M r0|L r0|___||H r2|M r2|L r2|___||H r4|M r4|L r4|___||H r6|M r6|L r6|____|H_r8|L r8|pp + + summation scheme for remaining operations: + |__16|n_15|n_14|n_13|n_12|n_11|n_10|n__9|n__8|n__7|n__6|n__5|n__4|n__3|n__2|n___|n___|pp + |M r0|L r0|___||H r2|M r2|L r2|___||H r4|M r4|L r4|___||H r6|M r6|L r6|____|H_r8|L r8|pp + ||H r1|M r1|L r1| ||H r3|M r3|L r3| ||H_r5|M_r5|L_r5| ||H r7|M r7|L r7| + */ + + cy = mpn_add_n (pp + n, pp + n, r7, n); + cy = mpn_add_1 (pp + 2 * n, r7 + n, n, cy); +#if HAVE_NATIVE_mpn_add_nc + cy = r7[n3] + mpn_add_nc(pp + n3, pp + n3, r7 + 2 * n, n, cy); +#else + MPN_INCR_U (r7 + 2 * n, n + 1, cy); + cy = r7[n3] + mpn_add_n (pp + n3, pp + n3, r7 + 2 * n, n); +#endif + MPN_INCR_U (pp + 4 * n, 2 * n + 1, cy); + + pp[2 * n3]+= mpn_add_n (pp + 5 * n, pp + 5 * n, r5, n); + cy = mpn_add_1 (pp + 2 * n3, r5 + n, n, pp[2 * n3]); +#if HAVE_NATIVE_mpn_add_nc + cy = r5[n3] + mpn_add_nc(pp + 7 * n, pp + 7 * n, r5 + 2 * n, n, cy); +#else + MPN_INCR_U (r5 + 2 * n, n + 1, cy); + cy = r5[n3] + mpn_add_n (pp + 7 * n, pp + 7 * n, r5 + 2 * n, n); +#endif + MPN_INCR_U (pp + 8 * n, 2 * n + 1, cy); + + pp[10 * n]+= mpn_add_n (pp + 9 * n, pp + 9 * n, r3, n); + cy = mpn_add_1 (pp + 10 * n, r3 + n, n, pp[10 * n]); +#if HAVE_NATIVE_mpn_add_nc + cy = r3[n3] + mpn_add_nc(pp +11 * n, pp +11 * n, r3 + 2 * n, n, cy); +#else + MPN_INCR_U (r3 + 2 * n, n + 1, cy); + cy = r3[n3] + mpn_add_n (pp +11 * n, pp +11 * n, r3 + 2 * n, n); +#endif + MPN_INCR_U (pp +12 * n, 2 * n + 1, cy); + + pp[14 * n]+=mpn_add_n (pp +13 * n, pp +13 * n, r1, n); + if ( half ) { + cy = mpn_add_1 (pp + 14 * n, r1 + n, n, pp[14 * n]); +#if HAVE_NATIVE_mpn_add_nc + if(LIKELY(spt > n)) { + cy = r1[n3] + mpn_add_nc(pp + 15 * n, pp + 15 * n, r1 + 2 * n, n, cy); + MPN_INCR_U (pp + 16 * n, spt - n, cy); + } else { + ASSERT_NOCARRY(mpn_add_nc(pp + 15 * n, pp + 15 * n, r1 + 2 * n, spt, cy)); + } +#else + MPN_INCR_U (r1 + 2 * n, n + 1, cy); + if(LIKELY(spt > n)) { + cy = r1[n3] + mpn_add_n (pp + 15 * n, pp + 15 * n, r1 + 2 * n, n); + MPN_INCR_U (pp + 16 * n, spt - n, cy); + } else { + ASSERT_NOCARRY(mpn_add_n (pp + 15 * n, pp + 15 * n, r1 + 2 * n, spt)); + } +#endif + } else { + ASSERT_NOCARRY(mpn_add_1 (pp + 14 * n, r1 + n, spt, pp[14 * n])); + } + +#undef r0 +#undef r2 +#undef r4 +#undef r6 +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_5pts.c gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_5pts.c --- gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_5pts.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_5pts.c 2011-05-08 09:49:29.000000000 +0000 @@ -7,8 +7,8 @@ SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. -Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2007 Free Software Foundation, -Inc. +Copyright 2000, 2001, 2002, 2003, 2005, 2006, 2007, 2009 Free Software +Foundation, Inc. This file is part of the GNU MP Library. @@ -31,28 +31,29 @@ void mpn_toom_interpolate_5pts (mp_ptr c, mp_ptr v2, mp_ptr vm1, mp_size_t k, mp_size_t twor, int sa, - mp_limb_t vinf0, mp_ptr ws) + mp_limb_t vinf0) { mp_limb_t cy, saved; - mp_size_t twok = k + k; - mp_size_t kk1 = twok + 1; - mp_ptr c1, v1, c3, vinf, c5; - mp_limb_t cout; /* final carry, should be zero at the end */ + mp_size_t twok; + mp_size_t kk1; + mp_ptr c1, v1, c3, vinf; + + twok = k + k; + kk1 = twok + 1; c1 = c + k; v1 = c1 + k; c3 = v1 + k; vinf = c3 + k; - c5 = vinf + k; #define v0 (c) /* (1) v2 <- v2-vm1 < v2+|vm1|, (16 8 4 2 1) - (1 -1 1 -1 1) = thus 0 <= v2 < 50*B^(2k) < 2^6*B^(2k) (15 9 3 3 0) */ - if (sa <= 0) - mpn_add_n (v2, v2, vm1, kk1); + if (sa) + ASSERT_NOCARRY (mpn_add_n (v2, v2, vm1, kk1)); else - mpn_sub_n (v2, v2, vm1, kk1); + ASSERT_NOCARRY (mpn_sub_n (v2, v2, vm1, kk1)); /* {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} v0 v1 hi(vinf) |vm1| v2-vm1 EMPTY */ @@ -63,17 +64,18 @@ /* {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} v0 v1 hi(vinf) |vm1| (v2-vm1)/3 EMPTY */ - /* (2) vm1 <- tm1 := (v1 - sa*vm1) / 2 [(1 1 1 1 1) - (1 -1 1 -1 1)] / 2 = - tm1 >= 0 (0 1 0 1 0) + /* (2) vm1 <- tm1 := (v1 - vm1) / 2 [(1 1 1 1 1) - (1 -1 1 -1 1)] / 2 = + tm1 >= 0 (0 1 0 1 0) No carry comes out from {v1, kk1} +/- {vm1, kk1}, - and the division by two is exact */ - if (sa <= 0) + and the division by two is exact. + If (sa!=0) the sign of vm1 is negative */ + if (sa) { #ifdef HAVE_NATIVE_mpn_rsh1add_n mpn_rsh1add_n (vm1, v1, vm1, kk1); #else - mpn_add_n (vm1, v1, vm1, kk1); - mpn_rshift (vm1, vm1, kk1, 1); + ASSERT_NOCARRY (mpn_add_n (vm1, v1, vm1, kk1)); + ASSERT_NOCARRY (mpn_rshift (vm1, vm1, kk1, 1)); #endif } else @@ -81,8 +83,8 @@ #ifdef HAVE_NATIVE_mpn_rsh1sub_n mpn_rsh1sub_n (vm1, v1, vm1, kk1); #else - mpn_sub_n (vm1, v1, vm1, kk1); - mpn_rshift (vm1, vm1, kk1, 1); + ASSERT_NOCARRY (mpn_sub_n (vm1, v1, vm1, kk1)); + ASSERT_NOCARRY (mpn_rshift (vm1, vm1, kk1, 1)); #endif } @@ -103,8 +105,8 @@ #ifdef HAVE_NATIVE_mpn_rsh1sub_n mpn_rsh1sub_n (v2, v2, v1, kk1); #else - mpn_sub_n (v2, v2, v1, kk1); - mpn_rshift (v2, v2, kk1, 1); + ASSERT_NOCARRY (mpn_sub_n (v2, v2, v1, kk1)); + ASSERT_NOCARRY (mpn_rshift (v2, v2, kk1, 1)); #endif /* {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} @@ -113,10 +115,12 @@ /* (5) v1 <- t1-tm1 (1 1 1 1 0) - (0 1 0 1 0) = (1 0 1 0 0) result is v1 >= 0 */ - mpn_sub_n (v1, v1, vm1, kk1); + ASSERT_NOCARRY (mpn_sub_n (v1, v1, vm1, kk1)); - /* {c,2k} {c+2k,2k+1} {c+4k+1,2r-1} {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} - v0 v1-v0-tm1 hi(vinf) tm1 (v2-vm1-3t1)/6 EMPTY */ + /* We do not need to read the value in vm1, so we add it in {c+k, ...} */ + cy = mpn_add_n (c1, c1, vm1, kk1); + MPN_INCR_U (c3 + 1, twor + k - 1, cy); /* 2n-(3k+1) = 2r+k-1 */ + /* Memory allocated for vm1 is now free, it can be recycled ...*/ /* (6) v2 <- v2 - 2*vinf, (2 1 0 0 0) - 2*(1 0 0 0 0) = (0 1 0 0 0) result is v2 >= 0 */ @@ -125,46 +129,61 @@ #ifdef HAVE_NATIVE_mpn_sublsh1_n cy = mpn_sublsh1_n (v2, v2, vinf, twor); #else - cy = mpn_lshift (ws, vinf, twor, 1); - cy += mpn_sub_n (v2, v2, ws, twor); + /* Overwrite unused vm1 */ + cy = mpn_lshift (vm1, vinf, twor, 1); + cy += mpn_sub_n (v2, v2, vm1, twor); #endif MPN_DECR_U (v2 + twor, kk1 - twor, cy); + /* Current matrix is + [1 0 0 0 0; vinf + 0 1 0 0 0; v2 + 1 0 1 0 0; v1 + 0 1 0 1 0; vm1 + 0 0 0 0 1] v0 + Some vaues already are in-place (we added vm1 in the correct position) + | vinf| v1 | v0 | + | vm1 | + One still is in a separated area + | +v2 | + We have to compute v1-=vinf; vm1 -= v2, + |-vinf| + | -v2 | + Carefully reordering operations we can avoid to compute twice the sum + of the high half of v2 plus the low half of vinf. + */ + + /* Add the high half of t2 in {vinf} */ + if ( LIKELY(twor > k + 1) ) { /* This is the expected flow */ + cy = mpn_add_n (vinf, vinf, v2 + k, k + 1); + MPN_INCR_U (c3 + kk1, twor - k - 1, cy); /* 2n-(5k+1) = 2r-k-1 */ + } else { /* triggered only by very unbalanced cases like + (k+k+(k-2))x(k+k+1) , should be handled by toom32 */ + ASSERT_NOCARRY (mpn_add_n (vinf, vinf, v2 + k, twor)); + } /* (7) v1 <- v1 - vinf, (1 0 1 0 0) - (1 0 0 0 0) = (0 0 1 0 0) result is >= 0 */ + /* Side effect: we also subtracted (high half) vm1 -= v2 */ cy = mpn_sub_n (v1, v1, vinf, twor); /* vinf is at most twor long. */ + vinf0 = vinf[0]; /* Save again the right value for vinf0 */ vinf[0] = saved; MPN_DECR_U (v1 + twor, kk1 - twor, cy); /* Treat the last bytes. */ - __GMPN_ADD_1 (cout, vinf, vinf, twor, vinf0); /* Add vinf0, propagate carry. */ - /* (8) vm1 <- vm1-t2 (0 1 0 1 0) - (0 1 0 0 0) = (0 0 0 1 0) - vm1 >= 0 + /* (8) vm1 <- vm1-v2 (0 1 0 1 0) - (0 1 0 0 0) = (0 0 0 1 0) + Operate only on the low half. */ - mpn_sub_n (vm1, vm1, v2, kk1); /* No overlapping here. */ + cy = mpn_sub_n (c1, c1, v2, k); + MPN_DECR_U (v1, kk1, cy); /********************* Beginning the final phase **********************/ - /* {c,2k} {c+2k,2k } {c+4k ,2r } {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} - v0 t1 hi(t1)+vinf tm1 (v2-vm1-3t1)/6 EMPTY */ - - /* (9) add t2 in {c+3k, ...} */ - cy = mpn_add_n (c3, c3, v2, kk1); - __GMPN_ADD_1 (cout, c5 + 1, c5 + 1, twor - k - 1, cy); /* 2n-(5k+1) = 2r-k-1 */ - - /* {c,2k} {c+2k,2k } {c+4k ,2r } {t,2k+1} {t+2k+1,2k+1} {t+4k+2,2r} - v0 t1 hi(t1)+vinf tm1 (v2-vm1-3t1)/6 EMPTY */ - /* c c+k c+2k c+3k c+4k t t+2k+1 t+4k+2 - v0 t1 vinf tm1 t2 - +t2 */ - - /* add vm1 in {c+k, ...} */ - cy = mpn_add_n (c1, c1, vm1, kk1); - __GMPN_ADD_1 (cout, c3 + 1, c3 + 1, twor + k - 1, cy); /* 2n-(3k+1) = 2r+k-1 */ + /* Most of the recomposition was done */ - /* c c+k c+2k c+3k c+4k t t+2k+1 t+4k+2 - v0 t1 vinf tm1 t2 - +tm1 +t2 */ + /* add t2 in {c+3k, ...}, but only the low half */ + cy = mpn_add_n (c3, c3, v2, k); + vinf[0] += cy; + ASSERT(vinf[0] >= cy); /* No carry */ + MPN_INCR_U (vinf, twor, vinf0); /* Add vinf0, propagate carry. */ #undef v0 -#undef t2 } diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_6pts.c gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_6pts.c --- gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_6pts.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_6pts.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,229 @@ +/* mpn_toom_interpolate_6pts -- Interpolate for toom43, 52 + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +/* For odd divisors, mpn_divexact_1 works fine with two's complement. */ +#ifndef mpn_divexact_by3 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 && MODLIMB_INVERSE_3 +#define mpn_divexact_by3(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,3,MODLIMB_INVERSE_3,0) +#else +#define mpn_divexact_by3(dst,src,size) mpn_divexact_1(dst,src,size,3) +#endif +#endif + +/* Interpolation for Toom-3.5, using the evaluation points: infinity, + 1, -1, 2, -2. More precisely, we want to compute + f(2^(GMP_NUMB_BITS * n)) for a polynomial f of degree 5, given the + six values + + w5 = f(0), + w4 = f(-1), + w3 = f(1) + w2 = f(-2), + w1 = f(2), + w0 = limit at infinity of f(x) / x^5, + + The result is stored in {pp, 5*n + w0n}. At entry, w5 is stored at + {pp, 2n}, w3 is stored at {pp + 2n, 2n+1}, and w0 is stored at + {pp + 5n, w0n}. The other values are 2n + 1 limbs each (with most + significant limbs small). f(-1) and f(-2) may be negative, signs + determined by the flag bits. All intermediate results are positive. + Inputs are destroyed. + + Interpolation sequence was taken from the paper: "Integer and + Polynomial Multiplication: Towards Optimal Toom-Cook Matrices". + Some slight variations were introduced: adaptation to "gmp + instruction set", and a final saving of an operation by interlacing + interpolation and recomposition phases. +*/ + +void +mpn_toom_interpolate_6pts (mp_ptr pp, mp_size_t n, enum toom6_flags flags, + mp_ptr w4, mp_ptr w2, mp_ptr w1, + mp_size_t w0n) +{ + mp_limb_t cy; + /* cy6 can be stored in w1[2*n], cy4 in w4[0], embankment in w2[0] */ + mp_limb_t cy4, cy6, embankment; + + ASSERT( n > 0 ); + ASSERT( 2*n >= w0n && w0n > 0 ); + +#define w5 pp /* 2n */ +#define w3 (pp + 2 * n) /* 2n+1 */ +#define w0 (pp + 5 * n) /* w0n */ + + /* Interpolate with sequence: + W2 =(W1 - W2)>>2 + W1 =(W1 - W5)>>1 + W1 =(W1 - W2)>>1 + W4 =(W3 - W4)>>1 + W2 =(W2 - W4)/3 + W3 = W3 - W4 - W5 + W1 =(W1 - W3)/3 + // Last steps are mixed with recomposition... + W2 = W2 - W0<<2 + W4 = W4 - W2 + W3 = W3 - W1 + W2 = W2 - W0 + */ + + /* W2 =(W1 - W2)>>2 */ + if (flags & toom6_vm2_neg) + mpn_add_n (w2, w1, w2, 2 * n + 1); + else + mpn_sub_n (w2, w1, w2, 2 * n + 1); + mpn_rshift (w2, w2, 2 * n + 1, 2); + + /* W1 =(W1 - W5)>>1 */ + w1[2*n] -= mpn_sub_n (w1, w1, w5, 2*n); + mpn_rshift (w1, w1, 2 * n + 1, 1); + + /* W1 =(W1 - W2)>>1 */ +#if HAVE_NATIVE_mpn_rsh1sub_n + mpn_rsh1sub_n (w1, w1, w2, 2 * n + 1); +#else + mpn_sub_n (w1, w1, w2, 2 * n + 1); + mpn_rshift (w1, w1, 2 * n + 1, 1); +#endif + + /* W4 =(W3 - W4)>>1 */ + if (flags & toom6_vm1_neg) + { +#if HAVE_NATIVE_mpn_rsh1add_n + mpn_rsh1add_n (w4, w3, w4, 2 * n + 1); +#else + mpn_add_n (w4, w3, w4, 2 * n + 1); + mpn_rshift (w4, w4, 2 * n + 1, 1); +#endif + } + else + { +#if HAVE_NATIVE_mpn_rsh1sub_n + mpn_rsh1sub_n (w4, w3, w4, 2 * n + 1); +#else + mpn_sub_n (w4, w3, w4, 2 * n + 1); + mpn_rshift (w4, w4, 2 * n + 1, 1); +#endif + } + + /* W2 =(W2 - W4)/3 */ + mpn_sub_n (w2, w2, w4, 2 * n + 1); + mpn_divexact_by3 (w2, w2, 2 * n + 1); + + /* W3 = W3 - W4 - W5 */ + mpn_sub_n (w3, w3, w4, 2 * n + 1); + w3[2 * n] -= mpn_sub_n (w3, w3, w5, 2 * n); + + /* W1 =(W1 - W3)/3 */ + mpn_sub_n (w1, w1, w3, 2 * n + 1); + mpn_divexact_by3 (w1, w1, 2 * n + 1); + + /* + [1 0 0 0 0 0; + 0 1 0 0 0 0; + 1 0 1 0 0 0; + 0 1 0 1 0 0; + 1 0 1 0 1 0; + 0 0 0 0 0 1] + + pp[] prior to operations: + |_H w0__|_L w0__|______||_H w3__|_L w3__|_H w5__|_L w5__| + + summation scheme for remaining operations: + |______________5|n_____4|n_____3|n_____2|n______|n______|pp + |_H w0__|_L w0__|______||_H w3__|_L w3__|_H w5__|_L w5__| + || H w4 | L w4 | + || H w2 | L w2 | + || H w1 | L w1 | + ||-H w1 |-L w1 | + |-H w0 |-L w0 ||-H w2 |-L w2 | + */ + cy = mpn_add_n (pp + n, pp + n, w4, 2 * n + 1); + MPN_INCR_U (pp + 3 * n + 1, n, cy); + + /* W2 -= W0<<2 */ +#if HAVE_NATIVE_mpn_sublsh_n || HAVE_NATIVE_mpn_sublsh2_n +#if HAVE_NATIVE_mpn_sublsh2_n + cy = mpn_sublsh2_n(w2, w2, w0, w0n); +#else + cy = mpn_sublsh_n(w2, w2, w0, w0n, 2); +#endif +#else + /* {W4,2*n+1} is now free and can be overwritten. */ + cy = mpn_lshift(w4, w0, w0n, 2); + cy+= mpn_sub_n(w2, w2, w4, w0n); +#endif + MPN_DECR_U (w2 + w0n, 2 * n + 1 - w0n, cy); + + /* W4L = W4L - W2L */ + cy = mpn_sub_n (pp + n, pp + n, w2, n); + MPN_DECR_U (w3, 2 * n + 1, cy); + + /* W3H = W3H + W2L */ + cy4 = w3[2 * n] + mpn_add_n (pp + 3 * n, pp + 3 * n, w2, n); + /* W1L + W2H */ + cy = w2[2 * n] + mpn_add_n (pp + 4 * n, w1, w2 + n, n); + MPN_INCR_U (w1 + n, n + 1, cy); + + /* W0 = W0 + W1H */ + if (LIKELY (w0n > n)) + cy6 = w1[2 * n] + mpn_add_n (w0, w0, w1 + n, n); + else + cy6 = mpn_add_n (w0, w0, w1 + n, w0n); + + /* + summation scheme for the next operation: + |...____5|n_____4|n_____3|n_____2|n______|n______|pp + |...w0___|_w1_w2_|_H w3__|_L w3__|_H w5__|_L w5__| + ...-w0___|-w1_w2 | + */ + /* if(LIKELY(w0n>n)) the two operands below DO overlap! */ + cy = mpn_sub_n (pp + 2 * n, pp + 2 * n, pp + 4 * n, n + w0n); + + /* embankment is a "dirty trick" to avoid carry/borrow propagation + beyond allocated memory */ + embankment = w0[w0n - 1] - 1; + w0[w0n - 1] = 1; + if (LIKELY (w0n > n)) { + if ( LIKELY(cy4 > cy6) ) + MPN_INCR_U (pp + 4 * n, w0n + n, cy4 - cy6); + else + MPN_DECR_U (pp + 4 * n, w0n + n, cy6 - cy4); + MPN_DECR_U (pp + 3 * n + w0n, 2 * n, cy); + MPN_INCR_U (w0 + n, w0n - n, cy6); + } else { + MPN_INCR_U (pp + 4 * n, w0n + n, cy4); + MPN_DECR_U (pp + 3 * n + w0n, 2 * n, cy + cy6); + } + w0[w0n - 1] += embankment; + +#undef w5 +#undef w3 +#undef w0 + +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_7pts.c gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_7pts.c --- gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_7pts.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_7pts.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,7 @@ /* mpn_toom_interpolate_7pts -- Interpolate for toom44, 53, 62. Contributed to the GNU project by Niels Möller. + Improvements by Marco Bodrato. THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST @@ -26,134 +27,190 @@ #include "gmp.h" #include "gmp-impl.h" -/* Arithmetic right shift, requiring that the shifted out bits are zero. */ -static inline void -divexact_2exp (mp_ptr rp, mp_srcptr sp, mp_size_t n, unsigned shift) -{ - mp_limb_t sign; - sign = LIMB_HIGHBIT_TO_MASK (sp[n-1] << GMP_NAIL_BITS) << (GMP_NUMB_BITS - shift); - ASSERT_NOCARRY (mpn_rshift (rp, sp, n, shift)); - rp[n-1] |= sign & GMP_NUMB_MASK; -} +#define BINVERT_3 MODLIMB_INVERSE_3 + +#define BINVERT_9 \ + ((((GMP_NUMB_MAX / 9) << (6 - GMP_NUMB_BITS % 6)) * 8 & GMP_NUMB_MAX) | 0x39) + +#define BINVERT_15 \ + ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 15)) + +/* For the various mpn_divexact_byN here, fall back to using either + mpn_pi1_bdiv_q_1 or mpn_divexact_1. The former has less overhead and is + many faster if it is native. For now, since mpn_divexact_1 is native on + several platforms where mpn_pi1_bdiv_q_1 does not yet exist, do not use + mpn_pi1_bdiv_q_1 unconditionally. FIXME. */ /* For odd divisors, mpn_divexact_1 works fine with two's complement. */ #ifndef mpn_divexact_by3 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by3(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,3,BINVERT_3,0) +#else #define mpn_divexact_by3(dst,src,size) mpn_divexact_1(dst,src,size,3) #endif +#endif + #ifndef mpn_divexact_by9 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by9(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,9,BINVERT_9,0) +#else #define mpn_divexact_by9(dst,src,size) mpn_divexact_1(dst,src,size,9) #endif +#endif + #ifndef mpn_divexact_by15 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by15(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,15,BINVERT_15,0) +#else #define mpn_divexact_by15(dst,src,size) mpn_divexact_1(dst,src,size,15) #endif +#endif -/* Interpolation for toom4, using the evaluation points infinity, 2, - 1, -1, 1/2, -1/2. More precisely, we want to compute +/* Interpolation for toom4, using the evaluation points 0, infinity, + 1, -1, 2, -2, 1/2. More precisely, we want to compute f(2^(GMP_NUMB_BITS * n)) for a polynomial f of degree 6, given the seven values w0 = f(0), - w1 = 64 f(-1/2), - w2 = 64 f(1/2), + w1 = f(-2), + w2 = f(1), w3 = f(-1), - w4 = f(1) - w5 = f(2) + w4 = f(2) + w5 = 64 * f(1/2) w6 = limit at infinity of f(x) / x^6, The result is 6*n + w6n limbs. At entry, w0 is stored at {rp, 2n }, w2 is stored at { rp + 2n, 2n+1 }, and w6 is stored at { rp + 6n, w6n }. The other values are 2n + 1 limbs each (with most significant limbs small). f(-1) and f(-1/2) may be negative, signs - determined by the flag bits. All intermediate results are - represented in two's complement. Inputs are destroyed. + determined by the flag bits. Inputs are destroyed. Needs (2*n + 1) limbs of temporary storage. */ void -mpn_toom_interpolate_7pts (mp_ptr rp, mp_size_t n, enum toom4_flags flags, +mpn_toom_interpolate_7pts (mp_ptr rp, mp_size_t n, enum toom7_flags flags, mp_ptr w1, mp_ptr w3, mp_ptr w4, mp_ptr w5, mp_size_t w6n, mp_ptr tp) { - mp_size_t m = 2*n + 1; - mp_ptr w2 = rp + 2*n; - mp_ptr w6 = rp + 6*n; + mp_size_t m; mp_limb_t cy; + m = 2*n + 1; +#define w0 rp +#define w2 (rp + 2*n) +#define w6 (rp + 6*n) + ASSERT (w6n > 0); ASSERT (w6n <= 2*n); - /* Using Marco Bodrato's formulas + /* Using formulas similar to Marco Bodrato's - W5 = W5 + W2 - W3 =(W3 + W4)/2 - W1 = W1 + W2 - W2 = W2 - W6 - W0*64 - W2 =(W2*2 - W1)/8 - W4 = W4 - W3 - - W5 = W5 - W4*65 - W4 = W4 - W6 - W0 - W5 = W5 + W4*45 - W2 =(W2 - W4)/3 - W4 = W4 - W2 + W5 = W5 + W4 + W1 =(W4 - W1)/2 + W4 = W4 - W0 + W4 =(W4 - W1)/4 - W6*16 + W3 =(W2 - W3)/2 + W2 = W2 - W3 + + W5 = W5 - W2*65 May be negative. + W2 = W2 - W6 - W0 + W5 =(W5 + W2*45)/2 Now >= 0 again. + W4 =(W4 - W2)/3 + W2 = W2 - W4 - W1 = W1 - W5 - W5 =(W5 - W3*16)/ 18 + W1 = W5 - W1 May be negative. + W5 =(W5 - W3*8)/9 W3 = W3 - W5 - W1 =(W1/30 + W5)/ 2 + W1 =(W1/15 + W5)/2 Now >= 0 again. W5 = W5 - W1 - where W0 = f(0), W1 = 64 f(-1/2), W2 = 64 f(1/2), W3 = f(-1), - W4 = f(1), W5 = f(2), W6 = f(oo), + where W0 = f(0), W1 = f(-2), W2 = f(1), W3 = f(-1), + W4 = f(2), W5 = f(1/2), W6 = f(oo), + + Note that most intermediate results are positive; the ones that + may be negative are represented in two's complement. We must + never shift right a value that may be negative, since that would + invalidate the sign bit. On the other hand, divexact by odd + numbers work fine with two's complement. */ - mpn_add_n (w5, w5, w2, m); - if (flags & toom4_w3_neg) - mpn_add_n (w3, w3, w4, m); + mpn_add_n (w5, w5, w4, m); + if (flags & toom7_w1_neg) + { +#ifdef HAVE_NATIVE_mpn_rsh1add_n + mpn_rsh1add_n (w1, w1, w4, m); +#else + mpn_add_n (w1, w1, w4, m); ASSERT (!(w1[0] & 1)); + mpn_rshift (w1, w1, m, 1); +#endif + } else - mpn_sub_n (w3, w4, w3, m); - divexact_2exp (w3, w3, m, 1); - if (flags & toom4_w1_neg) - mpn_add_n (w1, w1, w2, m); + { +#ifdef HAVE_NATIVE_mpn_rsh1sub_n + mpn_rsh1sub_n (w1, w4, w1, m); +#else + mpn_sub_n (w1, w4, w1, m); ASSERT (!(w1[0] & 1)); + mpn_rshift (w1, w1, m, 1); +#endif + } + mpn_sub (w4, w4, m, w0, 2*n); + mpn_sub_n (w4, w4, w1, m); ASSERT (!(w4[0] & 3)); + mpn_rshift (w4, w4, m, 2); /* w4>=0 */ + + tp[w6n] = mpn_lshift (tp, w6, w6n, 4); + mpn_sub (w4, w4, m, tp, w6n+1); + + if (flags & toom7_w3_neg) + { +#ifdef HAVE_NATIVE_mpn_rsh1add_n + mpn_rsh1add_n (w3, w3, w2, m); +#else + mpn_add_n (w3, w3, w2, m); ASSERT (!(w3[0] & 1)); + mpn_rshift (w3, w3, m, 1); +#endif + } else - mpn_sub_n (w1, w2, w1, m); + { +#ifdef HAVE_NATIVE_mpn_rsh1sub_n + mpn_rsh1sub_n (w3, w2, w3, m); +#else + mpn_sub_n (w3, w2, w3, m); ASSERT (!(w3[0] & 1)); + mpn_rshift (w3, w3, m, 1); +#endif + } + + mpn_sub_n (w2, w2, w3, m); + + mpn_submul_1 (w5, w2, m, 65); mpn_sub (w2, w2, m, w6, w6n); - tp[2*n] = mpn_lshift (tp, rp, 2*n, 6); - mpn_sub_n (w2, w2, tp, m); - mpn_lshift (w2, w2, m, 1); - mpn_sub_n (w2, w2, w1, m); - divexact_2exp (w2, w2, m, 3); - mpn_sub_n (w4, w4, w3, m); - - mpn_submul_1 (w5, w4, m, 65); - mpn_sub (w4, w4, m, w6, w6n); - mpn_sub (w4, w4, m, rp, 2*n); - mpn_addmul_1 (w5, w4, m, 45); - mpn_sub_n (w2, w2, w4, m); - /* Rely on divexact working with two's complement */ - mpn_divexact_by3 (w2, w2, m); + mpn_sub (w2, w2, m, w0, 2*n); + + mpn_addmul_1 (w5, w2, m, 45); ASSERT (!(w5[0] & 1)); + mpn_rshift (w5, w5, m, 1); mpn_sub_n (w4, w4, w2, m); - mpn_sub_n (w1, w1, w5, m); - mpn_lshift (tp, w3, m, 4); + mpn_divexact_by3 (w4, w4, m); + mpn_sub_n (w2, w2, w4, m); + + mpn_sub_n (w1, w5, w1, m); + mpn_lshift (tp, w3, m, 3); mpn_sub_n (w5, w5, tp, m); - divexact_2exp (w5, w5, m, 1); mpn_divexact_by9 (w5, w5, m); mpn_sub_n (w3, w3, w5, m); - divexact_2exp (w1, w1, m, 1); + mpn_divexact_by15 (w1, w1, m); - mpn_add_n (w1, w1, w5, m); - divexact_2exp (w1, w1, m, 1); + mpn_add_n (w1, w1, w5, m); ASSERT (!(w1[0] & 1)); + mpn_rshift (w1, w1, m, 1); /* w1>=0 now */ mpn_sub_n (w5, w5, w1, m); - /* Two's complement coefficients must be non-negative at the end of - this procedure. */ - ASSERT ( !(w1[2*n] & GMP_LIMB_HIGHBIT)); - ASSERT ( !(w2[2*n] & GMP_LIMB_HIGHBIT)); - ASSERT ( !(w3[2*n] & GMP_LIMB_HIGHBIT)); - ASSERT ( !(w4[2*n] & GMP_LIMB_HIGHBIT)); - ASSERT ( !(w5[2*n] & GMP_LIMB_HIGHBIT)); + /* These bounds are valid for the 4x4 polynomial product of toom44, + * and they are conservative for toom53 and toom62. */ + ASSERT (w1[2*n] < 2); + ASSERT (w2[2*n] < 3); + ASSERT (w3[2*n] < 4); + ASSERT (w4[2*n] < 3); + ASSERT (w5[2*n] < 2); /* Addition chain. Note carries and the 2n'th limbs that need to be * added in. @@ -174,8 +231,8 @@ * c7 c6 c5 c4 c3 Carries to propagate */ - cy = mpn_add_n (rp + n, rp + n, w1, 2*n); - MPN_INCR_U (w2 + n, n + 1, w1[2*n] + cy); + cy = mpn_add_n (rp + n, rp + n, w1, m); + MPN_INCR_U (w2 + n + 1, n , cy); cy = mpn_add_n (rp + 3*n, rp + 3*n, w3, n); MPN_INCR_U (w3 + n, n + 1, w2[2*n] + cy); cy = mpn_add_n (rp + 4*n, w3 + n, w4, n); @@ -183,10 +240,7 @@ cy = mpn_add_n (rp + 5*n, w4 + n, w5, n); MPN_INCR_U (w5 + n, n + 1, w4[2*n] + cy); if (w6n > n + 1) - { - mp_limb_t c7 = mpn_add_n (rp + 6*n, rp + 6*n, w5 + n, n + 1); - MPN_INCR_U (rp + 7*n + 1, w6n - n - 1, c7); - } + ASSERT_NOCARRY (mpn_add (rp + 6*n, rp + 6*n, w6n, w5 + n, n + 1)); else { ASSERT_NOCARRY (mpn_add_n (rp + 6*n, rp + 6*n, w5 + n, w6n)); diff -Nru gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_8pts.c gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_8pts.c --- gmp-4.3.2+dfsg/mpn/generic/toom_interpolate_8pts.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/toom_interpolate_8pts.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,192 @@ +/* mpn_toom_interpolate_8pts -- Interpolate for toom54, 63, 72. + + Contributed to the GNU project by Marco Bodrato. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +#define BINVERT_3 MODLIMB_INVERSE_3 + +#define BINVERT_15 \ + ((((GMP_NUMB_MAX >> (GMP_NUMB_BITS % 4)) / 15) * 14 * 16 & GMP_NUMB_MAX) + 15) + +#define BINVERT_45 ((BINVERT_15 * BINVERT_3) & GMP_NUMB_MASK) + +#ifndef mpn_divexact_by3 +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by3(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,3,BINVERT_3,0) +#else +#define mpn_divexact_by3(dst,src,size) mpn_divexact_1(dst,src,size,3) +#endif +#endif + +#ifndef mpn_divexact_by45 +#if GMP_NUMB_BITS % 12 == 0 +#define mpn_divexact_by45(dst,src,size) \ + (63 & 19 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 45))) +#else +#if HAVE_NATIVE_mpn_pi1_bdiv_q_1 +#define mpn_divexact_by45(dst,src,size) mpn_pi1_bdiv_q_1(dst,src,size,45,BINVERT_45,0) +#else +#define mpn_divexact_by45(dst,src,size) mpn_divexact_1(dst,src,size,45) +#endif +#endif +#endif + +#if HAVE_NATIVE_mpn_sublsh_n +#define DO_mpn_sublsh_n(dst,src,n,s,ws) mpn_sublsh_n (dst,src,n,s) +#else +static mp_limb_t +DO_mpn_sublsh_n (mp_ptr dst, mp_srcptr src, mp_size_t n, unsigned int s, mp_ptr ws) +{ +#if USE_MUL_1 + return mpn_submul_1(dst,src,n,CNST_LIMB(1) <<(s)); +#else + mp_limb_t __cy; + __cy = mpn_lshift (ws,src,n,s); + return __cy + mpn_sub_n (dst,dst,ws,n); +#endif +} +#endif + + +#if HAVE_NATIVE_mpn_subrsh +#define DO_mpn_subrsh(dst,nd,src,ns,s,ws) mpn_subrsh (dst,nd,src,ns,s) +#else +/* This is not a correct definition, it assumes no carry */ +#define DO_mpn_subrsh(dst,nd,src,ns,s,ws) \ +do { \ + mp_limb_t __cy; \ + MPN_DECR_U (dst, nd, src[0] >> s); \ + __cy = DO_mpn_sublsh_n (dst, src + 1, ns - 1, GMP_NUMB_BITS - s, ws); \ + MPN_DECR_U (dst + ns - 1, nd - ns + 1, __cy); \ +} while (0) +#endif + +/* Interpolation for Toom-4.5 (or Toom-4), using the evaluation + points: infinity(4.5 only), 4, -4, 2, -2, 1, -1, 0. More precisely, + we want to compute f(2^(GMP_NUMB_BITS * n)) for a polynomial f of + degree 7 (or 6), given the 8 (rsp. 7) values: + + r1 = limit at infinity of f(x) / x^7, + r2 = f(4), + r3 = f(-4), + r4 = f(2), + r5 = f(-2), + r6 = f(1), + r7 = f(-1), + r8 = f(0). + + All couples of the form f(n),f(-n) must be already mixed with + toom_couple_handling(f(n),...,f(-n),...) + + The result is stored in {pp, spt + 7*n (or 6*n)}. + At entry, r8 is stored at {pp, 2n}, + r5 is stored at {pp + 3n, 3n + 1}. + + The other values are 2n+... limbs each (with most significant limbs small). + + All intermediate results are positive. + Inputs are destroyed. +*/ + +void +mpn_toom_interpolate_8pts (mp_ptr pp, mp_size_t n, + mp_ptr r3, mp_ptr r7, + mp_size_t spt, mp_ptr ws) +{ + mp_limb_signed_t cy; + mp_ptr r5, r1; + r5 = (pp + 3 * n); /* 3n+1 */ + r1 = (pp + 7 * n); /* spt */ + + /******************************* interpolation *****************************/ + + DO_mpn_subrsh(r3+n, 2 * n + 1, pp, 2 * n, 4, ws); + cy = DO_mpn_sublsh_n (r3, r1, spt, 12, ws); + MPN_DECR_U (r3 + spt, 3 * n + 1 - spt, cy); + + DO_mpn_subrsh(r5+n, 2 * n + 1, pp, 2 * n, 2, ws); + cy = DO_mpn_sublsh_n (r5, r1, spt, 6, ws); + MPN_DECR_U (r5 + spt, 3 * n + 1 - spt, cy); + + r7[3*n] -= mpn_sub_n (r7+n, r7+n, pp, 2 * n); + cy = mpn_sub_n (r7, r7, r1, spt); + MPN_DECR_U (r7 + spt, 3 * n + 1 - spt, cy); + + ASSERT_NOCARRY(mpn_sub_n (r3, r3, r5, 3 * n + 1)); + ASSERT_NOCARRY(mpn_rshift(r3, r3, 3 * n + 1, 2)); + + ASSERT_NOCARRY(mpn_sub_n (r5, r5, r7, 3 * n + 1)); + + ASSERT_NOCARRY(mpn_sub_n (r3, r3, r5, 3 * n + 1)); + + mpn_divexact_by45 (r3, r3, 3 * n + 1); + + ASSERT_NOCARRY(mpn_divexact_by3 (r5, r5, 3 * n + 1)); + + ASSERT_NOCARRY(DO_mpn_sublsh_n (r5, r3, 3 * n + 1, 2, ws)); + + /* last interpolation steps... */ + /* ... are mixed with recomposition */ + + /***************************** recomposition *******************************/ + /* + pp[] prior to operations: + |_H r1|_L r1|____||_H r5|_M_r5|_L r5|_____|_H r8|_L r8|pp + + summation scheme for remaining operations: + |____8|n___7|n___6|n___5|n___4|n___3|n___2|n____|n____|pp + |_H r1|_L r1|____||_H*r5|_M r5|_L r5|_____|_H_r8|_L r8|pp + ||_H r3|_M r3|_L*r3| + ||_H_r7|_M_r7|_L_r7| + ||-H r3|-M r3|-L*r3| + ||-H*r5|-M_r5|-L_r5| + */ + + cy = mpn_add_n (pp + n, pp + n, r7, n); /* Hr8+Lr7-Lr5 */ + cy-= mpn_sub_n (pp + n, pp + n, r5, n); + if (0 > cy) + MPN_DECR_U (r7 + n, 2*n + 1, 1); + else + MPN_INCR_U (r7 + n, 2*n + 1, cy); + + cy = mpn_sub_n (pp + 2*n, r7 + n, r5 + n, n); /* Mr7-Mr5 */ + MPN_DECR_U (r7 + 2*n, n + 1, cy); + + cy = mpn_add_n (pp + 3*n, r5, r7+ 2*n, n+1); /* Hr7+Lr5 */ + r5[3*n]+= mpn_add_n (r5 + 2*n, r5 + 2*n, r3, n); /* Hr5+Lr3 */ + cy-= mpn_sub_n (pp + 3*n, pp + 3*n, r5 + 2*n, n+1); /* Hr7-Hr5+Lr5-Lr3 */ + if (UNLIKELY(0 > cy)) + MPN_DECR_U (r5 + n + 1, 2*n, 1); + else + MPN_INCR_U (r5 + n + 1, 2*n, cy); + + ASSERT_NOCARRY(mpn_sub_n(pp + 4*n, r5 + n, r3 + n, 2*n +1)); /* Mr5-Mr3,Hr5-Hr3 */ + + cy = mpn_add_1 (pp + 6*n, r3 + n, n, pp[6*n]); + MPN_INCR_U (r3 + 2*n, n + 1, cy); + cy = r3[3*n] + mpn_add_n (pp + 7*n, pp + 7*n, r3 + 2*n, n); + MPN_INCR_U (pp + 8*n, spt - n, cy); +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/trialdiv.c gmp-5.0.2+dfsg/mpn/generic/trialdiv.c --- gmp-4.3.2+dfsg/mpn/generic/trialdiv.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/trialdiv.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,110 @@ +/* mpn_trialdiv -- find small factors of an mpn number using trial division. + + Contributed to the GNU project by Torbjorn Granlund. + + THE FUNCTION IN THIS FILE IS INTERNAL WITH A MUTABLE INTERFACE. IT IS ONLY + SAFE TO REACH IT THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT IT WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +/* + Fast, division-free trial division for GMP. + + This function will find the first (smallest) factor represented in + trialdivtab.h. It does not stop the factoring effort just because it has + reached some sensible limit, such as the square root of the input number. + + The caller can limit the factoring effort by passing NPRIMES. The function + well then divide to *at least* that limit. A position which only + mpn_trialdiv can make sense of is returned in the WHERE parameter. It can + be used for restarting the factoring effort; the first call should pass 0 + here. +*/ + +#include "gmp.h" +#include "gmp-impl.h" + +struct gmp_primes_dtab { + mp_limb_t binv; + mp_limb_t lim; +}; + +struct gmp_primes_ptab { + mp_limb_t ppp; /* primes, multiplied together */ + mp_limb_t cps[7]; /* ppp values pre-computed for mpn_mod_1s_4p */ + unsigned int idx:24; /* index of first primes in dtab */ + unsigned int np :8; /* number of primes related to this entry */ +}; + +#define P(p,inv,lim) {inv,lim} + +#include "trialdivtab.h" + +#define PTAB_LINES (sizeof (gmp_primes_ptab) / sizeof (gmp_primes_ptab[0])) + +/* Attempt to find a factor of T using trial division. + Input: A non-negative number T. + Output: non-zero if we found a factor, zero otherwise. To get the actual + prime factor, compute the mod B inverse of the return value. */ +/* FIXME: We could optimize out one of the outer loop conditions if we + had a final ptab entry with a huge nd field. */ +mp_limb_t +mpn_trialdiv (mp_srcptr tp, mp_size_t tn, mp_size_t nprimes, int *where) +{ + mp_limb_t ppp; + mp_limb_t *cps; + struct gmp_primes_dtab *dp; + long i, j, idx, np; + mp_limb_t r, q; + + ASSERT (tn >= 1); + + for (i = *where; i < PTAB_LINES; i++) + { + ppp = gmp_primes_ptab[i].ppp; + cps = gmp_primes_ptab[i].cps; + +#if __GNU_MP_VERSION == 4 && __GNU_MP_VERSION_MINOR < 4 + if (tn < 4) + r = mpn_mod_1 (tp, tn, ppp); /* FIXME */ + else +#endif + r = mpn_mod_1s_4p (tp, tn, ppp << cps[1], cps); + + idx = gmp_primes_ptab[i].idx; + np = gmp_primes_ptab[i].np; + + /* Check divisibility by individual primes. */ + dp = &gmp_primes_dtab[idx] + np; + for (j = -np; j < 0; j++) + { + q = r * dp[j].binv; + if (q <= dp[j].lim) + { + *where = i; + return dp[j].binv; + } + } + + nprimes -= np; + if (nprimes <= 0) + return 0; + } + return 0; +} diff -Nru gmp-4.3.2+dfsg/mpn/generic/udiv_w_sdiv.c gmp-5.0.2+dfsg/mpn/generic/udiv_w_sdiv.c --- gmp-4.3.2+dfsg/mpn/generic/udiv_w_sdiv.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/udiv_w_sdiv.c 2011-05-08 09:49:29.000000000 +0000 @@ -42,7 +42,7 @@ if ((mp_limb_signed_t) d >= 0) { - if (a1 < d - a1 - (a0 >> (BITS_PER_MP_LIMB - 1))) + if (a1 < d - a1 - (a0 >> (GMP_LIMB_BITS - 1))) { /* dividend, divisor, and quotient are nonnegative */ sdiv_qrnnd (q, r, a1, a0, d); @@ -50,18 +50,18 @@ else { /* Compute c1*2^32 + c0 = a1*2^32 + a0 - 2^31*d */ - sub_ddmmss (c1, c0, a1, a0, d >> 1, d << (BITS_PER_MP_LIMB - 1)); + sub_ddmmss (c1, c0, a1, a0, d >> 1, d << (GMP_LIMB_BITS - 1)); /* Divide (c1*2^32 + c0) by d */ sdiv_qrnnd (q, r, c1, c0, d); /* Add 2^31 to quotient */ - q += (mp_limb_t) 1 << (BITS_PER_MP_LIMB - 1); + q += (mp_limb_t) 1 << (GMP_LIMB_BITS - 1); } } else { b1 = d >> 1; /* d/2, between 2^30 and 2^31 - 1 */ c1 = a1 >> 1; /* A/2 */ - c0 = (a1 << (BITS_PER_MP_LIMB - 1)) + (a0 >> 1); + c0 = (a1 << (GMP_LIMB_BITS - 1)) + (a0 >> 1); if (a1 < b1) /* A < 2^32*b1, so A/2 < 2^31*b1 */ { diff -Nru gmp-4.3.2+dfsg/mpn/generic/zero.c gmp-5.0.2+dfsg/mpn/generic/zero.c --- gmp-4.3.2+dfsg/mpn/generic/zero.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/generic/zero.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,31 @@ +/* mpn_zero + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "gmp.h" +#include "gmp-impl.h" + +void +mpn_zero (mp_ptr rp, mp_size_t n) +{ + mp_size_t i; + + rp += n; + for (i = -n; i != 0; i++) + rp[i] = 0; +} diff -Nru gmp-4.3.2+dfsg/mpn/ia64/gcd_1.asm gmp-5.0.2+dfsg/mpn/ia64/gcd_1.asm --- gmp-4.3.2+dfsg/mpn/ia64/gcd_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/ia64/gcd_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -21,8 +21,8 @@ C cycles/bitpair (1x1 gcd) -C itanium2: 6.3 -C itanium: 14 (approx) +C Itanium: 14 (approx) +C Itanium 2: 6.3 C mpn_gcd_1 (mp_srcptr xp, mp_size_t xsize, mp_limb_t y); diff -Nru gmp-4.3.2+dfsg/mpn/ia64/gmp-mparam.h gmp-5.0.2+dfsg/mpn/ia64/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/ia64/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/ia64/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009 Free Software Foundation, -Inc. +Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2009, 2010 Free Software +Foundation, Inc. This file is part of the GNU MP Library. @@ -18,55 +18,190 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 /* 1300MHz Itanium2 (babe.fsffrance.org) */ -/* Generated by tuneup.c, 2009-03-04, gcc 4.2 */ -#define MUL_KARATSUBA_THRESHOLD 44 -#define MUL_TOOM3_THRESHOLD 137 -#define MUL_TOOM44_THRESHOLD 230 - -#define SQR_BASECASE_THRESHOLD 25 -#define SQR_KARATSUBA_THRESHOLD 119 -#define SQR_TOOM3_THRESHOLD 146 -#define SQR_TOOM4_THRESHOLD 284 - -#define MULLOW_BASECASE_THRESHOLD 19 -#define MULLOW_DC_THRESHOLD 120 -#define MULLOW_MUL_N_THRESHOLD 357 - -#define DIV_SB_PREINV_THRESHOLD 0 /* preinv always */ -#define DIV_DC_THRESHOLD 70 -#define POWM_THRESHOLD 312 - -#define MATRIX22_STRASSEN_THRESHOLD 29 -#define HGCD_THRESHOLD 118 -#define GCD_DC_THRESHOLD 595 -#define GCDEXT_DC_THRESHOLD 584 -#define JACOBI_BASE_METHOD 1 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 8 -#define MOD_1_2_THRESHOLD 9 -#define MOD_1_4_THRESHOLD 20 -#define USE_PREINV_DIVREM_1 1 /* native */ -#define USE_PREINV_MOD_1 1 /* preinv always */ -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 17 -#define GET_STR_PRECOMPUTE_THRESHOLD 25 -#define SET_STR_DC_THRESHOLD 1488 -#define SET_STR_PRECOMPUTE_THRESHOLD 3590 - -#define MUL_FFT_TABLE { 528, 1184, 1856, 3840, 11264, 28672, 114688, 327680, 0 } -#define MUL_FFT_MODF_THRESHOLD 784 -#define MUL_FFT_THRESHOLD 6656 - -#define SQR_FFT_TABLE { 592, 1248, 2368, 3840, 11264, 28672, 81920, 327680, 0 } -#define SQR_FFT_MODF_THRESHOLD 608 -#define SQR_FFT_THRESHOLD 4992 +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 14 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 8 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 14 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 22 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 44 +#define MUL_TOOM33_THRESHOLD 89 +#define MUL_TOOM44_THRESHOLD 232 +#define MUL_TOOM6H_THRESHOLD 351 +#define MUL_TOOM8H_THRESHOLD 454 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 101 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 160 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 138 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 159 + +#define SQR_BASECASE_THRESHOLD 26 +#define SQR_TOOM2_THRESHOLD 119 +#define SQR_TOOM3_THRESHOLD 141 +#define SQR_TOOM4_THRESHOLD 282 +#define SQR_TOOM6_THRESHOLD 375 +#define SQR_TOOM8_THRESHOLD 527 + +#define MULMOD_BNM1_THRESHOLD 24 +#define SQRMOD_BNM1_THRESHOLD 19 + +#define MUL_FFT_MODF_THRESHOLD 888 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 888, 5}, { 31, 6}, { 16, 5}, { 33, 6}, \ + { 17, 5}, { 35, 6}, { 28, 7}, { 15, 6}, \ + { 33, 7}, { 17, 6}, { 35, 7}, { 19, 6}, \ + { 39, 7}, { 29, 8}, { 15, 7}, { 33, 8}, \ + { 17, 7}, { 37, 8}, { 19, 7}, { 41, 8}, \ + { 21, 7}, { 43, 8}, { 23, 7}, { 47, 8}, \ + { 27, 7}, { 55, 8}, { 31, 7}, { 63, 8}, \ + { 37, 9}, { 19, 8}, { 43, 9}, { 23, 8}, \ + { 51, 9}, { 27, 8}, { 55, 9}, { 31, 8}, \ + { 63, 9}, { 35, 8}, { 71, 9}, { 39, 8}, \ + { 79, 9}, { 43,10}, { 23, 9}, { 47, 8}, \ + { 95, 9}, { 55,10}, { 31, 9}, { 71,10}, \ + { 39, 9}, { 83,10}, { 47, 9}, { 99,10}, \ + { 55,11}, { 31,10}, { 63, 9}, { 127,10}, \ + { 71, 9}, { 143,10}, { 87,11}, { 47,10}, \ + { 111,12}, { 31,11}, { 63,10}, { 143,11}, \ + { 79,10}, { 167,11}, { 95,10}, { 199,11}, \ + { 111,12}, { 63,11}, { 127,10}, { 255,11}, \ + { 143,10}, { 287,11}, { 159,10}, { 319,12}, \ + { 95,11}, { 223,13}, { 63,12}, { 127,11}, \ + { 287,12}, { 159,11}, { 335,12}, { 191,11}, \ + { 383,10}, { 767,11}, { 399,12}, { 223,13}, \ + { 127,12}, { 255,11}, { 511,10}, { 1023,12}, \ + { 287,11}, { 575,10}, { 1151,12}, { 319,11}, \ + { 639,10}, { 1279,11}, { 671,13}, { 191,12}, \ + { 383,11}, { 767,10}, { 1535,12}, { 415,11}, \ + { 831,14}, { 127,13}, { 255,12}, { 511,11}, \ + { 1023,12}, { 543,11}, { 1087,12}, { 575,13}, \ + { 319,12}, { 639,11}, { 1279,12}, { 671,11}, \ + { 1343,12}, { 703,11}, { 1471,13}, { 383,12}, \ + { 767,11}, { 1535,12}, { 799,11}, { 1599,12}, \ + { 831,13}, { 447,12}, { 959,14}, { 255,13}, \ + { 511,12}, { 1055,11}, { 2111,12}, { 1087,13}, \ + { 575,12}, { 1215,11}, { 2431,12}, { 1247,13}, \ + { 639,12}, { 1279,11}, { 2559,12}, { 1343,13}, \ + { 703,12}, { 1471,14}, { 383,13}, { 767,12}, \ + { 1599,13}, { 831,12}, { 1663,11}, { 3327,12}, \ + { 1727,13}, { 895,12}, { 1791,13}, { 959,15}, \ + { 255,14}, { 511,13}, { 1023,12}, { 2047,13}, \ + { 1087,12}, { 2175,13}, { 1151,12}, { 2303,13}, \ + { 1215,11}, { 4863,12}, { 2495,14}, { 639,13}, \ + { 1343,12}, { 2687,13}, { 1471,12}, { 2943,14}, \ + { 767,13}, { 1599,12}, { 3199,13}, { 1727,12}, \ + { 3455,14}, { 895,13}, { 1983,12}, { 3967,15}, \ + { 511,14}, { 1023,13}, { 2111,12}, { 4223,13}, \ + { 2239,12}, { 4479,13}, { 2495,14}, { 1279,13}, \ + { 2751,14}, { 1407,13}, { 2943,15}, { 767,14}, \ + { 1535,13}, { 3199,14}, { 1663,13}, { 3455,14}, \ + { 1791,12}, { 7167,14}, { 1919,13}, { 3967,16}, \ + { 511,15}, { 1023,14}, { 2175,13}, { 4351,14}, \ + { 2431,15}, { 1279,14}, { 2943,13}, { 5887,15}, \ + { 1535,14}, { 3199,13}, { 6399,14}, { 16384,15}, \ + { 32768,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ + { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ + {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 217 +#define MUL_FFT_THRESHOLD 9856 + +#define SQR_FFT_MODF_THRESHOLD 751 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 751, 5}, { 35, 6}, { 18, 5}, { 37, 6}, \ + { 29, 7}, { 15, 6}, { 33, 7}, { 17, 6}, \ + { 35, 7}, { 29, 8}, { 15, 7}, { 37, 8}, \ + { 19, 7}, { 41, 8}, { 21, 7}, { 43, 8}, \ + { 23, 7}, { 47, 8}, { 43, 9}, { 23, 8}, \ + { 51, 9}, { 27, 8}, { 55, 9}, { 31, 8}, \ + { 63, 9}, { 39, 8}, { 79, 9}, { 43,10}, \ + { 23, 9}, { 47, 8}, { 95, 9}, { 55,10}, \ + { 31, 9}, { 67,10}, { 39, 9}, { 83,10}, \ + { 47, 9}, { 99,10}, { 55,11}, { 31,10}, \ + { 63, 9}, { 127,10}, { 79,11}, { 47,10}, \ + { 103,12}, { 31,11}, { 63,10}, { 143,11}, \ + { 79,10}, { 159,11}, { 95,10}, { 199,11}, \ + { 111,12}, { 63,11}, { 127,10}, { 255,11}, \ + { 143,10}, { 287,11}, { 159,12}, { 95,11}, \ + { 191,10}, { 383,11}, { 207,13}, { 63,12}, \ + { 127,11}, { 255,10}, { 511,11}, { 271,12}, \ + { 159,11}, { 319,10}, { 639,11}, { 335,12}, \ + { 191,11}, { 383,10}, { 767,12}, { 223,13}, \ + { 127,11}, { 511,10}, { 1023,11}, { 527,12}, \ + { 287,11}, { 575,10}, { 1151,11}, { 591,12}, \ + { 319,11}, { 639,13}, { 191,12}, { 383,11}, \ + { 767,10}, { 1535,11}, { 799,10}, { 1599, 9}, \ + { 3199,14}, { 127,13}, { 255,12}, { 511, 9}, \ + { 4095,10}, { 2111,12}, { 543,11}, { 1087,10}, \ + { 2239,12}, { 575,10}, { 2303,13}, { 319,12}, \ + { 671,11}, { 1471,13}, { 383,11}, { 1599,12}, \ + { 831,11}, { 1663,12}, { 863,10}, { 3455,13}, \ + { 447,12}, { 895,11}, { 1791,14}, { 255,13}, \ + { 511,12}, { 1023,11}, { 2111,12}, { 1087,11}, \ + { 2239,13}, { 575,12}, { 1215,11}, { 2495,13}, \ + { 639,12}, { 1343,13}, { 703,12}, { 1407,14}, \ + { 383,13}, { 767,12}, { 1599,13}, { 831,12}, \ + { 1727,11}, { 3455,12}, { 1791,15}, { 255,14}, \ + { 511,13}, { 1023,12}, { 2111,11}, { 4223,12}, \ + { 2239,11}, { 4479,10}, { 8959,11}, { 4607,13}, \ + { 1215,14}, { 639,13}, { 1343,12}, { 2815,13}, \ + { 1471,12}, { 2943,14}, { 767,13}, { 1599,12}, \ + { 3199,13}, { 1727,12}, { 3455,14}, { 895,13}, \ + { 1855,12}, { 3711,13}, { 1983,12}, { 3967,15}, \ + { 511,14}, { 1023,13}, { 2111,12}, { 4223,13}, \ + { 2239,12}, { 4479,14}, { 1151,13}, { 2495,14}, \ + { 1279,13}, { 2687,14}, { 1407,13}, { 2943,15}, \ + { 767,14}, { 1535,13}, { 3071,14}, { 1663,13}, \ + { 3327,14}, { 1791,16}, { 511,15}, { 1023,14}, \ + { 2047,13}, { 4223,14}, { 2175,13}, { 4479,12}, \ + { 8959,14}, { 2303,13}, { 4735,14}, { 2431,15}, \ + { 1279,14}, { 2943,15}, { 1535,14}, { 3071,13}, \ + { 6143,14}, { 16384,15}, { 32768,16}, { 65536,17}, \ + { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ + {2097152,22}, {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 203 +#define SQR_FFT_THRESHOLD 7552 + +#define MULLO_BASECASE_THRESHOLD 17 +#define MULLO_DC_THRESHOLD 91 +#define MULLO_MUL_N_THRESHOLD 19187 + +#define DC_DIV_QR_THRESHOLD 72 +#define DC_DIVAPPR_Q_THRESHOLD 254 +#define DC_BDIV_QR_THRESHOLD 117 +#define DC_BDIV_Q_THRESHOLD 292 + +#define INV_MULMOD_BNM1_THRESHOLD 103 +#define INV_NEWTON_THRESHOLD 178 +#define INV_APPR_THRESHOLD 179 + +#define BINV_NEWTON_THRESHOLD 300 +#define REDC_1_TO_REDC_2_THRESHOLD 10 +#define REDC_2_TO_REDC_N_THRESHOLD 167 + +#define MU_DIV_QR_THRESHOLD 1787 +#define MU_DIVAPPR_Q_THRESHOLD 1470 +#define MUPI_DIV_QR_THRESHOLD 0 /* always */ +#define MU_BDIV_QR_THRESHOLD 1787 +#define MU_BDIV_Q_THRESHOLD 2089 + +#define MATRIX22_STRASSEN_THRESHOLD 27 +#define HGCD_THRESHOLD 139 +#define GCD_DC_THRESHOLD 469 +#define GCDEXT_DC_THRESHOLD 496 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 14 +#define GET_STR_PRECOMPUTE_THRESHOLD 22 +#define SET_STR_DC_THRESHOLD 1474 +#define SET_STR_PRECOMPUTE_THRESHOLD 3495 diff -Nru gmp-4.3.2+dfsg/mpn/ia64/hamdist.asm gmp-5.0.2+dfsg/mpn/ia64/hamdist.asm --- gmp-4.3.2+dfsg/mpn/ia64/hamdist.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/ia64/hamdist.asm 2011-05-08 09:49:29.000000000 +0000 @@ -20,6 +20,7 @@ include(`../config.m4') C cycles/limb +C Itanium: 2 C Itanium 2: 1 C INPUT PARAMETERS diff -Nru gmp-4.3.2+dfsg/mpn/ia64/ia64-defs.m4 gmp-5.0.2+dfsg/mpn/ia64/ia64-defs.m4 --- gmp-4.3.2+dfsg/mpn/ia64/ia64-defs.m4 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/ia64/ia64-defs.m4 2011-05-08 09:49:29.000000000 +0000 @@ -75,7 +75,7 @@ dnl Emit a ".align" directive. "bytes" is eval()ed, so can be an dnl expression. dnl -dnl This version overrides the definition in mpn/asm-defs.m4. We supress +dnl This version overrides the definition in mpn/asm-defs.m4. We suppress dnl any .align if the gas byte-swapped-nops bug was detected by configure dnl GMP_ASM_IA64_ALIGN_OK. diff -Nru gmp-4.3.2+dfsg/mpn/ia64/invert_limb.asm gmp-5.0.2+dfsg/mpn/ia64/invert_limb.asm --- gmp-4.3.2+dfsg/mpn/ia64/invert_limb.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/ia64/invert_limb.asm 2011-05-08 09:49:29.000000000 +0000 @@ -23,7 +23,7 @@ C d = r32 C cycles -C Itanium: ? +C Itanium: 74 C Itanium 2: 50+6 C It should be possible to avoid the xmpy.hu and the following tests by diff -Nru gmp-4.3.2+dfsg/mpn/ia64/README gmp-5.0.2+dfsg/mpn/ia64/README --- gmp-4.3.2+dfsg/mpn/ia64/README 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/ia64/README 2011-05-08 09:49:29.000000000 +0000 @@ -237,7 +237,7 @@ much unrolling. Depending on size or operand alignment, we get 1 c/l or 0.5 c/l on Itanium -2, according to tests/devel/try. Cache bank conflicts? +2, according to tune/speed. Cache bank conflicts? @@ -268,10 +268,3 @@ All the above documents can be found online at http://developer.intel.com/design/itanium/manuals.htm - - ----------------- -Local variables: -mode: text -fill-column: 76 -End: diff -Nru gmp-4.3.2+dfsg/mpn/m68k/gmp-mparam.h gmp-5.0.2+dfsg/mpn/m68k/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/m68k/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/m68k/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,7 +18,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 @@ -26,11 +26,11 @@ /* Generated by tuneup.c, 2004-02-05, gcc 3.2 */ -#define MUL_KARATSUBA_THRESHOLD 14 -#define MUL_TOOM3_THRESHOLD 90 +#define MUL_TOOM22_THRESHOLD 14 +#define MUL_TOOM33_THRESHOLD 90 #define SQR_BASECASE_THRESHOLD 5 -#define SQR_KARATSUBA_THRESHOLD 28 +#define SQR_TOOM2_THRESHOLD 28 #define SQR_TOOM3_THRESHOLD 98 #define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX /* never */ diff -Nru gmp-4.3.2+dfsg/mpn/Makefile.am gmp-5.0.2+dfsg/mpn/Makefile.am --- gmp-4.3.2+dfsg/mpn/Makefile.am 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -34,20 +34,35 @@ add.c add_1.c add_n.c \ addmul_1.c addmul_2.c addmul_3.c addmul_4.c addmul_5.c addmul_6.c \ addmul_7.c addmul_8.c \ - and_n.c andn_n.c bdivmod.c \ - cmp.c com_n.c copyd.c copyi.c \ - dc_divrem_n.c dive_1.c diveby3.c divis.c divrem.c divrem_1.c divrem_2.c \ + and_n.c andn_n.c \ + cmp.c com.c copyd.c copyi.c \ + dive_1.c diveby3.c divis.c divrem.c divrem_1.c divrem_2.c \ + sbpi1_bdiv_qr.c sbpi1_bdiv_q.c \ + sbpi1_div_qr.c sbpi1_div_q.c sbpi1_divappr_q.c \ + dcpi1_bdiv_qr.c dcpi1_bdiv_q.c \ + dcpi1_div_qr.c dcpi1_div_q.c dcpi1_divappr_q.c \ dump.c fib2_ui.c gcd.c \ gcd_1.c gcdext.c get_d.c get_str.c \ hamdist.c hgcd2.c hgcd.c invert_limb.c \ - ior_n.c iorn_n.c jacbase.c lshift.c \ - matrix22_mul.c mod_1.c mod_34lsub1.c mode1o.c \ + ior_n.c iorn_n.c jacbase.c lshift.c \ + matrix22_mul.c mod_1.c mod_34lsub1.c mode1o.c \ mod_1_1.c mod_1_2.c mod_1_3.c mod_1_4.c \ mul.c mul_1.c mul_2.c mul_3.c mul_4.c mul_fft.c mul_n.c mul_basecase.c \ - mul_toom22.c mul_toom32.c mul_toom42.c \ - mullow_n.c mullow_basecase.c nand_n.c neg_n.c nior_n.c perfsqr.c \ + nussbaumer_mul.c \ + toom22_mul.c toom32_mul.c toom42_mul.c toom52_mul.c toom62_mul.c \ + toom33_mul.c toom43_mul.c toom53_mul.c toom63_mul.c \ + toom44_mul.c \ + toom6h_mul.c toom6_sqr.c toom8h_mul.c toom8_sqr.c \ + toom_couple_handling.c \ + toom2_sqr.c toom3_sqr.c toom4_sqr.c \ + toom_eval_dgr3_pm1.c toom_eval_dgr3_pm2.c \ + toom_eval_pm1.c toom_eval_pm1.c toom_eval_pm2exp.c toom_eval_pm2rexp.c \ + toom_interpolate_5pts.c toom_interpolate_6pts.c toom_interpolate_7pts.c \ + toom_interpolate_8pts.c toom_interpolate_12pts.c toom_interpolate_16pts.c \ + invertappr.c invert.c binvert.c mulmod_bnm1.c sqrmod_bnm1.c \ + mullo_n.c mullo_basecase.c nand_n.c neg.c nior_n.c perfsqr.c \ popcount.c pre_divrem_1.c pre_mod_1.c pow_1.c random.c random2.c rshift.c \ - rootrem.c sb_divrem_mn.c scan0.c scan1.c set_str.c \ + rootrem.c scan0.c scan1.c set_str.c \ sqr_basecase.c sqr_diagonal.c \ sqrtrem.c sub.c sub_1.c sub_n.c submul_1.c \ tdiv_qr.c udiv_qrnnd.c udiv_w_sdiv.c xor_n.c xnor_n.c diff -Nru gmp-4.3.2+dfsg/mpn/Makefile.in gmp-5.0.2+dfsg/mpn/Makefile.in --- gmp-4.3.2+dfsg/mpn/Makefile.in 2010-01-09 06:26:21.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -115,7 +115,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -139,10 +138,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -182,6 +180,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -215,10 +214,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -248,7 +247,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -281,20 +279,35 @@ add.c add_1.c add_n.c \ addmul_1.c addmul_2.c addmul_3.c addmul_4.c addmul_5.c addmul_6.c \ addmul_7.c addmul_8.c \ - and_n.c andn_n.c bdivmod.c \ - cmp.c com_n.c copyd.c copyi.c \ - dc_divrem_n.c dive_1.c diveby3.c divis.c divrem.c divrem_1.c divrem_2.c \ + and_n.c andn_n.c \ + cmp.c com.c copyd.c copyi.c \ + dive_1.c diveby3.c divis.c divrem.c divrem_1.c divrem_2.c \ + sbpi1_bdiv_qr.c sbpi1_bdiv_q.c \ + sbpi1_div_qr.c sbpi1_div_q.c sbpi1_divappr_q.c \ + dcpi1_bdiv_qr.c dcpi1_bdiv_q.c \ + dcpi1_div_qr.c dcpi1_div_q.c dcpi1_divappr_q.c \ dump.c fib2_ui.c gcd.c \ gcd_1.c gcdext.c get_d.c get_str.c \ hamdist.c hgcd2.c hgcd.c invert_limb.c \ - ior_n.c iorn_n.c jacbase.c lshift.c \ - matrix22_mul.c mod_1.c mod_34lsub1.c mode1o.c \ + ior_n.c iorn_n.c jacbase.c lshift.c \ + matrix22_mul.c mod_1.c mod_34lsub1.c mode1o.c \ mod_1_1.c mod_1_2.c mod_1_3.c mod_1_4.c \ mul.c mul_1.c mul_2.c mul_3.c mul_4.c mul_fft.c mul_n.c mul_basecase.c \ - mul_toom22.c mul_toom32.c mul_toom42.c \ - mullow_n.c mullow_basecase.c nand_n.c neg_n.c nior_n.c perfsqr.c \ + nussbaumer_mul.c \ + toom22_mul.c toom32_mul.c toom42_mul.c toom52_mul.c toom62_mul.c \ + toom33_mul.c toom43_mul.c toom53_mul.c toom63_mul.c \ + toom44_mul.c \ + toom6h_mul.c toom6_sqr.c toom8h_mul.c toom8_sqr.c \ + toom_couple_handling.c \ + toom2_sqr.c toom3_sqr.c toom4_sqr.c \ + toom_eval_dgr3_pm1.c toom_eval_dgr3_pm2.c \ + toom_eval_pm1.c toom_eval_pm1.c toom_eval_pm2exp.c toom_eval_pm2rexp.c \ + toom_interpolate_5pts.c toom_interpolate_6pts.c toom_interpolate_7pts.c \ + toom_interpolate_8pts.c toom_interpolate_12pts.c toom_interpolate_16pts.c \ + invertappr.c invert.c binvert.c mulmod_bnm1.c sqrmod_bnm1.c \ + mullo_n.c mullo_basecase.c nand_n.c neg.c nior_n.c perfsqr.c \ popcount.c pre_divrem_1.c pre_mod_1.c pow_1.c random.c random2.c rshift.c \ - rootrem.c sb_divrem_mn.c scan0.c scan1.c set_str.c \ + rootrem.c scan0.c scan1.c set_str.c \ sqr_basecase.c sqr_diagonal.c \ sqrtrem.c sub.c sub_1.c sub_n.c submul_1.c \ tdiv_qr.c udiv_qrnnd.c udiv_w_sdiv.c xor_n.c xnor_n.c @@ -428,18 +441,26 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/and_n.c; then echo $(srcdir)/and_n.c; else echo and_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ andn_n_.c: andn_n.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/andn_n.c; then echo $(srcdir)/andn_n.c; else echo andn_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -bdivmod_.c: bdivmod.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/bdivmod.c; then echo $(srcdir)/bdivmod.c; else echo bdivmod.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +binvert_.c: binvert.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/binvert.c; then echo $(srcdir)/binvert.c; else echo binvert.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ cmp_.c: cmp.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmp.c; then echo $(srcdir)/cmp.c; else echo cmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -com_n_.c: com_n.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/com_n.c; then echo $(srcdir)/com_n.c; else echo com_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +com_.c: com.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/com.c; then echo $(srcdir)/com.c; else echo com.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ copyd_.c: copyd.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/copyd.c; then echo $(srcdir)/copyd.c; else echo copyd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ copyi_.c: copyi.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/copyi.c; then echo $(srcdir)/copyi.c; else echo copyi.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -dc_divrem_n_.c: dc_divrem_n.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dc_divrem_n.c; then echo $(srcdir)/dc_divrem_n.c; else echo dc_divrem_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_bdiv_q_.c: dcpi1_bdiv_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_bdiv_q.c; then echo $(srcdir)/dcpi1_bdiv_q.c; else echo dcpi1_bdiv_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_bdiv_qr_.c: dcpi1_bdiv_qr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_bdiv_qr.c; then echo $(srcdir)/dcpi1_bdiv_qr.c; else echo dcpi1_bdiv_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_div_q_.c: dcpi1_div_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_div_q.c; then echo $(srcdir)/dcpi1_div_q.c; else echo dcpi1_div_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_div_qr_.c: dcpi1_div_qr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_div_qr.c; then echo $(srcdir)/dcpi1_div_qr.c; else echo dcpi1_div_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_divappr_q_.c: dcpi1_divappr_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_divappr_q.c; then echo $(srcdir)/dcpi1_divappr_q.c; else echo dcpi1_divappr_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ dive_1_.c: dive_1.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dive_1.c; then echo $(srcdir)/dive_1.c; else echo dive_1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ diveby3_.c: diveby3.c $(ANSI2KNR) @@ -474,8 +495,12 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hgcd.c; then echo $(srcdir)/hgcd.c; else echo hgcd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ hgcd2_.c: hgcd2.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hgcd2.c; then echo $(srcdir)/hgcd2.c; else echo hgcd2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +invert_.c: invert.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/invert.c; then echo $(srcdir)/invert.c; else echo invert.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ invert_limb_.c: invert_limb.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/invert_limb.c; then echo $(srcdir)/invert_limb.c; else echo invert_limb.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +invertappr_.c: invertappr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/invertappr.c; then echo $(srcdir)/invertappr.c; else echo invertappr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ ior_n_.c: ior_n.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/ior_n.c; then echo $(srcdir)/ior_n.c; else echo ior_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ iorn_n_.c: iorn_n.c $(ANSI2KNR) @@ -518,22 +543,20 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mul_fft.c; then echo $(srcdir)/mul_fft.c; else echo mul_fft.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ mul_n_.c: mul_n.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mul_n.c; then echo $(srcdir)/mul_n.c; else echo mul_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -mul_toom22_.c: mul_toom22.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mul_toom22.c; then echo $(srcdir)/mul_toom22.c; else echo mul_toom22.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -mul_toom32_.c: mul_toom32.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mul_toom32.c; then echo $(srcdir)/mul_toom32.c; else echo mul_toom32.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -mul_toom42_.c: mul_toom42.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mul_toom42.c; then echo $(srcdir)/mul_toom42.c; else echo mul_toom42.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -mullow_basecase_.c: mullow_basecase.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mullow_basecase.c; then echo $(srcdir)/mullow_basecase.c; else echo mullow_basecase.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -mullow_n_.c: mullow_n.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mullow_n.c; then echo $(srcdir)/mullow_n.c; else echo mullow_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +mullo_basecase_.c: mullo_basecase.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mullo_basecase.c; then echo $(srcdir)/mullo_basecase.c; else echo mullo_basecase.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +mullo_n_.c: mullo_n.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mullo_n.c; then echo $(srcdir)/mullo_n.c; else echo mullo_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +mulmod_bnm1_.c: mulmod_bnm1.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mulmod_bnm1.c; then echo $(srcdir)/mulmod_bnm1.c; else echo mulmod_bnm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ nand_n_.c: nand_n.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nand_n.c; then echo $(srcdir)/nand_n.c; else echo nand_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -neg_n_.c: neg_n.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/neg_n.c; then echo $(srcdir)/neg_n.c; else echo neg_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +neg_.c: neg.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/neg.c; then echo $(srcdir)/neg.c; else echo neg.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ nior_n_.c: nior_n.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nior_n.c; then echo $(srcdir)/nior_n.c; else echo nior_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +nussbaumer_mul_.c: nussbaumer_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nussbaumer_mul.c; then echo $(srcdir)/nussbaumer_mul.c; else echo nussbaumer_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ perfsqr_.c: perfsqr.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/perfsqr.c; then echo $(srcdir)/perfsqr.c; else echo perfsqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ popcount_.c: popcount.c $(ANSI2KNR) @@ -552,8 +575,16 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rootrem.c; then echo $(srcdir)/rootrem.c; else echo rootrem.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ rshift_.c: rshift.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/rshift.c; then echo $(srcdir)/rshift.c; else echo rshift.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -sb_divrem_mn_.c: sb_divrem_mn.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sb_divrem_mn.c; then echo $(srcdir)/sb_divrem_mn.c; else echo sb_divrem_mn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +sbpi1_bdiv_q_.c: sbpi1_bdiv_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sbpi1_bdiv_q.c; then echo $(srcdir)/sbpi1_bdiv_q.c; else echo sbpi1_bdiv_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +sbpi1_bdiv_qr_.c: sbpi1_bdiv_qr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sbpi1_bdiv_qr.c; then echo $(srcdir)/sbpi1_bdiv_qr.c; else echo sbpi1_bdiv_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +sbpi1_div_q_.c: sbpi1_div_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sbpi1_div_q.c; then echo $(srcdir)/sbpi1_div_q.c; else echo sbpi1_div_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +sbpi1_div_qr_.c: sbpi1_div_qr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sbpi1_div_qr.c; then echo $(srcdir)/sbpi1_div_qr.c; else echo sbpi1_div_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +sbpi1_divappr_q_.c: sbpi1_divappr_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sbpi1_divappr_q.c; then echo $(srcdir)/sbpi1_divappr_q.c; else echo sbpi1_divappr_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ scan0_.c: scan0.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/scan0.c; then echo $(srcdir)/scan0.c; else echo scan0.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ scan1_.c: scan1.c $(ANSI2KNR) @@ -564,6 +595,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqr_basecase.c; then echo $(srcdir)/sqr_basecase.c; else echo sqr_basecase.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ sqr_diagonal_.c: sqr_diagonal.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqr_diagonal.c; then echo $(srcdir)/sqr_diagonal.c; else echo sqr_diagonal.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +sqrmod_bnm1_.c: sqrmod_bnm1.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqrmod_bnm1.c; then echo $(srcdir)/sqrmod_bnm1.c; else echo sqrmod_bnm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ sqrtrem_.c: sqrtrem.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqrtrem.c; then echo $(srcdir)/sqrtrem.c; else echo sqrtrem.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ sub_.c: sub.c $(ANSI2KNR) @@ -576,6 +609,64 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/submul_1.c; then echo $(srcdir)/submul_1.c; else echo submul_1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ tdiv_qr_.c: tdiv_qr.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tdiv_qr.c; then echo $(srcdir)/tdiv_qr.c; else echo tdiv_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom22_mul_.c: toom22_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom22_mul.c; then echo $(srcdir)/toom22_mul.c; else echo toom22_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom2_sqr_.c: toom2_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom2_sqr.c; then echo $(srcdir)/toom2_sqr.c; else echo toom2_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom32_mul_.c: toom32_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom32_mul.c; then echo $(srcdir)/toom32_mul.c; else echo toom32_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom33_mul_.c: toom33_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom33_mul.c; then echo $(srcdir)/toom33_mul.c; else echo toom33_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom3_sqr_.c: toom3_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom3_sqr.c; then echo $(srcdir)/toom3_sqr.c; else echo toom3_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom42_mul_.c: toom42_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom42_mul.c; then echo $(srcdir)/toom42_mul.c; else echo toom42_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom43_mul_.c: toom43_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom43_mul.c; then echo $(srcdir)/toom43_mul.c; else echo toom43_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom44_mul_.c: toom44_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom44_mul.c; then echo $(srcdir)/toom44_mul.c; else echo toom44_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom4_sqr_.c: toom4_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom4_sqr.c; then echo $(srcdir)/toom4_sqr.c; else echo toom4_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom52_mul_.c: toom52_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom52_mul.c; then echo $(srcdir)/toom52_mul.c; else echo toom52_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom53_mul_.c: toom53_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom53_mul.c; then echo $(srcdir)/toom53_mul.c; else echo toom53_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom62_mul_.c: toom62_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom62_mul.c; then echo $(srcdir)/toom62_mul.c; else echo toom62_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom63_mul_.c: toom63_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom63_mul.c; then echo $(srcdir)/toom63_mul.c; else echo toom63_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom6_sqr_.c: toom6_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom6_sqr.c; then echo $(srcdir)/toom6_sqr.c; else echo toom6_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom6h_mul_.c: toom6h_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom6h_mul.c; then echo $(srcdir)/toom6h_mul.c; else echo toom6h_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom8_sqr_.c: toom8_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom8_sqr.c; then echo $(srcdir)/toom8_sqr.c; else echo toom8_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom8h_mul_.c: toom8h_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom8h_mul.c; then echo $(srcdir)/toom8h_mul.c; else echo toom8h_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_couple_handling_.c: toom_couple_handling.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_couple_handling.c; then echo $(srcdir)/toom_couple_handling.c; else echo toom_couple_handling.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_eval_dgr3_pm1_.c: toom_eval_dgr3_pm1.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_eval_dgr3_pm1.c; then echo $(srcdir)/toom_eval_dgr3_pm1.c; else echo toom_eval_dgr3_pm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_eval_dgr3_pm2_.c: toom_eval_dgr3_pm2.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_eval_dgr3_pm2.c; then echo $(srcdir)/toom_eval_dgr3_pm2.c; else echo toom_eval_dgr3_pm2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_eval_pm1_.c: toom_eval_pm1.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_eval_pm1.c; then echo $(srcdir)/toom_eval_pm1.c; else echo toom_eval_pm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_eval_pm2exp_.c: toom_eval_pm2exp.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_eval_pm2exp.c; then echo $(srcdir)/toom_eval_pm2exp.c; else echo toom_eval_pm2exp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_eval_pm2rexp_.c: toom_eval_pm2rexp.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_eval_pm2rexp.c; then echo $(srcdir)/toom_eval_pm2rexp.c; else echo toom_eval_pm2rexp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_interpolate_12pts_.c: toom_interpolate_12pts.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_interpolate_12pts.c; then echo $(srcdir)/toom_interpolate_12pts.c; else echo toom_interpolate_12pts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_interpolate_16pts_.c: toom_interpolate_16pts.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_interpolate_16pts.c; then echo $(srcdir)/toom_interpolate_16pts.c; else echo toom_interpolate_16pts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_interpolate_5pts_.c: toom_interpolate_5pts.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_interpolate_5pts.c; then echo $(srcdir)/toom_interpolate_5pts.c; else echo toom_interpolate_5pts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_interpolate_6pts_.c: toom_interpolate_6pts.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_interpolate_6pts.c; then echo $(srcdir)/toom_interpolate_6pts.c; else echo toom_interpolate_6pts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_interpolate_7pts_.c: toom_interpolate_7pts.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_interpolate_7pts.c; then echo $(srcdir)/toom_interpolate_7pts.c; else echo toom_interpolate_7pts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom_interpolate_8pts_.c: toom_interpolate_8pts.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom_interpolate_8pts.c; then echo $(srcdir)/toom_interpolate_8pts.c; else echo toom_interpolate_8pts.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ udiv_qrnnd_.c: udiv_qrnnd.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/udiv_qrnnd.c; then echo $(srcdir)/udiv_qrnnd.c; else echo udiv_qrnnd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ udiv_w_sdiv_.c: udiv_w_sdiv.c $(ANSI2KNR) @@ -590,18 +681,22 @@ addmul_4_.lo addmul_5_.$(OBJEXT) addmul_5_.lo addmul_6_.$(OBJEXT) \ addmul_6_.lo addmul_7_.$(OBJEXT) addmul_7_.lo addmul_8_.$(OBJEXT) \ addmul_8_.lo and_n_.$(OBJEXT) and_n_.lo andn_n_.$(OBJEXT) andn_n_.lo \ -bdivmod_.$(OBJEXT) bdivmod_.lo cmp_.$(OBJEXT) cmp_.lo com_n_.$(OBJEXT) \ -com_n_.lo copyd_.$(OBJEXT) copyd_.lo copyi_.$(OBJEXT) copyi_.lo \ -dc_divrem_n_.$(OBJEXT) dc_divrem_n_.lo dive_1_.$(OBJEXT) dive_1_.lo \ -diveby3_.$(OBJEXT) diveby3_.lo divis_.$(OBJEXT) divis_.lo \ -divrem_.$(OBJEXT) divrem_.lo divrem_1_.$(OBJEXT) divrem_1_.lo \ -divrem_2_.$(OBJEXT) divrem_2_.lo dump_.$(OBJEXT) dump_.lo \ -fib2_ui_.$(OBJEXT) fib2_ui_.lo fib_table_.$(OBJEXT) fib_table_.lo \ -gcd_.$(OBJEXT) gcd_.lo gcd_1_.$(OBJEXT) gcd_1_.lo gcdext_.$(OBJEXT) \ -gcdext_.lo get_d_.$(OBJEXT) get_d_.lo get_str_.$(OBJEXT) get_str_.lo \ +binvert_.$(OBJEXT) binvert_.lo cmp_.$(OBJEXT) cmp_.lo com_.$(OBJEXT) \ +com_.lo copyd_.$(OBJEXT) copyd_.lo copyi_.$(OBJEXT) copyi_.lo \ +dcpi1_bdiv_q_.$(OBJEXT) dcpi1_bdiv_q_.lo dcpi1_bdiv_qr_.$(OBJEXT) \ +dcpi1_bdiv_qr_.lo dcpi1_div_q_.$(OBJEXT) dcpi1_div_q_.lo \ +dcpi1_div_qr_.$(OBJEXT) dcpi1_div_qr_.lo dcpi1_divappr_q_.$(OBJEXT) \ +dcpi1_divappr_q_.lo dive_1_.$(OBJEXT) dive_1_.lo diveby3_.$(OBJEXT) \ +diveby3_.lo divis_.$(OBJEXT) divis_.lo divrem_.$(OBJEXT) divrem_.lo \ +divrem_1_.$(OBJEXT) divrem_1_.lo divrem_2_.$(OBJEXT) divrem_2_.lo \ +dump_.$(OBJEXT) dump_.lo fib2_ui_.$(OBJEXT) fib2_ui_.lo \ +fib_table_.$(OBJEXT) fib_table_.lo gcd_.$(OBJEXT) gcd_.lo \ +gcd_1_.$(OBJEXT) gcd_1_.lo gcdext_.$(OBJEXT) gcdext_.lo \ +get_d_.$(OBJEXT) get_d_.lo get_str_.$(OBJEXT) get_str_.lo \ hamdist_.$(OBJEXT) hamdist_.lo hgcd_.$(OBJEXT) hgcd_.lo \ -hgcd2_.$(OBJEXT) hgcd2_.lo invert_limb_.$(OBJEXT) invert_limb_.lo \ -ior_n_.$(OBJEXT) ior_n_.lo iorn_n_.$(OBJEXT) iorn_n_.lo \ +hgcd2_.$(OBJEXT) hgcd2_.lo invert_.$(OBJEXT) invert_.lo \ +invert_limb_.$(OBJEXT) invert_limb_.lo invertappr_.$(OBJEXT) \ +invertappr_.lo ior_n_.$(OBJEXT) ior_n_.lo iorn_n_.$(OBJEXT) iorn_n_.lo \ jacbase_.$(OBJEXT) jacbase_.lo lshift_.$(OBJEXT) lshift_.lo \ matrix22_mul_.$(OBJEXT) matrix22_mul_.lo mod_1_.$(OBJEXT) mod_1_.lo \ mod_1_1_.$(OBJEXT) mod_1_1_.lo mod_1_2_.$(OBJEXT) mod_1_2_.lo \ @@ -611,21 +706,46 @@ mul_1_.$(OBJEXT) mul_1_.lo mul_2_.$(OBJEXT) mul_2_.lo mul_3_.$(OBJEXT) \ mul_3_.lo mul_4_.$(OBJEXT) mul_4_.lo mul_basecase_.$(OBJEXT) \ mul_basecase_.lo mul_fft_.$(OBJEXT) mul_fft_.lo mul_n_.$(OBJEXT) \ -mul_n_.lo mul_toom22_.$(OBJEXT) mul_toom22_.lo mul_toom32_.$(OBJEXT) \ -mul_toom32_.lo mul_toom42_.$(OBJEXT) mul_toom42_.lo \ -mullow_basecase_.$(OBJEXT) mullow_basecase_.lo mullow_n_.$(OBJEXT) \ -mullow_n_.lo nand_n_.$(OBJEXT) nand_n_.lo neg_n_.$(OBJEXT) neg_n_.lo \ -nior_n_.$(OBJEXT) nior_n_.lo perfsqr_.$(OBJEXT) perfsqr_.lo \ -popcount_.$(OBJEXT) popcount_.lo pow_1_.$(OBJEXT) pow_1_.lo \ -pre_divrem_1_.$(OBJEXT) pre_divrem_1_.lo pre_mod_1_.$(OBJEXT) \ -pre_mod_1_.lo random_.$(OBJEXT) random_.lo random2_.$(OBJEXT) \ -random2_.lo rootrem_.$(OBJEXT) rootrem_.lo rshift_.$(OBJEXT) \ -rshift_.lo sb_divrem_mn_.$(OBJEXT) sb_divrem_mn_.lo scan0_.$(OBJEXT) \ +mul_n_.lo mullo_basecase_.$(OBJEXT) mullo_basecase_.lo \ +mullo_n_.$(OBJEXT) mullo_n_.lo mulmod_bnm1_.$(OBJEXT) mulmod_bnm1_.lo \ +nand_n_.$(OBJEXT) nand_n_.lo neg_.$(OBJEXT) neg_.lo nior_n_.$(OBJEXT) \ +nior_n_.lo nussbaumer_mul_.$(OBJEXT) nussbaumer_mul_.lo \ +perfsqr_.$(OBJEXT) perfsqr_.lo popcount_.$(OBJEXT) popcount_.lo \ +pow_1_.$(OBJEXT) pow_1_.lo pre_divrem_1_.$(OBJEXT) pre_divrem_1_.lo \ +pre_mod_1_.$(OBJEXT) pre_mod_1_.lo random_.$(OBJEXT) random_.lo \ +random2_.$(OBJEXT) random2_.lo rootrem_.$(OBJEXT) rootrem_.lo \ +rshift_.$(OBJEXT) rshift_.lo sbpi1_bdiv_q_.$(OBJEXT) sbpi1_bdiv_q_.lo \ +sbpi1_bdiv_qr_.$(OBJEXT) sbpi1_bdiv_qr_.lo sbpi1_div_q_.$(OBJEXT) \ +sbpi1_div_q_.lo sbpi1_div_qr_.$(OBJEXT) sbpi1_div_qr_.lo \ +sbpi1_divappr_q_.$(OBJEXT) sbpi1_divappr_q_.lo scan0_.$(OBJEXT) \ scan0_.lo scan1_.$(OBJEXT) scan1_.lo set_str_.$(OBJEXT) set_str_.lo \ sqr_basecase_.$(OBJEXT) sqr_basecase_.lo sqr_diagonal_.$(OBJEXT) \ -sqr_diagonal_.lo sqrtrem_.$(OBJEXT) sqrtrem_.lo sub_.$(OBJEXT) sub_.lo \ -sub_1_.$(OBJEXT) sub_1_.lo sub_n_.$(OBJEXT) sub_n_.lo \ -submul_1_.$(OBJEXT) submul_1_.lo tdiv_qr_.$(OBJEXT) tdiv_qr_.lo \ +sqr_diagonal_.lo sqrmod_bnm1_.$(OBJEXT) sqrmod_bnm1_.lo \ +sqrtrem_.$(OBJEXT) sqrtrem_.lo sub_.$(OBJEXT) sub_.lo sub_1_.$(OBJEXT) \ +sub_1_.lo sub_n_.$(OBJEXT) sub_n_.lo submul_1_.$(OBJEXT) submul_1_.lo \ +tdiv_qr_.$(OBJEXT) tdiv_qr_.lo toom22_mul_.$(OBJEXT) toom22_mul_.lo \ +toom2_sqr_.$(OBJEXT) toom2_sqr_.lo toom32_mul_.$(OBJEXT) \ +toom32_mul_.lo toom33_mul_.$(OBJEXT) toom33_mul_.lo \ +toom3_sqr_.$(OBJEXT) toom3_sqr_.lo toom42_mul_.$(OBJEXT) \ +toom42_mul_.lo toom43_mul_.$(OBJEXT) toom43_mul_.lo \ +toom44_mul_.$(OBJEXT) toom44_mul_.lo toom4_sqr_.$(OBJEXT) \ +toom4_sqr_.lo toom52_mul_.$(OBJEXT) toom52_mul_.lo \ +toom53_mul_.$(OBJEXT) toom53_mul_.lo toom62_mul_.$(OBJEXT) \ +toom62_mul_.lo toom63_mul_.$(OBJEXT) toom63_mul_.lo \ +toom6_sqr_.$(OBJEXT) toom6_sqr_.lo toom6h_mul_.$(OBJEXT) \ +toom6h_mul_.lo toom8_sqr_.$(OBJEXT) toom8_sqr_.lo \ +toom8h_mul_.$(OBJEXT) toom8h_mul_.lo toom_couple_handling_.$(OBJEXT) \ +toom_couple_handling_.lo toom_eval_dgr3_pm1_.$(OBJEXT) \ +toom_eval_dgr3_pm1_.lo toom_eval_dgr3_pm2_.$(OBJEXT) \ +toom_eval_dgr3_pm2_.lo toom_eval_pm1_.$(OBJEXT) toom_eval_pm1_.lo \ +toom_eval_pm2exp_.$(OBJEXT) toom_eval_pm2exp_.lo \ +toom_eval_pm2rexp_.$(OBJEXT) toom_eval_pm2rexp_.lo \ +toom_interpolate_12pts_.$(OBJEXT) toom_interpolate_12pts_.lo \ +toom_interpolate_16pts_.$(OBJEXT) toom_interpolate_16pts_.lo \ +toom_interpolate_5pts_.$(OBJEXT) toom_interpolate_5pts_.lo \ +toom_interpolate_6pts_.$(OBJEXT) toom_interpolate_6pts_.lo \ +toom_interpolate_7pts_.$(OBJEXT) toom_interpolate_7pts_.lo \ +toom_interpolate_8pts_.$(OBJEXT) toom_interpolate_8pts_.lo \ udiv_qrnnd_.$(OBJEXT) udiv_qrnnd_.lo udiv_w_sdiv_.$(OBJEXT) \ udiv_w_sdiv_.lo xnor_n_.$(OBJEXT) xnor_n_.lo xor_n_.$(OBJEXT) \ xor_n_.lo : $(ANSI2KNR) diff -Nru gmp-4.3.2+dfsg/mpn/minithres/gmp-mparam.h gmp-5.0.2+dfsg/mpn/minithres/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/minithres/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/minithres/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,7 @@ /* Minimal values gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 2000, 2006, 2008 Free Software Foundation, Inc. +Copyright 1991, 1993, 1994, 2000, 2006, 2008, 2009, 2010 Free Software +Foundation, Inc. This file is part of the GNU MP Library. @@ -20,45 +21,75 @@ /* The values in this file are not currently minimal. Trimming them further would be good. */ -#define MUL_KARATSUBA_THRESHOLD 8 -#define MUL_TOOM3_THRESHOLD 20 -#define MUL_TOOM44_THRESHOLD 24 - -#define SQR_BASECASE_THRESHOLD 0 -#define SQR_KARATSUBA_THRESHOLD 8 -#define SQR_TOOM3_THRESHOLD 20 -#define SQR_TOOM4_THRESHOLD 24 - -#define MULLOW_BASECASE_THRESHOLD 0 -#define MULLOW_DC_THRESHOLD 2 -#define MULLOW_MUL_N_THRESHOLD 4 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 6 -#define POWM_THRESHOLD 4 - -#define HGCD_THRESHOLD 10 -#define GCD_DC_THRESHOLD 20 -#define GCDEXT_SCHOENHAGE_THRESHOLD 20 -#define JACOBI_BASE_METHOD 1 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define USE_PREINV_DIVREM_1 1 /* native */ -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 4 -#define GET_STR_PRECOMPUTE_THRESHOLD 10 -#define SET_STR_THRESHOLD 64 -#define SET_STR_PRECOMPUTE_THRESHOLD 100 +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1_1_THRESHOLD 2 +#define MOD_1_2_THRESHOLD 3 +#define MOD_1_4_THRESHOLD 4 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define USE_PREINV_MOD_1 1 +#define DIVREM_2_THRESHOLD 0 /* always */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ + +#define MUL_TOOM22_THRESHOLD 8 +#define MUL_TOOM33_THRESHOLD 20 +#define MUL_TOOM44_THRESHOLD 24 +#define MUL_TOOM6H_THRESHOLD 200 /* FIXME */ +#define MUL_TOOM8H_THRESHOLD 86 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 50 /* FIXME */ +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 50 /* FIXME */ +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 50 /* FIXME */ +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 50 /* FIXME */ + +#define SQR_BASECASE_THRESHOLD 0 +#define SQR_TOOM2_THRESHOLD 8 +#define SQR_TOOM3_THRESHOLD 20 +#define SQR_TOOM4_THRESHOLD 24 +#define SQR_TOOM6H_THRESHOLD 200 /* FIXME */ +#define SQR_TOOM8H_THRESHOLD 86 -#define MUL_FFT_TABLE {64-1, 256-1, 1024-1, 4096-1, 8192-1, 65536-1, 0} +#define MULMOD_BNM1_THRESHOLD 10 +#define SQRMOD_BNM1_THRESHOLD 10 + +#define MUL_FFT_TABLE {64, 256, 1024, 4096, 8192, 65536, 0} #define MUL_FFT_MODF_THRESHOLD 65 #define MUL_FFT_THRESHOLD 200 -#define SQR_FFT_TABLE {64-1, 256-1, 1024-1, 4096-1, 8192-1, 65536-1, 0} +#define SQR_FFT_TABLE {64, 256, 1024, 4096, 8192, 65536, 0} #define SQR_FFT_MODF_THRESHOLD 65 #define SQR_FFT_THRESHOLD 200 + +#define MULLO_BASECASE_THRESHOLD 0 +#define MULLO_DC_THRESHOLD 2 +#define MULLO_MUL_N_THRESHOLD 4 + +#define DC_DIV_QR_THRESHOLD 6 +#define DC_DIVAPPR_Q_THRESHOLD 6 +#define DC_BDIV_QR_THRESHOLD 4 +#define DC_BDIV_Q_THRESHOLD 4 + +#define INV_MULMOD_BNM1_THRESHOLD 2 +#define INV_NEWTON_THRESHOLD 6 +#define INV_APPR_THRESHOLD 4 + +#define BINV_NEWTON_THRESHOLD 6 +#define REDC_1_TO_REDC_N_THRESHOLD 4 + +#define MU_DIV_QR_THRESHOLD 8 +#define MU_DIVAPPR_Q_THRESHOLD 8 +#define MUPI_DIV_QR_THRESHOLD 8 +#define MU_BDIV_QR_THRESHOLD 8 +#define MU_BDIV_Q_THRESHOLD 8 + +#define MATRIX22_STRASSEN_THRESHOLD 2 +#define HGCD_THRESHOLD 10 +#define GCD_DC_THRESHOLD 20 +#define GCDEXT_SCHOENHAGE_THRESHOLD 20 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 4 +#define GET_STR_PRECOMPUTE_THRESHOLD 10 +#define SET_STR_THRESHOLD 64 +#define SET_STR_PRECOMPUTE_THRESHOLD 100 diff -Nru gmp-4.3.2+dfsg/mpn/mips32/gmp-mparam.h gmp-5.0.2+dfsg/mpn/mips32/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/mips32/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/mips32/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -19,17 +19,17 @@ with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 /* Generated by tuneup.c, 2002-02-20, gcc 2.95 (R3000) */ -#define MUL_KARATSUBA_THRESHOLD 20 -#define MUL_TOOM3_THRESHOLD 50 +#define MUL_TOOM22_THRESHOLD 20 +#define MUL_TOOM33_THRESHOLD 50 #define SQR_BASECASE_THRESHOLD 7 -#define SQR_KARATSUBA_THRESHOLD 57 +#define SQR_TOOM2_THRESHOLD 57 #define SQR_TOOM3_THRESHOLD 78 #define DIV_SB_PREINV_THRESHOLD 0 /* always */ diff -Nru gmp-4.3.2+dfsg/mpn/mips64/gmp-mparam.h gmp-5.0.2+dfsg/mpn/mips64/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/mips64/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/mips64/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -19,17 +19,17 @@ with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 /* Generated by tuneup.c, 2004-02-10, gcc 3.2 & MIPSpro C 7.2.1 (R1x000) */ -#define MUL_KARATSUBA_THRESHOLD 16 -#define MUL_TOOM3_THRESHOLD 89 +#define MUL_TOOM22_THRESHOLD 16 +#define MUL_TOOM33_THRESHOLD 89 #define SQR_BASECASE_THRESHOLD 6 -#define SQR_KARATSUBA_THRESHOLD 32 +#define SQR_TOOM2_THRESHOLD 32 #define SQR_TOOM3_THRESHOLD 98 #define DIV_SB_PREINV_THRESHOLD 0 /* always */ diff -Nru gmp-4.3.2+dfsg/mpn/pa32/gmp-mparam.h gmp-5.0.2+dfsg/mpn/pa32/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/pa32/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/pa32/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,21 +18,21 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 /* These values are for the PA7100 using GCC. */ /* Generated by tuneup.c, 2000-10-27. */ -#ifndef MUL_KARATSUBA_THRESHOLD -#define MUL_KARATSUBA_THRESHOLD 30 +#ifndef MUL_TOOM22_THRESHOLD +#define MUL_TOOM22_THRESHOLD 30 #endif -#ifndef MUL_TOOM3_THRESHOLD -#define MUL_TOOM3_THRESHOLD 141 +#ifndef MUL_TOOM33_THRESHOLD +#define MUL_TOOM33_THRESHOLD 141 #endif -#ifndef SQR_KARATSUBA_THRESHOLD -#define SQR_KARATSUBA_THRESHOLD 59 +#ifndef SQR_TOOM2_THRESHOLD +#define SQR_TOOM2_THRESHOLD 59 #endif #ifndef SQR_TOOM3_THRESHOLD #define SQR_TOOM3_THRESHOLD 177 diff -Nru gmp-4.3.2+dfsg/mpn/pa32/hppa1_1/gmp-mparam.h gmp-5.0.2+dfsg/mpn/pa32/hppa1_1/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/pa32/hppa1_1/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/pa32/hppa1_1/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,16 +18,16 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 /* Generated by tuneup.c, 2004-02-07, gcc 2.8 (pa7100/100MHz) */ -#define MUL_KARATSUBA_THRESHOLD 30 -#define MUL_TOOM3_THRESHOLD 89 +#define MUL_TOOM22_THRESHOLD 30 +#define MUL_TOOM33_THRESHOLD 89 #define SQR_BASECASE_THRESHOLD 4 -#define SQR_KARATSUBA_THRESHOLD 55 +#define SQR_TOOM2_THRESHOLD 55 #define SQR_TOOM3_THRESHOLD 101 #define DIV_SB_PREINV_THRESHOLD 0 /* always */ diff -Nru gmp-4.3.2+dfsg/mpn/pa32/hppa2_0/gmp-mparam.h gmp-5.0.2+dfsg/mpn/pa32/hppa2_0/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/pa32/hppa2_0/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/pa32/hppa2_0/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2009 Free Software +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,56 +18,140 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 -/* Generated by tuneup.c, 2009-03-05, gcc 4.3 */ +/* 552 MHz PA8600 (gcc61.fsffrance.org) */ -#define MUL_KARATSUBA_THRESHOLD 15 -#define MUL_TOOM3_THRESHOLD 98 -#define MUL_TOOM44_THRESHOLD 158 - -#define SQR_BASECASE_THRESHOLD 6 -#define SQR_KARATSUBA_THRESHOLD 48 -#define SQR_TOOM3_THRESHOLD 97 -#define SQR_TOOM4_THRESHOLD 232 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 92 -#define MULLOW_MUL_N_THRESHOLD 363 - -#define DIV_SB_PREINV_THRESHOLD 4 -#define DIV_DC_THRESHOLD 92 -#define POWM_THRESHOLD 142 - -#define MATRIX22_STRASSEN_THRESHOLD 17 -#define HGCD_THRESHOLD 100 -#define GCD_DC_THRESHOLD 365 -#define GCDEXT_DC_THRESHOLD 339 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 3 -#define DIVREM_1_UNNORM_THRESHOLD 5 -#define MOD_1_NORM_THRESHOLD 4 -#define MOD_1_UNNORM_THRESHOLD 5 -#define MOD_1_1_THRESHOLD 6 -#define MOD_1_2_THRESHOLD 9 -#define MOD_1_4_THRESHOLD 24 -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD MP_SIZE_T_MAX /* never */ - -#define GET_STR_DC_THRESHOLD 8 -#define GET_STR_PRECOMPUTE_THRESHOLD 13 -#define SET_STR_DC_THRESHOLD 224 -#define SET_STR_PRECOMPUTE_THRESHOLD 702 - -#define MUL_FFT_TABLE { 272, 672, 896, 2560, 6144, 24576, 98304, 393216, 0 } -#define MUL_FFT_MODF_THRESHOLD 232 -#define MUL_FFT_THRESHOLD 1792 - -#define SQR_FFT_TABLE { 304, 672, 1152, 2560, 10240, 24576, 98304, 393216, 0 } -#define SQR_FFT_MODF_THRESHOLD 232 -#define SQR_FFT_THRESHOLD 1792 +#define DIVREM_1_NORM_THRESHOLD 3 +#define DIVREM_1_UNNORM_THRESHOLD 4 +#define MOD_1_NORM_THRESHOLD 3 +#define MOD_1_UNNORM_THRESHOLD 4 +#define MOD_1N_TO_MOD_1_1_THRESHOLD 14 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 8 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 18 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 22 +#define USE_PREINV_DIVREM_1 1 +#define DIVREM_2_THRESHOLD 0 /* always */ +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD 31 + +#define MUL_TOOM22_THRESHOLD 15 +#define MUL_TOOM33_THRESHOLD 91 +#define MUL_TOOM44_THRESHOLD 154 +#define MUL_TOOM6H_THRESHOLD 204 +#define MUL_TOOM8H_THRESHOLD 482 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 97 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 103 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 109 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 103 + +#define SQR_BASECASE_THRESHOLD 6 +#define SQR_TOOM2_THRESHOLD 47 +#define SQR_TOOM3_THRESHOLD 93 +#define SQR_TOOM4_THRESHOLD 250 +#define SQR_TOOM6_THRESHOLD 278 +#define SQR_TOOM8_THRESHOLD 502 + +#define MULMOD_BNM1_THRESHOLD 13 +#define SQRMOD_BNM1_THRESHOLD 15 + +#define MUL_FFT_MODF_THRESHOLD 244 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 244, 5}, { 8, 4}, { 17, 5}, { 13, 6}, \ + { 7, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 13, 7}, { 7, 6}, { 17, 7}, { 9, 6}, \ + { 19, 7}, { 11, 6}, { 24, 7}, { 13, 8}, \ + { 7, 7}, { 19, 8}, { 11, 7}, { 25, 8}, \ + { 15, 7}, { 33, 8}, { 23, 9}, { 15, 8}, \ + { 39, 9}, { 23,10}, { 15, 9}, { 31, 8}, \ + { 67, 9}, { 39, 8}, { 79, 9}, { 47,10}, \ + { 31, 9}, { 71, 8}, { 143, 9}, { 79,10}, \ + { 47,11}, { 31,10}, { 63, 9}, { 127, 8}, \ + { 255, 9}, { 135, 8}, { 271, 9}, { 143,10}, \ + { 79, 9}, { 159, 8}, { 319, 9}, { 175, 8}, \ + { 351,10}, { 95, 9}, { 191, 8}, { 383, 9}, \ + { 207,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511, 9}, { 271,10}, { 143, 9}, { 287, 8}, \ + { 575,10}, { 159, 9}, { 319,10}, { 175, 9}, \ + { 351,11}, { 95,10}, { 191, 9}, { 383,10}, \ + { 207, 9}, { 415,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 511,10}, { 271, 9}, { 543, 8}, \ + { 1087,10}, { 287, 9}, { 575,10}, { 303,11}, \ + { 159,10}, { 351, 9}, { 703, 8}, { 1407,11}, \ + { 191,10}, { 415, 9}, { 831,11}, { 223, 9}, \ + { 895,10}, { 479,12}, { 127,11}, { 255,10}, \ + { 543, 9}, { 1087,11}, { 287,10}, { 607, 9}, \ + { 1215,11}, { 351,10}, { 703, 9}, { 1407,12}, \ + { 191,11}, { 415,10}, { 831,11}, { 479,13}, \ + { 8192,14}, { 16384,15}, { 32768,16} } +#define MUL_FFT_TABLE3_SIZE 107 +#define MUL_FFT_THRESHOLD 2112 + +#define SQR_FFT_MODF_THRESHOLD 240 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 240, 5}, { 8, 4}, { 17, 5}, { 19, 6}, \ + { 17, 7}, { 9, 6}, { 20, 7}, { 11, 6}, \ + { 23, 7}, { 13, 8}, { 7, 7}, { 19, 8}, \ + { 11, 7}, { 25, 8}, { 15, 7}, { 33, 8}, \ + { 19, 7}, { 39, 8}, { 23, 9}, { 15, 8}, \ + { 39, 9}, { 23,10}, { 15, 9}, { 31, 8}, \ + { 63, 9}, { 47,10}, { 31, 9}, { 63, 8}, \ + { 127, 9}, { 71, 8}, { 143, 9}, { 79,10}, \ + { 47,11}, { 31,10}, { 63, 9}, { 127, 8}, \ + { 255, 7}, { 511, 9}, { 135, 8}, { 271, 9}, \ + { 143,10}, { 79, 9}, { 159, 8}, { 319, 9}, \ + { 175, 8}, { 351, 7}, { 703,10}, { 95, 9}, \ + { 191, 8}, { 383, 9}, { 207,11}, { 63,10}, \ + { 127, 9}, { 255, 8}, { 511, 9}, { 271,10}, \ + { 143, 9}, { 287, 8}, { 575,10}, { 159, 9}, \ + { 319,10}, { 175, 9}, { 351, 8}, { 703,11}, \ + { 95,10}, { 191, 9}, { 383,10}, { 207, 9}, \ + { 415,12}, { 63,11}, { 127,10}, { 255, 9}, \ + { 511,10}, { 271, 9}, { 543, 8}, { 1087,10}, \ + { 287, 9}, { 575,11}, { 159,10}, { 319, 9}, \ + { 639,10}, { 351, 9}, { 703, 8}, { 1407,11}, \ + { 191,10}, { 415, 9}, { 831,11}, { 223, 8}, \ + { 1791,10}, { 479, 9}, { 959,12}, { 127,11}, \ + { 255,10}, { 543,11}, { 287,10}, { 607,11}, \ + { 319,10}, { 639,11}, { 351,10}, { 703, 9}, \ + { 1407,12}, { 191,11}, { 415,10}, { 831,11}, \ + { 479,10}, { 959,13}, { 8192,14}, { 16384,15}, \ + { 32768,16} } +#define SQR_FFT_TABLE3_SIZE 109 +#define SQR_FFT_THRESHOLD 1600 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 90 +#define MULLO_MUL_N_THRESHOLD 4167 + +#define DC_DIV_QR_THRESHOLD 100 +#define DC_DIVAPPR_Q_THRESHOLD 342 +#define DC_BDIV_QR_THRESHOLD 119 +#define DC_BDIV_Q_THRESHOLD 246 + +#define INV_MULMOD_BNM1_THRESHOLD 12 +#define INV_NEWTON_THRESHOLD 274 +#define INV_APPR_THRESHOLD 268 + +#define BINV_NEWTON_THRESHOLD 327 +#define REDC_1_TO_REDC_N_THRESHOLD 70 + +#define MU_DIV_QR_THRESHOLD 979 +#define MU_DIVAPPR_Q_THRESHOLD 1142 +#define MUPI_DIV_QR_THRESHOLD 100 +#define MU_BDIV_QR_THRESHOLD 667 +#define MU_BDIV_Q_THRESHOLD 1187 + +#define MATRIX22_STRASSEN_THRESHOLD 15 +#define HGCD_THRESHOLD 99 +#define GCD_DC_THRESHOLD 372 +#define GCDEXT_DC_THRESHOLD 241 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 7 +#define GET_STR_PRECOMPUTE_THRESHOLD 14 +#define SET_STR_DC_THRESHOLD 224 +#define SET_STR_PRECOMPUTE_THRESHOLD 788 diff -Nru gmp-4.3.2+dfsg/mpn/pa32/pa-defs.m4 gmp-5.0.2+dfsg/mpn/pa32/pa-defs.m4 --- gmp-4.3.2+dfsg/mpn/pa32/pa-defs.m4 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/pa32/pa-defs.m4 2011-05-08 09:49:29.000000000 +0000 @@ -22,7 +22,7 @@ dnl hppa assembler comments are introduced with ";". dnl -dnl For cooperation with cpp, aparently lines "# 123" set the line number, +dnl For cooperation with cpp, apparently lines "# 123" set the line number, dnl and other lines starting with a "#" are ignored. changecom(;) diff -Nru gmp-4.3.2+dfsg/mpn/pa64/add_n.asm gmp-5.0.2+dfsg/mpn/pa64/add_n.asm --- gmp-4.3.2+dfsg/mpn/pa64/add_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/pa64/add_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -dnl HP-PA 2.0 mpn_add_n -- Add two limb vectors of the same length > 0 and -dnl store sum in a third limb vector. - -dnl Copyright 1997, 2000, 2002, 2003 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - - -dnl This runs at 2 cycles/limb on PA8000 and 1.6875 cycles/limb on PA8500. It -dnl should be possible to reach the cache bandwith 1.5 cycles/limb at least -dnl with PA8500. The problem now is stalling of the first ADD,DC after LDO, -dnl where the processor gets confused about where carry comes from. - -include(`../config.m4') - -dnl INPUT PARAMETERS -define(`rp',`%r26') -define(`up',`%r25') -define(`vp',`%r24') -define(`n',`%r23') - -ifdef(`HAVE_ABI_2_0w', -` .level 2.0w -',` .level 2.0 -') -PROLOGUE(mpn_add_n) - sub %r0, n, %r22 - depw,z %r22, 30, 3, %r28 C r28 = 2 * (-n & 7) - depw,z %r22, 28, 3, %r22 C r22 = 8 * (-n & 7) - sub up, %r22, up C offset up - sub vp, %r22, vp C offset vp - sub rp, %r22, rp C offset rp - blr %r28, %r0 C branch into loop - add %r0, %r0, %r0 C reset carry - -LDEF(loop) - ldd 0(up), %r20 - ldd 0(vp), %r31 - add,dc %r20, %r31, %r20 - std %r20, 0(rp) -LDEF(7) ldd 8(up), %r21 - ldd 8(vp), %r19 - add,dc %r21, %r19, %r21 - std %r21, 8(rp) -LDEF(6) ldd 16(up), %r20 - ldd 16(vp), %r31 - add,dc %r20, %r31, %r20 - std %r20, 16(rp) -LDEF(5) ldd 24(up), %r21 - ldd 24(vp), %r19 - add,dc %r21, %r19, %r21 - std %r21, 24(rp) -LDEF(4) ldd 32(up), %r20 - ldd 32(vp), %r31 - add,dc %r20, %r31, %r20 - std %r20, 32(rp) -LDEF(3) ldd 40(up), %r21 - ldd 40(vp), %r19 - add,dc %r21, %r19, %r21 - std %r21, 40(rp) -LDEF(2) ldd 48(up), %r20 - ldd 48(vp), %r31 - add,dc %r20, %r31, %r20 - std %r20, 48(rp) -LDEF(1) ldd 56(up), %r21 - ldd 56(vp), %r19 - add,dc %r21, %r19, %r21 - ldo 64(up), up - std %r21, 56(rp) - ldo 64(vp), vp - addib,> -8, n, L(loop) - ldo 64(rp), rp - - add,dc %r0, %r0, %r29 - bve (%r2) -ifdef(`HAVE_ABI_2_0w', -` copy %r29, %r28 -',` ldi 0, %r28 -') -EPILOGUE(mpn_add_n) diff -Nru gmp-4.3.2+dfsg/mpn/pa64/aors_n.asm gmp-5.0.2+dfsg/mpn/pa64/aors_n.asm --- gmp-4.3.2+dfsg/mpn/pa64/aors_n.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/pa64/aors_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,119 @@ +dnl HP-PA 2.0 mpn_add_n, mpn_sub_n + +dnl Copyright 1997, 2000, 2002, 2003, 2009, 2010 Free Software Foundation, +dnl Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + + +dnl This runs at 2 cycles/limb on PA8000 and 1.6875 cycles/limb on PA8500. It +dnl should be possible to reach the cache bandwidth 1.5 cycles/limb at least +dnl with PA8500. The problem now is stalling of the first ADD,DC after LDO, +dnl where the processor gets confused about where carry comes from. + +include(`../config.m4') + +dnl INPUT PARAMETERS +define(`rp',`%r26') +define(`up',`%r25') +define(`vp',`%r24') +define(`n',`%r23') + +ifdef(`OPERATION_add_n', ` + define(ADCSBC, `add,dc') + define(INITCY, `addi -1,%r22,%r0') + define(func, mpn_add_n) + define(func_nc, mpn_add_nc)') +ifdef(`OPERATION_sub_n', ` + define(ADCSBC, `sub,db') + define(INITCY, `subi 0,%r22,%r0') + define(func, mpn_sub_n) + define(func_nc, mpn_sub_nc)') + +MULFUNC_PROLOGUE(mpn_add_n mpn_add_nc mpn_sub_n mpn_sub_nc) + +ifdef(`HAVE_ABI_2_0w', +` .level 2.0w +',` .level 2.0 +') +PROLOGUE(func_nc) +ifdef(`HAVE_ABI_2_0w', +` b L(com) + nop +',` b L(com) + ldw -52(%r30), %r22 +') +EPILOGUE() +PROLOGUE(func) + ldi 0, %r22 +LDEF(com) + sub %r0, n, %r21 + depw,z %r21, 30, 3, %r28 C r28 = 2 * (-n & 7) + depw,z %r21, 28, 3, %r21 C r21 = 8 * (-n & 7) + sub up, %r21, up C offset up + sub vp, %r21, vp C offset vp + sub rp, %r21, rp C offset rp + blr %r28, %r0 C branch into loop + INITCY + +LDEF(loop) + ldd 0(up), %r20 + ldd 0(vp), %r31 + ADCSBC %r20, %r31, %r20 + std %r20, 0(rp) +LDEF(7) ldd 8(up), %r21 + ldd 8(vp), %r19 + ADCSBC %r21, %r19, %r21 + std %r21, 8(rp) +LDEF(6) ldd 16(up), %r20 + ldd 16(vp), %r31 + ADCSBC %r20, %r31, %r20 + std %r20, 16(rp) +LDEF(5) ldd 24(up), %r21 + ldd 24(vp), %r19 + ADCSBC %r21, %r19, %r21 + std %r21, 24(rp) +LDEF(4) ldd 32(up), %r20 + ldd 32(vp), %r31 + ADCSBC %r20, %r31, %r20 + std %r20, 32(rp) +LDEF(3) ldd 40(up), %r21 + ldd 40(vp), %r19 + ADCSBC %r21, %r19, %r21 + std %r21, 40(rp) +LDEF(2) ldd 48(up), %r20 + ldd 48(vp), %r31 + ADCSBC %r20, %r31, %r20 + std %r20, 48(rp) +LDEF(1) ldd 56(up), %r21 + ldd 56(vp), %r19 + ADCSBC %r21, %r19, %r21 + ldo 64(up), up + std %r21, 56(rp) + ldo 64(vp), vp + addib,> -8, n, L(loop) + ldo 64(rp), rp + + add,dc %r0, %r0, %r29 +ifdef(`OPERATION_sub_n',` + subi 1, %r29, %r29 +') + bve (%r2) +ifdef(`HAVE_ABI_2_0w', +` copy %r29, %r28 +',` ldi 0, %r28 +') +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/pa64/gmp-mparam.h gmp-5.0.2+dfsg/mpn/pa64/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/pa64/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/pa64/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2008 -Free Software Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009, +2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,55 +18,213 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 /* 440MHz PA8200 */ -/* Generated by tuneup.c, 2009-01-04, system compiler */ - -#define MUL_KARATSUBA_THRESHOLD 30 -#define MUL_TOOM3_THRESHOLD 114 -#define MUL_TOOM44_THRESHOLD 244 - -#define SQR_BASECASE_THRESHOLD 4 -#define SQR_KARATSUBA_THRESHOLD 58 -#define SQR_TOOM3_THRESHOLD 174 -#define SQR_TOOM4_THRESHOLD 312 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 142 -#define MULLOW_MUL_N_THRESHOLD 507 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 124 -#define POWM_THRESHOLD 224 - -#define MATRIX22_STRASSEN_THRESHOLD 11 -#define HGCD_THRESHOLD 294 -#define GCD_DC_THRESHOLD 913 -#define GCDEXT_DC_THRESHOLD 830 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 0 /* always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 23 -#define GET_STR_PRECOMPUTE_THRESHOLD 26 -#define SET_STR_DC_THRESHOLD 2743 -#define SET_STR_PRECOMPUTE_THRESHOLD 5147 - -#define MUL_FFT_TABLE { 400, 800, 1600, 2816, 7168, 20480, 81920, 327680, 0 } -#define MUL_FFT_MODF_THRESHOLD 280 -#define MUL_FFT_THRESHOLD 1664 - -#define SQR_FFT_TABLE { 368, 800, 1728, 3328, 7168, 20480, 81920, 327680, 786432, 0 } -#define SQR_FFT_MODF_THRESHOLD 264 -#define SQR_FFT_THRESHOLD 1632 +#define DIVREM_1_NORM_THRESHOLD 0 /* always */ +#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define MOD_1U_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_1_TO_MOD_1_2_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define USE_PREINV_DIVREM_1 1 +#define DIVREM_2_THRESHOLD 0 /* always */ +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 30 +#define MUL_TOOM33_THRESHOLD 113 +#define MUL_TOOM44_THRESHOLD 195 +#define MUL_TOOM6H_THRESHOLD 222 +#define MUL_TOOM8H_THRESHOLD 236 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 130 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 229 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 132 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 54 + +#define SQR_BASECASE_THRESHOLD 4 +#define SQR_TOOM2_THRESHOLD 54 +#define SQR_TOOM3_THRESHOLD 169 +#define SQR_TOOM4_THRESHOLD 280 +#define SQR_TOOM6_THRESHOLD 280 +#define SQR_TOOM8_THRESHOLD 296 + +#define MULMOD_BNM1_THRESHOLD 15 +#define SQRMOD_BNM1_THRESHOLD 17 + +#define MUL_FFT_MODF_THRESHOLD 336 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 336, 5}, { 11, 4}, { 23, 5}, { 21, 6}, \ + { 11, 5}, { 23, 6}, { 21, 7}, { 11, 6}, \ + { 23, 7}, { 15, 6}, { 31, 7}, { 21, 8}, \ + { 11, 7}, { 24, 8}, { 13, 7}, { 27, 8}, \ + { 15, 7}, { 31, 8}, { 19, 7}, { 39, 8}, \ + { 27, 9}, { 15, 8}, { 33, 9}, { 19, 8}, \ + { 39, 9}, { 23, 8}, { 47, 9}, { 27,10}, \ + { 15, 9}, { 39,10}, { 23, 9}, { 51,10}, \ + { 31, 9}, { 67,10}, { 39, 9}, { 79,10}, \ + { 47, 9}, { 95,10}, { 55,11}, { 31,10}, \ + { 63, 9}, { 127,10}, { 71, 8}, { 287,10}, \ + { 79,11}, { 47,10}, { 95, 9}, { 191, 8}, \ + { 383, 7}, { 767,10}, { 103, 9}, { 207, 8}, \ + { 415, 7}, { 831,12}, { 31,11}, { 63,10}, \ + { 127, 9}, { 255, 8}, { 543, 7}, { 1087, 6}, \ + { 2175,10}, { 143, 9}, { 287, 8}, { 575,11}, \ + { 79, 9}, { 319, 8}, { 639, 7}, { 1279, 9}, \ + { 335, 8}, { 671,10}, { 175, 9}, { 351, 8}, \ + { 703,11}, { 95,10}, { 191, 9}, { 383, 8}, \ + { 767,10}, { 207, 9}, { 415, 8}, { 831, 7}, \ + { 1663,11}, { 111,10}, { 223, 9}, { 447, 8}, \ + { 895,12}, { 63,11}, { 127,10}, { 255, 9}, \ + { 543, 8}, { 1087, 7}, { 2175,10}, { 287, 9}, \ + { 575, 8}, { 1215, 7}, { 2431,10}, { 319, 9}, \ + { 639, 8}, { 1279,10}, { 335, 9}, { 671, 8}, \ + { 1343, 9}, { 703, 8}, { 1407,12}, { 95,11}, \ + { 191,10}, { 383,11}, { 207, 9}, { 831, 8}, \ + { 1663,11}, { 223,10}, { 447, 9}, { 959,13}, \ + { 63,12}, { 127,11}, { 255, 8}, { 2047,11}, \ + { 271,10}, { 543, 9}, { 1087, 8}, { 2175,11}, \ + { 287,10}, { 575, 9}, { 1215, 8}, { 2431,11}, \ + { 319,10}, { 671, 9}, { 1343, 8}, { 2687,11}, \ + { 351,10}, { 703, 9}, { 1471, 8}, { 2943,12}, \ + { 191,11}, { 383, 8}, { 3071,11}, { 415,10}, \ + { 831, 9}, { 1663,11}, { 479,10}, { 959, 9}, \ + { 1919, 8}, { 3839,13}, { 127,12}, { 255,11}, \ + { 543,10}, { 1087, 9}, { 2175,12}, { 287,11}, \ + { 607,10}, { 1215, 9}, { 2431, 8}, { 4863,12}, \ + { 319,11}, { 671,10}, { 1343,13}, { 191, 9}, \ + { 3071,12}, { 415,11}, { 831,10}, { 1663, 8}, \ + { 6655, 9}, { 3455,12}, { 447, 9}, { 3583,13}, \ + { 255,12}, { 511,11}, { 1023,10}, { 2175,13}, \ + { 319,11}, { 1279,12}, { 671,10}, { 2815,12}, \ + { 735,10}, { 2943, 9}, { 5887,13}, { 383,12}, \ + { 767,11}, { 1535,10}, { 3071,13}, { 447,10}, \ + { 3583,12}, { 959,13}, { 511,12}, { 1087,13}, \ + { 639,12}, { 1343,13}, { 767,11}, { 3071,13}, \ + { 831,12}, { 1663,11}, { 3455,10}, { 6911,13}, \ + { 895,14}, { 511,13}, { 1023,12}, { 2047,13}, \ + { 1087,12}, { 2303,13}, { 1215,12}, { 2431,14}, \ + { 639,13}, { 1279,12}, { 2559,13}, { 1343,12}, \ + { 2687,11}, { 5375,13}, { 1407,12}, { 2815,11}, \ + { 5631,12}, { 2943,13}, { 1535,12}, { 3199,13}, \ + { 1663,12}, { 3327,13}, { 1727,14}, { 895,13}, \ + { 1791,12}, { 3583,13}, { 1919,15}, { 511,14}, \ + { 1023,13}, { 2047,12}, { 4095,14}, { 1151,13}, \ + { 2431,14}, { 1279,13}, { 2687,14}, { 1407,13}, \ + { 2815,12}, { 5631,15}, { 767,14}, { 1535,13}, \ + { 3071,14}, { 1663,13}, { 3327,14}, { 1791,13}, \ + { 3583,14}, { 1919,15}, { 1023,14}, { 2303,13}, \ + { 4607,14}, { 2431,13}, { 4863,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 252 +#define MUL_FFT_THRESHOLD 2368 + +#define SQR_FFT_MODF_THRESHOLD 284 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 284, 5}, { 9, 4}, { 21, 5}, { 21, 6}, \ + { 11, 5}, { 23, 6}, { 25, 7}, { 25, 8}, \ + { 13, 7}, { 27, 8}, { 15, 7}, { 31, 8}, \ + { 27, 9}, { 15, 8}, { 33, 9}, { 19, 8}, \ + { 39, 9}, { 23, 8}, { 47, 9}, { 27,10}, \ + { 15, 9}, { 39,10}, { 23, 9}, { 51,11}, \ + { 15,10}, { 31, 9}, { 67,10}, { 39, 9}, \ + { 79,10}, { 47, 9}, { 95,10}, { 55,11}, \ + { 31,10}, { 63, 8}, { 255, 7}, { 511,10}, \ + { 71, 8}, { 287, 7}, { 575,10}, { 79,11}, \ + { 47,10}, { 95, 9}, { 191, 8}, { 383, 7}, \ + { 767,10}, { 103, 9}, { 207, 8}, { 415,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 543, 7}, { 1087, 8}, { 575, 7}, { 1151,11}, \ + { 79, 8}, { 639, 7}, { 1279, 9}, { 335, 8}, \ + { 671, 7}, { 1343,10}, { 175, 8}, { 703, 7}, \ + { 1407,11}, { 95,10}, { 191, 9}, { 383, 8}, \ + { 767,10}, { 207, 9}, { 415, 8}, { 831, 7}, \ + { 1663, 9}, { 447, 8}, { 895,12}, { 63,11}, \ + { 127,10}, { 255, 9}, { 543, 8}, { 1087, 7}, \ + { 2175, 9}, { 575, 8}, { 1151,10}, { 303, 9}, \ + { 607, 8}, { 1215, 7}, { 2431,10}, { 319, 9}, \ + { 639, 8}, { 1279, 9}, { 671, 8}, { 1343, 7}, \ + { 2687,10}, { 351, 9}, { 703, 8}, { 1407,12}, \ + { 95,11}, { 191,10}, { 383, 9}, { 767,11}, \ + { 207,10}, { 415, 9}, { 831, 8}, { 1663,11}, \ + { 223,10}, { 447, 9}, { 895,13}, { 63,11}, \ + { 255,10}, { 543, 8}, { 2175,11}, { 287,10}, \ + { 575, 9}, { 1151,10}, { 607, 9}, { 1215, 8}, \ + { 2431,11}, { 319, 9}, { 1279,10}, { 671, 9}, \ + { 1343, 8}, { 2687,11}, { 351,10}, { 703, 9}, \ + { 1407,10}, { 735,12}, { 191,11}, { 383,10}, \ + { 831, 9}, { 1663,12}, { 223,11}, { 447,10}, \ + { 895,11}, { 479, 9}, { 1919, 8}, { 3839,12}, \ + { 255,11}, { 511,10}, { 1023,11}, { 543,10}, \ + { 1087, 9}, { 2175,12}, { 287,11}, { 575,10}, \ + { 1151,11}, { 607,10}, { 1215, 9}, { 2431, 8}, \ + { 4863,10}, { 1279,11}, { 671,10}, { 1343, 9}, \ + { 2687,12}, { 351,11}, { 703,10}, { 1407,11}, \ + { 735,13}, { 191, 9}, { 3071, 7}, { 12287,11}, \ + { 799,12}, { 415,11}, { 831,10}, { 1663,12}, \ + { 447, 8}, { 7167,12}, { 479, 9}, { 3839,14}, \ + { 127,13}, { 255,12}, { 511,11}, { 1023,12}, \ + { 543,10}, { 2175, 9}, { 4607,11}, { 1215,10}, \ + { 2431,11}, { 1279,10}, { 2559,13}, { 383,12}, \ + { 767,11}, { 1535,12}, { 799,10}, { 3199, 9}, \ + { 6399,12}, { 895,13}, { 511,12}, { 1023,11}, \ + { 2047,12}, { 1087,13}, { 575,12}, { 1151,10}, \ + { 4607,13}, { 639,12}, { 1279,11}, { 2687,14}, \ + { 383,13}, { 767,11}, { 3071,12}, { 1599,13}, \ + { 895,12}, { 1791,11}, { 3583,13}, { 959,15}, \ + { 255,12}, { 2175,13}, { 1215,14}, { 639,13}, \ + { 1279,12}, { 2559,13}, { 1343,12}, { 2687,13}, \ + { 1471,11}, { 5887,14}, { 767,13}, { 1535,12}, \ + { 3071,13}, { 1599,12}, { 3199,13}, { 1663,12}, \ + { 3327,13}, { 1727,14}, { 895,13}, { 1791,12}, \ + { 3583,15}, { 511,14}, { 1023,13}, { 2175,14}, \ + { 1151,12}, { 4607,13}, { 2431,14}, { 1279,13}, \ + { 2687,14}, { 1407,13}, { 2815,15}, { 767,13}, \ + { 3199,14}, { 1663,13}, { 3327,14}, { 1791,13}, \ + { 3583,14}, { 1919,15}, { 1023,14}, { 2047,13}, \ + { 4095,14}, { 2303,13}, { 4607,14}, { 2431,15}, \ + { 32768,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ + { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ + {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 257 +#define SQR_FFT_THRESHOLD 1856 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 125 +#define MULLO_MUL_N_THRESHOLD 4658 + +#define DC_DIV_QR_THRESHOLD 123 +#define DC_DIVAPPR_Q_THRESHOLD 372 +#define DC_BDIV_QR_THRESHOLD 142 +#define DC_BDIV_Q_THRESHOLD 309 + +#define INV_MULMOD_BNM1_THRESHOLD 56 +#define INV_NEWTON_THRESHOLD 315 +#define INV_APPR_THRESHOLD 318 + +#define BINV_NEWTON_THRESHOLD 363 +#define REDC_1_TO_REDC_N_THRESHOLD 102 + +#define MU_DIV_QR_THRESHOLD 979 +#define MU_DIVAPPR_Q_THRESHOLD 998 +#define MUPI_DIV_QR_THRESHOLD 0 /* always */ +#define MU_BDIV_QR_THRESHOLD 942 +#define MU_BDIV_Q_THRESHOLD 1334 + +#define MATRIX22_STRASSEN_THRESHOLD 9 +#define HGCD_THRESHOLD 240 +#define GCD_DC_THRESHOLD 689 +#define GCDEXT_DC_THRESHOLD 538 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 21 +#define GET_STR_PRECOMPUTE_THRESHOLD 24 +#define SET_STR_DC_THRESHOLD 1951 +#define SET_STR_PRECOMPUTE_THRESHOLD 4034 diff -Nru gmp-4.3.2+dfsg/mpn/pa64/sub_n.asm gmp-5.0.2+dfsg/mpn/pa64/sub_n.asm --- gmp-4.3.2+dfsg/mpn/pa64/sub_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/pa64/sub_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,93 +0,0 @@ -dnl HP-PA 2.0 mpn_sub_n -- Subtract two limb vectors of the same length > 0 -dnl and store difference in a third limb vector. - -dnl Copyright 1997, 2000, 2002, 2003 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - - -dnl This runs at 2 cycles/limb on PA8000 and 1.6875 cycles/limb on PA8500. It -dnl should be possible to reach the cache bandwith 1.5 cycles/limb at least -dnl with PA8500. The problem now is stalling of the first SUB,DB after LDO, -dnl where the processor gets confused about where carry comes from. - -include(`../config.m4') - -dnl INPUT PARAMETERS -define(`rp',`%r26') -define(`up',`%r25') -define(`vp',`%r24') -define(`n',`%r23') - -ifdef(`HAVE_ABI_2_0w', -` .level 2.0w -',` .level 2.0 -') -PROLOGUE(mpn_sub_n) - sub %r0, n, %r22 - depw,z %r22, 30, 3, %r28 C r28 = 2 * (-n & 7) - depw,z %r22, 28, 3, %r22 C r22 = 8 * (-n & 7) - sub up, %r22, up C offset up - sub vp, %r22, vp C offset vp - blr %r28, %r0 C branch into loop - sub rp, %r22, rp C offset rp and set carry - -LDEF(loop) - ldd 0(up), %r20 - ldd 0(vp), %r31 - sub,db %r20, %r31, %r20 - std %r20, 0(rp) -LDEF(7) ldd 8(up), %r21 - ldd 8(vp), %r19 - sub,db %r21, %r19, %r21 - std %r21, 8(rp) -LDEF(6) ldd 16(up), %r20 - ldd 16(vp), %r31 - sub,db %r20, %r31, %r20 - std %r20, 16(rp) -LDEF(5) ldd 24(up), %r21 - ldd 24(vp), %r19 - sub,db %r21, %r19, %r21 - std %r21, 24(rp) -LDEF(4) ldd 32(up), %r20 - ldd 32(vp), %r31 - sub,db %r20, %r31, %r20 - std %r20, 32(rp) -LDEF(3) ldd 40(up), %r21 - ldd 40(vp), %r19 - sub,db %r21, %r19, %r21 - std %r21, 40(rp) -LDEF(2) ldd 48(up), %r20 - ldd 48(vp), %r31 - sub,db %r20, %r31, %r20 - std %r20, 48(rp) -LDEF(1) ldd 56(up), %r21 - ldd 56(vp),%r19 - sub,db %r21, %r19, %r21 - ldo 64(up), up - std %r21, 56(rp) - ldo 64(vp), vp - addib,> -8, n, L(loop) - ldo 64(rp), rp - - add,dc %r0, %r0, %r29 - subi 1, %r29, %r29 - bve (%r2) -ifdef(`HAVE_ABI_2_0w', -` copy %r29, %r28 -',` ldi 0, %r28 -') -EPILOGUE(mpn_sub_n) diff -Nru gmp-4.3.2+dfsg/mpn/power/gmp-mparam.h gmp-5.0.2+dfsg/mpn/power/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/power/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/power/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -19,11 +19,11 @@ /* Generated by tuneup.c, 2003-02-10, gcc 3.2, POWER2 66.7MHz */ -#define MUL_KARATSUBA_THRESHOLD 12 -#define MUL_TOOM3_THRESHOLD 75 +#define MUL_TOOM22_THRESHOLD 12 +#define MUL_TOOM33_THRESHOLD 75 #define SQR_BASECASE_THRESHOLD 7 -#define SQR_KARATSUBA_THRESHOLD 28 +#define SQR_TOOM2_THRESHOLD 28 #define SQR_TOOM3_THRESHOLD 86 #define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX /* never */ diff -Nru gmp-4.3.2+dfsg/mpn/powerpc32/750/com.asm gmp-5.0.2+dfsg/mpn/powerpc32/750/com.asm --- gmp-4.3.2+dfsg/mpn/powerpc32/750/com.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc32/750/com.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,68 @@ +dnl PowerPC 750 mpn_com -- mpn bitwise one's complement + +dnl Copyright 2002, 2003 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundation; either version 3 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C 603e: ? +C 604e: 3.0 +C 75x (G3): 2.0 +C 7400,7410 (G4): 2.0 +C 744x,745x (G4+): 3.0 + +C void mpn_com (mp_ptr dst, mp_srcptr src, mp_size_t size); +C +C This loop form is necessary for the claimed speed. + +ASM_START() +PROLOGUE(mpn_com) + + C r3 dst + C r4 src + C r5 size + + mtctr r5 C size + lwz r5, 0(r4) C src low limb + + sub r4, r4, r3 C src-dst + subi r3, r3, 4 C dst-4 + + addi r4, r4, 8 C src-dst+8 + bdz L(one) + +L(top): + C r3 &dst[i-1] + C r4 src-dst + C r5 src[i] + C r6 scratch + + not r6, r5 C ~src[i] + lwzx r5, r4,r3 C src[i+1] + + stwu r6, 4(r3) C dst[i] + bdnz L(top) + +L(one): + not r6, r5 + + stw r6, 4(r3) C dst[size-1] + blr + +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/powerpc32/750/com_n.asm gmp-5.0.2+dfsg/mpn/powerpc32/750/com_n.asm --- gmp-4.3.2+dfsg/mpn/powerpc32/750/com_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc32/750/com_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,68 +0,0 @@ -dnl PowerPC 750 mpn_com_n -- mpn bitwise one's complement - -dnl Copyright 2002, 2003 Free Software Foundation, Inc. -dnl -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C cycles/limb -C 603e: ? -C 604e: 3.0 -C 75x (G3): 2.0 -C 7400,7410 (G4): 2.0 -C 744x,745x (G4+): 3.0 - -C void mpn_com_n (mp_ptr dst, mp_srcptr src, mp_size_t size); -C -C This loop form is necessary for the claimed speed. - -ASM_START() -PROLOGUE(mpn_com_n) - - C r3 dst - C r4 src - C r5 size - - mtctr r5 C size - lwz r5, 0(r4) C src low limb - - sub r4, r4, r3 C src-dst - subi r3, r3, 4 C dst-4 - - addi r4, r4, 8 C src-dst+8 - bdz L(one) - -L(top): - C r3 &dst[i-1] - C r4 src-dst - C r5 src[i] - C r6 scratch - - not r6, r5 C ~src[i] - lwzx r5, r4,r3 C src[i+1] - - stwu r6, 4(r3) C dst[i] - bdnz L(top) - -L(one): - not r6, r5 - - stw r6, 4(r3) C dst[size-1] - blr - -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/powerpc32/750/gmp-mparam.h gmp-5.0.2+dfsg/mpn/powerpc32/750/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/powerpc32/750/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc32/750/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ /* PowerPC-32 gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 2002, 2004 Free Software Foundation, Inc. +Copyright 2002, 2004, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 @@ -26,49 +26,156 @@ /* 450 MHz PPC 7400 */ -/* Generated by tuneup.c, 2008-12-23, gcc 4.0 */ - -#define MUL_KARATSUBA_THRESHOLD 10 -#define MUL_TOOM3_THRESHOLD 41 -#define MUL_TOOM44_THRESHOLD 88 - -#define SQR_BASECASE_THRESHOLD 4 -#define SQR_KARATSUBA_THRESHOLD 18 -#define SQR_TOOM3_THRESHOLD 57 -#define SQR_TOOM4_THRESHOLD 88 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 32 -#define MULLOW_MUL_N_THRESHOLD 194 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 33 -#define POWM_THRESHOLD 48 - -#define MATRIX22_STRASSEN_THRESHOLD 13 -#define HGCD_THRESHOLD 91 -#define GCD_DC_THRESHOLD 256 -#define GCDEXT_DC_THRESHOLD 256 -#define JACOBI_BASE_METHOD 1 - -#define DIVREM_1_NORM_THRESHOLD 0 /* always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 13 -#define GET_STR_PRECOMPUTE_THRESHOLD 27 -#define SET_STR_DC_THRESHOLD 390 -#define SET_STR_PRECOMPUTE_THRESHOLD 814 - -#define MUL_FFT_TABLE { 240, 608, 896, 2560, 6144, 40960, 0 } -#define MUL_FFT_MODF_THRESHOLD 232 -#define MUL_FFT_THRESHOLD 1792 - -#define SQR_FFT_TABLE { 240, 544, 896, 2560, 6144, 24576, 0 } -#define SQR_FFT_MODF_THRESHOLD 216 -#define SQR_FFT_THRESHOLD 1792 +#define DIVREM_1_NORM_THRESHOLD 0 /* always */ +#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1_NORM_THRESHOLD 3 +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 11 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 7 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 11 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 18 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 38 +#define USE_PREINV_DIVREM_1 1 +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 10 +#define MUL_TOOM33_THRESHOLD 38 +#define MUL_TOOM44_THRESHOLD 99 +#define MUL_TOOM6H_THRESHOLD 141 +#define MUL_TOOM8H_THRESHOLD 212 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 65 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 69 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 65 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 66 + +#define SQR_BASECASE_THRESHOLD 4 +#define SQR_TOOM2_THRESHOLD 18 +#define SQR_TOOM3_THRESHOLD 57 +#define SQR_TOOM4_THRESHOLD 142 +#define SQR_TOOM6_THRESHOLD 173 +#define SQR_TOOM8_THRESHOLD 309 + +#define MULMOD_BNM1_THRESHOLD 9 +#define SQRMOD_BNM1_THRESHOLD 11 + +#define MUL_FFT_MODF_THRESHOLD 220 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 220, 5}, { 13, 6}, { 7, 5}, { 15, 6}, \ + { 8, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 13, 7}, { 7, 6}, { 17, 7}, { 9, 6}, \ + { 19, 7}, { 11, 6}, { 23, 7}, { 13, 8}, \ + { 7, 7}, { 19, 8}, { 11, 7}, { 23, 9}, \ + { 7, 8}, { 15, 7}, { 33, 8}, { 19, 7}, \ + { 39, 8}, { 23, 9}, { 15, 8}, { 39, 9}, \ + { 23, 8}, { 47,10}, { 15, 9}, { 31, 8}, \ + { 67, 9}, { 55,10}, { 31, 9}, { 63, 8}, \ + { 127, 7}, { 255, 9}, { 71, 8}, { 143, 7}, \ + { 287, 9}, { 79,10}, { 47, 9}, { 95,11}, \ + { 31,10}, { 63, 9}, { 127, 8}, { 255, 9}, \ + { 143, 8}, { 287,10}, { 79, 9}, { 159, 8}, \ + { 319, 9}, { 175, 8}, { 351, 7}, { 703,10}, \ + { 95, 9}, { 191, 8}, { 383, 9}, { 207,10}, \ + { 111,11}, { 63,10}, { 127, 9}, { 255,10}, \ + { 143, 9}, { 287, 8}, { 575,10}, { 159, 9}, \ + { 319,10}, { 175, 9}, { 351, 8}, { 703,11}, \ + { 95,10}, { 191, 9}, { 383,10}, { 207, 9}, \ + { 415, 8}, { 831,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 511,10}, { 271, 9}, { 543,10}, \ + { 287, 9}, { 575,11}, { 159,10}, { 351, 9}, \ + { 703, 8}, { 1407,11}, { 191,10}, { 415, 9}, \ + { 831,11}, { 223,10}, { 447, 9}, { 895,12}, \ + { 127,11}, { 255,10}, { 543,11}, { 287,10}, \ + { 575,11}, { 351,10}, { 703, 9}, { 1407,12}, \ + { 191,11}, { 415,10}, { 831,11}, { 447,10}, \ + { 895,13}, { 127,12}, { 255,11}, { 543,10}, \ + { 1087,11}, { 575,12}, { 319,11}, { 703,10}, \ + { 1407,12}, { 383,11}, { 831,12}, { 447,11}, \ + { 895,10}, { 1791,11}, { 959,13}, { 255,12}, \ + { 511,11}, { 1087,12}, { 575,11}, { 1215,12}, \ + { 703,11}, { 1407,13}, { 383,12}, { 895,11}, \ + { 1791,12}, { 959,14}, { 255,13}, { 511,12}, \ + { 1215,13}, { 639,12}, { 1407,13}, { 895,12}, \ + { 1919,14}, { 511,13}, { 1023,12}, { 2047,13}, \ + { 1151,12}, { 2303,13}, { 1407,14}, { 767,13}, \ + { 1919,10}, { 15359,12}, { 4096,13}, { 8192,14}, \ + { 16384,15}, { 32768,16} } +#define MUL_FFT_TABLE3_SIZE 154 +#define MUL_FFT_THRESHOLD 2688 + +#define SQR_FFT_MODF_THRESHOLD 184 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 184, 5}, { 6, 4}, { 13, 5}, { 13, 6}, \ + { 7, 5}, { 15, 6}, { 13, 7}, { 7, 6}, \ + { 16, 7}, { 9, 6}, { 19, 7}, { 11, 6}, \ + { 23, 7}, { 13, 8}, { 7, 7}, { 19, 8}, \ + { 11, 7}, { 25, 9}, { 7, 8}, { 15, 7}, \ + { 31, 8}, { 19, 7}, { 39, 8}, { 27, 9}, \ + { 15, 8}, { 39, 9}, { 23,10}, { 15, 9}, \ + { 31, 8}, { 63, 9}, { 39, 8}, { 79, 9}, \ + { 47, 8}, { 95,10}, { 31, 9}, { 63, 8}, \ + { 127, 7}, { 255, 9}, { 71, 8}, { 143, 7}, \ + { 287, 9}, { 79, 8}, { 159,10}, { 47, 9}, \ + { 95,11}, { 31,10}, { 63, 9}, { 127, 8}, \ + { 255, 9}, { 143, 8}, { 287, 7}, { 575,10}, \ + { 79, 9}, { 159, 8}, { 319, 9}, { 175, 8}, \ + { 351,10}, { 95, 9}, { 191, 8}, { 383, 9}, \ + { 207,10}, { 111,11}, { 63,10}, { 127, 9}, \ + { 255,10}, { 143, 9}, { 287, 8}, { 575,10}, \ + { 159, 9}, { 319,10}, { 175, 9}, { 351,11}, \ + { 95,10}, { 191, 9}, { 383,10}, { 207, 9}, \ + { 415, 8}, { 831,10}, { 223,12}, { 63,11}, \ + { 127,10}, { 255, 9}, { 511,10}, { 287, 9}, \ + { 575,11}, { 159,10}, { 351, 9}, { 703,11}, \ + { 191,10}, { 415, 9}, { 831,11}, { 223,10}, \ + { 447, 9}, { 895,12}, { 127,11}, { 255,10}, \ + { 511,11}, { 287,10}, { 575,11}, { 319,10}, \ + { 639,11}, { 351,10}, { 703, 9}, { 1407,12}, \ + { 191,11}, { 383,10}, { 767,11}, { 415,10}, \ + { 831,11}, { 447,10}, { 895,13}, { 127,12}, \ + { 255,11}, { 511,10}, { 1023,11}, { 575,12}, \ + { 319,11}, { 703,10}, { 1407,12}, { 383,11}, \ + { 831,12}, { 447,11}, { 895,10}, { 1791,11}, \ + { 959,13}, { 255,12}, { 511,11}, { 1023,12}, \ + { 575,11}, { 1215,12}, { 703,11}, { 1407,13}, \ + { 383,12}, { 895,11}, { 1791,12}, { 959,14}, \ + { 255,13}, { 511,12}, { 1215,13}, { 639,12}, \ + { 1471,13}, { 767,12}, { 1535,13}, { 895,12}, \ + { 1919,14}, { 511,13}, { 1151,12}, { 2431,13}, \ + { 1407,14}, { 767,13}, { 1919,15}, { 32768,16} } +#define SQR_FFT_TABLE3_SIZE 152 +#define SQR_FFT_THRESHOLD 1728 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 33 +#define MULLO_MUL_N_THRESHOLD 5240 + +#define DC_DIV_QR_THRESHOLD 31 +#define DC_DIVAPPR_Q_THRESHOLD 108 +#define DC_BDIV_QR_THRESHOLD 35 +#define DC_BDIV_Q_THRESHOLD 88 + +#define INV_MULMOD_BNM1_THRESHOLD 76 +#define INV_NEWTON_THRESHOLD 149 +#define INV_APPR_THRESHOLD 125 + +#define BINV_NEWTON_THRESHOLD 156 +#define REDC_1_TO_REDC_N_THRESHOLD 39 + +#define MU_DIV_QR_THRESHOLD 807 +#define MU_DIVAPPR_Q_THRESHOLD 807 +#define MUPI_DIV_QR_THRESHOLD 66 +#define MU_BDIV_QR_THRESHOLD 667 +#define MU_BDIV_Q_THRESHOLD 807 + +#define MATRIX22_STRASSEN_THRESHOLD 11 +#define HGCD_THRESHOLD 87 +#define GCD_DC_THRESHOLD 233 +#define GCDEXT_DC_THRESHOLD 198 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 12 +#define GET_STR_PRECOMPUTE_THRESHOLD 28 +#define SET_STR_DC_THRESHOLD 390 +#define SET_STR_PRECOMPUTE_THRESHOLD 814 diff -Nru gmp-4.3.2+dfsg/mpn/powerpc32/gmp-mparam.h gmp-5.0.2+dfsg/mpn/powerpc32/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/powerpc32/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc32/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* PowerPC-32 gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009 -Free Software Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2004, 2008, 2009, +2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 @@ -32,52 +32,160 @@ /* 1417 MHz PPC 7447A */ -/* Generated by tuneup.c, 2009-01-14, gcc 4.3 */ - -#define MUL_KARATSUBA_THRESHOLD 14 -#define MUL_TOOM3_THRESHOLD 73 -#define MUL_TOOM44_THRESHOLD 106 - -#define SQR_BASECASE_THRESHOLD 4 -#define SQR_KARATSUBA_THRESHOLD 24 -#define SQR_TOOM3_THRESHOLD 77 -#define SQR_TOOM4_THRESHOLD 130 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 52 -#define MULLOW_MUL_N_THRESHOLD 292 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 46 -#define POWM_THRESHOLD 87 - -#define MATRIX22_STRASSEN_THRESHOLD 15 -#define HGCD_THRESHOLD 127 -#define GCD_DC_THRESHOLD 361 -#define GCDEXT_DC_THRESHOLD 382 -#define JACOBI_BASE_METHOD 1 - -#define DIVREM_1_NORM_THRESHOLD 0 /* always */ -#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 7 -#define MOD_1_2_THRESHOLD 21 -#define MOD_1_4_THRESHOLD 68 -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 22 -#define GET_STR_PRECOMPUTE_THRESHOLD 42 -#define SET_STR_DC_THRESHOLD 788 -#define SET_STR_PRECOMPUTE_THRESHOLD 1554 - -#define MUL_FFT_TABLE { 304, 672, 1152, 2560, 6144, 24576, 0 } -#define MUL_FFT_MODF_THRESHOLD 320 -#define MUL_FFT_THRESHOLD 2816 - -#define SQR_FFT_TABLE { 272, 672, 1152, 2560, 10240, 24576, 0 } -#define SQR_FFT_MODF_THRESHOLD 288 -#define SQR_FFT_THRESHOLD 2304 +#define DIVREM_1_NORM_THRESHOLD 0 /* always */ +#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 5 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 8 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 16 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 65 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 17 +#define USE_PREINV_DIVREM_1 1 +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD 98 + +#define MUL_TOOM22_THRESHOLD 14 +#define MUL_TOOM33_THRESHOLD 73 +#define MUL_TOOM44_THRESHOLD 106 +#define MUL_TOOM6H_THRESHOLD 157 +#define MUL_TOOM8H_THRESHOLD 236 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 73 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 71 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 73 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 72 + +#define SQR_BASECASE_THRESHOLD 0 /* always */ +#define SQR_TOOM2_THRESHOLD 24 +#define SQR_TOOM3_THRESHOLD 77 +#define SQR_TOOM4_THRESHOLD 130 +#define SQR_TOOM6_THRESHOLD 189 +#define SQR_TOOM8_THRESHOLD 284 + +#define MULMOD_BNM1_THRESHOLD 9 +#define SQRMOD_BNM1_THRESHOLD 14 + +#define MUL_FFT_MODF_THRESHOLD 284 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 284, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 13, 7}, { 7, 6}, { 17, 7}, { 9, 6}, \ + { 20, 7}, { 11, 6}, { 23, 7}, { 13, 8}, \ + { 7, 7}, { 19, 8}, { 11, 7}, { 25, 9}, \ + { 7, 8}, { 15, 7}, { 33, 8}, { 19, 7}, \ + { 39, 8}, { 23, 7}, { 47, 9}, { 15, 8}, \ + { 39, 9}, { 23, 8}, { 47,10}, { 15, 9}, \ + { 31, 8}, { 67, 9}, { 39, 8}, { 79, 9}, \ + { 47, 8}, { 95,10}, { 31, 9}, { 71, 8}, \ + { 143, 9}, { 79,10}, { 47, 9}, { 95,11}, \ + { 31,10}, { 63, 9}, { 127, 8}, { 255, 9}, \ + { 135, 8}, { 271, 9}, { 143,10}, { 79, 9}, \ + { 159, 8}, { 319, 9}, { 175,10}, { 95, 9}, \ + { 191, 8}, { 383, 9}, { 207, 8}, { 415,11}, \ + { 63,10}, { 127, 9}, { 255, 8}, { 511, 9}, \ + { 271,10}, { 143, 9}, { 287, 8}, { 575,10}, \ + { 159, 9}, { 319,10}, { 175,11}, { 95,10}, \ + { 191, 9}, { 383,10}, { 207, 9}, { 415, 8}, \ + { 831,12}, { 63,11}, { 127,10}, { 255, 9}, \ + { 511,10}, { 271, 9}, { 543, 8}, { 1087,10}, \ + { 287, 9}, { 575,11}, { 159,10}, { 319, 9}, \ + { 639,10}, { 351, 9}, { 703,11}, { 191,10}, \ + { 415, 9}, { 831,11}, { 223,10}, { 447, 9}, \ + { 895,10}, { 479, 9}, { 959,12}, { 127,11}, \ + { 255,10}, { 543, 9}, { 1087,11}, { 287,10}, \ + { 607,11}, { 319,10}, { 639,11}, { 351,10}, \ + { 703, 9}, { 1407,12}, { 191,11}, { 383,10}, \ + { 767,11}, { 415,10}, { 831,11}, { 447,10}, \ + { 895,11}, { 479,10}, { 959,13}, { 127,12}, \ + { 255,11}, { 543,10}, { 1087,11}, { 607,12}, \ + { 319,11}, { 639,10}, { 1279,11}, { 703,10}, \ + { 1407,12}, { 383,11}, { 831,12}, { 447,11}, \ + { 959,10}, { 1919,13}, { 255,12}, { 511,11}, \ + { 1087,12}, { 575,11}, { 1215,10}, { 2431,12}, \ + { 639,11}, { 1279,12}, { 703,11}, { 1407,13}, \ + { 383,12}, { 959,11}, { 1919,14}, { 255,13}, \ + { 511,12}, { 1215,11}, { 2431,13}, { 639,12}, \ + { 1471,13}, { 767,12}, { 1599,13}, { 895,12}, \ + { 1919,14}, { 511,13}, { 1023,12}, { 2111,13}, \ + { 1151,12}, { 2431,13}, { 1407,14}, { 767,13}, \ + { 1535,12}, { 3071,13}, { 1919,12}, { 3839,15}, \ + { 32768,16} } +#define MUL_FFT_TABLE3_SIZE 165 +#define MUL_FFT_THRESHOLD 3712 + +#define SQR_FFT_MODF_THRESHOLD 248 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 248, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 17, 7}, { 9, 6}, { 20, 7}, { 11, 6}, \ + { 23, 7}, { 13, 8}, { 7, 7}, { 19, 8}, \ + { 11, 7}, { 25, 9}, { 7, 8}, { 15, 7}, \ + { 33, 8}, { 19, 7}, { 39, 8}, { 23, 7}, \ + { 47, 8}, { 27, 9}, { 15, 8}, { 39, 9}, \ + { 23, 8}, { 47,10}, { 15, 9}, { 31, 8}, \ + { 63, 9}, { 39, 8}, { 79, 9}, { 47,10}, \ + { 31, 9}, { 63, 8}, { 127, 9}, { 71, 8}, \ + { 143, 9}, { 79,10}, { 47, 9}, { 95,11}, \ + { 31,10}, { 63, 9}, { 127, 8}, { 255, 7}, \ + { 511, 9}, { 143,10}, { 79, 9}, { 159, 8}, \ + { 319, 9}, { 175, 8}, { 351,10}, { 95, 9}, \ + { 191, 8}, { 383, 9}, { 207, 8}, { 415,11}, \ + { 63,10}, { 127, 9}, { 255, 8}, { 511,10}, \ + { 143, 9}, { 287, 8}, { 575,10}, { 159, 9}, \ + { 319,10}, { 175, 9}, { 351,11}, { 95,10}, \ + { 191, 9}, { 383,10}, { 207, 9}, { 415, 8}, \ + { 831,12}, { 63,11}, { 127,10}, { 255, 9}, \ + { 511,10}, { 271, 9}, { 543,10}, { 287, 9}, \ + { 575,11}, { 159,10}, { 319, 9}, { 639,10}, \ + { 351, 9}, { 703, 8}, { 1407, 9}, { 735,11}, \ + { 191,10}, { 415, 9}, { 831,11}, { 223,10}, \ + { 447, 9}, { 895,10}, { 479,12}, { 127,11}, \ + { 255,10}, { 543,11}, { 287,10}, { 607,11}, \ + { 319,10}, { 639,11}, { 351,10}, { 703, 9}, \ + { 1407,12}, { 191,11}, { 383,13}, { 127,12}, \ + { 255,11}, { 543,10}, { 1087,11}, { 575,10}, \ + { 1151,12}, { 319,11}, { 703,10}, { 1407,12}, \ + { 383,11}, { 831,12}, { 447,11}, { 959,13}, \ + { 255,12}, { 511,11}, { 1087,12}, { 575,11}, \ + { 1215,12}, { 639,11}, { 1279,12}, { 703,11}, \ + { 1407,13}, { 383,12}, { 959,14}, { 255,13}, \ + { 511,12}, { 1215,11}, { 2431,13}, { 639,12}, \ + { 1471,13}, { 767,12}, { 1599,13}, { 895,12}, \ + { 1919,14}, { 511,13}, { 1023,12}, { 2111,13}, \ + { 1151,12}, { 2431,13}, { 1407,12}, { 2815,14}, \ + { 767,13}, { 1535,12}, { 3199,13}, { 1919,15}, \ + { 32768,16} } +#define SQR_FFT_TABLE3_SIZE 153 +#define SQR_FFT_THRESHOLD 2688 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 45 +#define MULLO_MUL_N_THRESHOLD 6633 + +#define DC_DIV_QR_THRESHOLD 43 +#define DC_DIVAPPR_Q_THRESHOLD 154 +#define DC_BDIV_QR_THRESHOLD 55 +#define DC_BDIV_Q_THRESHOLD 124 + +#define INV_MULMOD_BNM1_THRESHOLD 108 +#define INV_NEWTON_THRESHOLD 179 +#define INV_APPR_THRESHOLD 166 + +#define BINV_NEWTON_THRESHOLD 232 +#define REDC_1_TO_REDC_N_THRESHOLD 54 + +#define MU_DIV_QR_THRESHOLD 1057 +#define MU_DIVAPPR_Q_THRESHOLD 1142 +#define MUPI_DIV_QR_THRESHOLD 83 +#define MU_BDIV_QR_THRESHOLD 872 +#define MU_BDIV_Q_THRESHOLD 1142 + +#define MATRIX22_STRASSEN_THRESHOLD 15 +#define HGCD_THRESHOLD 122 +#define GCD_DC_THRESHOLD 339 +#define GCDEXT_DC_THRESHOLD 278 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 17 +#define GET_STR_PRECOMPUTE_THRESHOLD 38 +#define SET_STR_DC_THRESHOLD 781 +#define SET_STR_PRECOMPUTE_THRESHOLD 1505 diff -Nru gmp-4.3.2+dfsg/mpn/powerpc32/vmx/copyd.asm gmp-5.0.2+dfsg/mpn/powerpc32/vmx/copyd.asm --- gmp-4.3.2+dfsg/mpn/powerpc32/vmx/copyd.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc32/vmx/copyd.asm 2011-05-08 09:49:29.000000000 +0000 @@ -37,7 +37,7 @@ C * The VMX code is used from the smallest sizes it handles, but measurements C show a large speed bump at the cutoff points. Small copying (perhaps C using some read-modify-write technique) should be optimized. -C * Make a mpn_com_n based on this code. +C * Make a mpn_com based on this code. define(`GMP_LIMB_BYTES', eval(GMP_LIMB_BITS/8)) define(`LIMBS_PER_VR', eval(16/GMP_LIMB_BYTES)) diff -Nru gmp-4.3.2+dfsg/mpn/powerpc32/vmx/copyi.asm gmp-5.0.2+dfsg/mpn/powerpc32/vmx/copyi.asm --- gmp-4.3.2+dfsg/mpn/powerpc32/vmx/copyi.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc32/vmx/copyi.asm 2011-05-08 09:49:29.000000000 +0000 @@ -37,7 +37,7 @@ C * The VMX code is used from the smallest sizes it handles, but measurements C show a large speed bump at the cutoff points. Small copying (perhaps C using some read-modify-write technique) should be optimized. -C * Make a mpn_com_n based on this code. +C * Make a mpn_com based on this code. define(`GMP_LIMB_BYTES', eval(GMP_LIMB_BITS/8)) define(`LIMBS_PER_VR', eval(16/GMP_LIMB_BYTES)) diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/com.asm gmp-5.0.2+dfsg/mpn/powerpc64/com.asm --- gmp-4.3.2+dfsg/mpn/powerpc64/com.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/com.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,74 @@ +dnl PowerPC-64 mpn_com. + +dnl Copyright 2003, 2004, 2005 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + +C cycles/limb +C POWER3/PPC630: 1? +C POWER4/PPC970: 1.6 + +C TODO +C * 8-way unrolling brings timing down to about 1.3 cycles/limb. + +C INPUT PARAMETERS +C rp r3 +C up r4 +C n r5 + +ASM_START() +PROLOGUE(mpn_com) + rldic. r0, r5, 3, 59 C r0 = (r5 & 3) << 3; cr0 = (n == 4t)? + cmpldi cr6, r0, 16 C cr6 = (n cmp 4t + 2)? + + addi r5, r5, 3 C compute... +ifdef(`HAVE_ABI_mode32', +` rldicl r5, r5, 62,34', C ...branch count +` rldicl r5, r5, 62, 2') C ...branch count + mtctr r5 + + add r4, r4, r0 C offset up + add r3, r3, r0 C offset rp + + beq cr0, L(L00) + blt cr6, L(L01) + beq cr6, L(L10) + b L(L11) + +L(L00): addi r4, r4, 32 + addi r3, r3, 32 + + ALIGN(16) +L(oop): ld r6, -32(r4) + nor r6, r6, r6 + std r6, -32(r3) +L(L11): ld r6, -24(r4) + nor r6, r6, r6 + std r6, -24(r3) +L(L10): ld r6, -16(r4) + nor r6, r6, r6 + std r6, -16(r3) +L(L01): ld r6, -8(r4) + nor r6, r6, r6 + addi r4, r4, 32 + std r6, -8(r3) + addi r3, r3, 32 + bdnz L(oop) + + blr +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/com_n.asm gmp-5.0.2+dfsg/mpn/powerpc64/com_n.asm --- gmp-4.3.2+dfsg/mpn/powerpc64/com_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/com_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,74 +0,0 @@ -dnl PowerPC-64 mpn_com_n. - -dnl Copyright 2003, 2004, 2005 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C POWER3/PPC630: 1? -C POWER4/PPC970: 1.6 - -C TODO -C * 8-way unrolling brings timing down to about 1.3 cycles/limb. - -C INPUT PARAMETERS -C rp r3 -C up r4 -C n r5 - -ASM_START() -PROLOGUE(mpn_com_n) - rldic. r0, r5, 3, 59 C r0 = (r5 & 3) << 3; cr0 = (n == 4t)? - cmpldi cr6, r0, 16 C cr6 = (n cmp 4t + 2)? - - addi r5, r5, 3 C compute... -ifdef(`HAVE_ABI_mode32', -` rldicl r5, r5, 62,34', C ...branch count -` rldicl r5, r5, 62, 2') C ...branch count - mtctr r5 - - add r4, r4, r0 C offset up - add r3, r3, r0 C offset rp - - beq cr0, L(L00) - blt cr6, L(L01) - beq cr6, L(L10) - b L(L11) - -L(L00): addi r4, r4, 32 - addi r3, r3, 32 - - ALIGN(16) -L(oop): ld r6, -32(r4) - nor r6, r6, r6 - std r6, -32(r3) -L(L11): ld r6, -24(r4) - nor r6, r6, r6 - std r6, -24(r3) -L(L10): ld r6, -16(r4) - nor r6, r6, r6 - std r6, -16(r3) -L(L01): ld r6, -8(r4) - nor r6, r6, r6 - addi r4, r4, 32 - std r6, -8(r3) - addi r3, r3, 32 - bdnz L(oop) - - blr -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/gmp-mparam.h gmp-5.0.2+dfsg/mpn/powerpc64/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/powerpc64/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -/* PowerPC-64 gmp-mparam.h -- Compiler/machine parameter header file. - -Copyright 1991, 1993, 1994, 1995, 1999, 2000, 2001, 2002, 2004 Free Software -Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#define BITS_PER_MP_LIMB 64 -#define BYTES_PER_MP_LIMB 8 - - -/* ???MHz ppc630 */ - -/* Generated by tuneup.c, 2004-02-10, gcc "2.9" */ - -#define MUL_KARATSUBA_THRESHOLD 8 -#define MUL_TOOM3_THRESHOLD 41 - -#define SQR_BASECASE_THRESHOLD 0 /* always */ -#define SQR_KARATSUBA_THRESHOLD 14 -#define SQR_TOOM3_THRESHOLD 48 - -#define DIV_SB_PREINV_THRESHOLD 0 -#define DIV_DC_THRESHOLD 28 -#define POWM_THRESHOLD 40 - -#define HGCD_THRESHOLD 56 -#define GCD_ACCEL_THRESHOLD 3 -#define GCD_DC_THRESHOLD 408 -#define JACOBI_BASE_METHOD 1 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define USE_PREINV_DIVREM_1 0 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 14 -#define GET_STR_PRECOMPUTE_THRESHOLD 22 -#define SET_STR_THRESHOLD 1815 - -#define MUL_FFT_TABLE { 272, 544, 1344, 2304, 5120, 20480, 49152, 0 } -#define MUL_FFT_MODF_THRESHOLD 216 -#define MUL_FFT_THRESHOLD 1408 - -#define SQR_FFT_TABLE { 272, 608, 1344, 2304, 7168, 20480, 49152, 0 } -#define SQR_FFT_MODF_THRESHOLD 200 -#define SQR_FFT_THRESHOLD 1408 diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/mode64/dive_1.asm gmp-5.0.2+dfsg/mpn/powerpc64/mode64/dive_1.asm --- gmp-4.3.2+dfsg/mpn/powerpc64/mode64/dive_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/mode64/dive_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -25,7 +25,7 @@ C POWER5: 16 C TODO -C * Check if n=1 code is really an improvment. It probably isn't. +C * Check if n=1 code is really an improvement. It probably isn't. C * Perhaps remove L(norm) code, it is currently unreachable. C * Make more similar to mode1o.asm. diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/mode64/diveby3.asm gmp-5.0.2+dfsg/mpn/powerpc64/mode64/diveby3.asm --- gmp-4.3.2+dfsg/mpn/powerpc64/mode64/diveby3.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/mode64/diveby3.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,83 +0,0 @@ -dnl PowerPC-64 mpn_divexact_by3 -- mpn by 3 exact division - -dnl Copyright 2006 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - -C cycles/limb -C POWER3/PPC630: 13 -C POWER4/PPC970: 13 -C POWER5: 13 - -C INPUT PARAMETERS -define(`rp', `r3') -define(`up', `r4') -define(`n', `r5') -define(`cy', `r6') - -define(`xAAAAAAAB',`r7') -define(`xAAAAAAAA', `r9') -define(`q', `r10') -define(`ul', `r11') -define(`one', `r12') - - -ASM_START() -PROLOGUE(mpn_divexact_by3c) - - mtctr r5 - li r7, -0x5556 C 0xFFFFFFFFFFFFAAAA - ld ul, 0(up) - rldimi r7, r7, 16, 32 C 0xFFFFFFFFAAAAAAAA - rldimi r7, r7, 32, 63 C 0xAAAAAAAAAAAAAAAB = 1/3 - - addi r9, r7, -1 C 0xAAAAAAAAAAAAAAAA - li one, 1 - - subfc ul, cy, ul C C = (cy <= up[0]) - subfe cy, r1, r1 C cy = -(cy > up[0]) - bdz L(end) - - ALIGN(16) -L(top): mulld q, ul, xAAAAAAAB - - ld ul, 8(up) - addi up, up, 8 - addc r0, xAAAAAAAA, q C set C flag if q >= 0x5555...56 - - subfe cy, cy, one C cy = 1-cy-1+C - subfc r0, q, xAAAAAAAA C set C flag if q < 0xAAAA...AA - - subfe ul, cy, ul C ul = ul-cy-1+C - std q, 0(rp) - addi rp, rp, 8 - - subfe cy, r1, r1 - bdnz L(top) - -L(end): mulld q, ul, xAAAAAAAB - addc r0, xAAAAAAAA, q - - subfe cy, cy, one - subfc r0, q, xAAAAAAAA - - std q, 0(rp) - subfe r3, r1, r1 - subf r3, r3, cy - blr -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/mode64/gmp-mparam.h gmp-5.0.2+dfsg/mpn/powerpc64/mode64/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/powerpc64/mode64/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/mode64/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -17,50 +17,50 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 /* 1600MHz PPC970 */ /* Generated by tuneup.c, 2009-01-14, gcc 4.0 */ -#define MUL_KARATSUBA_THRESHOLD 14 -#define MUL_TOOM3_THRESHOLD 57 -#define MUL_TOOM44_THRESHOLD 155 - -#define SQR_BASECASE_THRESHOLD 5 -#define SQR_KARATSUBA_THRESHOLD 32 -#define SQR_TOOM3_THRESHOLD 89 -#define SQR_TOOM4_THRESHOLD 154 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 40 -#define MULLOW_MUL_N_THRESHOLD 234 +#define MUL_TOOM22_THRESHOLD 14 +#define MUL_TOOM33_THRESHOLD 93 +#define MUL_TOOM44_THRESHOLD 135 + +#define SQR_BASECASE_THRESHOLD 6 +#define SQR_TOOM2_THRESHOLD 32 +#define SQR_TOOM3_THRESHOLD 74 +#define SQR_TOOM4_THRESHOLD 136 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 44 +#define MULLO_MUL_N_THRESHOLD 234 #define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 32 -#define POWM_THRESHOLD 93 +#define DIV_DC_THRESHOLD 33 +#define POWM_THRESHOLD 89 -#define MATRIX22_STRASSEN_THRESHOLD 19 -#define HGCD_THRESHOLD 96 -#define GCD_DC_THRESHOLD 242 -#define GCDEXT_DC_THRESHOLD 353 +#define MATRIX22_STRASSEN_THRESHOLD 15 +#define HGCD_THRESHOLD 93 +#define GCD_DC_THRESHOLD 237 +#define GCDEXT_DC_THRESHOLD 273 #define JACOBI_BASE_METHOD 1 #define MOD_1_NORM_THRESHOLD 0 /* always */ #define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 7 +#define MOD_1_1_THRESHOLD 6 #define MOD_1_2_THRESHOLD 9 -#define MOD_1_4_THRESHOLD 44 +#define MOD_1_4_THRESHOLD 23 #define USE_PREINV_DIVREM_1 0 -#define USE_PREINV_MOD_1 1 +#define USE_PREINV_MOD_1 0 #define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ +#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ -#define GET_STR_DC_THRESHOLD 10 -#define GET_STR_PRECOMPUTE_THRESHOLD 20 -#define SET_STR_DC_THRESHOLD 532 -#define SET_STR_PRECOMPUTE_THRESHOLD 1790 +#define GET_STR_DC_THRESHOLD 12 +#define GET_STR_PRECOMPUTE_THRESHOLD 24 +#define SET_STR_DC_THRESHOLD 650 +#define SET_STR_PRECOMPUTE_THRESHOLD 1713 #define MUL_FFT_TABLE { 336, 672, 1856, 2816, 7168, 20480, 81920, 327680, 0 } #define MUL_FFT_MODF_THRESHOLD 304 @@ -69,9 +69,3 @@ #define SQR_FFT_TABLE { 272, 672, 1600, 2816, 7168, 20480, 81920, 327680, 786432, 0 } #define SQR_FFT_MODF_THRESHOLD 272 #define SQR_FFT_THRESHOLD 2688 - -/* These tables are now obsolete */ - -#define MUL_FFT_TABLE2 {{1,4}, {209,5}, {513,6}, {1217,7}, {2561,8}, {3329,7}, {3457,8}, {3841,7}, {4097,8}, {6913,9}, {7681,8}, {8961,9}, {9729,8}, {10497,9}, {13825,10}, {15361,9}, {22017,10}, {23553,9}, {26113,11}, {30721,10}, {48129,9}, {50689,10}, {56321,11}, {61441,10}, {81409,11}, {96257,10}, {97281,9}, {98305,10}, {99329,9}, {101889,10}, {106241,12}, {126977,11}, {129025,10}, {146945,11}, {161793,10}, {179969,11}, {194561,10}, {212737,11}, {227329,10}, {228865,12}, {258049,11}, {359937,12}, {389121,11}, {458241,13}, {516097,12}, {520193,11}, {588801,12}, {651265,11}, {720385,12}, {782337,11}, {851457,12}, {913409,11}, {982529,12}, {MP_SIZE_T_MAX,0}} - -#define SQR_FFT_TABLE2 {{1,4}, {209,5}, {481,6}, {1089,7}, {3073,8}, {6913,9}, {7681,8}, {8449,9}, {13825,10}, {15361,9}, {19969,10}, {23553,9}, {26113,11}, {30721,10}, {31745,9}, {34305,10}, {56321,11}, {63489,10}, {81409,11}, {96257,9}, {96769,10}, {98049,12}, {126977,11}, {129025,10}, {146945,11}, {161793,10}, {212481,12}, {258049,11}, {267265,10}, {270337,11}, {272385,10}, {274433,11}, {424961,13}, {516097,12}, {520193,11}, {MP_SIZE_T_MAX,0}} diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/mode64/mode1o.asm gmp-5.0.2+dfsg/mpn/powerpc64/mode64/mode1o.asm --- gmp-4.3.2+dfsg/mpn/powerpc64/mode64/mode1o.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/mode64/mode1o.asm 2011-05-08 09:49:29.000000000 +0000 @@ -25,8 +25,8 @@ C POWER5: 16 C TODO -C * Check if n=1 code is really an improvment. It probably isn't. -C * Make more similar to dive_1.asm.. +C * Check if n=1 code is really an improvement. It probably isn't. +C * Make more similar to dive_1.asm. C INPUT PARAMETERS define(`up', `r3') diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/mode64/p3/gmp-mparam.h gmp-5.0.2+dfsg/mpn/powerpc64/mode64/p3/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/powerpc64/mode64/p3/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/mode64/p3/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,157 @@ +/* POWER3/PowerPC630 gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright 2008, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define GMP_LIMB_BITS 64 +#define BYTES_PER_MP_LIMB 8 + + +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define MOD_1U_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_1_TO_MOD_1_2_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define USE_PREINV_DIVREM_1 0 +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 10 +#define MUL_TOOM33_THRESHOLD 33 +#define MUL_TOOM44_THRESHOLD 46 +#define MUL_TOOM6H_THRESHOLD 77 +#define MUL_TOOM8H_THRESHOLD 115 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 49 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 38 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 33 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 32 + +#define SQR_BASECASE_THRESHOLD 0 /* always */ +#define SQR_TOOM2_THRESHOLD 14 +#define SQR_TOOM3_THRESHOLD 49 +#define SQR_TOOM4_THRESHOLD 64 +#define SQR_TOOM6_THRESHOLD 84 +#define SQR_TOOM8_THRESHOLD 127 + +#define MULMOD_BNM1_THRESHOLD 8 +#define SQRMOD_BNM1_THRESHOLD 9 + +#define MUL_FFT_MODF_THRESHOLD 220 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 220, 5}, { 9, 6}, { 5, 5}, { 11, 6}, \ + { 13, 7}, { 7, 6}, { 15, 7}, { 13, 8}, \ + { 7, 7}, { 15, 8}, { 13, 9}, { 7, 8}, \ + { 19, 9}, { 11, 8}, { 23,10}, { 7, 9}, \ + { 15, 8}, { 33, 9}, { 23,10}, { 15, 9}, \ + { 35, 8}, { 71,10}, { 23, 9}, { 47,11}, \ + { 15,10}, { 31, 9}, { 71,10}, { 39, 9}, \ + { 79,10}, { 55,11}, { 31,10}, { 63, 9}, \ + { 127,10}, { 71, 9}, { 143, 8}, { 287,10}, \ + { 79,11}, { 47,10}, { 95, 9}, { 191,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511,10}, { 143, 9}, { 287,11}, { 79,10}, \ + { 159, 9}, { 319, 8}, { 639,10}, { 175, 9}, \ + { 351,11}, { 95,10}, { 191, 9}, { 383,11}, \ + { 111,10}, { 223,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 511,11}, { 143,10}, { 287, 9}, \ + { 575,11}, { 159,10}, { 319, 9}, { 639,11}, \ + { 175,10}, { 351,12}, { 95,11}, { 191,10}, \ + { 383, 9}, { 767,11}, { 223,13}, { 63,12}, \ + { 127,11}, { 255,10}, { 511,11}, { 287,10}, \ + { 575, 9}, { 1151,12}, { 159,11}, { 319,10}, \ + { 639,11}, { 351,12}, { 191,11}, { 383,10}, \ + { 767,12}, { 223,11}, { 447,10}, { 895,13}, \ + { 127,12}, { 255,11}, { 511,12}, { 287,11}, \ + { 575,10}, { 1151,12}, { 319,11}, { 639,12}, \ + { 351,11}, { 703,13}, { 191,12}, { 383,11}, \ + { 767,12}, { 415,11}, { 831,10}, { 1663,12}, \ + { 447,11}, { 895,14}, { 16384,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 120 +#define MUL_FFT_THRESHOLD 2688 + +#define SQR_FFT_MODF_THRESHOLD 188 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 188, 5}, { 9, 6}, { 5, 5}, { 11, 6}, \ + { 13, 7}, { 13, 8}, { 7, 7}, { 16, 8}, \ + { 9, 7}, { 19, 8}, { 13, 9}, { 7, 8}, \ + { 19, 9}, { 11, 8}, { 23,10}, { 7, 9}, \ + { 15, 8}, { 31, 9}, { 19, 8}, { 39, 9}, \ + { 23,10}, { 15, 9}, { 39,10}, { 23,11}, \ + { 15,10}, { 31, 9}, { 67,10}, { 39, 9}, \ + { 79, 8}, { 159,10}, { 47, 9}, { 95, 8}, \ + { 191,11}, { 31,10}, { 63, 9}, { 127, 8}, \ + { 255,10}, { 71, 9}, { 143, 8}, { 287,10}, \ + { 79, 9}, { 159,11}, { 47,10}, { 95, 9}, \ + { 191,12}, { 31,11}, { 63,10}, { 127, 9}, \ + { 255, 8}, { 511,10}, { 143, 9}, { 287,11}, \ + { 79,10}, { 159, 9}, { 319, 8}, { 639,10}, \ + { 175,11}, { 95,10}, { 191, 9}, { 383,11}, \ + { 111,10}, { 223,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 511,11}, { 143,10}, { 287, 9}, \ + { 575,11}, { 159,10}, { 319, 9}, { 639,11}, \ + { 175,12}, { 95,11}, { 191,10}, { 383, 9}, \ + { 767,11}, { 223,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511,11}, { 287,10}, { 575,12}, \ + { 159,11}, { 319,10}, { 639,11}, { 351,12}, \ + { 191,11}, { 383,10}, { 767,12}, { 223,11}, \ + { 447,10}, { 895,13}, { 127,12}, { 255,11}, \ + { 511,12}, { 287,11}, { 575,10}, { 1151,12}, \ + { 319,11}, { 639,12}, { 351,13}, { 191,12}, \ + { 383,11}, { 767,12}, { 447,11}, { 895,14}, \ + { 16384,15}, { 32768,16}, { 65536,17}, { 131072,18}, \ + { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ + {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 118 +#define SQR_FFT_THRESHOLD 1728 + +#define MULLO_BASECASE_THRESHOLD 3 +#define MULLO_DC_THRESHOLD 27 +#define MULLO_MUL_N_THRESHOLD 4940 + +#define DC_DIV_QR_THRESHOLD 27 +#define DC_DIVAPPR_Q_THRESHOLD 95 +#define DC_BDIV_QR_THRESHOLD 28 +#define DC_BDIV_Q_THRESHOLD 62 + +#define INV_MULMOD_BNM1_THRESHOLD 76 +#define INV_NEWTON_THRESHOLD 117 +#define INV_APPR_THRESHOLD 101 + +#define BINV_NEWTON_THRESHOLD 133 +#define REDC_1_TO_REDC_N_THRESHOLD 30 + +#define MU_DIV_QR_THRESHOLD 618 +#define MU_DIVAPPR_Q_THRESHOLD 551 +#define MUPI_DIV_QR_THRESHOLD 49 +#define MU_BDIV_QR_THRESHOLD 492 +#define MU_BDIV_Q_THRESHOLD 541 + +#define MATRIX22_STRASSEN_THRESHOLD 9 +#define HGCD_THRESHOLD 55 +#define GCD_DC_THRESHOLD 162 +#define GCDEXT_DC_THRESHOLD 124 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 17 +#define GET_STR_PRECOMPUTE_THRESHOLD 27 +#define SET_STR_DC_THRESHOLD 354 +#define SET_STR_PRECOMPUTE_THRESHOLD 812 diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/mode64/p4/gmp-mparam.h gmp-5.0.2+dfsg/mpn/powerpc64/mode64/p4/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/powerpc64/mode64/p4/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/mode64/p4/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,202 @@ +/* POWER4/PowerPC970 gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright 2008, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define GMP_LIMB_BITS 64 +#define BYTES_PER_MP_LIMB 8 + + +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 7 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 6 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 9 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 26 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 14 +#define USE_PREINV_DIVREM_1 0 +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 43 + +#define MUL_TOOM22_THRESHOLD 14 +#define MUL_TOOM33_THRESHOLD 54 +#define MUL_TOOM44_THRESHOLD 154 +#define MUL_TOOM6H_THRESHOLD 206 +#define MUL_TOOM8H_THRESHOLD 309 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 89 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 99 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 97 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 97 + +#define SQR_BASECASE_THRESHOLD 5 +#define SQR_TOOM2_THRESHOLD 36 +#define SQR_TOOM3_THRESHOLD 61 +#define SQR_TOOM4_THRESHOLD 154 +#define SQR_TOOM6_THRESHOLD 206 +#define SQR_TOOM8_THRESHOLD 309 + +#define MULMOD_BNM1_THRESHOLD 11 +#define SQRMOD_BNM1_THRESHOLD 9 + +#define MUL_FFT_MODF_THRESHOLD 380 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 380, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 10, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ + { 23, 7}, { 12, 6}, { 25, 7}, { 25, 8}, \ + { 13, 7}, { 30, 6}, { 61, 7}, { 32, 8}, \ + { 17, 7}, { 35, 8}, { 29, 9}, { 15, 8}, \ + { 35, 9}, { 19, 8}, { 41, 9}, { 23, 8}, \ + { 47, 9}, { 27,10}, { 15, 9}, { 39,10}, \ + { 23, 9}, { 55,11}, { 15,10}, { 31, 9}, \ + { 71,10}, { 39, 9}, { 83,10}, { 47, 9}, \ + { 99,10}, { 55,11}, { 31,10}, { 63, 9}, \ + { 127,10}, { 79,11}, { 47,10}, { 103,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255,10}, \ + { 135, 9}, { 271,11}, { 79,10}, { 159, 9}, \ + { 319,10}, { 167,11}, { 95,10}, { 191, 9}, \ + { 383, 8}, { 767,10}, { 207,11}, { 111,12}, \ + { 63,11}, { 127,10}, { 255, 9}, { 511,10}, \ + { 271,11}, { 143,10}, { 287, 9}, { 575,10}, \ + { 303, 9}, { 607,11}, { 159,10}, { 319, 9}, \ + { 639,10}, { 335, 9}, { 671,12}, { 95,11}, \ + { 191,10}, { 383, 9}, { 767,11}, { 207,10}, \ + { 415, 9}, { 831,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511,11}, { 271,10}, { 543, 9}, \ + { 1087,11}, { 287,10}, { 575,11}, { 303,10}, \ + { 607,12}, { 159,11}, { 319,10}, { 639,11}, \ + { 335,10}, { 671,11}, { 351,10}, { 703,11}, \ + { 367,12}, { 191,11}, { 383,10}, { 767,11}, \ + { 415,10}, { 831,12}, { 223,11}, { 447,10}, \ + { 895,13}, { 127,12}, { 255,11}, { 511,10}, \ + { 1023,11}, { 543,10}, { 1087,12}, { 287,11}, \ + { 575,10}, { 1151,11}, { 607,10}, { 1215,12}, \ + { 319,11}, { 639,10}, { 1279,11}, { 671,12}, \ + { 351,11}, { 703,10}, { 1407,13}, { 191,12}, \ + { 383,11}, { 767,12}, { 415,11}, { 831,10}, \ + { 1663,12}, { 447,11}, { 895,12}, { 479,14}, \ + { 127,13}, { 255,12}, { 511,11}, { 1023,12}, \ + { 543,11}, { 1087,10}, { 2175,12}, { 575,11}, \ + { 1151,12}, { 607,11}, { 1215,13}, { 319,12}, \ + { 639,11}, { 1279,12}, { 671,11}, { 1343,10}, \ + { 2687,12}, { 703,11}, { 1407,12}, { 735,13}, \ + { 383,12}, { 767,11}, { 1535,12}, { 799,11}, \ + { 1599,12}, { 831,11}, { 1663,13}, { 447,12}, \ + { 959,14}, { 255,13}, { 511,12}, { 1087,11}, \ + { 2175,13}, { 575,12}, { 1215,11}, { 2431,13}, \ + { 639,12}, { 1343,11}, { 2687,13}, { 703,12}, \ + { 1407,14}, { 383,13}, { 767,12}, { 1599,13}, \ + { 831,12}, { 1663,13}, { 959,15}, { 255,14}, \ + { 511,13}, { 1087,12}, { 2175,13}, { 1215,12}, \ + { 2431,14}, { 639,13}, { 1343,12}, { 2687,13}, \ + { 1471,12}, { 2943,14}, { 767,13}, { 1599,12}, \ + { 3199,13}, { 1663,14}, { 895,13}, { 1855,15}, \ + { 32768,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ + { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ + {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 209 +#define MUL_FFT_THRESHOLD 7296 + +#define SQR_FFT_MODF_THRESHOLD 308 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 308, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 19, 7}, { 10, 6}, { 21, 7}, { 11, 6}, \ + { 23, 7}, { 21, 8}, { 11, 7}, { 24, 8}, \ + { 13, 7}, { 29, 8}, { 15, 7}, { 31, 8}, \ + { 21, 9}, { 11, 8}, { 27, 9}, { 15, 8}, \ + { 33, 9}, { 19, 8}, { 39, 9}, { 23, 8}, \ + { 47, 9}, { 27,10}, { 15, 9}, { 39,10}, \ + { 23, 9}, { 51,11}, { 15,10}, { 31, 9}, \ + { 67,10}, { 39, 9}, { 83,10}, { 47, 9}, \ + { 95,10}, { 55,11}, { 31,10}, { 79,11}, \ + { 47,10}, { 95, 9}, { 191, 8}, { 383,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511,10}, { 135, 9}, { 271,11}, { 79,10}, \ + { 159, 9}, { 319,10}, { 175, 9}, { 351,11}, \ + { 95,10}, { 191, 9}, { 383,10}, { 207, 9}, \ + { 415,11}, { 111,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 511, 8}, { 1023,10}, { 271, 9}, \ + { 543,10}, { 287, 9}, { 575, 8}, { 1151,10}, \ + { 303,11}, { 159,10}, { 319, 9}, { 639,11}, \ + { 175,10}, { 351,12}, { 95,11}, { 191,10}, \ + { 383, 9}, { 767,11}, { 207,10}, { 415, 9}, \ + { 831,11}, { 223,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511, 9}, { 1023,11}, { 271,10}, \ + { 543,11}, { 287,10}, { 575, 9}, { 1151,11}, \ + { 303,12}, { 159,11}, { 319,10}, { 639,11}, \ + { 351,10}, { 703,12}, { 191,11}, { 383,10}, \ + { 767,11}, { 415,10}, { 831,12}, { 223,11}, \ + { 447,10}, { 895,11}, { 479,10}, { 959,13}, \ + { 127,12}, { 255,11}, { 511,10}, { 1023,11}, \ + { 543,12}, { 287,11}, { 575,10}, { 1151,11}, \ + { 607,12}, { 319,11}, { 639,10}, { 1279,12}, \ + { 351,11}, { 703,13}, { 191,12}, { 383,11}, \ + { 767,12}, { 415,11}, { 831,10}, { 1663,12}, \ + { 447,11}, { 895,12}, { 479,11}, { 959,14}, \ + { 127,13}, { 255,12}, { 511,11}, { 1023,12}, \ + { 543,11}, { 1087,10}, { 2175,12}, { 575,11}, \ + { 1151,12}, { 607,13}, { 319,12}, { 639,11}, \ + { 1279,12}, { 671,11}, { 1343,12}, { 703,11}, \ + { 1407,13}, { 383,12}, { 767,11}, { 1535,12}, \ + { 831,11}, { 1663,13}, { 447,12}, { 959,11}, \ + { 1919,14}, { 255,13}, { 511,12}, { 1087,11}, \ + { 2175,13}, { 575,12}, { 1215,11}, { 2431,13}, \ + { 639,12}, { 1343,13}, { 703,12}, { 1407,14}, \ + { 383,13}, { 767,12}, { 1535,13}, { 831,12}, \ + { 1663,13}, { 959,12}, { 1919,15}, { 255,14}, \ + { 511,13}, { 1087,12}, { 2175,13}, { 1215,12}, \ + { 2431,14}, { 639,13}, { 1343,12}, { 2687,13}, \ + { 1407,12}, { 2815,13}, { 1471,14}, { 767,13}, \ + { 1535,12}, { 3071,13}, { 1663,14}, { 895,13}, \ + { 1791,12}, { 3839,15}, { 32768,16}, { 65536,17}, \ + { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ + {2097152,22}, {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 207 +#define SQR_FFT_THRESHOLD 2752 + +#define MULLO_BASECASE_THRESHOLD 5 +#define MULLO_DC_THRESHOLD 34 +#define MULLO_MUL_N_THRESHOLD 14281 + +#define DC_DIV_QR_THRESHOLD 30 +#define DC_DIVAPPR_Q_THRESHOLD 103 +#define DC_BDIV_QR_THRESHOLD 48 +#define DC_BDIV_Q_THRESHOLD 120 + +#define INV_MULMOD_BNM1_THRESHOLD 30 +#define INV_NEWTON_THRESHOLD 129 +#define INV_APPR_THRESHOLD 109 + +#define BINV_NEWTON_THRESHOLD 204 +#define REDC_1_TO_REDC_N_THRESHOLD 55 + +#define MU_DIV_QR_THRESHOLD 998 +#define MU_DIVAPPR_Q_THRESHOLD 1017 +#define MUPI_DIV_QR_THRESHOLD 61 +#define MU_BDIV_QR_THRESHOLD 889 +#define MU_BDIV_Q_THRESHOLD 1078 + +#define MATRIX22_STRASSEN_THRESHOLD 9 +#define HGCD_THRESHOLD 96 +#define GCD_DC_THRESHOLD 229 +#define GCDEXT_DC_THRESHOLD 225 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 11 +#define GET_STR_PRECOMPUTE_THRESHOLD 23 +#define SET_STR_DC_THRESHOLD 650 +#define SET_STR_PRECOMPUTE_THRESHOLD 1781 diff -Nru gmp-4.3.2+dfsg/mpn/powerpc64/mode64/p5/gmp-mparam.h gmp-5.0.2+dfsg/mpn/powerpc64/mode64/p5/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/powerpc64/mode64/p5/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/powerpc64/mode64/p5/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,199 @@ +/* gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2009, 2010 Free +Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define GMP_LIMB_BITS 64 +#define BYTES_PER_MP_LIMB 8 + +/* POWER5 (friggms.hpc.ntnu.no) */ + +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 13 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 10 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 20 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 33 +#define USE_PREINV_DIVREM_1 0 +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 16 +#define MUL_TOOM33_THRESHOLD 56 +#define MUL_TOOM44_THRESHOLD 154 +#define MUL_TOOM6H_THRESHOLD 206 +#define MUL_TOOM8H_THRESHOLD 309 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 82 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 91 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 81 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 88 + +#define SQR_BASECASE_THRESHOLD 10 +#define SQR_TOOM2_THRESHOLD 36 +#define SQR_TOOM3_THRESHOLD 59 +#define SQR_TOOM4_THRESHOLD 112 +#define SQR_TOOM6_THRESHOLD 189 +#define SQR_TOOM8_THRESHOLD 309 + +#define MULMOD_BNM1_THRESHOLD 13 +#define SQRMOD_BNM1_THRESHOLD 9 + +#define MUL_FFT_MODF_THRESHOLD 348 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 348, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 10, 5}, { 21, 6}, { 21, 7}, { 11, 6}, \ + { 23, 7}, { 12, 6}, { 25, 7}, { 21, 8}, \ + { 11, 7}, { 25, 8}, { 13, 7}, { 27, 8}, \ + { 15, 7}, { 31, 8}, { 21, 9}, { 11, 8}, \ + { 27, 9}, { 15, 8}, { 33, 9}, { 19, 8}, \ + { 39, 9}, { 23, 8}, { 47, 9}, { 27,10}, \ + { 15, 9}, { 39,10}, { 23, 9}, { 51,11}, \ + { 15,10}, { 31, 9}, { 67,10}, { 39, 9}, \ + { 79,10}, { 47, 9}, { 95,10}, { 55,11}, \ + { 31,10}, { 79,11}, { 47,10}, { 95,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255,10}, \ + { 135,11}, { 79,10}, { 159, 9}, { 319,11}, \ + { 95,10}, { 191, 9}, { 383,12}, { 63,11}, \ + { 127,10}, { 255, 9}, { 511,10}, { 271,11}, \ + { 143,10}, { 287, 9}, { 575,10}, { 319,12}, \ + { 95,11}, { 191,10}, { 383,13}, { 63,12}, \ + { 127,11}, { 255,10}, { 511,11}, { 271,10}, \ + { 543,11}, { 287,10}, { 575, 9}, { 1151,11}, \ + { 319,10}, { 639,11}, { 351,10}, { 703,12}, \ + { 191,11}, { 383,10}, { 767,11}, { 415,12}, \ + { 223,11}, { 447,13}, { 127,12}, { 255,11}, \ + { 511,10}, { 1023,11}, { 543,10}, { 1087,12}, \ + { 287,11}, { 575,10}, { 1151,12}, { 319,11}, \ + { 639,12}, { 351,11}, { 703,13}, { 191,12}, \ + { 383,11}, { 767,12}, { 415,11}, { 831,12}, \ + { 447,11}, { 895,14}, { 127,13}, { 255,12}, \ + { 511,11}, { 1023,12}, { 543,11}, { 1087,10}, \ + { 2175,12}, { 575,11}, { 1151,12}, { 607,13}, \ + { 319,12}, { 639,11}, { 1279,12}, { 671,11}, \ + { 1343,12}, { 703,11}, { 1407,13}, { 383,12}, \ + { 767,11}, { 1535,12}, { 831,13}, { 447,12}, \ + { 959,11}, { 1919,14}, { 255,13}, { 511,12}, \ + { 1087,11}, { 2175,13}, { 575,12}, { 1215,11}, \ + { 2431,10}, { 4863,13}, { 639,12}, { 1343,13}, \ + { 703,12}, { 1407,14}, { 383,13}, { 767,12}, \ + { 1535,13}, { 831,12}, { 1663,13}, { 959,12}, \ + { 1919,11}, { 3839,15}, { 255,14}, { 511,13}, \ + { 1087,12}, { 2175,13}, { 1215,12}, { 2431,11}, \ + { 4863,14}, { 639,13}, { 1343,12}, { 2687,13}, \ + { 1407,12}, { 2815,13}, { 1471,12}, { 2943,14}, \ + { 767,13}, { 1599,12}, { 3199,13}, { 1663,14}, \ + { 895,13}, { 1919,12}, { 3839,15}, { 511,14}, \ + { 1023,13}, { 2175,14}, { 1151,13}, { 2431,12}, \ + { 4863,14}, { 1279,13}, { 2687,14}, { 1407,13}, \ + { 2943,15}, { 767,14}, { 1535,13}, { 3199,14}, \ + { 1663,13}, { 3327,14}, { 1919,13}, { 3839,16}, \ + { 511,15}, { 1023,14}, { 2431,13}, { 4863,15}, \ + { 1279,14}, { 2943,12}, { 11775,15}, { 1535,14}, \ + { 3327,15}, { 1791,14}, { 16384,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 208 +#define MUL_FFT_THRESHOLD 3712 + +#define SQR_FFT_MODF_THRESHOLD 272 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 272, 5}, { 15, 6}, { 8, 5}, { 17, 6}, \ + { 19, 7}, { 17, 8}, { 9, 7}, { 21, 8}, \ + { 11, 7}, { 24, 8}, { 13, 7}, { 27, 8}, \ + { 15, 7}, { 31, 8}, { 21, 9}, { 11, 8}, \ + { 27, 9}, { 15, 8}, { 33, 9}, { 19, 8}, \ + { 39, 9}, { 23, 8}, { 47, 9}, { 27,10}, \ + { 15, 9}, { 39,10}, { 23, 9}, { 47,11}, \ + { 15,10}, { 31, 9}, { 63,10}, { 47,11}, \ + { 31,10}, { 71, 9}, { 143,10}, { 79,11}, \ + { 47,10}, { 95,12}, { 31,11}, { 63,10}, \ + { 127, 9}, { 255, 8}, { 511, 9}, { 271,10}, \ + { 143,11}, { 79,10}, { 159, 9}, { 319,10}, \ + { 175, 9}, { 351,11}, { 95,10}, { 191, 9}, \ + { 383,10}, { 207, 9}, { 415,12}, { 63,11}, \ + { 127,10}, { 255, 9}, { 511,10}, { 271,11}, \ + { 143,10}, { 287, 9}, { 575,11}, { 159,10}, \ + { 319,11}, { 175,10}, { 351,12}, { 95,11}, \ + { 191,10}, { 383,11}, { 207,10}, { 415,13}, \ + { 63,12}, { 127,11}, { 255,10}, { 511,11}, \ + { 271,10}, { 543,11}, { 287,10}, { 575,12}, \ + { 159,11}, { 319,10}, { 639,11}, { 351,10}, \ + { 703,12}, { 191,11}, { 383,10}, { 767,11}, \ + { 415,12}, { 223,11}, { 447,10}, { 895,11}, \ + { 479,10}, { 959,12}, { 255,11}, { 511,10}, \ + { 1023,11}, { 543,12}, { 287,11}, { 575,12}, \ + { 319,11}, { 639,12}, { 351,11}, { 703,13}, \ + { 191,12}, { 383,11}, { 767,12}, { 415,11}, \ + { 831,12}, { 447,11}, { 895,12}, { 479,11}, \ + { 959,13}, { 255,12}, { 511,11}, { 1023,12}, \ + { 543,11}, { 1087,12}, { 575,13}, { 319,12}, \ + { 639,11}, { 1279,12}, { 703,11}, { 1407,13}, \ + { 383,12}, { 831,13}, { 447,12}, { 959,14}, \ + { 255,13}, { 511,12}, { 1087,13}, { 575,12}, \ + { 1215,13}, { 639,12}, { 1279,13}, { 703,12}, \ + { 1407,14}, { 383,13}, { 831,12}, { 1663,13}, \ + { 959,12}, { 1919,15}, { 255,14}, { 511,13}, \ + { 1023,12}, { 2047,13}, { 1087,12}, { 2175,13}, \ + { 1215,14}, { 639,13}, { 1407,12}, { 2815,14}, \ + { 767,13}, { 1663,14}, { 895,13}, { 1919,15}, \ + { 511,14}, { 1023,13}, { 2175,14}, { 1151,13}, \ + { 2431,12}, { 4863,14}, { 1407,13}, { 2815,15}, \ + { 767,14}, { 1663,13}, { 3327,14}, { 1919,13}, \ + { 3839,16}, { 511,15}, { 1023,14}, { 2431,13}, \ + { 4863,15}, { 1279,14}, { 2943,13}, { 5887,12}, \ + { 11775,15}, { 1535,14}, { 3327,15}, { 1791,14}, \ + { 16384,15}, { 32768,16}, { 65536,17}, { 131072,18}, \ + { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ + {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 190 +#define SQR_FFT_THRESHOLD 2752 + +#define MULLO_BASECASE_THRESHOLD 2 +#define MULLO_DC_THRESHOLD 31 +#define MULLO_MUL_N_THRESHOLD 7246 + +#define DC_DIV_QR_THRESHOLD 29 +#define DC_DIVAPPR_Q_THRESHOLD 102 +#define DC_BDIV_QR_THRESHOLD 47 +#define DC_BDIV_Q_THRESHOLD 112 + +#define INV_MULMOD_BNM1_THRESHOLD 107 +#define INV_NEWTON_THRESHOLD 130 +#define INV_APPR_THRESHOLD 117 + +#define BINV_NEWTON_THRESHOLD 246 +#define REDC_1_TO_REDC_N_THRESHOLD 54 + +#define MU_DIV_QR_THRESHOLD 872 +#define MU_DIVAPPR_Q_THRESHOLD 855 +#define MUPI_DIV_QR_THRESHOLD 53 +#define MU_BDIV_QR_THRESHOLD 792 +#define MU_BDIV_Q_THRESHOLD 942 + +#define MATRIX22_STRASSEN_THRESHOLD 11 +#define HGCD_THRESHOLD 86 +#define GCD_DC_THRESHOLD 241 +#define GCDEXT_DC_THRESHOLD 229 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 13 +#define GET_STR_PRECOMPUTE_THRESHOLD 23 +#define SET_STR_DC_THRESHOLD 632 +#define SET_STR_PRECOMPUTE_THRESHOLD 1790 diff -Nru gmp-4.3.2+dfsg/mpn/s390/gmp-mparam.h gmp-5.0.2+dfsg/mpn/s390/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/s390/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/s390/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,16 +18,16 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* BITS_PER_MP_LIMB etc generated by configure */ +/* GMP_LIMB_BITS etc generated by configure */ /* Generated by tuneup.c, 2001-12-03, gcc 2.95 */ -#define MUL_KARATSUBA_THRESHOLD 18 -#define MUL_TOOM3_THRESHOLD 210 +#define MUL_TOOM22_THRESHOLD 18 +#define MUL_TOOM33_THRESHOLD 210 #define SQR_BASECASE_THRESHOLD 8 -#define SQR_KARATSUBA_THRESHOLD 40 +#define SQR_TOOM2_THRESHOLD 40 #define SQR_TOOM3_THRESHOLD 250 #define DIV_SB_PREINV_THRESHOLD 0 diff -Nru gmp-4.3.2+dfsg/mpn/sparc32/gmp-mparam.h gmp-5.0.2+dfsg/mpn/sparc32/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/sparc32/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/sparc32/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -20,11 +20,11 @@ /* Generated by tuneup.c, 2002-03-13, gcc 2.95, Weitek 8701 */ -#define MUL_KARATSUBA_THRESHOLD 8 -#define MUL_TOOM3_THRESHOLD 466 +#define MUL_TOOM22_THRESHOLD 8 +#define MUL_TOOM33_THRESHOLD 466 #define SQR_BASECASE_THRESHOLD 4 -#define SQR_KARATSUBA_THRESHOLD 16 +#define SQR_TOOM2_THRESHOLD 16 #define SQR_TOOM3_THRESHOLD 258 #define DIV_SB_PREINV_THRESHOLD 4 diff -Nru gmp-4.3.2+dfsg/mpn/sparc32/sparc-defs.m4 gmp-5.0.2+dfsg/mpn/sparc32/sparc-defs.m4 --- gmp-4.3.2+dfsg/mpn/sparc32/sparc-defs.m4 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/sparc32/sparc-defs.m4 2011-05-08 09:49:29.000000000 +0000 @@ -3,7 +3,7 @@ dnl m4 macros for SPARC assembler (32 and 64 bit). -dnl Copyright 2002 Free Software Foundation, Inc. +dnl Copyright 2002, 2011 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl @@ -21,7 +21,7 @@ dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -changecom(!) +changecom(;) dnl cannot use default # since that's used in REGISTER decls dnl Usage: REGISTER(reg,attr) diff -Nru gmp-4.3.2+dfsg/mpn/sparc32/v8/gmp-mparam.h gmp-5.0.2+dfsg/mpn/sparc32/v8/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/sparc32/v8/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/sparc32/v8/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -19,16 +19,16 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 /* Generated by tuneup.c, 2004-02-07, gcc 2.95 */ -#define MUL_KARATSUBA_THRESHOLD 10 -#define MUL_TOOM3_THRESHOLD 65 +#define MUL_TOOM22_THRESHOLD 10 +#define MUL_TOOM33_THRESHOLD 65 #define SQR_BASECASE_THRESHOLD 4 -#define SQR_KARATSUBA_THRESHOLD 18 +#define SQR_TOOM2_THRESHOLD 18 #define SQR_TOOM3_THRESHOLD 65 #define DIV_SB_PREINV_THRESHOLD 5 diff -Nru gmp-4.3.2+dfsg/mpn/sparc32/v8/supersparc/gmp-mparam.h gmp-5.0.2+dfsg/mpn/sparc32/v8/supersparc/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/sparc32/v8/supersparc/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/sparc32/v8/supersparc/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -19,16 +19,16 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 /* Generated by tuneup.c, 2004-02-10, gcc 3.3 */ -#define MUL_KARATSUBA_THRESHOLD 14 -#define MUL_TOOM3_THRESHOLD 81 +#define MUL_TOOM22_THRESHOLD 14 +#define MUL_TOOM33_THRESHOLD 81 #define SQR_BASECASE_THRESHOLD 5 -#define SQR_KARATSUBA_THRESHOLD 28 +#define SQR_TOOM2_THRESHOLD 28 #define SQR_TOOM3_THRESHOLD 86 #define DIV_SB_PREINV_THRESHOLD 0 /* always */ diff -Nru gmp-4.3.2+dfsg/mpn/sparc32/v9/gmp-mparam.h gmp-5.0.2+dfsg/mpn/sparc32/v9/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/sparc32/v9/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/sparc32/v9/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* SPARC v9 32-bit gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2009 Free Software -Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2009, 2010 Free +Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,56 +18,81 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 -/* Generated by tuneup.c, 2009-02-12, gcc 2.95 */ - -#define MUL_KARATSUBA_THRESHOLD 28 -#define MUL_TOOM3_THRESHOLD 97 -#define MUL_TOOM44_THRESHOLD 136 - -#define SQR_BASECASE_THRESHOLD 8 -#define SQR_KARATSUBA_THRESHOLD 60 -#define SQR_TOOM3_THRESHOLD 138 -#define SQR_TOOM4_THRESHOLD 278 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 111 -#define MULLOW_MUL_N_THRESHOLD 434 - -#define DIV_SB_PREINV_THRESHOLD 7 -#define DIV_DC_THRESHOLD 122 -#define POWM_THRESHOLD 154 - -#define MATRIX22_STRASSEN_THRESHOLD 12 -#define HGCD_THRESHOLD 155 -#define GCD_DC_THRESHOLD 614 -#define GCDEXT_DC_THRESHOLD 438 -#define JACOBI_BASE_METHOD 2 - -#define DIVREM_1_NORM_THRESHOLD 5 -#define DIVREM_1_UNNORM_THRESHOLD 14 -#define MOD_1_NORM_THRESHOLD 4 -#define MOD_1_UNNORM_THRESHOLD 5 -#define MOD_1_1_THRESHOLD 7 -#define MOD_1_2_THRESHOLD 8 -#define MOD_1_4_THRESHOLD 16 -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 0 /* always */ -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD MP_SIZE_T_MAX /* never */ - -#define GET_STR_DC_THRESHOLD 12 -#define GET_STR_PRECOMPUTE_THRESHOLD 19 -#define SET_STR_DC_THRESHOLD 802 -#define SET_STR_PRECOMPUTE_THRESHOLD 1647 - -#define MUL_FFT_TABLE { 304, 736, 1152, 3584, 10240, 24576, 98304, 393216, 0 } -#define MUL_FFT_MODF_THRESHOLD 264 -#define MUL_FFT_THRESHOLD 2304 +#define DIVREM_1_NORM_THRESHOLD 3 +#define DIVREM_1_UNNORM_THRESHOLD 5 +#define MOD_1_NORM_THRESHOLD 4 +#define MOD_1_UNNORM_THRESHOLD 7 +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define MOD_1U_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_1_TO_MOD_1_2_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define USE_PREINV_DIVREM_1 1 +#define DIVREM_2_THRESHOLD 0 /* always */ +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 32 +#define MUL_TOOM33_THRESHOLD 96 +#define MUL_TOOM44_THRESHOLD 143 +#define MUL_TOOM6H_THRESHOLD 216 +#define MUL_TOOM8H_THRESHOLD 494 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 96 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 145 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 97 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 92 + +#define SQR_BASECASE_THRESHOLD 12 +#define SQR_TOOM2_THRESHOLD 62 +#define SQR_TOOM3_THRESHOLD 103 +#define SQR_TOOM4_THRESHOLD 274 +#define SQR_TOOM6_THRESHOLD 274 +#define SQR_TOOM8_THRESHOLD 542 + +#define MULMOD_BNM1_THRESHOLD 14 +#define SQRMOD_BNM1_THRESHOLD 21 + +#define MUL_FFT_TABLE { 272, 736, 1152, 3584, 10240, 24576, 98304, 917504, 0 } +#define MUL_FFT_MODF_THRESHOLD 248 +#define MUL_FFT_THRESHOLD 2112 #define SQR_FFT_TABLE { 336, 800, 1408, 3584, 10240, 24576, 98304, 393216, 0 } -#define SQR_FFT_MODF_THRESHOLD 248 -#define SQR_FFT_THRESHOLD 2304 +#define SQR_FFT_MODF_THRESHOLD 248 +#define SQR_FFT_THRESHOLD 2112 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 106 +#define MULLO_MUL_N_THRESHOLD 3493 + +#define DC_DIV_QR_THRESHOLD 123 +#define DC_DIVAPPR_Q_THRESHOLD 396 +#define DC_BDIV_QR_THRESHOLD 121 +#define DC_BDIV_Q_THRESHOLD 280 + +#define INV_MULMOD_BNM1_THRESHOLD 62 +#define INV_NEWTON_THRESHOLD 351 +#define INV_APPR_THRESHOLD 357 + +#define BINV_NEWTON_THRESHOLD 324 +#define REDC_1_TO_REDC_N_THRESHOLD 78 + +#define MU_DIV_QR_THRESHOLD 1895 +#define MU_DIVAPPR_Q_THRESHOLD 1895 +#define MUPI_DIV_QR_THRESHOLD 122 +#define MU_BDIV_QR_THRESHOLD 872 +#define MU_BDIV_Q_THRESHOLD 2801 + +#define MATRIX22_STRASSEN_THRESHOLD 13 +#define HGCD_THRESHOLD 144 +#define GCD_DC_THRESHOLD 630 +#define GCDEXT_DC_THRESHOLD 416 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 9 +#define GET_STR_PRECOMPUTE_THRESHOLD 17 +#define SET_STR_DC_THRESHOLD 537 +#define SET_STR_PRECOMPUTE_THRESHOLD 1576 diff -Nru gmp-4.3.2+dfsg/mpn/sparc64/gmp-mparam.h gmp-5.0.2+dfsg/mpn/sparc64/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/sparc64/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/sparc64/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* Sparc64 gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009 -Free Software Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009, +2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,63 +18,112 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 -/* Tell the toom3 multiply implementation to call low-level mpn - functions instead of open-coding operations in C. */ -#ifndef USE_MORE_MPN -#define USE_MORE_MPN 1 -#endif - -/* Generated by tuneup.c, 2009-01-15, gcc 3.4 */ - -#define MUL_KARATSUBA_THRESHOLD 33 -#define MUL_TOOM3_THRESHOLD 189 -#define MUL_TOOM44_THRESHOLD 256 - -#define SQR_BASECASE_THRESHOLD 9 -#define SQR_KARATSUBA_THRESHOLD 70 -#define SQR_TOOM3_THRESHOLD 226 -#define SQR_TOOM4_THRESHOLD 345 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 46 -#define MULLOW_MUL_N_THRESHOLD 143 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 34 -#define POWM_THRESHOLD 116 - -#define MATRIX22_STRASSEN_THRESHOLD 18 -#define HGCD_THRESHOLD 51 -#define GCD_DC_THRESHOLD 293 -#define GCDEXT_DC_THRESHOLD 198 -#define JACOBI_BASE_METHOD 3 - -#define DIVREM_1_NORM_THRESHOLD 3 -#define DIVREM_1_UNNORM_THRESHOLD 3 -#define MOD_1_NORM_THRESHOLD 3 -#define MOD_1_UNNORM_THRESHOLD 3 -#define MOD_1_1_THRESHOLD 12 -#define MOD_1_2_THRESHOLD 13 -#define MOD_1_4_THRESHOLD 16 -#define USE_PREINV_DIVREM_1 1 -#define USE_PREINV_MOD_1 1 -#define DIVREM_2_THRESHOLD 6 -#define DIVEXACT_1_THRESHOLD 0 /* always */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always */ - -#define GET_STR_DC_THRESHOLD 13 -#define GET_STR_PRECOMPUTE_THRESHOLD 21 -#define SET_STR_DC_THRESHOLD 638 -#define SET_STR_PRECOMPUTE_THRESHOLD 1889 - -#define MUL_FFT_TABLE { 304, 608, 1600, 2816, 7168, 20480, 81920, 196608, 786432, 0 } -#define MUL_FFT_MODF_THRESHOLD 216 -#define MUL_FFT_THRESHOLD 1664 - -#define SQR_FFT_TABLE { 336, 736, 1600, 2816, 7168, 20480, 49152, 196608, 786432, 0 } -#define SQR_FFT_MODF_THRESHOLD 216 -#define SQR_FFT_THRESHOLD 1312 +/* 500 MHz ultrasparc2 running GNU/Linux */ +#define DIVREM_1_NORM_THRESHOLD 3 +#define DIVREM_1_UNNORM_THRESHOLD 4 +#define MOD_1_NORM_THRESHOLD 3 +#define MOD_1_UNNORM_THRESHOLD 3 +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define MOD_1U_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_1_TO_MOD_1_2_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define USE_PREINV_DIVREM_1 1 +#define DIVREM_2_THRESHOLD 7 +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 30 +#define MUL_TOOM33_THRESHOLD 187 +#define MUL_TOOM44_THRESHOLD 278 +#define MUL_TOOM6H_THRESHOLD 278 +#define MUL_TOOM8H_THRESHOLD 357 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 201 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 199 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 154 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 107 + +#define SQR_BASECASE_THRESHOLD 13 +#define SQR_TOOM2_THRESHOLD 69 +#define SQR_TOOM3_THRESHOLD 116 +#define SQR_TOOM4_THRESHOLD 336 +#define SQR_TOOM6_THRESHOLD 336 +#define SQR_TOOM8_THRESHOLD 454 + +#define MULMOD_BNM1_THRESHOLD 17 +#define SQRMOD_BNM1_THRESHOLD 23 + +#define MUL_FFT_MODF_THRESHOLD 248 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 248, 5}, { 9, 4}, { 19, 6}, { 5, 5}, \ + { 15, 6}, { 8, 5}, { 17, 6}, { 21, 7}, \ + { 19, 8}, { 11, 7}, { 25, 8}, { 15, 7}, \ + { 31, 8}, { 27, 9}, { 15, 8}, { 33, 9}, \ + { 19, 8}, { 39, 9}, { 27,10}, { 15, 9}, \ + { 39,10}, { 23, 9}, { 47,11}, { 15,10}, \ + { 31, 9}, { 67,10}, { 39, 9}, { 79,10}, \ + { 47,11}, { 31,10}, { 63, 9}, { 127, 8}, \ + { 255,10}, { 71, 9}, { 143, 8}, { 287,10}, \ + { 79,11}, { 47,12}, { 4096,13}, { 8192,14}, \ + { 16384,15}, { 32768,16}, { 65536,17}, { 131072,18}, \ + { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ + {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 50 +#define MUL_FFT_THRESHOLD 1984 + +#define SQR_FFT_MODF_THRESHOLD 236 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 236, 5}, { 8, 4}, { 17, 5}, { 19, 6}, \ + { 10, 5}, { 21, 6}, { 19, 7}, { 10, 6}, \ + { 21, 7}, { 21, 8}, { 21, 9}, { 11, 8}, \ + { 23, 9}, { 19, 8}, { 43, 9}, { 23,10}, \ + { 15, 9}, { 43,10}, { 23,11}, { 15,10}, \ + { 31, 9}, { 63,10}, { 47, 8}, { 191,11}, \ + { 31,10}, { 63, 8}, { 255, 7}, { 511, 9}, \ + { 135, 8}, { 271,10}, { 71, 9}, { 143, 8}, \ + { 287, 7}, { 575,11}, { 47, 9}, { 191, 8}, \ + { 383,12}, { 4096,13}, { 8192,14}, { 16384,15}, \ + { 32768,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ + { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ + {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 49 +#define SQR_FFT_THRESHOLD 1120 + +#define MULLO_BASECASE_THRESHOLD 16 +#define MULLO_DC_THRESHOLD 41 +#define MULLO_MUL_N_THRESHOLD 3791 + +#define DC_DIV_QR_THRESHOLD 27 +#define DC_DIVAPPR_Q_THRESHOLD 100 +#define DC_BDIV_QR_THRESHOLD 47 +#define DC_BDIV_Q_THRESHOLD 174 + +#define INV_MULMOD_BNM1_THRESHOLD 58 +#define INV_NEWTON_THRESHOLD 13 +#define INV_APPR_THRESHOLD 9 + +#define BINV_NEWTON_THRESHOLD 187 +#define REDC_1_TO_REDC_2_THRESHOLD 10 +#define REDC_2_TO_REDC_N_THRESHOLD 115 + +#define MU_DIV_QR_THRESHOLD 680 +#define MU_DIVAPPR_Q_THRESHOLD 618 +#define MUPI_DIV_QR_THRESHOLD 0 /* always */ +#define MU_BDIV_QR_THRESHOLD 748 +#define MU_BDIV_Q_THRESHOLD 889 + +#define MATRIX22_STRASSEN_THRESHOLD 13 +#define HGCD_THRESHOLD 53 +#define GCD_DC_THRESHOLD 283 +#define GCDEXT_DC_THRESHOLD 186 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 13 +#define GET_STR_PRECOMPUTE_THRESHOLD 16 +#define SET_STR_DC_THRESHOLD 390 +#define SET_STR_PRECOMPUTE_THRESHOLD 1665 diff -Nru gmp-4.3.2+dfsg/mpn/sparc64/ultrasparc34/gmp-mparam.h gmp-5.0.2+dfsg/mpn/sparc64/ultrasparc34/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/sparc64/ultrasparc34/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/sparc64/ultrasparc34/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,192 @@ +/* ultrasparc3/4 gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2006, 2008, 2009, +2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define GMP_LIMB_BITS 64 +#define BYTES_PER_MP_LIMB 8 + +/* 1593 MHz ultrasparc3 running Solaris 10 (swift.nada.kth.se) */ + +#define DIVREM_1_NORM_THRESHOLD 0 /* always */ +#define DIVREM_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define MOD_1U_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_1_TO_MOD_1_2_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define USE_PREINV_DIVREM_1 1 +#define DIVREM_2_THRESHOLD 0 /* always */ +#define DIVEXACT_1_THRESHOLD 0 /* always */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 30 +#define MUL_TOOM33_THRESHOLD 93 +#define MUL_TOOM44_THRESHOLD 143 +#define MUL_TOOM6H_THRESHOLD 165 +#define MUL_TOOM8H_THRESHOLD 303 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 93 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 95 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 85 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 50 + +#define SQR_BASECASE_THRESHOLD 10 +#define SQR_TOOM2_THRESHOLD 72 +#define SQR_TOOM3_THRESHOLD 97 +#define SQR_TOOM4_THRESHOLD 179 +#define SQR_TOOM6_THRESHOLD 191 +#define SQR_TOOM8_THRESHOLD 339 + +#define MULMOD_BNM1_THRESHOLD 14 +#define SQRMOD_BNM1_THRESHOLD 9 + +#define MUL_FFT_MODF_THRESHOLD 212 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 212, 5}, { 13, 6}, { 17, 7}, { 9, 6}, \ + { 19, 7}, { 17, 8}, { 9, 7}, { 20, 8}, \ + { 11, 7}, { 24, 8}, { 13, 9}, { 7, 8}, \ + { 19, 9}, { 11, 8}, { 25,10}, { 7, 9}, \ + { 15, 8}, { 33, 9}, { 19, 8}, { 39, 9}, \ + { 23, 8}, { 47, 9}, { 27,10}, { 15, 9}, \ + { 39,10}, { 23, 9}, { 47,11}, { 15,10}, \ + { 31, 9}, { 67,10}, { 39, 9}, { 79, 8}, \ + { 159, 9}, { 83,10}, { 47, 9}, { 95, 8}, \ + { 191, 7}, { 383, 9}, { 99,10}, { 55,11}, \ + { 31,10}, { 63, 9}, { 127, 8}, { 255,10}, \ + { 71, 9}, { 143, 8}, { 287,10}, { 79, 9}, \ + { 159, 8}, { 319,11}, { 47,10}, { 95, 9}, \ + { 191, 8}, { 383,10}, { 103, 9}, { 207, 8}, \ + { 415,10}, { 111,12}, { 31,11}, { 63,10}, \ + { 127, 9}, { 255,10}, { 143, 9}, { 287,11}, \ + { 79,10}, { 159, 9}, { 319, 8}, { 639,10}, \ + { 175, 9}, { 351,11}, { 95,10}, { 191, 9}, \ + { 383,10}, { 207, 9}, { 415,11}, { 111,10}, \ + { 223, 9}, { 447,12}, { 63,11}, { 127,10}, \ + { 255,11}, { 143,10}, { 287, 9}, { 575,11}, \ + { 159,10}, { 319,11}, { 175,10}, { 351,12}, \ + { 95,11}, { 191,10}, { 383,11}, { 207,10}, \ + { 415,11}, { 223,10}, { 447,13}, { 63,12}, \ + { 127,11}, { 287,10}, { 575,12}, { 159,11}, \ + { 351,10}, { 703,12}, { 191,11}, { 415,12}, \ + { 223,11}, { 479,10}, { 959,13}, { 127,12}, \ + { 287,11}, { 575,12}, { 351,13}, { 191,12}, \ + { 479,14}, { 127,13}, { 255,12}, { 575,13}, \ + { 319,12}, { 639,11}, { 1279,12}, { 703,13}, \ + { 383,12}, { 831,13}, { 447,12}, { 895,14}, \ + { 255,13}, { 511,12}, { 1087,13}, { 575,12}, \ + { 1215,13}, { 639,12}, { 1279,13}, { 703,14}, \ + { 383,13}, { 831,12}, { 1663,13}, { 895,15}, \ + { 255,14}, { 511,13}, { 1151,14}, { 639,13}, \ + { 1407,14}, { 767,13}, { 1663,14}, { 895,13}, \ + { 1791,15}, { 511,14}, { 1023,13}, { 2047,14}, \ + { 1151,13}, { 2303,14}, { 1407,15}, { 767,14}, \ + { 1791,16}, { 511,15}, { 1023,14}, { 2303,15}, \ + { 1279,14}, { 2815,15}, { 1535,14}, { 3199,15}, \ + { 1791,14}, { 3583,16}, { 65536,17}, { 131072,18}, \ + { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ + {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 170 +#define MUL_FFT_THRESHOLD 2240 + +#define SQR_FFT_MODF_THRESHOLD 244 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 244, 5}, { 8, 4}, { 17, 5}, { 17, 6}, \ + { 17, 7}, { 9, 6}, { 19, 7}, { 17, 8}, \ + { 9, 7}, { 20, 8}, { 11, 7}, { 23, 8}, \ + { 21, 9}, { 11, 8}, { 25, 9}, { 15, 8}, \ + { 31, 9}, { 19, 8}, { 39, 9}, { 27,10}, \ + { 15, 9}, { 39,10}, { 23, 9}, { 47,11}, \ + { 15,10}, { 31, 9}, { 67,10}, { 39, 9}, \ + { 79,10}, { 55,11}, { 31,10}, { 63, 9}, \ + { 127, 8}, { 255,10}, { 71, 9}, { 143, 8}, \ + { 287,10}, { 79, 9}, { 159,11}, { 47,10}, \ + { 95, 9}, { 191, 8}, { 383,12}, { 31,11}, \ + { 63,10}, { 127, 9}, { 255, 8}, { 511,10}, \ + { 135, 9}, { 271,10}, { 143, 9}, { 287,11}, \ + { 79,10}, { 159, 9}, { 319, 8}, { 639,10}, \ + { 175, 9}, { 351, 8}, { 703,11}, { 95,10}, \ + { 191, 9}, { 383, 8}, { 767,10}, { 207, 9}, \ + { 415, 8}, { 831,10}, { 223, 9}, { 447,12}, \ + { 63,11}, { 127,10}, { 271, 9}, { 543,11}, \ + { 143,10}, { 287, 9}, { 575, 8}, { 1151, 9}, \ + { 607,11}, { 159,10}, { 319, 9}, { 639,11}, \ + { 175,10}, { 351, 9}, { 703, 8}, { 1407,12}, \ + { 95,11}, { 191,10}, { 383,11}, { 207,10}, \ + { 415, 9}, { 831,11}, { 223,10}, { 447,13}, \ + { 63,12}, { 127,11}, { 271,10}, { 543,11}, \ + { 287,10}, { 575, 9}, { 1151,10}, { 607,12}, \ + { 159,11}, { 319,10}, { 639,11}, { 351,10}, \ + { 703,12}, { 191,11}, { 415,10}, { 831,12}, \ + { 223,11}, { 479,13}, { 127,12}, { 255,11}, \ + { 543,12}, { 287,11}, { 607,12}, { 319,11}, \ + { 639,12}, { 351,11}, { 703,13}, { 191,12}, \ + { 415,11}, { 831,12}, { 479,11}, { 959,14}, \ + { 127,13}, { 255,12}, { 543,11}, { 1087,12}, \ + { 575,13}, { 319,12}, { 639,11}, { 1279,12}, \ + { 703,13}, { 383,12}, { 831,13}, { 447,12}, \ + { 895,14}, { 255,13}, { 511,12}, { 1023,13}, \ + { 575,12}, { 1151,13}, { 703,14}, { 383,13}, \ + { 831,12}, { 1663,13}, { 959,15}, { 255,14}, \ + { 511,13}, { 1087,12}, { 2175,13}, { 1151,14}, \ + { 639,13}, { 1407,14}, { 767,13}, { 1663,14}, \ + { 895,13}, { 1791,15}, { 511,14}, { 1023,13}, \ + { 2047,14}, { 1151,13}, { 2431,14}, { 1407,15}, \ + { 767,14}, { 1791,16}, { 511,15}, { 1023,14}, \ + { 2303,15}, { 1279,14}, { 2815,15}, { 1535,14}, \ + { 3199,15}, { 1791,16}, { 65536,17}, { 131072,18}, \ + { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ + {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 182 +#define SQR_FFT_THRESHOLD 1984 + +#define MULLO_BASECASE_THRESHOLD 26 +#define MULLO_DC_THRESHOLD 0 /* never mpn_mullo_basecase */ +#define MULLO_MUL_N_THRESHOLD 4392 + +#define DC_DIV_QR_THRESHOLD 16 +#define DC_DIVAPPR_Q_THRESHOLD 66 +#define DC_BDIV_QR_THRESHOLD 26 +#define DC_BDIV_Q_THRESHOLD 92 + +#define INV_MULMOD_BNM1_THRESHOLD 58 +#define INV_NEWTON_THRESHOLD 17 +#define INV_APPR_THRESHOLD 17 + +#define BINV_NEWTON_THRESHOLD 134 +#define REDC_1_TO_REDC_2_THRESHOLD 10 +#define REDC_2_TO_REDC_N_THRESHOLD 117 + +#define MU_DIV_QR_THRESHOLD 748 +#define MU_DIVAPPR_Q_THRESHOLD 630 +#define MUPI_DIV_QR_THRESHOLD 0 /* always */ +#define MU_BDIV_QR_THRESHOLD 748 +#define MU_BDIV_Q_THRESHOLD 807 + +#define MATRIX22_STRASSEN_THRESHOLD 12 +#define HGCD_THRESHOLD 39 +#define GCD_DC_THRESHOLD 130 +#define GCDEXT_DC_THRESHOLD 134 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 18 +#define GET_STR_PRECOMPUTE_THRESHOLD 27 +#define SET_STR_DC_THRESHOLD 315 +#define SET_STR_PRECOMPUTE_THRESHOLD 1037 diff -Nru gmp-4.3.2+dfsg/mpn/vax/gmp-mparam.h gmp-5.0.2+dfsg/mpn/vax/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/vax/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/vax/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -20,11 +20,11 @@ /* These numbers were measured manually using the tune/speed program. The standard tune/tunup takes too long. (VAX 8800) */ -#define MUL_KARATSUBA_THRESHOLD 14 -#define MUL_TOOM3_THRESHOLD 110 +#define MUL_TOOM22_THRESHOLD 14 +#define MUL_TOOM33_THRESHOLD 110 #define SQR_BASECASE_THRESHOLD 6 -#define SQR_KARATSUBA_THRESHOLD 42 +#define SQR_TOOM2_THRESHOLD 42 #define SQR_TOOM3_THRESHOLD 250 /* #define DIV_SB_PREINV_THRESHOLD */ diff -Nru gmp-4.3.2+dfsg/mpn/x86/atom/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86/atom/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86/atom/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/atom/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,179 @@ +/* Intel Atom/32 gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +2008, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define GMP_LIMB_BITS 32 +#define BYTES_PER_MP_LIMB 4 + +/* Generated by tuneup.c */ + +#define MOD_1_NORM_THRESHOLD 3 +#define MOD_1_UNNORM_THRESHOLD 7 +#define MOD_1N_TO_MOD_1_1_THRESHOLD 19 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 7 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD MP_SIZE_T_MAX +#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 31 +#define USE_PREINV_DIVREM_1 1 +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 16 +#define MUL_TOOM33_THRESHOLD 66 +#define MUL_TOOM44_THRESHOLD 171 +#define MUL_TOOM6H_THRESHOLD 258 +#define MUL_TOOM8H_THRESHOLD 357 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 113 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 129 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 115 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 129 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 16 +#define SQR_TOOM3_THRESHOLD 113 +#define SQR_TOOM4_THRESHOLD 193 +#define SQR_TOOM6_THRESHOLD 254 +#define SQR_TOOM8_THRESHOLD 381 + +#define MULMOD_BNM1_THRESHOLD 13 +#define SQRMOD_BNM1_THRESHOLD 11 + +#define MUL_FFT_MODF_THRESHOLD 332 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 332, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 11, 5}, { 23, 6}, { 17, 7}, { 9, 6}, \ + { 19, 7}, { 11, 6}, { 25, 7}, { 15, 6}, \ + { 31, 7}, { 19, 8}, { 11, 7}, { 27, 8}, \ + { 15, 7}, { 33, 8}, { 19, 7}, { 39, 8}, \ + { 23, 7}, { 47, 8}, { 27, 9}, { 15, 8}, \ + { 35, 7}, { 71, 8}, { 39, 9}, { 23, 8}, \ + { 51,10}, { 15, 9}, { 31, 8}, { 67, 9}, \ + { 39, 8}, { 79, 9}, { 55,10}, { 31, 9}, \ + { 79,10}, { 47, 9}, { 95,11}, { 31,10}, \ + { 63, 9}, { 127, 8}, { 255, 9}, { 135,10}, \ + { 79, 9}, { 159,10}, { 95, 9}, { 191, 8}, \ + { 383,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511, 9}, { 271,10}, { 143, 9}, { 287, 8}, \ + { 607,10}, { 159, 9}, { 319,11}, { 95,10}, \ + { 191, 9}, { 383,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 511,10}, { 271, 9}, { 543, 8}, \ + { 1087,10}, { 287, 9}, { 607,11}, { 159,10}, \ + { 351, 9}, { 703, 8}, { 1407,11}, { 191,10}, \ + { 415, 9}, { 831,11}, { 223,10}, { 479, 9}, \ + { 959,12}, { 127,11}, { 255,10}, { 543, 9}, \ + { 1087,11}, { 287,10}, { 607, 9}, { 1215,11}, \ + { 351,10}, { 703, 9}, { 1407,12}, { 191,11}, \ + { 383,10}, { 767,11}, { 415,10}, { 831,11}, \ + { 479,10}, { 959,13}, { 127,12}, { 255,11}, \ + { 543,10}, { 1087,11}, { 607,10}, { 1215,12}, \ + { 319,11}, { 703,10}, { 1407,11}, { 735,10}, \ + { 1471,12}, { 383,11}, { 831,12}, { 447,11}, \ + { 959,10}, { 1919,13}, { 255,12}, { 511,11}, \ + { 1087,12}, { 575,11}, { 1215,10}, { 2431,12}, \ + { 703,11}, { 1471,13}, { 383,12}, { 959,11}, \ + { 1919,14}, { 255,13}, { 511,12}, { 1215,11}, \ + { 2431,13}, { 639,12}, { 1471,11}, { 2943,10}, \ + { 5887,13}, { 767,12}, { 1599,13}, { 895,12}, \ + { 1919,11}, { 3839,14}, { 511,13}, { 1023,12}, \ + { 2111,13}, { 1151,12}, { 2431,13}, { 1407,12}, \ + { 2943,11}, { 5887,14}, { 767,13}, { 1919,12}, \ + { 3839,15}, { 511,14}, { 1023,13}, { 2431,14}, \ + { 1279,13}, { 2943,12}, { 5887,14}, { 1535,13}, \ + { 3199,14}, { 1791,13}, { 3839,12}, { 7679,15}, \ + { 1023,14}, { 16384,15}, { 32768,16} } +#define MUL_FFT_TABLE3_SIZE 163 +#define MUL_FFT_THRESHOLD 3456 + +#define SQR_FFT_MODF_THRESHOLD 308 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 308, 5}, { 13, 6}, { 7, 5}, { 17, 6}, \ + { 9, 5}, { 19, 6}, { 13, 7}, { 7, 6}, \ + { 17, 7}, { 9, 6}, { 19, 7}, { 11, 6}, \ + { 24, 7}, { 15, 6}, { 31, 7}, { 21, 8}, \ + { 11, 7}, { 25, 8}, { 15, 7}, { 31, 8}, \ + { 19, 7}, { 39, 8}, { 23, 7}, { 47, 8}, \ + { 27, 9}, { 15, 8}, { 31, 4}, { 607, 5}, \ + { 319, 7}, { 95, 8}, { 55, 9}, { 31, 8}, \ + { 63, 9}, { 39, 8}, { 79, 9}, { 47,10}, \ + { 31, 9}, { 79,10}, { 47,11}, { 31,10}, \ + { 63, 9}, { 127, 8}, { 255, 7}, { 511,10}, \ + { 79, 9}, { 159, 8}, { 319,10}, { 95, 9}, \ + { 191, 8}, { 383,11}, { 63,10}, { 127, 9}, \ + { 255, 8}, { 543, 7}, { 1087, 9}, { 287, 8}, \ + { 607,10}, { 159, 9}, { 319,11}, { 95,10}, \ + { 191, 9}, { 383,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 543, 8}, { 1087,10}, { 287, 9}, \ + { 607,11}, { 159,10}, { 351, 9}, { 703, 8}, \ + { 1407, 9}, { 735,11}, { 191,10}, { 415, 9}, \ + { 831,11}, { 223,10}, { 479, 9}, { 959, 8}, \ + { 1919,12}, { 127,11}, { 255,10}, { 543, 9}, \ + { 1087,11}, { 287,10}, { 607, 9}, { 1215,11}, \ + { 351,10}, { 703, 9}, { 1407,12}, { 191,11}, \ + { 415,10}, { 831,11}, { 479,10}, { 959, 9}, \ + { 1919,13}, { 127,12}, { 255,11}, { 543,10}, \ + { 1087,11}, { 607,10}, { 1215,12}, { 319,11}, \ + { 703,10}, { 1407,11}, { 735,12}, { 383,11}, \ + { 831,12}, { 447,11}, { 959,10}, { 1919, 9}, \ + { 3839,13}, { 255,12}, { 511,11}, { 1087,12}, \ + { 575,11}, { 1215,10}, { 2431,12}, { 703,11}, \ + { 1407,13}, { 383,12}, { 959,11}, { 1919,10}, \ + { 3839,14}, { 255,13}, { 511,12}, { 1215,11}, \ + { 2431,13}, { 639,12}, { 1471,11}, { 2943,13}, \ + { 767,12}, { 1599,13}, { 895,12}, { 1919,11}, \ + { 3839,14}, { 511,13}, { 1151,12}, { 2431,13}, \ + { 1407,12}, { 2943,14}, { 767,13}, { 1919,12}, \ + { 3839,15}, { 511,14}, { 1023,13}, { 2431,14}, \ + { 1279,13}, { 2943,14}, { 1791,13}, { 3839,15}, \ + { 1023,14}, { 16384,15}, { 32768,16} } +#define SQR_FFT_TABLE3_SIZE 155 +#define SQR_FFT_THRESHOLD 2368 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 56 +#define MULLO_MUL_N_THRESHOLD 6633 + +#define DC_DIV_QR_THRESHOLD 59 +#define DC_DIVAPPR_Q_THRESHOLD 216 +#define DC_BDIV_QR_THRESHOLD 56 +#define DC_BDIV_Q_THRESHOLD 136 + +#define INV_MULMOD_BNM1_THRESHOLD 59 +#define INV_NEWTON_THRESHOLD 260 +#define INV_APPR_THRESHOLD 244 + +#define BINV_NEWTON_THRESHOLD 266 +#define REDC_1_TO_REDC_N_THRESHOLD 62 + +#define MU_DIV_QR_THRESHOLD 1308 +#define MU_DIVAPPR_Q_THRESHOLD 1334 +#define MUPI_DIV_QR_THRESHOLD 130 +#define MU_BDIV_QR_THRESHOLD 1017 +#define MU_BDIV_Q_THRESHOLD 1308 + +#define MATRIX22_STRASSEN_THRESHOLD 15 +#define HGCD_THRESHOLD 111 +#define GCD_DC_THRESHOLD 375 +#define GCDEXT_DC_THRESHOLD 273 +#define JACOBI_BASE_METHOD 3 + +#define GET_STR_DC_THRESHOLD 14 +#define GET_STR_PRECOMPUTE_THRESHOLD 26 +#define SET_STR_DC_THRESHOLD 270 +#define SET_STR_PRECOMPUTE_THRESHOLD 860 diff -Nru gmp-4.3.2+dfsg/mpn/x86/dive_1.asm gmp-5.0.2+dfsg/mpn/x86/dive_1.asm --- gmp-4.3.2+dfsg/mpn/x86/dive_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/dive_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -97,7 +97,7 @@ subl %edx, %eax C inv = 2*inv - inv*inv*d - ASSERT(e,` C expect d*inv == 1 mod 2^BITS_PER_MP_LIMB + ASSERT(e,` C expect d*inv == 1 mod 2^GMP_LIMB_BITS pushl %eax FRAME_pushl() imull PARAM_DIVISOR, %eax cmpl $1, %eax diff -Nru gmp-4.3.2+dfsg/mpn/x86/divrem_2.asm gmp-5.0.2+dfsg/mpn/x86/divrem_2.asm --- gmp-4.3.2+dfsg/mpn/x86/divrem_2.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/divrem_2.asm 2011-05-08 09:49:29.000000000 +0000 @@ -81,7 +81,7 @@ seta %dl cmp 20(%esp), %ebp setae %al - or %dl, %al + orb %dl, %al jne L(35) L(8): mov 60(%esp), %esi C fn @@ -174,7 +174,7 @@ L(fix): seta %dl cmp 20(%esp), %ebp setae %al - or %dl, %al + orb %dl, %al je L(bck) inc %edi sub 20(%esp), %ebp diff -Nru gmp-4.3.2+dfsg/mpn/x86/fat/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86/fat/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86/fat/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/fat/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 @@ -35,14 +35,14 @@ #define USE_PREINV_DIVREM_1 1 /* mpn_sqr_basecase is faster than mpn_mul_basecase at all sizes, no need - for mpn_sqr_n to call the latter. */ + for mpn_sqr to call the latter. */ #define SQR_BASECASE_THRESHOLD 0 /* Sensible fallbacks for these, when not taken from a cpu-specific gmp-mparam.h. */ -#define MUL_KARATSUBA_THRESHOLD 20 -#define MUL_TOOM3_THRESHOLD 130 -#define SQR_KARATSUBA_THRESHOLD 30 +#define MUL_TOOM22_THRESHOLD 20 +#define MUL_TOOM33_THRESHOLD 130 +#define SQR_TOOM2_THRESHOLD 30 #define SQR_TOOM3_THRESHOLD 200 /* These are values more or less in the middle of what the typical x86 chips diff -Nru gmp-4.3.2+dfsg/mpn/x86/fat/mod_1.c gmp-5.0.2+dfsg/mpn/x86/fat/mod_1.c --- gmp-4.3.2+dfsg/mpn/x86/fat/mod_1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/fat/mod_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,21 @@ +/* Fat binary fallback mpn_mod_1. + +Copyright 2003, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "mpn/generic/mod_1.c" diff -Nru gmp-4.3.2+dfsg/mpn/x86/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 diff -Nru gmp-4.3.2+dfsg/mpn/x86/i486/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86/i486/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86/i486/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/i486/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -17,7 +17,7 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 @@ -25,11 +25,11 @@ /* Generated by tuneup.c, 2003-02-13, gcc 2.95 */ -#define MUL_KARATSUBA_THRESHOLD 18 -#define MUL_TOOM3_THRESHOLD 228 +#define MUL_TOOM22_THRESHOLD 18 +#define MUL_TOOM33_THRESHOLD 228 #define SQR_BASECASE_THRESHOLD 13 -#define SQR_KARATSUBA_THRESHOLD 49 +#define SQR_TOOM2_THRESHOLD 49 #define SQR_TOOM3_THRESHOLD 238 #define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX /* never */ diff -Nru gmp-4.3.2+dfsg/mpn/x86/invert_limb.asm gmp-5.0.2+dfsg/mpn/x86/invert_limb.asm --- gmp-4.3.2+dfsg/mpn/x86/invert_limb.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/invert_limb.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,169 @@ +dnl x86 mpn_invert_limb + +dnl Contributed to the GNU project by Niels Möller + +dnl Copyright 2009, 2011 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundation; either version 3 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + +C cycles (approx) div +C K7: 46 53 + +C Register usage: +C Input D in %edi +C Current approximation is in %eax and/or %ecx +C %ebx and %edx are temporaries +C %esi and %ebp are unused + +defframe(PARAM_DIVISOR,4) + +ASM_START() + +C Make approx_tab global to work around Apple relocation bug. +ifdef(`DARWIN',` + define(`approx_tab', MPN(invert_limb_tab)) + GLOBL approx_tab') + + TEXT + ALIGN(16) +PROLOGUE(mpn_invert_limb) +deflit(`FRAME', 0) + C Adding the unnecessary push of %ebp and the corresponding pop seems + C to *reduce* running time from 46 to 43 cycles on K7. Don't know if + C this is a benchmark artefact or some alignment issue. + + push %ebx FRAME_pushl() + C push %ebp FRAME_pushl() + push %edi FRAME_pushl() + + mov PARAM_DIVISOR, %edi + mov %edi, %eax + shr $22, %eax +ifdef(`PIC',` + LEA( approx_tab, %ebx) + movzwl -1024(%ebx, %eax, 2), %eax +',` + movzwl -1024+approx_tab`'(%eax, %eax), %eax C %eax = v0 +') + + C v1 = (v0 << 4) - ((v0*v0*d_21) >> 32) - 1 + mov %eax, %ecx + imul %eax, %eax + mov %edi, %ebx + shr $11, %ebx + inc %ebx + mul %ebx + mov %edi, %ebx C Prepare + shr %ebx + sbb %eax, %eax + sub %eax, %ebx C %ebx = d_31, %eax = mask + shl $4, %ecx + dec %ecx + sub %edx, %ecx C %ecx = v1 + + C v_2 = (v1 << 15) + ((v1 *(2^48 - v1 * d31 + (v1 >> 1) & mask)) >> 33) + imul %ecx, %ebx + and %ecx, %eax + shr %eax + sub %ebx, %eax + mul %ecx + mov %edi, %eax C Prepare for next mul + shl $15, %ecx + shr %edx + add %edx, %ecx C %ecx = v2 + + mul %ecx + add %edi, %eax + mov %ecx, %eax + adc %edi, %edx + sub %edx, %eax C %eax = v3 + + pop %edi + C pop %ebp + pop %ebx + + ret + +EPILOGUE() + +DEF_OBJECT(approx_tab,2) + .value 0x7fe1,0x7fa1,0x7f61,0x7f22,0x7ee3,0x7ea4,0x7e65,0x7e27 + .value 0x7de9,0x7dab,0x7d6d,0x7d30,0x7cf3,0x7cb6,0x7c79,0x7c3d + .value 0x7c00,0x7bc4,0x7b89,0x7b4d,0x7b12,0x7ad7,0x7a9c,0x7a61 + .value 0x7a27,0x79ec,0x79b2,0x7979,0x793f,0x7906,0x78cc,0x7894 + .value 0x785b,0x7822,0x77ea,0x77b2,0x777a,0x7742,0x770b,0x76d3 + .value 0x769c,0x7665,0x762f,0x75f8,0x75c2,0x758c,0x7556,0x7520 + .value 0x74ea,0x74b5,0x7480,0x744b,0x7416,0x73e2,0x73ad,0x7379 + .value 0x7345,0x7311,0x72dd,0x72aa,0x7277,0x7243,0x7210,0x71de + .value 0x71ab,0x7179,0x7146,0x7114,0x70e2,0x70b1,0x707f,0x704e + .value 0x701c,0x6feb,0x6fba,0x6f8a,0x6f59,0x6f29,0x6ef9,0x6ec8 + .value 0x6e99,0x6e69,0x6e39,0x6e0a,0x6ddb,0x6dab,0x6d7d,0x6d4e + .value 0x6d1f,0x6cf1,0x6cc2,0x6c94,0x6c66,0x6c38,0x6c0a,0x6bdd + .value 0x6bb0,0x6b82,0x6b55,0x6b28,0x6afb,0x6acf,0x6aa2,0x6a76 + .value 0x6a49,0x6a1d,0x69f1,0x69c6,0x699a,0x696e,0x6943,0x6918 + .value 0x68ed,0x68c2,0x6897,0x686c,0x6842,0x6817,0x67ed,0x67c3 + .value 0x6799,0x676f,0x6745,0x671b,0x66f2,0x66c8,0x669f,0x6676 + .value 0x664d,0x6624,0x65fc,0x65d3,0x65aa,0x6582,0x655a,0x6532 + .value 0x650a,0x64e2,0x64ba,0x6493,0x646b,0x6444,0x641c,0x63f5 + .value 0x63ce,0x63a7,0x6381,0x635a,0x6333,0x630d,0x62e7,0x62c1 + .value 0x629a,0x6275,0x624f,0x6229,0x6203,0x61de,0x61b8,0x6193 + .value 0x616e,0x6149,0x6124,0x60ff,0x60da,0x60b6,0x6091,0x606d + .value 0x6049,0x6024,0x6000,0x5fdc,0x5fb8,0x5f95,0x5f71,0x5f4d + .value 0x5f2a,0x5f07,0x5ee3,0x5ec0,0x5e9d,0x5e7a,0x5e57,0x5e35 + .value 0x5e12,0x5def,0x5dcd,0x5dab,0x5d88,0x5d66,0x5d44,0x5d22 + .value 0x5d00,0x5cde,0x5cbd,0x5c9b,0x5c7a,0x5c58,0x5c37,0x5c16 + .value 0x5bf5,0x5bd4,0x5bb3,0x5b92,0x5b71,0x5b51,0x5b30,0x5b10 + .value 0x5aef,0x5acf,0x5aaf,0x5a8f,0x5a6f,0x5a4f,0x5a2f,0x5a0f + .value 0x59ef,0x59d0,0x59b0,0x5991,0x5972,0x5952,0x5933,0x5914 + .value 0x58f5,0x58d6,0x58b7,0x5899,0x587a,0x585b,0x583d,0x581f + .value 0x5800,0x57e2,0x57c4,0x57a6,0x5788,0x576a,0x574c,0x572e + .value 0x5711,0x56f3,0x56d5,0x56b8,0x569b,0x567d,0x5660,0x5643 + .value 0x5626,0x5609,0x55ec,0x55cf,0x55b2,0x5596,0x5579,0x555d + .value 0x5540,0x5524,0x5507,0x54eb,0x54cf,0x54b3,0x5497,0x547b + .value 0x545f,0x5443,0x5428,0x540c,0x53f0,0x53d5,0x53b9,0x539e + .value 0x5383,0x5368,0x534c,0x5331,0x5316,0x52fb,0x52e0,0x52c6 + .value 0x52ab,0x5290,0x5276,0x525b,0x5240,0x5226,0x520c,0x51f1 + .value 0x51d7,0x51bd,0x51a3,0x5189,0x516f,0x5155,0x513b,0x5121 + .value 0x5108,0x50ee,0x50d5,0x50bb,0x50a2,0x5088,0x506f,0x5056 + .value 0x503c,0x5023,0x500a,0x4ff1,0x4fd8,0x4fbf,0x4fa6,0x4f8e + .value 0x4f75,0x4f5c,0x4f44,0x4f2b,0x4f13,0x4efa,0x4ee2,0x4eca + .value 0x4eb1,0x4e99,0x4e81,0x4e69,0x4e51,0x4e39,0x4e21,0x4e09 + .value 0x4df1,0x4dda,0x4dc2,0x4daa,0x4d93,0x4d7b,0x4d64,0x4d4d + .value 0x4d35,0x4d1e,0x4d07,0x4cf0,0x4cd8,0x4cc1,0x4caa,0x4c93 + .value 0x4c7d,0x4c66,0x4c4f,0x4c38,0x4c21,0x4c0b,0x4bf4,0x4bde + .value 0x4bc7,0x4bb1,0x4b9a,0x4b84,0x4b6e,0x4b58,0x4b41,0x4b2b + .value 0x4b15,0x4aff,0x4ae9,0x4ad3,0x4abd,0x4aa8,0x4a92,0x4a7c + .value 0x4a66,0x4a51,0x4a3b,0x4a26,0x4a10,0x49fb,0x49e5,0x49d0 + .value 0x49bb,0x49a6,0x4990,0x497b,0x4966,0x4951,0x493c,0x4927 + .value 0x4912,0x48fe,0x48e9,0x48d4,0x48bf,0x48ab,0x4896,0x4881 + .value 0x486d,0x4858,0x4844,0x482f,0x481b,0x4807,0x47f3,0x47de + .value 0x47ca,0x47b6,0x47a2,0x478e,0x477a,0x4766,0x4752,0x473e + .value 0x472a,0x4717,0x4703,0x46ef,0x46db,0x46c8,0x46b4,0x46a1 + .value 0x468d,0x467a,0x4666,0x4653,0x4640,0x462c,0x4619,0x4606 + .value 0x45f3,0x45e0,0x45cd,0x45ba,0x45a7,0x4594,0x4581,0x456e + .value 0x455b,0x4548,0x4536,0x4523,0x4510,0x44fe,0x44eb,0x44d8 + .value 0x44c6,0x44b3,0x44a1,0x448f,0x447c,0x446a,0x4458,0x4445 + .value 0x4433,0x4421,0x440f,0x43fd,0x43eb,0x43d9,0x43c7,0x43b5 + .value 0x43a3,0x4391,0x437f,0x436d,0x435c,0x434a,0x4338,0x4327 + .value 0x4315,0x4303,0x42f2,0x42e0,0x42cf,0x42bd,0x42ac,0x429b + .value 0x4289,0x4278,0x4267,0x4256,0x4244,0x4233,0x4222,0x4211 + .value 0x4200,0x41ef,0x41de,0x41cd,0x41bc,0x41ab,0x419a,0x418a + .value 0x4179,0x4168,0x4157,0x4147,0x4136,0x4125,0x4115,0x4104 + .value 0x40f4,0x40e3,0x40d3,0x40c2,0x40b2,0x40a2,0x4091,0x4081 + .value 0x4071,0x4061,0x4050,0x4040,0x4030,0x4020,0x4010,0x4000 +END_OBJECT(approx_tab) diff -Nru gmp-4.3.2+dfsg/mpn/x86/k6/aorsmul_1.asm gmp-5.0.2+dfsg/mpn/x86/k6/aorsmul_1.asm --- gmp-4.3.2+dfsg/mpn/x86/k6/aorsmul_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k6/aorsmul_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -36,7 +36,7 @@ C K8: -dnl K6: large multpliers small multpliers +dnl K6: large multipliers small multipliers dnl UNROLL_COUNT cycles/limb cycles/limb dnl 4 9.5 7.78 dnl 8 9.0 7.78 @@ -247,7 +247,7 @@ C C The add/adc for the initial carry in %esi is necessary only for the C mpn_addmul/submul_1c entry points. Duplicating the startup code to -C eliminiate this for the plain mpn_add/submul_1 doesn't seem like a good +C eliminate this for the plain mpn_add/submul_1 doesn't seem like a good C idea. dnl overlapping with parameters already fetched diff -Nru gmp-4.3.2+dfsg/mpn/x86/k6/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86/k6/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86/k6/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k6/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ /* AMD K6 gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2009 +Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,51 +18,138 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 /* 450MHz K6-2 */ -/* Generated by tuneup.c, 2009-01-05, gcc 3.4 */ - -#define MUL_KARATSUBA_THRESHOLD 19 -#define MUL_TOOM3_THRESHOLD 73 -#define MUL_TOOM44_THRESHOLD 104 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_KARATSUBA_THRESHOLD 32 -#define SQR_TOOM3_THRESHOLD 105 -#define SQR_TOOM4_THRESHOLD 143 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 64 -#define MULLOW_MUL_N_THRESHOLD 232 - -#define DIV_SB_PREINV_THRESHOLD 4 -#define DIV_DC_THRESHOLD 67 -#define POWM_THRESHOLD 110 - -#define MATRIX22_STRASSEN_THRESHOLD 21 -#define HGCD_THRESHOLD 195 -#define GCD_DC_THRESHOLD 602 -#define GCDEXT_DC_THRESHOLD 662 -#define JACOBI_BASE_METHOD 2 - -#define USE_PREINV_DIVREM_1 0 -#define USE_PREINV_MOD_1 1 /* native */ -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 31 -#define GET_STR_PRECOMPUTE_THRESHOLD 52 -#define SET_STR_DC_THRESHOLD 1127 -#define SET_STR_PRECOMPUTE_THRESHOLD 1795 - -#define MUL_FFT_TABLE { 336, 672, 1152, 3584, 10240, 24576, 163840, 393216, 0 } -#define MUL_FFT_MODF_THRESHOLD 352 -#define MUL_FFT_THRESHOLD 7168 - -#define SQR_FFT_TABLE { 272, 672, 1408, 4608, 10240, 24576, 163840, 393216, 0 } -#define SQR_FFT_MODF_THRESHOLD 336 -#define SQR_FFT_THRESHOLD 3840 +#define MOD_1_NORM_THRESHOLD 12 +#define MOD_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 28 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 18 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD MP_SIZE_T_MAX +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 82 +#define USE_PREINV_DIVREM_1 0 +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD MP_SIZE_T_MAX /* never */ + +#define MUL_TOOM22_THRESHOLD 20 +#define MUL_TOOM33_THRESHOLD 69 +#define MUL_TOOM44_THRESHOLD 106 +#define MUL_TOOM6H_THRESHOLD 157 +#define MUL_TOOM8H_THRESHOLD 199 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 73 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 69 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 65 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 64 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 32 +#define SQR_TOOM3_THRESHOLD 97 +#define SQR_TOOM4_THRESHOLD 143 +#define SQR_TOOM6_THRESHOLD 222 +#define SQR_TOOM8_THRESHOLD 272 + +#define MULMOD_BNM1_THRESHOLD 13 +#define SQRMOD_BNM1_THRESHOLD 17 + +#define MUL_FFT_MODF_THRESHOLD 476 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 476, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 11, 5}, { 23, 6}, { 17, 7}, { 9, 6}, \ + { 19, 7}, { 11, 6}, { 23, 7}, { 13, 6}, \ + { 27, 7}, { 15, 6}, { 31, 7}, { 17, 6}, \ + { 35, 7}, { 21, 8}, { 11, 7}, { 27, 8}, \ + { 15, 7}, { 35, 8}, { 19, 7}, { 39, 8}, \ + { 23, 7}, { 47, 8}, { 27, 9}, { 15, 8}, \ + { 31, 7}, { 63, 8}, { 39, 9}, { 23, 8}, \ + { 51,10}, { 15, 9}, { 31, 8}, { 67, 9}, \ + { 47,10}, { 31, 9}, { 79,10}, { 47, 9}, \ + { 95,11}, { 31,10}, { 63, 9}, { 135,10}, \ + { 79, 9}, { 167,10}, { 95, 9}, { 191,10}, \ + { 111,11}, { 63,10}, { 127, 9}, { 255,10}, \ + { 143, 9}, { 287,10}, { 159,11}, { 95,10}, \ + { 191, 9}, { 383,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 511,10}, { 271, 9}, { 543,10}, \ + { 287,11}, { 159,10}, { 351,11}, { 191,10}, \ + { 415, 9}, { 831,11}, { 223,12}, { 127,11}, \ + { 255,10}, { 543,11}, { 287,10}, { 575,11}, \ + { 351,10}, { 703,12}, { 191,11}, { 415,10}, \ + { 831,13}, { 127,12}, { 255,11}, { 543,10}, \ + { 1087,11}, { 575,12}, { 319,11}, { 703,12}, \ + { 383,11}, { 831,12}, { 447,11}, { 895,13}, \ + { 255,12}, { 511,11}, { 1087,12}, { 575,11}, \ + { 1151,12}, { 703,13}, { 383,12}, { 959,14}, \ + { 255,13}, { 511,12}, { 1215,13}, { 8192,14}, \ + { 16384,15}, { 32768,16} } +#define MUL_FFT_TABLE3_SIZE 106 +#define MUL_FFT_THRESHOLD 7424 + +#define SQR_FFT_MODF_THRESHOLD 432 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 432, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 11, 5}, { 23, 6}, { 21, 7}, { 11, 6}, \ + { 24, 7}, { 13, 6}, { 27, 7}, { 15, 6}, \ + { 31, 7}, { 21, 8}, { 11, 7}, { 29, 8}, \ + { 15, 7}, { 35, 8}, { 19, 7}, { 39, 8}, \ + { 23, 7}, { 49, 8}, { 27, 9}, { 15, 8}, \ + { 39, 9}, { 23, 7}, { 93, 8}, { 47, 7}, \ + { 95, 8}, { 51,10}, { 15, 9}, { 31, 8}, \ + { 67, 9}, { 39, 8}, { 79, 9}, { 47, 8}, \ + { 95, 9}, { 55,10}, { 31, 9}, { 71, 8}, \ + { 143, 9}, { 79,10}, { 47, 9}, { 95,11}, \ + { 31,10}, { 63, 9}, { 135,10}, { 79, 9}, \ + { 167,10}, { 95, 9}, { 191,11}, { 63,10}, \ + { 127, 9}, { 255,10}, { 143, 9}, { 287, 8}, \ + { 575,10}, { 159, 9}, { 319,11}, { 95,10}, \ + { 191,12}, { 63,11}, { 127,10}, { 255, 9}, \ + { 511,10}, { 271, 9}, { 543,10}, { 287,11}, \ + { 159,10}, { 319, 9}, { 639,10}, { 351, 9}, \ + { 703,11}, { 191,10}, { 415,11}, { 223,12}, \ + { 127,11}, { 255,10}, { 543,11}, { 287,10}, \ + { 607,11}, { 319,10}, { 639,11}, { 351,10}, \ + { 703,12}, { 191,11}, { 415,10}, { 831,13}, \ + { 127,12}, { 255,11}, { 543,10}, { 1087,11}, \ + { 607,12}, { 319,11}, { 703,12}, { 383,11}, \ + { 831,12}, { 447,13}, { 255,12}, { 511,11}, \ + { 1087,12}, { 575,11}, { 1215,12}, { 703,13}, \ + { 383,12}, { 895,14}, { 255,13}, { 511,12}, \ + { 1215,13}, { 8192,14}, { 16384,15}, { 32768,16} } +#define SQR_FFT_TABLE3_SIZE 112 +#define SQR_FFT_THRESHOLD 7040 + +#define MULLO_BASECASE_THRESHOLD 3 +#define MULLO_DC_THRESHOLD 60 +#define MULLO_MUL_N_THRESHOLD 13463 + +#define DC_DIV_QR_THRESHOLD 78 +#define DC_DIVAPPR_Q_THRESHOLD 252 +#define DC_BDIV_QR_THRESHOLD 84 +#define DC_BDIV_Q_THRESHOLD 171 + +#define INV_MULMOD_BNM1_THRESHOLD 55 +#define INV_NEWTON_THRESHOLD 234 +#define INV_APPR_THRESHOLD 236 + +#define BINV_NEWTON_THRESHOLD 268 +#define REDC_1_TO_REDC_N_THRESHOLD 67 + +#define MU_DIV_QR_THRESHOLD 1308 +#define MU_DIVAPPR_Q_THRESHOLD 1142 +#define MUPI_DIV_QR_THRESHOLD 134 +#define MU_BDIV_QR_THRESHOLD 1164 +#define MU_BDIV_Q_THRESHOLD 1164 + +#define MATRIX22_STRASSEN_THRESHOLD 15 +#define HGCD_THRESHOLD 182 +#define GCD_DC_THRESHOLD 591 +#define GCDEXT_DC_THRESHOLD 472 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 24 +#define GET_STR_PRECOMPUTE_THRESHOLD 40 +#define SET_STR_DC_THRESHOLD 834 +#define SET_STR_PRECOMPUTE_THRESHOLD 2042 diff -Nru gmp-4.3.2+dfsg/mpn/x86/k6/mmx/com.asm gmp-5.0.2+dfsg/mpn/x86/k6/mmx/com.asm --- gmp-4.3.2+dfsg/mpn/x86/k6/mmx/com.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k6/mmx/com.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,92 @@ +dnl AMD K6-2 mpn_com -- mpn bitwise one's complement. + +dnl Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundation; either version 3 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + +NAILS_SUPPORT(0-31) + + +C alignment dst/src, A=0mod8 N=4mod8 +C A/A A/N N/A N/N +C K6-2 1.0 1.18 1.18 1.18 cycles/limb +C K6 1.5 1.85 1.75 1.85 + + +C void mpn_com (mp_ptr dst, mp_srcptr src, mp_size_t size); +C +C Take the bitwise ones-complement of src,size and write it to dst,size. + +defframe(PARAM_SIZE,12) +defframe(PARAM_SRC, 8) +defframe(PARAM_DST, 4) + + TEXT + ALIGN(16) +PROLOGUE(mpn_com) +deflit(`FRAME',0) + + movl PARAM_SIZE, %ecx + movl PARAM_SRC, %eax + movl PARAM_DST, %edx + shrl %ecx + jnz L(two_or_more) + + movl (%eax), %eax + notl_or_xorl_GMP_NUMB_MASK( %eax) + movl %eax, (%edx) + ret + + +L(two_or_more): + pushl %ebx FRAME_pushl() + pcmpeqd %mm7, %mm7 C all ones + + movl %ecx, %ebx +ifelse(GMP_NAIL_BITS,0,, +` psrld $GMP_NAIL_BITS, %mm7') C clear nails + + + + ALIGN(8) +L(top): + C eax src + C ebx floor(size/2) + C ecx counter + C edx dst + C + C mm0 scratch + C mm7 mask + + movq -8(%eax,%ecx,8), %mm0 + pxor %mm7, %mm0 + movq %mm0, -8(%edx,%ecx,8) + loop L(top) + + + jnc L(no_extra) + movl (%eax,%ebx,8), %eax + notl_or_xorl_GMP_NUMB_MASK( %eax) + movl %eax, (%edx,%ebx,8) +L(no_extra): + + popl %ebx + emms_or_femms + ret + +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86/k6/mmx/com_n.asm gmp-5.0.2+dfsg/mpn/x86/k6/mmx/com_n.asm --- gmp-4.3.2+dfsg/mpn/x86/k6/mmx/com_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k6/mmx/com_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,92 +0,0 @@ -dnl AMD K6-2 mpn_com_n -- mpn bitwise one's complement. - -dnl Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. -dnl -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - -NAILS_SUPPORT(0-31) - - -C alignment dst/src, A=0mod8 N=4mod8 -C A/A A/N N/A N/N -C K6-2 1.0 1.18 1.18 1.18 cycles/limb -C K6 1.5 1.85 1.75 1.85 - - -C void mpn_com_n (mp_ptr dst, mp_srcptr src, mp_size_t size); -C -C Take the bitwise ones-complement of src,size and write it to dst,size. - -defframe(PARAM_SIZE,12) -defframe(PARAM_SRC, 8) -defframe(PARAM_DST, 4) - - TEXT - ALIGN(16) -PROLOGUE(mpn_com_n) -deflit(`FRAME',0) - - movl PARAM_SIZE, %ecx - movl PARAM_SRC, %eax - movl PARAM_DST, %edx - shrl %ecx - jnz L(two_or_more) - - movl (%eax), %eax - notl_or_xorl_GMP_NUMB_MASK( %eax) - movl %eax, (%edx) - ret - - -L(two_or_more): - pushl %ebx FRAME_pushl() - pcmpeqd %mm7, %mm7 C all ones - - movl %ecx, %ebx -ifelse(GMP_NAIL_BITS,0,, -` psrld $GMP_NAIL_BITS, %mm7') C clear nails - - - - ALIGN(8) -L(top): - C eax src - C ebx floor(size/2) - C ecx counter - C edx dst - C - C mm0 scratch - C mm7 mask - - movq -8(%eax,%ecx,8), %mm0 - pxor %mm7, %mm0 - movq %mm0, -8(%edx,%ecx,8) - loop L(top) - - - jnc L(no_extra) - movl (%eax,%ebx,8), %eax - notl_or_xorl_GMP_NUMB_MASK( %eax) - movl %eax, (%edx,%ebx,8) -L(no_extra): - - popl %ebx - emms_or_femms - ret - -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86/k6/mmx/dive_1.asm gmp-5.0.2+dfsg/mpn/x86/k6/mmx/dive_1.asm --- gmp-4.3.2+dfsg/mpn/x86/k6/mmx/dive_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k6/mmx/dive_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -117,7 +117,7 @@ subl %ebp, %eax C inv = 2*inv - inv*inv*d subl $1, %edx C shift amount, and clear carry - ASSERT(e,` C expect d*inv == 1 mod 2^BITS_PER_MP_LIMB + ASSERT(e,` C expect d*inv == 1 mod 2^GMP_LIMB_BITS pushl %eax FRAME_pushl() imull PARAM_DIVISOR, %eax cmpl $1, %eax diff -Nru gmp-4.3.2+dfsg/mpn/x86/k6/mode1o.asm gmp-5.0.2+dfsg/mpn/x86/k6/mode1o.asm --- gmp-4.3.2+dfsg/mpn/x86/k6/mode1o.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k6/mode1o.asm 2011-05-08 09:49:29.000000000 +0000 @@ -103,7 +103,7 @@ subl %ecx, %edi C inv = 2*inv - inv*inv*d - ASSERT(e,` C d*inv == 1 mod 2^BITS_PER_MP_LIMB + ASSERT(e,` C d*inv == 1 mod 2^GMP_LIMB_BITS pushl %eax movl %esi, %eax imull %edi, %eax diff -Nru gmp-4.3.2+dfsg/mpn/x86/k6/sqr_basecase.asm gmp-5.0.2+dfsg/mpn/x86/k6/sqr_basecase.asm --- gmp-4.3.2+dfsg/mpn/x86/k6/sqr_basecase.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k6/sqr_basecase.asm 2011-05-08 09:49:29.000000000 +0000 @@ -25,35 +25,35 @@ C which is roughly the Karatsuba recursing range). -dnl SQR_KARATSUBA_THRESHOLD_MAX is the maximum SQR_KARATSUBA_THRESHOLD this +dnl SQR_TOOM2_THRESHOLD_MAX is the maximum SQR_TOOM2_THRESHOLD this dnl code supports. This value is used only by the tune program to know dnl what it can go up to. (An attempt to compile with a bigger value will dnl trigger some m4_assert()s in the code, making the build fail.) dnl dnl The value is determined by requiring the displacements in the unrolled dnl addmul to fit in single bytes. This means a maximum UNROLL_COUNT of -dnl 63, giving a maximum SQR_KARATSUBA_THRESHOLD of 66. +dnl 63, giving a maximum SQR_TOOM2_THRESHOLD of 66. -deflit(SQR_KARATSUBA_THRESHOLD_MAX, 66) +deflit(SQR_TOOM2_THRESHOLD_MAX, 66) dnl Allow a value from the tune program to override config.m4. -ifdef(`SQR_KARATSUBA_THRESHOLD_OVERRIDE', -`define(`SQR_KARATSUBA_THRESHOLD',SQR_KARATSUBA_THRESHOLD_OVERRIDE)') +ifdef(`SQR_TOOM2_THRESHOLD_OVERRIDE', +`define(`SQR_TOOM2_THRESHOLD',SQR_TOOM2_THRESHOLD_OVERRIDE)') dnl UNROLL_COUNT is the number of code chunks in the unrolled addmul. The -dnl number required is determined by SQR_KARATSUBA_THRESHOLD, since -dnl mpn_sqr_basecase only needs to handle sizes < SQR_KARATSUBA_THRESHOLD. +dnl number required is determined by SQR_TOOM2_THRESHOLD, since +dnl mpn_sqr_basecase only needs to handle sizes < SQR_TOOM2_THRESHOLD. dnl dnl The first addmul is the biggest, and this takes the second least dnl significant limb and multiplies it by the third least significant and -dnl up. Hence for a maximum operand size of SQR_KARATSUBA_THRESHOLD-1 -dnl limbs, UNROLL_COUNT needs to be SQR_KARATSUBA_THRESHOLD-3. +dnl up. Hence for a maximum operand size of SQR_TOOM2_THRESHOLD-1 +dnl limbs, UNROLL_COUNT needs to be SQR_TOOM2_THRESHOLD-3. -m4_config_gmp_mparam(`SQR_KARATSUBA_THRESHOLD') -deflit(UNROLL_COUNT, eval(SQR_KARATSUBA_THRESHOLD-3)) +m4_config_gmp_mparam(`SQR_TOOM2_THRESHOLD') +deflit(UNROLL_COUNT, eval(SQR_TOOM2_THRESHOLD-3)) C void mpn_sqr_basecase (mp_ptr dst, mp_srcptr src, mp_size_t size); diff -Nru gmp-4.3.2+dfsg/mpn/x86/k7/dive_1.asm gmp-5.0.2+dfsg/mpn/x86/k7/dive_1.asm --- gmp-4.3.2+dfsg/mpn/x86/k7/dive_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k7/dive_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -105,7 +105,7 @@ subl %edx, %eax C inv = 2*inv - inv*inv*d - ASSERT(e,` C expect d*inv == 1 mod 2^BITS_PER_MP_LIMB + ASSERT(e,` C expect d*inv == 1 mod 2^GMP_LIMB_BITS pushl %eax FRAME_pushl() imull PARAM_DIVISOR, %eax cmpl $1, %eax diff -Nru gmp-4.3.2+dfsg/mpn/x86/k7/gcd_1.asm gmp-5.0.2+dfsg/mpn/x86/k7/gcd_1.asm --- gmp-4.3.2+dfsg/mpn/x86/k7/gcd_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k7/gcd_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl AMD K7 mpn_gcd_1 -- mpn by 1 gcd. -dnl Copyright 2000, 2001, 2002 Free Software Foundation, Inc. +dnl Copyright 2000, 2001, 2002, 2009 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl @@ -44,8 +44,8 @@ C it's own cache line or plonked in the middle of the code. Presumably C since TEXT is read-only there's no worries about coherency. -deflit(MASK, 63) deflit(MAXSHIFT, 6) +deflit(MASK, eval((m4_lshift(1,MAXSHIFT))-1)) TEXT ALIGN(64) @@ -82,37 +82,37 @@ ASSERT(ne, `cmpl $0, PARAM_LIMB') C y!=0 ASSERT(ae, `cmpl $1, PARAM_SIZE') C size>=1 - movl PARAM_SRC, %eax - movl PARAM_LIMB, %edx - subl $STACK_SPACE, %esp deflit(`FRAME',STACK_SPACE) + mov PARAM_SRC, %eax + mov PARAM_LIMB, %edx + sub $STACK_SPACE, %esp deflit(`FRAME',STACK_SPACE) - movl %esi, SAVE_ESI - movl %ebx, SAVE_EBX + mov %esi, SAVE_ESI + mov %ebx, SAVE_EBX - movl (%eax), %esi C src low limb + mov (%eax), %esi C src low limb ifdef(`PIC',` - movl %edi, SAVE_EDI + mov %edi, SAVE_EDI call L(movl_eip_to_edi) L(here): - addl $L(table)-L(here), %edi + add $L(table)-L(here), %edi ') - movl %esi, %ebx - orl %edx, %esi C x|y - movl $-1, %ecx + mov %esi, %ebx + or %edx, %esi C x|y + mov $-1, %ecx L(twos): - incl %ecx - shrl %esi + inc %ecx + shr %esi jnc L(twos) C 3/4 chance of x or y odd already - shrl %cl, %ebx - shrl %cl, %edx - movl %ecx, %esi C common twos + shr %cl, %ebx + shr %cl, %edx + mov %ecx, %esi C common twos - movl PARAM_SIZE, %ecx - cmpl $1, %ecx + mov PARAM_SIZE, %ecx + cmp $1, %ecx ja L(divide) @@ -124,8 +124,8 @@ C edi [PIC] L(table) C ebp - movl %edx, %eax - cmpl %ebx, %edx + mov %edx, %eax + cmp %ebx, %edx cmovb( %ebx, %eax) C swap to make x bigger than y cmovb( %edx, %ebx) @@ -141,9 +141,9 @@ C ebp ASSERT(nz,`orl %ebx,%ebx') - shrl %ebx + shr %ebx jnc L(strip_y) - rcll %ebx + rcl %ebx C eax x @@ -154,22 +154,22 @@ C edi [PIC] L(table) C ebp - movl %eax, %ecx - movl %ebx, %edx - shrl $DIV_THRESHOLD, %eax + mov %eax, %ecx + mov %ebx, %edx + shr $DIV_THRESHOLD, %eax - cmpl %eax, %ebx - movl %ecx, %eax + cmp %eax, %ebx + mov %ecx, %eax ja L(strip_x_entry) C do x%y if x much bigger than y - xorl %edx, %edx + xor %edx, %edx - divl %ebx + div %ebx - orl %edx, %edx - movl %edx, %eax C remainder -> x - movl %ebx, %edx C y + or %edx, %edx + mov %edx, %ecx C remainder -> x + mov %ebx, %edx C y jz L(done_ebx) jmp L(strip_x) @@ -194,43 +194,43 @@ cmovc( %eax, %edx) L(strip_x): - movl %ecx, %eax + mov %ecx, %eax L(strip_x_entry): - andl $MASK, %ecx + and $MASK, %ecx ASSERT(nz, `orl %eax, %eax') ifdef(`PIC',` - movb (%ecx,%edi), %cl + mov (%ecx,%edi), %cl ',` - movb L(table) (%ecx), %cl + mov L(table) (%ecx), %cl ') - shrl %cl, %eax - cmpb $MAXSHIFT, %cl + shr %cl, %eax + cmp $MAXSHIFT, %cl - movl %eax, %ecx - movl %edx, %ebx + mov %eax, %ecx + mov %edx, %ebx je L(strip_x) - ASSERT(nz, `testl $1, %eax') C both odd - ASSERT(nz, `testl $1, %edx') + ASSERT(nz, `test $1, %eax') C both odd + ASSERT(nz, `test $1, %edx') - subl %eax, %ebx - subl %edx, %ecx + sub %eax, %ebx + sub %edx, %ecx jnz L(top) L(done): - movl %esi, %ecx - movl SAVE_ESI, %esi + mov %esi, %ecx + mov SAVE_ESI, %esi ifdef(`PIC',` - movl SAVE_EDI, %edi + mov SAVE_EDI, %edi ') - shll %cl, %eax - movl SAVE_EBX, %ebx - addl $FRAME, %esp + shl %cl, %eax + mov SAVE_EBX, %ebx + add $FRAME, %esp ret @@ -254,23 +254,23 @@ C ebp L(divide_strip_y): - ASSERT(nz,`orl %edx,%edx') - shrl %edx + ASSERT(nz,`or %edx,%edx') + shr %edx jnc L(divide_strip_y) - leal 1(%edx,%edx), %ebx C y now odd + lea 1(%edx,%edx), %ebx C y now odd - movl %ebp, SAVE_EBP - movl %eax, %ebp - movl -4(%eax,%ecx,4), %eax C src high limb + mov %ebp, SAVE_EBP + mov %eax, %ebp + mov -4(%eax,%ecx,4), %eax C src high limb cmp $MODEXACT_THRESHOLD, %ecx jae L(modexact) - cmpl %ebx, %eax C high cmp divisor - movl $0, %edx + cmp %ebx, %eax C high cmp divisor + mov $0, %edx cmovc( %eax, %edx) C skip a div if high=4 - - -L(done_edi): - movl SAVE_ESI, %esi - movl SAVE_EBP, %ebp - movl %edi, %eax - - movl SAVE_EDI, %edi - addl $STACK_SPACE, %esp - - ret - -EPILOGUE() - - - ALIGN(32) -PROLOGUE(mpn_mod_1c) -deflit(`FRAME',0) - movl PARAM_CARRY, %edx - movl PARAM_SIZE, %ecx - subl $STACK_SPACE, %esp -deflit(`FRAME',STACK_SPACE) - - movl %ebp, SAVE_EBP - movl PARAM_DIVISOR, %ebp - - movl %esi, SAVE_ESI - movl PARAM_SRC, %esi - jmp L(start_1c) - -EPILOGUE() - - - ALIGN(32) -PROLOGUE(mpn_mod_1) -deflit(`FRAME',0) - - movl PARAM_SIZE, %ecx - movl $0, %edx C initial carry (if can't skip a div) - subl $STACK_SPACE, %esp -deflit(`FRAME',STACK_SPACE) - - movl %esi, SAVE_ESI - movl PARAM_SRC, %esi - - movl %ebp, SAVE_EBP - movl PARAM_DIVISOR, %ebp - - orl %ecx, %ecx - jz L(divide_done) - - movl -4(%esi,%ecx,4), %eax C src high limb - - cmpl %ebp, %eax C carry flag if high n2 - leal (%ebp,%esi), %edx - - movd %mm0, %esi - - cmovc( %edx, %edi) C n - q1*d if underflow from using q1+1 - cmpl %eax, %ecx - jae L(inverse_top) - - -L(inverse_loop_done): - - -C ----------------------------------------------------------------------------- - -L(inverse_two_left): - C eax scratch - C ebx scratch (nadj, q1) - C ecx &src[-1] - C edx scratch - C esi n10 - C edi n2 - C ebp divisor - C - C mm0 scratch (src dword) - C mm7 rshift - - cmpl $0x80000000, %esi C n1 as 0=c, 1=nc - movl %edi, %eax C n2 - - leal (%ebp,%esi), %ebx - cmovc( %esi, %ebx) C nadj = n10 + (-n1 & d), ignoring overflow - sbbl $-1, %eax C n2+n1 - - mull VAR_INVERSE C m*(n2+n1) - - movd 4(%ecx), %mm0 C src low limb - - C - - C - - addl %ebx, %eax C m*(n2+n1) + nadj, low giving carry flag - leal 1(%edi), %ebx C n2+1 - movl %ebp, %eax C d - - adcl %edx, %ebx C 1 + high(n2<<32 + m*(n2+n1) + nadj) = q1+1 - - sbbl $0, %ebx - - mull %ebx C (q1+1)*d - - psllq $32, %mm0 - - psrlq %mm7, %mm0 - - C - - subl %eax, %esi - - C - - sbbl %edx, %edi C n - (q1+1)*d - movl %esi, %edi C remainder -> n2 - leal (%ebp,%esi), %edx - - movd %mm0, %esi - - cmovc( %edx, %edi) C n - q1*d if underflow from using q1+1 - - -L(inverse_one_left): - C eax scratch - C ebx scratch (nadj, q1) - C ecx - C edx scratch - C esi n10 - C edi n2 - C ebp divisor - C - C mm0 src limb, shifted - C mm7 rshift - - cmpl $0x80000000, %esi C n1 as 0=c, 1=nc - movl %edi, %eax C n2 - - leal (%ebp,%esi), %ebx - cmovc( %esi, %ebx) C nadj = n10 + (-n1 & d), ignoring overflow - sbbl $-1, %eax C n2+n1 - - mull VAR_INVERSE C m*(n2+n1) - - movl VAR_NORM, %ecx C for final denorm - - C - - C - - addl %ebx, %eax C m*(n2+n1) + nadj, low giving carry flag - leal 1(%edi), %ebx C n2+1 - movl %ebp, %eax C d - - C - - adcl %edx, %ebx C 1 + high(n2<<32 + m*(n2+n1) + nadj) = q1+1 - - sbbl $0, %ebx - - mull %ebx C (q1+1)*d - - movl SAVE_EBX, %ebx - - C - - C - - subl %eax, %esi - - movl %esi, %eax C remainder - movl SAVE_ESI, %esi - - sbbl %edx, %edi C n - (q1+1)*d - leal (%ebp,%eax), %edx - movl SAVE_EBP, %ebp - - cmovc( %edx, %eax) C n - q1*d if underflow from using q1+1 - movl SAVE_EDI, %edi - - shrl %cl, %eax C denorm remainder - addl $STACK_SPACE, %esp - emms - - ret - - -C ----------------------------------------------------------------------------- -C -C Special case for q1=0xFFFFFFFF, giving q=0xFFFFFFFF meaning the low dword -C of q*d is simply -d and the remainder n-q*d = n10+d - -L(q1_ff): - C eax (divisor) - C ebx (q1+1 == 0) - C ecx src pointer - C edx - C esi n10 - C edi (n2) - C ebp divisor - - movl PARAM_SRC, %edx - leal (%ebp,%esi), %edi C n-q*d remainder -> next n2 - psrlq %mm7, %mm0 - - movd %mm0, %esi C next n10 - - cmpl %edx, %ecx - jae L(inverse_top) - jmp L(inverse_loop_done) - -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86/k7/mod_1_4.asm gmp-5.0.2+dfsg/mpn/x86/k7/mod_1_4.asm --- gmp-4.3.2+dfsg/mpn/x86/k7/mod_1_4.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k7/mod_1_4.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,281 @@ +dnl x86-32 mpn_mod_1s_4p, requiring cmov. + +dnl Contributed to the GNU project by Torbjorn Granlund. + +dnl Copyright 2009 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + +C cycles/limb +C P5: +C P6 model 0-8,10-12) +C P6 model 9 (Banias) +C P6 model 13 (Dothan) 6.0 +C P4 model 0 (Willamette) +C P4 model 1 (?) +C P4 model 2 (Northwood) 15.5 +C P4 model 3 (Prescott) +C P4 model 4 (Nocona) +C K6: +C K7: 4.75 +C K8: + + +C Ths inner loop was manually written, it ought to be loopmixed. +C Presumably, we could get to 4 c/l for K7. + +C The cps function was compiler generated. It can clearly be optimized. + + +ASM_START() + TEXT + + ALIGN(16) +PROLOGUE(mpn_mod_1s_4p) + push %ebp + push %edi + push %esi + push %ebx + sub $28, %esp + mov 60(%esp), %edi C cps + mov 8(%edi), %eax + mov 12(%edi), %edx + mov 16(%edi), %ecx + mov 20(%edi), %esi + mov 24(%edi), %edi + mov %eax, 4(%esp) + mov %edx, 8(%esp) + mov %ecx, 12(%esp) + mov %esi, 16(%esp) + mov %edi, 20(%esp) + mov 52(%esp), %eax C n + xor %edi, %edi + mov 48(%esp), %esi C up + lea -12(%esi,%eax,4), %esi + and $3, %eax + je L(b0) + cmp $2, %eax + jc L(b1) + je L(b2) + +L(b3): mov 4(%esi), %eax + mull 4(%esp) + mov (%esi), %ebp + add %eax, %ebp + adc %edx, %edi + mov 8(%esi), %eax + mull 8(%esp) + lea -12(%esi), %esi + jmp L(m0) + +L(b0): mov (%esi), %eax + mull 4(%esp) + mov -4(%esi), %ebp + add %eax, %ebp + adc %edx, %edi + mov 4(%esi), %eax + mull 8(%esp) + add %eax, %ebp + adc %edx, %edi + mov 8(%esi), %eax + mull 12(%esp) + lea -16(%esi), %esi + jmp L(m0) + +L(b1): mov 8(%esi), %ebp + lea -4(%esi), %esi + jmp L(m1) + +L(b2): mov 8(%esi), %eax + mull 4(%esp) + mov 4(%esi), %ebp + lea -8(%esi), %esi + jmp L(m0) + + ALIGN(16) +L(top): mov (%esi), %eax + mull 4(%esp) + mov -4(%esi), %ebx + xor %ecx, %ecx + add %eax, %ebx + adc %edx, %ecx + mov 4(%esi), %eax + mull 8(%esp) + add %eax, %ebx + adc %edx, %ecx + mov 8(%esi), %eax + mull 12(%esp) + add %eax, %ebx + adc %edx, %ecx + lea -16(%esi), %esi + mov 16(%esp), %eax + mul %ebp + add %eax, %ebx + adc %edx, %ecx + mov 20(%esp), %eax + mul %edi + mov %ebx, %ebp + mov %ecx, %edi +L(m0): add %eax, %ebp + adc %edx, %edi +L(m1): sub $4, 52(%esp) + ja L(top) + +L(end): mov 4(%esp), %eax + mul %edi + mov 60(%esp), %edi + add %eax, %ebp + adc $0, %edx + mov 4(%edi), %ecx + mov %edx, %esi + mov %ebp, %eax + sal %cl, %esi + mov %ecx, %ebx + neg %ecx + shr %cl, %eax + or %esi, %eax + lea 1(%eax), %esi + mull (%edi) + mov %ebx, %ecx + mov %eax, %ebx + mov %ebp, %eax + sal %cl, %eax + add %eax, %ebx + adc %esi, %edx + imul 56(%esp), %edx + mov 56(%esp), %esi + sub %edx, %eax + lea (%eax,%esi), %edx + cmp %eax, %ebx + cmovb( %edx, %eax) + mov %eax, %edx + sub %esi, %eax + cmovb( %edx, %eax) + add $28, %esp + pop %ebx + pop %esi + pop %edi + pop %ebp + shr %cl, %eax + ret +EPILOGUE() + + ALIGN(16) +PROLOGUE(mpn_mod_1s_4p_cps) + sub $56, %esp + mov %esi, 44(%esp) + mov 64(%esp), %esi + mov %edi, 48(%esp) + mov %ebx, 40(%esp) + mov $-1, %ebx + mov %ebp, 52(%esp) + bsr %esi, %eax + xor $31, %eax + mov %eax, %ecx + mov %eax, 24(%esp) + mov %ebx, %eax + sal %cl, %esi + mov %esi, %ecx + mov %esi, %edi + mov %esi, %ebp + neg %ecx + not %edi + mov %ecx, 20(%esp) + mov $32, %ecx + sub 24(%esp), %ecx + mov %edi, %edx + mov %edi, 16(%esp) + mov 20(%esp), %edi + div %esi + mov %eax, %ebx + shr %cl, %eax + movzbl 24(%esp), %ecx + mov %eax, 12(%esp) + mov $1, %eax + sal %cl, %eax + or %eax, 12(%esp) + imul 12(%esp), %edi + mov %edi, %eax + mov %edi, 20(%esp) + mul %ebx + mov %eax, %ecx + lea 1(%edx,%edi), %eax + neg %eax + imul %eax, %ebp + lea (%ebp,%esi), %eax + cmp %ebp, %ecx + cmovb( %eax, %ebp) + mov %ebp, %eax + mul %ebx + lea 1(%ebp,%edx), %edi + mov %eax, %ecx + neg %edi + mov %edi, 8(%esp) + imul %esi, %edi + mov %edi, %eax + add %esi, %eax + cmp %edi, %ecx + cmovae( %edi, %eax) + mov %eax, 32(%esp) + mov 32(%esp), %edi + mul %ebx + mov %eax, 36(%esp) + lea 1(%edi,%edx), %eax + negl %eax + imul %esi, %eax + mov %eax, %ecx + add %esi, %ecx + cmp %eax, 36(%esp) + cmovae( %eax, %ecx) + mov %ecx, (%esp) + mov %ecx, %eax + mul %ebx + mov %eax, %edi + mov (%esp), %eax + lea 1(%eax,%edx), %ecx + mov 60(%esp), %edx + neg %ecx + imul %esi, %ecx + mov %ebx, (%edx) + add %ecx, %esi + cmp %ecx, %edi + cmovae( %ecx, %esi) + mov 24(%esp), %ecx + shrl %cl, 20(%esp) + mov 20(%esp), %edi + mov %esi, 4(%esp) + mov %ecx, 4(%edx) + movzbl 24(%esp), %ecx + mov %edi, 8(%edx) + shr %cl, %ebp + shr %cl, %eax + mov %ebp, 12(%edx) + shrl %cl, 32(%esp) + mov 32(%esp), %edi + shrl %cl, 4(%esp) + mov %eax, 20(%edx) + mov %edi, 16(%edx) + mov 4(%esp), %edi + mov %edi, 24(%edx) + mov 40(%esp), %ebx + mov 44(%esp), %esi + mov 48(%esp), %edi + mov 52(%esp), %ebp + add $56, %esp + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86/k7/mode1o.asm gmp-5.0.2+dfsg/mpn/x86/k7/mode1o.asm --- gmp-4.3.2+dfsg/mpn/x86/k7/mode1o.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k7/mode1o.asm 2011-05-08 09:49:29.000000000 +0000 @@ -111,7 +111,7 @@ subl %eax, %edi C inv = 2*inv - inv*inv*d - ASSERT(e,` C d*inv == 1 mod 2^BITS_PER_MP_LIMB + ASSERT(e,` C d*inv == 1 mod 2^GMP_LIMB_BITS movl %esi, %eax imull %edi, %eax cmpl $1, %eax') diff -Nru gmp-4.3.2+dfsg/mpn/x86/k7/sqr_basecase.asm gmp-5.0.2+dfsg/mpn/x86/k7/sqr_basecase.asm --- gmp-4.3.2+dfsg/mpn/x86/k7/sqr_basecase.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/k7/sqr_basecase.asm 2011-05-08 09:49:29.000000000 +0000 @@ -28,18 +28,18 @@ dnl These are the same as mpn/x86/k6/sqr_basecase.asm, see that code for dnl some comments. -deflit(SQR_KARATSUBA_THRESHOLD_MAX, 66) +deflit(SQR_TOOM2_THRESHOLD_MAX, 66) -ifdef(`SQR_KARATSUBA_THRESHOLD_OVERRIDE', -`define(`SQR_KARATSUBA_THRESHOLD',SQR_KARATSUBA_THRESHOLD_OVERRIDE)') +ifdef(`SQR_TOOM2_THRESHOLD_OVERRIDE', +`define(`SQR_TOOM2_THRESHOLD',SQR_TOOM2_THRESHOLD_OVERRIDE)') -m4_config_gmp_mparam(`SQR_KARATSUBA_THRESHOLD') -deflit(UNROLL_COUNT, eval(SQR_KARATSUBA_THRESHOLD-3)) +m4_config_gmp_mparam(`SQR_TOOM2_THRESHOLD') +deflit(UNROLL_COUNT, eval(SQR_TOOM2_THRESHOLD-3)) C void mpn_sqr_basecase (mp_ptr dst, mp_srcptr src, mp_size_t size); C -C With a SQR_KARATSUBA_THRESHOLD around 50 this code is about 1500 bytes, +C With a SQR_TOOM2_THRESHOLD around 50 this code is about 1500 bytes, C which is quite a bit, but is considered good value since squares big C enough to use most of the code will be spending quite a few cycles in it. diff -Nru gmp-4.3.2+dfsg/mpn/x86/mod_1.asm gmp-5.0.2+dfsg/mpn/x86/mod_1.asm --- gmp-4.3.2+dfsg/mpn/x86/mod_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/mod_1.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,163 +0,0 @@ -dnl x86 mpn_mod_1 -- mpn by limb remainder. - -dnl Copyright 1999, 2000, 2001, 2002, 2003, 2007 Free Software Foundation, -dnl Inc. -dnl -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C cycles/limb -C 486 42 approx, maybe -C P5 44 -C P6 39 -C K6 20 -C K7 41 -C P4 58 - - -C mp_limb_t mpn_mod_1 (mp_srcptr src, mp_size_t size, mp_limb_t divisor); -C mp_limb_t mpn_mod_1c (mp_srcptr src, mp_size_t size, mp_limb_t divisor, -C mp_limb_t carry); -C -C Essentially this code is the same as the division based part of -C mpn/generic/mod_1.c, but has the advantage that we get the desired divl -C instruction even when gcc is not being used (where longlong.h only has the -C rather slow generic C udiv_qrnnd(). -C -C A test is done to see if the high limb is less than the divisor, and if so -C one less div is done. A div is between 20 and 40 cycles on the various -C x86s, so assuming high n2 - subl %ebp, %eax - - cmovnc( %eax, %edi) C n2-divisor if no underflow - - movl $-1, %eax - movl $-1, %edx - - subl %ebp, %edx C (b-d)-1 so edx:eax = b*(b-d)-1 - leal -8(%esi,%ebx,4), %ecx C &src[size-2] - - divl %ebp C floor (b*(b-d)-1) / d - -L(preinv_entry): - movl %eax, VAR_INVERSE - - - -C No special scheduling of loads is necessary in this loop, out of order -C execution hides the latencies already. -C -C The way q1+1 is generated in %ebx and d is moved to %eax for the multiply -C seems fastest. The obvious change to generate q1+1 in %eax and then just -C multiply by %ebp (as per mpn/x86/pentium/mod_1.asm in fact) runs 1 cycle -C slower, for no obvious reason. - - - ALIGN(16) -L(inverse_top): - C eax n10 (then scratch) - C ebx scratch (nadj, q1) - C ecx src pointer, decrementing - C edx scratch - C esi n10 - C edi n2 - C ebp divisor - - movl (%ecx), %eax C next src limb - movl %eax, %esi - - sarl $31, %eax C -n1 - movl %ebp, %ebx - - andl %eax, %ebx C -n1 & d - negl %eax C n1 - - addl %edi, %eax C n2+n1 - - mull VAR_INVERSE C m*(n2+n1) - - addl %esi, %ebx C nadj = n10 + (-n1 & d), ignoring overflow - subl $4, %ecx - - C - - addl %ebx, %eax C m*(n2+n1) + nadj, low giving carry flag - leal 1(%edi), %ebx C n2+1 - movl %ebp, %eax C d - - adcl %edx, %ebx C 1 + high(n2<<32 + m*(n2+n1) + nadj) = q1+1 - jz L(q1_ff) - - mull %ebx C (q1+1)*d - - C - - subl %eax, %esi C low n - (q1+1)*d - - sbbl %edx, %edi C high n - (q1+1)*d, 0 or -1 - - andl %ebp, %edi C d if underflow - - addl %esi, %edi C remainder with addback if necessary - - cmpl PARAM_SRC, %ecx - jae L(inverse_top) - - -C ----------------------------------------------------------------------------- -L(inverse_loop_done): - - C %edi is the remainder modulo d*2^n and now must be reduced to - C 0<=r next n2 - - cmpl PARAM_SRC, %ecx - jae L(inverse_top) - - jmp L(inverse_loop_done) - - -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86/p6/mode1o.asm gmp-5.0.2+dfsg/mpn/x86/p6/mode1o.asm --- gmp-4.3.2+dfsg/mpn/x86/p6/mode1o.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/p6/mode1o.asm 2011-05-08 09:49:29.000000000 +0000 @@ -101,7 +101,7 @@ subl %eax, %edi C inv = 2*inv - inv*inv*d - ASSERT(e,` C d*inv == 1 mod 2^BITS_PER_MP_LIMB + ASSERT(e,` C d*inv == 1 mod 2^GMP_LIMB_BITS movl PARAM_DIVISOR, %eax imull %edi, %eax cmpl $1, %eax') diff -Nru gmp-4.3.2+dfsg/mpn/x86/p6/sqr_basecase.asm gmp-5.0.2+dfsg/mpn/x86/p6/sqr_basecase.asm --- gmp-4.3.2+dfsg/mpn/x86/p6/sqr_basecase.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/p6/sqr_basecase.asm 2011-05-08 09:49:29.000000000 +0000 @@ -27,15 +27,15 @@ dnl These are the same as in mpn/x86/k6/sqr_basecase.asm, see that file for dnl a description. The only difference here is that UNROLL_COUNT can go up -dnl to 64 (not 63) making SQR_KARATSUBA_THRESHOLD_MAX 67. +dnl to 64 (not 63) making SQR_TOOM2_THRESHOLD_MAX 67. -deflit(SQR_KARATSUBA_THRESHOLD_MAX, 67) +deflit(SQR_TOOM2_THRESHOLD_MAX, 67) -ifdef(`SQR_KARATSUBA_THRESHOLD_OVERRIDE', -`define(`SQR_KARATSUBA_THRESHOLD',SQR_KARATSUBA_THRESHOLD_OVERRIDE)') +ifdef(`SQR_TOOM2_THRESHOLD_OVERRIDE', +`define(`SQR_TOOM2_THRESHOLD',SQR_TOOM2_THRESHOLD_OVERRIDE)') -m4_config_gmp_mparam(`SQR_KARATSUBA_THRESHOLD') -deflit(UNROLL_COUNT, eval(SQR_KARATSUBA_THRESHOLD-3)) +m4_config_gmp_mparam(`SQR_TOOM2_THRESHOLD') +deflit(UNROLL_COUNT, eval(SQR_TOOM2_THRESHOLD-3)) C void mpn_sqr_basecase (mp_ptr dst, mp_srcptr src, mp_size_t size); diff -Nru gmp-4.3.2+dfsg/mpn/x86/p6/sse2/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86/p6/sse2/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86/p6/sse2/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/p6/sse2/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* Intel P6/sse2 gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2008, 2009 -Free Software Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2003, 2008, 2009, 2010 Free +Software Foundation, Inc. This file is part of the GNU MP Library. @@ -19,56 +19,158 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 -/* NOTE: In a fat binary build SQR_KARATSUBA_THRESHOLD here cannot be more - than the value in mpn/x86/p6/gmp-mparam.h. The latter is used as a hard - limit in mpn/x86/p6/sqr_basecase.asm. */ +/* NOTE: In a fat binary build SQR_TOOM2_THRESHOLD here cannot be more than the + value in mpn/x86/p6/gmp-mparam.h. The latter is used as a hard limit in + mpn/x86/p6/sqr_basecase.asm. */ /* 1867 MHz P6 model 13 */ -/* Generated by tuneupc, 2008-10-30, gcc 4.3 */ - -#define MUL_KARATSUBA_THRESHOLD 20 -#define MUL_TOOM3_THRESHOLD 77 -#define MUL_TOOM44_THRESHOLD 142 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_KARATSUBA_THRESHOLD 30 -#define SQR_TOOM3_THRESHOLD 101 -#define SQR_TOOM4_THRESHOLD 154 - -#define MULLOW_BASECASE_THRESHOLD 4 -#define MULLOW_DC_THRESHOLD 38 -#define MULLOW_MUL_N_THRESHOLD 234 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 24 -#define POWM_THRESHOLD 150 - -#define MATRIX22_STRASSEN_THRESHOLD 23 -#define HGCD_THRESHOLD 95 -#define GCD_DC_THRESHOLD 381 -#define GCDEXT_DC_THRESHOLD 419 -#define JACOBI_BASE_METHOD 1 - -#define USE_PREINV_DIVREM_1 1 /* native */ -#define USE_PREINV_MOD_1 1 /* native */ -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 14 -#define GET_STR_PRECOMPUTE_THRESHOLD 24 -#define SET_STR_DC_THRESHOLD 276 -#define SET_STR_PRECOMPUTE_THRESHOLD 1078 - -#define MUL_FFT_TABLE { 400, 928, 1664, 3584, 10240, 40960, 98304, 393216, 1572864, 0 } -#define MUL_FFT_MODF_THRESHOLD 496 -#define MUL_FFT_THRESHOLD 7168 - -#define SQR_FFT_TABLE { 432, 928, 1664, 3584, 10240, 40960, 98304, 393216, 1572864, 0 } -#define SQR_FFT_MODF_THRESHOLD 448 -#define SQR_FFT_THRESHOLD 3840 +#define MOD_1_NORM_THRESHOLD 3 +#define MOD_1_UNNORM_THRESHOLD 5 +#define MOD_1N_TO_MOD_1_1_THRESHOLD 10 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 5 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 6 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 0 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 23 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 22 + +#define MUL_TOOM22_THRESHOLD 20 +#define MUL_TOOM33_THRESHOLD 77 +#define MUL_TOOM44_THRESHOLD 182 +#define MUL_TOOM6H_THRESHOLD 252 +#define MUL_TOOM8H_THRESHOLD 381 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 75 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 122 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 115 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 79 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 30 +#define SQR_TOOM3_THRESHOLD 101 +#define SQR_TOOM4_THRESHOLD 154 +#define SQR_TOOM6_THRESHOLD 222 +#define SQR_TOOM8_THRESHOLD 547 + +#define MULMOD_BNM1_THRESHOLD 13 +#define SQRMOD_BNM1_THRESHOLD 18 + +#define MUL_FFT_MODF_THRESHOLD 565 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 565, 5}, { 25, 6}, { 13, 5}, { 27, 6}, \ + { 25, 7}, { 13, 6}, { 28, 7}, { 15, 6}, \ + { 31, 7}, { 17, 6}, { 35, 7}, { 27, 8}, \ + { 15, 7}, { 35, 8}, { 19, 7}, { 41, 8}, \ + { 23, 7}, { 47, 8}, { 27, 9}, { 15, 8}, \ + { 31, 7}, { 63, 8}, { 39, 9}, { 23, 5}, \ + { 383, 4}, { 991, 5}, { 511, 6}, { 267, 7}, \ + { 157, 8}, { 91, 9}, { 47, 8}, { 111, 9}, \ + { 63, 8}, { 127, 9}, { 79,10}, { 47, 9}, \ + { 95,11}, { 31,10}, { 63, 9}, { 135,10}, \ + { 79, 9}, { 159,10}, { 95,11}, { 63,10}, \ + { 143, 9}, { 287,10}, { 159,11}, { 95,10}, \ + { 191,12}, { 63,11}, { 127,10}, { 255, 9}, \ + { 511,10}, { 271, 9}, { 543,10}, { 287,11}, \ + { 159,10}, { 335, 9}, { 671,11}, { 191,10}, \ + { 383, 9}, { 767,10}, { 399, 9}, { 799,10}, \ + { 415,11}, { 223,12}, { 127,11}, { 255,10}, \ + { 543, 9}, { 1087,11}, { 287,10}, { 607,11}, \ + { 319,10}, { 671,12}, { 191,11}, { 383,10}, \ + { 799,11}, { 415,10}, { 831,13}, { 127,12}, \ + { 255,11}, { 543,10}, { 1087,11}, { 607,10}, \ + { 1215,12}, { 319,11}, { 671,10}, { 1343,11}, \ + { 735,10}, { 1471,12}, { 383,11}, { 799,10}, \ + { 1599,11}, { 863,12}, { 447,11}, { 959,13}, \ + { 255,12}, { 511,11}, { 1087,12}, { 575,11}, \ + { 1215,12}, { 639,11}, { 1343,12}, { 703,11}, \ + { 1471,13}, { 383,12}, { 831,11}, { 1727,12}, \ + { 959,14}, { 255,13}, { 511,12}, { 1215,13}, \ + { 639,12}, { 1471,11}, { 2943,13}, { 767,12}, \ + { 1727,13}, { 895,12}, { 1919,14}, { 511,13}, \ + { 1023,12}, { 2111,13}, { 1151,12}, { 2431,13}, \ + { 1407,12}, { 2815,14}, { 767,13}, { 1663,12}, \ + { 3455,13}, { 8192,14}, { 16384,15}, { 32768,16} } +#define MUL_FFT_TABLE3_SIZE 132 +#define MUL_FFT_THRESHOLD 6784 + +#define SQR_FFT_MODF_THRESHOLD 472 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 472, 5}, { 25, 6}, { 13, 5}, { 27, 6}, \ + { 25, 7}, { 13, 6}, { 27, 7}, { 15, 6}, \ + { 31, 7}, { 17, 6}, { 35, 7}, { 27, 8}, \ + { 15, 7}, { 35, 8}, { 19, 7}, { 41, 8}, \ + { 23, 7}, { 49, 8}, { 27, 9}, { 15, 8}, \ + { 39, 9}, { 23, 8}, { 51,10}, { 15, 9}, \ + { 31, 8}, { 63, 4}, { 1023, 8}, { 67, 9}, \ + { 39, 5}, { 639, 4}, { 1471, 6}, { 383, 7}, \ + { 209, 8}, { 119, 9}, { 63, 7}, { 255, 8}, \ + { 139, 9}, { 71, 8}, { 143, 9}, { 79,10}, \ + { 47, 9}, { 95,11}, { 31,10}, { 63, 9}, \ + { 135,10}, { 79, 9}, { 159, 8}, { 319, 9}, \ + { 167,10}, { 95,11}, { 63,10}, { 143, 9}, \ + { 287,10}, { 159,11}, { 95,10}, { 191,12}, \ + { 63,11}, { 127,10}, { 255, 9}, { 543, 8}, \ + { 1087,10}, { 287, 9}, { 575,11}, { 159,10}, \ + { 319, 9}, { 639,10}, { 335, 9}, { 671,10}, \ + { 351, 9}, { 703,11}, { 191,10}, { 383, 9}, \ + { 767,10}, { 399, 9}, { 799,10}, { 415, 9}, \ + { 831,11}, { 223,12}, { 127,11}, { 255,10}, \ + { 543, 9}, { 1087,11}, { 287,10}, { 607, 9}, \ + { 1215,11}, { 319,10}, { 671, 9}, { 1343,11}, \ + { 351,10}, { 703,12}, { 191,11}, { 383,10}, \ + { 799,11}, { 415,10}, { 831,13}, { 127,12}, \ + { 255,11}, { 543,10}, { 1087,11}, { 607,12}, \ + { 319,11}, { 671,10}, { 1343,11}, { 735,12}, \ + { 383,11}, { 799,10}, { 1599,11}, { 863,12}, \ + { 447,11}, { 959,13}, { 255,12}, { 511,11}, \ + { 1087,12}, { 575,11}, { 1215,12}, { 639,11}, \ + { 1343,12}, { 703,11}, { 1471,13}, { 383,12}, \ + { 767,11}, { 1599,12}, { 831,11}, { 1727,12}, \ + { 959,14}, { 255,13}, { 511,12}, { 1215,13}, \ + { 639,12}, { 1471,13}, { 767,12}, { 1727,13}, \ + { 895,12}, { 1919,14}, { 511,13}, { 1023,12}, \ + { 2111,13}, { 1151,12}, { 2431,13}, { 1407,14}, \ + { 767,13}, { 1663,12}, { 3455,13}, { 8192,14}, \ + { 16384,15}, { 32768,16} } +#define SQR_FFT_TABLE3_SIZE 146 +#define SQR_FFT_THRESHOLD 5760 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 34 +#define MULLO_MUL_N_THRESHOLD 8907 + +#define DC_DIV_QR_THRESHOLD 19 +#define DC_DIVAPPR_Q_THRESHOLD 56 +#define DC_BDIV_QR_THRESHOLD 60 +#define DC_BDIV_Q_THRESHOLD 132 + +#define INV_MULMOD_BNM1_THRESHOLD 117 +#define INV_NEWTON_THRESHOLD 81 +#define INV_APPR_THRESHOLD 61 + +#define BINV_NEWTON_THRESHOLD 276 +#define REDC_1_TO_REDC_N_THRESHOLD 63 + +#define MU_DIV_QR_THRESHOLD 1308 +#define MU_DIVAPPR_Q_THRESHOLD 998 +#define MUPI_DIV_QR_THRESHOLD 62 +#define MU_BDIV_QR_THRESHOLD 1442 +#define MU_BDIV_Q_THRESHOLD 1470 + +#define MATRIX22_STRASSEN_THRESHOLD 17 +#define HGCD_THRESHOLD 60 +#define GCD_DC_THRESHOLD 393 +#define GCDEXT_DC_THRESHOLD 303 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 13 +#define GET_STR_PRECOMPUTE_THRESHOLD 22 +#define SET_STR_DC_THRESHOLD 587 +#define SET_STR_PRECOMPUTE_THRESHOLD 983 diff -Nru gmp-4.3.2+dfsg/mpn/x86/p6/sse2/mod_1_4.asm gmp-5.0.2+dfsg/mpn/x86/p6/sse2/mod_1_4.asm --- gmp-4.3.2+dfsg/mpn/x86/p6/sse2/mod_1_4.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/p6/sse2/mod_1_4.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,23 @@ +dnl Intel P6/SSE2 mpn_mod_1_4. + +dnl Copyright 2009, 2011 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + +MULFUNC_PROLOGUE(mpn_mod_1s_4p) +include_mpn(`x86/pentium4/sse2/mod_1_4.asm') diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium/com.asm gmp-5.0.2+dfsg/mpn/x86/pentium/com.asm --- gmp-4.3.2+dfsg/mpn/x86/pentium/com.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium/com.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,170 @@ +dnl Intel Pentium mpn_com -- mpn ones complement. + +dnl Copyright 1996, 2001, 2002, 2006 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundation; either version 3 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C P5: 1.75 cycles/limb + + +NAILS_SUPPORT(0-31) + + +C void mpn_com (mp_ptr dst, mp_srcptr src, mp_size_t size); +C +C This code is similar to mpn_copyi, basically there's just some "xorl +C $GMP_NUMB_MASK"s inserted. +C +C Alternatives: +C +C On P55 some MMX code could be 1.25 c/l (8 limb unrolled) if src and dst +C are the same alignment mod 8, but it doesn't seem worth the trouble for +C just that case (there'd need to be some plain integer available too for +C the unaligned case). + +defframe(PARAM_SIZE,12) +defframe(PARAM_SRC, 8) +defframe(PARAM_DST, 4) + + TEXT + ALIGN(8) +PROLOGUE(mpn_com) +deflit(`FRAME',0) + + movl PARAM_SRC, %eax + movl PARAM_SIZE, %ecx + + pushl %esi FRAME_pushl() + pushl %edi FRAME_pushl() + + leal (%eax,%ecx,4), %eax + xorl $-1, %ecx C -size-1 + + movl PARAM_DST, %edx + addl $8, %ecx C -size+7 + + jns L(end) + + movl (%edx), %esi C fetch destination cache line + nop + +L(top): + C eax &src[size] + C ebx + C ecx counter, limbs, negative + C edx dst, incrementing + C esi scratch + C edi scratch + C ebp + + movl 28(%edx), %esi C destination prefetch + addl $32, %edx + + movl -28(%eax,%ecx,4), %esi + movl -24(%eax,%ecx,4), %edi + xorl $GMP_NUMB_MASK, %esi + xorl $GMP_NUMB_MASK, %edi + movl %esi, -32(%edx) + movl %edi, -28(%edx) + + movl -20(%eax,%ecx,4), %esi + movl -16(%eax,%ecx,4), %edi + xorl $GMP_NUMB_MASK, %esi + xorl $GMP_NUMB_MASK, %edi + movl %esi, -24(%edx) + movl %edi, -20(%edx) + + movl -12(%eax,%ecx,4), %esi + movl -8(%eax,%ecx,4), %edi + xorl $GMP_NUMB_MASK, %esi + xorl $GMP_NUMB_MASK, %edi + movl %esi, -16(%edx) + movl %edi, -12(%edx) + + movl -4(%eax,%ecx,4), %esi + movl (%eax,%ecx,4), %edi + xorl $GMP_NUMB_MASK, %esi + xorl $GMP_NUMB_MASK, %edi + movl %esi, -8(%edx) + movl %edi, -4(%edx) + + addl $8, %ecx + js L(top) + + +L(end): + C eax &src[size] + C ecx 0 to 7, representing respectively 7 to 0 limbs remaining + C edx dst, next location to store + + subl $4, %ecx + nop + + jns L(no4) + + movl -12(%eax,%ecx,4), %esi + movl -8(%eax,%ecx,4), %edi + xorl $GMP_NUMB_MASK, %esi + xorl $GMP_NUMB_MASK, %edi + movl %esi, (%edx) + movl %edi, 4(%edx) + + movl -4(%eax,%ecx,4), %esi + movl (%eax,%ecx,4), %edi + xorl $GMP_NUMB_MASK, %esi + xorl $GMP_NUMB_MASK, %edi + movl %esi, 8(%edx) + movl %edi, 12(%edx) + + addl $16, %edx + addl $4, %ecx +L(no4): + + subl $2, %ecx + nop + + jns L(no2) + + movl -4(%eax,%ecx,4), %esi + movl (%eax,%ecx,4), %edi + xorl $GMP_NUMB_MASK, %esi + xorl $GMP_NUMB_MASK, %edi + movl %esi, (%edx) + movl %edi, 4(%edx) + + addl $8, %edx + addl $2, %ecx +L(no2): + + popl %edi + jnz L(done) + + movl -4(%eax), %ecx + + xorl $GMP_NUMB_MASK, %ecx + popl %esi + + movl %ecx, (%edx) + ret + +L(done): + popl %esi + ret + +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium/com_n.asm gmp-5.0.2+dfsg/mpn/x86/pentium/com_n.asm --- gmp-4.3.2+dfsg/mpn/x86/pentium/com_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium/com_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,170 +0,0 @@ -dnl Intel Pentium mpn_com_n -- mpn ones complement. - -dnl Copyright 1996, 2001, 2002, 2006 Free Software Foundation, Inc. -dnl -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C P5: 1.75 cycles/limb - - -NAILS_SUPPORT(0-31) - - -C void mpn_com_n (mp_ptr dst, mp_srcptr src, mp_size_t size); -C -C This code is similar to mpn_copyi, basically there's just some "xorl -C $GMP_NUMB_MASK"s inserted. -C -C Alternatives: -C -C On P55 some MMX code could be 1.25 c/l (8 limb unrolled) if src and dst -C are the same alignment mod 8, but it doesn't seem worth the trouble for -C just that case (there'd need to be some plain integer available too for -C the unaligned case). - -defframe(PARAM_SIZE,12) -defframe(PARAM_SRC, 8) -defframe(PARAM_DST, 4) - - TEXT - ALIGN(8) -PROLOGUE(mpn_com_n) -deflit(`FRAME',0) - - movl PARAM_SRC, %eax - movl PARAM_SIZE, %ecx - - pushl %esi FRAME_pushl() - pushl %edi FRAME_pushl() - - leal (%eax,%ecx,4), %eax - xorl $-1, %ecx C -size-1 - - movl PARAM_DST, %edx - addl $8, %ecx C -size+7 - - jns L(end) - - movl (%edx), %esi C fetch destination cache line - nop - -L(top): - C eax &src[size] - C ebx - C ecx counter, limbs, negative - C edx dst, incrementing - C esi scratch - C edi scratch - C ebp - - movl 28(%edx), %esi C destination prefetch - addl $32, %edx - - movl -28(%eax,%ecx,4), %esi - movl -24(%eax,%ecx,4), %edi - xorl $GMP_NUMB_MASK, %esi - xorl $GMP_NUMB_MASK, %edi - movl %esi, -32(%edx) - movl %edi, -28(%edx) - - movl -20(%eax,%ecx,4), %esi - movl -16(%eax,%ecx,4), %edi - xorl $GMP_NUMB_MASK, %esi - xorl $GMP_NUMB_MASK, %edi - movl %esi, -24(%edx) - movl %edi, -20(%edx) - - movl -12(%eax,%ecx,4), %esi - movl -8(%eax,%ecx,4), %edi - xorl $GMP_NUMB_MASK, %esi - xorl $GMP_NUMB_MASK, %edi - movl %esi, -16(%edx) - movl %edi, -12(%edx) - - movl -4(%eax,%ecx,4), %esi - movl (%eax,%ecx,4), %edi - xorl $GMP_NUMB_MASK, %esi - xorl $GMP_NUMB_MASK, %edi - movl %esi, -8(%edx) - movl %edi, -4(%edx) - - addl $8, %ecx - js L(top) - - -L(end): - C eax &src[size] - C ecx 0 to 7, representing respectively 7 to 0 limbs remaining - C edx dst, next location to store - - subl $4, %ecx - nop - - jns L(no4) - - movl -12(%eax,%ecx,4), %esi - movl -8(%eax,%ecx,4), %edi - xorl $GMP_NUMB_MASK, %esi - xorl $GMP_NUMB_MASK, %edi - movl %esi, (%edx) - movl %edi, 4(%edx) - - movl -4(%eax,%ecx,4), %esi - movl (%eax,%ecx,4), %edi - xorl $GMP_NUMB_MASK, %esi - xorl $GMP_NUMB_MASK, %edi - movl %esi, 8(%edx) - movl %edi, 12(%edx) - - addl $16, %edx - addl $4, %ecx -L(no4): - - subl $2, %ecx - nop - - jns L(no2) - - movl -4(%eax,%ecx,4), %esi - movl (%eax,%ecx,4), %edi - xorl $GMP_NUMB_MASK, %esi - xorl $GMP_NUMB_MASK, %edi - movl %esi, (%edx) - movl %edi, 4(%edx) - - addl $8, %edx - addl $2, %ecx -L(no2): - - popl %edi - jnz L(done) - - movl -4(%eax), %ecx - - xorl $GMP_NUMB_MASK, %ecx - popl %esi - - movl %ecx, (%edx) - ret - -L(done): - popl %esi - ret - -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium/dive_1.asm gmp-5.0.2+dfsg/mpn/x86/pentium/dive_1.asm --- gmp-4.3.2+dfsg/mpn/x86/pentium/dive_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium/dive_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -146,7 +146,7 @@ negl %ebx C -size - ASSERT(e,` C expect d*inv == 1 mod 2^BITS_PER_MP_LIMB + ASSERT(e,` C expect d*inv == 1 mod 2^GMP_LIMB_BITS pushl %eax FRAME_pushl() imull PARAM_DIVISOR, %eax cmpl $1, %eax diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86/pentium/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86/pentium/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -19,7 +19,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 @@ -31,11 +31,11 @@ /* Generated by tuneup.c, 2004-02-10, gcc 2.95 */ -#define MUL_KARATSUBA_THRESHOLD 16 -#define MUL_TOOM3_THRESHOLD 90 +#define MUL_TOOM22_THRESHOLD 16 +#define MUL_TOOM33_THRESHOLD 90 #define SQR_BASECASE_THRESHOLD 0 /* always */ -#define SQR_KARATSUBA_THRESHOLD 22 +#define SQR_TOOM2_THRESHOLD 22 #define SQR_TOOM3_THRESHOLD 122 #define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX /* never */ diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium/mmx/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86/pentium/mmx/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86/pentium/mmx/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium/mmx/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* Intel P55 gmp-mparam.h -- Compiler/machine parameter header file. -Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2009 Free Software -Foundation, Inc. +Copyright 1991, 1993, 1994, 1999, 2000, 2001, 2002, 2004, 2009, 2010 Free +Software Foundation, Inc. This file is part of the GNU MP Library. @@ -19,7 +19,7 @@ along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 32 +#define GMP_LIMB_BITS 32 #define BYTES_PER_MP_LIMB 4 @@ -29,45 +29,124 @@ /* 233MHz P55 */ -/* Generated by tuneup.c, 2009-01-06, gcc 3.4 */ - -#define MUL_KARATSUBA_THRESHOLD 16 -#define MUL_TOOM3_THRESHOLD 89 -#define MUL_TOOM44_THRESHOLD 131 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_KARATSUBA_THRESHOLD 22 -#define SQR_TOOM3_THRESHOLD 77 -#define SQR_TOOM4_THRESHOLD 168 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 40 -#define MULLOW_MUL_N_THRESHOLD 266 - -#define DIV_SB_PREINV_THRESHOLD 4 -#define DIV_DC_THRESHOLD 43 -#define POWM_THRESHOLD 64 - -#define MATRIX22_STRASSEN_THRESHOLD 13 -#define HGCD_THRESHOLD 95 -#define GCD_DC_THRESHOLD 316 -#define GCDEXT_DC_THRESHOLD 316 -#define JACOBI_BASE_METHOD 2 - -#define USE_PREINV_DIVREM_1 0 -#define USE_PREINV_MOD_1 1 /* native */ -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 17 -#define GET_STR_PRECOMPUTE_THRESHOLD 27 -#define SET_STR_DC_THRESHOLD 527 -#define SET_STR_PRECOMPUTE_THRESHOLD 1069 - -#define MUL_FFT_TABLE { 304, 672, 1152, 3584, 10240, 40960, 0 } -#define MUL_FFT_MODF_THRESHOLD 320 -#define MUL_FFT_THRESHOLD 3840 - -#define SQR_FFT_TABLE { 304, 672, 1152, 4608, 10240, 24576, 0 } -#define SQR_FFT_MODF_THRESHOLD 320 -#define SQR_FFT_THRESHOLD 3840 +#define MOD_1_NORM_THRESHOLD 5 +#define MOD_1_UNNORM_THRESHOLD MP_SIZE_T_MAX /* never */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX /* never */ +#define MOD_1U_TO_MOD_1_1_THRESHOLD 12 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 11 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 63 +#define USE_PREINV_DIVREM_1 0 +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 51 + +#define MUL_TOOM22_THRESHOLD 16 +#define MUL_TOOM33_THRESHOLD 53 +#define MUL_TOOM44_THRESHOLD 128 +#define MUL_TOOM6H_THRESHOLD 189 +#define MUL_TOOM8H_THRESHOLD 260 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 89 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 91 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 90 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 88 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 20 +#define SQR_TOOM3_THRESHOLD 73 +#define SQR_TOOM4_THRESHOLD 178 +#define SQR_TOOM6_THRESHOLD 210 +#define SQR_TOOM8_THRESHOLD 375 + +#define MULMOD_BNM1_THRESHOLD 11 +#define SQRMOD_BNM1_THRESHOLD 12 + +#define MUL_FFT_MODF_THRESHOLD 364 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 364, 5}, { 15, 6}, { 8, 5}, { 17, 6}, \ + { 9, 5}, { 19, 6}, { 17, 7}, { 9, 6}, \ + { 21, 7}, { 11, 6}, { 23, 7}, { 15, 6}, \ + { 31, 7}, { 21, 8}, { 11, 7}, { 27, 8}, \ + { 15, 7}, { 33, 8}, { 19, 7}, { 39, 8}, \ + { 23, 7}, { 47, 8}, { 27, 9}, { 15, 8}, \ + { 31, 7}, { 63, 8}, { 39, 9}, { 23, 8}, \ + { 47,10}, { 15, 9}, { 31, 8}, { 67, 9}, \ + { 39, 8}, { 79, 9}, { 47, 8}, { 95, 9}, \ + { 55,10}, { 31, 9}, { 79,10}, { 47, 9}, \ + { 95,11}, { 31,10}, { 63, 9}, { 135,10}, \ + { 79, 9}, { 159, 8}, { 319, 9}, { 167,10}, \ + { 95, 9}, { 191, 8}, { 383,11}, { 63,10}, \ + { 127, 9}, { 255,10}, { 143, 9}, { 287,10}, \ + { 159, 9}, { 319,11}, { 95,10}, { 191, 9}, \ + { 383,12}, { 63,11}, { 127,10}, { 271, 9}, \ + { 543,10}, { 287,11}, { 159,10}, { 351,11}, \ + { 191,10}, { 415,11}, { 223,12}, { 127,11}, \ + { 255,10}, { 511,11}, { 287,10}, { 575,11}, \ + { 351,12}, { 191,11}, { 415,13}, { 127,12}, \ + { 255,11}, { 575,12}, { 319,11}, { 703,12}, \ + { 383,11}, { 831,12}, { 447,13}, { 8192,14}, \ + { 16384,15}, { 32768,16} } +#define MUL_FFT_TABLE3_SIZE 90 +#define MUL_FFT_THRESHOLD 3520 + +#define SQR_FFT_MODF_THRESHOLD 340 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 340, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 17, 7}, { 9, 6}, { 21, 7}, { 11, 6}, \ + { 23, 7}, { 15, 6}, { 31, 7}, { 21, 8}, \ + { 11, 7}, { 29, 8}, { 15, 7}, { 33, 8}, \ + { 19, 7}, { 39, 8}, { 27, 7}, { 55, 9}, \ + { 15, 8}, { 31, 7}, { 65, 8}, { 43, 9}, \ + { 23, 8}, { 47,10}, { 15, 9}, { 31, 8}, \ + { 67, 9}, { 39, 8}, { 83, 9}, { 47, 8}, \ + { 95,10}, { 31, 9}, { 63, 8}, { 127, 9}, \ + { 79,10}, { 47, 9}, { 95,11}, { 31,10}, \ + { 63, 9}, { 127, 8}, { 255, 9}, { 135,10}, \ + { 79, 9}, { 159, 8}, { 319,10}, { 95, 9}, \ + { 191,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511, 9}, { 271,10}, { 143, 9}, { 287, 8}, \ + { 575, 9}, { 303,10}, { 159, 9}, { 319,11}, \ + { 95,10}, { 191, 9}, { 383,10}, { 207,12}, \ + { 63,11}, { 127,10}, { 271, 9}, { 543,10}, \ + { 287, 9}, { 575,10}, { 303,11}, { 159,10}, \ + { 351,11}, { 191,10}, { 415,11}, { 223,10}, \ + { 447,12}, { 127,11}, { 255,10}, { 543,11}, \ + { 287,10}, { 607,11}, { 351,12}, { 191,11}, \ + { 479,13}, { 127,12}, { 255,11}, { 575,12}, \ + { 319,11}, { 703,12}, { 383,11}, { 767,12}, \ + { 447,13}, { 8192,14}, { 16384,15}, { 32768,16} } +#define SQR_FFT_TABLE3_SIZE 96 +#define SQR_FFT_THRESHOLD 5504 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 48 +#define MULLO_MUL_N_THRESHOLD 6633 + +#define DC_DIV_QR_THRESHOLD 43 +#define DC_DIVAPPR_Q_THRESHOLD 170 +#define DC_BDIV_QR_THRESHOLD 43 +#define DC_BDIV_Q_THRESHOLD 110 + +#define INV_MULMOD_BNM1_THRESHOLD 30 +#define INV_NEWTON_THRESHOLD 177 +#define INV_APPR_THRESHOLD 171 + +#define BINV_NEWTON_THRESHOLD 194 +#define REDC_1_TO_REDC_N_THRESHOLD 50 + +#define MU_DIV_QR_THRESHOLD 1142 +#define MU_DIVAPPR_Q_THRESHOLD 1142 +#define MUPI_DIV_QR_THRESHOLD 90 +#define MU_BDIV_QR_THRESHOLD 942 +#define MU_BDIV_Q_THRESHOLD 1017 + +#define MATRIX22_STRASSEN_THRESHOLD 13 +#define HGCD_THRESHOLD 92 +#define GCD_DC_THRESHOLD 283 +#define GCDEXT_DC_THRESHOLD 221 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 18 +#define GET_STR_PRECOMPUTE_THRESHOLD 31 +#define SET_STR_DC_THRESHOLD 490 +#define SET_STR_PRECOMPUTE_THRESHOLD 994 diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium/mod_1.asm gmp-5.0.2+dfsg/mpn/x86/pentium/mod_1.asm --- gmp-4.3.2+dfsg/mpn/x86/pentium/mod_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium/mod_1.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,454 +0,0 @@ -dnl Intel P5 mpn_mod_1 -- mpn by limb remainder. - -dnl Copyright 1999, 2000, 2002 Free Software Foundation, Inc. -dnl -dnl This file is part of the GNU MP Library. -dnl -dnl The GNU MP Library is free software; you can redistribute it and/or -dnl modify it under the terms of the GNU Lesser General Public License as -dnl published by the Free Software Foundation; either version 3 of the -dnl License, or (at your option) any later version. -dnl -dnl The GNU MP Library is distributed in the hope that it will be useful, -dnl but WITHOUT ANY WARRANTY; without even the implied warranty of -dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -dnl Lesser General Public License for more details. -dnl -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C P5: 28.0 cycles/limb - - -C mp_limb_t mpn_mod_1 (mp_srcptr src, mp_size_t size, mp_limb_t divisor); -C mp_limb_t mpn_mod_1c (mp_srcptr src, mp_size_t size, mp_limb_t divisor, -C mp_limb_t carry); -C mp_limb_t mpn_preinv_mod_1 (mp_srcptr src, mp_size_t size, mp_limb_t divisor, -C mp_limb_t inverse); -C -C This code is not unlike mpn/x86/p6/mod_1.asm, it does the same sort of -C multiply by inverse without on-the-fly shifts. See that code for some -C general comments. -C -C Alternatives: -C -C P5 shldl is 4 cycles, so shifting on the fly would be at least 5 cycles -C slower, probably more depending what it did to register usage. Using MMX -C on P55 would be better, but still at least 4 or 5 instructions and so 2 or -C 3 cycles. - - -dnl These thresholds are the sizes where the multiply by inverse method is -dnl used, rather than plain "divl"s. Minimum value 2. -dnl -dnl MUL_NORM_THRESHOLD is for an already normalized divisor (high bit set), -dnl MUL_UNNORM_THRESHOLD for an unnormalized divisor. -dnl -dnl With the divl loop at 44 c/l and the inverse at 28 c/l with about 70 -dnl cycles to setup, the threshold should be about ceil(70/16)==5, which is -dnl what happens in practice. -dnl -dnl An unnormalized divisor gets an extra 40 cycles at the end for the -dnl final (r*2^n)%(d*2^n) and shift. This increases the threshold by about -dnl 40/16=3. -dnl -dnl PIC adds between 4 and 7 cycles (not sure why it varies), but this -dnl doesn't change the thresholds. -dnl -dnl The entry sequence code that chooses between MUL_NORM_THRESHOLD and -dnl MUL_UNNORM_THRESHOLD is a bit horrible, but it adds only 2 cycles -dnl (branch free) and ensures the choice between div or mul is optimal. - -deflit(MUL_NORM_THRESHOLD, ifdef(`PIC',5,5)) -deflit(MUL_UNNORM_THRESHOLD, ifdef(`PIC',8,8)) - -deflit(MUL_NORM_DELTA, eval(MUL_NORM_THRESHOLD - MUL_UNNORM_THRESHOLD)) - - -defframe(PARAM_INVERSE, 16) dnl mpn_preinv_mod_1 -defframe(PARAM_CARRY, 16) dnl mpn_mod_1c -defframe(PARAM_DIVISOR, 12) -defframe(PARAM_SIZE, 8) -defframe(PARAM_SRC, 4) - -dnl re-using parameter space -define(VAR_NORM, `PARAM_DIVISOR') -define(VAR_INVERSE, `PARAM_SIZE') - - TEXT - - ALIGN(8) -PROLOGUE(mpn_preinv_mod_1) -deflit(`FRAME',0) - - pushl %ebp FRAME_pushl() - pushl %esi FRAME_pushl() - - movl PARAM_SRC, %esi - movl PARAM_SIZE, %edx - - pushl %edi FRAME_pushl() - pushl %ebx FRAME_pushl() - - movl PARAM_DIVISOR, %ebp - movl PARAM_INVERSE, %eax - - movl -4(%esi,%edx,4), %edi C src high limb - leal -8(%esi,%edx,4), %esi C &src[size-2] - - movl $0, VAR_NORM - decl %edx - - jnz L(start_preinv) - - subl %ebp, %edi C src-divisor - popl %ebx - - sbbl %ecx, %ecx C -1 if underflow - movl %edi, %eax C src-divisor - - andl %ebp, %ecx C d if underflow - popl %edi - - addl %ecx, %eax C remainder, with possible addback - popl %esi - - popl %ebp - - ret - -EPILOGUE() - - - ALIGN(8) -PROLOGUE(mpn_mod_1c) -deflit(`FRAME',0) - - movl PARAM_DIVISOR, %eax - movl PARAM_SIZE, %ecx - - sarl $31, %eax C d highbit - movl PARAM_CARRY, %edx - - orl %ecx, %ecx - jz L(done_edx) C result==carry if size==0 - - andl $MUL_NORM_DELTA, %eax - pushl %ebp FRAME_pushl() - - addl $MUL_UNNORM_THRESHOLD, %eax C norm or unnorm thresh - pushl %esi FRAME_pushl() - - movl PARAM_SRC, %esi - movl PARAM_DIVISOR, %ebp - - cmpl %eax, %ecx - jb L(divide_top) - - movl %edx, %eax C carry as pretend src high limb - leal 1(%ecx), %edx C size+1 - - cmpl $0x1000000, %ebp - jmp L(mul_by_inverse_1c) - -EPILOGUE() - - - ALIGN(8) -PROLOGUE(mpn_mod_1) -deflit(`FRAME',0) - - movl PARAM_SIZE, %ecx - pushl %ebp FRAME_pushl() - - orl %ecx, %ecx - jz L(done_zero) - - movl PARAM_SRC, %eax - movl PARAM_DIVISOR, %ebp - - sarl $31, %ebp C -1 if divisor normalized - movl -4(%eax,%ecx,4), %eax C src high limb - - movl PARAM_DIVISOR, %edx - pushl %esi FRAME_pushl() - - andl $MUL_NORM_DELTA, %ebp - cmpl %edx, %eax C carry flag if high 25,17,9,1 - - shrl %cl, %ebx - addl $_GLOBAL_OFFSET_TABLE_+[.-L(here)], %edi - - C AGI - movl __clz_tab@GOT(%edi), %edi - addl $-34, %ecx - - C AGI - movb (%ebx,%edi), %bl - -',` - leal 25(,%ecx,8), %ecx C 0,-1,-2,-3 -> 25,17,9,1 - - shrl %cl, %ebx - addl $-34, %ecx - - C AGI - movb __clz_tab(%ebx), %bl -') - movl %eax, %edi C carry -> n1 - - addl %ebx, %ecx C -34 + c + __clz_tab[d>>c] = -clz-1 - leal -8(%esi,%edx,4), %esi C &src[size-2] - - xorl $-1, %ecx C clz - movl $-1, %edx - - ASSERT(e,`pushl %eax C clz calculation same as bsrl - bsrl %ebp, %eax - xorl $31, %eax - cmpl %eax, %ecx - popl %eax') - - shll %cl, %ebp C d normalized - movl %ecx, VAR_NORM - - subl %ebp, %edx C (b-d)-1, so edx:eax = b*(b-d)-1 - movl $-1, %eax - - divl %ebp C floor (b*(b-d)-1) / d - -L(start_preinv): - movl %eax, VAR_INVERSE - movl %ebp, %eax C d - - movl %ecx, %edx C fake high, will cancel - - -C For mpn_mod_1 and mpn_preinv_mod_1, the initial carry in %edi is the src -C high limb, and this may be greater than the divisor and may need one copy -C of the divisor subtracted (only one, because the divisor is normalized). -C This is accomplished by having the initial ecx:edi act as a fake previous -C n2:n10. The initial edx:eax is d, acting as a fake (q1+1)*d which is -C subtracted from ecx:edi, with the usual addback if it produces an -C underflow. - - -L(inverse_top): - C eax scratch (n10, n1, q1, etc) - C ebx scratch (nadj, src limit) - C ecx old n2 - C edx scratch - C esi src pointer, &src[size-2] to &src[0] - C edi old n10 - C ebp d - - subl %eax, %edi C low n - (q1+1)*d - movl (%esi), %eax C new n10 - - sbbl %edx, %ecx C high n - (q1+1)*d, 0 or -1 - movl %ebp, %ebx C d - - sarl $31, %eax C -n1 - andl %ebp, %ecx C d if underflow - - addl %edi, %ecx C remainder -> n2, and possible addback - ASSERT(b,`cmpl %ebp, %ecx') - andl %eax, %ebx C -n1 & d - - movl (%esi), %edi C n10 - andl $1, %eax C n1 - - addl %ecx, %eax C n2+n1 - addl %edi, %ebx C nadj = n10 + (-n1 & d), ignoring overflow - - mull VAR_INVERSE C m*(n2+n1) - - addl %eax, %ebx C low(m*(n2+n1) + nadj), giving carry flag - leal 1(%ecx), %eax C 1+n2 - - adcl %edx, %eax C 1 + high[n2<<32 + m*(n2+n1) + nadj] = q1+1 - movl PARAM_SRC, %ebx - - sbbl $0, %eax C use q1 if q1+1 overflows - subl $4, %esi C step src ptr - - mull %ebp C (q1+1)*d - - cmpl %ebx, %esi - jae L(inverse_top) - - - - C %edi (after subtract and addback) is the remainder modulo d*2^n - C and must be reduced to 0<=r2 - - - C if size==1 - movl SAVE_ESI, %esi - movd %mm0, %eax - emms - ret - -EPILOGUE() - - - ALIGN(16) -PROLOGUE(mpn_mod_1c) -deflit(`FRAME',0) - movl PARAM_SIZE, %ecx - movl %esi, SAVE_ESI - - movl PARAM_SRC, %esi - movl %ebp, SAVE_EBP - - movl PARAM_CARRY, %edx - orl %ecx, %ecx - jz L(divide_done) C result==carry if size==0 - - movl PARAM_DIVISOR, %ebp - jmp L(start_1c) - -EPILOGUE() - - - ALIGN(16) -PROLOGUE(mpn_mod_1) -deflit(`FRAME',0) - - movl PARAM_SIZE, %ecx - movl %esi, SAVE_ESI - - movl PARAM_SRC, %esi - movl %ebp, SAVE_EBP - - movl PARAM_DIVISOR, %ebp - xorl %edx, %edx C result 0 if size==0 - - orl %ecx, %ecx - jz L(divide_done) - movl -4(%esi,%ecx,4), %eax C src high limb - - leal -1(%ecx), %edx - cmpl %ebp, %eax C c if high n2 - psrlq $32, %mm3 C high n - (q1+1)*d, 0 or -1 - - ASSERT(be,`C 0 or -1 - movd %mm3, %eax - addl $1, %eax - cmpl $1, %eax') - - pand %mm5, %mm3 C mask & d - - paddd %mm3, %mm0 C addback if necessary - - subl $1, %ecx - jnz L(inverse_top) - - - C Least significant limb. - C Same code as the loop, but there's no -4(%esi) limb to fetch. - -L(inverse_last): - C eax - C ebx - C ecx - C edx - C esi &src[0] - C - C mm0 n2 - C mm4 m - C mm5 d - C mm6 32-l - C mm7 l - - movd (%esi), %mm1 C src[0] - psllq %mm7, %mm1 C n10 - - movq %mm1, %mm2 C n10 - movq %mm1, %mm3 C n10 - psrad $31, %mm1 C -n1 - pand %mm5, %mm1 C -n1 & d - paddd %mm2, %mm1 C nadj = n10+(-n1&d), ignore overflow - - psrld $31, %mm2 C n1 - paddd %mm0, %mm2 C n2+n1 - punpckldq %mm0, %mm1 C n2:nadj - - pmuludq %mm4, %mm2 C m*(n2+n1) - - paddq %mm2, %mm1 C n2:nadj + m*(n2+n1) - - psrlq $32, %mm1 C q1 = high(n2:nadj + m*(n2+n1)) - - pmuludq %mm5, %mm1 C q1*d - punpckldq %mm0, %mm3 C n - psubq %mm5, %mm3 C n - d - pxor %mm0, %mm0 - - psubq %mm1, %mm3 C n - (q1+1)*d - - por %mm3, %mm0 C remainder -> n2 - psrlq $32, %mm3 C high n - (q1+1)*d, 0 or -1 - - ASSERT(be,`C 0 or -1 - movd %mm3, %eax - addl $1, %eax - cmpl $1, %eax') - - movl SAVE_EBP, %ebp - pand %mm5, %mm3 C mask & d - - movl SAVE_ESI, %esi - paddd %mm3, %mm0 C addback if necessary - - psrld %mm7, %mm0 - - movd %mm0, %eax - - emms - ret - -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium4/sse2/mode1o.asm gmp-5.0.2+dfsg/mpn/x86/pentium4/sse2/mode1o.asm --- gmp-4.3.2+dfsg/mpn/x86/pentium4/sse2/mode1o.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium4/sse2/mode1o.asm 2011-05-08 09:49:29.000000000 +0000 @@ -101,7 +101,7 @@ psubd %mm0, %mm6 C inv = 2*inv - inv*inv*d - ASSERT(e,` C expect d*inv == 1 mod 2^BITS_PER_MP_LIMB + ASSERT(e,` C expect d*inv == 1 mod 2^GMP_LIMB_BITS pushl %eax FRAME_pushl() movd %mm6, %eax imul PARAM_DIVISOR, %eax diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium4/sse2/popcount.asm gmp-5.0.2+dfsg/mpn/x86/pentium4/sse2/popcount.asm --- gmp-4.3.2+dfsg/mpn/x86/pentium4/sse2/popcount.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium4/sse2/popcount.asm 2011-05-08 09:49:29.000000000 +0000 @@ -41,7 +41,8 @@ C P4 model 4 (Nocona): 8 C K8: 7.5 C K10: 3.5 -C P6-15: 3.68 +C P6 core2: 3.68 +C P6 corei7: 3.15 C TODO C * Make a mpn_hamdist based on this. Alignment could either be handled by diff -Nru gmp-4.3.2+dfsg/mpn/x86/pentium4/sse2/sqr_basecase.asm gmp-5.0.2+dfsg/mpn/x86/pentium4/sse2/sqr_basecase.asm --- gmp-4.3.2+dfsg/mpn/x86/pentium4/sse2/sqr_basecase.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/pentium4/sse2/sqr_basecase.asm 2011-05-08 09:49:29.000000000 +0000 @@ -30,7 +30,7 @@ C with possibly needless alignment. C * Use OSP, should solve feed-in latency problems. C * Address relative slowness for un<=3 for Pentium M. The old code is there -C consideraly faster. (1:20/14, 2:34:32, 3:66/57) +C considerably faster. (1:20/14, 2:34:32, 3:66/57) C INPUT PARAMETERS C rp sp + 4 diff -Nru gmp-4.3.2+dfsg/mpn/x86/t-zdisp2.pl gmp-5.0.2+dfsg/mpn/x86/t-zdisp2.pl --- gmp-4.3.2+dfsg/mpn/x86/t-zdisp2.pl 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/t-zdisp2.pl 2011-05-08 09:49:29.000000000 +0000 @@ -71,7 +71,7 @@ } } -# Ensure we're using the right SQR_KARATSUBA_THRESHOLD for the part of the +# Ensure we're using the right SQR_TOOM2_THRESHOLD for the part of the # tree being processed. sub process_mparam { my $file = "$File::Find::dir/gmp-mparam.h"; @@ -79,10 +79,10 @@ print "$file\n" if $opt{'t'}; open MPARAM, "<$file" or die; while () { - if (/^#define SQR_KARATSUBA_THRESHOLD[ \t]*([0-9][0-9]*)/) { + if (/^#define SQR_TOOM2_THRESHOLD[ \t]*([0-9][0-9]*)/) { open KARA, ">$tempfile" or die; - print KARA "define(\`SQR_KARATSUBA_THRESHOLD',$1)\n\n"; - print "define(\`SQR_KARATSUBA_THRESHOLD',$1)\n" if $opt{'t'}; + print KARA "define(\`SQR_TOOM2_THRESHOLD',$1)\n\n"; + print "define(\`SQR_TOOM2_THRESHOLD',$1)\n" if $opt{'t'}; close KARA or die; last; } diff -Nru gmp-4.3.2+dfsg/mpn/x86/x86-defs.m4 gmp-5.0.2+dfsg/mpn/x86/x86-defs.m4 --- gmp-4.3.2+dfsg/mpn/x86/x86-defs.m4 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86/x86-defs.m4 2011-05-08 09:49:29.000000000 +0000 @@ -895,7 +895,7 @@ dnl dnl This macro is only meant for use in ASSERT()s or when testing, since dnl the PIC sequence it generates will want to be done with a ret balancing -dnl the call on CPUs with return address branch predition. +dnl the call on CPUs with return address branch prediction. dnl dnl The addl generated here has a backward reference to the label, and so dnl won't suffer from the two forwards references bug in old gas (described diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/addlsh1_n.asm gmp-5.0.2+dfsg/mpn/x86_64/addlsh1_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/addlsh1_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/addlsh1_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,131 +0,0 @@ -dnl AMD64 mpn_addlsh1_n -- rp[] = up[] + (vp[] << 1) - -dnl Copyright 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C cycles/limb -C K8,K9: 2 -C K10: 2 -C P4: 13 -C P6-15: 3.45 - - -C Sometimes speed degenerates, supposedly related to that some operand -C alignments cause cache conflicts. - -C The speed is limited by decoding/issue bandwidth. There are 22 instructions -C in the loop, which corresponds to ceil(26/3)/4 = 2.0 c/l. - -C INPUT PARAMETERS -define(`rp',`%rdi') -define(`up',`%rsi') -define(`vp',`%rdx') -define(`n', `%rcx') - -ASM_START() - TEXT - ALIGN(16) -PROLOGUE(mpn_addlsh1_n) - push %rbp - - mov (vp), %r8 - mov R32(n), R32(%rax) - lea (rp,n,8), rp - lea (up,n,8), up - lea (vp,n,8), vp - neg n - xor R32(%rbp), R32(%rbp) - and $3, R32(%rax) - je L(b00) - cmp $2, R32(%rax) - jc L(b01) - je L(b10) - -L(b11): add %r8, %r8 - mov 8(vp,n,8), %r9 - adc %r9, %r9 - mov 16(vp,n,8), %r10 - adc %r10, %r10 - sbb R32(%rax), R32(%rax) C save scy - add (up,n,8), %r8 - adc 8(up,n,8), %r9 - mov %r8, (rp,n,8) - mov %r9, 8(rp,n,8) - adc 16(up,n,8), %r10 - mov %r10, 16(rp,n,8) - sbb R32(%rbp), R32(%rbp) C save acy - add $3, n - jmp L(ent) - -L(b10): add %r8, %r8 - mov 8(vp,n,8), %r9 - adc %r9, %r9 - sbb R32(%rax), R32(%rax) C save scy - add (up,n,8), %r8 - adc 8(up,n,8), %r9 - mov %r8, (rp,n,8) - mov %r9, 8(rp,n,8) - sbb R32(%rbp), R32(%rbp) C save acy - add $2, n - jmp L(ent) - -L(b01): add %r8, %r8 - sbb R32(%rax), R32(%rax) C save scy - add (up,n,8), %r8 - mov %r8, (rp,n,8) - sbb R32(%rbp), R32(%rbp) C save acy - inc n -L(ent): jns L(end) - - ALIGN(16) -L(top): add R32(%rax), R32(%rax) C restore scy - - mov (vp,n,8), %r8 -L(b00): adc %r8, %r8 - mov 8(vp,n,8), %r9 - adc %r9, %r9 - mov 16(vp,n,8), %r10 - adc %r10, %r10 - mov 24(vp,n,8), %r11 - adc %r11, %r11 - - sbb R32(%rax), R32(%rax) C save scy - add R32(%rbp), R32(%rbp) C restore acy - - adc (up,n,8), %r8 - nop C Hammer speedup! - adc 8(up,n,8), %r9 - mov %r8, (rp,n,8) - mov %r9, 8(rp,n,8) - adc 16(up,n,8), %r10 - adc 24(up,n,8), %r11 - mov %r10, 16(rp,n,8) - mov %r11, 24(rp,n,8) - - sbb R32(%rbp), R32(%rbp) C save acy - add $4, n - js L(top) - -L(end): add R32(%rbp), R32(%rax) - neg R32(%rax) - - pop %rbp - ret -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/addmul_2.asm gmp-5.0.2+dfsg/mpn/x86_64/addmul_2.asm --- gmp-4.3.2+dfsg/mpn/x86_64/addmul_2.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/addmul_2.asm 2011-05-08 09:49:29.000000000 +0000 @@ -24,7 +24,8 @@ C K8,K9: 2.375 C K10: 2.375 C P4: ? -C P6-15: 4.45 +C P6 core2: 4.45 +C P6 corei7: 4.35 C This code is the result of running a code generation and optimization tool C suite written by David Harvey and Torbjorn Granlund. @@ -108,49 +109,49 @@ ALIGN(32) L(top): - add w3, (rp,n,8) - adc %rax, w0 + add w3, (rp,n,8) C 0 21 + adc %rax, w0 C 1 24 mov 8(up,n,8), %rax - adc %rdx, w1 + adc %rdx, w1 C 3 26 mov $0, R32(w2) mul v0 - add %rax, w0 + add %rax, w0 C 2 26 mov 8(up,n,8), %rax - adc %rdx, w1 - adc $0, R32(w2) + adc %rdx, w1 C 4 28 + adc $0, R32(w2) C 6 30 L(am0): mul v1 - add w0, 8(rp,n,8) - adc %rax, w1 - adc %rdx, w2 + add w0, 8(rp,n,8) C 3 27 + adc %rax, w1 C 6 30 + adc %rdx, w2 C 8 32 mov 16(up,n,8), %rax mov $0, R32(w3) mul v0 - add %rax, w1 + add %rax, w1 C 8 mov 16(up,n,8), %rax - adc %rdx, w2 - adc $0, R32(w3) + adc %rdx, w2 C 10 + adc $0, R32(w3) C 12 L(am3): mul v1 - add w1, 16(rp,n,8) - adc %rax, w2 + add w1, 16(rp,n,8) C 9 + adc %rax, w2 C 12 mov 24(up,n,8), %rax - adc %rdx, w3 + adc %rdx, w3 C 14 mul v0 mov $0, R32(w0) - add %rax, w2 - adc %rdx, w3 + add %rax, w2 C 14 + adc %rdx, w3 C 16 mov $0, R32(w1) mov 24(up,n,8), %rax - adc $0, R32(w0) + adc $0, R32(w0) C 18 L(am2): mul v1 - add w2, 24(rp,n,8) - adc %rax, w3 - adc %rdx, w0 + add w2, 24(rp,n,8) C 15 + adc %rax, w3 C 18 + adc %rdx, w0 C 20 mov 32(up,n,8), %rax mul v0 - add %rax, w3 + add %rax, w3 C 20 mov 32(up,n,8), %rax - adc %rdx, w0 - adc $0, R32(w1) + adc %rdx, w0 C 22 + adc $0, R32(w1) C 24 L(am1): mul v1 add $4, n js L(top) diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/aorrlsh1_n.asm gmp-5.0.2+dfsg/mpn/x86_64/aorrlsh1_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/aorrlsh1_n.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/aorrlsh1_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,150 @@ +dnl AMD64 mpn_addlsh1_n -- rp[] = up[] + (vp[] << 1) +dnl AMD64 mpn_rsblsh1_n -- rp[] = (vp[] << 1) - up[] + +dnl Copyright 2003, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C K8,K9: 2 +C K10: 2 +C P4: 13 +C P6 core2: 3.45 +C P6 corei7: 3.45 +C P6 atom: ? + + +C Sometimes speed degenerates, supposedly related to that some operand +C alignments cause cache conflicts. + +C The speed is limited by decoding/issue bandwidth. There are 22 instructions +C in the loop, which corresponds to ceil(22/3)/4 = 1.83 c/l. + +C INPUT PARAMETERS +define(`rp',`%rdi') +define(`up',`%rsi') +define(`vp',`%rdx') +define(`n', `%rcx') + +ifdef(`OPERATION_addlsh1_n', ` + define(ADDSUB, add) + define(ADCSBB, adc) + define(func, mpn_addlsh1_n)') +ifdef(`OPERATION_rsblsh1_n', ` + define(ADDSUB, sub) + define(ADCSBB, sbb) + define(func, mpn_rsblsh1_n)') + +MULFUNC_PROLOGUE(mpn_addlsh1_n mpn_rsblsh1_n) + +ASM_START() + TEXT + ALIGN(16) +PROLOGUE(func) + push %rbp + + mov (vp), %r8 + mov R32(n), R32(%rax) + lea (rp,n,8), rp + lea (up,n,8), up + lea (vp,n,8), vp + neg n + xor R32(%rbp), R32(%rbp) + and $3, R32(%rax) + je L(b00) + cmp $2, R32(%rax) + jc L(b01) + je L(b10) + +L(b11): add %r8, %r8 + mov 8(vp,n,8), %r9 + adc %r9, %r9 + mov 16(vp,n,8), %r10 + adc %r10, %r10 + sbb R32(%rax), R32(%rax) C save scy + ADDSUB (up,n,8), %r8 + ADCSBB 8(up,n,8), %r9 + mov %r8, (rp,n,8) + mov %r9, 8(rp,n,8) + ADCSBB 16(up,n,8), %r10 + mov %r10, 16(rp,n,8) + sbb R32(%rbp), R32(%rbp) C save acy + add $3, n + jmp L(ent) + +L(b10): add %r8, %r8 + mov 8(vp,n,8), %r9 + adc %r9, %r9 + sbb R32(%rax), R32(%rax) C save scy + ADDSUB (up,n,8), %r8 + ADCSBB 8(up,n,8), %r9 + mov %r8, (rp,n,8) + mov %r9, 8(rp,n,8) + sbb R32(%rbp), R32(%rbp) C save acy + add $2, n + jmp L(ent) + +L(b01): add %r8, %r8 + sbb R32(%rax), R32(%rax) C save scy + ADDSUB (up,n,8), %r8 + mov %r8, (rp,n,8) + sbb R32(%rbp), R32(%rbp) C save acy + inc n +L(ent): jns L(end) + + ALIGN(16) +L(top): add R32(%rax), R32(%rax) C restore scy + + mov (vp,n,8), %r8 +L(b00): adc %r8, %r8 + mov 8(vp,n,8), %r9 + adc %r9, %r9 + mov 16(vp,n,8), %r10 + adc %r10, %r10 + mov 24(vp,n,8), %r11 + adc %r11, %r11 + + sbb R32(%rax), R32(%rax) C save scy + add R32(%rbp), R32(%rbp) C restore acy + + ADCSBB (up,n,8), %r8 + nop C Hammer speedup! + ADCSBB 8(up,n,8), %r9 + mov %r8, (rp,n,8) + mov %r9, 8(rp,n,8) + ADCSBB 16(up,n,8), %r10 + ADCSBB 24(up,n,8), %r11 + mov %r10, 16(rp,n,8) + mov %r11, 24(rp,n,8) + + sbb R32(%rbp), R32(%rbp) C save acy + add $4, n + js L(top) + +L(end): +ifdef(`OPERATION_addlsh1_n',` + add R32(%rbp), R32(%rax) + neg R32(%rax)') +ifdef(`OPERATION_rsblsh1_n',` + sub R32(%rax), R32(%rbp) + movslq R32(%rbp), %rax') + + pop %rbp + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/aorrlsh2_n.asm gmp-5.0.2+dfsg/mpn/x86_64/aorrlsh2_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/aorrlsh2_n.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/aorrlsh2_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,154 @@ +dnl AMD64 mpn_addlsh2_n and mpn_rsblsh2_n. R = 2*V +- U. +dnl ("rsb" means reversed subtract, name mandated by mpn_sublsh2_n which +dnl subtacts the shifted operand from the unshifted operand.) + +dnl Copyright 2009 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C K8,K9: 2 +C K10: 2 +C P4: ? +C P6 core2: 3 +C P6 corei7: 2.75 +C P6 atom: ? + +C INPUT PARAMETERS +define(`rp', `%rdi') +define(`up', `%rsi') +define(`vp', `%rdx') +define(`n', `%rcx') + +ifdef(`OPERATION_addlsh2_n',` + define(ADDSUB, `add') + define(ADCSBB, `adc') + define(func, mpn_addlsh2_n)') +ifdef(`OPERATION_rsblsh2_n',` + define(ADDSUB, `sub') + define(ADCSBB, `sbb') + define(func, mpn_rsblsh2_n)') + +MULFUNC_PROLOGUE(mpn_addlsh2_n mpn_rsblsh2_n) + +ASM_START() + TEXT + ALIGN(16) +PROLOGUE(func) + push %r12 + push %r13 + push %r14 + push %r15 + + mov (vp), %r8 + lea (,%r8,4), %r12 + shr $62, %r8 + + mov R32(n), R32(%rax) + lea (rp,n,8), rp + lea (up,n,8), up + lea (vp,n,8), vp + neg n + and $3, R8(%rax) + je L(b00) + cmp $2, R8(%rax) + jc L(b01) + je L(b10) + +L(b11): mov 8(vp,n,8), %r10 + lea (%r8,%r10,4), %r14 + shr $62, %r10 + mov 16(vp,n,8), %r11 + lea (%r10,%r11,4), %r15 + shr $62, %r11 + ADDSUB (up,n,8), %r12 + ADCSBB 8(up,n,8), %r14 + ADCSBB 16(up,n,8), %r15 + sbb R32(%rax), R32(%rax) C save carry for next + mov %r12, (rp,n,8) + mov %r14, 8(rp,n,8) + mov %r15, 16(rp,n,8) + add $3, n + js L(top) + jmp L(end) + +L(b01): mov %r8, %r11 + ADDSUB (up,n,8), %r12 + sbb R32(%rax), R32(%rax) C save carry for next + mov %r12, (rp,n,8) + add $1, n + js L(top) + jmp L(end) + +L(b10): mov 8(vp,n,8), %r11 + lea (%r8,%r11,4), %r15 + shr $62, %r11 + ADDSUB (up,n,8), %r12 + ADCSBB 8(up,n,8), %r15 + sbb R32(%rax), R32(%rax) C save carry for next + mov %r12, (rp,n,8) + mov %r15, 8(rp,n,8) + add $2, n + js L(top) + jmp L(end) + +L(b00): mov 8(vp,n,8), %r9 + mov 16(vp,n,8), %r10 + jmp L(e00) + + ALIGN(16) +L(top): mov 16(vp,n,8), %r10 + mov (vp,n,8), %r8 + mov 8(vp,n,8), %r9 + lea (%r11,%r8,4), %r12 + shr $62, %r8 +L(e00): lea (%r8,%r9,4), %r13 + shr $62, %r9 + mov 24(vp,n,8), %r11 + lea (%r9,%r10,4), %r14 + shr $62, %r10 + lea (%r10,%r11,4), %r15 + shr $62, %r11 + add R32(%rax), R32(%rax) C restore carry + ADCSBB (up,n,8), %r12 + ADCSBB 8(up,n,8), %r13 + ADCSBB 16(up,n,8), %r14 + ADCSBB 24(up,n,8), %r15 + mov %r12, (rp,n,8) + mov %r13, 8(rp,n,8) + mov %r14, 16(rp,n,8) + sbb R32(%rax), R32(%rax) C save carry for next + mov %r15, 24(rp,n,8) + add $4, n + js L(top) +L(end): + +ifdef(`OPERATION_addlsh2_n',` + sub R32(%r11), R32(%rax) + neg R32(%rax)') +ifdef(`OPERATION_rsblsh2_n',` + add R32(%r11), R32(%rax) + movslq R32(%rax), %rax') + + pop %r15 + pop %r14 + pop %r13 + pop %r12 + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/aorrlsh_n.asm gmp-5.0.2+dfsg/mpn/x86_64/aorrlsh_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/aorrlsh_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/aorrlsh_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -41,7 +41,7 @@ define(`up', `%rsi') define(`vp', `%rdx') define(`n', `%rcx') -define(`cnt' `%r8') +define(`cnt', `%r8') ifdef(`OPERATION_addlsh_n',` define(ADDSUBC, `adc') @@ -149,7 +149,7 @@ jnc L(oop) L(end): add %ebx, %ebx - adc $0, %r15 + ADDSUBC $0, %r15 mov %r15, %rax pop %rbx pop %r15 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/aorsmul_1.asm gmp-5.0.2+dfsg/mpn/x86_64/aorsmul_1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/aorsmul_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/aorsmul_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -23,8 +23,9 @@ C K8,K9: 2.5 C K10: 2.5 C P4: 14.9 -C P6-15 (Core2): 5.09 -C P6-28 (Atom): 21.3 +C P6 core2: 5.09 +C P6 corei7: +C P6 atom: 21.3 C The inner loop of this code is the result of running a code generation and C optimization tool suite written by David Harvey and Torbjorn Granlund. diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/aors_n.asm gmp-5.0.2+dfsg/mpn/x86_64/aors_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/aors_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/aors_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,7 @@ dnl AMD64 mpn_add_n, mpn_sub_n -dnl Copyright 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +dnl Copyright 2003, 2004, 2005, 2007, 2008, 2010 Free Software Foundation, +dnl Inc. dnl This file is part of the GNU MP Library. @@ -20,11 +21,13 @@ include(`../config.m4') C cycles/limb -C K8,K9: 1.5 -C K10: 1.5 -C P4: ? -C P6-15 (Core2): 4.9 -C P6-28 (Atom): 4 +C AMD K8,K9 1.5 +C AMD K10 1.5 +C Intel P4 ? +C Intel core2 4.9 +C Intel corei ? +C Intel atom 4 +C VIA nano 3.25 C The inner loop of this code is the result of running a code generation and C optimization tool suite written by David Harvey and Torbjorn Granlund. @@ -52,24 +55,57 @@ ALIGN(16) PROLOGUE(func_nc) mov R32(n), R32(%rax) - and $3, R32(%rax) shr $2, n + and $3, R32(%rax) bt $0, %r8 C cy flag <- carry parameter - jz L(1) - jmp L(ent) + jrcxz L(lt4) + + mov (up), %r8 + mov 8(up), %r9 + dec n + jmp L(mid) + EPILOGUE() ALIGN(16) PROLOGUE(func) mov R32(n), R32(%rax) shr $2, n - jz L(0) and $3, R32(%rax) + jrcxz L(lt4) -L(ent): mov (up), %r8 + mov (up), %r8 mov 8(up), %r9 dec n jmp L(mid) +L(lt4): dec R32(%rax) + mov (up), %r8 + jnz L(2) + ADCSBB (vp), %r8 + mov %r8, (rp) + adc %eax, %eax + ret + +L(2): dec R32(%rax) + mov 8(up), %r9 + jnz L(3) + ADCSBB (vp), %r8 + ADCSBB 8(vp), %r9 + mov %r8, (rp) + mov %r9, 8(rp) + adc %eax, %eax + ret + +L(3): mov 16(up), %r10 + ADCSBB (vp), %r8 + ADCSBB 8(vp), %r9 + ADCSBB 16(vp), %r10 + mov %r8, (rp) + mov %r9, 8(rp) + mov %r10, 16(rp) + setc R8(%rax) + ret + ALIGN(16) L(top): ADCSBB (vp), %r8 ADCSBB 8(vp), %r9 @@ -103,36 +139,7 @@ inc R32(%rax) dec R32(%rax) - jnz L(1) - adc %eax, %eax - ret - -L(0): test R32(%rax), R32(%rax) -L(1): dec R32(%rax) - mov (up), %r8 - jnz L(2) - ADCSBB (vp), %r8 - mov %r8, (rp) - adc %eax, %eax - ret - -L(2): dec R32(%rax) - mov 8(up), %r9 - jnz L(3) - ADCSBB (vp), %r8 - ADCSBB 8(vp), %r9 - mov %r8, (rp) - mov %r9, 8(rp) + jnz L(lt4) adc %eax, %eax ret - -L(3): mov 16(up), %r10 - ADCSBB (vp), %r8 - ADCSBB 8(vp), %r9 - ADCSBB 16(vp), %r10 - mov %r8, (rp) - mov %r9, 8(rp) - mov %r10, 16(rp) - setc %al - ret EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/atom/aors_n.asm gmp-5.0.2+dfsg/mpn/x86_64/atom/aors_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/atom/aors_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/atom/aors_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl X86-64 mpn_add_n, mpn_sub_n, optimized for Intel Atom. -dnl Copyright 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +dnl Copyright 2003, 2004, 2005, 2007, 2008, 2010 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -63,15 +63,16 @@ jg L(b3) L(b1): mov (%rsi), %r10 - test R32(%rcx), R32(%rcx) - bt $0, R32(%r8) + test %rcx, %rcx jnz L(gt1) + shr R32(%r8) C Set CF from argument ADCSBB (%rdx), %r10 mov %r10, (%rdi) mov R32(%rcx), R32(%rax) C zero rax adc R32(%rax), R32(%rax) ret -L(gt1): ADCSBB (%rdx), %r10 +L(gt1): shr R32(%r8) + ADCSBB (%rdx), %r10 mov 8(%rsi), %r11 lea 16(%rsi), %rsi lea -16(%rdx), %rdx @@ -81,12 +82,13 @@ L(b2): mov (%rsi), %r9 mov 8(%rsi), %r10 lea -8(%rdx), %rdx - test R32(%rcx), R32(%rcx) - bt $0, R32(%r8) + test %rcx, %rcx jnz L(gt2) + shr R32(%r8) lea -40(%rdi), %rdi jmp L(e2) -L(gt2): ADCSBB 8(%rdx), %r9 +L(gt2): shr R32(%r8) + ADCSBB 8(%rdx), %r9 mov 16(%rsi), %r11 lea -8(%rsi), %rsi lea -8(%rdi), %rdi @@ -95,12 +97,13 @@ L(b3): mov (%rsi), %rax mov 8(%rsi), %r9 mov 16(%rsi), %r10 - test R32(%rcx), R32(%rcx) - bt $0, %r8 + test %rcx, %rcx jnz L(gt3) + shr R32(%r8) lea -32(%rdi), %rdi jmp L(e3) -L(gt3): ADCSBB (%rdx), %rax +L(gt3): shr R32(%r8) + ADCSBB (%rdx), %rax jmp L(m3) L(b0): mov (%rsi), %r11 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/atom/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86_64/atom/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86_64/atom/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/atom/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ -/* Inte Atom gmp-mparam.h -- Compiler/machine parameter header file. +/* Intel Atom/64 gmp-mparam.h -- Compiler/machine parameter header file. Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -2008, 2009 Free Software Foundation, Inc. +2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,59 +18,161 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 -/* Generated by tuneup.c, 2009-01-14, gcc 4.2 */ - -#define MUL_KARATSUBA_THRESHOLD 10 -#define MUL_TOOM3_THRESHOLD 66 -#define MUL_TOOM44_THRESHOLD 118 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_KARATSUBA_THRESHOLD 18 -#define SQR_TOOM3_THRESHOLD 98 -#define SQR_TOOM4_THRESHOLD 166 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 24 -#define MULLOW_MUL_N_THRESHOLD 170 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 30 -#define POWM_THRESHOLD 48 - -#define MATRIX22_STRASSEN_THRESHOLD 17 -#define HGCD_THRESHOLD 86 -#define GCD_DC_THRESHOLD 196 -#define GCDEXT_DC_THRESHOLD 236 -#define JACOBI_BASE_METHOD 3 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 8 -#define MOD_1_2_THRESHOLD 9 -#define MOD_1_4_THRESHOLD 24 -#define USE_PREINV_DIVREM_1 1 /* native */ -#define USE_PREINV_MOD_1 1 -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 19 -#define GET_STR_PRECOMPUTE_THRESHOLD 35 -#define SET_STR_DC_THRESHOLD 268 -#define SET_STR_PRECOMPUTE_THRESHOLD 1142 - -#define MUL_FFT_TABLE { 272, 544, 1088, 1792, 5120, 12288, 49152, 196608, 786432, 0 } -#define MUL_FFT_MODF_THRESHOLD 240 -#define MUL_FFT_THRESHOLD 1408 - -#define SQR_FFT_TABLE { 240, 544, 1216, 2304, 5120, 12288, 49152, 196608, 786432, 0 } -#define SQR_FFT_MODF_THRESHOLD 240 -#define SQR_FFT_THRESHOLD 1408 - -/* These tables need to be updated. */ - -#define MUL_FFT_TABLE2 {{1,4}, {209,5}, {417,6}, {961,7}, {2177,8}, {4865,9}, {5633,8}, {6401,9}, {7681,8}, {8449,9}, {13825,10}, {15361,9}, {19969,10}, {23553,9}, {24065,11}, {30721,10}, {48129,11}, {63489,10}, {81409,11}, {96257,9}, {106497,10}, {107521,12}, {126977,11}, {129025,10}, {130049,9}, {130561,10}, {140289,9}, {140801,10}, {147201,11}, {161793,10}, {212481,11}, {228865,12}, {258049,11}, {457729,13}, {516097,12}, {520193,11}, {588801,12}, {651265,11}, {719873,12}, {782337,11}, {849921,12}, {916481,13}, {1040385,12}, {1439745,13}, {1564673,12}, {1830913,11}, {1832961,13}, {1835009,14}, {MP_SIZE_T_MAX, 0}} - -#define SQR_FFT_TABLE2 {{1,4}, {177,5}, {353,6}, {833,7}, {2177,8}, {4865,9}, {5633,8}, {6401,10}, {7169,9}, {11777,10}, {15361,9}, {19969,10}, {23553,9}, {24065,11}, {30721,10}, {48129,11}, {63489,10}, {65537,9}, {73217,8}, {73601,9}, {80129,10}, {80897,9}, {81665,11}, {96257,9}, {97793,8}, {98817,10}, {99329,12}, {126977,10}, {130049,9}, {131073,10}, {143361,9}, {144385,10}, {151041,9}, {151553,10}, {154113,9}, {154625,10}, {157697,9}, {159745,10}, {195585,9}, {196609,11}, {206849,10}, {207873,11}, {220161,10}, {222209,11}, {228865,12}, {258049,11}, {272385,10}, {274433,11}, {276481,10}, {277505,11}, {280577,10}, {282625,11}, {391169,10}, {397313,11}, {401409,10}, {423937,11}, {457729,13}, {516097,12}, {520193,11}, {588801,12}, {651265,11}, {718849,12}, {782337,11}, {845825,12}, {915457,13}, {1040385,12}, {1437697,13}, {1564673,12}, {1830913,14}, {MP_SIZE_T_MAX, 0}} +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 19 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 8 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 16 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 69 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 32 + +#define MUL_TOOM22_THRESHOLD 10 +#define MUL_TOOM33_THRESHOLD 66 +#define MUL_TOOM44_THRESHOLD 118 +#define MUL_TOOM6H_THRESHOLD 157 +#define MUL_TOOM8H_THRESHOLD 236 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 65 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 76 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 73 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 66 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 16 +#define SQR_TOOM3_THRESHOLD 65 +#define SQR_TOOM4_THRESHOLD 166 +#define SQR_TOOM6_THRESHOLD 226 +#define SQR_TOOM8_THRESHOLD 333 + +#define MULMOD_BNM1_THRESHOLD 9 +#define SQRMOD_BNM1_THRESHOLD 9 + +#define MUL_FFT_MODF_THRESHOLD 212 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 212, 5}, { 7, 4}, { 15, 5}, { 11, 6}, \ + { 6, 5}, { 13, 6}, { 7, 5}, { 15, 6}, \ + { 13, 7}, { 7, 6}, { 15, 7}, { 9, 6}, \ + { 19, 7}, { 13, 8}, { 7, 7}, { 17, 8}, \ + { 9, 7}, { 19, 8}, { 11, 7}, { 23, 8}, \ + { 13, 9}, { 7, 8}, { 17, 9}, { 11,10}, \ + { 7, 9}, { 15, 8}, { 31, 9}, { 19, 8}, \ + { 39, 9}, { 23,10}, { 15, 9}, { 39,10}, \ + { 23, 9}, { 47,11}, { 15,10}, { 31, 9}, \ + { 63,10}, { 39, 9}, { 79,10}, { 47, 9}, \ + { 95, 8}, { 191,11}, { 31,10}, { 63, 9}, \ + { 127, 8}, { 255,10}, { 71, 9}, { 143, 8}, \ + { 287,10}, { 79,11}, { 47, 9}, { 191,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511,10}, { 143, 9}, { 287, 8}, { 575,11}, \ + { 79,10}, { 159, 9}, { 319,10}, { 175, 9}, \ + { 351, 8}, { 703,10}, { 191, 9}, { 383,10}, \ + { 207, 9}, { 415,11}, { 111,10}, { 223,12}, \ + { 63,11}, { 127,10}, { 255, 9}, { 511,11}, \ + { 143,10}, { 287, 9}, { 575,11}, { 159,10}, \ + { 319,11}, { 175,10}, { 351, 9}, { 703,11}, \ + { 191,10}, { 383,11}, { 207,10}, { 415,11}, \ + { 223,10}, { 447,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511,11}, { 287,10}, { 575,12}, \ + { 159,11}, { 351,10}, { 703,12}, { 191,11}, \ + { 383,12}, { 223,11}, { 479,13}, { 127,12}, \ + { 255,11}, { 511,12}, { 287,11}, { 575,12}, \ + { 319,11}, { 639,12}, { 351,11}, { 703,13}, \ + { 191,12}, { 415,11}, { 831,12}, { 447,11}, \ + { 895,12}, { 479,13}, { 255,12}, { 511,11}, \ + { 1023,12}, { 575,11}, { 1151,13}, { 319,12}, \ + { 703,13}, { 383,12}, { 831,13}, { 447,12}, \ + { 895,14}, { 255,13}, { 511,12}, { 1023,13}, \ + { 575,12}, { 1151,13}, { 703,14}, { 383,13}, \ + { 831,12}, { 1663,13}, { 895,15}, { 255,14}, \ + { 511,13}, { 1023,12}, { 2047,13}, { 1151,14}, \ + { 639,13}, { 1407,12}, { 2815,14}, { 767,13}, \ + { 1663,14}, { 895,13}, { 1791,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 160 +#define MUL_FFT_THRESHOLD 1728 + +#define SQR_FFT_MODF_THRESHOLD 208 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 208, 5}, { 7, 4}, { 15, 5}, { 11, 6}, \ + { 6, 5}, { 13, 6}, { 7, 5}, { 15, 6}, \ + { 13, 7}, { 7, 6}, { 15, 7}, { 8, 6}, \ + { 17, 7}, { 17, 8}, { 9, 7}, { 19, 8}, \ + { 11, 7}, { 23, 8}, { 13, 9}, { 7, 8}, \ + { 19, 9}, { 11, 8}, { 25,10}, { 7, 9}, \ + { 15, 8}, { 31, 9}, { 19, 8}, { 39, 9}, \ + { 23,10}, { 15, 9}, { 39,10}, { 23, 9}, \ + { 47,11}, { 15,10}, { 31, 9}, { 67,10}, \ + { 39, 9}, { 79, 8}, { 159,10}, { 47,11}, \ + { 31,10}, { 63, 9}, { 127, 8}, { 255,10}, \ + { 71, 9}, { 143, 8}, { 287, 7}, { 575, 9}, \ + { 159, 8}, { 319,11}, { 47, 9}, { 191,12}, \ + { 31,11}, { 63,10}, { 127, 9}, { 255, 8}, \ + { 511,10}, { 143, 9}, { 287, 8}, { 575,10}, \ + { 159, 9}, { 319, 8}, { 639, 9}, { 351, 8}, \ + { 703,10}, { 191, 9}, { 383,10}, { 207, 9}, \ + { 415,11}, { 111,10}, { 223,12}, { 63,11}, \ + { 127,10}, { 255, 9}, { 511,11}, { 143,10}, \ + { 287, 9}, { 575,11}, { 159,10}, { 319, 9}, \ + { 639,11}, { 175,10}, { 351, 9}, { 703,11}, \ + { 191,10}, { 383,11}, { 207,10}, { 415,11}, \ + { 223,10}, { 447,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511,11}, { 287,10}, { 575,12}, \ + { 159,11}, { 319,10}, { 639,11}, { 351,10}, \ + { 703,12}, { 191,11}, { 383,10}, { 767,11}, \ + { 415,12}, { 223,11}, { 447,13}, { 127,12}, \ + { 255,11}, { 543,12}, { 287,11}, { 575,12}, \ + { 319,11}, { 639,12}, { 351,13}, { 191,12}, \ + { 383,11}, { 767,12}, { 415,11}, { 831,12}, \ + { 479,13}, { 255,10}, { 2047,12}, { 575,13}, \ + { 319,11}, { 1279,12}, { 703,13}, { 383,12}, \ + { 831,13}, { 447,12}, { 895,14}, { 255,13}, \ + { 511,12}, { 1023,13}, { 575,12}, { 1151,13}, \ + { 703,14}, { 383,13}, { 831,12}, { 1663,13}, \ + { 895,15}, { 255,14}, { 511,13}, { 1151,14}, \ + { 639,13}, { 1407,12}, { 2815,14}, { 767,13}, \ + { 1663,14}, { 895,13}, { 1791,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 160 +#define SQR_FFT_THRESHOLD 1600 + +#define MULLO_BASECASE_THRESHOLD 0 +#define MULLO_DC_THRESHOLD 22 +#define MULLO_MUL_N_THRESHOLD 3176 + +#define DC_DIV_QR_THRESHOLD 26 +#define DC_DIVAPPR_Q_THRESHOLD 93 +#define DC_BDIV_QR_THRESHOLD 27 +#define DC_BDIV_Q_THRESHOLD 62 + +#define INV_MULMOD_BNM1_THRESHOLD 100 +#define INV_NEWTON_THRESHOLD 147 +#define INV_APPR_THRESHOLD 108 + +#define BINV_NEWTON_THRESHOLD 165 +#define REDC_1_TO_REDC_2_THRESHOLD 12 +#define REDC_2_TO_REDC_N_THRESHOLD 36 + +#define MU_DIV_QR_THRESHOLD 792 +#define MU_DIVAPPR_Q_THRESHOLD 807 +#define MUPI_DIV_QR_THRESHOLD 67 +#define MU_BDIV_QR_THRESHOLD 654 +#define MU_BDIV_Q_THRESHOLD 792 + +#define MATRIX22_STRASSEN_THRESHOLD 13 +#define HGCD_THRESHOLD 83 +#define GCD_DC_THRESHOLD 198 +#define GCDEXT_DC_THRESHOLD 198 +#define JACOBI_BASE_METHOD 2 + +#define GET_STR_DC_THRESHOLD 15 +#define GET_STR_PRECOMPUTE_THRESHOLD 27 +#define SET_STR_DC_THRESHOLD 254 +#define SET_STR_PRECOMPUTE_THRESHOLD 1122 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/bdiv_dbm1c.asm gmp-5.0.2+dfsg/mpn/x86_64/bdiv_dbm1c.asm --- gmp-4.3.2+dfsg/mpn/x86_64/bdiv_dbm1c.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/bdiv_dbm1c.asm 2011-05-08 09:49:29.000000000 +0000 @@ -23,8 +23,9 @@ C K8,K9: 2.25 C K10: ? C P4: 12.5 -C P6-15 (Core2): 4.0 -C P6-28 (Atom): 20 +C P6 core2: 4.0 +C P6 corei7: 3.8 +C P6 atom: 20 C TODO C * Do proper 4-way feed-in instead of the current epilogue diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/bdiv_q_1.asm gmp-5.0.2+dfsg/mpn/x86_64/bdiv_q_1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/bdiv_q_1.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/bdiv_q_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,153 @@ +dnl AMD64 mpn_bdiv_q_1, mpn_pi1_bdiv_q_1 -- schoolbook Hensel division by +dnl 1-limb divisor, returning quotient only. + +dnl Copyright 2001, 2002, 2004, 2005, 2006, 2009 Free Software Foundation, +dnl Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C K8,K9: 10 +C K10: 10 +C P4: 33 +C P6 core2: 13.25 +C P6 corei7: 14 +C P6 atom: 42 + + +C INPUT PARAMETERS +C rp rdi +C up rsi +C n rdx +C d rcx +C di r8 just mpn_pi1_bdiv_q_1 +C shift r9 just mpn_pi1_bdiv_q_1 + + +ASM_START() + TEXT + ALIGN(16) +PROLOGUE(mpn_bdiv_q_1) + push %rbx + + mov %rcx, %rax + xor R32(%rcx), R32(%rcx) C shift count + mov %rdx, %r10 + + bt $0, R32(%rax) + jnc L(evn) C skip bsfq unless divisor is even + +L(odd): mov %rax, %rbx + shr R32(%rax) + and $127, R32(%rax) C d/2, 7 bits + +ifdef(`PIC',` + mov binvert_limb_table@GOTPCREL(%rip), %rdx +',` + movabs $binvert_limb_table, %rdx +') + + movzbl (%rdx,%rax), R32(%rax) C inv 8 bits + + mov %rbx, %r11 C d without twos + + lea (%rax,%rax), R32(%rdx) C 2*inv + imul R32(%rax), R32(%rax) C inv*inv + imul R32(%rbx), R32(%rax) C inv*inv*d + sub R32(%rax), R32(%rdx) C inv = 2*inv - inv*inv*d, 16 bits + + lea (%rdx,%rdx), R32(%rax) C 2*inv + imul R32(%rdx), R32(%rdx) C inv*inv + imul R32(%rbx), R32(%rdx) C inv*inv*d + sub R32(%rdx), R32(%rax) C inv = 2*inv - inv*inv*d, 32 bits + + lea (%rax,%rax), %r8 C 2*inv + imul %rax, %rax C inv*inv + imul %rbx, %rax C inv*inv*d + sub %rax, %r8 C inv = 2*inv - inv*inv*d, 64 bits + + jmp L(com) + +L(evn): bsf %rax, %rcx + shr R8(%rcx), %rax + jmp L(odd) +EPILOGUE() + +PROLOGUE(mpn_pi1_bdiv_q_1) + push %rbx + + mov %rcx, %r11 C d + mov %rdx, %r10 C n + mov %r9, %rcx C shift +L(com): + mov (%rsi), %rax C up[0] + + dec %r10 + jz L(one) + + mov 8(%rsi), %rdx C up[1] + lea (%rsi,%r10,8), %rsi C up end + lea (%rdi,%r10,8), %rdi C rp end + neg %r10 C -n + + shrd R8(%rcx), %rdx, %rax + + xor R32(%rbx), R32(%rbx) + jmp L(ent) + + ALIGN(8) +L(top): + C rax q + C rbx carry bit, 0 or 1 + C rcx shift + C rdx + C rsi up end + C rdi rp end + C r10 counter, limbs, negative + + mul %r11 C carry limb in rdx + mov (%rsi,%r10,8), %rax + mov 8(%rsi,%r10,8), %r9 + shrd R8(%rcx), %r9, %rax + nop + sub %rbx, %rax C apply carry bit + setc R8(%rbx) + sub %rdx, %rax C apply carry limb + adc $0, %rbx +L(ent): imul %r8, %rax + mov %rax, (%rdi,%r10,8) + inc %r10 + jnz L(top) + + mul %r11 C carry limb in rdx + mov (%rsi), %rax C up high limb + shr R8(%rcx), %rax + sub %rbx, %rax C apply carry bit + sub %rdx, %rax C apply carry limb + imul %r8, %rax + mov %rax, (%rdi) + pop %rbx + ret + +L(one): shr R8(%rcx), %rax + imul %r8, %rax + mov %rax, (%rdi) + pop %rbx + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/com.asm gmp-5.0.2+dfsg/mpn/x86_64/com.asm --- gmp-4.3.2+dfsg/mpn/x86_64/com.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/com.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,77 @@ +dnl AMD64 mpn_com. + +dnl Copyright 2004, 2005, 2006 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C K8,K9: 1.25 +C K10: 1.25 +C P4: 2.78 +C P6-15: 1.1 + +C INPUT PARAMETERS +define(`rp',`%rdi') +define(`up',`%rsi') +define(`n',`%rdx') + + +ASM_START() + TEXT + ALIGN(32) +PROLOGUE(mpn_com) + movq (up), %r8 + movl %edx, %eax + leaq (up,n,8), up + leaq (rp,n,8), rp + negq n + andl $3, %eax + je L(b00) + cmpl $2, %eax + jc L(b01) + je L(b10) + +L(b11): notq %r8 + movq %r8, (rp,n,8) + decq n + jmp L(e11) +L(b10): addq $-2, n + jmp L(e10) + .byte 0x90,0x90,0x90,0x90,0x90,0x90 +L(b01): notq %r8 + movq %r8, (rp,n,8) + incq n + jz L(ret) + +L(oop): movq (up,n,8), %r8 +L(b00): movq 8(up,n,8), %r9 + notq %r8 + notq %r9 + movq %r8, (rp,n,8) + movq %r9, 8(rp,n,8) +L(e11): movq 16(up,n,8), %r8 +L(e10): movq 24(up,n,8), %r9 + notq %r8 + notq %r9 + movq %r8, 16(rp,n,8) + movq %r9, 24(rp,n,8) + addq $4, n + jnc L(oop) +L(ret): ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/com_n.asm gmp-5.0.2+dfsg/mpn/x86_64/com_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/com_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/com_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,77 +0,0 @@ -dnl AMD64 mpn_com_n. - -dnl Copyright 2004, 2005, 2006 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C cycles/limb -C K8,K9: 1.25 -C K10: 1.25 -C P4: 2.78 -C P6-15: 1.1 - -C INPUT PARAMETERS -define(`rp',`%rdi') -define(`up',`%rsi') -define(`n',`%rdx') - - -ASM_START() - TEXT - ALIGN(32) -PROLOGUE(mpn_com_n) - movq (up), %r8 - movl %edx, %eax - leaq (up,n,8), up - leaq (rp,n,8), rp - negq n - andl $3, %eax - je L(b00) - cmpl $2, %eax - jc L(b01) - je L(b10) - -L(b11): notq %r8 - movq %r8, (rp,n,8) - decq n - jmp L(e11) -L(b10): addq $-2, n - jmp L(e10) - .byte 0x90,0x90,0x90,0x90,0x90,0x90 -L(b01): notq %r8 - movq %r8, (rp,n,8) - incq n - jz L(ret) - -L(oop): movq (up,n,8), %r8 -L(b00): movq 8(up,n,8), %r9 - notq %r8 - notq %r9 - movq %r8, (rp,n,8) - movq %r9, 8(rp,n,8) -L(e11): movq 16(up,n,8), %r8 -L(e10): movq 24(up,n,8), %r9 - notq %r8 - notq %r9 - movq %r8, 16(rp,n,8) - movq %r9, 24(rp,n,8) - addq $4, n - jnc L(oop) -L(ret): ret -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/copyd.asm gmp-5.0.2+dfsg/mpn/x86_64/copyd.asm --- gmp-4.3.2+dfsg/mpn/x86_64/copyd.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/copyd.asm 2011-05-08 09:49:29.000000000 +0000 @@ -24,7 +24,8 @@ C K8,K9: 1 C K10: 1 C P4: 2.8 -C P6-15: 1.2 +C P6 core2: 1.2 +C P6 corei7: 1 C INPUT PARAMETERS diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/core2/aorsmul_1.asm gmp-5.0.2+dfsg/mpn/x86_64/core2/aorsmul_1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/core2/aorsmul_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/core2/aorsmul_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl x86-64 mpn_addmul_1 and mpn_submul_1, optimized for "Core 2". -dnl Copyright 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. +dnl Copyright 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -23,7 +23,8 @@ C K8,K9: 4 C K10: 4 C P4: ? -C P6-15: 4.3-4.7 (fluctuating) +C P6 core2: 4.3-4.5 (fluctuating) +C P6 corei7: 5 C INPUT PARAMETERS define(`rp', `%rdi') @@ -46,98 +47,83 @@ TEXT ALIGN(16) PROLOGUE(func) - push %r15 - push %r12 - push %r13 - lea (%rdx), %r15 - neg %r15 + push %rbx + push %rbp + lea (%rdx), %rbx + neg %rbx mov (up), %rax + mov (rp), %r10 - bt $0, %r15 - jc L(odd) - - lea (rp,%rdx,8), rp + lea -16(rp,%rdx,8), rp lea (up,%rdx,8), up mul %rcx - lea (%rax), %r11 - mov 8(up,%r15,8), %rax - mov (rp,%r15,8), %r13 - lea (%rdx), %r12 + bt $0, R32(%rbx) + jc L(odd) - add $2, %r15 + lea (%rax), %r11 + mov 8(up,%rbx,8), %rax + lea (%rdx), %rbp + mul %rcx + add $2, %rbx jns L(n2) - mul %rcx lea (%rax), %r8 - mov (up,%r15,8), %rax - mov -8(rp,%r15,8), %r10 + mov (up,%rbx,8), %rax lea (%rdx), %r9 - jmp L(m) + jmp L(mid) -L(odd): lea (rp,%rdx,8), rp - lea (up,%rdx,8), up - mul %rcx - add $1, %r15 +L(odd): add $1, %rbx jns L(n1) -L(gt1): lea (%rax), %r8 - mov (up,%r15,8), %rax - mov -8(rp,%r15,8), %r10 + lea (%rax), %r8 + mov (up,%rbx,8), %rax lea (%rdx), %r9 mul %rcx lea (%rax), %r11 - mov 8(up,%r15,8), %rax - mov (rp,%r15,8), %r13 - lea (%rdx), %r12 - add $2, %r15 - jns L(end) + mov 8(up,%rbx,8), %rax + lea (%rdx), %rbp + jmp L(e) ALIGN(16) L(top): mul %rcx ADDSUB %r8, %r10 lea (%rax), %r8 - mov 0(up,%r15,8), %rax + mov (up,%rbx,8), %rax adc %r9, %r11 - mov %r10, -24(rp,%r15,8) - mov -8(rp,%r15,8), %r10 + mov %r10, -8(rp,%rbx,8) + mov (rp,%rbx,8), %r10 lea (%rdx), %r9 - adc $0, %r12 -L(m): mul %rcx - ADDSUB %r11, %r13 + adc $0, %rbp +L(mid): mul %rcx + ADDSUB %r11, %r10 lea (%rax), %r11 - mov 8(up,%r15,8), %rax - adc %r12, %r8 - mov %r13, -16(rp,%r15,8) - mov 0(rp,%r15,8), %r13 - lea (%rdx), %r12 + mov 8(up,%rbx,8), %rax + adc %rbp, %r8 + mov %r10, (rp,%rbx,8) + mov 8(rp,%rbx,8), %r10 + lea (%rdx), %rbp adc $0, %r9 - - add $2, %r15 +L(e): add $2, %rbx js L(top) -L(end): mul %rcx + mul %rcx ADDSUB %r8, %r10 adc %r9, %r11 - mov %r10, -24(rp,%r15,8) - mov -8(rp,%r15,8), %r10 - adc $0, %r12 -L(r): ADDSUB %r11, %r13 - adc %r12, %rax - mov %r13, -16(rp,%r15,8) + mov %r10, -8(rp) + adc $0, %rbp +L(n2): mov (rp), %r10 + ADDSUB %r11, %r10 + adc %rbp, %rax + mov %r10, (rp) adc $0, %rdx -L(x): ADDSUB %rax, %r10 - mov %r10, -8(rp,%r15,8) - mov $0, %eax +L(n1): mov 8(rp), %r10 + ADDSUB %rax, %r10 + mov %r10, 8(rp) + mov R32(%rbx), R32(%rax) C zero rax adc %rdx, %rax -L(ret): pop %r13 - pop %r12 - pop %r15 + pop %rbp + pop %rbx ret -L(n2): mul %rcx - mov -8(rp,%r15,8), %r10 - jmp L(r) -L(n1): mov -8(rp,%r15,8), %r10 - jmp L(x) EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/core2/aors_n.asm gmp-5.0.2+dfsg/mpn/x86_64/core2/aors_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/core2/aors_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/core2/aors_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -24,7 +24,8 @@ C K8,K9: 2.25 C K10: 2 C P4: 10 -C P6-15: 2.05 +C P6 core2: 2.05 +C P6 corei7: 2.3 C INPUT PARAMETERS define(`rp', `%rdi') diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/core2/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86_64/core2/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86_64/core2/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/core2/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ -/* "Core 2" gmp-mparam.h -- Compiler/machine parameter header file. +/* Core 2 gmp-mparam.h -- Compiler/machine parameter header file. Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -2008, 2009 Free Software Foundation, Inc. +2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,61 +18,171 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 -/* 2133 MHz "Core 2" / 65nm / 4096 Kibyte cache / socket 775 */ +/* 2133 MHz Core 2 (65nm) */ -/* Generated by tuneup.c, 2009-01-14, gcc 4.2 */ - -#define MUL_KARATSUBA_THRESHOLD 18 -#define MUL_TOOM3_THRESHOLD 65 -#define MUL_TOOM44_THRESHOLD 166 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_KARATSUBA_THRESHOLD 32 -#define SQR_TOOM3_THRESHOLD 97 -#define SQR_TOOM4_THRESHOLD 163 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 20 -#define MULLOW_MUL_N_THRESHOLD 232 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 60 -#define POWM_THRESHOLD 77 - -#define MATRIX22_STRASSEN_THRESHOLD 25 -#define HGCD_THRESHOLD 140 -#define GCD_DC_THRESHOLD 691 -#define GCDEXT_DC_THRESHOLD 760 -#define JACOBI_BASE_METHOD 1 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 3 -#define MOD_1_2_THRESHOLD 5 -#define MOD_1_4_THRESHOLD 20 -#define USE_PREINV_DIVREM_1 1 /* native */ -#define USE_PREINV_MOD_1 1 -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 10 -#define GET_STR_PRECOMPUTE_THRESHOLD 16 -#define SET_STR_DC_THRESHOLD 668 -#define SET_STR_PRECOMPUTE_THRESHOLD 2052 - -#define MUL_FFT_TABLE { 336, 672, 1600, 2816, 7168, 20480, 81920, 327680, 786432, 0 } -#define MUL_FFT_MODF_THRESHOLD 352 -#define MUL_FFT_THRESHOLD 3456 - -#define SQR_FFT_TABLE { 336, 736, 1728, 3328, 7168, 20480, 81920, 327680, 0 } -#define SQR_FFT_MODF_THRESHOLD 352 -#define SQR_FFT_THRESHOLD 2432 - -/* Generated 2009-01-12, gcc 4.2 */ - -#define MUL_FFT_TABLE2 {{1,4}, {273,5}, {545,6}, {1217,7}, {3201,8}, {6913,9}, {7681,8}, {8449,9}, {9729,8}, {10497,9}, {13825,10}, {15361,9}, {19969,10}, {23553,9}, {28161,11}, {30721,10}, {31745,9}, {34305,10}, {39937,9}, {42497,10}, {56321,11}, {63489,10}, {81409,11}, {92161,10}, {93185,11}, {96257,12}, {126977,11}, {131073,10}, {138241,11}, {167937,10}, {169473,11}, {169985,10}, {172033,11}, {195585,9}, {196097,11}, {198657,10}, {208897,11}, {217089,12}, {258049,11}, {261121,9}, {262657,10}, {275457,11}, {302081,10}, {307201,11}, {331777,12}, {389121,11}, {425985,13}, {516097,12}, {520193,11}, {598017,12}, {610305,11}, {614401,12}, {651265,11}, {653313,10}, {654337,11}, {673793,10}, {674817,11}, {677889,10}, {679937,11}, {718849,10}, {719873,12}, {782337,11}, {850945,12}, {913409,11}, {925697,13}, {1040385,12}, {1044481,11}, {1112065,12}, {1175553,11}, {1244161,12}, {1306625,11}, {1310721,12}, {1327105,11}, {1347585,12}, {1355777,11}, {1366017,12}, {1439745,13}, {1564673,12}, {1835009,14}, {1900545,12}, {1904641,14}, {2080769,13}, {2088961,12}, {2488321,13}, {2613249,12}, {2879489,13}, {2932737,12}, {2940929,13}, {3137537,12}, {3403777,13}, {3661825,12}, {3928065,14}, {4177921,13}, {4186113,12}, {4452353,13}, {4710401,12}, {4978689,13}, {5234689,12}, {5500929,13}, {5758977,14}, {6275073,13}, {7856129,15}, {8355841,14}, {8372225,13}, {9957377,14}, {MP_SIZE_T_MAX, 0}} - -#define SQR_FFT_TABLE2 {{1,4}, {241,5}, {545,6}, {1345,7}, {3201,8}, {6913,9}, {7681,8}, {8961,9}, {9729,8}, {10497,9}, {13825,10}, {15361,9}, {19969,10}, {23553,9}, {28161,11}, {30721,10}, {31745,9}, {34305,10}, {55297,11}, {63489,10}, {80897,11}, {94209,10}, {97281,12}, {126977,11}, {129025,9}, {130049,10}, {138753,11}, {162817,9}, {164353,11}, {170497,10}, {178177,11}, {183297,10}, {184321,11}, {194561,10}, {208897,12}, {219137,11}, {221185,12}, {258049,11}, {261121,9}, {261633,10}, {267777,9}, {268289,11}, {270337,10}, {274945,9}, {276481,10}, {278529,11}, {292865,9}, {293377,10}, {295937,9}, {296449,10}, {306177,9}, {309249,10}, {310273,11}, {328705,12}, {331777,11}, {335873,12}, {344065,11}, {346113,12}, {352257,11}, {356353,12}, {389121,11}, {395265,10}, {398337,11}, {419841,10}, {421889,11}, {423937,13}, {516097,12}, {520193,11}, {546817,10}, {550913,11}, {561153,10}, {563201,11}, {579585,10}, {585729,11}, {621569,12}, {636929,11}, {638977,12}, {651265,11}, {714753,10}, {716801,11}, {718849,12}, {782337,11}, {849921,12}, {913409,11}, {954369,13}, {1040385,12}, {1044481,11}, {1112065,12}, {1175553,11}, {1243137,12}, {1306625,11}, {1374209,12}, {1437697,13}, {1564673,12}, {1961985,14}, {2080769,13}, {2088961,12}, {2486273,13}, {2613249,12}, {2879489,13}, {3137537,12}, {3272705,13}, {3661825,12}, {3928065,14}, {4177921,13}, {4186113,12}, {4452353,13}, {4710401,12}, {4976641,13}, {5234689,12}, {5320705,13}, {5324801,12}, {5447681,13}, {5455873,12}, {5500929,13}, {5758977,14}, {6275073,13}, {6283265,12}, {6549505,13}, {7856129,15}, {8355841,14}, {8372225,13}, {9953281,14}, {MP_SIZE_T_MAX, 0}} +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 5 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 4 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 14 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 10 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 26 + +#define MUL_TOOM22_THRESHOLD 23 +#define MUL_TOOM33_THRESHOLD 65 +#define MUL_TOOM44_THRESHOLD 183 +#define MUL_TOOM6H_THRESHOLD 254 +#define MUL_TOOM8H_THRESHOLD 381 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 69 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 122 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 73 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 74 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 26 +#define SQR_TOOM3_THRESHOLD 97 +#define SQR_TOOM4_THRESHOLD 148 +#define SQR_TOOM6_THRESHOLD 270 +#define SQR_TOOM8_THRESHOLD 296 + +#define MULMOD_BNM1_THRESHOLD 12 +#define SQRMOD_BNM1_THRESHOLD 14 + +#define MUL_FFT_MODF_THRESHOLD 380 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 380, 5}, { 15, 6}, { 8, 5}, { 17, 6}, \ + { 9, 5}, { 19, 6}, { 19, 7}, { 10, 6}, \ + { 21, 7}, { 11, 6}, { 23, 7}, { 13, 6}, \ + { 27, 7}, { 21, 8}, { 11, 7}, { 23, 8}, \ + { 13, 7}, { 27, 8}, { 15, 7}, { 31, 8}, \ + { 17, 7}, { 35, 8}, { 19, 7}, { 39, 8}, \ + { 21, 9}, { 11, 8}, { 27, 9}, { 15, 8}, \ + { 35, 9}, { 19, 8}, { 41, 9}, { 23, 8}, \ + { 47, 9}, { 27,10}, { 15, 9}, { 43,10}, \ + { 23, 9}, { 55,11}, { 15,10}, { 31, 9}, \ + { 67,10}, { 39, 9}, { 79,10}, { 55,11}, \ + { 31, 9}, { 127,10}, { 71, 8}, { 287,10}, \ + { 79,11}, { 47,12}, { 31,11}, { 63, 9}, \ + { 255,10}, { 135, 9}, { 271,11}, { 79, 9}, \ + { 319,10}, { 175,11}, { 95,10}, { 191, 9}, \ + { 383,11}, { 111,12}, { 63,11}, { 127,10}, \ + { 271, 9}, { 543,11}, { 143,10}, { 287,11}, \ + { 159,10}, { 319, 9}, { 639,11}, { 175,10}, \ + { 351,12}, { 95,11}, { 191,10}, { 383,11}, \ + { 207,10}, { 415,13}, { 63,12}, { 127,11}, \ + { 271,10}, { 543,11}, { 287,12}, { 159,11}, \ + { 319,10}, { 671,11}, { 351,12}, { 191,11}, \ + { 415,12}, { 223,11}, { 447,10}, { 895,11}, \ + { 479,13}, { 127,12}, { 287,11}, { 607,12}, \ + { 319,11}, { 671,12}, { 351,13}, { 191,12}, \ + { 415,11}, { 831,10}, { 1663,12}, { 479,14}, \ + { 127,13}, { 255,12}, { 543,11}, { 1087,12}, \ + { 607,13}, { 319,12}, { 703,13}, { 383,12}, \ + { 767,10}, { 3071,12}, { 831,13}, { 447,12}, \ + { 959,14}, { 255,13}, { 511,12}, { 1023,13}, \ + { 575,12}, { 1151,11}, { 2303,13}, { 639,12}, \ + { 1343,13}, { 703,14}, { 383,13}, { 831,12}, \ + { 1727,13}, { 959,15}, { 255,14}, { 511,13}, \ + { 1087,12}, { 2175,13}, { 1215,14}, { 639,13}, \ + { 1343,12}, { 2687,13}, { 1407,12}, { 2815,14}, \ + { 767,13}, { 1663,14}, { 895,13}, { 1919,15}, \ + { 511,14}, { 1023,13}, { 2175,14}, { 1151,13}, \ + { 2431,12}, { 4863,13}, { 2495,14}, { 1279,13}, \ + { 2687,14}, { 1407,15}, { 767,14}, { 1663,13}, \ + { 3327,12}, { 6655,13}, { 3455,12}, { 6911,14}, \ + { 16384,15}, { 32768,16}, { 65536,17}, { 131072,18}, \ + { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ + {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 170 +#define MUL_FFT_THRESHOLD 4736 + +#define SQR_FFT_MODF_THRESHOLD 308 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 308, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 21, 7}, { 11, 6}, { 23, 7}, { 12, 6}, \ + { 25, 7}, { 21, 8}, { 11, 7}, { 24, 8}, \ + { 13, 7}, { 27, 8}, { 15, 7}, { 31, 8}, \ + { 21, 9}, { 11, 8}, { 27, 9}, { 15, 8}, \ + { 35, 9}, { 19, 8}, { 41, 9}, { 23, 8}, \ + { 47, 9}, { 27,10}, { 15, 9}, { 39,10}, \ + { 23, 9}, { 59,11}, { 15,10}, { 31, 8}, \ + { 125, 9}, { 67,10}, { 39, 9}, { 79,10}, \ + { 47, 9}, { 103,10}, { 79, 9}, { 159,10}, \ + { 87, 9}, { 175, 8}, { 351,11}, { 47,10}, \ + { 95,11}, { 63,10}, { 127, 8}, { 511, 9}, \ + { 271, 8}, { 543,11}, { 79,10}, { 175,11}, \ + { 95,10}, { 191, 9}, { 415,12}, { 63,11}, \ + { 127,10}, { 255,11}, { 143,10}, { 287, 9}, \ + { 575,11}, { 159,10}, { 319,11}, { 175,10}, \ + { 351,12}, { 95,11}, { 191,10}, { 383,11}, \ + { 207,10}, { 415,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511, 9}, { 1023,10}, { 543,11}, \ + { 287,10}, { 575,11}, { 303,12}, { 159,11}, \ + { 319,10}, { 639,11}, { 351,12}, { 191,11}, \ + { 383,10}, { 767,11}, { 415,10}, { 831,12}, \ + { 223,11}, { 479,13}, { 127,12}, { 255,11}, \ + { 543,12}, { 287,11}, { 575,12}, { 319,11}, \ + { 639,12}, { 351,13}, { 191,12}, { 383,11}, \ + { 767,12}, { 415,11}, { 831,12}, { 447,11}, \ + { 895,12}, { 479,14}, { 127,13}, { 255,12}, \ + { 543,11}, { 1087,12}, { 607,13}, { 319,12}, \ + { 639,11}, { 1279,12}, { 703,13}, { 383,12}, \ + { 831,13}, { 447,12}, { 959,14}, { 255,13}, \ + { 511,12}, { 1087,13}, { 575,12}, { 1215,13}, \ + { 639,12}, { 1279,13}, { 703,14}, { 383,13}, \ + { 767,12}, { 1535,13}, { 831,12}, { 1663,13}, \ + { 959,15}, { 255,14}, { 511,13}, { 1087,12}, \ + { 2175,13}, { 1215,14}, { 639,13}, { 1343,12}, \ + { 2687,13}, { 1407,12}, { 2815,14}, { 767,13}, \ + { 1535,12}, { 3071,13}, { 1663,14}, { 895,13}, \ + { 1791,15}, { 511,14}, { 1023,13}, { 2175,14}, \ + { 1151,13}, { 2303,12}, { 4607,13}, { 2431,12}, \ + { 4863,14}, { 1279,13}, { 2687,14}, { 1407,13}, \ + { 2815,15}, { 767,14}, { 1535,13}, { 3071,14}, \ + { 1663,13}, { 3327,12}, { 6655,13}, { 3455,12}, \ + { 6911,14}, { 1791,16}, { 65536,17}, { 131072,18}, \ + { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ + {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 178 +#define SQR_FFT_THRESHOLD 3520 + +#define MULLO_BASECASE_THRESHOLD 3 +#define MULLO_DC_THRESHOLD 20 +#define MULLO_MUL_N_THRESHOLD 8648 + +#define DC_DIV_QR_THRESHOLD 52 +#define DC_DIVAPPR_Q_THRESHOLD 167 +#define DC_BDIV_QR_THRESHOLD 57 +#define DC_BDIV_Q_THRESHOLD 156 + +#define INV_MULMOD_BNM1_THRESHOLD 126 +#define INV_NEWTON_THRESHOLD 198 +#define INV_APPR_THRESHOLD 178 + +#define BINV_NEWTON_THRESHOLD 260 +#define REDC_1_TO_REDC_2_THRESHOLD 10 +#define REDC_2_TO_REDC_N_THRESHOLD 63 + +#define MU_DIV_QR_THRESHOLD 1334 +#define MU_DIVAPPR_Q_THRESHOLD 1334 +#define MUPI_DIV_QR_THRESHOLD 81 +#define MU_BDIV_QR_THRESHOLD 1037 +#define MU_BDIV_Q_THRESHOLD 1334 + +#define MATRIX22_STRASSEN_THRESHOLD 18 +#define HGCD_THRESHOLD 138 +#define GCD_DC_THRESHOLD 465 +#define GCDEXT_DC_THRESHOLD 365 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 9 +#define GET_STR_PRECOMPUTE_THRESHOLD 20 +#define SET_STR_DC_THRESHOLD 552 +#define SET_STR_PRECOMPUTE_THRESHOLD 1790 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/core2/lshift.asm gmp-5.0.2+dfsg/mpn/x86_64/core2/lshift.asm --- gmp-4.3.2+dfsg/mpn/x86_64/core2/lshift.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/core2/lshift.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl x86-64 mpn_lshift optimized for "Core 2". -dnl Copyright 2007 Free Software Foundation, Inc. +dnl Copyright 2007, 2009 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl @@ -24,7 +24,8 @@ C K8,K9: 4.25 C K10: 4.25 C P4: 14.7 -C P6-15: 1.27 +C P6 core2: 1.27 +C P6 corei7: 1.5 C INPUT PARAMETERS @@ -111,8 +112,8 @@ mov %r9, -16(rp) L(00): shld %cl, %r11, %r10 mov -24(up), %r9 - lea -32(up), up mov %r10, -24(rp) + add $-32, up lea -32(rp), rp sub $4, n jnc L(top) diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/core2/lshiftc.asm gmp-5.0.2+dfsg/mpn/x86_64/core2/lshiftc.asm --- gmp-4.3.2+dfsg/mpn/x86_64/core2/lshiftc.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/core2/lshiftc.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,138 @@ +dnl x86-64 mpn_lshiftc optimized for "Core 2". + +dnl Copyright 2007, 2009 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundation; either version 3 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C K8,K9: ? +C K10: ? +C P4: ? +C P6 core2: 1.5 +C P6 corei7: 1.75 + + +C INPUT PARAMETERS +define(`rp', `%rdi') +define(`up', `%rsi') +define(`n', `%rdx') +define(`cnt', `%cl') + +ASM_START() + TEXT + ALIGN(16) +PROLOGUE(mpn_lshiftc) + lea -8(rp,n,8), rp + lea -8(up,n,8), up + + mov %edx, %eax + and $3, %eax + jne L(nb00) +L(b00): C n = 4, 8, 12, ... + mov (up), %r10 + mov -8(up), %r11 + xor %eax, %eax + shld %cl, %r10, %rax + mov -16(up), %r8 + lea 24(rp), rp + sub $4, n + jmp L(00) + +L(nb00):C n = 1, 5, 9, ... + cmp $2, %eax + jae L(nb01) +L(b01): mov (up), %r9 + xor %eax, %eax + shld %cl, %r9, %rax + sub $2, n + jb L(le1) + mov -8(up), %r10 + mov -16(up), %r11 + lea -8(up), up + lea 16(rp), rp + jmp L(01) +L(le1): shl %cl, %r9 + not %r9 + mov %r9, (rp) + ret + +L(nb01):C n = 2, 6, 10, ... + jne L(b11) +L(b10): mov (up), %r8 + mov -8(up), %r9 + xor %eax, %eax + shld %cl, %r8, %rax + sub $3, n + jb L(le2) + mov -16(up), %r10 + lea -16(up), up + lea 8(rp), rp + jmp L(10) +L(le2): shld %cl, %r9, %r8 + not %r8 + mov %r8, (rp) + shl %cl, %r9 + not %r9 + mov %r9, -8(rp) + ret + + ALIGN(16) C performance critical! +L(b11): C n = 3, 7, 11, ... + mov (up), %r11 + mov -8(up), %r8 + xor %eax, %eax + shld %cl, %r11, %rax + mov -16(up), %r9 + lea -24(up), up + sub $4, n + jb L(end) + + ALIGN(16) +L(top): shld %cl, %r8, %r11 + mov (up), %r10 + not %r11 + mov %r11, (rp) +L(10): shld %cl, %r9, %r8 + mov -8(up), %r11 + not %r8 + mov %r8, -8(rp) +L(01): shld %cl, %r10, %r9 + mov -16(up), %r8 + not %r9 + mov %r9, -16(rp) +L(00): shld %cl, %r11, %r10 + mov -24(up), %r9 + not %r10 + mov %r10, -24(rp) + add $-32, up + lea -32(rp), rp + sub $4, n + jnc L(top) + +L(end): shld %cl, %r8, %r11 + not %r11 + mov %r11, (rp) + shld %cl, %r9, %r8 + not %r8 + mov %r8, -8(rp) + shl %cl, %r9 + not %r9 + mov %r9, -16(rp) + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/core2/popcount.asm gmp-5.0.2+dfsg/mpn/x86_64/core2/popcount.asm --- gmp-4.3.2+dfsg/mpn/x86_64/core2/popcount.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/core2/popcount.asm 2011-05-08 09:49:29.000000000 +0000 @@ -20,4 +20,5 @@ include(`../config.m4') +MULFUNC_PROLOGUE(mpn_popcount) include_mpn(`x86/pentium4/sse2/popcount.asm') diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/core2/rshift.asm gmp-5.0.2+dfsg/mpn/x86_64/core2/rshift.asm --- gmp-4.3.2+dfsg/mpn/x86_64/core2/rshift.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/core2/rshift.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl x86-64 mpn_rshift optimized for "Core 2". -dnl Copyright 2007 Free Software Foundation, Inc. +dnl Copyright 2007, 2009 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl @@ -24,7 +24,8 @@ C K8,K9: 4.25 C K10: 4.25 C P4: 14.7 -C P6-15: 1.27 +C P6 core2: 1.27 +C P6 corei7: 1.5 C INPUT PARAMETERS @@ -109,8 +110,8 @@ mov %r9, 16(rp) L(00): shrd %cl, %r11, %r10 mov 16(up), %r9 - lea 32(up), up mov %r10, 24(rp) + add $32, up lea 32(rp), rp sub $4, n jnc L(top) diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/corei/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86_64/corei/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86_64/corei/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/corei/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,195 @@ +/* Core i gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +2008, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define GMP_LIMB_BITS 64 +#define BYTES_PER_MP_LIMB 8 + +/* 2667 MHz Core i7 */ + +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 6 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 5 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 12 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 11 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 18 + +#define MUL_TOOM22_THRESHOLD 18 +#define MUL_TOOM33_THRESHOLD 57 +#define MUL_TOOM44_THRESHOLD 166 +#define MUL_TOOM6H_THRESHOLD 226 +#define MUL_TOOM8H_THRESHOLD 333 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 97 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 108 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 98 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 113 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 30 +#define SQR_TOOM3_THRESHOLD 105 +#define SQR_TOOM4_THRESHOLD 250 +#define SQR_TOOM6_THRESHOLD 366 +#define SQR_TOOM8_THRESHOLD 502 + +#define MULMOD_BNM1_THRESHOLD 11 +#define SQRMOD_BNM1_THRESHOLD 16 + +#define MUL_FFT_MODF_THRESHOLD 396 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 396, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 10, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ + { 21, 7}, { 11, 6}, { 23, 7}, { 21, 8}, \ + { 11, 7}, { 24, 8}, { 13, 7}, { 27, 8}, \ + { 15, 7}, { 31, 8}, { 21, 9}, { 11, 8}, \ + { 27, 9}, { 15, 8}, { 33, 9}, { 19, 8}, \ + { 39, 9}, { 23, 8}, { 47, 9}, { 27,10}, \ + { 15, 9}, { 39,10}, { 23, 9}, { 51,11}, \ + { 15,10}, { 31, 9}, { 67,10}, { 39, 9}, \ + { 79,10}, { 47, 9}, { 95,10}, { 55,11}, \ + { 31,10}, { 79,11}, { 47,10}, { 95,12}, \ + { 31,11}, { 63,10}, { 135,11}, { 79,10}, \ + { 159, 9}, { 319,11}, { 95,10}, { 191, 9}, \ + { 383,12}, { 63,11}, { 127,10}, { 255, 9}, \ + { 543,11}, { 143,10}, { 287, 9}, { 607,10}, \ + { 319,12}, { 95,11}, { 191,10}, { 383,13}, \ + { 63,12}, { 127,11}, { 255,10}, { 511, 9}, \ + { 1023,10}, { 543,11}, { 287,10}, { 575,11}, \ + { 303,12}, { 159,11}, { 319,10}, { 639,11}, \ + { 335,10}, { 671,11}, { 351,10}, { 703,11}, \ + { 367,12}, { 191,11}, { 383,10}, { 767,11}, \ + { 415,10}, { 831,11}, { 447,10}, { 895,13}, \ + { 127,11}, { 511,10}, { 1023,11}, { 543,12}, \ + { 287,11}, { 575,10}, { 1151,11}, { 607,12}, \ + { 319,11}, { 671,12}, { 351,11}, { 703,10}, \ + { 1407,12}, { 383,11}, { 767,12}, { 415,11}, \ + { 831,10}, { 1663,12}, { 447,11}, { 895,12}, \ + { 479,14}, { 127,12}, { 511,11}, { 1023,12}, \ + { 543,11}, { 1087,12}, { 607,13}, { 319,12}, \ + { 671,11}, { 1343,12}, { 703,11}, { 1407,12}, \ + { 735,13}, { 383,12}, { 831,11}, { 1663,13}, \ + { 447,12}, { 959,11}, { 1919,14}, { 255,13}, \ + { 511,12}, { 1087,13}, { 575,12}, { 1215,11}, \ + { 2431,13}, { 639,12}, { 1343,13}, { 703,12}, \ + { 1407,14}, { 383,13}, { 831,12}, { 1663,13}, \ + { 959,12}, { 1919,14}, { 511,13}, { 1087,12}, \ + { 2175,13}, { 1215,12}, { 2431,14}, { 639,13}, \ + { 1343,12}, { 2687,13}, { 1407,12}, { 2815,13}, \ + { 1471,14}, { 767,13}, { 1663,14}, { 895,13}, \ + { 1919,15}, { 511,14}, { 1023,13}, { 2175,14}, \ + { 1151,13}, { 2431,12}, { 4863,14}, { 1279,13}, \ + { 2687,14}, { 1407,13}, { 2943,15}, { 767,14}, \ + { 1663,13}, { 3455,14}, { 1919,16}, { 511,15}, \ + { 1023,14}, { 2431,13}, { 4863,15}, { 1279,14}, \ + { 2943,13}, { 5887,15}, { 1535,14}, { 3455,15}, \ + { 1791,14}, { 16384,15}, { 32768,16}, { 65536,17}, \ + { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ + {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 191 +#define MUL_FFT_THRESHOLD 4224 + +#define SQR_FFT_MODF_THRESHOLD 308 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 308, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 21, 7}, { 11, 6}, { 23, 7}, { 21, 8}, \ + { 11, 7}, { 25, 8}, { 13, 7}, { 27, 8}, \ + { 15, 7}, { 31, 8}, { 21, 9}, { 11, 8}, \ + { 27, 9}, { 15, 8}, { 33, 9}, { 19, 8}, \ + { 41, 9}, { 23, 8}, { 47, 9}, { 27,10}, \ + { 15, 9}, { 39,10}, { 23, 9}, { 51,11}, \ + { 15,10}, { 31, 9}, { 67,10}, { 39, 9}, \ + { 79,10}, { 47,11}, { 31,10}, { 79,11}, \ + { 47,10}, { 95,12}, { 31,11}, { 63,10}, \ + { 127, 9}, { 255, 8}, { 511,10}, { 135, 8}, \ + { 543,11}, { 79, 9}, { 319,11}, { 95, 9}, \ + { 415,12}, { 63,11}, { 127, 8}, { 1087,10}, \ + { 287, 9}, { 575,10}, { 319,12}, { 95,10}, \ + { 383,13}, { 63,12}, { 127,11}, { 255,10}, \ + { 511, 9}, { 1023,11}, { 287,10}, { 575, 9}, \ + { 1151,11}, { 319,10}, { 639, 9}, { 1279,10}, \ + { 671,11}, { 351,10}, { 703, 9}, { 1407,11}, \ + { 383,10}, { 767,11}, { 415,10}, { 831, 9}, \ + { 1663,11}, { 447,10}, { 895,11}, { 479,13}, \ + { 127,12}, { 255,11}, { 511,10}, { 1023,11}, \ + { 543,10}, { 1087,12}, { 287,11}, { 575,10}, \ + { 1151,11}, { 607,12}, { 319,11}, { 671,12}, \ + { 351,11}, { 703,12}, { 383,11}, { 767,12}, \ + { 415,11}, { 831,12}, { 447,11}, { 895,12}, \ + { 479,14}, { 127,12}, { 511,11}, { 1023,12}, \ + { 543,11}, { 1087,12}, { 575,11}, { 1151,12}, \ + { 607,13}, { 319,12}, { 639,11}, { 1279,12}, \ + { 671,11}, { 1343,12}, { 703,11}, { 1407,13}, \ + { 383,12}, { 767,11}, { 1535,12}, { 831,13}, \ + { 447,12}, { 959,13}, { 511,12}, { 1087,13}, \ + { 575,12}, { 1215,13}, { 639,12}, { 1343,13}, \ + { 703,14}, { 383,13}, { 767,12}, { 1535,13}, \ + { 831,12}, { 1663,13}, { 959,12}, { 1919,14}, \ + { 511,13}, { 1087,12}, { 2175,13}, { 1215,14}, \ + { 639,13}, { 1343,12}, { 2687,13}, { 1407,12}, \ + { 2815,13}, { 1471,14}, { 767,13}, { 1663,14}, \ + { 895,13}, { 1919,15}, { 511,14}, { 1023,13}, \ + { 2175,14}, { 1151,13}, { 2431,12}, { 4863,14}, \ + { 1279,13}, { 2687,14}, { 1407,13}, { 2815,15}, \ + { 767,14}, { 1535,13}, { 3071,14}, { 1663,13}, \ + { 3455,14}, { 1919,16}, { 511,15}, { 1023,14}, \ + { 2431,13}, { 4863,15}, { 1279,14}, { 2943,15}, \ + { 1535,14}, { 3455,15}, { 1791,14}, { 16384,15}, \ + { 32768,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ + { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ + {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 185 +#define SQR_FFT_THRESHOLD 3200 + +#define MULLO_BASECASE_THRESHOLD 4 +#define MULLO_DC_THRESHOLD 17 +#define MULLO_MUL_N_THRESHOLD 8397 + +#define DC_DIV_QR_THRESHOLD 36 +#define DC_DIVAPPR_Q_THRESHOLD 123 +#define DC_BDIV_QR_THRESHOLD 32 +#define DC_BDIV_Q_THRESHOLD 68 + +#define INV_MULMOD_BNM1_THRESHOLD 124 +#define INV_NEWTON_THRESHOLD 199 +#define INV_APPR_THRESHOLD 154 + +#define BINV_NEWTON_THRESHOLD 250 +#define REDC_1_TO_REDC_2_THRESHOLD 10 +#define REDC_2_TO_REDC_N_THRESHOLD 59 + +#define MU_DIV_QR_THRESHOLD 1334 +#define MU_DIVAPPR_Q_THRESHOLD 1499 +#define MUPI_DIV_QR_THRESHOLD 81 +#define MU_BDIV_QR_THRESHOLD 1187 +#define MU_BDIV_Q_THRESHOLD 1308 + +#define MATRIX22_STRASSEN_THRESHOLD 15 +#define HGCD_THRESHOLD 117 +#define GCD_DC_THRESHOLD 396 +#define GCDEXT_DC_THRESHOLD 375 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 13 +#define GET_STR_PRECOMPUTE_THRESHOLD 23 +#define SET_STR_DC_THRESHOLD 226 +#define SET_STR_PRECOMPUTE_THRESHOLD 1660 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/darwin.m4 gmp-5.0.2+dfsg/mpn/x86_64/darwin.m4 --- gmp-4.3.2+dfsg/mpn/x86_64/darwin.m4 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/darwin.m4 2011-05-08 09:49:29.000000000 +0000 @@ -18,6 +18,10 @@ define(`DARWIN') +define(`LEA',` + lea $1(%rip), $2 +') + dnl Usage: CALL(funcname) dnl dnl Simply override the definition in x86_64-defs.m4. diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/dive_1.asm gmp-5.0.2+dfsg/mpn/x86_64/dive_1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/dive_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/dive_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -24,8 +24,9 @@ C K8,K9: 10 C K10: 10 C P4: 33 -C P6-15 (Core2):13.25 -C P6-28 (Atom): 42 +C P6 core2: 13.25 +C P6 corei7: 14 +C P6 atom: 42 C A quick adoption of the 32-bit K7 code. @@ -40,63 +41,62 @@ TEXT ALIGN(16) PROLOGUE(mpn_divexact_1) - pushq %rbx + push %rbx - movq %rcx, %rax - movl $0, %ecx C shift count - movq %rdx, %r8 + mov %rcx, %rax + xor R32(%rcx), R32(%rcx) C shift count + mov %rdx, %r8 - btl $0, %eax + bt $0, R32(%rax) jnc L(evn) C skip bsfq unless divisor is even -L(odd): movq %rax, %rbx - shrl %eax - andl $127, %eax C d/2, 7 bits +L(odd): mov %rax, %rbx + shr R32(%rax) + and $127, R32(%rax) C d/2, 7 bits ifdef(`PIC',` - movq binvert_limb_table@GOTPCREL(%rip), %rdx + mov binvert_limb_table@GOTPCREL(%rip), %rdx ',` - movabsq $binvert_limb_table, %rdx + movabs $binvert_limb_table, %rdx ') - movzbl (%rax,%rdx), %eax C inv 8 bits + movzbl (%rdx,%rax), R32(%rax) C inv 8 bits - movq %rbx, %r11 C d without twos + mov %rbx, %r11 C d without twos - leal (%rax,%rax), %edx C 2*inv - imull %eax, %eax C inv*inv - imull %ebx, %eax C inv*inv*d - subl %eax, %edx C inv = 2*inv - inv*inv*d, 16 bits + lea (%rax,%rax), R32(%rdx) C 2*inv + imul R32(%rax), R32(%rax) C inv*inv + imul R32(%rbx), R32(%rax) C inv*inv*d + sub R32(%rax), R32(%rdx) C inv = 2*inv - inv*inv*d, 16 bits - leal (%rdx,%rdx), %eax C 2*inv - imull %edx, %edx C inv*inv - imull %ebx, %edx C inv*inv*d - subl %edx, %eax C inv = 2*inv - inv*inv*d, 32 bits + lea (%rdx,%rdx), R32(%rax) C 2*inv + imul R32(%rdx), R32(%rdx) C inv*inv + imul R32(%rbx), R32(%rdx) C inv*inv*d + sub R32(%rdx), R32(%rax) C inv = 2*inv - inv*inv*d, 32 bits - leaq (%rax,%rax), %rdx C 2*inv - imulq %rax, %rax C inv*inv - imulq %rbx, %rax C inv*inv*d - subq %rax, %rdx C inv = 2*inv - inv*inv*d, 64 bits + lea (%rax,%rax), %r10 C 2*inv + imul %rax, %rax C inv*inv + imul %rbx, %rax C inv*inv*d + sub %rax, %r10 C inv = 2*inv - inv*inv*d, 64 bits - leaq (%rsi,%r8,8), %rsi C up end - leaq -8(%rdi,%r8,8), %rdi C rp end - negq %r8 C -n + lea (%rsi,%r8,8), %rsi C up end + lea -8(%rdi,%r8,8), %rdi C rp end + neg %r8 C -n - movq %rdx, %r10 C final inverse - movq (%rsi,%r8,8), %rax C up[0] + mov (%rsi,%r8,8), %rax C up[0] - incq %r8 + inc %r8 jz L(one) - movq (%rsi,%r8,8), %rdx C up[1] + mov (%rsi,%r8,8), %rdx C up[1] - shrdq %cl, %rdx, %rax + shrd R8(%rcx), %rdx, %rax - xorl %ebx, %ebx - jmp L(entry) + xor R32(%rbx), R32(%rbx) + jmp L(ent) -L(evn): bsfq %rax, %rcx - shrq %cl, %rax +L(evn): bsf %rax, %rcx + shr R8(%rcx), %rax jmp L(odd) ALIGN(8) @@ -108,54 +108,37 @@ C rsi up end C rdi rp end C r8 counter, limbs, negative + C r10 d^(-1) mod 2^64 + C r11 d, shifted down - mulq %r11 C carry limb in rdx - - movq -8(%rsi,%r8,8), %rax - movq (%rsi,%r8,8), %r9 - - shrdq %cl, %r9, %rax - nop - - subq %rbx, %rax C apply carry bit - setc %bl - - subq %rdx, %rax C apply carry limb - adcq $0, %rbx - -L(entry): - imulq %r10, %rax - - movq %rax, (%rdi,%r8,8) - incq %r8 + mul %r11 C carry limb in rdx 0 10 + mov -8(%rsi,%r8,8), %rax C + mov (%rsi,%r8,8), %r9 C + shrd R8(%rcx), %r9, %rax C + nop C + sub %rbx, %rax C apply carry bit + setc %bl C + sub %rdx, %rax C apply carry limb 5 + adc $0, %rbx C 6 +L(ent): imul %r10, %rax C 6 + mov %rax, (%rdi,%r8,8) C + inc %r8 C jnz L(top) - - mulq %r11 C carry limb in rdx - - movq -8(%rsi), %rax C up high limb - shrq %cl, %rax - - subq %rbx, %rax C apply carry bit - - subq %rdx, %rax C apply carry limb - - imulq %r10, %rax - - movq %rax, (%rdi) - - popq %rbx + mul %r11 C carry limb in rdx + mov -8(%rsi), %rax C up high limb + shr R8(%rcx), %rax + sub %rbx, %rax C apply carry bit + sub %rdx, %rax C apply carry limb + imul %r10, %rax + mov %rax, (%rdi) + pop %rbx ret - -L(one): - shrq %cl, %rax - - imulq %r10, %rax - - movq %rax, (%rdi) - - popq %rbx +L(one): shr R8(%rcx), %rax + imul %r10, %rax + mov %rax, (%rdi) + pop %rbx ret EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/divrem_1.asm gmp-5.0.2+dfsg/mpn/x86_64/divrem_1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/divrem_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/divrem_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -23,8 +23,9 @@ C norm unorm frac C K8 13 13 12 C P4 44.2 44.2 42.3 -C P6-15 (Core2) 24.5 24.5 19.3 -C P6-15 (Atom) 42 52 37 +C P6 core2 25 24.5 19.3 +C P6 corei7 21.5 20.7 18 +C P6 atom 42 52 37 C TODO C * Compute the inverse without relying on the div instruction. @@ -276,4 +277,4 @@ pop %r12 pop %r13 ret -EPILOGUE(mpn_divrem_1) +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/divrem_2.asm gmp-5.0.2+dfsg/mpn/x86_64/divrem_2.asm --- gmp-4.3.2+dfsg/mpn/x86_64/divrem_2.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/divrem_2.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl x86-64 mpn_divrem_2 -- Divide an mpn number by a normalized 2-limb number. -dnl Copyright 2007, 2008 Free Software Foundation, Inc. +dnl Copyright 2007, 2008, 2010 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -23,7 +23,8 @@ C norm frac C K8 20 20 C P4 73 73 -C P6-15 37 37 +C P6 core2 37 37 +C P6 corei7 33 33 C TODO C * Perhaps compute the inverse without relying on divq? Could either use @@ -72,7 +73,7 @@ setb %dl cmp %r10, %r8 setbe %al - or %al, %dl + orb %al, %dl jne L(23) L(2): lea -3(%rcx,%r13), %rbx C un + fn - 3 @@ -137,7 +138,7 @@ inc %rdi C 7 xor R32(%rdx), R32(%rdx) C cmp %r10, %rbx C 13 - mov %r8, %rax C d1 ncp + mov %r8, %rax C d0 ncp adc $-1, %rdx C mask 14 add %rdx, %rdi C q-- 15 and %rdx, %rax C d0 or 0 15 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/fat/diveby3.c gmp-5.0.2+dfsg/mpn/x86_64/fat/diveby3.c --- gmp-4.3.2+dfsg/mpn/x86_64/fat/diveby3.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/fat/diveby3.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,21 @@ +/* Fat binary fallback mpn_divexact_by3c. + +Copyright 2003, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "mpn/generic/diveby3.c" diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/fat/fat.c gmp-5.0.2+dfsg/mpn/x86_64/fat/fat.c --- gmp-4.3.2+dfsg/mpn/x86_64/fat/fat.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/fat/fat.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,163 @@ +/* x86 fat binary initializers. + + Contributed to the GNU project by Kevin Ryde (original x86_32 code) and + Torbjorn Granlund (port to x86_64) + + THE FUNCTIONS AND VARIABLES IN THIS FILE ARE FOR INTERNAL USE ONLY. + THEY'RE ALMOST CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES OR DISAPPEAR + COMPLETELY IN FUTURE GNU MP RELEASES. + +Copyright 2003, 2004, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include /* for printf */ +#include /* for getenv */ +#include + +#include "gmp.h" +#include "gmp-impl.h" + +/* Change this to "#define TRACE(x) x" for some traces. */ +#define TRACE(x) + + +/* fat_entry.asm */ +long __gmpn_cpuid __GMP_PROTO ((char dst[12], int id)); + + +typedef DECL_preinv_divrem_1 ((*preinv_divrem_1_t)); +typedef DECL_preinv_mod_1 ((*preinv_mod_1_t)); + +struct cpuvec_t __gmpn_cpuvec = { + __MPN(add_n_init), + __MPN(addmul_1_init), + __MPN(copyd_init), + __MPN(copyi_init), + __MPN(divexact_1_init), + __MPN(divexact_by3c_init), + __MPN(divrem_1_init), + __MPN(gcd_1_init), + __MPN(lshift_init), + __MPN(mod_1_init), + __MPN(mod_34lsub1_init), + __MPN(modexact_1c_odd_init), + __MPN(mul_1_init), + __MPN(mul_basecase_init), + __MPN(preinv_divrem_1_init), + __MPN(preinv_mod_1_init), + __MPN(rshift_init), + __MPN(sqr_basecase_init), + __MPN(sub_n_init), + __MPN(submul_1_init), + 0 +}; + + +/* The following setups start with generic x86, then overwrite with + specifics for a chip, and higher versions of that chip. + + The arrangement of the setups here will normally be the same as the $path + selections in configure.in for the respective chips. + + This code is reentrant and thread safe. We always calculate the same + decided_cpuvec, so if two copies of the code are running it doesn't + matter which completes first, both write the same to __gmpn_cpuvec. + + We need to go via decided_cpuvec because if one thread has completed + __gmpn_cpuvec then it may be making use of the threshold values in that + vector. If another thread is still running __gmpn_cpuvec_init then we + don't want it to write different values to those fields since some of the + asm routines only operate correctly up to their own defined threshold, + not an arbitrary value. */ + +void +__gmpn_cpuvec_init (void) +{ + struct cpuvec_t decided_cpuvec; + + TRACE (printf ("__gmpn_cpuvec_init:\n")); + + memset (&decided_cpuvec, '\0', sizeof (decided_cpuvec)); + + CPUVEC_SETUP_x86_64; + CPUVEC_SETUP_fat; + + if (1) + { + char vendor_string[13]; + char dummy_string[12]; + long fms; + int family, model; + + __gmpn_cpuid (vendor_string, 0); + vendor_string[12] = 0; + + fms = __gmpn_cpuid (dummy_string, 1); + family = ((fms >> 8) & 0xf) + ((fms >> 20) & 0xff); + model = ((fms >> 4) & 0xf) + ((fms >> 12) & 0xf0); + + if (strcmp (vendor_string, "GenuineIntel") == 0) + { + switch (family) + { + case 4: + case 5: + abort (); + break; + + case 6: + if (model == 28) + CPUVEC_SETUP_atom; + else + CPUVEC_SETUP_core2; + break; + + case 15: + CPUVEC_SETUP_pentium4; + break; + } + } + else if (strcmp (vendor_string, "AuthenticAMD") == 0) + { + switch (family) + { + case 5: + case 6: + abort (); + break; + case 15: + /* CPUVEC_SETUP_athlon */ + break; + } + } + } + + /* There's no x86 generic mpn_preinv_divrem_1 or mpn_preinv_mod_1. + Instead default to the plain versions from whichever CPU we detected. + The function arguments are compatible, no need for any glue code. */ + if (decided_cpuvec.preinv_divrem_1 == NULL) + decided_cpuvec.preinv_divrem_1 =(preinv_divrem_1_t)decided_cpuvec.divrem_1; + if (decided_cpuvec.preinv_mod_1 == NULL) + decided_cpuvec.preinv_mod_1 =(preinv_mod_1_t) decided_cpuvec.mod_1; + + ASSERT_CPUVEC (decided_cpuvec); + CPUVEC_INSTALL (decided_cpuvec); + + /* Set this once the threshold fields are ready. + Use volatile to prevent it getting moved. */ + ((volatile struct cpuvec_t *) &__gmpn_cpuvec)->initialized = 1; +} diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/fat/fat_entry.asm gmp-5.0.2+dfsg/mpn/x86_64/fat/fat_entry.asm --- gmp-4.3.2+dfsg/mpn/x86_64/fat/fat_entry.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/fat/fat_entry.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,175 @@ +dnl x86 fat binary entrypoints. + +dnl Contributed to the GNU project by Kevin Ryde (original x86_32 code) and +dnl Torbjorn Granlund (port to x86_64) + +dnl Copyright 2003, 2009, 2011 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundation; either version 3 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +dnl Forcibly disable profiling. +dnl +dnl The entrypoints and inits are small enough not to worry about, the real +dnl routines arrived at will have any profiling. Also, the way the code +dnl here ends with a jump means we won't work properly with the +dnl "instrument" profiling scheme anyway. + +define(`WANT_PROFILING',no) + + +dnl We define PIC_OR_DARWIN as a helper symbol, the use it for suppressing +dnl normal, fast call code, since that triggers problems on darwin. +dnl +dnl FIXME: There might be a more elegant solution, adding less overhead. + +ifdef(`DARWIN', +`define(`PIC_OR_DARWIN')') +ifdef(`PIC', +`define(`PIC_OR_DARWIN')') + + + TEXT + + +dnl Usage: FAT_ENTRY(name, offset) +dnl +dnl Emit a fat binary entrypoint function of the given name. This is the +dnl normal entry for applications, eg. __gmpn_add_n. +dnl +dnl The code simply jumps through the function pointer in __gmpn_cpuvec at +dnl the given "offset" (in bytes). +dnl +dnl For non-PIC, the jumps are 5 bytes each, aligning them to 8 should be +dnl fine for all x86s. +dnl +dnl For PIC, the jumps are 20 bytes each, and are best aligned to 16 to +dnl ensure at least the first two instructions don't cross a cache line +dnl boundary. +dnl +dnl Note the extra `' ahead of PROLOGUE obscures it from the HAVE_NATIVE +dnl grepping in configure, stopping that code trying to eval something with +dnl $1 in it. + +define(FAT_ENTRY, +m4_assert_numargs(2) +` ALIGN(ifdef(`PIC',16,8)) +`'PROLOGUE($1) +ifdef(`PIC_OR_DARWIN', +` LEA( GSYM_PREFIX`'__gmpn_cpuvec, %rax) + jmp *$2(%rax) +',`dnl non-PIC + jmp *GSYM_PREFIX`'__gmpn_cpuvec+$2 +') +EPILOGUE() +') + + +dnl FAT_ENTRY for each CPUVEC_FUNCS_LIST +dnl + +define(`CPUVEC_offset',0) +foreach(i, +`FAT_ENTRY(MPN(i),CPUVEC_offset) +define(`CPUVEC_offset',eval(CPUVEC_offset + 8))', +CPUVEC_FUNCS_LIST) + + +dnl Usage: FAT_INIT(name, offset) +dnl +dnl Emit a fat binary initializer function of the given name. These +dnl functions are the initial values for the pointers in __gmpn_cpuvec. +dnl +dnl The code simply calls __gmpn_cpuvec_init, and then jumps back through +dnl the __gmpn_cpuvec pointer, at the given "offset" (in bytes). +dnl __gmpn_cpuvec_init will have stored the address of the selected +dnl implementation there. +dnl +dnl Only one of these routines will be executed, and only once, since after +dnl that all the __gmpn_cpuvec pointers go to real routines. So there's no +dnl need for anything special here, just something small and simple. To +dnl keep code size down, "fat_init" is a shared bit of code, arrived at +dnl with the offset in %al. %al is used since the movb instruction is 2 +dnl bytes where %eax would be 4. +dnl +dnl Note having `PROLOGUE in FAT_INIT obscures that PROLOGUE from the +dnl HAVE_NATIVE grepping in configure, preventing that code trying to eval +dnl something with $1 in it. +dnl +dnl We need to preserve parameter registers over the __gmpn_cpuvec_init call + +define(FAT_INIT, +m4_assert_numargs(2) +`PROLOGUE($1) + mov $`'$2, %al + jmp L(fat_init) +EPILOGUE() +') + +L(fat_init): + C al __gmpn_cpuvec byte offset + + movzbl %al, %eax + push %rdi + push %rsi + push %rdx + push %rcx + push %r8 + push %r9 + push %rax + CALL( __gmpn_cpuvec_init) + pop %rax + pop %r9 + pop %r8 + pop %rcx + pop %rdx + pop %rsi + pop %rdi +ifdef(`PIC_OR_DARWIN',` + LEA( GSYM_PREFIX`'__gmpn_cpuvec, %r10) + jmp *(%r10,%rax) +',`dnl non-PIC + jmp *GSYM_PREFIX`'__gmpn_cpuvec(%rax) +') + +dnl FAT_INIT for each CPUVEC_FUNCS_LIST +dnl + +define(`CPUVEC_offset',0) +foreach(i, +`FAT_INIT(MPN(i`'_init),CPUVEC_offset) +define(`CPUVEC_offset',eval(CPUVEC_offset + 8))', +CPUVEC_FUNCS_LIST) + + + +C long __gmpn_cpuid (char dst[12], int id); +C +C This is called only once, so just something simple and compact is fine. + + +PROLOGUE(__gmpn_cpuid) + mov %rbx, %r8 + mov %esi, %eax + cpuid + mov %ebx, (%rdi) + mov %edx, 4(%rdi) + mov %ecx, 8(%rdi) + mov %r8, %rbx + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/fat/gcd_1.c gmp-5.0.2+dfsg/mpn/x86_64/fat/gcd_1.c --- gmp-4.3.2+dfsg/mpn/x86_64/fat/gcd_1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/fat/gcd_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,21 @@ +/* Fat binary fallback mpn_gcd_1. + +Copyright 2003 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "mpn/generic/gcd_1.c" diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/fat/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86_64/fat/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86_64/fat/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/fat/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,59 @@ +/* Fat binary x86_64 gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2009 Free Software +Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define GMP_LIMB_BITS 64 +#define BYTES_PER_MP_LIMB 8 + + +/* mpn_divexact_1 is faster than mpn_divrem_1 at all sizes. The only time + this might not be true currently is for actual 80386 and 80486 chips, + where mpn/x86/dive_1.asm might be slower than mpn/x86/divrem_1.asm, but + that's not worth worrying about. */ +#define DIVEXACT_1_THRESHOLD 0 + +/* Only some of the x86s have an mpn_preinv_divrem_1, but we set + USE_PREINV_DIVREM_1 so that all callers use it, and then let the + __gmpn_cpuvec pointer go to plain mpn_divrem_1 if there's not an actual + preinv. */ +#define USE_PREINV_DIVREM_1 1 + +/* mpn_sqr_basecase is faster than mpn_mul_basecase at all sizes, no need + for mpn_sqr to call the latter. */ +#define SQR_BASECASE_THRESHOLD 0 + +/* Sensible fallbacks for these, when not taken from a cpu-specific + gmp-mparam.h. */ +#define MUL_TOOM22_THRESHOLD 20 +#define MUL_TOOM33_THRESHOLD 130 +#define SQR_TOOM2_THRESHOLD 30 +#define SQR_TOOM3_THRESHOLD 200 + +/* These are values more or less in the middle of what the typical x86 chips + come out as. For a fat binary it's necessary to have values for these, + since the defaults for MUL_FFT_TABLE and SQR_FFT_TABLE otherwise come out + as non-constant array initializers. FIXME: Perhaps these should be done + in the cpuvec structure like other thresholds. */ +#define MUL_FFT_TABLE { 464, 928, 1920, 3584, 10240, 40960, 0 } +#define MUL_FFT_MODF_THRESHOLD 400 +#define MUL_FFT_THRESHOLD 2000 + +#define SQR_FFT_TABLE { 528, 1184, 1920, 4608, 14336, 40960, 0 } +#define SQR_FFT_MODF_THRESHOLD 500 +#define SQR_FFT_THRESHOLD 3000 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/fat/mod_1.c gmp-5.0.2+dfsg/mpn/x86_64/fat/mod_1.c --- gmp-4.3.2+dfsg/mpn/x86_64/fat/mod_1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/fat/mod_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,21 @@ +/* Fat binary fallback mpn_mod_1. + +Copyright 2003, 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "mpn/generic/mod_1.c" diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/fat/mode1o.c gmp-5.0.2+dfsg/mpn/x86_64/fat/mode1o.c --- gmp-4.3.2+dfsg/mpn/x86_64/fat/mode1o.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/fat/mode1o.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,21 @@ +/* Fat binary fallback mpn_modexact_1c_odd. + +Copyright 2003 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "mpn/generic/mode1o.c" diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/gcd_1.asm gmp-5.0.2+dfsg/mpn/x86_64/gcd_1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/gcd_1.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/gcd_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,130 @@ +dnl AMD64 mpn_gcd_1 -- mpn by 1 gcd. + +dnl Based on the K7 gcd_1.asm, by Kevin Ryde. Rehacked for AMD64 by Torbjorn +dnl Granlund. + +dnl Copyright 2000, 2001, 2002, 2005, 2009 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C K8: 6.75 cycles/bit (approx) 1x1 gcd +C 10.0 cycles/limb Nx1 reduction (modexact_1_odd) + + +dnl Reduce using x%y if x is more than DIV_THRESHOLD bits bigger than y, +dnl where x is the larger of the two. See tune/README for more. +dnl +dnl div at 80 cycles compared to the gcd at about 7 cycles/bitpair +dnl suggests 80/7*2=23 + +deflit(DIV_THRESHOLD, 23) + + +C ctz_table[n] is the number of trailing zeros on n, or MAXSHIFT if n==0. + + +deflit(MAXSHIFT, 6) +deflit(MASK, eval((m4_lshift(1,MAXSHIFT))-1)) + +DEF_OBJECT(ctz_table,64) + .byte MAXSHIFT +forloop(i,1,MASK, +` .byte m4_count_trailing_zeros(i) +') +END_OBJECT(ctz_table) + +C mp_limb_t mpn_gcd_1 (mp_srcptr up, mp_size_t n, mp_limb_t vlimb); + + +C INPUT PARAMETERS +define(`up', `%rdi') +define(`n', `%rsi') +define(`vlimb', `%rdx') + + TEXT + ALIGN(16) + +PROLOGUE(mpn_gcd_1) + mov (%rdi), %r8 C src low limb + or %rdx, %r8 C x | y + mov $-1, R32(%rcx) + +L(twos): + inc R32(%rcx) + shr %r8 + jnc L(twos) + + shr R8(%rcx), %rdx + mov R32(%rcx), R32(%r8) C common twos + +L(divide_strip_y): + shr %rdx + jnc L(divide_strip_y) + adc %rdx, %rdx + + push %r8 + push %rdx + sub $8, %rsp C maintain ABI required rsp alignment + + CALL( mpn_modexact_1_odd) + + add $8, %rsp + pop %rdx + pop %r8 + + test %rax, %rax + + mov %rax, %rcx + jnz L(strip_x) + + mov %rdx, %rax + jmp L(done) + +L(strip_x): + LEA( ctz_table, %r9) + jmp L(strip_x_top) + + ALIGN(16) +L(top): + cmovc %r10, %rcx C if x-y gave carry, use x,y-x 0 + cmovc %rax, %rdx C 0 + +L(strip_x_top): + mov %rcx, %rax C 1 + and $MASK, R32(%rcx) C 1 + + mov (%r9,%rcx), R8(%rcx) C 1 + + shr R8(%rcx), %rax C 4 + cmp $MAXSHIFT, R8(%rcx) C 4 + + mov %rax, %rcx C 5 + mov %rdx, %r10 C 5 + je L(strip_x_top) C 5 + + sub %rax, %r10 C 6 + sub %rdx, %rcx C 6 + jnz L(top) C 6 + +L(done): + mov %r8, %rcx + shl R8(%rcx), %rax + ret + +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86_64/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86_64/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* AMD K8 gmp-mparam.h -- Compiler/machine parameter header file. Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, -2008, 2009 Free Software Foundation, Inc. +2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,62 +18,180 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 -/* 2200 MHz Opteron / rev A / 1024 Kibyte cache / socket 940 */ -/* Generated by tuneup.c, 2009-01-14, gcc 3.4 */ - -#define MUL_KARATSUBA_THRESHOLD 28 -#define MUL_TOOM3_THRESHOLD 97 -#define MUL_TOOM44_THRESHOLD 406 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_KARATSUBA_THRESHOLD 38 -#define SQR_TOOM3_THRESHOLD 133 -#define SQR_TOOM4_THRESHOLD 547 - -#define MULLOW_BASECASE_THRESHOLD 27 -#define MULLOW_DC_THRESHOLD 28 -#define MULLOW_MUL_N_THRESHOLD 199 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 74 -#define POWM_THRESHOLD 146 - -#define MATRIX22_STRASSEN_THRESHOLD 24 -#define HGCD_THRESHOLD 143 -#define GCD_DC_THRESHOLD 529 -#define GCDEXT_DC_THRESHOLD 639 -#define JACOBI_BASE_METHOD 1 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 4 -#define MOD_1_2_THRESHOLD 7 -#define MOD_1_4_THRESHOLD 64 -#define USE_PREINV_DIVREM_1 1 /* native */ -#define USE_PREINV_MOD_1 1 -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 18 -#define GET_STR_PRECOMPUTE_THRESHOLD 32 -#define SET_STR_DC_THRESHOLD 248 -#define SET_STR_PRECOMPUTE_THRESHOLD 2124 - -#define MUL_FFT_TABLE { 432, 928, 2624, 3840, 11264, 36864, 147456, 327680, 0 } -#define MUL_FFT_MODF_THRESHOLD 656 -#define MUL_FFT_THRESHOLD 7936 - -#define SQR_FFT_TABLE { 432, 928, 2368, 4352, 11264, 28672, 114688, 327680, 0 } -#define SQR_FFT_MODF_THRESHOLD 560 -#define SQR_FFT_THRESHOLD 7936 - -#define MUL_FFT_TABLE2 {{1,4}, {337,5}, {673,6}, {1729,7}, {1793,6}, {2017,7}, {5633,8}, {11009,9}, {11777,8}, {14593,9}, {15873,8}, {16897,9}, {22017,10}, {23553,9}, {29697,10}, {31745,9}, {36353,10}, {39937,9}, {44545,10}, {48129,9}, {50689,10}, {56833,11}, {63489,10}, {78337,11}, {79873,10}, {86017,11}, {88065,10}, {92161,11}, {96257,10}, {106497,11}, {129025,10}, {141313,11}, {145409,10}, {146433,11}, {161793,10}, {167937,11}, {227329,12}, {258049,11}, {326657,12}, {389121,11}, {424961,13}, {516097,12}, {520193,11}, {528385,10}, {538625,11}, {547841,10}, {552961,11}, {587777,12}, {651265,11}, {718849,10}, {719873,12}, {782337,11}, {787457,10}, {791553,11}, {796673,10}, {802817,11}, {849921,10}, {850945,12}, {913409,11}, {915457,13}, {1040385,12}, {1044481,11}, {1112065,12}, {1175553,11}, {1243137,12}, {1306625,11}, {1374209,12}, {1437697,13}, {1564673,12}, {1568769,11}, {1581057,12}, {1585153,11}, {1595393,12}, {1597441,11}, {1630209,12}, {1699841,11}, {1761281,12}, {1830913,14}, {2080769,13}, {2088961,12}, {2486273,13}, {2613249,12}, {3010561,13}, {3137537,12}, {3534849,13}, {3661825,12}, {3928065,13}, {3964929,14}, {4014081,13}, {4046849,14}, {4136961,13}, {4186113,12}, {4452353,13}, {4710401,12}, {4976641,13}, {5234689,12}, {5238785,13}, {5349377,12}, {5353473,13}, {5758977,12}, {5763073,14}, {6275073,13}, {7856129,14}, {8372225,13}, {9953281,14}, {10469377,13}, {12050433,14}, {12566529,13}, {13623297,14}, {14663681,13}, {15196161,15}, {16744449,14}, {16760833,13}, {17293313,14}, {18857985,13}, {19394561,14}, {MP_SIZE_T_MAX,0}} - -#define SQR_FFT_TABLE2 {{1,4}, {305,5}, {609,6}, {1601,7}, {4737,8}, {4865,7}, {5121,8}, {11009,9}, {11777,8}, {13057,9}, {13825,10}, {15361,9}, {15873,8}, {16129,9}, {22017,10}, {23553,9}, {28161,10}, {31745,9}, {36353,10}, {39937,9}, {42497,10}, {56321,11}, {63489,10}, {89601,11}, {96257,10}, {107521,12}, {126977,11}, {129025,10}, {135169,11}, {137217,10}, {139265,11}, {163841,10}, {173057,11}, {195073,9}, {196097,11}, {196609,10}, {201729,11}, {212993,12}, {217089,11}, {221185,12}, {258049,11}, {260609,10}, {261121,9}, {261633,11}, {292865,10}, {296961,11}, {299009,10}, {302081,11}, {325633,12}, {389121,11}, {392193,9}, {392705,11}, {393217,13}, {401409,11}, {404481,13}, {421889,11}, {424961,13}, {516097,12}, {520193,11}, {526337,10}, {532481,11}, {542721,10}, {543745,11}, {593921,12}, {598017,11}, {608257,12}, {610305,11}, {616449,12}, {651265,11}, {653313,10}, {687617,11}, {718849,10}, {749569,12}, {782337,11}, {784385,10}, {788481,11}, {793601,10}, {800769,11}, {802817,10}, {813057,11}, {850945,12}, {913409,11}, {917505,13}, {1040385,12}, {1044481,11}, {1113089,12}, {1175553,11}, {1243137,12}, {1309697,11}, {1347585,12}, {1351681,11}, {1368065,12}, {1437697,11}, {1503233,13}, {1564673,12}, {1568769,11}, {1628161,12}, {1839105,14}, {1851393,12}, {1884161,14}, {2080769,13}, {2088961,12}, {2488321,13}, {2613249,12}, {3010561,13}, {3137537,12}, {3403777,13}, {3661825,12}, {3928065,14}, {4177921,13}, {4186113,12}, {4452353,13}, {4710401,12}, {4976641,13}, {5234689,12}, {5500929,13}, {5758977,12}, {5763073,14}, {6275073,13}, {6283265,12}, {6549505,13}, {7856129,15}, {8011777,14}, {8060929,15}, {8355841,14}, {8372225,13}, {9953281,14}, {10469377,13}, {12050433,14}, {12566529,13}, {13623297,14}, {14663681,13}, {15196161,15}, {16744449,14}, {16760833,13}, {17293313,14}, {23052289,15}, {25133057,14}, {29343745,16}, {MP_SIZE_T_MAX,0}} - -#define INV_NEWTON_THRESHOLD 47 -#define BINV_NEWTON_THRESHOLD 18 +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 8 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 6 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 0 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 11 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 14 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 19 + +#define MUL_TOOM22_THRESHOLD 28 +#define MUL_TOOM33_THRESHOLD 81 +#define MUL_TOOM44_THRESHOLD 120 +#define MUL_TOOM6H_THRESHOLD 466 +#define MUL_TOOM8H_THRESHOLD 478 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 97 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 160 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 160 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 211 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 34 +#define SQR_TOOM3_THRESHOLD 117 +#define SQR_TOOM4_THRESHOLD 512 +#define SQR_TOOM6_THRESHOLD 686 +#define SQR_TOOM8_THRESHOLD 686 + +#define MULMOD_BNM1_THRESHOLD 17 +#define SQRMOD_BNM1_THRESHOLD 17 + +#define MUL_FFT_MODF_THRESHOLD 570 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 570, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ + { 25, 7}, { 13, 6}, { 27, 7}, { 15, 6}, \ + { 31, 7}, { 25, 8}, { 13, 7}, { 29, 8}, \ + { 15, 7}, { 31, 8}, { 17, 7}, { 35, 8}, \ + { 19, 7}, { 39, 8}, { 21, 7}, { 43, 8}, \ + { 23, 7}, { 47, 8}, { 25, 7}, { 51, 8}, \ + { 29, 9}, { 15, 8}, { 37, 9}, { 19, 8}, \ + { 43, 9}, { 23, 8}, { 51, 9}, { 27, 8}, \ + { 55,10}, { 15, 9}, { 43,10}, { 23, 9}, \ + { 55,10}, { 31, 9}, { 63, 5}, { 1023, 4}, \ + { 2431, 5}, { 1279, 6}, { 671, 7}, { 367, 8}, \ + { 189, 9}, { 95, 8}, { 195, 9}, { 111,11}, \ + { 31, 9}, { 131,10}, { 71, 9}, { 155,10}, \ + { 79, 9}, { 159,10}, { 87,11}, { 47,10}, \ + { 111,11}, { 63,10}, { 135,11}, { 79,10}, \ + { 167,11}, { 95,10}, { 191,11}, { 111,12}, \ + { 63,11}, { 143,10}, { 287,11}, { 159,10}, \ + { 319,11}, { 175,12}, { 95,11}, { 207,13}, \ + { 63,12}, { 127,11}, { 255,10}, { 543,11}, \ + { 287,12}, { 159,11}, { 319,10}, { 639,11}, \ + { 335,10}, { 671,11}, { 351,10}, { 703,12}, \ + { 191,11}, { 383,10}, { 767,11}, { 415,12}, \ + { 223,13}, { 127,12}, { 255,11}, { 543,12}, \ + { 287,11}, { 575,10}, { 1151,11}, { 607,12}, \ + { 319,11}, { 639,10}, { 1279,11}, { 671,12}, \ + { 351,11}, { 703,13}, { 191,12}, { 383,11}, \ + { 767,12}, { 415,11}, { 831,12}, { 447,14}, \ + { 127,13}, { 255,12}, { 543,11}, { 1087,12}, \ + { 607,11}, { 1215,13}, { 319,12}, { 671,11}, \ + { 1343,12}, { 735,13}, { 383,12}, { 767,11}, \ + { 1535,12}, { 799,11}, { 1599,12}, { 831,13}, \ + { 447,12}, { 895,11}, { 1791,12}, { 959,14}, \ + { 255,13}, { 511,12}, { 1087,13}, { 575,12}, \ + { 1215,13}, { 639,12}, { 1343,13}, { 703,12}, \ + { 1407,14}, { 383,13}, { 767,12}, { 1599,13}, \ + { 831,12}, { 1663,13}, { 895,12}, { 1791,13}, \ + { 959,15}, { 255,14}, { 511,13}, { 1087,12}, \ + { 2175,13}, { 1215,14}, { 639,13}, { 1471,14}, \ + { 767,13}, { 1663,14}, { 895,13}, { 1855,15}, \ + { 511,14}, { 1023,13}, { 2175,14}, { 1151,13}, \ + { 2431,14}, { 1279,13}, { 2687,14}, { 1407,15}, \ + { 767,14}, { 1535,13}, { 3071,14}, { 1791,16}, \ + { 511,15}, { 1023,14}, { 2431,15}, { 1279,14}, \ + { 2815,15}, { 1535,14}, { 3199,15}, { 1791,14}, \ + { 3583,16}, { 65536,17}, { 131072,18}, { 262144,19}, \ + { 524288,20}, {1048576,21}, {2097152,22}, {4194304,23}, \ + {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 185 +#define MUL_FFT_THRESHOLD 7552 + +#define SQR_FFT_MODF_THRESHOLD 460 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 460, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ + { 12, 5}, { 25, 6}, { 27, 7}, { 14, 6}, \ + { 29, 7}, { 15, 6}, { 31, 7}, { 29, 8}, \ + { 15, 7}, { 32, 8}, { 17, 7}, { 35, 8}, \ + { 19, 7}, { 39, 8}, { 21, 7}, { 43, 8}, \ + { 25, 7}, { 51, 8}, { 29, 9}, { 15, 8}, \ + { 35, 9}, { 19, 8}, { 43, 9}, { 23, 8}, \ + { 51, 9}, { 27, 8}, { 55,10}, { 15, 9}, \ + { 31, 8}, { 63, 9}, { 43,10}, { 23, 9}, \ + { 55,11}, { 15,10}, { 31, 9}, { 71,10}, \ + { 39, 9}, { 83,10}, { 47, 6}, { 767, 4}, \ + { 3263, 5}, { 1727, 4}, { 3455, 5}, { 1791, 6}, \ + { 927, 7}, { 479, 6}, { 959, 7}, { 511, 8}, \ + { 271, 9}, { 147,10}, { 87,11}, { 47,10}, \ + { 95,12}, { 31,11}, { 63,10}, { 135,11}, \ + { 79,10}, { 167,11}, { 95,10}, { 191,11}, \ + { 111,12}, { 63,11}, { 127,10}, { 255,11}, \ + { 143,10}, { 287, 9}, { 575,10}, { 303,11}, \ + { 159,12}, { 95,11}, { 191,10}, { 383, 9}, \ + { 767,10}, { 399,11}, { 207,13}, { 63,12}, \ + { 127,11}, { 255,10}, { 511,11}, { 271,10}, \ + { 543,11}, { 287,10}, { 575,12}, { 159,11}, \ + { 319,10}, { 639,11}, { 335,10}, { 671,11}, \ + { 351,10}, { 703,12}, { 191,11}, { 383,10}, \ + { 767,11}, { 415,10}, { 831,11}, { 447,13}, \ + { 127,12}, { 255,11}, { 511,10}, { 1023,11}, \ + { 543,12}, { 287,11}, { 575,10}, { 1151,11}, \ + { 607,10}, { 1215,12}, { 319,11}, { 639,10}, \ + { 1279,11}, { 671,12}, { 351,11}, { 703,13}, \ + { 191,12}, { 383,11}, { 767,12}, { 415,11}, \ + { 831,12}, { 447,14}, { 127,13}, { 255,12}, \ + { 511,11}, { 1023,12}, { 543,11}, { 1087,12}, \ + { 575,11}, { 1151,12}, { 607,13}, { 319,12}, \ + { 639,11}, { 1279,12}, { 671,11}, { 1343,12}, \ + { 703,11}, { 1407,12}, { 735,13}, { 383,12}, \ + { 767,11}, { 1535,12}, { 799,11}, { 1599,12}, \ + { 831,13}, { 447,12}, { 959,14}, { 255,13}, \ + { 511,12}, { 1087,13}, { 575,12}, { 1215,13}, \ + { 639,12}, { 1343,13}, { 703,12}, { 1407,14}, \ + { 383,13}, { 767,12}, { 1599,13}, { 831,12}, \ + { 1663,13}, { 895,12}, { 1791,13}, { 959,15}, \ + { 255,14}, { 511,13}, { 1087,12}, { 2175,13}, \ + { 1215,14}, { 639,13}, { 1471,14}, { 767,13}, \ + { 1663,14}, { 895,13}, { 1855,15}, { 511,14}, \ + { 1023,13}, { 2175,14}, { 1151,13}, { 2303,14}, \ + { 1279,13}, { 2559,14}, { 1407,15}, { 767,14}, \ + { 1535,13}, { 3071,14}, { 1791,16}, { 511,15}, \ + { 1023,14}, { 2303,15}, { 1279,14}, { 2687,15}, \ + { 1535,14}, { 3199,15}, { 1791,16}, { 65536,17}, \ + { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ + {2097152,22}, {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 203 +#define SQR_FFT_THRESHOLD 5248 + +#define MULLO_BASECASE_THRESHOLD 9 +#define MULLO_DC_THRESHOLD 29 +#define MULLO_MUL_N_THRESHOLD 14709 + +#define DC_DIV_QR_THRESHOLD 56 +#define DC_DIVAPPR_Q_THRESHOLD 270 +#define DC_BDIV_QR_THRESHOLD 52 +#define DC_BDIV_Q_THRESHOLD 152 + +#define INV_MULMOD_BNM1_THRESHOLD 174 +#define INV_NEWTON_THRESHOLD 252 +#define INV_APPR_THRESHOLD 250 + +#define BINV_NEWTON_THRESHOLD 345 +#define REDC_1_TO_REDC_2_THRESHOLD 50 +#define REDC_2_TO_REDC_N_THRESHOLD 79 + +#define MU_DIV_QR_THRESHOLD 1787 +#define MU_DIVAPPR_Q_THRESHOLD 1787 +#define MUPI_DIV_QR_THRESHOLD 106 +#define MU_BDIV_QR_THRESHOLD 1620 +#define MU_BDIV_Q_THRESHOLD 1787 + +#define MATRIX22_STRASSEN_THRESHOLD 17 +#define HGCD_THRESHOLD 139 +#define GCD_DC_THRESHOLD 501 +#define GCDEXT_DC_THRESHOLD 474 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 17 +#define GET_STR_PRECOMPUTE_THRESHOLD 23 +#define SET_STR_DC_THRESHOLD 266 +#define SET_STR_PRECOMPUTE_THRESHOLD 1648 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/invert_limb.asm gmp-5.0.2+dfsg/mpn/x86_64/invert_limb.asm --- gmp-4.3.2+dfsg/mpn/x86_64/invert_limb.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/invert_limb.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,8 @@ dnl AMD64 mpn_invert_limb -- Invert a normalized limb. -dnl Copyright 2004, 2007, 2008 Free Software Foundation, Inc. +dnl Contributed to the GNU project by Torbjorn Granlund and Niels Möller. + +dnl Copyright 2004, 2007, 2008, 2009 Free Software Foundation, Inc. dnl This file is part of the GNU MP Library. @@ -21,10 +23,12 @@ C cycles/limb (approx) div -C K8: 40 71 -C P4: 141 161 -C P6-15 (Core2): 63 116 -C P6-28 (Atom): 130 191 +C K8,K9: 48 71 +C K10: 48 77 +C P4: 135 161 +C P6 core2: 69 116 +C P6 corei7: 55 89 +C P6 atom: 129 191 C rax rcx rdx rdi rsi r8 @@ -32,9 +36,9 @@ ASM_START() TEXT ALIGN(16) -PROLOGUE(mpn_invert_limb) - mov %rdi, %rax - shr $55, %rax +PROLOGUE(mpn_invert_limb) C Kn C2 Ci + mov %rdi, %rax C 0 0 0 + shr $55, %rax C 1 1 1 ifdef(`PIC',` ifdef(`DARWIN',` mov approx_tab@GOTPCREL(%rip), %r8 @@ -44,78 +48,86 @@ ')',` movabs $-512+approx_tab, %r8 ') - movzwl (%r8,%rax,2), R32(%rcx) - mov %rdi, %rsi - mov R32(%rcx), R32(%rax) - imul R32(%rcx), R32(%rcx) - shr $32, %rsi - imul %rsi, %rcx - shr $31, %rcx - sal $17, %rax - sub %rcx, %rax - mov %rax, %r8 - imul %rax, %rax - sal $33, %r8 - mul %rdi - neg %rdx - lea (%r8,%rdx,2), %rax - mov %rax, %r8 - mul %rax - mov %rax, %rcx - mov %rdx, %rax - mul %rdi - mov %rax, %rsi - mov %rcx, %rax - mov %rdx, %rcx - mul %rdi - add %rdx, %rsi - sbb %rcx, %r8 - shr $62, %rsi - add $1, %rsi - sal $2, %r8 - sub %rsi, %r8 + movzwl (%r8,%rax,2), R32(%rcx) C %rcx = v0 + + C v1 = (v0 << 11) - (v0*v0*d40 >> 40) - 1 + mov %rdi, %rsi C 0 0 0 + mov R32(%rcx), R32(%rax) C 4 5 5 + imul R32(%rcx), R32(%rcx) C 4 5 5 + shr $24, %rsi C 1 1 1 + inc %rsi C %rsi = d40 + imul %rsi, %rcx C 8 10 8 + shr $40, %rcx C 12 15 11 + sal $11, R32(%rax) C 5 6 6 + dec R32(%rax) + sub R32(%rcx), R32(%rax) C %rax = v1 + + C v2 = (v1 << 13) + (v1 * (2^60 - v1*d40) >> 47 + mov $0x1000000000000000, %rcx + imul %rax, %rsi C 14 17 13 + sub %rsi, %rcx + imul %rax, %rcx + sal $13, %rax + shr $47, %rcx + add %rax, %rcx C %rcx = v2 + + C v3 = (v2 << 31) + (v2 * (2^96 - v2 * d63 + (v2>>1) & mask) >> 65 + mov %rdi, %rsi C 0 0 0 + shr $1, %rsi C d/2 + sbb %rax, %rax C -d0 = -(d mod 2) + sub %rax, %rsi C d63 = ceil(d/2) + imul %rcx, %rsi C v2 * d63 + and %rcx, %rax C v2 * d0 + shr $1, %rax C (v2>>1) * d0 + sub %rsi, %rax C (v2>>1) * d0 - v2 * d63 + mul %rcx + sal $31, %rcx + shr $1, %rdx + add %rdx, %rcx C %rcx = v3 + mov %rdi, %rax - mul %r8 - add %rdi, %rax C xl += d - adc %rdi, %rdx C xh += d - mov %r8, %rax - sub %rdx, %rax C return zh - xh + mul %rcx + add %rdi, %rax + mov %rcx, %rax + adc %rdi, %rdx + sub %rdx, %rax + ret EPILOGUE() RODATA ALIGN(2) approx_tab: - .value 0xffc0,0xfec0,0xfdc0,0xfcc0,0xfbc0,0xfac0,0xfa00,0xf900 - .value 0xf800,0xf700,0xf640,0xf540,0xf440,0xf380,0xf280,0xf180 - .value 0xf0c0,0xefc0,0xef00,0xee00,0xed40,0xec40,0xeb80,0xeac0 - .value 0xe9c0,0xe900,0xe840,0xe740,0xe680,0xe5c0,0xe500,0xe400 - .value 0xe340,0xe280,0xe1c0,0xe100,0xe040,0xdf80,0xdec0,0xde00 - .value 0xdd40,0xdc80,0xdbc0,0xdb00,0xda40,0xd980,0xd8c0,0xd800 - .value 0xd740,0xd680,0xd600,0xd540,0xd480,0xd3c0,0xd340,0xd280 - .value 0xd1c0,0xd140,0xd080,0xcfc0,0xcf40,0xce80,0xcdc0,0xcd40 - .value 0xcc80,0xcc00,0xcb40,0xcac0,0xca00,0xc980,0xc8c0,0xc840 - .value 0xc780,0xc700,0xc640,0xc5c0,0xc540,0xc480,0xc400,0xc380 - .value 0xc2c0,0xc240,0xc1c0,0xc100,0xc080,0xc000,0xbf80,0xbec0 - .value 0xbe40,0xbdc0,0xbd40,0xbc80,0xbc00,0xbb80,0xbb00,0xba80 - .value 0xba00,0xb980,0xb900,0xb840,0xb7c0,0xb740,0xb6c0,0xb640 - .value 0xb5c0,0xb540,0xb4c0,0xb440,0xb3c0,0xb340,0xb2c0,0xb240 - .value 0xb1c0,0xb140,0xb0c0,0xb080,0xb000,0xaf80,0xaf00,0xae80 - .value 0xae00,0xad80,0xad40,0xacc0,0xac40,0xabc0,0xab40,0xaac0 - .value 0xaa80,0xaa00,0xa980,0xa900,0xa8c0,0xa840,0xa7c0,0xa740 - .value 0xa700,0xa680,0xa600,0xa5c0,0xa540,0xa4c0,0xa480,0xa400 - .value 0xa380,0xa340,0xa2c0,0xa240,0xa200,0xa180,0xa140,0xa0c0 - .value 0xa080,0xa000,0x9f80,0x9f40,0x9ec0,0x9e80,0x9e00,0x9dc0 - .value 0x9d40,0x9d00,0x9c80,0x9c40,0x9bc0,0x9b80,0x9b00,0x9ac0 - .value 0x9a40,0x9a00,0x9980,0x9940,0x98c0,0x9880,0x9840,0x97c0 - .value 0x9780,0x9700,0x96c0,0x9680,0x9600,0x95c0,0x9580,0x9500 - .value 0x94c0,0x9440,0x9400,0x93c0,0x9340,0x9300,0x92c0,0x9240 - .value 0x9200,0x91c0,0x9180,0x9100,0x90c0,0x9080,0x9000,0x8fc0 - .value 0x8f80,0x8f40,0x8ec0,0x8e80,0x8e40,0x8e00,0x8d80,0x8d40 - .value 0x8d00,0x8cc0,0x8c80,0x8c00,0x8bc0,0x8b80,0x8b40,0x8b00 - .value 0x8a80,0x8a40,0x8a00,0x89c0,0x8980,0x8940,0x88c0,0x8880 - .value 0x8840,0x8800,0x87c0,0x8780,0x8740,0x8700,0x8680,0x8640 - .value 0x8600,0x85c0,0x8580,0x8540,0x8500,0x84c0,0x8480,0x8440 - .value 0x8400,0x8380,0x8340,0x8300,0x82c0,0x8280,0x8240,0x8200 - .value 0x81c0,0x8180,0x8140,0x8100,0x80c0,0x8080,0x8040,0x8000 + .value 0x7fd,0x7f5,0x7ed,0x7e5,0x7dd,0x7d5,0x7ce,0x7c6 + .value 0x7bf,0x7b7,0x7b0,0x7a8,0x7a1,0x79a,0x792,0x78b + .value 0x784,0x77d,0x776,0x76f,0x768,0x761,0x75b,0x754 + .value 0x74d,0x747,0x740,0x739,0x733,0x72c,0x726,0x720 + .value 0x719,0x713,0x70d,0x707,0x700,0x6fa,0x6f4,0x6ee + .value 0x6e8,0x6e2,0x6dc,0x6d6,0x6d1,0x6cb,0x6c5,0x6bf + .value 0x6ba,0x6b4,0x6ae,0x6a9,0x6a3,0x69e,0x698,0x693 + .value 0x68d,0x688,0x683,0x67d,0x678,0x673,0x66e,0x669 + .value 0x664,0x65e,0x659,0x654,0x64f,0x64a,0x645,0x640 + .value 0x63c,0x637,0x632,0x62d,0x628,0x624,0x61f,0x61a + .value 0x616,0x611,0x60c,0x608,0x603,0x5ff,0x5fa,0x5f6 + .value 0x5f1,0x5ed,0x5e9,0x5e4,0x5e0,0x5dc,0x5d7,0x5d3 + .value 0x5cf,0x5cb,0x5c6,0x5c2,0x5be,0x5ba,0x5b6,0x5b2 + .value 0x5ae,0x5aa,0x5a6,0x5a2,0x59e,0x59a,0x596,0x592 + .value 0x58e,0x58a,0x586,0x583,0x57f,0x57b,0x577,0x574 + .value 0x570,0x56c,0x568,0x565,0x561,0x55e,0x55a,0x556 + .value 0x553,0x54f,0x54c,0x548,0x545,0x541,0x53e,0x53a + .value 0x537,0x534,0x530,0x52d,0x52a,0x526,0x523,0x520 + .value 0x51c,0x519,0x516,0x513,0x50f,0x50c,0x509,0x506 + .value 0x503,0x500,0x4fc,0x4f9,0x4f6,0x4f3,0x4f0,0x4ed + .value 0x4ea,0x4e7,0x4e4,0x4e1,0x4de,0x4db,0x4d8,0x4d5 + .value 0x4d2,0x4cf,0x4cc,0x4ca,0x4c7,0x4c4,0x4c1,0x4be + .value 0x4bb,0x4b9,0x4b6,0x4b3,0x4b0,0x4ad,0x4ab,0x4a8 + .value 0x4a5,0x4a3,0x4a0,0x49d,0x49b,0x498,0x495,0x493 + .value 0x490,0x48d,0x48b,0x488,0x486,0x483,0x481,0x47e + .value 0x47c,0x479,0x477,0x474,0x472,0x46f,0x46d,0x46a + .value 0x468,0x465,0x463,0x461,0x45e,0x45c,0x459,0x457 + .value 0x455,0x452,0x450,0x44e,0x44b,0x449,0x447,0x444 + .value 0x442,0x440,0x43e,0x43b,0x439,0x437,0x435,0x432 + .value 0x430,0x42e,0x42c,0x42a,0x428,0x425,0x423,0x421 + .value 0x41f,0x41d,0x41b,0x419,0x417,0x414,0x412,0x410 + .value 0x40e,0x40c,0x40a,0x408,0x406,0x404,0x402,0x400 ASM_END() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/lshift.asm gmp-5.0.2+dfsg/mpn/x86_64/lshift.asm --- gmp-4.3.2+dfsg/mpn/x86_64/lshift.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/lshift.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ dnl AMD64 mpn_lshift -- mpn left shift. -dnl Copyright 2003, 2005, 2007 Free Software Foundation, Inc. +dnl Copyright 2003, 2005, 2007, 2009 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl @@ -38,7 +38,7 @@ TEXT ALIGN(32) PROLOGUE(mpn_lshift) - cmp $1, %cl + cmp $1, R8(%rcx) jne L(gen) C For cnt=1 we want to work from lowest limb towards higher limbs. @@ -77,27 +77,27 @@ dec n jne L(t1) - inc %eax - dec %eax + inc R32(%rax) + dec R32(%rax) jne L(n00) - adc %eax, %eax + adc R32(%rax), R32(%rax) ret -L(e1): test %eax, %eax C clear cy +L(e1): test R32(%rax), R32(%rax) C clear cy L(n00): mov (up), %r8 - dec %eax + dec R32(%rax) jne L(n01) adc %r8, %r8 mov %r8, (rp) -L(ret): adc %eax, %eax +L(ret): adc R32(%rax), R32(%rax) ret -L(n01): dec %eax +L(n01): dec R32(%rax) mov 8(up), %r9 jne L(n10) adc %r8, %r8 adc %r9, %r9 mov %r8, (rp) mov %r9, 8(rp) - adc %eax, %eax + adc R32(%rax), R32(%rax) ret L(n10): mov 16(up), %r10 adc %r8, %r8 @@ -106,14 +106,14 @@ mov %r8, (rp) mov %r9, 8(rp) mov %r10, 16(rp) - adc $-1, %eax + adc $-1, R32(%rax) ret -L(gen): neg %ecx C put rsh count in cl +L(gen): neg R32(%rcx) C put rsh count in cl mov -8(up,n,8), %rax - shr %cl, %rax C function return value + shr R8(%rcx), %rax C function return value - neg %ecx C put lsh count in cl + neg R32(%rcx) C put lsh count in cl lea 1(n), R32(%r8) and $3, R32(%r8) je L(rlx) C jump for n = 3, 7, 11, ... @@ -122,10 +122,10 @@ jne L(1) C n = 4, 8, 12, ... mov -8(up,n,8), %r10 - shl %cl, %r10 - neg %ecx C put rsh count in cl + shl R8(%rcx), %r10 + neg R32(%rcx) C put rsh count in cl mov -16(up,n,8), %r8 - shr %cl, %r8 + shr R8(%rcx), %r8 or %r8, %r10 mov %r10, -8(rp,n,8) dec n @@ -135,90 +135,90 @@ je L(1x) C jump for n = 1, 5, 9, 13, ... C n = 2, 6, 10, 16, ... mov -8(up,n,8), %r10 - shl %cl, %r10 - neg %ecx C put rsh count in cl + shl R8(%rcx), %r10 + neg R32(%rcx) C put rsh count in cl mov -16(up,n,8), %r8 - shr %cl, %r8 + shr R8(%rcx), %r8 or %r8, %r10 mov %r10, -8(rp,n,8) dec n - neg %ecx C put lsh count in cl + neg R32(%rcx) C put lsh count in cl L(1x): cmp $1, n je L(ast) mov -8(up,n,8), %r10 - shl %cl, %r10 + shl R8(%rcx), %r10 mov -16(up,n,8), %r11 - shl %cl, %r11 - neg %ecx C put rsh count in cl + shl R8(%rcx), %r11 + neg R32(%rcx) C put rsh count in cl mov -16(up,n,8), %r8 mov -24(up,n,8), %r9 - shr %cl, %r8 + shr R8(%rcx), %r8 or %r8, %r10 - shr %cl, %r9 + shr R8(%rcx), %r9 or %r9, %r11 mov %r10, -8(rp,n,8) mov %r11, -16(rp,n,8) sub $2, n -L(rll): neg %ecx C put lsh count in cl +L(rll): neg R32(%rcx) C put lsh count in cl L(rlx): mov -8(up,n,8), %r10 - shl %cl, %r10 + shl R8(%rcx), %r10 mov -16(up,n,8), %r11 - shl %cl, %r11 + shl R8(%rcx), %r11 sub $4, n C 4 jb L(end) C 2 ALIGN(16) L(top): C finish stuff from lsh block - neg %ecx C put rsh count in cl + neg R32(%rcx) C put rsh count in cl mov 16(up,n,8), %r8 mov 8(up,n,8), %r9 - shr %cl, %r8 + shr R8(%rcx), %r8 or %r8, %r10 - shr %cl, %r9 + shr R8(%rcx), %r9 or %r9, %r11 mov %r10, 24(rp,n,8) mov %r11, 16(rp,n,8) C start two new rsh mov 0(up,n,8), %r8 mov -8(up,n,8), %r9 - shr %cl, %r8 - shr %cl, %r9 + shr R8(%rcx), %r8 + shr R8(%rcx), %r9 C finish stuff from rsh block - neg %ecx C put lsh count in cl + neg R32(%rcx) C put lsh count in cl mov 8(up,n,8), %r10 mov 0(up,n,8), %r11 - shl %cl, %r10 + shl R8(%rcx), %r10 or %r10, %r8 - shl %cl, %r11 + shl R8(%rcx), %r11 or %r11, %r9 mov %r8, 8(rp,n,8) mov %r9, 0(rp,n,8) C start two new lsh mov -8(up,n,8), %r10 mov -16(up,n,8), %r11 - shl %cl, %r10 - shl %cl, %r11 + shl R8(%rcx), %r10 + shl R8(%rcx), %r11 sub $4, n jae L(top) C 2 L(end): - neg %ecx C put rsh count in cl - mov 16(up,n,8), %r8 - shr %cl, %r8 + neg R32(%rcx) C put rsh count in cl + mov 8(up), %r8 + shr R8(%rcx), %r8 or %r8, %r10 - mov 8(up,n,8), %r9 - shr %cl, %r9 + mov (up), %r9 + shr R8(%rcx), %r9 or %r9, %r11 - mov %r10, 24(rp,n,8) - mov %r11, 16(rp,n,8) + mov %r10, 16(rp) + mov %r11, 8(rp) - neg %ecx C put lsh count in cl + neg R32(%rcx) C put lsh count in cl L(ast): mov (up), %r10 - shl %cl, %r10 + shl R8(%rcx), %r10 mov %r10, (rp) ret EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/lshiftc.asm gmp-5.0.2+dfsg/mpn/x86_64/lshiftc.asm --- gmp-4.3.2+dfsg/mpn/x86_64/lshiftc.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/lshiftc.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,164 @@ +dnl AMD64 mpn_lshiftc -- mpn left shift with complement. + +dnl Copyright 2003, 2005, 2006, 2009 Free Software Foundation, Inc. +dnl +dnl This file is part of the GNU MP Library. +dnl +dnl The GNU MP Library is free software; you can redistribute it and/or +dnl modify it under the terms of the GNU Lesser General Public License as +dnl published by the Free Software Foundation; either version 3 of the +dnl License, or (at your option) any later version. +dnl +dnl The GNU MP Library is distributed in the hope that it will be useful, +dnl but WITHOUT ANY WARRANTY; without even the implied warranty of +dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +dnl Lesser General Public License for more details. +dnl +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C K8,K9: 2.75 +C K10: 2.75 +C P4: ? +C P6-15 (Core2): ? +C P6-28 (Atom): ? + + +C INPUT PARAMETERS +define(`rp', `%rdi') +define(`up', `%rsi') +define(`n', `%rdx') +define(`cnt', `%rcx') + +ASM_START() + TEXT + ALIGN(32) +PROLOGUE(mpn_lshiftc) + neg R32(%rcx) C put rsh count in cl + mov -8(up,n,8), %rax + shr R8(%rcx), %rax C function return value + + neg R32(%rcx) C put lsh count in cl + lea 1(n), R32(%r8) + and $3, R32(%r8) + je L(rlx) C jump for n = 3, 7, 11, ... + + dec R32(%r8) + jne L(1) +C n = 4, 8, 12, ... + mov -8(up,n,8), %r10 + shl R8(%rcx), %r10 + neg R32(%rcx) C put rsh count in cl + mov -16(up,n,8), %r8 + shr R8(%rcx), %r8 + or %r8, %r10 + not %r10 + mov %r10, -8(rp,n,8) + dec n + jmp L(rll) + +L(1): dec R32(%r8) + je L(1x) C jump for n = 1, 5, 9, 13, ... +C n = 2, 6, 10, 16, ... + mov -8(up,n,8), %r10 + shl R8(%rcx), %r10 + neg R32(%rcx) C put rsh count in cl + mov -16(up,n,8), %r8 + shr R8(%rcx), %r8 + or %r8, %r10 + not %r10 + mov %r10, -8(rp,n,8) + dec n + neg R32(%rcx) C put lsh count in cl +L(1x): + cmp $1, n + je L(ast) + mov -8(up,n,8), %r10 + shl R8(%rcx), %r10 + mov -16(up,n,8), %r11 + shl R8(%rcx), %r11 + neg R32(%rcx) C put rsh count in cl + mov -16(up,n,8), %r8 + mov -24(up,n,8), %r9 + shr R8(%rcx), %r8 + or %r8, %r10 + shr R8(%rcx), %r9 + or %r9, %r11 + not %r10 + not %r11 + mov %r10, -8(rp,n,8) + mov %r11, -16(rp,n,8) + sub $2, n + +L(rll): neg R32(%rcx) C put lsh count in cl +L(rlx): mov -8(up,n,8), %r10 + shl R8(%rcx), %r10 + mov -16(up,n,8), %r11 + shl R8(%rcx), %r11 + + sub $4, n C 4 + jb L(end) C 2 + ALIGN(16) +L(top): + C finish stuff from lsh block + neg R32(%rcx) C put rsh count in cl + mov 16(up,n,8), %r8 + mov 8(up,n,8), %r9 + shr R8(%rcx), %r8 + or %r8, %r10 + shr R8(%rcx), %r9 + or %r9, %r11 + not %r10 + not %r11 + mov %r10, 24(rp,n,8) + mov %r11, 16(rp,n,8) + C start two new rsh + mov 0(up,n,8), %r8 + mov -8(up,n,8), %r9 + shr R8(%rcx), %r8 + shr R8(%rcx), %r9 + + C finish stuff from rsh block + neg R32(%rcx) C put lsh count in cl + mov 8(up,n,8), %r10 + mov 0(up,n,8), %r11 + shl R8(%rcx), %r10 + or %r10, %r8 + shl R8(%rcx), %r11 + or %r11, %r9 + not %r8 + not %r9 + mov %r8, 8(rp,n,8) + mov %r9, 0(rp,n,8) + C start two new lsh + mov -8(up,n,8), %r10 + mov -16(up,n,8), %r11 + shl R8(%rcx), %r10 + shl R8(%rcx), %r11 + + sub $4, n + jae L(top) C 2 +L(end): + neg R32(%rcx) C put rsh count in cl + mov 16(up,n,8), %r8 + shr R8(%rcx), %r8 + or %r8, %r10 + mov 8(up,n,8), %r9 + shr R8(%rcx), %r9 + or %r9, %r11 + not %r10 + not %r11 + mov %r10, 24(rp,n,8) + mov %r11, 16(rp,n,8) + + neg R32(%rcx) C put lsh count in cl +L(ast): mov (up), %r10 + shl R8(%rcx), %r10 + not %r10 + mov %r10, (rp) + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/lshsub_n.asm gmp-5.0.2+dfsg/mpn/x86_64/lshsub_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/lshsub_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/lshsub_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -39,7 +39,7 @@ define(`up', `%rsi') define(`vp', `%rdx') define(`n', `%rcx') -define(`cnt' `%r8') +define(`cnt', `%r8') ASM_START() TEXT diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/mod_1_4.asm gmp-5.0.2+dfsg/mpn/x86_64/mod_1_4.asm --- gmp-4.3.2+dfsg/mpn/x86_64/mod_1_4.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/mod_1_4.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,235 @@ +dnl AMD64 mpn_mod_1s_4p + +dnl Contributed to the GNU project by Torbjorn Granlund. + +dnl Copyright 2009 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + +C cycles/limb +C K8,K9: 3.0 +C K10: 3.0 +C P4: 14.5 +C P6 core2: 5.0 +C P6 corei7: 4.3 +C P6 atom: 25.0 + +ASM_START() + TEXT + ALIGN(16) +PROLOGUE(mpn_mod_1s_4p) + push %r14 + push %r13 + push %r12 + push %rbp + push %rbx + + mov %rdx, -16(%rsp) + mov %rcx, %r14 + mov 16(%rcx), %r11 + mov 24(%rcx), %rbx + mov 32(%rcx), %rbp + mov 40(%rcx), %r13 + mov 48(%rcx), %r12 + xor R32(%r8), R32(%r8) + mov R32(%rsi), R32(%rdx) + and $3, R32(%rdx) + je L(b0) + cmp $2, R32(%rdx) + jc L(b1) + je L(b2) + +L(b3): lea -24(%rdi,%rsi,8), %rdi + mov 8(%rdi), %rax + mul %r11 + mov (%rdi), %r9 + add %rax, %r9 + adc %rdx, %r8 + mov 16(%rdi), %rax + mul %rbx + jmp L(m0) + + ALIGN(8) +L(b0): lea -32(%rdi,%rsi,8), %rdi + mov 8(%rdi), %rax + mul %r11 + mov (%rdi), %r9 + add %rax, %r9 + adc %rdx, %r8 + mov 16(%rdi), %rax + mul %rbx + add %rax, %r9 + adc %rdx, %r8 + mov 24(%rdi), %rax + mul %rbp + jmp L(m0) + + ALIGN(8) +L(b1): lea -8(%rdi,%rsi,8), %rdi + mov (%rdi), %r9 + jmp L(m1) + + ALIGN(8) +L(b2): lea -16(%rdi,%rsi,8), %rdi + mov 8(%rdi), %rax + mul %r11 + mov (%rdi), %r9 + jmp L(m0) + + ALIGN(16) +L(top): mov -24(%rdi), %rax + mov -32(%rdi), %r10 + mul %r11 + add %rax, %r10 + mov -16(%rdi), %rax + mov %rdx, %rcx + adc $0, %rcx + mul %rbx + add %rax, %r10 + mov -8(%rdi), %rax + adc %rdx, %rcx + sub $32, %rdi + mul %rbp + add %rax, %r10 + mov %r9, %rax + adc %rdx, %rcx + mul %r13 + add %rax, %r10 + mov %r8, %rax + adc %rdx, %rcx + mul %r12 + mov %r10, %r9 + mov %rcx, %r8 +L(m0): add %rax, %r9 + adc %rdx, %r8 +L(m1): sub $4, %rsi + ja L(top) + +L(end): mov 8(%r14), R32(%rsi) + mov %r8, %rax + mul %r11 + mov %rax, %r8 + add %r9, %r8 + adc $0, %rdx + xor R32(%rcx), R32(%rcx) + sub R32(%rsi), R32(%rcx) + mov %r8, %rdi + shr R8(%rcx), %rdi + mov R32(%rsi), R32(%rcx) + sal R8(%rcx), %rdx + or %rdx, %rdi + mov %rdi, %rax + mulq (%r14) + mov -16(%rsp), %rbx + mov %rax, %r9 + sal R8(%rcx), %r8 + inc %rdi + add %r8, %r9 + adc %rdi, %rdx + imul %rbx, %rdx + sub %rdx, %r8 + lea (%r8,%rbx), %rax + cmp %r8, %r9 + cmovb %rax, %r8 + mov %r8, %rax + sub %rbx, %rax + cmovb %r8, %rax + shr R8(%rcx), %rax + pop %rbx + pop %rbp + pop %r12 + pop %r13 + pop %r14 + ret +EPILOGUE() + + ALIGN(16) +PROLOGUE(mpn_mod_1s_4p_cps) + push %r12 + bsr %rsi, %rcx + push %rbp + xor $63, R32(%rcx) + mov %rsi, %rbp + mov R32(%rcx), R32(%r12) + sal R8(%rcx), %rbp + push %rbx + mov %rdi, %rbx + mov %rbp, %rdi + CALL( mpn_invert_limb) + mov R32(%r12), R32(%rcx) + mov $1, R32(%r10) + sal R8(%rcx), %r10 + mov $64, R32(%rcx) + mov %rax, %r9 + sub R32(%r12), R32(%rcx) + mov %r9, (%rbx) + shr R8(%rcx), %rax + mov R32(%r12), R32(%rcx) + or %rax, %r10 + mov %rbp, %rax + neg %rax + imul %rax, %r10 + mov %r10, %rax + mul %r9 + lea 1(%r10,%rdx), %r8 + neg %r8 + imul %rbp, %r8 + cmp %r8, %rax + lea (%r8,%rbp), %rdx + cmovb %rdx, %r8 + mov %r8, %rax + mul %r9 + lea 1(%r8,%rdx), %rdi + neg %rdi + imul %rbp, %rdi + cmp %rdi, %rax + lea (%rdi,%rbp), %rdx + cmovb %rdx, %rdi + mov %rdi, %rax + mul %r9 + lea 1(%rdi,%rdx), %rsi + neg %rsi + imul %rbp, %rsi + cmp %rsi, %rax + lea (%rsi,%rbp), %rdx + cmovb %rdx, %rsi + mov %rsi, %rax + mul %r9 + lea 1(%rsi,%rdx), %rdx + neg %rdx + imul %rbp, %rdx + cmp %rdx, %rax + lea (%rdx,%rbp), %rbp + movslq R32(%r12), %rax + cmovae %rdx, %rbp + shr R8(%rcx), %r10 + shr R8(%rcx), %r8 + shr R8(%rcx), %rbp + shr R8(%rcx), %rdi + shr R8(%rcx), %rsi + mov %rbp, 48(%rbx) + mov %rax, 8(%rbx) + mov %r10, 16(%rbx) + mov %r8, 24(%rbx) + mov %rdi, 32(%rbx) + mov %rsi, 40(%rbx) + pop %rbx + pop %rbp + pop %r12 + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/mod_34lsub1.asm gmp-5.0.2+dfsg/mpn/x86_64/mod_34lsub1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/mod_34lsub1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/mod_34lsub1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -37,8 +37,8 @@ C TODO C * Apply the movzwl tricks to the x86/k7 code -C * Review feed-in and wind-down code. In particular, try to avoid adcq and -C sbbq to placate Pentium4. +C * Review feed-in and wind-down code. In particular, try to avoid adc and +C sbb to placate Pentium4. C * More unrolling and/or index addressing could bring time to under 1 c/l C for Athlon64, approaching 0.67 c/l seems possible. C * There are recurrencies on the carry registers (r8, r9, r10) that might @@ -47,14 +47,14 @@ C * For ultimate Athlon64 performance, a sequence like this might be best. C It should reach 0.5 c/l (limited by L1 cache bandwidth). C -C addq (%rdi), %rax -C adcq 8(%rdi), %rcx -C adcq 16(%rdi), %rdx -C adcq $0, %r8 -C addq 24(%rdi), %rax -C adcq 32(%rdi), %rcx -C adcq 40(%rdi), %rdx -C adcq $0, %r8 +C add (%rdi), %rax +C adc 8(%rdi), %rcx +C adc 16(%rdi), %rdx +C adc $0, %r8 +C add 24(%rdi), %rax +C adc 32(%rdi), %rcx +C adc 40(%rdi), %rdx +C adc $0, %r8 C ... diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/mode1o.asm gmp-5.0.2+dfsg/mpn/x86_64/mode1o.asm --- gmp-4.3.2+dfsg/mpn/x86_64/mode1o.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/mode1o.asm 2011-05-08 09:49:29.000000000 +0000 @@ -25,8 +25,9 @@ C K8,K9: 10 C K10: 10 C P4: 33 -C P6-15 (Core2):13 -C P6-28 (Atom): 35 +C P6 core2: 13 +C P6 corei7: 14.5 +C P6 Atom: 35 C mp_limb_t mpn_modexact_1_odd (mp_srcptr src, mp_size_t size, diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/mul_1.asm gmp-5.0.2+dfsg/mpn/x86_64/mul_1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/mul_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/mul_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -23,9 +23,9 @@ C K8,K9: 2.5 C K10: 2.5 C P4: 12.3 -C P6-15: 4.0 -C P6-15 (Core2): 4.0 -C P6-28 (Atom): 19.8 +C P6 core2: 4.0 +C P6 corei7: 3.8 +C Atom: 19.8 C The inner loop of this code is the result of running a code generation and C optimization tool suite written by David Harvey and Torbjorn Granlund. diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/mul_2.asm gmp-5.0.2+dfsg/mpn/x86_64/mul_2.asm --- gmp-4.3.2+dfsg/mpn/x86_64/mul_2.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/mul_2.asm 2011-05-08 09:49:29.000000000 +0000 @@ -24,7 +24,8 @@ C K8,K9: 2.275 C K10: 2.275 C P4: ? -C P6-15: 4.0 +C P6 core2: 4.0 +C P6 corei7: 3.8 C This code is the result of running a code generation and optimization tool C suite written by David Harvey and Torbjorn Granlund. diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/mul_basecase.asm gmp-5.0.2+dfsg/mpn/x86_64/mul_basecase.asm --- gmp-4.3.2+dfsg/mpn/x86_64/mul_basecase.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/mul_basecase.asm 2011-05-08 09:49:29.000000000 +0000 @@ -33,7 +33,6 @@ C TODO C * Use fewer registers. (how??? I can't see it -- david) C * Avoid some "mov $0,r" and instead use "xor r,r". -C * Don't align loops to a 32-byte boundaries. C * Can the top of each L(addmul_outer_n) prologue be folded into the C mul_1/mul_2 prologues, saving a LEA (%rip)? It would slow down the C case where vn = 1 or 2; is it worth it? diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/nano/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86_64/nano/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86_64/nano/gmp-mparam.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/nano/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,208 @@ +/* VIA Nano gmp-mparam.h -- Compiler/machine parameter header file. + +Copyright 1991, 1993, 1994, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, +2008, 2009, 2010 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#define GMP_LIMB_BITS 64 +#define BYTES_PER_MP_LIMB 8 + +/* 1600 MHz Nano 2xxx */ + +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 8 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 6 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 10 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 14 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 14 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 24 + +#define MUL_TOOM22_THRESHOLD 28 +#define MUL_TOOM33_THRESHOLD 66 +#define MUL_TOOM44_THRESHOLD 315 +#define MUL_TOOM6H_THRESHOLD 746 +#define MUL_TOOM8H_THRESHOLD 866 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 73 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 201 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 211 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 219 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 38 +#define SQR_TOOM3_THRESHOLD 77 +#define SQR_TOOM4_THRESHOLD 620 +#define SQR_TOOM6_THRESHOLD 996 +#define SQR_TOOM8_THRESHOLD 1138 + +#define MULMOD_BNM1_THRESHOLD 15 +#define SQRMOD_BNM1_THRESHOLD 17 + +#define MUL_FFT_MODF_THRESHOLD 468 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 468, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ + { 12, 5}, { 25, 6}, { 13, 5}, { 27, 6}, \ + { 15, 5}, { 31, 6}, { 21, 7}, { 11, 6}, \ + { 24, 7}, { 13, 6}, { 27, 7}, { 15, 6}, \ + { 31, 7}, { 19, 6}, { 39, 7}, { 21, 8}, \ + { 11, 7}, { 25, 8}, { 13, 7}, { 27, 8}, \ + { 15, 7}, { 32, 8}, { 17, 7}, { 35, 8}, \ + { 19, 7}, { 40, 8}, { 23, 7}, { 47, 8}, \ + { 27, 9}, { 15, 8}, { 35, 9}, { 19, 8}, \ + { 39, 4}, { 767, 5}, { 399, 6}, { 201, 5}, \ + { 415, 6}, { 208, 7}, { 105, 6}, { 214, 7}, \ + { 127, 8}, { 71, 9}, { 39, 8}, { 87, 9}, \ + { 47, 8}, { 97, 9}, { 55,11}, { 15,10}, \ + { 31, 9}, { 67, 8}, { 135, 9}, { 75,10}, \ + { 39, 9}, { 87,10}, { 47, 9}, { 99,10}, \ + { 55,11}, { 31,10}, { 63, 9}, { 127,10}, \ + { 87,11}, { 47,10}, { 103,12}, { 31,11}, \ + { 63,10}, { 143,11}, { 79,10}, { 167,11}, \ + { 95,10}, { 199,11}, { 111,12}, { 63,11}, \ + { 127, 9}, { 511,11}, { 143,10}, { 287,11}, \ + { 159, 9}, { 639,11}, { 175,12}, { 95,11}, \ + { 191,10}, { 383, 9}, { 767,11}, { 207,10}, \ + { 415, 9}, { 831,13}, { 63,12}, { 127,11}, \ + { 255,10}, { 511, 9}, { 1023,11}, { 271,10}, \ + { 543, 9}, { 1087,11}, { 287,10}, { 575,12}, \ + { 159,11}, { 319,10}, { 639, 9}, { 1279,11}, \ + { 335,10}, { 671, 9}, { 1343,10}, { 703, 9}, \ + { 1407,12}, { 191,11}, { 383,10}, { 767, 9}, \ + { 1535,11}, { 415,10}, { 831, 9}, { 1663,12}, \ + { 223,11}, { 447,13}, { 127,12}, { 255,11}, \ + { 511,10}, { 1023,11}, { 543,10}, { 1087,12}, \ + { 287,11}, { 575,10}, { 1151,11}, { 607,10}, \ + { 1215,12}, { 319,11}, { 671,10}, { 1343,12}, \ + { 351,11}, { 703,10}, { 1407,13}, { 191,12}, \ + { 383,11}, { 767,10}, { 1599,12}, { 415,11}, \ + { 831,10}, { 1663,12}, { 447,11}, { 895,14}, \ + { 127,13}, { 255,12}, { 511,11}, { 1023,12}, \ + { 543,11}, { 1087,10}, { 2175,12}, { 575,11}, \ + { 1151,12}, { 607,11}, { 1215,13}, { 319,12}, \ + { 639,11}, { 1343,12}, { 703,11}, { 1407,12}, \ + { 735,11}, { 1471,13}, { 383,12}, { 767,11}, \ + { 1535,12}, { 831,11}, { 1663,13}, { 447,12}, \ + { 895,11}, { 1791,12}, { 959,11}, { 1919,13}, \ + { 511,12}, { 1023,11}, { 2047,12}, { 1087,11}, \ + { 2175,13}, { 575,12}, { 1215,13}, { 639,12}, \ + { 1343,13}, { 703,12}, { 1471,13}, { 767,12}, \ + { 1535,13}, { 831,12}, { 1663,13}, { 895,12}, \ + { 1791,13}, { 959,12}, { 1919,14}, { 511,13}, \ + { 1023,12}, { 2047,13}, { 1087,12}, { 2175,13}, \ + { 1215,14}, { 639,13}, { 1471,14}, { 767,13}, \ + { 1727,14}, { 895,13}, { 1791,12}, { 3583,13}, \ + { 8192,14}, { 16384,15}, { 32768,16}, { 65536,17}, \ + { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ + {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 215 +#define MUL_FFT_THRESHOLD 3712 + +#define SQR_FFT_MODF_THRESHOLD 432 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 432, 5}, { 21, 6}, { 11, 5}, { 23, 6}, \ + { 12, 5}, { 25, 6}, { 21, 7}, { 11, 6}, \ + { 25, 7}, { 13, 6}, { 27, 7}, { 25, 8}, \ + { 13, 7}, { 28, 8}, { 15, 7}, { 32, 8}, \ + { 17, 7}, { 35, 8}, { 19, 7}, { 39, 8}, \ + { 27, 9}, { 15, 8}, { 35, 9}, { 19, 8}, \ + { 41, 9}, { 23, 8}, { 47, 9}, { 27,10}, \ + { 15, 6}, { 255, 4}, { 1151, 5}, { 607, 7}, \ + { 167, 8}, { 99, 9}, { 55,10}, { 31, 9}, \ + { 75,10}, { 39, 9}, { 87,10}, { 47, 9}, \ + { 103,10}, { 55, 9}, { 111,11}, { 31,10}, \ + { 63, 9}, { 131,10}, { 71, 9}, { 143,10}, \ + { 79,11}, { 47,10}, { 103,12}, { 31,11}, \ + { 63,10}, { 135, 9}, { 271,10}, { 143,11}, \ + { 79,10}, { 159, 9}, { 319,10}, { 167,11}, \ + { 95,10}, { 191, 9}, { 383, 8}, { 767,10}, \ + { 199,11}, { 111,12}, { 63,11}, { 127,10}, \ + { 255, 9}, { 511, 8}, { 1023,11}, { 143, 9}, \ + { 575, 8}, { 1151,11}, { 159,10}, { 319, 9}, \ + { 639, 8}, { 1279,12}, { 95,11}, { 191,10}, \ + { 383, 9}, { 767, 8}, { 1535, 9}, { 799,11}, \ + { 207,10}, { 415, 9}, { 831,13}, { 63,12}, \ + { 127,11}, { 255,10}, { 511, 9}, { 1023,11}, \ + { 271,10}, { 543, 9}, { 1087,10}, { 575, 9}, \ + { 1151,11}, { 303,12}, { 159,10}, { 639, 9}, \ + { 1279,11}, { 335,10}, { 671, 9}, { 1343,11}, \ + { 351,10}, { 703, 9}, { 1471,12}, { 191,11}, \ + { 383,10}, { 767, 9}, { 1535,11}, { 399,10}, \ + { 799,11}, { 415,10}, { 831, 9}, { 1663,12}, \ + { 223,11}, { 447,10}, { 895,13}, { 127,12}, \ + { 255,11}, { 511,10}, { 1023,11}, { 543,10}, \ + { 1087,12}, { 287,11}, { 575,10}, { 1215,11}, \ + { 639,10}, { 1279,11}, { 671,10}, { 1343,11}, \ + { 703,10}, { 1407,11}, { 735,10}, { 1471,13}, \ + { 191,12}, { 383,11}, { 767,10}, { 1535,11}, \ + { 799,10}, { 1599,12}, { 415,11}, { 831,10}, \ + { 1663,11}, { 863,12}, { 447,11}, { 895,10}, \ + { 1791,11}, { 959,14}, { 127,12}, { 511,11}, \ + { 1023,12}, { 543,11}, { 1087,12}, { 575,11}, \ + { 1215,12}, { 639,11}, { 1279,12}, { 671,11}, \ + { 1343,12}, { 703,11}, { 1471,13}, { 383,12}, \ + { 767,11}, { 1535,12}, { 799,11}, { 1599,12}, \ + { 831,11}, { 1663,12}, { 863,13}, { 447,12}, \ + { 895,11}, { 1791,12}, { 959,13}, { 511,12}, \ + { 1023,11}, { 2047,12}, { 1087,13}, { 575,12}, \ + { 1215,13}, { 639,12}, { 1343,13}, { 703,12}, \ + { 1471,13}, { 767,12}, { 1599,13}, { 831,12}, \ + { 1727,13}, { 895,12}, { 1791,13}, { 959,12}, \ + { 1919,14}, { 511,13}, { 1023,12}, { 2047,13}, \ + { 1215,14}, { 639,13}, { 1471,14}, { 767,13}, \ + { 1727,14}, { 895,13}, { 1791,12}, { 3583,13}, \ + { 8192,14}, { 16384,15}, { 32768,16}, { 65536,17}, \ + { 131072,18}, { 262144,19}, { 524288,20}, {1048576,21}, \ + {2097152,22}, {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 215 +#define SQR_FFT_THRESHOLD 3264 + +#define MULLO_BASECASE_THRESHOLD 17 +#define MULLO_DC_THRESHOLD 0 /* never mpn_mullo_basecase */ +#define MULLO_MUL_N_THRESHOLD 6633 + +#define DC_DIV_QR_THRESHOLD 47 +#define DC_DIVAPPR_Q_THRESHOLD 143 +#define DC_BDIV_QR_THRESHOLD 46 +#define DC_BDIV_Q_THRESHOLD 79 + +#define INV_MULMOD_BNM1_THRESHOLD 130 +#define INV_NEWTON_THRESHOLD 163 +#define INV_APPR_THRESHOLD 155 + +#define BINV_NEWTON_THRESHOLD 228 +#define REDC_1_TO_REDC_2_THRESHOLD 12 +#define REDC_2_TO_REDC_N_THRESHOLD 77 + +#define MU_DIV_QR_THRESHOLD 1787 +#define MU_DIVAPPR_Q_THRESHOLD 1970 +#define MUPI_DIV_QR_THRESHOLD 74 +#define MU_BDIV_QR_THRESHOLD 1334 +#define MU_BDIV_Q_THRESHOLD 1652 + +#define MATRIX22_STRASSEN_THRESHOLD 21 +#define HGCD_THRESHOLD 117 +#define GCD_DC_THRESHOLD 610 +#define GCDEXT_DC_THRESHOLD 469 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 14 +#define GET_STR_PRECOMPUTE_THRESHOLD 22 +#define SET_STR_DC_THRESHOLD 378 +#define SET_STR_PRECOMPUTE_THRESHOLD 2124 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/pentium4/gmp-mparam.h gmp-5.0.2+dfsg/mpn/x86_64/pentium4/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/x86_64/pentium4/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/pentium4/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -18,62 +18,201 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 64 +#define GMP_LIMB_BITS 64 #define BYTES_PER_MP_LIMB 8 /* These routines exists for all x86_64 chips, but they are slower on Pentium4 than separate add/sub and shift. Make sure they are not really used. */ -#undef HAVE_NATIVE_mpn_addlsh1_n -#undef HAVE_NATIVE_mpn_sublsh1_n #undef HAVE_NATIVE_mpn_rsh1add_n #undef HAVE_NATIVE_mpn_rsh1sub_n /* 3200 MHz Pentium / 2048 Kibyte cache / socket 775 */ -/* Generated by tuneup.c, 2009-01-15, gcc 3.4 */ - -#define MUL_KARATSUBA_THRESHOLD 12 -#define MUL_TOOM3_THRESHOLD 91 -#define MUL_TOOM44_THRESHOLD 136 - -#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ -#define SQR_KARATSUBA_THRESHOLD 28 -#define SQR_TOOM3_THRESHOLD 97 -#define SQR_TOOM4_THRESHOLD 218 - -#define MULLOW_BASECASE_THRESHOLD 0 /* always */ -#define MULLOW_DC_THRESHOLD 28 -#define MULLOW_MUL_N_THRESHOLD 246 - -#define DIV_SB_PREINV_THRESHOLD 0 /* always */ -#define DIV_DC_THRESHOLD 35 -#define POWM_THRESHOLD 59 - -#define MATRIX22_STRASSEN_THRESHOLD 25 -#define HGCD_THRESHOLD 112 -#define GCD_DC_THRESHOLD 258 -#define GCDEXT_DC_THRESHOLD 311 -#define JACOBI_BASE_METHOD 1 - -#define MOD_1_NORM_THRESHOLD 0 /* always */ -#define MOD_1_UNNORM_THRESHOLD 0 /* always */ -#define MOD_1_1_THRESHOLD 5 -#define MOD_1_2_THRESHOLD 7 -#define MOD_1_4_THRESHOLD 28 -#define USE_PREINV_DIVREM_1 1 /* native */ -#define USE_PREINV_MOD_1 1 -#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ -#define MODEXACT_1_ODD_THRESHOLD 0 /* always (native) */ - -#define GET_STR_DC_THRESHOLD 15 -#define GET_STR_PRECOMPUTE_THRESHOLD 24 -#define SET_STR_DC_THRESHOLD 866 -#define SET_STR_PRECOMPUTE_THRESHOLD 1646 - -#define MUL_FFT_TABLE { 240, 416, 1216, 2304, 7168, 20480, 49152, 196608, 786432, 0 } -#define MUL_FFT_MODF_THRESHOLD 256 -#define MUL_FFT_THRESHOLD 2944 - -#define SQR_FFT_TABLE { 208, 480, 1600, 2304, 7168, 20480, 49152, 196608, 786432, 0 } -#define SQR_FFT_MODF_THRESHOLD 224 -#define SQR_FFT_THRESHOLD 2688 +#define MOD_1_NORM_THRESHOLD 0 /* always */ +#define MOD_1_UNNORM_THRESHOLD 0 /* always */ +#define MOD_1N_TO_MOD_1_1_THRESHOLD 6 +#define MOD_1U_TO_MOD_1_1_THRESHOLD 5 +#define MOD_1_1_TO_MOD_1_2_THRESHOLD 10 +#define MOD_1_2_TO_MOD_1_4_THRESHOLD 34 +#define PREINV_MOD_1_TO_MOD_1_THRESHOLD 16 +#define USE_PREINV_DIVREM_1 1 /* native */ +#define DIVEXACT_1_THRESHOLD 0 /* always (native) */ +#define BMOD_1_TO_MOD_1_THRESHOLD 24 + +#define MUL_TOOM22_THRESHOLD 14 +#define MUL_TOOM33_THRESHOLD 81 +#define MUL_TOOM44_THRESHOLD 214 +#define MUL_TOOM6H_THRESHOLD 286 +#define MUL_TOOM8H_THRESHOLD 430 + +#define MUL_TOOM32_TO_TOOM43_THRESHOLD 81 +#define MUL_TOOM32_TO_TOOM53_THRESHOLD 138 +#define MUL_TOOM42_TO_TOOM53_THRESHOLD 82 +#define MUL_TOOM42_TO_TOOM63_THRESHOLD 80 + +#define SQR_BASECASE_THRESHOLD 0 /* always (native) */ +#define SQR_TOOM2_THRESHOLD 20 +#define SQR_TOOM3_THRESHOLD 81 +#define SQR_TOOM4_THRESHOLD 226 +#define SQR_TOOM6_THRESHOLD 303 +#define SQR_TOOM8_THRESHOLD 454 + +#define MULMOD_BNM1_THRESHOLD 9 +#define SQRMOD_BNM1_THRESHOLD 11 + + +#define MUL_FFT_MODF_THRESHOLD 240 /* k = 5 */ +#define MUL_FFT_TABLE3 \ + { { 240, 5}, { 9, 4}, { 19, 5}, { 11, 6}, \ + { 6, 5}, { 13, 6}, { 7, 5}, { 15, 6}, \ + { 8, 5}, { 17, 6}, { 9, 5}, { 19, 6}, \ + { 13, 7}, { 7, 6}, { 15, 7}, { 8, 6}, \ + { 17, 7}, { 9, 6}, { 19, 7}, { 11, 6}, \ + { 23, 7}, { 13, 8}, { 7, 7}, { 17, 8}, \ + { 9, 7}, { 21, 8}, { 11, 7}, { 23, 8}, \ + { 13, 9}, { 7, 8}, { 15, 7}, { 31, 8}, \ + { 21, 9}, { 11, 8}, { 25,10}, { 7, 9}, \ + { 15, 8}, { 33, 9}, { 19, 8}, { 39, 9}, \ + { 23, 8}, { 47, 9}, { 27,10}, { 15, 9}, \ + { 39,10}, { 23, 9}, { 51,11}, { 15,10}, \ + { 31, 9}, { 63,10}, { 39, 9}, { 79,10}, \ + { 47,11}, { 31,10}, { 63, 9}, { 127, 8}, \ + { 255,10}, { 79, 9}, { 159,11}, { 47,10}, \ + { 95,12}, { 31,11}, { 63,10}, { 127, 9}, \ + { 287,11}, { 79,10}, { 159, 9}, { 319,10}, \ + { 175,11}, { 95,10}, { 191, 9}, { 383,10}, \ + { 207, 9}, { 415,11}, { 111,10}, { 223,12}, \ + { 63,11}, { 127,10}, { 255,11}, { 143,10}, \ + { 287,11}, { 159,10}, { 319,11}, { 175,12}, \ + { 95,11}, { 223,13}, { 63,12}, { 127,11}, \ + { 287,10}, { 575,12}, { 159,11}, { 319,10}, \ + { 639,11}, { 351,12}, { 191,11}, { 383,12}, \ + { 223,11}, { 447,13}, { 127,12}, { 255,11}, \ + { 511,12}, { 287,11}, { 575,12}, { 319,11}, \ + { 639,12}, { 351,13}, { 191,12}, { 415,11}, \ + { 831,12}, { 447,14}, { 127,13}, { 255,12}, \ + { 511,11}, { 1023,12}, { 543,11}, { 1087,10}, \ + { 2175,12}, { 575,13}, { 319,12}, { 639,11}, \ + { 1279,12}, { 703,11}, { 1407,13}, { 383,12}, \ + { 767,11}, { 1535,12}, { 831,11}, { 1663,13}, \ + { 447,14}, { 255,13}, { 511,12}, { 1023,11}, \ + { 2047,12}, { 1087,11}, { 2175,13}, { 575,12}, \ + { 1151,11}, { 2303,12}, { 1215,11}, { 2431,10}, \ + { 4863,13}, { 639,12}, { 1279,11}, { 2559,13}, \ + { 703,12}, { 1407,14}, { 383,13}, { 767,12}, \ + { 1535,13}, { 831,12}, { 1663,13}, { 895,15}, \ + { 255,14}, { 511,13}, { 1023,12}, { 2047,13}, \ + { 1087,12}, { 2175,13}, { 1215,12}, { 2431,11}, \ + { 4863,14}, { 639,13}, { 1407,12}, { 2815,13}, \ + { 1471,14}, { 767,13}, { 1663,14}, { 895,13}, \ + { 1791,12}, { 3583,13}, { 1919,12}, { 3839,15}, \ + { 511,14}, { 1023,13}, { 2175,14}, { 1151,13}, \ + { 2303,12}, { 4607,13}, { 2431,12}, { 4863,14}, \ + { 1279,13}, { 2687,14}, { 1407,13}, { 2815,15}, \ + { 767,14}, { 1791,13}, { 3583,14}, { 1919,13}, \ + { 3839,12}, { 7679,16}, { 511,15}, { 1023,14}, \ + { 2303,13}, { 4607,14}, { 2431,13}, { 4863,15}, \ + { 1279,14}, { 2943,13}, { 5887,15}, { 1535,14}, \ + { 3199,15}, { 1791,14}, { 3839,13}, { 7679,16}, \ + { 1023,15}, { 2047,14}, { 4351,15}, { 2303,14}, \ + { 4863,15}, { 2815,14}, { 5887,13}, { 11775,16}, \ + { 1535,15}, { 3071,14}, { 6655,15}, { 32768,16}, \ + { 65536,17}, { 131072,18}, { 262144,19}, { 524288,20}, \ + {1048576,21}, {2097152,22}, {4194304,23}, {8388608,24} } +#define MUL_FFT_TABLE3_SIZE 224 +#define MUL_FFT_THRESHOLD 2752 + +#define SQR_FFT_MODF_THRESHOLD 240 /* k = 5 */ +#define SQR_FFT_TABLE3 \ + { { 240, 5}, { 11, 6}, { 6, 5}, { 13, 6}, \ + { 15, 7}, { 8, 6}, { 19, 7}, { 10, 6}, \ + { 21, 7}, { 13, 8}, { 7, 7}, { 21, 8}, \ + { 11, 7}, { 25, 8}, { 13, 9}, { 7, 8}, \ + { 15, 7}, { 31, 8}, { 21, 9}, { 11, 8}, \ + { 25,10}, { 7, 9}, { 15, 8}, { 33, 9}, \ + { 19, 8}, { 39, 9}, { 23, 8}, { 47, 9}, \ + { 27,10}, { 15, 9}, { 39,10}, { 23, 9}, \ + { 51,11}, { 15,10}, { 31, 9}, { 63, 8}, \ + { 127,10}, { 39, 9}, { 79,10}, { 47,11}, \ + { 31,10}, { 63, 9}, { 127, 8}, { 255,10}, \ + { 71, 9}, { 143, 7}, { 575,10}, { 79,11}, \ + { 47,12}, { 31,11}, { 63,10}, { 127, 9}, \ + { 255,10}, { 143, 9}, { 287,11}, { 79, 9}, \ + { 319,10}, { 191, 9}, { 383,10}, { 207,12}, \ + { 63,11}, { 127,10}, { 255,11}, { 143,10}, \ + { 287, 9}, { 575,11}, { 159,10}, { 319,11}, \ + { 175,10}, { 351,12}, { 95,11}, { 191,10}, \ + { 383,11}, { 223,13}, { 63,12}, { 127,11}, \ + { 287,12}, { 159,11}, { 351,12}, { 191,11}, \ + { 383,10}, { 767,11}, { 415,12}, { 223,11}, \ + { 447,13}, { 127,12}, { 255,11}, { 511,12}, \ + { 287,11}, { 575,12}, { 319,11}, { 639,12}, \ + { 351,13}, { 191,12}, { 383,11}, { 767,12}, \ + { 415,11}, { 831,12}, { 447,14}, { 127,13}, \ + { 255,12}, { 511,11}, { 1023,12}, { 543,11}, \ + { 1087,10}, { 2175,12}, { 575,13}, { 319,12}, \ + { 639,11}, { 1279,12}, { 671,11}, { 1343,12}, \ + { 703,13}, { 383,12}, { 767,11}, { 1535,12}, \ + { 831,13}, { 447,14}, { 255,13}, { 511,12}, \ + { 1023,11}, { 2047,12}, { 1087,11}, { 2175,13}, \ + { 575,12}, { 1151,11}, { 2303,12}, { 1215,13}, \ + { 639,12}, { 1279,11}, { 2559,12}, { 1343,13}, \ + { 703,14}, { 383,13}, { 767,12}, { 1535,13}, \ + { 831,12}, { 1663,15}, { 255,14}, { 511,13}, \ + { 1023,12}, { 2047,13}, { 1087,12}, { 2175,13}, \ + { 1151,12}, { 2303,13}, { 1215,14}, { 639,13}, \ + { 1343,12}, { 2687,13}, { 1407,12}, { 2815,14}, \ + { 767,13}, { 1663,14}, { 895,13}, { 1791,12}, \ + { 3583,13}, { 1919,12}, { 3839,15}, { 511,14}, \ + { 1023,13}, { 2175,14}, { 1151,13}, { 2303,12}, \ + { 4607,13}, { 2431,12}, { 4863,14}, { 1279,13}, \ + { 2687,14}, { 1407,13}, { 2815,15}, { 767,14}, \ + { 1535,13}, { 3071,14}, { 1791,13}, { 3583,14}, \ + { 1919,13}, { 3839,12}, { 7679,16}, { 511,15}, \ + { 1023,14}, { 2175,13}, { 4351,14}, { 2303,13}, \ + { 4607,14}, { 2431,13}, { 4863,15}, { 1279,14}, \ + { 2815,13}, { 5631,14}, { 2943,13}, { 5887,12}, \ + { 11775,15}, { 1535,14}, { 3199,15}, { 1791,14}, \ + { 3583,13}, { 7167,14}, { 3839,13}, { 7679,16}, \ + { 1023,15}, { 2047,14}, { 4351,15}, { 2303,14}, \ + { 4863,15}, { 2815,14}, { 5887,13}, { 11775,16}, \ + { 1535,15}, { 3071,14}, { 6655,15}, { 3583,14}, \ + { 7167,15}, { 32768,16}, { 65536,17}, { 131072,18}, \ + { 262144,19}, { 524288,20}, {1048576,21}, {2097152,22}, \ + {4194304,23}, {8388608,24} } +#define SQR_FFT_TABLE3_SIZE 222 +#define SQR_FFT_THRESHOLD 2240 + +#define MULLO_BASECASE_THRESHOLD 0 /* always */ +#define MULLO_DC_THRESHOLD 27 +#define MULLO_MUL_N_THRESHOLD 5240 + +#define DC_DIV_QR_THRESHOLD 28 +#define DC_DIVAPPR_Q_THRESHOLD 60 +#define DC_BDIV_QR_THRESHOLD 31 +#define DC_BDIV_Q_THRESHOLD 60 + +#define INV_MULMOD_BNM1_THRESHOLD 141 +#define INV_NEWTON_THRESHOLD 266 +#define INV_APPR_THRESHOLD 110 + +#define BINV_NEWTON_THRESHOLD 262 +#define REDC_1_TO_REDC_2_THRESHOLD 15 +#define REDC_2_TO_REDC_N_THRESHOLD 47 + +#define MU_DIV_QR_THRESHOLD 979 +#define MU_DIVAPPR_Q_THRESHOLD 1078 +#define MUPI_DIV_QR_THRESHOLD 91 +#define MU_BDIV_QR_THRESHOLD 792 +#define MU_BDIV_Q_THRESHOLD 942 + +#define MATRIX22_STRASSEN_THRESHOLD 21 +#define HGCD_THRESHOLD 97 +#define GCD_DC_THRESHOLD 217 +#define GCDEXT_DC_THRESHOLD 237 +#define JACOBI_BASE_METHOD 1 + +#define GET_STR_DC_THRESHOLD 12 +#define GET_STR_PRECOMPUTE_THRESHOLD 23 +#define SET_STR_DC_THRESHOLD 572 +#define SET_STR_PRECOMPUTE_THRESHOLD 1588 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/pentium4/popcount.asm gmp-5.0.2+dfsg/mpn/x86_64/pentium4/popcount.asm --- gmp-4.3.2+dfsg/mpn/x86_64/pentium4/popcount.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/pentium4/popcount.asm 2011-05-08 09:49:29.000000000 +0000 @@ -20,4 +20,5 @@ include(`../config.m4') +MULFUNC_PROLOGUE(mpn_popcount) include_mpn(`x86/pentium4/sse2/popcount.asm') diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/redc_1.asm gmp-5.0.2+dfsg/mpn/x86_64/redc_1.asm --- gmp-4.3.2+dfsg/mpn/x86_64/redc_1.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/redc_1.asm 2011-05-08 09:49:29.000000000 +0000 @@ -33,11 +33,11 @@ C The code for 1, 2, 3, 4 should perhaps be completely register based. C * Perhaps align outer loops. C * The sub_n at the end leaks side-channel data. How do we fix that? -C * Write mpn_addsub_n computing R = A + B - C. It should run at 2 c/l. +C * Write mpn_add_n_sub_n computing R = A + B - C. It should run at 2 c/l. C * We could software pipeline the IMUL stuff, by putting it before the C outer loops and before the end of the outer loops. The last outer C loop iteration would then compute an unneeded product, but it is at -C least not a stray read fro up[], since it is at up[n]. +C least not a stray read from up[], since it is at up[n]. C * Can we combine both the add_n and sub_n into the loops, somehow? C INPUT PARAMETERS diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/rsh1add_n.asm gmp-5.0.2+dfsg/mpn/x86_64/rsh1add_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/rsh1add_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/rsh1add_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -dnl AMD64 mpn_rsh1add_n -- rp[] = (up[] + vp[]) >> 1 - -dnl Copyright 2003, 2005 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C cycles/limb -C K8,K9: 2.14 (mpn_add_n + mpn_rshift need 4.125) -C K10: 2.14 (mpn_add_n + mpn_rshift need 4.125) -C P4: 12.75 -C P6-15: 3.75 - -C TODO -C * Rewrite to use indexed addressing, like addlsh1.asm and sublsh1.asm. -C * Try to approach the cache bandwidth 1.5 c/l. It should be possible. - -C INPUT PARAMETERS -define(`rp',`%rdi') -define(`up',`%rsi') -define(`vp',`%rdx') -define(`n',`%rcx') -define(`n32',`%ecx') - -ASM_START() - TEXT - ALIGN(16) - .byte 0,0,0,0,0,0,0,0 -PROLOGUE(mpn_rsh1add_n) - pushq %rbx C 1 - - xorl %eax, %eax - movq (up), %rbx - addq (vp), %rbx - - rcrq %rbx C rotate, save acy - adcl %eax, %eax C return value - - movl n32, %r11d - andl $3, %r11d - - cmpl $1, %r11d - je L(do) C jump if n = 1 5 9 ... - -L(n1): cmpl $2, %r11d - jne L(n2) C jump unless n = 2 6 10 ... - addq %rbx, %rbx C rotate carry limb, restore acy - movq 8(up), %r10 - adcq 8(vp), %r10 - leaq 8(up), up - leaq 8(vp), vp - leaq 8(rp), rp - rcrq %r10 - rcrq %rbx - movq %rbx, -8(rp) - jmp L(cj1) - -L(n2): cmpl $3, %r11d - jne L(n3) C jump unless n = 3 7 11 ... - addq %rbx, %rbx C rotate carry limb, restore acy - movq 8(up), %r9 - movq 16(up), %r10 - adcq 8(vp), %r9 - adcq 16(vp), %r10 - leaq 16(up), up - leaq 16(vp), vp - leaq 16(rp), rp - rcrq %r10 - rcrq %r9 - rcrq %rbx - movq %rbx, -16(rp) - jmp L(cj2) - -L(n3): decq n C come here for n = 4 8 12 ... - addq %rbx, %rbx C rotate carry limb, restore acy - movq 8(up), %r8 - movq 16(up), %r9 - adcq 8(vp), %r8 - adcq 16(vp), %r9 - movq 24(up), %r10 - adcq 24(vp), %r10 - leaq 24(up), up - leaq 24(vp), vp - leaq 24(rp), rp - rcrq %r10 - rcrq %r9 - rcrq %r8 - rcrq %rbx - movq %rbx, -24(rp) - movq %r8, -16(rp) -L(cj2): movq %r9, -8(rp) -L(cj1): movq %r10, %rbx - -L(do): - shrq $2, n C 4 - je L(end) C 2 - ALIGN(16) -L(oop): addq %rbx, %rbx C rotate carry limb, restore acy - - movq 8(up), %r8 - movq 16(up), %r9 - adcq 8(vp), %r8 - adcq 16(vp), %r9 - movq 24(up), %r10 - movq 32(up), %r11 - adcq 24(vp), %r10 - adcq 32(vp), %r11 - - leaq 32(up), up - leaq 32(vp), vp - - rcrq %r11 C rotate, save acy - rcrq %r10 - rcrq %r9 - rcrq %r8 - - rcrq %rbx - movq %rbx, (rp) - movq %r8, 8(rp) - movq %r9, 16(rp) - movq %r10, 24(rp) - movq %r11, %rbx - - leaq 32(rp), rp - decq n - jne L(oop) - -L(end): movq %rbx, (rp) - popq %rbx - ret -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/rsh1aors_n.asm gmp-5.0.2+dfsg/mpn/x86_64/rsh1aors_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/rsh1aors_n.asm 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/rsh1aors_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,170 @@ +dnl AMD64 mpn_rsh1add_n -- rp[] = (up[] + vp[]) >> 1 + +dnl Copyright 2003, 2005, 2009 Free Software Foundation, Inc. + +dnl This file is part of the GNU MP Library. + +dnl The GNU MP Library is free software; you can redistribute it and/or modify +dnl it under the terms of the GNU Lesser General Public License as published +dnl by the Free Software Foundation; either version 3 of the License, or (at +dnl your option) any later version. + +dnl The GNU MP Library is distributed in the hope that it will be useful, but +dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +dnl License for more details. + +dnl You should have received a copy of the GNU Lesser General Public License +dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. + +include(`../config.m4') + + +C cycles/limb +C K8,K9: 2.14 (mpn_add_n + mpn_rshift need 4.125) +C K10: 2.14 (mpn_add_n + mpn_rshift need 4.125) +C P4: 12.75 +C P6-15: 3.75 + +C TODO +C * Rewrite to use indexed addressing, like addlsh1.asm and sublsh1.asm. +C * Try to approach the cache bandwidth 1.5 c/l. It should be possible. + +C INPUT PARAMETERS +define(`rp',`%rdi') +define(`up',`%rsi') +define(`vp',`%rdx') +define(`n',`%rcx') +define(`n32',`%ecx') + +ifdef(`OPERATION_rsh1add_n', ` + define(ADDSUB, add) + define(ADCSBB, adc) + define(func_n, mpn_rsh1add_n) + define(func_nc, mpn_rsh1add_nc)') +ifdef(`OPERATION_rsh1sub_n', ` + define(ADDSUB, sub) + define(ADCSBB, sbb) + define(func_n, mpn_rsh1sub_n) + define(func_nc, mpn_rsh1sub_nc)') + +MULFUNC_PROLOGUE(mpn_rsh1add_n mpn_rsh1add_nc mpn_rsh1sub_n mpn_rsh1sub_nc) + +ASM_START() + TEXT + + ALIGN(16) +PROLOGUE(func_nc) + push %rbx + + xor %eax, %eax + neg %r8 C set C flag from parameter + mov (up), %rbx + ADCSBB (vp), %rbx + jmp L(ent) +EPILOGUE() + + ALIGN(16) +PROLOGUE(func_n) + push %rbx + + xor %eax, %eax + mov (up), %rbx + ADDSUB (vp), %rbx +L(ent): + rcr %rbx C rotate, save acy + adc %eax, %eax C return value + + mov n32, R32(%r11) + and $3, R32(%r11) + + cmp $1, R32(%r11) + je L(do) C jump if n = 1 5 9 ... + +L(n1): cmp $2, R32(%r11) + jne L(n2) C jump unless n = 2 6 10 ... + add %rbx, %rbx C rotate carry limb, restore acy + mov 8(up), %r10 + ADCSBB 8(vp), %r10 + lea 8(up), up + lea 8(vp), vp + lea 8(rp), rp + rcr %r10 + rcr %rbx + mov %rbx, -8(rp) + jmp L(cj1) + +L(n2): cmp $3, R32(%r11) + jne L(n3) C jump unless n = 3 7 11 ... + add %rbx, %rbx C rotate carry limb, restore acy + mov 8(up), %r9 + mov 16(up), %r10 + ADCSBB 8(vp), %r9 + ADCSBB 16(vp), %r10 + lea 16(up), up + lea 16(vp), vp + lea 16(rp), rp + rcr %r10 + rcr %r9 + rcr %rbx + mov %rbx, -16(rp) + jmp L(cj2) + +L(n3): dec n C come here for n = 4 8 12 ... + add %rbx, %rbx C rotate carry limb, restore acy + mov 8(up), %r8 + mov 16(up), %r9 + ADCSBB 8(vp), %r8 + ADCSBB 16(vp), %r9 + mov 24(up), %r10 + ADCSBB 24(vp), %r10 + lea 24(up), up + lea 24(vp), vp + lea 24(rp), rp + rcr %r10 + rcr %r9 + rcr %r8 + rcr %rbx + mov %rbx, -24(rp) + mov %r8, -16(rp) +L(cj2): mov %r9, -8(rp) +L(cj1): mov %r10, %rbx + +L(do): + shr $2, n C 4 + je L(end) C 2 + ALIGN(16) +L(top): add %rbx, %rbx C rotate carry limb, restore acy + + mov 8(up), %r8 + mov 16(up), %r9 + ADCSBB 8(vp), %r8 + ADCSBB 16(vp), %r9 + mov 24(up), %r10 + mov 32(up), %r11 + ADCSBB 24(vp), %r10 + ADCSBB 32(vp), %r11 + + lea 32(up), up + lea 32(vp), vp + + rcr %r11 C rotate, save acy + rcr %r10 + rcr %r9 + rcr %r8 + + rcr %rbx + mov %rbx, (rp) + mov %r8, 8(rp) + mov %r9, 16(rp) + mov %r10, 24(rp) + mov %r11, %rbx + + lea 32(rp), rp + dec n + jne L(top) + +L(end): mov %rbx, (rp) + pop %rbx + ret +EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/rsh1sub_n.asm gmp-5.0.2+dfsg/mpn/x86_64/rsh1sub_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/rsh1sub_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/rsh1sub_n.asm 1970-01-01 00:00:00.000000000 +0000 @@ -1,146 +0,0 @@ -dnl AMD64 mpn_rsh1sub_n -- rp[] = (up[] - vp[]) >> 1 - -dnl Copyright 2003, 2005 Free Software Foundation, Inc. - -dnl This file is part of the GNU MP Library. - -dnl The GNU MP Library is free software; you can redistribute it and/or modify -dnl it under the terms of the GNU Lesser General Public License as published -dnl by the Free Software Foundation; either version 3 of the License, or (at -dnl your option) any later version. - -dnl The GNU MP Library is distributed in the hope that it will be useful, but -dnl WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -dnl or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -dnl License for more details. - -dnl You should have received a copy of the GNU Lesser General Public License -dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. - -include(`../config.m4') - - -C cycles/limb -C K8,K9: 2.14 (mpn_add_n + mpn_rshift need 4.125) -C K10: 2.14 (mpn_add_n + mpn_rshift need 4.125) -C P4: 12.75 -C P6-15: 3.75 - -C TODO -C * Rewrite to use indexed addressing, like addlsh1.asm and sublsh1.asm. -C * Try to approach the cache bandwidth 1.5 c/l. It should be possible. - -C INPUT PARAMETERS -define(`rp',`%rdi') -define(`up',`%rsi') -define(`vp',`%rdx') -define(`n',`%rcx') -define(`n32',`%ecx') - -ASM_START() - TEXT - ALIGN(16) - .byte 0,0,0,0,0,0,0,0 -PROLOGUE(mpn_rsh1sub_n) - pushq %rbx C 1 - - xorl %eax, %eax - movq (up), %rbx - subq (vp), %rbx - - rcrq %rbx C rotate, save acy - adcl %eax, %eax C return value - - movl n32, %r11d - andl $3, %r11d - - cmpl $1, %r11d - je L(do) C jump if n = 1 5 9 ... - -L(n1): cmpl $2, %r11d - jne L(n2) C jump unless n = 2 6 10 ... - addq %rbx, %rbx C rotate carry limb, restore acy - movq 8(up), %r10 - sbbq 8(vp), %r10 - leaq 8(up), up - leaq 8(vp), vp - leaq 8(rp), rp - rcrq %r10 - rcrq %rbx - movq %rbx, -8(rp) - jmp L(cj1) - -L(n2): cmpl $3, %r11d - jne L(n3) C jump unless n = 3 7 11 ... - addq %rbx, %rbx C rotate carry limb, restore acy - movq 8(up), %r9 - movq 16(up), %r10 - sbbq 8(vp), %r9 - sbbq 16(vp), %r10 - leaq 16(up), up - leaq 16(vp), vp - leaq 16(rp), rp - rcrq %r10 - rcrq %r9 - rcrq %rbx - movq %rbx, -16(rp) - jmp L(cj2) - -L(n3): decq n C come here for n = 4 8 12 ... - addq %rbx, %rbx C rotate carry limb, restore acy - movq 8(up), %r8 - movq 16(up), %r9 - sbbq 8(vp), %r8 - sbbq 16(vp), %r9 - movq 24(up), %r10 - sbbq 24(vp), %r10 - leaq 24(up), up - leaq 24(vp), vp - leaq 24(rp), rp - rcrq %r10 - rcrq %r9 - rcrq %r8 - rcrq %rbx - movq %rbx, -24(rp) - movq %r8, -16(rp) -L(cj2): movq %r9, -8(rp) -L(cj1): movq %r10, %rbx - -L(do): - shrq $2, n C 4 - je L(end) C 2 - ALIGN(16) -L(oop): addq %rbx, %rbx C rotate carry limb, restore acy - - movq 8(up), %r8 - movq 16(up), %r9 - sbbq 8(vp), %r8 - sbbq 16(vp), %r9 - movq 24(up), %r10 - movq 32(up), %r11 - sbbq 24(vp), %r10 - sbbq 32(vp), %r11 - - leaq 32(up), up - leaq 32(vp), vp - - rcrq %r11 C rotate, save acy - rcrq %r10 - rcrq %r9 - rcrq %r8 - - rcrq %rbx - movq %rbx, (rp) - movq %r8, 8(rp) - movq %r9, 16(rp) - movq %r10, 24(rp) - movq %r11, %rbx - - leaq 32(rp), rp - decq n - jne L(oop) - -L(end): movq %rbx, (rp) - popq %rbx - ret -EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/rshift.asm gmp-5.0.2+dfsg/mpn/x86_64/rshift.asm --- gmp-4.3.2+dfsg/mpn/x86_64/rshift.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/rshift.asm 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ -dnl AMD64 mpn_rshift -- mpn left shift. +dnl AMD64 mpn_rshift -- mpn right shift. -dnl Copyright 2003, 2005 Free Software Foundation, Inc. +dnl Copyright 2003, 2005, 2009 Free Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl @@ -38,10 +38,10 @@ TEXT ALIGN(32) PROLOGUE(mpn_rshift) - neg %ecx C put rsh count in cl + neg R32(%rcx) C put rsh count in cl mov (up), %rax - shl %cl, %rax C function return value - neg %ecx C put lsh count in cl + shl R8(%rcx), %rax C function return value + neg R32(%rcx) C put lsh count in cl lea 1(n), R32(%r8) @@ -56,10 +56,10 @@ jne L(1) C n = 4, 8, 12, ... mov 8(up,n,8), %r10 - shr %cl, %r10 - neg %ecx C put rsh count in cl + shr R8(%rcx), %r10 + neg R32(%rcx) C put rsh count in cl mov 16(up,n,8), %r8 - shl %cl, %r8 + shl R8(%rcx), %r8 or %r8, %r10 mov %r10, 8(rp,n,8) inc n @@ -69,90 +69,90 @@ je L(1x) C jump for n = 1, 5, 9, 13, ... C n = 2, 6, 10, 16, ... mov 8(up,n,8), %r10 - shr %cl, %r10 - neg %ecx C put rsh count in cl + shr R8(%rcx), %r10 + neg R32(%rcx) C put rsh count in cl mov 16(up,n,8), %r8 - shl %cl, %r8 + shl R8(%rcx), %r8 or %r8, %r10 mov %r10, 8(rp,n,8) inc n - neg %ecx C put lsh count in cl + neg R32(%rcx) C put lsh count in cl L(1x): cmp $-1, n je L(ast) mov 8(up,n,8), %r10 - shr %cl, %r10 + shr R8(%rcx), %r10 mov 16(up,n,8), %r11 - shr %cl, %r11 - neg %ecx C put rsh count in cl + shr R8(%rcx), %r11 + neg R32(%rcx) C put rsh count in cl mov 16(up,n,8), %r8 mov 24(up,n,8), %r9 - shl %cl, %r8 + shl R8(%rcx), %r8 or %r8, %r10 - shl %cl, %r9 + shl R8(%rcx), %r9 or %r9, %r11 mov %r10, 8(rp,n,8) mov %r11, 16(rp,n,8) add $2, n -L(rll): neg %ecx C put lsh count in cl +L(rll): neg R32(%rcx) C put lsh count in cl L(rlx): mov 8(up,n,8), %r10 - shr %cl, %r10 + shr R8(%rcx), %r10 mov 16(up,n,8), %r11 - shr %cl, %r11 + shr R8(%rcx), %r11 add $4, n C 4 jb L(end) C 2 ALIGN(16) L(top): C finish stuff from lsh block - neg %ecx C put rsh count in cl + neg R32(%rcx) C put rsh count in cl mov -16(up,n,8), %r8 mov -8(up,n,8), %r9 - shl %cl, %r8 + shl R8(%rcx), %r8 or %r8, %r10 - shl %cl, %r9 + shl R8(%rcx), %r9 or %r9, %r11 mov %r10, -24(rp,n,8) mov %r11, -16(rp,n,8) C start two new rsh mov (up,n,8), %r8 mov 8(up,n,8), %r9 - shl %cl, %r8 - shl %cl, %r9 + shl R8(%rcx), %r8 + shl R8(%rcx), %r9 C finish stuff from rsh block - neg %ecx C put lsh count in cl + neg R32(%rcx) C put lsh count in cl mov -8(up,n,8), %r10 mov 0(up,n,8), %r11 - shr %cl, %r10 + shr R8(%rcx), %r10 or %r10, %r8 - shr %cl, %r11 + shr R8(%rcx), %r11 or %r11, %r9 mov %r8, -8(rp,n,8) mov %r9, 0(rp,n,8) C start two new lsh mov 8(up,n,8), %r10 mov 16(up,n,8), %r11 - shr %cl, %r10 - shr %cl, %r11 + shr R8(%rcx), %r10 + shr R8(%rcx), %r11 add $4, n jae L(top) C 2 L(end): - neg %ecx C put rsh count in cl - mov -16(up,n,8), %r8 - shl %cl, %r8 + neg R32(%rcx) C put rsh count in cl + mov -8(up), %r8 + shl R8(%rcx), %r8 or %r8, %r10 - mov -8(up,n,8), %r9 - shl %cl, %r9 + mov (up), %r9 + shl R8(%rcx), %r9 or %r9, %r11 - mov %r10, -24(rp,n,8) - mov %r11, -16(rp,n,8) + mov %r10, -16(rp) + mov %r11, -8(rp) - neg %ecx C put lsh count in cl + neg R32(%rcx) C put lsh count in cl L(ast): mov (up), %r10 - shr %cl, %r10 + shr R8(%rcx), %r10 mov %r10, (rp) ret EPILOGUE() diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/sqr_basecase.asm gmp-5.0.2+dfsg/mpn/x86_64/sqr_basecase.asm --- gmp-4.3.2+dfsg/mpn/x86_64/sqr_basecase.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/sqr_basecase.asm 2011-05-08 09:49:29.000000000 +0000 @@ -25,7 +25,7 @@ C optimization tool suite written by David Harvey and Torbjorn Granlund. C NOTES -C * This code only handles operands up to SQR_KARATSUBA_THRESHOLD_MAX. That +C * This code only handles operands up to SQR_TOOM2_THRESHOLD_MAX. That C means we can safely use 32-bit operations for all sizes, unlike in e.g., C mpn_addmul_1. C * The jump table could probably be optimized, at least for non-pic. @@ -60,8 +60,8 @@ C We should really trim this, for better spatial locality. Alternatively, C we could grab the upper part of the stack area, leaving the lower part C instead of the upper part unused. -define(`SQR_KARATSUBA_THRESHOLD_MAX', 120) -define(`STACK_ALLOC', eval(8*2*SQR_KARATSUBA_THRESHOLD_MAX)) +deflit(SQR_TOOM2_THRESHOLD_MAX, 80) +define(`STACK_ALLOC', eval(8*2*SQR_TOOM2_THRESHOLD_MAX)) define(`n', `%r11') define(`tp', `%r12') @@ -74,8 +74,6 @@ define(`w2', `%rbp') define(`w3', `%r10') -define(`SPECIAL_CODE_FOR_4',1) - ASM_START() TEXT @@ -187,7 +185,6 @@ pop %rbx ret -ifdef(`SPECIAL_CODE_FOR_4',` L(4): mov (up), %rax mul %rax mov %rax, (rp) @@ -259,21 +256,19 @@ pop %rbp pop %rbx ret -') + L(0m4): add $-STACK_ALLOC, %rsp - lea (%rsp,n,8), tp C point tp in middle of result operand + lea -24(%rsp,n,8), tp C point tp in middle of result operand + mov (up), v0 + mov 8(up), %rax lea (up,n,8), up C point up at end of input operand - lea -1(n), i + lea -4(n), i C Function mpn_mul_1_m3(tp, up - i, i, up[-i - 1]) - mov $-1, j - sub i, j + xor R32(j), R32(j) + sub n, j - lea -24(tp), tp C offset FIXME - - mov (up,j,8), v0 - mov 8(up,j,8), %rax mul v0 xor R32(w2), R32(w2) mov %rax, w0 @@ -315,31 +310,28 @@ adc %rdx, w1 mov w2, 8(tp) mov w1, 16(tp) - lea eval(24+2*8)(tp), tp C tp += 2, undo offset FIXME -ifdef(`SPECIAL_CODE_FOR_4',`',` - cmp $3, R32(i) - je L(last) -') + + lea eval(2*8)(tp), tp C tp += 2 + lea -8(up), up jmp L(dowhile) + L(1m4): add $-STACK_ALLOC, %rsp lea (%rsp,n,8), tp C point tp in middle of result operand - lea (up,n,8), up C point up at end of input operand + mov (up), v0 C u0 + mov 8(up), %rax C u1 + lea 8(up,n,8), up C point up at end of input operand - lea (n), i + lea -3(n), i C Function mpn_mul_2s_m0(tp, up - i, i, up - i - 1) - mov $3, R32(j) - sub i, j - - lea 8(up), up C offset FIXME + lea -3(n), j + neg j - mov -32(up,j,8), v0 C u0 - mov -24(up,j,8), v1 C u1 - mov -24(up,j,8), %rax C u1 + mov %rax, v1 C u1 mul v0 C u0 * u1 mov %rdx, w1 xor R32(w2), R32(w2) - mov %rax, -24(tp,j,8) + mov %rax, (%rsp) jmp L(m0) ALIGN(16) @@ -381,7 +373,7 @@ add %rax, w3 mov w2, -8(tp,j,8) adc %rdx, w0 - mov (up,j,8), %rax +L(m2x): mov (up,j,8), %rax mul v0 add %rax, w3 adc %rdx, w0 @@ -397,28 +389,22 @@ mov w0, -8(tp) mov w1, (tp) - lea -8(up), up C undo offset FIXME - lea eval(3*8)(tp), tp C tp += 3 - add $-2, R32(i) C i -= 2 - cmp $3, R32(i) - je L(last) - jmp L(dowhile) - + lea -16(up), up + lea eval(3*8-24)(tp), tp C tp += 3 + jmp L(dowhile_end) L(2m4): add $-STACK_ALLOC, %rsp - lea (%rsp,n,8), tp C point tp in middle of result operand + lea -24(%rsp,n,8), tp C point tp in middle of result operand + mov (up), v0 + mov 8(up), %rax lea (up,n,8), up C point up at end of input operand - lea -1(n), i + lea -4(n), i C Function mpn_mul_1_m1(tp, up - (i - 1), i - 1, up[-i]) - mov $1, R32(j) - sub i, j - - lea -24(tp), tp C offset FIXME + lea -2(n), j + neg j - mov -16(up,j,8), v0 - mov -8(up,j,8), %rax mul v0 mov %rax, w2 mov (up,j,8), %rax @@ -460,30 +446,28 @@ mov w2, 8(tp) mov w1, 16(tp) - lea eval(24+2*8)(tp), tp C tp += 2, undo offset FIXME + lea eval(2*8)(tp), tp C tp += 2 + lea -8(up), up jmp L(dowhile_mid) - L(3m4): add $-STACK_ALLOC, %rsp lea (%rsp,n,8), tp C point tp in middle of result operand - lea (up,n,8), up C point up at end of input operand + mov (up), v0 C u0 + mov 8(up), %rax C u1 + lea 8(up,n,8), up C point up at end of input operand - lea (n), i + lea -5(n), i C Function mpn_mul_2s_m2(tp, up - i + 1, i - 1, up - i) - mov $1, R32(j) - sub i, j - - lea 8(up), up C offset FIXME + lea -1(n), j + neg j - mov -16(up,j,8), v0 - mov -8(up,j,8), v1 - mov -8(up,j,8), %rax - mul v0 C v0 * u0 + mov %rax, v1 C u1 + mul v0 C u0 * u1 mov %rdx, w3 xor R32(w0), R32(w0) xor R32(w1), R32(w1) - mov %rax, -8(tp,j,8) + mov %rax, (%rsp) jmp L(m2) ALIGN(16) @@ -541,18 +525,13 @@ mov w0, -8(tp) mov w1, (tp) - lea -8(up), up C undo offset FIXME - lea eval(3*8)(tp), tp C tp += 3 - add $-2, R32(i) C i -= 2 + lea -16(up), up jmp L(dowhile_mid) L(dowhile): C Function mpn_addmul_2s_m2(tp, up - (i - 1), i - 1, up - i) - mov $-1, j - sub i, j - - lea -24(tp), tp C offset FIXME - lea -8(up), up C offset FIXME + lea 4(i), j + neg j mov 16(up,j,8), v0 mov 24(up,j,8), v1 @@ -621,18 +600,13 @@ mov w1, 16(tp) lea eval(2*8)(tp), tp C tp += 2 - add $-2, R32(i) C i -= 2 - lea 24(tp), tp C undo offset FIXME - lea 8(up), up C undo offset FIXME + add $-2, R32(i) C i -= 2 L(dowhile_mid): C Function mpn_addmul_2s_m0(tp, up - (i - 1), i - 1, up - i) - mov $1, R32(j) - sub i, j - - lea -24(tp), tp C offset FIXME - lea -8(up), up C offset FIXME + lea 2(i), j + neg j mov (up,j,8), v0 mov 8(up,j,8), v1 @@ -699,74 +673,59 @@ mov w0, 8(tp) mov w1, 16(tp) - lea 24(tp), tp C undo offset FIXME - lea 8(up), up C undo offset FIXME - lea eval(2*8)(tp), tp C tp += 2 - add $-2, R32(i) C i -= 2 +L(dowhile_end): - cmp $3, R32(i) + add $-2, R32(i) C i -= 2 jne L(dowhile) -L(last): - C Function mpn_addmul_2s_2 - mov -24(up), v0 - mov -16(up), v1 - mov -16(up), %rax + mov -16(up), v0 + mov -8(up), v1 + mov -8(up), %rax mul v0 xor R32(w3), R32(w3) - add %rax, -32(tp) + add %rax, -8(tp) adc %rdx, w3 xor R32(w0), R32(w0) xor R32(w1), R32(w1) - mov -8(up), %rax + mov (up), %rax mul v0 add %rax, w3 - mov -8(up), %rax + mov (up), %rax adc %rdx, w0 mul v1 - add w3, -24(tp) + add w3, (tp) adc %rax, w0 adc %rdx, w1 - mov w0, -16(tp) - mov w1, -8(tp) + mov w0, 8(tp) + mov w1, 16(tp) C Function mpn_sqr_diag_addlsh1 - mov R32(n), R32(j) - shl $3, n - sub n, up + lea -4(n,n), j mov (%rsp), %r11 - bt $0, j - lea -4(j,j),j - jc L(odd) - -L(evn): lea (rp,j,8), rp - lea (up,j,4), up + lea (rp,j,8), rp + lea -8(up), up lea 8(%rsp,j,8), tp neg j - - add %r11, %r11 - sbb R32(%rbx), R32(%rbx) C save CF mov (up,j,4), %rax mul %rax + test $2, R8(j) + jnz L(odd) + +L(evn): add %r11, %r11 + sbb R32(%rbx), R32(%rbx) C save CF add %rdx, %r11 mov %rax, (rp,j,8) jmp L(d0) -L(odd): lea -16(rp,j,8), rp - lea -8(up,j,4), up - lea -8(%rsp,j,8), tp - neg j - - add %r11, %r11 +L(odd): add %r11, %r11 sbb R32(%rbp), R32(%rbp) C save CF - mov 8(up,j,4), %rax - mul %rax add %rdx, %r11 - mov %rax, 16(rp,j,8) + mov %rax, (rp,j,8) + lea -2(j), j jmp L(d1) ALIGN(16) @@ -798,24 +757,24 @@ add $4, j js L(top) -L(end): mov (up,j,4), %rax + mov (up), %rax mul %rax add R32(%rbp), R32(%rbp) C restore carry adc %rax, %r10 adc %rdx, %r11 - mov %r10, (rp,j,8) - mov %r11, 8(rp,j,8) - mov (tp,j,8), %r10 + mov %r10, (rp) + mov %r11, 8(rp) + mov (tp), %r10 adc %r10, %r10 sbb R32(%rbp), R32(%rbp) C save CF neg R32(%rbp) - mov 8(up,j,4), %rax + mov 8(up), %rax mul %rax add R32(%rbx), R32(%rbx) C restore carry adc %rax, %r10 adc %rbp, %rdx - mov %r10, 16(rp,j,8) - mov %rdx, 24(rp,j,8) + mov %r10, 16(rp) + mov %rdx, 24(rp) add $eval(8+STACK_ALLOC), %rsp pop %r14 diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/sublsh1_n.asm gmp-5.0.2+dfsg/mpn/x86_64/sublsh1_n.asm --- gmp-4.3.2+dfsg/mpn/x86_64/sublsh1_n.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/sublsh1_n.asm 2011-05-08 09:49:29.000000000 +0000 @@ -24,7 +24,9 @@ C K8,K9: 2.2 C K10: 2.2 C P4: 12.75 -C P6-15: 3.45 +C P6 core2: 3.45 +C P6 corei7: 3.45 +C P6 atom: ? C Sometimes speed degenerates, supposedly related to that some operand @@ -102,7 +104,7 @@ L(ent): jns L(end) ALIGN(16) -L(oop): add R32(%rax), R32(%rax) C restore scy +L(top): add R32(%rax), R32(%rax) C restore scy mov (vp,n,8), %r8 L(b00): adc %r8, %r8 @@ -131,7 +133,7 @@ sbb R32(%rbp), R32(%rbp) C save acy add $4, n - js L(oop) + js L(top) L(end): add R32(%rbp), R32(%rax) neg R32(%rax) diff -Nru gmp-4.3.2+dfsg/mpn/x86_64/x86_64-defs.m4 gmp-5.0.2+dfsg/mpn/x86_64/x86_64-defs.m4 --- gmp-4.3.2+dfsg/mpn/x86_64/x86_64-defs.m4 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/x86_64/x86_64-defs.m4 2011-05-08 09:49:29.000000000 +0000 @@ -2,8 +2,8 @@ dnl m4 macros for amd64 assembler. -dnl Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005 Free Software -dnl Foundation, Inc. +dnl Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008, 2009 Free +dnl Software Foundation, Inc. dnl dnl This file is part of the GNU MP Library. dnl @@ -21,11 +21,32 @@ dnl along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. -dnl Notes: +dnl Usage: CPUVEC_FUNCS_LIST dnl -dnl The 32-bit mode x86/x86-defs.m4 has various 32bit-isms, like the -dnl profiling calls, so it seems cleanest to start a fresh set of defines -dnl for 64-bit mode. +dnl A list of the functions from gmp-impl.h x86 struct cpuvec_t, in the +dnl order they appear in that structure. + +define(CPUVEC_FUNCS_LIST, +``add_n', +`addmul_1', +`copyd', +`copyi', +`divexact_1', +`divexact_by3c', +`divrem_1', +`gcd_1', +`lshift', +`mod_1', +`mod_34lsub1', +`modexact_1c_odd', +`mul_1', +`mul_basecase', +`preinv_divrem_1', +`preinv_mod_1', +`rshift', +`sqr_basecase', +`sub_n', +`submul_1'') dnl Called: PROLOGUE_cpu(GSYM_PREFIX`'foo) diff -Nru gmp-4.3.2+dfsg/mpn/z8000/gmp-mparam.h gmp-5.0.2+dfsg/mpn/z8000/gmp-mparam.h --- gmp-4.3.2+dfsg/mpn/z8000/gmp-mparam.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpn/z8000/gmp-mparam.h 2011-05-08 09:49:29.000000000 +0000 @@ -17,5 +17,5 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -#define BITS_PER_MP_LIMB 16 +#define GMP_LIMB_BITS 16 #define BYTES_PER_MP_LIMB 2 diff -Nru gmp-4.3.2+dfsg/mpq/clears.c gmp-5.0.2+dfsg/mpq/clears.c --- gmp-4.3.2+dfsg/mpq/clears.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/clears.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* mpq_clears() -- Clear multiple mpq_t variables. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "config.h" + +#if HAVE_STDARG +#include +#else +#include +#endif + +#include /* for NULL */ +#include "gmp.h" +#include "gmp-impl.h" + +void +#if HAVE_STDARG +mpq_clears (mpq_ptr x, ...) +#else +mpq_clears (va_alist) + va_dcl +#endif +{ + va_list ap; + +#if HAVE_STDARG + va_start (ap, x); +#else + mpq_ptr x; + va_start (ap); + x = va_arg (ap, mpq_ptr); +#endif + + while (x != NULL) + { + mpq_clear (x); + x = va_arg (ap, mpq_ptr); + } + va_end (ap); +} diff -Nru gmp-4.3.2+dfsg/mpq/cmp.c gmp-5.0.2+dfsg/mpq/cmp.c --- gmp-4.3.2+dfsg/mpq/cmp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/cmp.c 2011-05-08 09:49:29.000000000 +0000 @@ -68,7 +68,7 @@ /* 2. Same, but compare the number of significant bits. */ { int cnt1, cnt2; - unsigned long int bits1, bits2; + mp_bitcnt_t bits1, bits2; count_leading_zeros (cnt1, op1->_mp_num._mp_d[num1_size - 1]); count_leading_zeros (cnt2, op2->_mp_den._mp_d[den2_size - 1]); diff -Nru gmp-4.3.2+dfsg/mpq/cmp_ui.c gmp-5.0.2+dfsg/mpq/cmp_ui.c --- gmp-4.3.2+dfsg/mpq/cmp_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/cmp_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -70,8 +70,8 @@ return -num1_size; TMP_MARK; - tmp1_ptr = (mp_ptr) TMP_ALLOC ((num1_size + 1) * BYTES_PER_MP_LIMB); - tmp2_ptr = (mp_ptr) TMP_ALLOC ((den1_size + 1) * BYTES_PER_MP_LIMB); + tmp1_ptr = TMP_ALLOC_LIMBS (num1_size + 1); + tmp2_ptr = TMP_ALLOC_LIMBS (den1_size + 1); cy_limb = mpn_mul_1 (tmp1_ptr, op1->_mp_num._mp_d, num1_size, (mp_limb_t) den2); diff -Nru gmp-4.3.2+dfsg/mpq/get_d.c gmp-5.0.2+dfsg/mpq/get_d.c --- gmp-4.3.2+dfsg/mpq/get_d.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/get_d.c 2011-05-08 09:49:29.000000000 +0000 @@ -39,7 +39,7 @@ Enhancements: - Use the true mantissa size in the N_QLIMBS formala, to save a divide step + Use the true mantissa size in the N_QLIMBS formula, to save a divide step in nails. Examine the high limbs of num and den to see if the highest 1 bit of the diff -Nru gmp-4.3.2+dfsg/mpq/get_str.c gmp-5.0.2+dfsg/mpq/get_str.c --- gmp-4.3.2+dfsg/mpq/get_str.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/get_str.c 2011-05-08 09:49:29.000000000 +0000 @@ -37,8 +37,8 @@ the high limbs of num and den are used. +2 for rounding up the chars per bit of num and den. +3 for sign, slash and '\0'. */ str_alloc = ((size_t) ((ABS (q->_mp_num._mp_size) + q->_mp_den._mp_size) - * BITS_PER_MP_LIMB - * __mp_bases[ABS(base)].chars_per_bit_exactly)) + * GMP_LIMB_BITS + * mp_bases[ABS(base)].chars_per_bit_exactly)) + 5; str = (char *) (*__gmp_allocate_func) (str_alloc); } diff -Nru gmp-4.3.2+dfsg/mpq/inits.c gmp-5.0.2+dfsg/mpq/inits.c --- gmp-4.3.2+dfsg/mpq/inits.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/inits.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* mpq_inits() -- Initialize multiple mpq_t variables and set them to 0. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "config.h" + +#if HAVE_STDARG +#include +#else +#include +#endif + +#include /* for NULL */ +#include "gmp.h" +#include "gmp-impl.h" + +void +#if HAVE_STDARG +mpq_inits (mpq_ptr x, ...) +#else +mpq_inits (va_alist) + va_dcl +#endif +{ + va_list ap; + +#if HAVE_STDARG + va_start (ap, x); +#else + mpq_ptr x; + va_start (ap); + x = va_arg (ap, mpq_ptr); +#endif + + while (x != NULL) + { + mpq_init (x); + x = va_arg (ap, mpq_ptr); + } + va_end (ap); +} diff -Nru gmp-4.3.2+dfsg/mpq/Makefile.am gmp-5.0.2+dfsg/mpq/Makefile.am --- gmp-4.3.2+dfsg/mpq/Makefile.am 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -22,9 +22,9 @@ noinst_LTLIBRARIES = libmpq.la libmpq_la_SOURCES = \ - abs.c aors.c canonicalize.c clear.c \ + abs.c aors.c canonicalize.c clear.c clears.c \ cmp.c cmp_si.c cmp_ui.c div.c equal.c \ get_d.c get_den.c get_num.c get_str.c \ - init.c inp_str.c inv.c md_2exp.c mul.c neg.c out_str.c \ + init.c inits.c inp_str.c inv.c md_2exp.c mul.c neg.c out_str.c \ set.c set_den.c set_num.c set_si.c set_str.c set_ui.c set_z.c set_d.c \ set_f.c swap.c diff -Nru gmp-4.3.2+dfsg/mpq/Makefile.in gmp-5.0.2+dfsg/mpq/Makefile.in --- gmp-4.3.2+dfsg/mpq/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -66,12 +66,12 @@ LTLIBRARIES = $(noinst_LTLIBRARIES) libmpq_la_LIBADD = am_libmpq_la_OBJECTS = abs$U.lo aors$U.lo canonicalize$U.lo clear$U.lo \ - cmp$U.lo cmp_si$U.lo cmp_ui$U.lo div$U.lo equal$U.lo \ - get_d$U.lo get_den$U.lo get_num$U.lo get_str$U.lo init$U.lo \ - inp_str$U.lo inv$U.lo md_2exp$U.lo mul$U.lo neg$U.lo \ - out_str$U.lo set$U.lo set_den$U.lo set_num$U.lo set_si$U.lo \ - set_str$U.lo set_ui$U.lo set_z$U.lo set_d$U.lo set_f$U.lo \ - swap$U.lo + clears$U.lo cmp$U.lo cmp_si$U.lo cmp_ui$U.lo div$U.lo \ + equal$U.lo get_d$U.lo get_den$U.lo get_num$U.lo get_str$U.lo \ + init$U.lo inits$U.lo inp_str$U.lo inv$U.lo md_2exp$U.lo \ + mul$U.lo neg$U.lo out_str$U.lo set$U.lo set_den$U.lo \ + set_num$U.lo set_si$U.lo set_str$U.lo set_ui$U.lo set_z$U.lo \ + set_d$U.lo set_f$U.lo swap$U.lo libmpq_la_OBJECTS = $(am_libmpq_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = @@ -100,7 +100,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -124,10 +123,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -167,6 +165,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -200,10 +199,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -233,7 +232,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -255,10 +253,10 @@ INCLUDES = -D__GMP_WITHIN_GMP -I$(top_srcdir) noinst_LTLIBRARIES = libmpq.la libmpq_la_SOURCES = \ - abs.c aors.c canonicalize.c clear.c \ + abs.c aors.c canonicalize.c clear.c clears.c \ cmp.c cmp_si.c cmp_ui.c div.c equal.c \ get_d.c get_den.c get_num.c get_str.c \ - init.c inp_str.c inv.c md_2exp.c mul.c neg.c out_str.c \ + init.c inits.c inp_str.c inv.c md_2exp.c mul.c neg.c out_str.c \ set.c set_den.c set_num.c set_si.c set_str.c set_ui.c set_z.c set_d.c \ set_f.c swap.c @@ -335,6 +333,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/canonicalize.c; then echo $(srcdir)/canonicalize.c; else echo canonicalize.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ clear_.c: clear.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clear.c; then echo $(srcdir)/clear.c; else echo clear.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +clears_.c: clears.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clears.c; then echo $(srcdir)/clears.c; else echo clears.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ cmp_.c: cmp.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cmp.c; then echo $(srcdir)/cmp.c; else echo cmp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ cmp_si_.c: cmp_si.c $(ANSI2KNR) @@ -355,6 +355,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/get_str.c; then echo $(srcdir)/get_str.c; else echo get_str.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ init_.c: init.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/init.c; then echo $(srcdir)/init.c; else echo init.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +inits_.c: inits.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inits.c; then echo $(srcdir)/inits.c; else echo inits.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ inp_str_.c: inp_str.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inp_str.c; then echo $(srcdir)/inp_str.c; else echo inp_str.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ inv_.c: inv.c $(ANSI2KNR) @@ -389,15 +391,16 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/swap.c; then echo $(srcdir)/swap.c; else echo swap.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ abs_.$(OBJEXT) abs_.lo aors_.$(OBJEXT) aors_.lo \ canonicalize_.$(OBJEXT) canonicalize_.lo clear_.$(OBJEXT) clear_.lo \ -cmp_.$(OBJEXT) cmp_.lo cmp_si_.$(OBJEXT) cmp_si_.lo cmp_ui_.$(OBJEXT) \ -cmp_ui_.lo div_.$(OBJEXT) div_.lo equal_.$(OBJEXT) equal_.lo \ -get_d_.$(OBJEXT) get_d_.lo get_den_.$(OBJEXT) get_den_.lo \ -get_num_.$(OBJEXT) get_num_.lo get_str_.$(OBJEXT) get_str_.lo \ -init_.$(OBJEXT) init_.lo inp_str_.$(OBJEXT) inp_str_.lo inv_.$(OBJEXT) \ -inv_.lo md_2exp_.$(OBJEXT) md_2exp_.lo mul_.$(OBJEXT) mul_.lo \ -neg_.$(OBJEXT) neg_.lo out_str_.$(OBJEXT) out_str_.lo set_.$(OBJEXT) \ -set_.lo set_d_.$(OBJEXT) set_d_.lo set_den_.$(OBJEXT) set_den_.lo \ -set_f_.$(OBJEXT) set_f_.lo set_num_.$(OBJEXT) set_num_.lo \ +clears_.$(OBJEXT) clears_.lo cmp_.$(OBJEXT) cmp_.lo cmp_si_.$(OBJEXT) \ +cmp_si_.lo cmp_ui_.$(OBJEXT) cmp_ui_.lo div_.$(OBJEXT) div_.lo \ +equal_.$(OBJEXT) equal_.lo get_d_.$(OBJEXT) get_d_.lo \ +get_den_.$(OBJEXT) get_den_.lo get_num_.$(OBJEXT) get_num_.lo \ +get_str_.$(OBJEXT) get_str_.lo init_.$(OBJEXT) init_.lo \ +inits_.$(OBJEXT) inits_.lo inp_str_.$(OBJEXT) inp_str_.lo \ +inv_.$(OBJEXT) inv_.lo md_2exp_.$(OBJEXT) md_2exp_.lo mul_.$(OBJEXT) \ +mul_.lo neg_.$(OBJEXT) neg_.lo out_str_.$(OBJEXT) out_str_.lo \ +set_.$(OBJEXT) set_.lo set_d_.$(OBJEXT) set_d_.lo set_den_.$(OBJEXT) \ +set_den_.lo set_f_.$(OBJEXT) set_f_.lo set_num_.$(OBJEXT) set_num_.lo \ set_si_.$(OBJEXT) set_si_.lo set_str_.$(OBJEXT) set_str_.lo \ set_ui_.$(OBJEXT) set_ui_.lo set_z_.$(OBJEXT) set_z_.lo \ swap_.$(OBJEXT) swap_.lo : $(ANSI2KNR) diff -Nru gmp-4.3.2+dfsg/mpq/md_2exp.c gmp-5.0.2+dfsg/mpq/md_2exp.c --- gmp-4.3.2+dfsg/mpq/md_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/md_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -29,7 +29,7 @@ static void mord_2exp (mpz_ptr ldst, mpz_ptr rdst, mpz_srcptr lsrc, mpz_srcptr rsrc, - unsigned long n) + mp_bitcnt_t n) { mp_size_t rsrc_size = SIZ(rsrc); mp_size_t len = ABS (rsrc_size); @@ -81,14 +81,14 @@ void -mpq_mul_2exp (mpq_ptr dst, mpq_srcptr src, unsigned long n) +mpq_mul_2exp (mpq_ptr dst, mpq_srcptr src, mp_bitcnt_t n) { mord_2exp (mpq_numref (dst), mpq_denref (dst), mpq_numref (src), mpq_denref (src), n); } void -mpq_div_2exp (mpq_ptr dst, mpq_srcptr src, unsigned long n) +mpq_div_2exp (mpq_ptr dst, mpq_srcptr src, mp_bitcnt_t n) { if (SIZ (mpq_numref(src)) == 0) { diff -Nru gmp-4.3.2+dfsg/mpq/set_f.c gmp-5.0.2+dfsg/mpq/set_f.c --- gmp-4.3.2+dfsg/mpq/set_f.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/set_f.c 2011-05-08 09:49:29.000000000 +0000 @@ -60,7 +60,7 @@ } else { - /* radix point is within or to the left of the limbs, use demominator */ + /* radix point is within or to the left of the limbs, use denominator */ mp_ptr num_ptr, den_ptr; mp_size_t den_size; diff -Nru gmp-4.3.2+dfsg/mpq/set_si.c gmp-5.0.2+dfsg/mpq/set_si.c --- gmp-4.3.2+dfsg/mpq/set_si.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpq/set_si.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,4 +1,4 @@ -/* mpq_set_si(dest,ulong_num,ulong_den) -- Set DEST to the retional number +/* mpq_set_si(dest,ulong_num,ulong_den) -- Set DEST to the rational number ULONG_NUM/ULONG_DEN. Copyright 1991, 1994, 1995, 2001, 2003 Free Software Foundation, Inc. diff -Nru gmp-4.3.2+dfsg/mpz/aorsmul_i.c gmp-5.0.2+dfsg/mpz/aorsmul_i.c --- gmp-4.3.2+dfsg/mpz/aorsmul_i.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/aorsmul_i.c 2011-05-08 09:49:29.000000000 +0000 @@ -47,13 +47,13 @@ The final w will retain its sign, unless an underflow occurs in a submul of absolute values, in which case it's flipped. - If x has more limbs than w, then mpn_submul_1 followed by mpn_com_n is + If x has more limbs than w, then mpn_submul_1 followed by mpn_com is used. The alternative would be mpn_mul_1 into temporary space followed by mpn_sub_n. Avoiding temporary space seem good, and submul+com stands a chance of being faster since it involves only one set of carry propagations, not two. Note that doing an addmul_1 with a twos-complement negative y doesn't work, because it effectively adds an - extra x * 2^BITS_PER_MP_LIMB. */ + extra x * 2^GMP_LIMB_BITS. */ REGPARM_ATTR(1) void mpz_aorsmul_1 (mpz_ptr w, mpz_srcptr x, mp_limb_t y, mp_size_t sub) @@ -144,7 +144,7 @@ /* Borrow out of w, take twos complement negative to get absolute value, flip sign of w. */ wp[new_wsize] = ~-cy; /* extra limb is 0-cy */ - mpn_com_n (wp, wp, new_wsize); + mpn_com (wp, wp, new_wsize); new_wsize++; MPN_INCR_U (wp, new_wsize, CNST_LIMB(1)); wsize_signed = -wsize_signed; @@ -158,7 +158,7 @@ mp_limb_t cy2; /* -(-cy*b^n + w-x*y) = (cy-1)*b^n + ~(w-x*y) + 1 */ - mpn_com_n (wp, wp, wsize); + mpn_com (wp, wp, wsize); cy += mpn_add_1 (wp, wp, wsize, CNST_LIMB(1)); cy -= 1; diff -Nru gmp-4.3.2+dfsg/mpz/cfdiv_q_2exp.c gmp-5.0.2+dfsg/mpz/cfdiv_q_2exp.c --- gmp-4.3.2+dfsg/mpz/cfdiv_q_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/cfdiv_q_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -24,11 +24,11 @@ /* dir==1 for ceil, dir==-1 for floor */ -static void __gmpz_cfdiv_q_2exp __GMP_PROTO ((REGPARM_3_1 (mpz_ptr w, mpz_srcptr u, unsigned long cnt, int dir))) REGPARM_ATTR (1); +static void __gmpz_cfdiv_q_2exp __GMP_PROTO ((REGPARM_3_1 (mpz_ptr, mpz_srcptr, mp_bitcnt_t, int))) REGPARM_ATTR (1); #define cfdiv_q_2exp(w,u,cnt,dir) __gmpz_cfdiv_q_2exp (REGPARM_3_1 (w,u,cnt,dir)) REGPARM_ATTR (1) static void -cfdiv_q_2exp (mpz_ptr w, mpz_srcptr u, unsigned long cnt, int dir) +cfdiv_q_2exp (mpz_ptr w, mpz_srcptr u, mp_bitcnt_t cnt, int dir) { mp_size_t wsize, usize, abs_usize, limb_cnt, i; mp_srcptr up; @@ -90,13 +90,13 @@ void -mpz_cdiv_q_2exp (mpz_ptr w, mpz_srcptr u, unsigned long cnt) +mpz_cdiv_q_2exp (mpz_ptr w, mpz_srcptr u, mp_bitcnt_t cnt) { cfdiv_q_2exp (w, u, cnt, 1); } void -mpz_fdiv_q_2exp (mpz_ptr w, mpz_srcptr u, unsigned long cnt) +mpz_fdiv_q_2exp (mpz_ptr w, mpz_srcptr u, mp_bitcnt_t cnt) { cfdiv_q_2exp (w, u, cnt, -1); } diff -Nru gmp-4.3.2+dfsg/mpz/cfdiv_r_2exp.c gmp-5.0.2+dfsg/mpz/cfdiv_r_2exp.c --- gmp-4.3.2+dfsg/mpz/cfdiv_r_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/cfdiv_r_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -27,11 +27,11 @@ /* dir==1 for ceil, dir==-1 for floor */ -static void __gmpz_cfdiv_r_2exp __GMP_PROTO ((REGPARM_3_1 (mpz_ptr w, mpz_srcptr u, unsigned long cnt, int dir))) REGPARM_ATTR (1); +static void __gmpz_cfdiv_r_2exp __GMP_PROTO ((REGPARM_3_1 (mpz_ptr, mpz_srcptr, mp_bitcnt_t, int))) REGPARM_ATTR (1); #define cfdiv_r_2exp(w,u,cnt,dir) __gmpz_cfdiv_r_2exp (REGPARM_3_1 (w, u, cnt, dir)) REGPARM_ATTR (1) static void -cfdiv_r_2exp (mpz_ptr w, mpz_srcptr u, unsigned long cnt, int dir) +cfdiv_r_2exp (mpz_ptr w, mpz_srcptr u, mp_bitcnt_t cnt, int dir) { mp_size_t usize, abs_usize, limb_cnt, i; mp_srcptr up; @@ -109,7 +109,7 @@ /* Ones complement */ i = MIN (abs_usize, limb_cnt+1); - mpn_com_n (wp, up, i); + mpn_com (wp, up, i); for ( ; i <= limb_cnt; i++) wp[i] = GMP_NUMB_MAX; @@ -143,13 +143,13 @@ void -mpz_cdiv_r_2exp (mpz_ptr w, mpz_srcptr u, unsigned long cnt) +mpz_cdiv_r_2exp (mpz_ptr w, mpz_srcptr u, mp_bitcnt_t cnt) { cfdiv_r_2exp (w, u, cnt, 1); } void -mpz_fdiv_r_2exp (mpz_ptr w, mpz_srcptr u, unsigned long cnt) +mpz_fdiv_r_2exp (mpz_ptr w, mpz_srcptr u, mp_bitcnt_t cnt) { cfdiv_r_2exp (w, u, cnt, -1); } diff -Nru gmp-4.3.2+dfsg/mpz/clears.c gmp-5.0.2+dfsg/mpz/clears.c --- gmp-4.3.2+dfsg/mpz/clears.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/clears.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* mpz_clears() -- Clear multiple mpz_t variables. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "config.h" + +#if HAVE_STDARG +#include +#else +#include +#endif + +#include /* for NULL */ +#include "gmp.h" +#include "gmp-impl.h" + +void +#if HAVE_STDARG +mpz_clears (mpz_ptr x, ...) +#else +mpz_clears (va_alist) + va_dcl +#endif +{ + va_list ap; + +#if HAVE_STDARG + va_start (ap, x); +#else + mpz_ptr x; + va_start (ap); + x = va_arg (ap, mpz_ptr); +#endif + + while (x != NULL) + { + mpz_clear (x); + x = va_arg (ap, mpz_ptr); + } + va_end (ap); +} diff -Nru gmp-4.3.2+dfsg/mpz/clrbit.c gmp-5.0.2+dfsg/mpz/clrbit.c --- gmp-4.3.2+dfsg/mpz/clrbit.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/clrbit.c 2011-05-08 09:49:29.000000000 +0000 @@ -21,7 +21,7 @@ #include "gmp-impl.h" void -mpz_clrbit (mpz_ptr d, unsigned long int bit_index) +mpz_clrbit (mpz_ptr d, mp_bitcnt_t bit_index) { mp_size_t dsize = d->_mp_size; mp_ptr dp = d->_mp_d; diff -Nru gmp-4.3.2+dfsg/mpz/combit.c gmp-5.0.2+dfsg/mpz/combit.c --- gmp-4.3.2+dfsg/mpz/combit.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/combit.c 2011-05-08 09:49:29.000000000 +0000 @@ -21,7 +21,7 @@ #include "gmp-impl.h" void -mpz_combit (mpz_ptr d, unsigned long int bit_index) +mpz_combit (mpz_ptr d, mp_bitcnt_t bit_index) { mp_size_t dsize = ABSIZ(d); mp_ptr dp = LIMBS(d); diff -Nru gmp-4.3.2+dfsg/mpz/cong_2exp.c gmp-5.0.2+dfsg/mpz/cong_2exp.c --- gmp-4.3.2+dfsg/mpz/cong_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/cong_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -22,9 +22,10 @@ int -mpz_congruent_2exp_p (mpz_srcptr a, mpz_srcptr c, unsigned long d) +mpz_congruent_2exp_p (mpz_srcptr a, mpz_srcptr c, mp_bitcnt_t d) { - unsigned long i, dlimbs, dbits; + mp_size_t i, dlimbs; + unsigned dbits; mp_ptr ap, cp; mp_limb_t dmask, alimb, climb, sum; mp_size_t asize_signed, csize_signed, asize, csize; diff -Nru gmp-4.3.2+dfsg/mpz/cong.c gmp-5.0.2+dfsg/mpz/cong.c --- gmp-4.3.2+dfsg/mpz/cong.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/cong.c 2011-05-08 09:49:29.000000000 +0000 @@ -99,7 +99,7 @@ if (sign < 0) NEG_MOD (clow, clow, dlow); - if (BELOW_THRESHOLD (asize, MODEXACT_1_ODD_THRESHOLD)) + if (ABOVE_THRESHOLD (asize, BMOD_1_TO_MOD_1_THRESHOLD)) { r = mpn_mod_1 (ap, asize, dlow); if (clow < dlow) diff -Nru gmp-4.3.2+dfsg/mpz/cong_ui.c gmp-5.0.2+dfsg/mpz/cong_ui.c --- gmp-4.3.2+dfsg/mpz/cong_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/cong_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -76,7 +76,7 @@ ap = PTR (a); - if (BELOW_THRESHOLD (asize, MODEXACT_1_ODD_THRESHOLD)) + if (ABOVE_THRESHOLD (asize, BMOD_1_TO_MOD_1_THRESHOLD)) { r = mpn_mod_1 (ap, asize, d); if (c < d) diff -Nru gmp-4.3.2+dfsg/mpz/divexact.c gmp-5.0.2+dfsg/mpz/divexact.c --- gmp-4.3.2+dfsg/mpz/divexact.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/divexact.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,9 @@ /* mpz_divexact -- finds quotient when known that quot * den == num && den != 0. +Contributed to the GNU project by Niels Möller. + Copyright 1991, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002, 2005, -2006, 2007 Free Software Foundation, Inc. +2006, 2007, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -18,16 +20,6 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* Ken Weber (kweber@mat.ufrgs.br, kweber@mcs.kent.edu) - - Funding for this work has been partially provided by Conselho Nacional - de Desenvolvimento Cienti'fico e Tecnolo'gico (CNPq) do Brazil, Grant - 301314194-2, and was done while I was a visiting reseacher in the Instituto - de Matema'tica at Universidade Federal do Rio Grande do Sul (UFRGS). - - References: - T. Jebelean, An algorithm for exact division, Journal of Symbolic - Computation, v. 15, 1993, pp. 169-180. */ #include "gmp.h" #include "gmp-impl.h" @@ -36,10 +28,10 @@ void mpz_divexact (mpz_ptr quot, mpz_srcptr num, mpz_srcptr den) { - mp_ptr qp, tp; - mp_size_t qsize, tsize; + mp_ptr qp; + mp_size_t qn; mp_srcptr np, dp; - mp_size_t nsize, dsize; + mp_size_t nn, dn; TMP_DECL; #if WANT_ASSERT @@ -52,83 +44,38 @@ } #endif - nsize = ABS (num->_mp_size); - dsize = ABS (den->_mp_size); + nn = ABSIZ (num); + dn = ABSIZ (den); - qsize = nsize - dsize + 1; - if (quot->_mp_alloc < qsize) - _mpz_realloc (quot, qsize); - - np = num->_mp_d; - dp = den->_mp_d; - qp = quot->_mp_d; + qn = nn - dn + 1; + MPZ_REALLOC (quot, qn); - if (nsize < dsize) + if (nn < dn) { /* This special case avoids segfaults below when the function is incorrectly called with |N| < |D|, N != 0. It also handles the well-defined case N = 0. */ - quot->_mp_size = 0; + SIZ(quot) = 0; return; } - if (dsize <= 1) - { - if (dsize == 1) - { - MPN_DIVREM_OR_DIVEXACT_1 (qp, np, nsize, dp[0]); - qsize -= qp[qsize - 1] == 0; - quot->_mp_size = (num->_mp_size ^ den->_mp_size) >= 0 ? qsize : -qsize; - return; - } + TMP_MARK; - /* Generate divide-by-zero error since dsize == 0. */ - DIVIDE_BY_ZERO; - } + qp = PTR(quot); - /* Avoid quadratic behaviour, but do it conservatively. */ - if (qsize > 1500) - { - mpz_tdiv_q (quot, num, den); - return; - } + if (quot == num || quot == den) + qp = TMP_ALLOC_LIMBS (qn); - TMP_MARK; + np = PTR(num); + dp = PTR(den); - /* QUOT <-- NUM/2^r, T <-- DEN/2^r where = r number of twos in DEN. */ - while (dp[0] == 0) - np += 1, nsize -= 1, dp += 1, dsize -= 1; - tsize = MIN (qsize, dsize); - if ((dp[0] & 1) != 0) - { - if (quot == den) /* QUOT and DEN overlap. */ - { - tp = (mp_ptr) TMP_ALLOC (tsize * BYTES_PER_MP_LIMB); - MPN_COPY (tp, dp, tsize); - } - else - tp = (mp_ptr) dp; - if (qp != np) - MPN_COPY_INCR (qp, np, qsize); - } - else - { - unsigned int r; - tp = (mp_ptr) TMP_ALLOC (tsize * BYTES_PER_MP_LIMB); - count_trailing_zeros (r, dp[0]); - mpn_rshift (tp, dp, tsize, r); - if (dsize > tsize) - tp[tsize - 1] |= (dp[tsize] << (GMP_NUMB_BITS - r)) & GMP_NUMB_MASK; - mpn_rshift (qp, np, qsize, r); - if (nsize > qsize) - qp[qsize - 1] |= (np[qsize] << (GMP_NUMB_BITS - r)) & GMP_NUMB_MASK; - } + mpn_divexact (qp, np, nn, dp, dn); + MPN_NORMALIZE (qp, qn); - /* Now QUOT <-- QUOT/T. */ - mpn_bdivmod (qp, qp, qsize, tp, tsize, qsize * GMP_NUMB_BITS); - MPN_NORMALIZE (qp, qsize); + SIZ(quot) = (SIZ(num) ^ SIZ(den)) >= 0 ? qn : -qn; - quot->_mp_size = (num->_mp_size ^ den->_mp_size) >= 0 ? qsize : -qsize; + if (qp != PTR(quot)) + MPN_COPY (PTR(quot), qp, qn); TMP_FREE; } diff -Nru gmp-4.3.2+dfsg/mpz/divis_2exp.c gmp-5.0.2+dfsg/mpz/divis_2exp.c --- gmp-4.3.2+dfsg/mpz/divis_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/divis_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -22,9 +22,10 @@ int -mpz_divisible_2exp_p (mpz_srcptr a, unsigned long d) +mpz_divisible_2exp_p (mpz_srcptr a, mp_bitcnt_t d) { - unsigned long i, dlimbs, dbits; + mp_size_t i, dlimbs; + unsigned dbits; mp_ptr ap; mp_limb_t dmask; mp_size_t asize; diff -Nru gmp-4.3.2+dfsg/mpz/divis_ui.c gmp-5.0.2+dfsg/mpz/divis_ui.c --- gmp-4.3.2+dfsg/mpz/divis_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/divis_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -51,7 +51,7 @@ ap = PTR(a); asize = ABS(asize); /* ignore sign of a */ - if (BELOW_THRESHOLD (asize, MODEXACT_1_ODD_THRESHOLD)) + if (ABOVE_THRESHOLD (asize, BMOD_1_TO_MOD_1_THRESHOLD)) return mpn_mod_1 (ap, asize, (mp_limb_t) d) == 0; if (! (d & 1)) diff -Nru gmp-4.3.2+dfsg/mpz/fib_ui.c gmp-5.0.2+dfsg/mpz/fib_ui.c --- gmp-4.3.2+dfsg/mpz/fib_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/fib_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -78,10 +78,10 @@ /* F[2k+1] = (2F[k]+F[k-1])*(2F[k]-F[k-1]) + 2*(-1)^k */ mp_size_t xsize, ysize; -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n xp[size] = mpn_lshift (xp, xp, size, 1); yp[size] = 0; - ASSERT_NOCARRY (mpn_addsub_n (xp, yp, xp, yp, size+1)); + ASSERT_NOCARRY (mpn_add_n_sub_n (xp, yp, xp, yp, size+1)); xsize = size + (xp[size] != 0); ysize = size + (yp[size] != 0); #else diff -Nru gmp-4.3.2+dfsg/mpz/gcd.c gmp-5.0.2+dfsg/mpz/gcd.c --- gmp-4.3.2+dfsg/mpz/gcd.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/gcd.c 2011-05-08 09:49:29.000000000 +0000 @@ -90,7 +90,7 @@ usize -= u_zero_limbs; count_trailing_zeros (u_zero_bits, *up); tp = up; - up = (mp_ptr) TMP_ALLOC (usize * BYTES_PER_MP_LIMB); + up = TMP_ALLOC_LIMBS (usize); if (u_zero_bits != 0) { mpn_rshift (up, tp, usize, u_zero_bits); @@ -105,7 +105,7 @@ vsize -= v_zero_limbs; count_trailing_zeros (v_zero_bits, *vp); tp = vp; - vp = (mp_ptr) TMP_ALLOC (vsize * BYTES_PER_MP_LIMB); + vp = TMP_ALLOC_LIMBS (vsize); if (v_zero_bits != 0) { mpn_rshift (vp, tp, vsize, v_zero_bits); @@ -135,7 +135,7 @@ ? mpn_gcd (vp, vp, vsize, up, usize) : mpn_gcd (vp, up, usize, vp, vsize); - /* Here G <-- V << (g_zero_limbs*BITS_PER_MP_LIMB + g_zero_bits). */ + /* Here G <-- V << (g_zero_limbs*GMP_LIMB_BITS + g_zero_bits). */ gsize = vsize + g_zero_limbs; if (g_zero_bits != 0) { diff -Nru gmp-4.3.2+dfsg/mpz/gcdext.c gmp-5.0.2+dfsg/mpz/gcdext.c --- gmp-4.3.2+dfsg/mpz/gcdext.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/gcdext.c 2011-05-08 09:49:29.000000000 +0000 @@ -50,8 +50,8 @@ { usize = asize; vsize = bsize; - up = (mp_ptr) TMP_ALLOC ((usize + 1) * BYTES_PER_MP_LIMB); - vp = (mp_ptr) TMP_ALLOC ((vsize + 1) * BYTES_PER_MP_LIMB); + up = TMP_ALLOC_LIMBS (usize + 1); + vp = TMP_ALLOC_LIMBS (vsize + 1); MPN_COPY (up, ap, usize); MPN_COPY (vp, bp, vsize); u = a; @@ -63,8 +63,8 @@ { usize = bsize; vsize = asize; - up = (mp_ptr) TMP_ALLOC ((usize + 1) * BYTES_PER_MP_LIMB); - vp = (mp_ptr) TMP_ALLOC ((vsize + 1) * BYTES_PER_MP_LIMB); + up = TMP_ALLOC_LIMBS (usize + 1); + vp = TMP_ALLOC_LIMBS (vsize + 1); MPN_COPY (up, bp, usize); MPN_COPY (vp, ap, vsize); u = b; @@ -73,8 +73,8 @@ tt = s; } - tmp_gp = (mp_ptr) TMP_ALLOC ((usize + 1) * BYTES_PER_MP_LIMB); - tmp_sp = (mp_ptr) TMP_ALLOC ((usize + 1) * BYTES_PER_MP_LIMB); + tmp_gp = TMP_ALLOC_LIMBS (usize + 1); + tmp_sp = TMP_ALLOC_LIMBS (usize + 1); if (vsize == 0) { diff -Nru gmp-4.3.2+dfsg/mpz/gcd_ui.c gmp-5.0.2+dfsg/mpz/gcd_ui.c --- gmp-4.3.2+dfsg/mpz/gcd_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/gcd_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,4 +1,4 @@ -/* mpz_gcd_ui -- Calculate the greatest common divisior of two integers. +/* mpz_gcd_ui -- Calculate the greatest common divisor of two integers. Copyright 1994, 1996, 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. diff -Nru gmp-4.3.2+dfsg/mpz/hamdist.c gmp-5.0.2+dfsg/mpz/hamdist.c --- gmp-4.3.2+dfsg/mpz/hamdist.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/hamdist.c 2011-05-08 09:49:29.000000000 +0000 @@ -21,12 +21,12 @@ #include "gmp-impl.h" -unsigned long +mp_bitcnt_t mpz_hamdist (mpz_srcptr u, mpz_srcptr v) { mp_srcptr up, vp; mp_size_t usize, vsize; - unsigned long count; + mp_bitcnt_t count; usize = SIZ(u); vsize = SIZ(v); @@ -37,7 +37,7 @@ if (usize >= 0) { if (vsize < 0) - return ~ (unsigned long) 0; + return ~ (mp_bitcnt_t) 0; /* positive/positive */ @@ -60,7 +60,7 @@ mp_size_t old_vsize, step; if (vsize >= 0) - return ~ (unsigned long) 0; + return ~ (mp_limb_t) 0; /* negative/negative */ @@ -99,7 +99,7 @@ if (vlimb == 0) { - unsigned long twoscount; + mp_bitcnt_t twoscount; /* first non-zero of v */ old_vsize = vsize; diff -Nru gmp-4.3.2+dfsg/mpz/init2.c gmp-5.0.2+dfsg/mpz/init2.c --- gmp-4.3.2+dfsg/mpz/init2.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/init2.c 2011-05-08 09:49:29.000000000 +0000 @@ -23,7 +23,7 @@ #include "gmp-impl.h" void -mpz_init2 (mpz_ptr x, unsigned long bits) +mpz_init2 (mpz_ptr x, mp_bitcnt_t bits) { mp_size_t new_alloc; diff -Nru gmp-4.3.2+dfsg/mpz/inits.c gmp-5.0.2+dfsg/mpz/inits.c --- gmp-4.3.2+dfsg/mpz/inits.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/inits.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,56 @@ +/* mpz_inits() -- Initialize multiple mpz_t variables and set them to 0. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include "config.h" + +#if HAVE_STDARG +#include +#else +#include +#endif + +#include /* for NULL */ +#include "gmp.h" +#include "gmp-impl.h" + +void +#if HAVE_STDARG +mpz_inits (mpz_ptr x, ...) +#else +mpz_inits (va_alist) + va_dcl +#endif +{ + va_list ap; + +#if HAVE_STDARG + va_start (ap, x); +#else + mpz_ptr x; + va_start (ap); + x = va_arg (ap, mpz_ptr); +#endif + + while (x != NULL) + { + mpz_init (x); + x = va_arg (ap, mpz_ptr); + } + va_end (ap); +} diff -Nru gmp-4.3.2+dfsg/mpz/jacobi.c gmp-5.0.2+dfsg/mpz/jacobi.c --- gmp-4.3.2+dfsg/mpz/jacobi.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/jacobi.c 2011-05-08 09:49:29.000000000 +0000 @@ -64,10 +64,7 @@ Enhancements: - mpn_bdivmod could be used instead of mpn_tdiv_qr, like in mpn_gcd. - Currently tdiv_qr is preferred since it's sub-quadratic on big sizes, - although bdivmod might be a touch quicker on small sizes. This can be - revised when bdivmod becomes sub-quadratic too. + mpn_bdiv_qr should be used instead of mpn_tdiv_qr. Some sort of multi-step algorithm should be used. The current subtract and shift for every bit is very inefficient. Lehmer (per current gcdext) diff -Nru gmp-4.3.2+dfsg/mpz/kronsz.c gmp-5.0.2+dfsg/mpz/kronsz.c --- gmp-4.3.2+dfsg/mpz/kronsz.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/kronsz.c 2011-05-08 09:49:29.000000000 +0000 @@ -85,7 +85,7 @@ /* a odd, b even Establish shifted b_low with valid bit1 for ASGN and RECIP below. - Zero limbs stripped are acounted for, but zero bits on b_low are + Zero limbs stripped are accounted for, but zero bits on b_low are not because they remain in {b_ptr,b_abs_size} for the JACOBI_MOD_OR_MODEXACT_1_ODD. */ diff -Nru gmp-4.3.2+dfsg/mpz/lucnum_ui.c gmp-5.0.2+dfsg/mpz/lucnum_ui.c --- gmp-4.3.2+dfsg/mpz/lucnum_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/lucnum_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -167,7 +167,7 @@ TRACE (printf (" zeros=%d\n", zeros)); ASSERT (xalloc >= 2*lsize); - mpn_sqr_n (xp, lp, lsize); + mpn_sqr (xp, lp, lsize); lsize *= 2; lsize -= (xp[lsize-1] == 0); diff -Nru gmp-4.3.2+dfsg/mpz/Makefile.am gmp-5.0.2+dfsg/mpz/Makefile.am --- gmp-4.3.2+dfsg/mpz/Makefile.am 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -27,7 +27,7 @@ bin_ui.c bin_uiui.c cdiv_q.c \ cdiv_q_ui.c cdiv_qr.c cdiv_qr_ui.c cdiv_r.c cdiv_r_ui.c cdiv_ui.c \ cfdiv_q_2exp.c cfdiv_r_2exp.c \ - clear.c clrbit.c \ + clear.c clears.c clrbit.c \ cmp.c cmp_d.c cmp_si.c cmp_ui.c cmpabs.c cmpabs_d.c cmpabs_ui.c \ com.c combit.c \ cong.c cong_2exp.c cong_ui.c \ @@ -39,13 +39,13 @@ fits_uint.c fits_ulong.c fits_ushort.c \ gcd.c gcd_ui.c gcdext.c get_d.c get_d_2exp.c get_si.c \ get_str.c get_ui.c getlimbn.c hamdist.c \ - import.c init.c init2.c inp_raw.c inp_str.c \ + import.c init.c init2.c inits.c inp_raw.c inp_str.c \ invert.c ior.c iset.c iset_d.c iset_si.c iset_str.c iset_ui.c \ jacobi.c kronsz.c kronuz.c kronzs.c kronzu.c \ lcm.c lcm_ui.c lucnum_ui.c lucnum2_ui.c millerrabin.c \ mod.c mul.c mul_2exp.c mul_si.c mul_ui.c n_pow_ui.c neg.c nextprime.c \ out_raw.c out_str.c perfpow.c perfsqr.c popcount.c pow_ui.c powm.c \ - powm_ui.c pprime_p.c random.c random2.c \ + powm_sec.c powm_ui.c pprime_p.c random.c random2.c \ realloc.c realloc2.c remove.c root.c rootrem.c rrandomb.c \ scan0.c scan1.c set.c set_d.c set_f.c set_q.c set_si.c set_str.c \ set_ui.c setbit.c size.c sizeinbase.c sqrt.c sqrtrem.c sub.c sub_ui.c \ diff -Nru gmp-4.3.2+dfsg/mpz/Makefile.in gmp-5.0.2+dfsg/mpz/Makefile.in --- gmp-4.3.2+dfsg/mpz/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -70,36 +70,36 @@ aorsmul_i$U.lo and$U.lo array_init$U.lo bin_ui$U.lo \ bin_uiui$U.lo cdiv_q$U.lo cdiv_q_ui$U.lo cdiv_qr$U.lo \ cdiv_qr_ui$U.lo cdiv_r$U.lo cdiv_r_ui$U.lo cdiv_ui$U.lo \ - cfdiv_q_2exp$U.lo cfdiv_r_2exp$U.lo clear$U.lo clrbit$U.lo \ - cmp$U.lo cmp_d$U.lo cmp_si$U.lo cmp_ui$U.lo cmpabs$U.lo \ - cmpabs_d$U.lo cmpabs_ui$U.lo com$U.lo combit$U.lo cong$U.lo \ - cong_2exp$U.lo cong_ui$U.lo divexact$U.lo divegcd$U.lo \ - dive_ui$U.lo divis$U.lo divis_ui$U.lo divis_2exp$U.lo \ - dump$U.lo export$U.lo fac_ui$U.lo fdiv_q$U.lo fdiv_q_ui$U.lo \ - fdiv_qr$U.lo fdiv_qr_ui$U.lo fdiv_r$U.lo fdiv_r_ui$U.lo \ - fdiv_ui$U.lo fib_ui$U.lo fib2_ui$U.lo fits_sint$U.lo \ - fits_slong$U.lo fits_sshort$U.lo fits_uint$U.lo \ + cfdiv_q_2exp$U.lo cfdiv_r_2exp$U.lo clear$U.lo clears$U.lo \ + clrbit$U.lo cmp$U.lo cmp_d$U.lo cmp_si$U.lo cmp_ui$U.lo \ + cmpabs$U.lo cmpabs_d$U.lo cmpabs_ui$U.lo com$U.lo combit$U.lo \ + cong$U.lo cong_2exp$U.lo cong_ui$U.lo divexact$U.lo \ + divegcd$U.lo dive_ui$U.lo divis$U.lo divis_ui$U.lo \ + divis_2exp$U.lo dump$U.lo export$U.lo fac_ui$U.lo fdiv_q$U.lo \ + fdiv_q_ui$U.lo fdiv_qr$U.lo fdiv_qr_ui$U.lo fdiv_r$U.lo \ + fdiv_r_ui$U.lo fdiv_ui$U.lo fib_ui$U.lo fib2_ui$U.lo \ + fits_sint$U.lo fits_slong$U.lo fits_sshort$U.lo fits_uint$U.lo \ fits_ulong$U.lo fits_ushort$U.lo gcd$U.lo gcd_ui$U.lo \ gcdext$U.lo get_d$U.lo get_d_2exp$U.lo get_si$U.lo \ get_str$U.lo get_ui$U.lo getlimbn$U.lo hamdist$U.lo \ - import$U.lo init$U.lo init2$U.lo inp_raw$U.lo inp_str$U.lo \ - invert$U.lo ior$U.lo iset$U.lo iset_d$U.lo iset_si$U.lo \ - iset_str$U.lo iset_ui$U.lo jacobi$U.lo kronsz$U.lo kronuz$U.lo \ - kronzs$U.lo kronzu$U.lo lcm$U.lo lcm_ui$U.lo lucnum_ui$U.lo \ - lucnum2_ui$U.lo millerrabin$U.lo mod$U.lo mul$U.lo \ - mul_2exp$U.lo mul_si$U.lo mul_ui$U.lo n_pow_ui$U.lo neg$U.lo \ - nextprime$U.lo out_raw$U.lo out_str$U.lo perfpow$U.lo \ - perfsqr$U.lo popcount$U.lo pow_ui$U.lo powm$U.lo powm_ui$U.lo \ - pprime_p$U.lo random$U.lo random2$U.lo realloc$U.lo \ - realloc2$U.lo remove$U.lo root$U.lo rootrem$U.lo rrandomb$U.lo \ - scan0$U.lo scan1$U.lo set$U.lo set_d$U.lo set_f$U.lo \ - set_q$U.lo set_si$U.lo set_str$U.lo set_ui$U.lo setbit$U.lo \ - size$U.lo sizeinbase$U.lo sqrt$U.lo sqrtrem$U.lo sub$U.lo \ - sub_ui$U.lo swap$U.lo tdiv_ui$U.lo tdiv_q$U.lo \ - tdiv_q_2exp$U.lo tdiv_q_ui$U.lo tdiv_qr$U.lo tdiv_qr_ui$U.lo \ - tdiv_r$U.lo tdiv_r_2exp$U.lo tdiv_r_ui$U.lo tstbit$U.lo \ - ui_pow_ui$U.lo ui_sub$U.lo urandomb$U.lo urandomm$U.lo \ - xor$U.lo + import$U.lo init$U.lo init2$U.lo inits$U.lo inp_raw$U.lo \ + inp_str$U.lo invert$U.lo ior$U.lo iset$U.lo iset_d$U.lo \ + iset_si$U.lo iset_str$U.lo iset_ui$U.lo jacobi$U.lo \ + kronsz$U.lo kronuz$U.lo kronzs$U.lo kronzu$U.lo lcm$U.lo \ + lcm_ui$U.lo lucnum_ui$U.lo lucnum2_ui$U.lo millerrabin$U.lo \ + mod$U.lo mul$U.lo mul_2exp$U.lo mul_si$U.lo mul_ui$U.lo \ + n_pow_ui$U.lo neg$U.lo nextprime$U.lo out_raw$U.lo \ + out_str$U.lo perfpow$U.lo perfsqr$U.lo popcount$U.lo \ + pow_ui$U.lo powm$U.lo powm_sec$U.lo powm_ui$U.lo pprime_p$U.lo \ + random$U.lo random2$U.lo realloc$U.lo realloc2$U.lo \ + remove$U.lo root$U.lo rootrem$U.lo rrandomb$U.lo scan0$U.lo \ + scan1$U.lo set$U.lo set_d$U.lo set_f$U.lo set_q$U.lo \ + set_si$U.lo set_str$U.lo set_ui$U.lo setbit$U.lo size$U.lo \ + sizeinbase$U.lo sqrt$U.lo sqrtrem$U.lo sub$U.lo sub_ui$U.lo \ + swap$U.lo tdiv_ui$U.lo tdiv_q$U.lo tdiv_q_2exp$U.lo \ + tdiv_q_ui$U.lo tdiv_qr$U.lo tdiv_qr_ui$U.lo tdiv_r$U.lo \ + tdiv_r_2exp$U.lo tdiv_r_ui$U.lo tstbit$U.lo ui_pow_ui$U.lo \ + ui_sub$U.lo urandomb$U.lo urandomm$U.lo xor$U.lo libmpz_la_OBJECTS = $(am_libmpz_la_OBJECTS) DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = @@ -128,7 +128,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -152,10 +151,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -195,6 +193,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -228,10 +227,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -261,7 +260,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -287,7 +285,7 @@ bin_ui.c bin_uiui.c cdiv_q.c \ cdiv_q_ui.c cdiv_qr.c cdiv_qr_ui.c cdiv_r.c cdiv_r_ui.c cdiv_ui.c \ cfdiv_q_2exp.c cfdiv_r_2exp.c \ - clear.c clrbit.c \ + clear.c clears.c clrbit.c \ cmp.c cmp_d.c cmp_si.c cmp_ui.c cmpabs.c cmpabs_d.c cmpabs_ui.c \ com.c combit.c \ cong.c cong_2exp.c cong_ui.c \ @@ -299,13 +297,13 @@ fits_uint.c fits_ulong.c fits_ushort.c \ gcd.c gcd_ui.c gcdext.c get_d.c get_d_2exp.c get_si.c \ get_str.c get_ui.c getlimbn.c hamdist.c \ - import.c init.c init2.c inp_raw.c inp_str.c \ + import.c init.c init2.c inits.c inp_raw.c inp_str.c \ invert.c ior.c iset.c iset_d.c iset_si.c iset_str.c iset_ui.c \ jacobi.c kronsz.c kronuz.c kronzs.c kronzu.c \ lcm.c lcm_ui.c lucnum_ui.c lucnum2_ui.c millerrabin.c \ mod.c mul.c mul_2exp.c mul_si.c mul_ui.c n_pow_ui.c neg.c nextprime.c \ out_raw.c out_str.c perfpow.c perfsqr.c popcount.c pow_ui.c powm.c \ - powm_ui.c pprime_p.c random.c random2.c \ + powm_sec.c powm_ui.c pprime_p.c random.c random2.c \ realloc.c realloc2.c remove.c root.c rootrem.c rrandomb.c \ scan0.c scan1.c set.c set_d.c set_f.c set_q.c set_si.c set_str.c \ set_ui.c setbit.c size.c sizeinbase.c sqrt.c sqrtrem.c sub.c sub_ui.c \ @@ -416,6 +414,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/cfdiv_r_2exp.c; then echo $(srcdir)/cfdiv_r_2exp.c; else echo cfdiv_r_2exp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ clear_.c: clear.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clear.c; then echo $(srcdir)/clear.c; else echo clear.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +clears_.c: clears.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clears.c; then echo $(srcdir)/clears.c; else echo clears.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ clrbit_.c: clrbit.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/clrbit.c; then echo $(srcdir)/clrbit.c; else echo clrbit.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ cmp_.c: cmp.c $(ANSI2KNR) @@ -516,6 +516,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/init.c; then echo $(srcdir)/init.c; else echo init.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ init2_.c: init2.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/init2.c; then echo $(srcdir)/init2.c; else echo init2.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +inits_.c: inits.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inits.c; then echo $(srcdir)/inits.c; else echo inits.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ inp_raw_.c: inp_raw.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/inp_raw.c; then echo $(srcdir)/inp_raw.c; else echo inp_raw.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ inp_str_.c: inp_str.c $(ANSI2KNR) @@ -584,6 +586,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/pow_ui.c; then echo $(srcdir)/pow_ui.c; else echo pow_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ powm_.c: powm.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/powm.c; then echo $(srcdir)/powm.c; else echo powm.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +powm_sec_.c: powm_sec.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/powm_sec.c; then echo $(srcdir)/powm_sec.c; else echo powm_sec.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ powm_ui_.c: powm_ui.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/powm_ui.c; then echo $(srcdir)/powm_ui.c; else echo powm_ui.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ pprime_p_.c: pprime_p.c $(ANSI2KNR) @@ -677,16 +681,17 @@ cdiv_qr_ui_.lo cdiv_r_.$(OBJEXT) cdiv_r_.lo cdiv_r_ui_.$(OBJEXT) \ cdiv_r_ui_.lo cdiv_ui_.$(OBJEXT) cdiv_ui_.lo cfdiv_q_2exp_.$(OBJEXT) \ cfdiv_q_2exp_.lo cfdiv_r_2exp_.$(OBJEXT) cfdiv_r_2exp_.lo \ -clear_.$(OBJEXT) clear_.lo clrbit_.$(OBJEXT) clrbit_.lo cmp_.$(OBJEXT) \ -cmp_.lo cmp_d_.$(OBJEXT) cmp_d_.lo cmp_si_.$(OBJEXT) cmp_si_.lo \ -cmp_ui_.$(OBJEXT) cmp_ui_.lo cmpabs_.$(OBJEXT) cmpabs_.lo \ -cmpabs_d_.$(OBJEXT) cmpabs_d_.lo cmpabs_ui_.$(OBJEXT) cmpabs_ui_.lo \ -com_.$(OBJEXT) com_.lo combit_.$(OBJEXT) combit_.lo cong_.$(OBJEXT) \ -cong_.lo cong_2exp_.$(OBJEXT) cong_2exp_.lo cong_ui_.$(OBJEXT) \ -cong_ui_.lo dive_ui_.$(OBJEXT) dive_ui_.lo divegcd_.$(OBJEXT) \ -divegcd_.lo divexact_.$(OBJEXT) divexact_.lo divis_.$(OBJEXT) \ -divis_.lo divis_2exp_.$(OBJEXT) divis_2exp_.lo divis_ui_.$(OBJEXT) \ -divis_ui_.lo dump_.$(OBJEXT) dump_.lo export_.$(OBJEXT) export_.lo \ +clear_.$(OBJEXT) clear_.lo clears_.$(OBJEXT) clears_.lo \ +clrbit_.$(OBJEXT) clrbit_.lo cmp_.$(OBJEXT) cmp_.lo cmp_d_.$(OBJEXT) \ +cmp_d_.lo cmp_si_.$(OBJEXT) cmp_si_.lo cmp_ui_.$(OBJEXT) cmp_ui_.lo \ +cmpabs_.$(OBJEXT) cmpabs_.lo cmpabs_d_.$(OBJEXT) cmpabs_d_.lo \ +cmpabs_ui_.$(OBJEXT) cmpabs_ui_.lo com_.$(OBJEXT) com_.lo \ +combit_.$(OBJEXT) combit_.lo cong_.$(OBJEXT) cong_.lo \ +cong_2exp_.$(OBJEXT) cong_2exp_.lo cong_ui_.$(OBJEXT) cong_ui_.lo \ +dive_ui_.$(OBJEXT) dive_ui_.lo divegcd_.$(OBJEXT) divegcd_.lo \ +divexact_.$(OBJEXT) divexact_.lo divis_.$(OBJEXT) divis_.lo \ +divis_2exp_.$(OBJEXT) divis_2exp_.lo divis_ui_.$(OBJEXT) divis_ui_.lo \ +dump_.$(OBJEXT) dump_.lo export_.$(OBJEXT) export_.lo \ fac_ui_.$(OBJEXT) fac_ui_.lo fdiv_q_.$(OBJEXT) fdiv_q_.lo \ fdiv_q_ui_.$(OBJEXT) fdiv_q_ui_.lo fdiv_qr_.$(OBJEXT) fdiv_qr_.lo \ fdiv_qr_ui_.$(OBJEXT) fdiv_qr_ui_.lo fdiv_r_.$(OBJEXT) fdiv_r_.lo \ @@ -701,15 +706,16 @@ get_si_.$(OBJEXT) get_si_.lo get_str_.$(OBJEXT) get_str_.lo \ get_ui_.$(OBJEXT) get_ui_.lo getlimbn_.$(OBJEXT) getlimbn_.lo \ hamdist_.$(OBJEXT) hamdist_.lo import_.$(OBJEXT) import_.lo \ -init_.$(OBJEXT) init_.lo init2_.$(OBJEXT) init2_.lo inp_raw_.$(OBJEXT) \ -inp_raw_.lo inp_str_.$(OBJEXT) inp_str_.lo invert_.$(OBJEXT) \ -invert_.lo ior_.$(OBJEXT) ior_.lo iset_.$(OBJEXT) iset_.lo \ -iset_d_.$(OBJEXT) iset_d_.lo iset_si_.$(OBJEXT) iset_si_.lo \ -iset_str_.$(OBJEXT) iset_str_.lo iset_ui_.$(OBJEXT) iset_ui_.lo \ -jacobi_.$(OBJEXT) jacobi_.lo kronsz_.$(OBJEXT) kronsz_.lo \ -kronuz_.$(OBJEXT) kronuz_.lo kronzs_.$(OBJEXT) kronzs_.lo \ -kronzu_.$(OBJEXT) kronzu_.lo lcm_.$(OBJEXT) lcm_.lo lcm_ui_.$(OBJEXT) \ -lcm_ui_.lo lucnum2_ui_.$(OBJEXT) lucnum2_ui_.lo lucnum_ui_.$(OBJEXT) \ +init_.$(OBJEXT) init_.lo init2_.$(OBJEXT) init2_.lo inits_.$(OBJEXT) \ +inits_.lo inp_raw_.$(OBJEXT) inp_raw_.lo inp_str_.$(OBJEXT) \ +inp_str_.lo invert_.$(OBJEXT) invert_.lo ior_.$(OBJEXT) ior_.lo \ +iset_.$(OBJEXT) iset_.lo iset_d_.$(OBJEXT) iset_d_.lo \ +iset_si_.$(OBJEXT) iset_si_.lo iset_str_.$(OBJEXT) iset_str_.lo \ +iset_ui_.$(OBJEXT) iset_ui_.lo jacobi_.$(OBJEXT) jacobi_.lo \ +kronsz_.$(OBJEXT) kronsz_.lo kronuz_.$(OBJEXT) kronuz_.lo \ +kronzs_.$(OBJEXT) kronzs_.lo kronzu_.$(OBJEXT) kronzu_.lo \ +lcm_.$(OBJEXT) lcm_.lo lcm_ui_.$(OBJEXT) lcm_ui_.lo \ +lucnum2_ui_.$(OBJEXT) lucnum2_ui_.lo lucnum_ui_.$(OBJEXT) \ lucnum_ui_.lo millerrabin_.$(OBJEXT) millerrabin_.lo mod_.$(OBJEXT) \ mod_.lo mul_.$(OBJEXT) mul_.lo mul_2exp_.$(OBJEXT) mul_2exp_.lo \ mul_si_.$(OBJEXT) mul_si_.lo mul_ui_.$(OBJEXT) mul_ui_.lo \ @@ -718,19 +724,19 @@ out_str_.$(OBJEXT) out_str_.lo perfpow_.$(OBJEXT) perfpow_.lo \ perfsqr_.$(OBJEXT) perfsqr_.lo popcount_.$(OBJEXT) popcount_.lo \ pow_ui_.$(OBJEXT) pow_ui_.lo powm_.$(OBJEXT) powm_.lo \ -powm_ui_.$(OBJEXT) powm_ui_.lo pprime_p_.$(OBJEXT) pprime_p_.lo \ -random_.$(OBJEXT) random_.lo random2_.$(OBJEXT) random2_.lo \ -realloc_.$(OBJEXT) realloc_.lo realloc2_.$(OBJEXT) realloc2_.lo \ -remove_.$(OBJEXT) remove_.lo root_.$(OBJEXT) root_.lo \ -rootrem_.$(OBJEXT) rootrem_.lo rrandomb_.$(OBJEXT) rrandomb_.lo \ -scan0_.$(OBJEXT) scan0_.lo scan1_.$(OBJEXT) scan1_.lo set_.$(OBJEXT) \ -set_.lo set_d_.$(OBJEXT) set_d_.lo set_f_.$(OBJEXT) set_f_.lo \ -set_q_.$(OBJEXT) set_q_.lo set_si_.$(OBJEXT) set_si_.lo \ -set_str_.$(OBJEXT) set_str_.lo set_ui_.$(OBJEXT) set_ui_.lo \ -setbit_.$(OBJEXT) setbit_.lo size_.$(OBJEXT) size_.lo \ -sizeinbase_.$(OBJEXT) sizeinbase_.lo sqrt_.$(OBJEXT) sqrt_.lo \ -sqrtrem_.$(OBJEXT) sqrtrem_.lo sub_.$(OBJEXT) sub_.lo \ -sub_ui_.$(OBJEXT) sub_ui_.lo swap_.$(OBJEXT) swap_.lo \ +powm_sec_.$(OBJEXT) powm_sec_.lo powm_ui_.$(OBJEXT) powm_ui_.lo \ +pprime_p_.$(OBJEXT) pprime_p_.lo random_.$(OBJEXT) random_.lo \ +random2_.$(OBJEXT) random2_.lo realloc_.$(OBJEXT) realloc_.lo \ +realloc2_.$(OBJEXT) realloc2_.lo remove_.$(OBJEXT) remove_.lo \ +root_.$(OBJEXT) root_.lo rootrem_.$(OBJEXT) rootrem_.lo \ +rrandomb_.$(OBJEXT) rrandomb_.lo scan0_.$(OBJEXT) scan0_.lo \ +scan1_.$(OBJEXT) scan1_.lo set_.$(OBJEXT) set_.lo set_d_.$(OBJEXT) \ +set_d_.lo set_f_.$(OBJEXT) set_f_.lo set_q_.$(OBJEXT) set_q_.lo \ +set_si_.$(OBJEXT) set_si_.lo set_str_.$(OBJEXT) set_str_.lo \ +set_ui_.$(OBJEXT) set_ui_.lo setbit_.$(OBJEXT) setbit_.lo \ +size_.$(OBJEXT) size_.lo sizeinbase_.$(OBJEXT) sizeinbase_.lo \ +sqrt_.$(OBJEXT) sqrt_.lo sqrtrem_.$(OBJEXT) sqrtrem_.lo sub_.$(OBJEXT) \ +sub_.lo sub_ui_.$(OBJEXT) sub_ui_.lo swap_.$(OBJEXT) swap_.lo \ tdiv_q_.$(OBJEXT) tdiv_q_.lo tdiv_q_2exp_.$(OBJEXT) tdiv_q_2exp_.lo \ tdiv_q_ui_.$(OBJEXT) tdiv_q_ui_.lo tdiv_qr_.$(OBJEXT) tdiv_qr_.lo \ tdiv_qr_ui_.$(OBJEXT) tdiv_qr_ui_.lo tdiv_r_.$(OBJEXT) tdiv_r_.lo \ diff -Nru gmp-4.3.2+dfsg/mpz/mul_2exp.c gmp-5.0.2+dfsg/mpz/mul_2exp.c --- gmp-4.3.2+dfsg/mpz/mul_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/mul_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -21,7 +21,7 @@ #include "gmp-impl.h" void -mpz_mul_2exp (mpz_ptr w, mpz_srcptr u, unsigned long int cnt) +mpz_mul_2exp (mpz_ptr w, mpz_srcptr u, mp_bitcnt_t cnt) { mp_size_t usize = u->_mp_size; mp_size_t abs_usize = ABS (usize); diff -Nru gmp-4.3.2+dfsg/mpz/mul.c gmp-5.0.2+dfsg/mpz/mul.c --- gmp-4.3.2+dfsg/mpz/mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* mpz_mul -- Multiply two integers. -Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2005 Free Software Foundation, -Inc. +Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2005, 2009, 2011 Free +Software Foundation, Inc. This file is part of the GNU MP Library. @@ -33,8 +33,8 @@ mult (mpz_srcptr u, mpz_srcptr v, mpz_ptr w) #endif /* BERKELEY_MP */ { - mp_size_t usize = u->_mp_size; - mp_size_t vsize = v->_mp_size; + mp_size_t usize; + mp_size_t vsize; mp_size_t wsize; mp_size_t sign_product; mp_ptr up, vp; @@ -44,6 +44,8 @@ mp_limb_t cy_limb; TMP_DECL; + usize = SIZ (u); + vsize = SIZ (v); sign_product = usize ^ vsize; usize = ABS (usize); vsize = ABS (vsize); @@ -92,25 +94,25 @@ TMP_MARK; free_me = NULL; - up = u->_mp_d; - vp = v->_mp_d; - wp = w->_mp_d; + up = PTR(u); + vp = PTR(v); + wp = PTR(w); /* Ensure W has space enough to store the result. */ wsize = usize + vsize; - if (w->_mp_alloc < wsize) + if (ALLOC(w) < wsize) { if (wp == up || wp == vp) { free_me = wp; - free_me_size = w->_mp_alloc; + free_me_size = ALLOC(w); } else - (*__gmp_free_func) (wp, w->_mp_alloc * BYTES_PER_MP_LIMB); + (*__gmp_free_func) (wp, ALLOC(w) * BYTES_PER_MP_LIMB); - w->_mp_alloc = wsize; + ALLOC(w) = wsize; wp = (mp_ptr) (*__gmp_allocate_func) (wsize * BYTES_PER_MP_LIMB); - w->_mp_d = wp; + PTR(w) = wp; } else { @@ -118,7 +120,7 @@ if (wp == up) { /* W and U are identical. Allocate temporary space for U. */ - up = (mp_ptr) TMP_ALLOC (usize * BYTES_PER_MP_LIMB); + up = TMP_ALLOC_LIMBS (usize); /* Is V identical too? Keep it identical with U. */ if (wp == vp) vp = up; @@ -128,17 +130,25 @@ else if (wp == vp) { /* W and V are identical. Allocate temporary space for V. */ - vp = (mp_ptr) TMP_ALLOC (vsize * BYTES_PER_MP_LIMB); + vp = TMP_ALLOC_LIMBS (vsize); /* Copy to the temporary space. */ MPN_COPY (vp, wp, vsize); } } - cy_limb = mpn_mul (wp, up, usize, vp, vsize); - wsize = usize + vsize; + if (up == vp) + { + mpn_sqr (wp, up, usize); + cy_limb = wp[wsize - 1]; + } + else + { + cy_limb = mpn_mul (wp, up, usize, vp, vsize); + } + wsize -= cy_limb == 0; - w->_mp_size = sign_product < 0 ? -wsize : wsize; + SIZ(w) = sign_product < 0 ? -wsize : wsize; if (free_me != NULL) (*__gmp_free_func) (free_me, free_me_size * BYTES_PER_MP_LIMB); TMP_FREE; diff -Nru gmp-4.3.2+dfsg/mpz/nextprime.c gmp-5.0.2+dfsg/mpz/nextprime.c --- gmp-4.3.2+dfsg/mpz/nextprime.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/nextprime.c 2011-05-08 09:49:29.000000000 +0000 @@ -2,7 +2,7 @@ Copyright 1999, 2000, 2001, 2008, 2009 Free Software Foundation, Inc. -Contributed to the GNU project by Niels Möller and Torbjörn Granlund. +Contributed to the GNU project by Niels Möller and Torbjorn Granlund. This file is part of the GNU MP Library. @@ -45,7 +45,7 @@ unsigned long prime; int cnt; mp_size_t pn; - unsigned long nbits; + mp_bitcnt_t nbits; unsigned incr; TMP_SDECL; diff -Nru gmp-4.3.2+dfsg/mpz/n_pow_ui.c gmp-5.0.2+dfsg/mpz/n_pow_ui.c --- gmp-4.3.2+dfsg/mpz/n_pow_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/n_pow_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -55,11 +55,11 @@ The initial powering for bsize==1 into blimb or blimb:blimb_low doesn't form the biggest possible power of b that fits, only the biggest power of 2 power, ie. b^(2^n). It'd be possible to choose a bigger power, perhaps - using __mp_bases[b].big_base for small b, and thereby get better value + using mp_bases[b].big_base for small b, and thereby get better value from mpn_mul_1 or mpn_mul_2 in the bignum powering. It's felt that doing so would be more complicated than it's worth, and could well end up being a slowdown for small e. For big e on the other hand the algorithm is - dominated by mpn_sqr_n so there wouldn't much of a saving. The current + dominated by mpn_sqr so there wouldn't much of a saving. The current code can be viewed as simply doing the first few steps of the powering in a single or double limb where possible. @@ -79,10 +79,10 @@ /* The following are for convenience, they update the size and check the alloc. */ -#define MPN_SQR_N(dst, alloc, src, size) \ +#define MPN_SQR(dst, alloc, src, size) \ do { \ ASSERT (2*(size) <= (alloc)); \ - mpn_sqr_n (dst, src, size); \ + mpn_sqr (dst, src, size); \ (size) *= 2; \ (size) -= ((dst)[(size)-1] == 0); \ } while (0) @@ -154,7 +154,7 @@ mp_size_t rtwos_limbs, ralloc, rsize; int rneg, i, cnt, btwos, r_bp_overlap; mp_limb_t blimb, rl; - unsigned long rtwos_bits; + mp_bitcnt_t rtwos_bits; #if HAVE_NATIVE_mpn_mul_2 mp_limb_t blimb_low, rl_high; #else @@ -435,7 +435,7 @@ i, e, rsize, ralloc, talloc); mpn_trace ("r", rp, rsize)); - MPN_SQR_N (tp, talloc, rp, rsize); + MPN_SQR (tp, talloc, rp, rsize); SWAP_RP_TP; if ((e & (1L << i)) != 0) MPN_MUL_2 (rp, rsize, ralloc, mult); @@ -467,7 +467,7 @@ i, e, rsize, ralloc, talloc); mpn_trace ("r", rp, rsize)); - MPN_SQR_N (tp, talloc, rp, rsize); + MPN_SQR (tp, talloc, rp, rsize); SWAP_RP_TP; if ((e & (1L << i)) != 0) MPN_MUL_1 (rp, rsize, ralloc, blimb); @@ -496,7 +496,7 @@ i, e, rsize, ralloc, talloc); mpn_trace ("r", rp, rsize)); - MPN_SQR_N (tp, talloc, rp, rsize); + MPN_SQR (tp, talloc, rp, rsize); SWAP_RP_TP; if ((e & (1L << i)) != 0) { diff -Nru gmp-4.3.2+dfsg/mpz/out_str.c gmp-5.0.2+dfsg/mpz/out_str.c --- gmp-4.3.2+dfsg/mpz/out_str.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/out_str.c 2011-05-08 09:49:29.000000000 +0000 @@ -71,13 +71,13 @@ } TMP_MARK; - str_size = ((size_t) (x_size * BITS_PER_MP_LIMB - * __mp_bases[base].chars_per_bit_exactly)) + 3; + str_size = ((size_t) (x_size * GMP_LIMB_BITS + * mp_bases[base].chars_per_bit_exactly)) + 3; str = (unsigned char *) TMP_ALLOC (str_size); /* Move the number to convert into temporary space, since mpn_get_str clobbers its argument + needs one extra high limb.... */ - xp = (mp_ptr) TMP_ALLOC ((x_size + 1) * BYTES_PER_MP_LIMB); + xp = TMP_ALLOC_LIMBS (x_size + 1); MPN_COPY (xp, x->_mp_d, x_size); str_size = mpn_get_str (str, base, xp, x_size); diff -Nru gmp-4.3.2+dfsg/mpz/perfpow.c gmp-5.0.2+dfsg/mpz/perfpow.c --- gmp-4.3.2+dfsg/mpz/perfpow.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/perfpow.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,8 @@ /* mpz_perfect_power_p(arg) -- Return non-zero if ARG is a perfect power, zero otherwise. -Copyright 1998, 1999, 2000, 2001, 2005, 2008 Free Software Foundation, Inc. +Copyright 1998, 1999, 2000, 2001, 2005, 2008, 2009 Free Software Foundation, +Inc. This file is part of the GNU MP Library. @@ -18,266 +19,11 @@ You should have received a copy of the GNU Lesser General Public License along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ -/* - We are to determine if c is a perfect power, c = a ^ b. - Assume c is divisible by 2^n and that codd = c/2^n is odd. - Assume a is divisible by 2^m and that aodd = a/2^m is odd. - It is always true that m divides n. - - * If n is prime, either 1) a is 2*aodd and b = n - or 2) a = c and b = 1. - So for n prime, we readily have a solution. - * If n is factorable into the non-trivial factors p1,p2,... - Since m divides n, m has a subset of n's factors and b = n / m. -*/ - -/* This is a naive approach to recognizing perfect powers. - Many things can be improved. In particular, we should use p-adic - arithmetic for computing possible roots. */ - -#include /* for NULL */ #include "gmp.h" #include "gmp-impl.h" -#include "longlong.h" - -static unsigned long int gcd __GMP_PROTO ((unsigned long int, unsigned long int)); -static int isprime __GMP_PROTO ((unsigned long int)); - -static const unsigned short primes[] = -{ 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, - 59, 61, 67, 71, 73, 79, 83, 89, 97,101,103,107,109,113,127,131, - 137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223, - 227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311, - 313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409, - 419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503, - 509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613, - 617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719, - 727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827, - 829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941, - 947,953,967,971,977,983,991,997,0 -}; -#define SMALLEST_OMITTED_PRIME 1009 - - -#define POW2P(a) (((a) & ((a) - 1)) == 0) int mpz_perfect_power_p (mpz_srcptr u) { - unsigned long int prime; - unsigned long int n, n2; - int i; - unsigned long int rem; - mpz_t u2, q; - int exact; - mp_size_t uns; - mp_size_t usize = SIZ (u); - TMP_DECL; - - if (mpz_cmpabs_ui (u, 1) <= 0) - return 1; /* -1, 0, and +1 are perfect powers */ - - n2 = mpz_scan1 (u, 0); - if (n2 == 1) - return 0; /* 2 divides exactly once. */ - - TMP_MARK; - - uns = ABS (usize) - n2 / BITS_PER_MP_LIMB; - MPZ_TMP_INIT (q, uns); - MPZ_TMP_INIT (u2, uns); - - mpz_tdiv_q_2exp (u2, u, n2); - mpz_abs (u2, u2); - - if (mpz_cmp_ui (u2, 1) == 0) - { - TMP_FREE; - /* factoring completed; consistent power */ - return ! (usize < 0 && POW2P(n2)); - } - - if (isprime (n2)) - goto n2prime; - - for (i = 1; primes[i] != 0; i++) - { - prime = primes[i]; - - if (mpz_cmp_ui (u2, prime) < 0) - break; - - if (mpz_divisible_ui_p (u2, prime)) /* divisible by this prime? */ - { - rem = mpz_tdiv_q_ui (q, u2, prime * prime); - if (rem != 0) - { - TMP_FREE; - return 0; /* prime divides exactly once, reject */ - } - mpz_swap (q, u2); - for (n = 2;;) - { - rem = mpz_tdiv_q_ui (q, u2, prime); - if (rem != 0) - break; - mpz_swap (q, u2); - n++; - } - - n2 = gcd (n2, n); - if (n2 == 1) - { - TMP_FREE; - return 0; /* we have multiplicity 1 of some factor */ - } - - if (mpz_cmp_ui (u2, 1) == 0) - { - TMP_FREE; - /* factoring completed; consistent power */ - return ! (usize < 0 && POW2P(n2)); - } - - /* As soon as n2 becomes a prime number, stop factoring. - Either we have u=x^n2 or u is not a perfect power. */ - if (isprime (n2)) - goto n2prime; - } - } - - if (n2 == 0) - { - /* We found no factors above; have to check all values of n. */ - unsigned long int nth; - for (nth = usize < 0 ? 3 : 2;; nth++) - { - if (! isprime (nth)) - continue; -#if 0 - exact = mpz_padic_root (q, u2, nth, PTH); - if (exact) -#endif - exact = mpz_root (q, u2, nth); - if (exact) - { - TMP_FREE; - return 1; - } - if (mpz_cmp_ui (q, SMALLEST_OMITTED_PRIME) < 0) - { - TMP_FREE; - return 0; - } - } - } - else - { - unsigned long int nth; - - if (usize < 0 && POW2P(n2)) - { - TMP_FREE; - return 0; - } - - /* We found some factors above. We just need to consider values of n - that divides n2. */ - for (nth = 2; nth <= n2; nth++) - { - if (! isprime (nth)) - continue; - if (n2 % nth != 0) - continue; -#if 0 - exact = mpz_padic_root (q, u2, nth, PTH); - if (exact) -#endif - exact = mpz_root (q, u2, nth); - if (exact) - { - if (! (usize < 0 && POW2P(nth))) - { - TMP_FREE; - return 1; - } - } - if (mpz_cmp_ui (q, SMALLEST_OMITTED_PRIME) < 0) - { - TMP_FREE; - return 0; - } - } - - TMP_FREE; - return 0; - } - -n2prime: - if (usize < 0 && POW2P(n2)) - { - TMP_FREE; - return 0; - } - - exact = mpz_root (NULL, u2, n2); - TMP_FREE; - return exact; -} - -static unsigned long int -gcd (unsigned long int a, unsigned long int b) -{ - int an2, bn2, n2; - - if (a == 0) - return b; - if (b == 0) - return a; - - count_trailing_zeros (an2, a); - a >>= an2; - - count_trailing_zeros (bn2, b); - b >>= bn2; - - n2 = MIN (an2, bn2); - - while (a != b) - { - if (a > b) - { - a -= b; - do - a >>= 1; - while ((a & 1) == 0); - } - else /* b > a. */ - { - b -= a; - do - b >>= 1; - while ((b & 1) == 0); - } - } - - return a << n2; -} - -static int -isprime (unsigned long int t) -{ - unsigned long int q, r, d; - - if (t < 3 || (t & 1) == 0) - return t == 2; - - for (d = 3, r = 1; r != 0; d += 2) - { - q = t / d; - r = t - q * d; - if (q < d) - return 1; - } - return 0; + return mpn_perfect_power_p (PTR (u), SIZ (u)); } diff -Nru gmp-4.3.2+dfsg/mpz/powm.c gmp-5.0.2+dfsg/mpz/powm.c --- gmp-4.3.2+dfsg/mpz/powm.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/powm.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,8 +1,8 @@ -/* mpz_powm(res,base,exp,mod) -- Set RES to (base**exp) mod MOD. +/* mpz_powm(res,base,exp,mod) -- Set R to (U^E) mod M. - Contributed by Paul Zimmermann. + Contributed to the GNU project by Torbjorn Granlund. -Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2009 +Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -28,95 +28,28 @@ #include "mp.h" #endif -/* Compute t = a mod m, a is defined by (ap,an), m is defined by (mp,mn), and - t is defined by (tp,mn). */ -static void -reduce (mp_ptr tp, mp_srcptr ap, mp_size_t an, mp_srcptr mp, mp_size_t mn) -{ - mp_ptr qp; - TMP_DECL; - - TMP_MARK; - qp = TMP_ALLOC_LIMBS (an - mn + 1); - - mpn_tdiv_qr (qp, tp, 0L, ap, an, mp, mn); - - TMP_FREE; -} -#if REDUCE_EXPONENT -/* Return the group order of the ring mod m. */ -static mp_limb_t -phi (mp_limb_t t) -{ - mp_limb_t d, m, go; +/* TODO - go = 1; + * Improve handling of buffers. It is pretty ugly now. - if (t % 2 == 0) - { - t = t / 2; - while (t % 2 == 0) - { - go *= 2; - t = t / 2; - } - } - for (d = 3;; d += 2) - { - m = d - 1; - for (;;) - { - unsigned long int q = t / d; - if (q < d) - { - if (t <= 1) - return go; - if (t == d) - return go * m; - return go * (t - 1); - } - if (t != q * d) - break; - go *= m; - m = d; - t = q; - } - } -} -#endif - -/* average number of calls to redc for an exponent of n bits - with the sliding window algorithm of base 2^k: the optimal is - obtained for the value of k which minimizes 2^(k-1)+n/(k+1): - - n\k 4 5 6 7 8 - 128 156* 159 171 200 261 - 256 309 307* 316 343 403 - 512 617 607* 610 632 688 - 1024 1231 1204 1195* 1207 1256 - 2048 2461 2399 2366 2360* 2396 - 4096 4918 4787 4707 4665* 4670 + * For even moduli, we compute a binvert of its odd part both here and in + mpn_powm. How can we avoid this recomputation? */ - - -/* Use REDC instead of usual reduction for sizes < POWM_THRESHOLD. In REDC - each modular multiplication costs about 2*n^2 limbs operations, whereas - using usual reduction it costs 3*K(n), where K(n) is the cost of a - multiplication using Karatsuba, and a division is assumed to cost 2*K(n), - for example using Burnikel-Ziegler's algorithm. This gives a theoretical - threshold of a*SQR_KARATSUBA_THRESHOLD, with a=(3/2)^(1/(2-ln(3)/ln(2))) ~ - 2.66. */ -/* For now, also disable REDC when MOD is even, as the inverse can't handle - that. At some point, we might want to make the code faster for that case, - perhaps using CRR. */ -#ifndef POWM_THRESHOLD -#define POWM_THRESHOLD ((8 * SQR_KARATSUBA_THRESHOLD) / 3) -#endif +/* + b ^ e mod m res + 0 0 0 ? + 0 e 0 ? + 0 0 m ? + 0 e m 0 + b 0 0 ? + b e 0 ? + b 0 m 1 mod m + b e m b^e mod m +*/ #define HANDLE_NEGATIVE_EXPONENT 1 -#undef REDUCE_EXPONENT void #ifndef BERKELEY_MP @@ -125,44 +58,36 @@ pow (mpz_srcptr b, mpz_srcptr e, mpz_srcptr m, mpz_ptr r) #endif /* BERKELEY_MP */ { - mp_ptr xp, tp, qp, gp, this_gp; + mp_size_t n, nodd, ncnt; + int cnt; + mp_ptr rp, tp; mp_srcptr bp, ep, mp; - mp_size_t bn, es, en, mn, xn; - mp_limb_t invm, c; - unsigned long int enb; - mp_size_t i, K, j, l, k; - int m_zero_cnt, e_zero_cnt; - int sh; - int use_redc; -#if HANDLE_NEGATIVE_EXPONENT - mpz_t new_b; -#endif -#if REDUCE_EXPONENT - mpz_t new_e; -#endif + mp_size_t rn, bn, es, en, itch; TMP_DECL; - mp = PTR(m); - mn = ABSIZ (m); - if (mn == 0) + n = ABSIZ(m); + if (n == 0) DIVIDE_BY_ZERO; + mp = PTR(m); + TMP_MARK; - es = SIZ (e); - if (es <= 0) + es = SIZ(e); + if (UNLIKELY (es <= 0)) { + mpz_t new_b; if (es == 0) { - /* Exponent is zero, result is 1 mod m, i.e., 1 or 0 depending on if - m equals 1. */ - SIZ(r) = (mn == 1 && mp[0] == 1) ? 0 : 1; + /* b^0 mod m, b is anything and m is non-zero. + Result is 1 mod m, i.e., 1 or 0 depending on if m = 1. */ + SIZ(r) = n != 1 || mp[0] != 1; PTR(r)[0] = 1; TMP_FREE; /* we haven't really allocated anything here */ return; } #if HANDLE_NEGATIVE_EXPONENT - MPZ_TMP_INIT (new_b, mn + 1); + MPZ_TMP_INIT (new_b, n + 1); if (! mpz_invert (new_b, b, m)) DIVIDE_BY_ZERO; @@ -174,262 +99,181 @@ } en = es; -#if REDUCE_EXPONENT - /* Reduce exponent by dividing it by phi(m) when m small. */ - if (mn == 1 && mp[0] < 0x7fffffffL && en * GMP_NUMB_BITS > 150) - { - MPZ_TMP_INIT (new_e, 2); - mpz_mod_ui (new_e, e, phi (mp[0])); - e = new_e; - } -#endif + bn = ABSIZ(b); - use_redc = mn < POWM_THRESHOLD && mp[0] % 2 != 0; - if (use_redc) + if (UNLIKELY (bn == 0)) { - /* invm = -1/m mod 2^BITS_PER_MP_LIMB, must have m odd */ - modlimb_invert (invm, mp[0]); - invm = -invm; - } - else - { - /* Normalize m (i.e. make its most significant bit set) as required by - division functions below. */ - count_leading_zeros (m_zero_cnt, mp[mn - 1]); - m_zero_cnt -= GMP_NAIL_BITS; - if (m_zero_cnt != 0) - { - mp_ptr new_mp; - new_mp = TMP_ALLOC_LIMBS (mn); - mpn_lshift (new_mp, mp, mn, m_zero_cnt); - mp = new_mp; - } + SIZ(r) = 0; + TMP_FREE; + return; } - /* Determine optimal value of k, the number of exponent bits we look at - at a time. */ - count_leading_zeros (e_zero_cnt, PTR(e)[en - 1]); - e_zero_cnt -= GMP_NAIL_BITS; - enb = en * GMP_NUMB_BITS - e_zero_cnt; /* number of bits of exponent */ - k = 1; - K = 2; - while (2 * enb > K * (2 + k * (3 + k))) - { - k++; - K *= 2; - if (k == 10) /* cap allocation */ - break; - } + ep = PTR(e); - tp = TMP_ALLOC_LIMBS (2 * mn); - qp = TMP_ALLOC_LIMBS (mn + 1); - - gp = __GMP_ALLOCATE_FUNC_LIMBS (K / 2 * mn); - - /* Compute x*R^n where R=2^BITS_PER_MP_LIMB. */ - bn = ABSIZ (b); - bp = PTR(b); - /* Handle |b| >= m by computing b mod m. FIXME: It is not strictly necessary - for speed or correctness to do this when b and m have the same number of - limbs, perhaps remove mpn_cmp call. */ - if (bn > mn || (bn == mn && mpn_cmp (bp, mp, mn) >= 0)) + /* Handle (b^1 mod m) early, since mpn_pow* do not handle that case. */ + if (UNLIKELY (en == 1 && ep[0] == 1)) { - /* Reduce possibly huge base while moving it to gp[0]. Use a function - call to reduce, since we don't want the quotient allocation to - live until function return. */ - if (use_redc) + rp = TMP_ALLOC_LIMBS (n); + bp = PTR(b); + if (bn >= n) { - reduce (tp + mn, bp, bn, mp, mn); /* b mod m */ - MPN_ZERO (tp, mn); - mpn_tdiv_qr (qp, gp, 0L, tp, 2 * mn, mp, mn); /* unnormnalized! */ + mp_ptr qp = TMP_ALLOC_LIMBS (bn - n + 1); + mpn_tdiv_qr (qp, rp, 0L, bp, bn, mp, n); + rn = n; + MPN_NORMALIZE (rp, rn); + + if (SIZ(b) < 0 && rn != 0) + { + mpn_sub (rp, mp, n, rp, rn); + rn = n; + MPN_NORMALIZE (rp, rn); + } } else { - reduce (gp, bp, bn, mp, mn); + if (SIZ(b) < 0) + { + mpn_sub (rp, mp, n, bp, bn); + rn = n; + rn -= (rp[rn - 1] == 0); + } + else + { + MPN_COPY (rp, bp, bn); + rn = bn; + } } + goto ret; } - else + + /* Remove low zero limbs from M. This loop will terminate for correctly + represented mpz numbers. */ + ncnt = 0; + while (UNLIKELY (mp[0] == 0)) { - /* |b| < m. We pad out operands to become mn limbs, which simplifies - the rest of the function, but slows things down when |b| << m. */ - if (use_redc) - { - MPN_ZERO (tp, mn); - MPN_COPY (tp + mn, bp, bn); - MPN_ZERO (tp + mn + bn, mn - bn); - mpn_tdiv_qr (qp, gp, 0L, tp, 2 * mn, mp, mn); - } - else - { - MPN_COPY (gp, bp, bn); - MPN_ZERO (gp + bn, mn - bn); - } + mp++; + ncnt++; } - - /* Compute xx^i for odd g < 2^i. */ - - xp = TMP_ALLOC_LIMBS (mn); - mpn_sqr_n (tp, gp, mn); - if (use_redc) - mpn_redc_1 (xp, tp, mp, mn, invm); /* xx = x^2*R^n */ - else - mpn_tdiv_qr (qp, xp, 0L, tp, 2 * mn, mp, mn); - this_gp = gp; - for (i = 1; i < K / 2; i++) + nodd = n - ncnt; + cnt = 0; + if (mp[0] % 2 == 0) { - mpn_mul_n (tp, this_gp, xp, mn); - this_gp += mn; - if (use_redc) - mpn_redc_1 (this_gp, tp, mp, mn, invm); /* g[i] = x^(2i+1)*R^n */ - else - mpn_tdiv_qr (qp, this_gp, 0L, tp, 2 * mn, mp, mn); + mp_ptr new = TMP_ALLOC_LIMBS (nodd); + count_trailing_zeros (cnt, mp[0]); + mpn_rshift (new, mp, nodd, cnt); + nodd -= new[nodd - 1] == 0; + mp = new; + ncnt++; } - /* Start the real stuff. */ - ep = PTR (e); - i = en - 1; /* current index */ - c = ep[i]; /* current limb */ - sh = GMP_NUMB_BITS - e_zero_cnt; /* significant bits in ep[i] */ - sh -= k; /* index of lower bit of ep[i] to take into account */ - if (sh < 0) - { /* k-sh extra bits are needed */ - if (i > 0) - { - i--; - c <<= (-sh); - sh += GMP_NUMB_BITS; - c |= ep[i] >> sh; - } + if (ncnt != 0) + { + /* We will call both mpn_powm and mpn_powlo. */ + /* rp needs n, mpn_powlo needs 4n, the 2 mpn_binvert might need more */ + mp_size_t n_largest_binvert = MAX (ncnt, nodd); + mp_size_t itch_binvert = mpn_binvert_itch (n_largest_binvert); + itch = 3 * n + MAX (itch_binvert, 2 * n); } else - c >>= sh; - - for (j = 0; c % 2 == 0; j++) - c >>= 1; - - MPN_COPY (xp, gp + mn * (c >> 1), mn); - while (--j >= 0) { - mpn_sqr_n (tp, xp, mn); - if (use_redc) - mpn_redc_1 (xp, tp, mp, mn, invm); - else - mpn_tdiv_qr (qp, xp, 0L, tp, 2 * mn, mp, mn); + /* We will call just mpn_powm. */ + mp_size_t itch_binvert = mpn_binvert_itch (nodd); + itch = n + MAX (itch_binvert, 2 * n); } + tp = TMP_ALLOC_LIMBS (itch); + + rp = tp; tp += n; + + bp = PTR(b); + mpn_powm (rp, bp, bn, ep, en, mp, nodd, tp); - while (i > 0 || sh > 0) + rn = n; + + if (ncnt != 0) { - c = ep[i]; - l = k; /* number of bits treated */ - sh -= l; - if (sh < 0) + mp_ptr r2, xp, yp, odd_inv_2exp; + unsigned long t; + int bcnt; + + if (bn < ncnt) { - if (i > 0) - { - i--; - c <<= (-sh); - sh += GMP_NUMB_BITS; - c |= ep[i] >> sh; - } - else - { - l += sh; /* last chunk of bits from e; l < k */ - } + mp_ptr new = TMP_ALLOC_LIMBS (ncnt); + MPN_COPY (new, bp, bn); + MPN_ZERO (new + bn, ncnt - bn); + bp = new; } - else - c >>= sh; - c &= ((mp_limb_t) 1 << l) - 1; - /* This while loop implements the sliding window improvement--loop while - the most significant bit of c is zero, squaring xx as we go. */ - while ((c >> (l - 1)) == 0 && (i > 0 || sh > 0)) + r2 = tp; + + if (bp[0] % 2 == 0) { - mpn_sqr_n (tp, xp, mn); - if (use_redc) - mpn_redc_1 (xp, tp, mp, mn, invm); - else - mpn_tdiv_qr (qp, xp, 0L, tp, 2 * mn, mp, mn); - if (sh != 0) - { - sh--; - c = (c << 1) + ((ep[i] >> sh) & 1); - } - else + if (en > 1) { - i--; - sh = GMP_NUMB_BITS - 1; - c = (c << 1) + (ep[i] >> sh); + MPN_ZERO (r2, ncnt); + goto zero; } - } - /* Replace xx by xx^(2^l)*x^c. */ - if (c != 0) - { - for (j = 0; c % 2 == 0; j++) - c >>= 1; + ASSERT (en == 1); + t = (ncnt - (cnt != 0)) * GMP_NUMB_BITS + cnt; - /* c0 = c * 2^j, i.e. xx^(2^l)*x^c = (A^(2^(l - j))*c)^(2^j) */ - l -= j; - while (--l >= 0) + /* Count number of low zero bits in B, up to 3. */ + bcnt = (0x1213 >> ((bp[0] & 7) << 1)) & 0x3; + /* Note that ep[0] * bcnt might overflow, but that just results + in a missed optimization. */ + if (ep[0] * bcnt >= t) { - mpn_sqr_n (tp, xp, mn); - if (use_redc) - mpn_redc_1 (xp, tp, mp, mn, invm); - else - mpn_tdiv_qr (qp, xp, 0L, tp, 2 * mn, mp, mn); + MPN_ZERO (r2, ncnt); + goto zero; } - mpn_mul_n (tp, xp, gp + mn * (c >> 1), mn); - if (use_redc) - mpn_redc_1 (xp, tp, mp, mn, invm); - else - mpn_tdiv_qr (qp, xp, 0L, tp, 2 * mn, mp, mn); } - else - j = l; /* case c=0 */ - while (--j >= 0) - { - mpn_sqr_n (tp, xp, mn); - if (use_redc) - mpn_redc_1 (xp, tp, mp, mn, invm); - else - mpn_tdiv_qr (qp, xp, 0L, tp, 2 * mn, mp, mn); - } - } - if (use_redc) - { - /* Convert back xx to xx/R^n. */ - MPN_COPY (tp, xp, mn); - MPN_ZERO (tp + mn, mn); - mpn_redc_1 (xp, tp, mp, mn, invm); - if (mpn_cmp (xp, mp, mn) >= 0) - mpn_sub_n (xp, xp, mp, mn); - } - else - { - if (m_zero_cnt != 0) + mpn_powlo (r2, bp, ep, en, ncnt, tp + ncnt); + + zero: + if (nodd < ncnt) { - mp_limb_t cy; - cy = mpn_lshift (tp, xp, mn, m_zero_cnt); - tp[mn] = cy; - mpn_tdiv_qr (qp, xp, 0L, tp, mn + (cy != 0), mp, mn); - mpn_rshift (xp, xp, mn, m_zero_cnt); + mp_ptr new = TMP_ALLOC_LIMBS (ncnt); + MPN_COPY (new, mp, nodd); + MPN_ZERO (new + nodd, ncnt - nodd); + mp = new; } + + odd_inv_2exp = tp + n; + mpn_binvert (odd_inv_2exp, mp, ncnt, tp + 2 * n); + + mpn_sub (r2, r2, ncnt, rp, nodd > ncnt ? ncnt : nodd); + + xp = tp + 2 * n; + mpn_mullo_n (xp, odd_inv_2exp, r2, ncnt); + + if (cnt != 0) + xp[ncnt - 1] &= (CNST_LIMB(1) << cnt) - 1; + + yp = tp; + if (ncnt > nodd) + mpn_mul (yp, xp, ncnt, mp, nodd); + else + mpn_mul (yp, mp, nodd, xp, ncnt); + + mpn_add (rp, yp, n, rp, nodd); + + ASSERT (nodd + ncnt >= n); + ASSERT (nodd + ncnt <= n + 1); } - xn = mn; - MPN_NORMALIZE (xp, xn); - if ((ep[0] & 1) && SIZ(b) < 0 && xn != 0) + MPN_NORMALIZE (rp, rn); + + if ((ep[0] & 1) && SIZ(b) < 0 && rn != 0) { - mp = PTR(m); /* want original, unnormalized m */ - mpn_sub (xp, mp, mn, xp, xn); - xn = mn; - MPN_NORMALIZE (xp, xn); + mpn_sub (rp, PTR(m), n, rp, rn); + rn = n; + MPN_NORMALIZE (rp, rn); } - MPZ_REALLOC (r, xn); - SIZ (r) = xn; - MPN_COPY (PTR(r), xp, xn); - __GMP_FREE_FUNC_LIMBS (gp, K / 2 * mn); + ret: + MPZ_REALLOC (r, rn); + SIZ(r) = rn; + MPN_COPY (PTR(r), rp, rn); + TMP_FREE; } diff -Nru gmp-4.3.2+dfsg/mpz/powm_sec.c gmp-5.0.2+dfsg/mpz/powm_sec.c --- gmp-4.3.2+dfsg/mpz/powm_sec.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/powm_sec.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,90 @@ +/* mpz_powm_sec(res,base,exp,mod) -- Set R to (U^E) mod M. + + Contributed to the GNU project by Torbjorn Granlund. + +Copyright 1991, 1993, 1994, 1996, 1997, 2000, 2001, 2002, 2005, 2008, 2009 +Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" + + +void +mpz_powm_sec (mpz_ptr r, mpz_srcptr b, mpz_srcptr e, mpz_srcptr m) +{ + mp_size_t n; + mp_ptr rp, tp; + mp_srcptr bp, ep, mp; + mp_size_t rn, bn, es, en; + TMP_DECL; + + n = ABSIZ(m); + if (n == 0) + DIVIDE_BY_ZERO; + + mp = PTR(m); + + if (mp[0] % 2 == 0) + DIVIDE_BY_ZERO; + + es = SIZ(e); + if (UNLIKELY (es <= 0)) + { + mpz_t new_b; + if (es == 0) + { + /* b^0 mod m, b is anything and m is non-zero. + Result is 1 mod m, i.e., 1 or 0 depending on if m = 1. */ + SIZ(r) = n != 1 || mp[0] != 1; + PTR(r)[0] = 1; + return; + } + DIVIDE_BY_ZERO; + } + + en = es; + bn = ABSIZ(b); + + TMP_MARK; + tp = TMP_ALLOC_LIMBS (n + mpn_powm_sec_itch (bn, en, n)); + + rp = tp; tp += n; + + bp = PTR(b); + ep = PTR(e); + + mpn_powm_sec (rp, bp, bn, ep, en, mp, n, tp); + + rn = n; + + MPN_NORMALIZE (rp, rn); + + if ((ep[0] & 1) && SIZ(b) < 0 && rn != 0) + { + mpn_sub (rp, PTR(m), n, rp, rn); + rn = n; + MPN_NORMALIZE (rp, rn); + } + + MPZ_REALLOC (r, rn); + SIZ(r) = rn; + MPN_COPY (PTR(r), rp, rn); + + TMP_FREE; +} diff -Nru gmp-4.3.2+dfsg/mpz/powm_ui.c gmp-5.0.2+dfsg/mpz/powm_ui.c --- gmp-4.3.2+dfsg/mpz/powm_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/powm_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -109,7 +109,7 @@ e = el; count_leading_zeros (c, e); e = (e << c) << 1; /* shift the exp bits to the left, lose msb */ - c = BITS_PER_MP_LIMB - 1 - c; + c = GMP_LIMB_BITS - 1 - c; /* Main loop. */ @@ -126,7 +126,7 @@ while (c != 0) { - mpn_sqr_n (tp, xp, xn); + mpn_sqr (tp, xp, xn); tn = 2 * xn; tn -= tp[tn - 1] == 0; if (tn < mn) { diff -Nru gmp-4.3.2+dfsg/mpz/pprime_p.c gmp-5.0.2+dfsg/mpz/pprime_p.c --- gmp-4.3.2+dfsg/mpz/pprime_p.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/pprime_p.c 2011-05-08 09:49:29.000000000 +0000 @@ -70,19 +70,19 @@ r = mpn_mod_1 (PTR(n), (mp_size_t) SIZ(n), (mp_limb_t) PP); #endif if (r % 3 == 0 -#if BITS_PER_MP_LIMB >= 4 +#if GMP_LIMB_BITS >= 4 || r % 5 == 0 #endif -#if BITS_PER_MP_LIMB >= 8 +#if GMP_LIMB_BITS >= 8 || r % 7 == 0 #endif -#if BITS_PER_MP_LIMB >= 16 +#if GMP_LIMB_BITS >= 16 || r % 11 == 0 || r % 13 == 0 #endif -#if BITS_PER_MP_LIMB >= 32 +#if GMP_LIMB_BITS >= 32 || r % 17 == 0 || r % 19 == 0 || r % 23 == 0 || r % 29 == 0 #endif -#if BITS_PER_MP_LIMB >= 64 +#if GMP_LIMB_BITS >= 64 || r % 31 == 0 || r % 37 == 0 || r % 41 == 0 || r % 43 == 0 || r % 47 == 0 || r % 53 == 0 #endif diff -Nru gmp-4.3.2+dfsg/mpz/realloc2.c gmp-5.0.2+dfsg/mpz/realloc2.c --- gmp-4.3.2+dfsg/mpz/realloc2.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/realloc2.c 2011-05-08 09:49:29.000000000 +0000 @@ -23,7 +23,7 @@ #include "gmp-impl.h" void -mpz_realloc2 (mpz_ptr m, unsigned long bits) +mpz_realloc2 (mpz_ptr m, mp_bitcnt_t bits) { mp_size_t new_alloc; diff -Nru gmp-4.3.2+dfsg/mpz/remove.c gmp-5.0.2+dfsg/mpz/remove.c --- gmp-4.3.2+dfsg/mpz/remove.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/remove.c 2011-05-08 09:49:29.000000000 +0000 @@ -20,12 +20,12 @@ #include "gmp.h" #include "gmp-impl.h" -unsigned long int +mp_bitcnt_t mpz_remove (mpz_ptr dest, mpz_srcptr src, mpz_srcptr f) { mpz_t fpow[GMP_LIMB_BITS]; /* Really MP_SIZE_T_BITS */ mpz_t x, rem; - unsigned long int pwr; + mp_bitcnt_t pwr; int p; if (mpz_cmp_ui (f, 1) <= 0) @@ -40,7 +40,7 @@ if (mpz_cmp_ui (f, 2) == 0) { - unsigned long int s0; + mp_bitcnt_t s0; s0 = mpz_scan1 (src, 0); mpz_div_2exp (dest, src, s0); return s0; diff -Nru gmp-4.3.2+dfsg/mpz/rrandomb.c gmp-5.0.2+dfsg/mpz/rrandomb.c --- gmp-4.3.2+dfsg/mpz/rrandomb.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/rrandomb.c 2011-05-08 09:49:29.000000000 +0000 @@ -22,10 +22,10 @@ #include "gmp.h" #include "gmp-impl.h" -static void gmp_rrandomb __GMP_PROTO ((mp_ptr, gmp_randstate_t, unsigned long int)); +static void gmp_rrandomb __GMP_PROTO ((mp_ptr, gmp_randstate_t, mp_bitcnt_t)); void -mpz_rrandomb (mpz_ptr x, gmp_randstate_t rstate, unsigned long int nbits) +mpz_rrandomb (mpz_ptr x, gmp_randstate_t rstate, mp_bitcnt_t nbits) { mp_size_t nl; @@ -49,9 +49,9 @@ #endif static void -gmp_rrandomb (mp_ptr rp, gmp_randstate_t rstate, unsigned long int nbits) +gmp_rrandomb (mp_ptr rp, gmp_randstate_t rstate, mp_bitcnt_t nbits) { - unsigned long int bi; + mp_bitcnt_t bi; mp_limb_t ranm; /* buffer for random bits */ unsigned cap_chunksize, chunksize; mp_size_t i; diff -Nru gmp-4.3.2+dfsg/mpz/scan0.c gmp-5.0.2+dfsg/mpz/scan0.c --- gmp-4.3.2+dfsg/mpz/scan0.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/scan0.c 2011-05-08 09:49:29.000000000 +0000 @@ -27,14 +27,14 @@ search under u<0, but usually the search won't go very far so it seems reasonable to inline that code. */ -unsigned long -mpz_scan0 (mpz_srcptr u, unsigned long starting_bit) +mp_bitcnt_t +mpz_scan0 (mpz_srcptr u, mp_bitcnt_t starting_bit) { mp_srcptr u_ptr = PTR(u); mp_size_t size = SIZ(u); mp_size_t abs_size = ABS(size); mp_srcptr u_end = u_ptr + abs_size; - unsigned long starting_limb = starting_bit / GMP_NUMB_BITS; + mp_size_t starting_limb = starting_bit / GMP_NUMB_BITS; mp_srcptr p = u_ptr + starting_limb; mp_limb_t limb; int cnt; @@ -57,7 +57,7 @@ { p++; if (p == u_end) - return (unsigned long) abs_size * GMP_NUMB_BITS; + return (mp_bitcnt_t) abs_size * GMP_NUMB_BITS; limb = *p; } @@ -115,5 +115,5 @@ ASSERT (limb != 0); count_trailing_zeros (cnt, limb); - return (p - u_ptr) * GMP_NUMB_BITS + cnt; + return (mp_bitcnt_t) (p - u_ptr) * GMP_NUMB_BITS + cnt; } diff -Nru gmp-4.3.2+dfsg/mpz/scan1.c gmp-5.0.2+dfsg/mpz/scan1.c --- gmp-4.3.2+dfsg/mpz/scan1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/scan1.c 2011-05-08 09:49:29.000000000 +0000 @@ -27,14 +27,14 @@ (except when in the high limb), but usually the search won't go very far so it seems reasonable to inline that code. */ -unsigned long -mpz_scan1 (mpz_srcptr u, unsigned long starting_bit) +mp_bitcnt_t +mpz_scan1 (mpz_srcptr u, mp_bitcnt_t starting_bit) { mp_srcptr u_ptr = PTR(u); mp_size_t size = SIZ(u); mp_size_t abs_size = ABS(size); mp_srcptr u_end = u_ptr + abs_size; - unsigned long starting_limb = starting_bit / GMP_NUMB_BITS; + mp_size_t starting_limb = starting_bit / GMP_NUMB_BITS; mp_srcptr p = u_ptr + starting_limb; mp_limb_t limb; int cnt; @@ -122,7 +122,7 @@ { p++; if (p == u_end) - return abs_size * GMP_NUMB_BITS; + return (mp_bitcnt_t) abs_size * GMP_NUMB_BITS; limb = *p; } @@ -133,5 +133,5 @@ got_limb: ASSERT (limb != 0); count_trailing_zeros (cnt, limb); - return (p - u_ptr) * GMP_NUMB_BITS + cnt; + return (mp_bitcnt_t) (p - u_ptr) * GMP_NUMB_BITS + cnt; } diff -Nru gmp-4.3.2+dfsg/mpz/setbit.c gmp-5.0.2+dfsg/mpz/setbit.c --- gmp-4.3.2+dfsg/mpz/setbit.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/setbit.c 2011-05-08 09:49:29.000000000 +0000 @@ -22,7 +22,7 @@ #include "gmp-impl.h" void -mpz_setbit (mpz_ptr d, unsigned long int bit_index) +mpz_setbit (mpz_ptr d, mp_bitcnt_t bit_index) { mp_size_t dsize = d->_mp_size; mp_ptr dp = d->_mp_d; diff -Nru gmp-4.3.2+dfsg/mpz/sqrt.c gmp-5.0.2+dfsg/mpz/sqrt.c --- gmp-4.3.2+dfsg/mpz/sqrt.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/sqrt.c 2011-05-08 09:49:29.000000000 +0000 @@ -67,7 +67,7 @@ if (root_ptr == op_ptr) { /* ROOT and OP are identical. Allocate temporary space for OP. */ - op_ptr = (mp_ptr) TMP_ALLOC (op_size * BYTES_PER_MP_LIMB); + op_ptr = TMP_ALLOC_LIMBS (op_size); /* Copy to the temporary space. Hack: Avoid temporary variable by using ROOT_PTR. */ MPN_COPY (op_ptr, root_ptr, op_size); diff -Nru gmp-4.3.2+dfsg/mpz/sqrtrem.c gmp-5.0.2+dfsg/mpz/sqrtrem.c --- gmp-4.3.2+dfsg/mpz/sqrtrem.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/sqrtrem.c 2011-05-08 09:49:29.000000000 +0000 @@ -79,7 +79,7 @@ if (root_ptr == op_ptr) { /* ROOT and OP are identical. Allocate temporary space for OP. */ - op_ptr = (mp_ptr) TMP_ALLOC (op_size * BYTES_PER_MP_LIMB); + op_ptr = TMP_ALLOC_LIMBS (op_size); /* Copy to the temporary space. Hack: Avoid temporary variable by using ROOT_PTR. */ MPN_COPY (op_ptr, root_ptr, op_size); diff -Nru gmp-4.3.2+dfsg/mpz/tdiv_q_2exp.c gmp-5.0.2+dfsg/mpz/tdiv_q_2exp.c --- gmp-4.3.2+dfsg/mpz/tdiv_q_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/tdiv_q_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -22,7 +22,7 @@ #include "gmp-impl.h" void -mpz_tdiv_q_2exp (mpz_ptr w, mpz_srcptr u, unsigned long int cnt) +mpz_tdiv_q_2exp (mpz_ptr w, mpz_srcptr u, mp_bitcnt_t cnt) { mp_size_t usize, wsize; mp_size_t limb_cnt; diff -Nru gmp-4.3.2+dfsg/mpz/tdiv_q.c gmp-5.0.2+dfsg/mpz/tdiv_q.c --- gmp-4.3.2+dfsg/mpz/tdiv_q.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/tdiv_q.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ /* mpz_tdiv_q -- divide two integers and produce a quotient. -Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2005 Free Software Foundation, +Copyright 1991, 1993, 1994, 1996, 2000, 2001, 2005, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -27,7 +27,7 @@ { mp_size_t ql; mp_size_t ns, ds, nl, dl; - mp_ptr np, dp, qp, rp; + mp_ptr np, dp, qp; TMP_DECL; ns = SIZ (num); @@ -49,19 +49,14 @@ TMP_MARK; qp = PTR (quot); - rp = (mp_ptr) TMP_ALLOC (dl * BYTES_PER_MP_LIMB); np = PTR (num); dp = PTR (den); - /* FIXME: We should think about how to handle the temporary allocation. - Perhaps mpn_tdiv_qr should handle it, since it anyway often needs to - allocate temp space. */ - /* Copy denominator to temporary space if it overlaps with the quotient. */ if (dp == qp) { mp_ptr tp; - tp = (mp_ptr) TMP_ALLOC (dl * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (dl); MPN_COPY (tp, dp, dl); dp = tp; } @@ -69,12 +64,17 @@ if (np == qp) { mp_ptr tp; - tp = (mp_ptr) TMP_ALLOC (nl * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (nl + 1); MPN_COPY (tp, np, nl); - np = tp; + /* Overlap dividend and scratch. */ + mpn_div_q (qp, tp, nl, dp, dl, tp); + } + else + { + mp_ptr tp; + tp = TMP_ALLOC_LIMBS (nl + 1); + mpn_div_q (qp, np, nl, dp, dl, tp); } - - mpn_tdiv_qr (qp, rp, 0L, np, nl, dp, dl); ql -= qp[ql - 1] == 0; diff -Nru gmp-4.3.2+dfsg/mpz/tdiv_qr.c gmp-5.0.2+dfsg/mpz/tdiv_qr.c --- gmp-4.3.2+dfsg/mpz/tdiv_qr.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/tdiv_qr.c 2011-05-08 09:49:29.000000000 +0000 @@ -81,7 +81,7 @@ if (dp == rp || dp == qp) { mp_ptr tp; - tp = (mp_ptr) TMP_ALLOC (dl * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (dl); MPN_COPY (tp, dp, dl); dp = tp; } @@ -90,7 +90,7 @@ if (np == rp || np == qp) { mp_ptr tp; - tp = (mp_ptr) TMP_ALLOC (nl * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (nl); MPN_COPY (tp, np, nl); np = tp; } diff -Nru gmp-4.3.2+dfsg/mpz/tdiv_r_2exp.c gmp-5.0.2+dfsg/mpz/tdiv_r_2exp.c --- gmp-4.3.2+dfsg/mpz/tdiv_r_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/tdiv_r_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -21,7 +21,7 @@ #include "gmp-impl.h" void -mpz_tdiv_r_2exp (mpz_ptr res, mpz_srcptr in, unsigned long int cnt) +mpz_tdiv_r_2exp (mpz_ptr res, mpz_srcptr in, mp_bitcnt_t cnt) { mp_size_t in_size = ABS (in->_mp_size); mp_size_t res_size; diff -Nru gmp-4.3.2+dfsg/mpz/tdiv_r.c gmp-5.0.2+dfsg/mpz/tdiv_r.c --- gmp-4.3.2+dfsg/mpz/tdiv_r.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/tdiv_r.c 2011-05-08 09:49:29.000000000 +0000 @@ -54,7 +54,7 @@ } TMP_MARK; - qp = (mp_ptr) TMP_ALLOC (ql * BYTES_PER_MP_LIMB); + qp = TMP_ALLOC_LIMBS (ql); rp = PTR (rem); np = PTR (num); dp = PTR (den); @@ -67,7 +67,7 @@ if (dp == rp) { mp_ptr tp; - tp = (mp_ptr) TMP_ALLOC (dl * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (dl); MPN_COPY (tp, dp, dl); dp = tp; } @@ -75,7 +75,7 @@ if (np == rp) { mp_ptr tp; - tp = (mp_ptr) TMP_ALLOC (nl * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (nl); MPN_COPY (tp, np, nl); np = tp; } diff -Nru gmp-4.3.2+dfsg/mpz/tstbit.c gmp-5.0.2+dfsg/mpz/tstbit.c --- gmp-4.3.2+dfsg/mpz/tstbit.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/tstbit.c 2011-05-08 09:49:29.000000000 +0000 @@ -38,12 +38,12 @@ the limb_index >= abs_size test covers u=0 too. */ int -mpz_tstbit (mpz_srcptr u, unsigned long bit_index) +mpz_tstbit (mpz_srcptr u, mp_bitcnt_t bit_index) { mp_srcptr u_ptr = PTR(u); mp_size_t size = SIZ(u); unsigned abs_size = ABS(size); - unsigned long limb_index = bit_index / GMP_NUMB_BITS; + mp_size_t limb_index = bit_index / GMP_NUMB_BITS; mp_srcptr p = u_ptr + limb_index; mp_limb_t limb; diff -Nru gmp-4.3.2+dfsg/mpz/urandomb.c gmp-5.0.2+dfsg/mpz/urandomb.c --- gmp-4.3.2+dfsg/mpz/urandomb.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/mpz/urandomb.c 2011-05-08 09:49:29.000000000 +0000 @@ -23,7 +23,7 @@ #include "gmp-impl.h" void -mpz_urandomb (mpz_ptr rop, gmp_randstate_t rstate, unsigned long int nbits) +mpz_urandomb (mpz_ptr rop, gmp_randstate_t rstate, mp_bitcnt_t nbits) { mp_ptr rp; mp_size_t size; diff -Nru gmp-4.3.2+dfsg/NEWS gmp-5.0.2+dfsg/NEWS --- gmp-4.3.2+dfsg/NEWS 2010-01-07 20:09:02.000000000 +0000 +++ gmp-5.0.2+dfsg/NEWS 2011-05-08 09:49:29.000000000 +0000 @@ -1,10 +1,155 @@ Copyright 1996, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, -2009, 2010 Free Software Foundation, Inc. +2009, 2010, 2011 Free Software Foundation, Inc. Verbatim copying and distribution of this entire article is permitted in any medium, provided this notice is preserved. +Changes between GMP version 5.0.1 and 5.0.2 + + BUGS FIXED + * Many minor bugs related to portability fixed. + + * The support for HPPA 2.0N now works, after an assembly bug fix. + + * A test case type error has been fixed. The symptom of this bug + was spurious 'make check' failures. + + SPEEDUPS + * None, except indirectly through recognition of new CPUs. + + FEATURES + * Fat builds are now supported for 64-bit x86 processors also under Darwin. + + MISC + * None. + + +Changes between GMP version 5.0.0 and 5.0.1 + + BUGS FIXED + * Fat builds fixed. + + * Fixed crash for huge multiplies when old FFT_TABLE2 type of parameter + selection tables' sentinel was smaller than multiplied operands. + + * The solib numbers now reflect the removal of the documented but preliminary + mpn_bdivmod function; we correctly flag incompatibility with GMP 4.3. + GMP 5.0.0 has this wrong, and should perhaps be uninstalled to avoid + confusion. + + SPEEDUPS + * Multiplication of large numbers has indirectly been sped up through + better FFT tuning and processor recognition. Since many operations + depend on multiplication, there will be a general speedup. + + FEATURES + * More Core i3, i5 an Core i7 processor models are recognised. + + * Fixes and workarounds for Mac OS quirks should make this GMP version + build using many of the different versions of "Xcode". + + MISC + * The amount of scratch memory needed for multiplication of huge numbers + have been reduced substantially (but is still larger than in GMP 4.3.) + + * Likewise, the amount of scratch memory needed for division of large + numbers have been reduced substantially. + + * The FFT tuning code of tune/tuneup.c has been completely rewritten, + and new, large FFT parameter selection tables are provided for many + machines. + + * Upgraded to the latest autoconf, automake, libtool. + + +Changes between GMP version 4.3.X and 5.0.0 + + BUGS FIXED + * None (contains the same fixes as release 4.3.2). + + SPEEDUPS + * Multiplication has been overhauled: + (1) Multiplication of larger same size operands has been improved with + the addition of two new Toom functions and a new internal function + mpn_mulmod_bnm1 (computing U * V mod (B^n-1), B being the word base. + This latter function is used for the largest products, waiting for a + better Schoenhage-Strassen U * V mod (B^n+1) implementation. + (2) Likewise for squaring. + (3) Multiplication of different size operands has been improved with the + addition of many new Toom function, and by selecting underlying + functions better from the main multiply functions. + + * Division and mod have been overhauled: + (1) Plain "schoolbook" division is reimplemented using faster quotient + approximation. + (2) Division Q = N/D, R = N mod D where both the quotient and remainder + are needed now runs in time O(M(log(N))). This is an improvement of + a factor log(log(N)) + (3) Division where just the quotient is needed is now O(M(log(Q))) on + average. + (4) Modulo operations using Montgomery REDC form now take time O(M(n)). + (5) Exact division Q = N/D by means of mpz_divexact has been improved + for all sizes, and now runs in time O(M(log(N))). + + * The function mpz_powm is now faster for all sizes. Its complexity has + gone from O(M(n)log(n)m) to O(M(n)m) where n is the size of the modulo + argument and m is the size of the exponent. It is also radically + faster for even modulus, since it now partially factors such modulus + and performs two smaller modexp operations, then uses CRT. + + * The internal support for multiplication yielding just the lower n limbs + has been improved by using Mulders' algorithm. + + * Computation of inverses, both plain 1/N and 1/N mod B^n have been + improved by using well-tuned Newton iterations, and wrap-around + multiplication using mpn_mulmod_bnm1. + + * A new algorithm makes mpz_perfect_power_p asymptotically faster. + + * The function mpz_remove uses a much faster algorithm, is better tuned, + and also benefits from the division improvements. + + * Intel Atom and VIA Nano specific optimisations. + + * Plus hundreds of smaller improvements and tweaks! + + FEATURES + * New mpz function: mpz_powm_sec for side-channel quiet modexp + computations. + + * New mpn functions: mpn_sqr, mpn_and_n, mpn_ior_n, mpn_xor_n, mpn_nand_n, + mpn_nior_n, mpn_xnor_n, mpn_andn_n, mpn_iorn_n, mpn_com, mpn_neg, + mpn_copyi, mpn_copyd, mpn_zero. + + * The function mpn_tdiv_qr now allows certain argument overlap. + + * Support for fat binaries for 64-bit x86 processors has been added. + + * A new type, mp_bitcnt_t for bignum bit counts, has been introduced. + + * Support for Windows64 through mingw64 has been added. + + * The cofactors of mpz_gcdext and mpn_gcdext are now more strictly + normalised, returning to how GMP 4.2 worked. (Note that also release + 4.3.2 has this change.) + + MISC + * The mpn_mul function should no longer be used for squaring, + instead use the new mpn_sqr. + + * The algorithm selection has been improved, the number of thresholds have + more than doubled, and the tuning and use of existing thresholds have + been improved. + + * The tune/speed program can measure many of new functions. + + * The mpn_bdivmod function has been removed. We do not consider this an + incompatible change, since the function was marked as preliminary. + + * The testsuite has been enhanced in various ways. + + Changes between GMP version 4.3.1 and 4.3.2 Bugs: diff -Nru gmp-4.3.2+dfsg/nextprime.c gmp-5.0.2+dfsg/nextprime.c --- gmp-4.3.2+dfsg/nextprime.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/nextprime.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,156 @@ +/* gmp_nextprime -- generate small primes reasonably efficiently for internal + GMP needs. + + Contributed to the GNU project by Torbjorn Granlund. Miscellaneous + improvements by Martin Boij. + + THE FUNCTIONS IN THIS FILE ARE INTERNAL WITH MUTABLE INTERFACES. IT IS ONLY + SAFE TO REACH THEM THROUGH DOCUMENTED INTERFACES. IN FACT, IT IS ALMOST + GUARANTEED THAT THEY WILL CHANGE OR DISAPPEAR IN A FUTURE GNU MP RELEASE. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +/* + Optimisation ideas: + + 1. Unroll the sieving loops. Should reach 1 write/cycle. That would be a 2x + improvement. + + 2. Separate sieving with primes p < SIEVESIZE and p >= SIEVESIZE. The latter + will need at most one write, and thus not need any inner loop. + + 3. For primes p >= SIEVESIZE, i.e., typically the majority of primes, we + perform more than one division per sieving write. That might dominate the + entire run time for the nextprime function. A incrementally initialised + remainder table of Pi(65536) = 6542 16-bit entries could replace that + division. +*/ + +#include "gmp.h" +#include "gmp-impl.h" +#include /* for memset */ + + +unsigned long int +gmp_nextprime (gmp_primesieve_t *ps) +{ + unsigned long p, d, pi; + unsigned char *sp; + static unsigned char addtab[] = + { 2,4,2,4,6,2,6,4,2,4,6,6,2,6,4,2,6,4,6,8,4,2,4,2,4,8,6,4,6,2,4,6,2,6,6,4, + 2,4,6,2,6,4,2,4,2,10,2,10 }; + unsigned char *addp = addtab; + unsigned long ai; + + /* Look for already sieved primes. A sentinel at the end of the sieving + area allows us to use a very simple loop here. */ + d = ps->d; + sp = ps->s + d; + while (*sp != 0) + sp++; + if (sp != ps->s + SIEVESIZE) + { + d = sp - ps->s; + ps->d = d + 1; + return ps->s0 + 2 * d; + } + + /* Handle the number 2 separately. */ + if (ps->s0 < 3) + { + ps->s0 = 3 - 2 * SIEVESIZE; /* Tricky */ + return 2; + } + + /* Exhausted computed primes. Resieve, then call ourselves recursively. */ + +#if 0 + for (sp = ps->s; sp < ps->s + SIEVESIZE; sp++) + *sp = 0; +#else + memset (ps->s, 0, SIEVESIZE); +#endif + + ps->s0 += 2 * SIEVESIZE; + + /* Update sqrt_s0 as needed. */ + while ((ps->sqrt_s0 + 1) * (ps->sqrt_s0 + 1) <= ps->s0 + 2 * SIEVESIZE - 1) + ps->sqrt_s0++; + + pi = ((ps->s0 + 3) / 2) % 3; + if (pi > 0) + pi = 3 - pi; + if (ps->s0 + 2 * pi <= 3) + pi += 3; + sp = ps->s + pi; + while (sp < ps->s + SIEVESIZE) + { + *sp = 1, sp += 3; + } + + pi = ((ps->s0 + 5) / 2) % 5; + if (pi > 0) + pi = 5 - pi; + if (ps->s0 + 2 * pi <= 5) + pi += 5; + sp = ps->s + pi; + while (sp < ps->s + SIEVESIZE) + { + *sp = 1, sp += 5; + } + + pi = ((ps->s0 + 7) / 2) % 7; + if (pi > 0) + pi = 7 - pi; + if (ps->s0 + 2 * pi <= 7) + pi += 7; + sp = ps->s + pi; + while (sp < ps->s + SIEVESIZE) + { + *sp = 1, sp += 7; + } + + p = 11; + ai = 0; + while (p <= ps->sqrt_s0) + { + pi = ((ps->s0 + p) / 2) % p; + if (pi > 0) + pi = p - pi; + if (ps->s0 + 2 * pi <= p) + pi += p; + sp = ps->s + pi; + while (sp < ps->s + SIEVESIZE) + { + *sp = 1, sp += p; + } + p += addp[ai]; + ai = (ai + 1) % 48; + } + ps->d = 0; + return gmp_nextprime (ps); +} + +void +gmp_init_primesieve (gmp_primesieve_t *ps) +{ + ps->s0 = 0; + ps->sqrt_s0 = 0; + ps->d = SIEVESIZE; + ps->s[SIEVESIZE] = 0; /* sentinel */ +} diff -Nru gmp-4.3.2+dfsg/printf/doprntf.c gmp-5.0.2+dfsg/printf/doprntf.c --- gmp-4.3.2+dfsg/printf/doprntf.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/printf/doprntf.c 2011-05-08 09:49:29.000000000 +0000 @@ -62,7 +62,7 @@ int fraczeros, fraclen, preczeros; char *s, *free_ptr; mp_exp_t exp; - char exponent[BITS_PER_MP_LIMB + 10]; + char exponent[GMP_LIMB_BITS + 10]; const char *showbase; int retval = 0; @@ -91,7 +91,7 @@ digit and subtract that from prec. In either case add 2 so the round to nearest can be applied accurately. */ ndigits = prec + 2 - + EXP(f) * (__mp_bases[ABS(p->base)].chars_per_limb + (EXP(f)>=0)); + + EXP(f) * (mp_bases[ABS(p->base)].chars_per_limb + (EXP(f)>=0)); ndigits = MAX (ndigits, 1); break; diff -Nru gmp-4.3.2+dfsg/printf/Makefile.in gmp-5.0.2+dfsg/printf/Makefile.in --- gmp-4.3.2+dfsg/printf/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/printf/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -99,7 +99,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -123,10 +122,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -166,6 +164,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -199,10 +198,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -232,7 +231,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/printf/snprntffuns.c gmp-5.0.2+dfsg/printf/snprntffuns.c --- gmp-4.3.2+dfsg/printf/snprntffuns.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/printf/snprntffuns.c 2011-05-08 09:49:29.000000000 +0000 @@ -45,7 +45,7 @@ no indication how big the output would have been. It's necessary to re-run to determine that size. - "size-1" would mean sucess from a C99 vsnprintf, and the re-run is + "size-1" would mean success from a C99 vsnprintf, and the re-run is unnecessary in this case, but we don't bother to try to detect what sort of vsnprintf we've got. size-1 should occur rarely in normal circumstances. diff -Nru gmp-4.3.2+dfsg/randlc2s.c gmp-5.0.2+dfsg/randlc2s.c --- gmp-4.3.2+dfsg/randlc2s.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/randlc2s.c 2011-05-08 09:49:29.000000000 +0000 @@ -62,7 +62,7 @@ }; int -gmp_randinit_lc_2exp_size (gmp_randstate_t rstate, unsigned long size) +gmp_randinit_lc_2exp_size (gmp_randstate_t rstate, mp_bitcnt_t size) { const struct __gmp_rand_lc_scheme_struct *sp; mpz_t a; diff -Nru gmp-4.3.2+dfsg/randlc2x.c gmp-5.0.2+dfsg/randlc2x.c --- gmp-4.3.2+dfsg/randlc2x.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/randlc2x.c 2011-05-08 09:49:29.000000000 +0000 @@ -92,11 +92,11 @@ { mp_size_t tmp = an + seedn; ta = tn + 1; - tp = (mp_ptr) TMP_ALLOC (ta * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (ta); MPN_ZERO (&tp[tmp], ta - tmp); /* mpn_mul won't zero it out. */ } else - tp = (mp_ptr) TMP_ALLOC (ta * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (ta); /* t = a * seed. NOTE: an is always > 0; see initialization. */ ASSERT (seedn >= an && an > 0); @@ -155,7 +155,7 @@ chunk_nbits = p->_mp_m2exp / 2; tn = BITS_TO_LIMBS (chunk_nbits); - tp = (mp_ptr) TMP_ALLOC (tn * BYTES_PER_MP_LIMB); + tp = TMP_ALLOC_LIMBS (tn); rbitpos = 0; while (rbitpos + chunk_nbits <= nbits) @@ -283,7 +283,7 @@ gmp_randinit_lc_2exp (gmp_randstate_t rstate, mpz_srcptr a, unsigned long int c, - unsigned long int m2exp) + mp_bitcnt_t m2exp) { gmp_rand_lc_struct *p; mp_size_t seedn = BITS_TO_LIMBS (m2exp); diff -Nru gmp-4.3.2+dfsg/scanf/doscan.c gmp-5.0.2+dfsg/scanf/doscan.c --- gmp-4.3.2+dfsg/scanf/doscan.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/scanf/doscan.c 2011-05-08 09:49:29.000000000 +0000 @@ -70,7 +70,7 @@ It's necessary to parse up the format string to recognise the GMP extra types F, Q and Z. Other types and conversions are passed across to the standard sscanf or fscanf via funs->scan, for ease of - implemenation. This is essential in the case of something like glibc + implementation. This is essential in the case of something like glibc %p where the pointer format isn't actually documented. Because funs->scan doesn't get the whole input it can't put the right diff -Nru gmp-4.3.2+dfsg/scanf/Makefile.in gmp-5.0.2+dfsg/scanf/Makefile.in --- gmp-4.3.2+dfsg/scanf/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/scanf/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -96,7 +96,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -120,10 +119,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -163,6 +161,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -196,10 +195,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -229,7 +228,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/tests/amd64check.c gmp-5.0.2+dfsg/tests/amd64check.c --- gmp-4.3.2+dfsg/tests/amd64check.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/amd64check.c 2011-05-08 09:49:29.000000000 +0000 @@ -25,18 +25,18 @@ /* Vector if constants and register values. We use one vector to allow access via a base pointer, very beneficial for the PIC-enabled amd64call.asm. */ -long calling_conventions_values[23] = +mp_limb_t calling_conventions_values[23] = { - 0x1234567887654321L, /* want_rbx */ - 0x89ABCDEFFEDCBA98L, /* want_rbp */ - 0xDEADBEEFBADECAFEL, /* want_r12 */ - 0xFFEEDDCCBBAA9988L, /* want_r13 */ - 0x0011223344556677L, /* want_r14 */ - 0x1234432156788765L, /* want_r15 */ - - 0xFEEDABBACAAFBEED, /* JUNK_RAX */ - 0xAB78DE89FF5125BB, /* JUNK_R10 */ - 0x1238901890189031 /* JUNK_R11 */ + CNST_LIMB(0x1234567887654321), /* want_rbx */ + CNST_LIMB(0x89ABCDEFFEDCBA98), /* want_rbp */ + CNST_LIMB(0xDEADBEEFBADECAFE), /* want_r12 */ + CNST_LIMB(0xFFEEDDCCBBAA9988), /* want_r13 */ + CNST_LIMB(0x0011223344556677), /* want_r14 */ + CNST_LIMB(0x1234432156788765), /* want_r15 */ + + CNST_LIMB(0xFEEDABBACAAFBEED), /* JUNK_RAX */ + CNST_LIMB(0xAB78DE89FF5125BB), /* JUNK_R10 */ + CNST_LIMB(0x1238901890189031) /* JUNK_R11 */ /* rest of array used for dynamic values. */ }; diff -Nru gmp-4.3.2+dfsg/tests/cxx/Makefile.in gmp-5.0.2+dfsg/tests/cxx/Makefile.in --- gmp-4.3.2+dfsg/tests/cxx/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/cxx/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -185,7 +185,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -209,10 +208,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -252,6 +250,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -285,10 +284,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -318,7 +317,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/tests/devel/anymul_1.c gmp-5.0.2+dfsg/tests/devel/anymul_1.c --- gmp-4.3.2+dfsg/tests/devel/anymul_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/anymul_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -147,7 +147,7 @@ cyc = ((double) t * CLOCK) / (TIMES * size * 1000.0); printf (funcname ": %5ldms (%.3f cycles/limb) [%.2f Gb/s]\n", t, cyc, - CLOCK/cyc*BITS_PER_MP_LIMB*BITS_PER_MP_LIMB/1e9); + CLOCK/cyc*GMP_LIMB_BITS*GMP_LIMB_BITS/1e9); #endif #ifndef NOCHECK @@ -237,7 +237,7 @@ { #ifdef _LONG_LONG_LIMB printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (BITS_PER_MP_LIMB/2)), + (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); #else printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); diff -Nru gmp-4.3.2+dfsg/tests/devel/aors_n.c gmp-5.0.2+dfsg/tests/devel/aors_n.c --- gmp-4.3.2+dfsg/tests/devel/aors_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/aors_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -214,7 +214,7 @@ { #ifdef _LONG_LONG_LIMB printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (BITS_PER_MP_LIMB/2)), + (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); #else printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); diff -Nru gmp-4.3.2+dfsg/tests/devel/copy.c gmp-5.0.2+dfsg/tests/devel/copy.c --- gmp-4.3.2+dfsg/tests/devel/copy.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/copy.c 2011-05-08 09:49:29.000000000 +0000 @@ -178,7 +178,7 @@ { #ifdef _LONG_LONG_LIMB printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (BITS_PER_MP_LIMB/2)), + (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); #else printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); diff -Nru gmp-4.3.2+dfsg/tests/devel/divmod_1.c gmp-5.0.2+dfsg/tests/devel/divmod_1.c --- gmp-4.3.2+dfsg/tests/devel/divmod_1.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/divmod_1.c 2011-05-08 09:49:29.000000000 +0000 @@ -141,7 +141,7 @@ cyc = ((double) t * CLOCK) / (TIMES * nn * 1000.0); printf ("mpn_divrem_1 int: %5ldms (%.3f cycles/limb) [%.2f Gb/s]\n", t, cyc, - CLOCK/cyc*BITS_PER_MP_LIMB*BITS_PER_MP_LIMB/1e9); + CLOCK/cyc*GMP_LIMB_BITS*GMP_LIMB_BITS/1e9); t0 = cputime(); for (i = 0; i < TIMES; i++) mpn_divrem_1 (dx + 1, fn, np, 0, dlimb); @@ -149,7 +149,7 @@ cyc = ((double) t * CLOCK) / (TIMES * fn * 1000.0); printf ("mpn_divrem_1 frac: %5ldms (%.3f cycles/limb) [%.2f Gb/s]\n", t, cyc, - CLOCK/cyc*BITS_PER_MP_LIMB*BITS_PER_MP_LIMB/1e9); + CLOCK/cyc*GMP_LIMB_BITS*GMP_LIMB_BITS/1e9); #endif retx = refmpn_divrem_1 (dx + 1, fn, np, nn, dlimb); @@ -186,7 +186,7 @@ { #ifdef _LONG_LONG_LIMB printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (BITS_PER_MP_LIMB/2)), + (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); #else printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); diff -Nru gmp-4.3.2+dfsg/tests/devel/divrem.c gmp-5.0.2+dfsg/tests/devel/divrem.c --- gmp-4.3.2+dfsg/tests/devel/divrem.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/divrem.c 2011-05-08 09:49:29.000000000 +0000 @@ -88,7 +88,7 @@ mpn_random2 (nptr, nsize); mpn_random2 (dptr, dsize); - dptr[dsize - 1] |= (mp_limb_t) 1 << (BITS_PER_MP_LIMB - 1); + dptr[dsize - 1] |= (mp_limb_t) 1 << (GMP_LIMB_BITS - 1); MPN_COPY (rptr, nptr, nsize); qlimb = mpn_divrem (qptr, (mp_size_t) 0, rptr, nsize, dptr, dsize); diff -Nru gmp-4.3.2+dfsg/tests/devel/logops_n.c gmp-5.0.2+dfsg/tests/devel/logops_n.c --- gmp-4.3.2+dfsg/tests/devel/logops_n.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/logops_n.c 2011-05-08 09:49:29.000000000 +0000 @@ -217,7 +217,7 @@ { #ifdef _LONG_LONG_LIMB printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (BITS_PER_MP_LIMB/2)), + (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); #else printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); diff -Nru gmp-4.3.2+dfsg/tests/devel/Makefile.am gmp-5.0.2+dfsg/tests/devel/Makefile.am --- gmp-4.3.2+dfsg/tests/devel/Makefile.am 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -21,7 +21,7 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -# addsub_n addsub_n_2 not yet built since mpn_addsub_n doesn't yet exist +# add_n_sub_n add_n_sub_n_2 not yet built since mpn_add_n_sub_n doesn't yet exist # EXTRA_PROGRAMS = \ aors_n anymul_1 copy divmod_1 divrem shift logops_n tst-addsub try diff -Nru gmp-4.3.2+dfsg/tests/devel/Makefile.in gmp-5.0.2+dfsg/tests/devel/Makefile.in --- gmp-4.3.2+dfsg/tests/devel/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -139,7 +139,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -163,10 +162,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -206,6 +204,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -239,10 +238,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -272,7 +271,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/tests/devel/shift.c gmp-5.0.2+dfsg/tests/devel/shift.c --- gmp-4.3.2+dfsg/tests/devel/shift.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/shift.c 2011-05-08 09:49:29.000000000 +0000 @@ -194,7 +194,7 @@ { #ifdef _LONG_LONG_LIMB printf ("%0*lX%0*lX", (int) (sizeof(mp_limb_t)), - (unsigned long) (p[i] >> (BITS_PER_MP_LIMB/2)), + (unsigned long) (p[i] >> (GMP_LIMB_BITS/2)), (int) (sizeof(mp_limb_t)), (unsigned long) (p[i])); #else printf ("%0*lX", (int) (2 * sizeof(mp_limb_t)), p[i]); diff -Nru gmp-4.3.2+dfsg/tests/devel/try.c gmp-5.0.2+dfsg/tests/devel/try.c --- gmp-4.3.2+dfsg/tests/devel/try.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/devel/try.c 2011-05-08 09:49:29.000000000 +0000 @@ -3,7 +3,7 @@ THIS IS A TEST PROGRAM USED ONLY FOR DEVELOPMENT. IT'S ALMOST CERTAIN TO BE SUBJECT TO INCOMPATIBLE CHANGES IN FUTURE VERSIONS OF GMP. -Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software +Copyright 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -96,7 +96,7 @@ stuff common to all functions, but the exceptions get messy. When there's no overlap, run with both src>dst and srcdst[1] = 1; p->src[0] = 1; p->src[1] = 1; - REFERENCE (refmpn_addsub_n); + REFERENCE (refmpn_add_n_sub_n); p = ¶m[TYPE_ADDSUB_NC]; COPY (TYPE_ADDSUB_N); p->carry = CARRY_4; - REFERENCE (refmpn_addsub_nc); + REFERENCE (refmpn_add_n_sub_nc); p = ¶m[TYPE_COPY]; @@ -875,20 +888,45 @@ p->size = SIZE_ALLOW_ZERO; REFERENCE (refmpn_copyd); - p = ¶m[TYPE_COM_N]; + p = ¶m[TYPE_COM]; p->dst[0] = 1; p->src[0] = 1; - REFERENCE (refmpn_com_n); + REFERENCE (refmpn_com); p = ¶m[TYPE_ADDLSH1_N]; COPY (TYPE_ADD_N); REFERENCE (refmpn_addlsh1_n); + p = ¶m[TYPE_ADDLSH2_N]; + COPY (TYPE_ADD_N); + REFERENCE (refmpn_addlsh2_n); + + p = ¶m[TYPE_ADDLSH_N]; + COPY (TYPE_ADD_N); + p->shift = 1; + REFERENCE (refmpn_addlsh_n); + p = ¶m[TYPE_SUBLSH1_N]; COPY (TYPE_ADD_N); REFERENCE (refmpn_sublsh1_n); + p = ¶m[TYPE_SUBLSH_N]; + COPY (TYPE_ADDLSH_N); + REFERENCE (refmpn_sublsh_n); + + p = ¶m[TYPE_RSBLSH1_N]; + COPY (TYPE_ADD_N); + REFERENCE (refmpn_rsblsh1_n); + + p = ¶m[TYPE_RSBLSH2_N]; + COPY (TYPE_ADD_N); + REFERENCE (refmpn_rsblsh2_n); + + p = ¶m[TYPE_RSBLSH_N]; + COPY (TYPE_ADDLSH_N); + REFERENCE (refmpn_rsblsh_n); + p = ¶m[TYPE_RSH1ADD_N]; COPY (TYPE_ADD_N); REFERENCE (refmpn_rsh1add_n); @@ -1064,6 +1102,11 @@ p->src[1] = 1; REFERENCE (refmpn_mul_n); + p = ¶m[TYPE_MULLO_N]; + COPY (TYPE_MUL_N); + p->dst_size[0] = 0; + REFERENCE (refmpn_mullo_n); + p = ¶m[TYPE_MUL_MN]; COPY (TYPE_MUL_N); p->size2 = 1; @@ -1095,6 +1138,11 @@ p->overlap = OVERLAP_HIGH_TO_LOW; REFERENCE (refmpn_lshift); + p = ¶m[TYPE_LSHIFTC]; + COPY (TYPE_RSHIFT); + p->overlap = OVERLAP_HIGH_TO_LOW; + REFERENCE (refmpn_lshiftc); + p = ¶m[TYPE_POPCOUNT]; p->retval = 1; @@ -1107,7 +1155,7 @@ REFERENCE (refmpn_hamdist); - p = ¶m[TYPE_SB_DIVREM_MN]; + p = ¶m[TYPE_SBPI1_DIV_QR]; p->retval = 1; p->dst[0] = 1; p->dst[1] = 1; @@ -1117,7 +1165,7 @@ p->size2 = 1; p->dst_size[0] = SIZE_DIFF; p->overlap = OVERLAP_NONE; - REFERENCE (refmpn_sb_divrem_mn); + REFERENCE (refmpn_sb_div_qr); p = ¶m[TYPE_TDIV_QR]; p->dst[0] = 1; @@ -1157,6 +1205,20 @@ p->overlap = OVERLAP_NONE; REFERENCE (refmpn_get_str); + p = ¶m[TYPE_BINVERT]; + p->dst[0] = 1; + p->src[0] = 1; + p->data = DATA_SRC0_ODD; + p->overlap = OVERLAP_NONE; + REFERENCE (refmpn_binvert); + + p = ¶m[TYPE_INVERT]; + p->dst[0] = 1; + p->src[0] = 1; + p->data = DATA_SRC0_HIGHBIT; + p->overlap = OVERLAP_NONE; + REFERENCE (refmpn_invert); + #ifdef EXTRA_PARAM_INIT EXTRA_PARAM_INIT #endif @@ -1189,8 +1251,8 @@ #endif void -mpn_com_n_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ mpn_com_n (rp, sp, size); } +mpn_com_fun (mp_ptr rp, mp_srcptr sp, mp_size_t size) +{ mpn_com (rp, sp, size); } void mpn_and_n_fun (mp_ptr rp, mp_srcptr s1, mp_srcptr s2, mp_size_t size) @@ -1245,43 +1307,66 @@ } void -mpn_kara_mul_n_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, mp_size_t size) +mpn_toom22_mul_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, mp_size_t size) { mp_ptr tspace; TMP_DECL; TMP_MARK; - tspace = TMP_ALLOC_LIMBS (MPN_KARA_MUL_N_TSIZE (size)); - mpn_kara_mul_n (dst, src1, src2, size, tspace); + tspace = TMP_ALLOC_LIMBS (mpn_toom22_mul_itch (size, size)); + mpn_toom22_mul (dst, src1, size, src2, size, tspace); + TMP_FREE; } void -mpn_kara_sqr_n_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) +mpn_toom2_sqr_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) { mp_ptr tspace; TMP_DECL; TMP_MARK; - tspace = TMP_ALLOC_LIMBS (MPN_KARA_SQR_N_TSIZE (size)); - mpn_kara_sqr_n (dst, src, size, tspace); + tspace = TMP_ALLOC_LIMBS (mpn_toom2_sqr_itch (size)); + mpn_toom2_sqr (dst, src, size, tspace); TMP_FREE; } void -mpn_toom3_mul_n_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, mp_size_t size) +mpn_toom33_mul_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, mp_size_t size) { mp_ptr tspace; TMP_DECL; TMP_MARK; - tspace = TMP_ALLOC_LIMBS (MPN_TOOM3_MUL_N_TSIZE (size)); - mpn_toom3_mul_n (dst, src1, src2, size, tspace); + tspace = TMP_ALLOC_LIMBS (mpn_toom33_mul_itch (size, size)); + mpn_toom33_mul (dst, src1, size, src2, size, tspace); + TMP_FREE; } void -mpn_toom3_sqr_n_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) +mpn_toom3_sqr_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) { mp_ptr tspace; TMP_DECL; TMP_MARK; - tspace = TMP_ALLOC_LIMBS (MPN_TOOM3_SQR_N_TSIZE (size)); - mpn_toom3_sqr_n (dst, src, size, tspace); + tspace = TMP_ALLOC_LIMBS (mpn_toom3_sqr_itch (size)); + mpn_toom3_sqr (dst, src, size, tspace); + TMP_FREE; +} +void +mpn_toom44_mul_fun (mp_ptr dst, mp_srcptr src1, mp_srcptr src2, mp_size_t size) +{ + mp_ptr tspace; + TMP_DECL; + TMP_MARK; + tspace = TMP_ALLOC_LIMBS (mpn_toom44_mul_itch (size, size)); + mpn_toom44_mul (dst, src1, size, src2, size, tspace); TMP_FREE; } +void +mpn_toom4_sqr_fun (mp_ptr dst, mp_srcptr src, mp_size_t size) +{ + mp_ptr tspace; + TMP_DECL; + TMP_MARK; + tspace = TMP_ALLOC_LIMBS (mpn_toom4_sqr_itch (size)); + mpn_toom4_sqr (dst, src, size, tspace); + TMP_FREE; +} + mp_limb_t umul_ppmm_fun (mp_limb_t *lowptr, mp_limb_t m1, mp_limb_t m2) { @@ -1324,11 +1409,11 @@ { TRY(mpn_sub_nc), TYPE_SUB_NC }, #endif -#if HAVE_NATIVE_mpn_addsub_n - { TRY(mpn_addsub_n), TYPE_ADDSUB_N }, +#if HAVE_NATIVE_mpn_add_n_sub_n + { TRY(mpn_add_n_sub_n), TYPE_ADDSUB_N }, #endif -#if HAVE_NATIVE_mpn_addsub_nc - { TRY(mpn_addsub_nc), TYPE_ADDSUB_NC }, +#if HAVE_NATIVE_mpn_add_n_sub_nc + { TRY(mpn_add_n_sub_nc), TYPE_ADDSUB_NC }, #endif { TRY(mpn_addmul_1), TYPE_ADDMUL_1 }, @@ -1362,7 +1447,7 @@ { TRY(mpn_addmul_8), TYPE_ADDMUL_8, 8 }, #endif - { TRY_FUNFUN(mpn_com_n), TYPE_COM_N }, + { TRY_FUNFUN(mpn_com), TYPE_COM }, { TRY_FUNFUN(MPN_COPY), TYPE_COPY }, { TRY_FUNFUN(MPN_COPY_INCR), TYPE_COPYI }, @@ -1383,9 +1468,27 @@ #if HAVE_NATIVE_mpn_addlsh1_n { TRY(mpn_addlsh1_n), TYPE_ADDLSH1_N }, #endif +#if HAVE_NATIVE_mpn_addlsh2_n + { TRY(mpn_addlsh2_n), TYPE_ADDLSH2_N }, +#endif +#if HAVE_NATIVE_mpn_addlsh_n + { TRY(mpn_addlsh_n), TYPE_ADDLSH_N }, +#endif #if HAVE_NATIVE_mpn_sublsh1_n { TRY(mpn_sublsh1_n), TYPE_SUBLSH1_N }, #endif +#if HAVE_NATIVE_mpn_sublsh_n + { TRY(mpn_sublsh_n), TYPE_SUBLSH_N }, +#endif +#if HAVE_NATIVE_mpn_rsblsh1_n + { TRY(mpn_rsblsh1_n), TYPE_RSBLSH1_N }, +#endif +#if HAVE_NATIVE_mpn_rsblsh2_n + { TRY(mpn_rsblsh2_n), TYPE_RSBLSH2_N }, +#endif +#if HAVE_NATIVE_mpn_rsblsh_n + { TRY(mpn_rsblsh_n), TYPE_RSBLSH_N }, +#endif #if HAVE_NATIVE_mpn_rsh1add_n { TRY(mpn_rsh1add_n), TYPE_RSH1ADD_N }, #endif @@ -1436,7 +1539,7 @@ { TRY(mpn_modexact_1c_odd), TYPE_MODEXACT_1C_ODD }, - { TRY(mpn_sb_divrem_mn), TYPE_SB_DIVREM_MN, 3}, + { TRY(mpn_sbpi1_div_qr), TYPE_SBPI1_DIV_QR, 3}, { TRY(mpn_tdiv_qr), TYPE_TDIV_QR }, { TRY(mpn_mul_1), TYPE_MUL_1 }, @@ -1455,16 +1558,18 @@ { TRY(mpn_rshift), TYPE_RSHIFT }, { TRY(mpn_lshift), TYPE_LSHIFT }, + { TRY(mpn_lshiftc), TYPE_LSHIFTC }, { TRY(mpn_mul_basecase), TYPE_MUL_MN }, -#if SQR_KARATSUBA_THRESHOLD > 0 + { TRY(mpn_mullo_basecase), TYPE_MULLO_N }, +#if SQR_TOOM2_THRESHOLD > 0 { TRY(mpn_sqr_basecase), TYPE_SQR }, #endif { TRY(mpn_mul), TYPE_MUL_MN }, { TRY(mpn_mul_n), TYPE_MUL_N }, - { TRY(mpn_sqr_n), TYPE_SQR }, + { TRY(mpn_sqr), TYPE_SQR }, { TRY_FUNFUN(umul_ppmm), TYPE_UMUL_PPMM, 2 }, #if HAVE_NATIVE_mpn_umul_ppmm @@ -1474,10 +1579,12 @@ { TRY(mpn_umul_ppmm_r), TYPE_UMUL_PPMM_R, 2 }, #endif - { TRY_FUNFUN(mpn_kara_mul_n), TYPE_MUL_N, MPN_KARA_MUL_N_MINSIZE }, - { TRY_FUNFUN(mpn_kara_sqr_n), TYPE_SQR, MPN_KARA_SQR_N_MINSIZE }, - { TRY_FUNFUN(mpn_toom3_mul_n), TYPE_MUL_N, MPN_TOOM3_MUL_N_MINSIZE }, - { TRY_FUNFUN(mpn_toom3_sqr_n), TYPE_SQR, MPN_TOOM3_SQR_N_MINSIZE }, + { TRY_FUNFUN(mpn_toom22_mul), TYPE_MUL_N, MPN_TOOM22_MUL_MINSIZE }, + { TRY_FUNFUN(mpn_toom2_sqr), TYPE_SQR, MPN_TOOM2_SQR_MINSIZE }, + { TRY_FUNFUN(mpn_toom33_mul), TYPE_MUL_N, MPN_TOOM33_MUL_MINSIZE }, + { TRY_FUNFUN(mpn_toom3_sqr), TYPE_SQR, MPN_TOOM3_SQR_MINSIZE }, + { TRY_FUNFUN(mpn_toom44_mul), TYPE_MUL_N, MPN_TOOM44_MUL_MINSIZE }, + { TRY_FUNFUN(mpn_toom4_sqr), TYPE_SQR, MPN_TOOM4_SQR_MINSIZE }, { TRY(mpn_gcd_1), TYPE_GCD_1 }, { TRY(mpn_gcd), TYPE_GCD }, @@ -1496,6 +1603,9 @@ { TRY(mpn_get_str), TYPE_GET_STR }, + { TRY(mpn_binvert), TYPE_BINVERT }, + { TRY(mpn_invert), TYPE_INVERT }, + #ifdef EXTRA_ROUTINES EXTRA_ROUTINES #endif @@ -1789,13 +1899,13 @@ byte_tracen (" d[%d]", i, e->d[i].p, d[i].size); else mpn_tracen (" d[%d]", i, e->d[i].p, d[i].size); - printf (" located %p\n", e->d[i].p); + printf (" located %p\n", (void *) (e->d[i].p)); } } for (i = 0; i < NUM_SOURCES; i++) if (tr->src[i]) - printf (" s[%d] located %p\n", i, e->s[i].p); + printf (" s[%d] located %p\n", i, (void *) (e->s[i].p)); } @@ -1942,12 +2052,21 @@ case TYPE_ADD_N: case TYPE_SUB_N: case TYPE_ADDLSH1_N: + case TYPE_ADDLSH2_N: case TYPE_SUBLSH1_N: + case TYPE_RSBLSH1_N: + case TYPE_RSBLSH2_N: case TYPE_RSH1ADD_N: case TYPE_RSH1SUB_N: e->retval = CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, e->s[1].p, size); break; + case TYPE_ADDLSH_N: + case TYPE_SUBLSH_N: + case TYPE_RSBLSH_N: + e->retval = CALLING_CONVENTIONS (function) + (e->d[0].p, e->s[0].p, e->s[1].p, size, shift); + break; case TYPE_ADD_NC: case TYPE_SUB_NC: e->retval = CALLING_CONVENTIONS (function) @@ -2012,7 +2131,7 @@ case TYPE_COPY: case TYPE_COPYI: case TYPE_COPYD: - case TYPE_COM_N: + case TYPE_COM: CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size); break; @@ -2080,13 +2199,18 @@ (e->s[0].p[1], e->s[0].p[0], divisor, e->d[0].p); break; - case TYPE_SB_DIVREM_MN: - refmpn_copyi (e->d[1].p, e->s[0].p, size); /* dividend */ - refmpn_fill (e->d[0].p, size-size2, 0x98765432); /* quotient */ - e->retval = CALLING_CONVENTIONS (function) - (e->d[0].p, e->d[1].p, size, e->s[1].p, size2); - refmpn_zero (e->d[1].p+size2, size-size2); /* excess over remainder */ + case TYPE_SBPI1_DIV_QR: + { + gmp_pi1_t dinv; + invert_pi1 (dinv, e->s[1].p[size2-1], e->s[1].p[size2-2]); /* FIXME: use refinvert_pi1 */ + refmpn_copyi (e->d[1].p, e->s[0].p, size); /* dividend */ + refmpn_fill (e->d[0].p, size-size2, 0x98765432); /* quotient */ + e->retval = CALLING_CONVENTIONS (function) + (e->d[0].p, e->d[1].p, size, e->s[1].p, size2, dinv.inv32); + refmpn_zero (e->d[1].p+size2, size-size2); /* excess over remainder */ + } break; + case TYPE_TDIV_QR: CALLING_CONVENTIONS (function) (e->d[0].p, e->d[1].p, 0, e->s[0].p, size, e->s[1].p, size2); @@ -2178,6 +2302,7 @@ (e->d[0].p, e->s[0].p, size, e->s[1].p, size2); break; case TYPE_MUL_N: + case TYPE_MULLO_N: CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, e->s[1].p, size); break; case TYPE_SQR: @@ -2194,6 +2319,7 @@ break; case TYPE_LSHIFT: + case TYPE_LSHIFTC: case TYPE_RSHIFT: e->retval = CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size, shift); @@ -2245,7 +2371,28 @@ e->retval = CALLING_CONVENTIONS (function) (dst, base, e->d[1].p, size); } - refmpn_zero (e->d[1].p, size); /* cloberred or unused */ + refmpn_zero (e->d[1].p, size); /* clobbered or unused */ + } + break; + + case TYPE_INVERT: + { + mp_ptr scratch; + TMP_DECL; + TMP_MARK; + scratch = TMP_ALLOC_LIMBS (mpn_invert_itch (size)); + CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size, scratch); + TMP_FREE; + } + break; + case TYPE_BINVERT: + { + mp_ptr scratch; + TMP_DECL; + TMP_MARK; + scratch = TMP_ALLOC_LIMBS (mpn_binvert_itch (size)); + CALLING_CONVENTIONS (function) (e->d[0].p, e->s[0].p, size, scratch); + TMP_FREE; } break; @@ -2477,6 +2624,11 @@ s[i].p[0] |= 1; break; + case DATA_SRC0_ODD: + if (i == 0) + s[i].p[0] |= 1; + break; + case DATA_SRC1_ODD: if (i == 1) s[i].p[0] |= 1; @@ -2492,6 +2644,13 @@ } break; + case DATA_SRC0_HIGHBIT: + if (i == 0) + { + s[i].p[size-1] |= GMP_NUMB_HIGHBIT; + } + break; + case DATA_UDIV_QRNND: s[i].p[1] %= divisor; break; @@ -2751,8 +2910,8 @@ { malloc_region (&s[i].region, 2*option_lastsize+ALIGNMENTS-1); printf ("s[%d] %p to %p (0x%lX bytes)\n", - i, s[i].region.ptr, - s[i].region.ptr + s[i].region.size, + i, (void *) (s[i].region.ptr), + (void *) (s[i].region.ptr + s[i].region.size), (long) s[i].region.size * BYTES_PER_MP_LIMB); } @@ -2761,8 +2920,8 @@ { \ malloc_region (&e.d[i].region, 2*option_lastsize+ALIGNMENTS-1); \ printf ("%s d[%d] %p to %p (0x%lX bytes)\n", \ - es, i, e.d[i].region.ptr, \ - e.d[i].region.ptr + e.d[i].region.size, \ + es, i, (void *) (e.d[i].region.ptr), \ + (void *) (e.d[i].region.ptr + e.d[i].region.size), \ (long) e.d[i].region.size * BYTES_PER_MP_LIMB); \ } diff -Nru gmp-4.3.2+dfsg/tests/Makefile.in gmp-5.0.2+dfsg/tests/Makefile.in --- gmp-4.3.2+dfsg/tests/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -196,7 +196,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -220,10 +219,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -263,6 +261,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -296,10 +295,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -329,7 +328,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -552,7 +550,7 @@ # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ @@ -577,7 +575,7 @@ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): - @failcom='exit 1'; \ + @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ diff -Nru gmp-4.3.2+dfsg/tests/memory.c gmp-5.0.2+dfsg/tests/memory.c --- gmp-4.3.2+dfsg/tests/memory.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/memory.c 2011-05-08 09:49:29.000000000 +0000 @@ -88,12 +88,12 @@ tests_memory_list = h; rptr = __gmp_default_allocate (size + 2 * sizeof (mp_limb_t)); - ptr = (void *) ((long) rptr + sizeof (mp_limb_t)); + ptr = (void *) ((gmp_intptr_t) rptr + sizeof (mp_limb_t)); - *((mp_limb_t *) ((long) ptr - sizeof (mp_limb_t))) + *((mp_limb_t *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t))) = PATTERN1 - ((mp_limb_t) ptr); PATTERN2_var = PATTERN2 - ((mp_limb_t) ptr); - memcpy ((void *) ((long) ptr + size), &PATTERN2_var, sizeof (mp_limb_t)); + memcpy ((void *) ((gmp_intptr_t) ptr + size), &PATTERN2_var, sizeof (mp_limb_t)); h->size = size; h->ptr = ptr; @@ -109,16 +109,16 @@ if (new_size == 0) { - fprintf (stderr, "tests_reallocate(): attempt to reallocate 0x%lX to 0 bytes\n", - (unsigned long) ptr); + fprintf (stderr, "tests_reallocate(): attempt to reallocate %p to 0 bytes\n", + ptr); abort (); } hp = tests_memory_find (ptr); if (hp == NULL) { - fprintf (stderr, "tests_reallocate(): attempt to reallocate bad pointer 0x%lX\n", - (unsigned long) ptr); + fprintf (stderr, "tests_reallocate(): attempt to reallocate bad pointer %p\n", + ptr); abort (); } h = *hp; @@ -130,28 +130,28 @@ abort (); } - if (*((mp_limb_t *) ((long) ptr - sizeof (mp_limb_t))) + if (*((mp_limb_t *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t))) != PATTERN1 - ((mp_limb_t) ptr)) { fprintf (stderr, "in realloc: redzone clobbered before block\n"); abort (); } PATTERN2_var = PATTERN2 - ((mp_limb_t) ptr); - if (memcmp ((void *) ((long) ptr + h->size), &PATTERN2_var, sizeof (mp_limb_t))) + if (memcmp ((void *) ((gmp_intptr_t) ptr + h->size), &PATTERN2_var, sizeof (mp_limb_t))) { fprintf (stderr, "in realloc: redzone clobbered after block\n"); abort (); } - rptr = __gmp_default_reallocate ((void *) ((long) ptr - sizeof (mp_limb_t)), + rptr = __gmp_default_reallocate ((void *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t)), old_size + 2 * sizeof (mp_limb_t), new_size + 2 * sizeof (mp_limb_t)); - ptr = (void *) ((long) rptr + sizeof (mp_limb_t)); + ptr = (void *) ((gmp_intptr_t) rptr + sizeof (mp_limb_t)); - *((mp_limb_t *) ((long) ptr - sizeof (mp_limb_t))) + *((mp_limb_t *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t))) = PATTERN1 - ((mp_limb_t) ptr); PATTERN2_var = PATTERN2 - ((mp_limb_t) ptr); - memcpy ((void *) ((long) ptr + new_size), &PATTERN2_var, sizeof (mp_limb_t)); + memcpy ((void *) ((gmp_intptr_t) ptr + new_size), &PATTERN2_var, sizeof (mp_limb_t)); h->size = new_size; h->ptr = ptr; @@ -164,8 +164,8 @@ struct header **hp = tests_memory_find (ptr); if (hp == NULL) { - fprintf (stderr, "tests_free(): attempt to free bad pointer 0x%lX\n", - (unsigned long) ptr); + fprintf (stderr, "tests_free(): attempt to free bad pointer %p\n", + ptr); abort (); } return hp; @@ -180,20 +180,20 @@ *hp = h->next; /* unlink */ - if (*((mp_limb_t *) ((long) ptr - sizeof (mp_limb_t))) + if (*((mp_limb_t *) ((gmp_intptr_t) ptr - sizeof (mp_limb_t))) != PATTERN1 - ((mp_limb_t) ptr)) { fprintf (stderr, "in free: redzone clobbered before block\n"); abort (); } PATTERN2_var = PATTERN2 - ((mp_limb_t) ptr); - if (memcmp ((void *) ((long) ptr + h->size), &PATTERN2_var, sizeof (mp_limb_t))) + if (memcmp ((void *) ((gmp_intptr_t) ptr + h->size), &PATTERN2_var, sizeof (mp_limb_t))) { fprintf (stderr, "in free: redzone clobbered after block\n"); abort (); } - __gmp_default_free ((void *) ((long) ptr - sizeof(mp_limb_t)), + __gmp_default_free ((void *) ((gmp_intptr_t) ptr - sizeof(mp_limb_t)), h->size + 2 * sizeof (mp_limb_t)); __gmp_default_free (h, sizeof (*h)); } diff -Nru gmp-4.3.2+dfsg/tests/misc/Makefile.in gmp-5.0.2+dfsg/tests/misc/Makefile.in --- gmp-4.3.2+dfsg/tests/misc/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/misc/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -107,7 +107,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -131,10 +130,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -174,6 +172,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -207,10 +206,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -240,7 +239,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/tests/misc.c gmp-5.0.2+dfsg/tests/misc.c --- gmp-4.3.2+dfsg/tests/misc.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/misc.c 2011-05-08 09:49:29.000000000 +0000 @@ -132,8 +132,8 @@ void * align_pointer (void *p, size_t align) { - unsigned long d; - d = ((unsigned long) p) & (align-1); + gmp_intptr_t d; + d = ((gmp_intptr_t) p) & (align-1); d = (d != 0 ? align-d : 0); return (void *) (((char *) p) + d); } @@ -370,11 +370,11 @@ { #if GMP_NAIL_BITS == 0 mp_limb_t n; - _gmp_rand (&n, RANDS, BITS_PER_MP_LIMB); + _gmp_rand (&n, RANDS, GMP_LIMB_BITS); return n; #else mp_limb_t n[2]; - _gmp_rand (n, RANDS, BITS_PER_MP_LIMB); + _gmp_rand (n, RANDS, GMP_LIMB_BITS); return n[0] + (n[1] << GMP_NUMB_BITS); #endif } diff -Nru gmp-4.3.2+dfsg/tests/mpbsd/Makefile.in gmp-5.0.2+dfsg/tests/mpbsd/Makefile.in --- gmp-4.3.2+dfsg/tests/mpbsd/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpbsd/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -107,7 +107,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -131,10 +130,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -174,6 +172,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -207,10 +206,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -240,7 +239,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/tests/mpbsd/t-mtox.c gmp-5.0.2+dfsg/tests/mpbsd/t-mtox.c --- gmp-4.3.2+dfsg/tests/mpbsd/t-mtox.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpbsd/t-mtox.c 2011-05-08 09:49:29.000000000 +0000 @@ -38,7 +38,7 @@ for (i = 0; i < 1000; i++) { - mpz_erandomb (z, rands, 6 * BITS_PER_MP_LIMB); + mpz_erandomb (z, rands, 6 * GMP_LIMB_BITS); got = mtox (z); want = mpz_get_str (NULL, 16, z); if (strcmp (got, want) != 0) diff -Nru gmp-4.3.2+dfsg/tests/mpf/Makefile.am gmp-5.0.2+dfsg/tests/mpf/Makefile.am --- gmp-4.3.2+dfsg/tests/mpf/Makefile.am 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpf/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -25,7 +25,7 @@ check_PROGRAMS = t-add t-sub t-conv t-sqrt t-sqrt_ui t-muldiv t-dm2exp reuse \ t-cmp_d t-cmp_si t-div t-fits t-get_d t-get_d_2exp \ t-get_si t-get_ui t-gsprec t-inp_str t-int_p t-mul_ui \ - t-set t-set_q t-set_si t-set_ui t-trunc t-ui_div + t-set t-set_q t-set_si t-set_ui t-trunc t-ui_div t-eq TESTS = $(check_PROGRAMS) $(top_builddir)/tests/libtests.la: diff -Nru gmp-4.3.2+dfsg/tests/mpf/Makefile.in gmp-5.0.2+dfsg/tests/mpf/Makefile.in --- gmp-4.3.2+dfsg/tests/mpf/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpf/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -60,7 +60,7 @@ t-get_ui$(EXEEXT) t-gsprec$(EXEEXT) t-inp_str$(EXEEXT) \ t-int_p$(EXEEXT) t-mul_ui$(EXEEXT) t-set$(EXEEXT) \ t-set_q$(EXEEXT) t-set_si$(EXEEXT) t-set_ui$(EXEEXT) \ - t-trunc$(EXEEXT) t-ui_div$(EXEEXT) + t-trunc$(EXEEXT) t-ui_div$(EXEEXT) t-eq$(EXEEXT) subdir = tests/mpf DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -107,6 +107,11 @@ t_dm2exp_LDADD = $(LDADD) t_dm2exp_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ $(top_builddir)/libgmp.la +t_eq_SOURCES = t-eq.c +t_eq_OBJECTS = t-eq$U.$(OBJEXT) +t_eq_LDADD = $(LDADD) +t_eq_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la t_fits_SOURCES = t-fits.c t_fits_OBJECTS = t-fits$U.$(OBJEXT) t_fits_LDADD = $(LDADD) @@ -215,12 +220,12 @@ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ SOURCES = reuse.c t-add.c t-cmp_d.c t-cmp_si.c t-conv.c t-div.c \ - t-dm2exp.c t-fits.c t-get_d.c t-get_d_2exp.c t-get_si.c \ + t-dm2exp.c t-eq.c t-fits.c t-get_d.c t-get_d_2exp.c t-get_si.c \ t-get_ui.c t-gsprec.c t-inp_str.c t-int_p.c t-mul_ui.c \ t-muldiv.c t-set.c t-set_q.c t-set_si.c t-set_ui.c t-sqrt.c \ t-sqrt_ui.c t-sub.c t-trunc.c t-ui_div.c DIST_SOURCES = reuse.c t-add.c t-cmp_d.c t-cmp_si.c t-conv.c t-div.c \ - t-dm2exp.c t-fits.c t-get_d.c t-get_d_2exp.c t-get_si.c \ + t-dm2exp.c t-eq.c t-fits.c t-get_d.c t-get_d_2exp.c t-get_si.c \ t-get_ui.c t-gsprec.c t-inp_str.c t-int_p.c t-mul_ui.c \ t-muldiv.c t-set.c t-set_q.c t-set_si.c t-set_ui.c t-sqrt.c \ t-sqrt_ui.c t-sub.c t-trunc.c t-ui_div.c @@ -239,7 +244,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -263,10 +267,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -306,6 +309,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -339,10 +343,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -372,7 +376,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -458,6 +461,9 @@ t-dm2exp$(EXEEXT): $(t_dm2exp_OBJECTS) $(t_dm2exp_DEPENDENCIES) @rm -f t-dm2exp$(EXEEXT) $(LINK) $(t_dm2exp_OBJECTS) $(t_dm2exp_LDADD) $(LIBS) +t-eq$(EXEEXT): $(t_eq_OBJECTS) $(t_eq_DEPENDENCIES) + @rm -f t-eq$(EXEEXT) + $(LINK) $(t_eq_OBJECTS) $(t_eq_LDADD) $(LIBS) t-fits$(EXEEXT): $(t_fits_OBJECTS) $(t_fits_DEPENDENCIES) @rm -f t-fits$(EXEEXT) $(LINK) $(t_fits_OBJECTS) $(t_fits_LDADD) $(LIBS) @@ -549,6 +555,8 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-div.c; then echo $(srcdir)/t-div.c; else echo t-div.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-dm2exp_.c: t-dm2exp.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-dm2exp.c; then echo $(srcdir)/t-dm2exp.c; else echo t-dm2exp.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-eq_.c: t-eq.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-eq.c; then echo $(srcdir)/t-eq.c; else echo t-eq.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-fits_.c: t-fits.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-fits.c; then echo $(srcdir)/t-fits.c; else echo t-fits.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-get_d_.c: t-get_d.c $(ANSI2KNR) @@ -590,17 +598,17 @@ reuse_.$(OBJEXT) reuse_.lo t-add_.$(OBJEXT) t-add_.lo \ t-cmp_d_.$(OBJEXT) t-cmp_d_.lo t-cmp_si_.$(OBJEXT) t-cmp_si_.lo \ t-conv_.$(OBJEXT) t-conv_.lo t-div_.$(OBJEXT) t-div_.lo \ -t-dm2exp_.$(OBJEXT) t-dm2exp_.lo t-fits_.$(OBJEXT) t-fits_.lo \ -t-get_d_.$(OBJEXT) t-get_d_.lo t-get_d_2exp_.$(OBJEXT) \ -t-get_d_2exp_.lo t-get_si_.$(OBJEXT) t-get_si_.lo t-get_ui_.$(OBJEXT) \ -t-get_ui_.lo t-gsprec_.$(OBJEXT) t-gsprec_.lo t-inp_str_.$(OBJEXT) \ -t-inp_str_.lo t-int_p_.$(OBJEXT) t-int_p_.lo t-mul_ui_.$(OBJEXT) \ -t-mul_ui_.lo t-muldiv_.$(OBJEXT) t-muldiv_.lo t-set_.$(OBJEXT) \ -t-set_.lo t-set_q_.$(OBJEXT) t-set_q_.lo t-set_si_.$(OBJEXT) \ -t-set_si_.lo t-set_ui_.$(OBJEXT) t-set_ui_.lo t-sqrt_.$(OBJEXT) \ -t-sqrt_.lo t-sqrt_ui_.$(OBJEXT) t-sqrt_ui_.lo t-sub_.$(OBJEXT) \ -t-sub_.lo t-trunc_.$(OBJEXT) t-trunc_.lo t-ui_div_.$(OBJEXT) \ -t-ui_div_.lo : $(ANSI2KNR) +t-dm2exp_.$(OBJEXT) t-dm2exp_.lo t-eq_.$(OBJEXT) t-eq_.lo \ +t-fits_.$(OBJEXT) t-fits_.lo t-get_d_.$(OBJEXT) t-get_d_.lo \ +t-get_d_2exp_.$(OBJEXT) t-get_d_2exp_.lo t-get_si_.$(OBJEXT) \ +t-get_si_.lo t-get_ui_.$(OBJEXT) t-get_ui_.lo t-gsprec_.$(OBJEXT) \ +t-gsprec_.lo t-inp_str_.$(OBJEXT) t-inp_str_.lo t-int_p_.$(OBJEXT) \ +t-int_p_.lo t-mul_ui_.$(OBJEXT) t-mul_ui_.lo t-muldiv_.$(OBJEXT) \ +t-muldiv_.lo t-set_.$(OBJEXT) t-set_.lo t-set_q_.$(OBJEXT) t-set_q_.lo \ +t-set_si_.$(OBJEXT) t-set_si_.lo t-set_ui_.$(OBJEXT) t-set_ui_.lo \ +t-sqrt_.$(OBJEXT) t-sqrt_.lo t-sqrt_ui_.$(OBJEXT) t-sqrt_ui_.lo \ +t-sub_.$(OBJEXT) t-sub_.lo t-trunc_.$(OBJEXT) t-trunc_.lo \ +t-ui_div_.$(OBJEXT) t-ui_div_.lo : $(ANSI2KNR) mostlyclean-libtool: -rm -f *.lo diff -Nru gmp-4.3.2+dfsg/tests/mpf/t-conv.c gmp-5.0.2+dfsg/tests/mpf/t-conv.c --- gmp-4.3.2+dfsg/tests/mpf/t-conv.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpf/t-conv.c 2011-05-08 09:49:29.000000000 +0000 @@ -45,7 +45,7 @@ mp_exp_t bexp; long size, exp; int base; - char buf[SIZE * BITS_PER_MP_LIMB + 5]; + char buf[SIZE * GMP_LIMB_BITS + 5]; tests_start (); diff -Nru gmp-4.3.2+dfsg/tests/mpf/t-eq.c gmp-5.0.2+dfsg/tests/mpf/t-eq.c --- gmp-4.3.2+dfsg/tests/mpf/t-eq.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpf/t-eq.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,141 @@ +/* Test mpf_eq. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + +#include +#include + +#include "gmp.h" +#include "gmp-impl.h" +#include "tests.h" + +#define SZ (2 * sizeof(mp_limb_t)) + +void insert_random_low_zero_limbs (mpf_t, gmp_randstate_ptr); +void dump_abort (mpf_t, mpf_t, int, int, int, int, int, long); +void hexdump (mpf_t); + +int +main (int argc, char **argv) +{ + unsigned long test, reps = 10000; + mpf_t a, b, x; + gmp_randstate_ptr rands; + mpz_t ds; + int hibits, lshift1, lshift2; + int xtra; + +#define HIBITS 10 +#define LSHIFT1 10 +#define LSHIFT2 10 + + if (argc > 1) + reps = strtol (argv[1], 0, 0); + + tests_start (); + + rands = RANDS; + + mpf_set_default_prec ((1 << HIBITS) + (1 << LSHIFT1) + (1 << LSHIFT2)); + + mpz_init (ds); + mpf_inits (a, b, x, NULL); + + for (test = 0; test < reps; test++) + { + mpz_urandomb (ds, rands, HIBITS); + hibits = mpz_get_ui (ds) + 1; + mpz_urandomb (ds, rands, hibits); + mpz_setbit (ds, hibits - 1); /* make sure msb is set */ + mpf_set_z (a, ds); + mpf_set_z (b, ds); + + mpz_urandomb (ds, rands, LSHIFT1); + lshift1 = mpz_get_ui (ds); + mpf_mul_2exp (a, a, lshift1 + 1); + mpf_mul_2exp (b, b, lshift1 + 1); + mpf_add_ui (a, a, 1); /* make a one-bit difference */ + + mpz_urandomb (ds, rands, LSHIFT2); + lshift2 = mpz_get_ui (ds); + mpf_mul_2exp (a, a, lshift2); + mpf_mul_2exp (b, b, lshift2); + mpz_urandomb (ds, rands, lshift2); + mpf_set_z (x, ds); + mpf_add (a, a, x); + mpf_add (b, b, x); + + insert_random_low_zero_limbs (a, rands); + insert_random_low_zero_limbs (b, rands); + + if (mpf_eq (a, b, lshift1 + hibits) == 0) + { + dump_abort (a, b, lshift1 + hibits, lshift1, lshift2, hibits, 1, test); + } + for (xtra = 1; xtra < 100; xtra++) + if (mpf_eq (a, b, lshift1 + hibits + xtra) != 0) + { + dump_abort (a, b, lshift1 + hibits + xtra, lshift1, lshift2, hibits, 0, test); + } + } + + mpf_clears (a, b, x, NULL); + mpz_clear (ds); + tests_end (); + exit (0); +} + +void +insert_random_low_zero_limbs (mpf_t x, gmp_randstate_ptr rands) +{ + mp_size_t max = PREC(x) - SIZ(x); + mp_size_t s; + mpz_t ds; mpz_init (ds); + mpz_urandomb (ds, rands, 32); + s = mpz_get_ui (ds) % (max + 1); + MPN_COPY_DECR (PTR(x) + s, PTR(x), SIZ(x)); + MPN_ZERO (PTR(x), s); + SIZ(x) += s; + mpz_clear (ds); +} + +void +dump_abort (mpf_t a, mpf_t b, int cmp_prec, int lshift1, int lshift2, int hibits, int want, long test) +{ + printf ("ERROR in test %ld\n", test); + printf ("want %d got %d from mpf_eq\n", want, 1-want); + printf ("cmp_prec = %d\n", cmp_prec); + printf ("lshift1 = %d\n", lshift1); + printf ("lshift2 = %d\n", lshift2); + printf ("hibits = %d\n", hibits); + hexdump (a); puts (""); + hexdump (b); puts (""); + abort (); +} + +void +hexdump (mpf_t x) +{ + mp_size_t i; + for (i = ABSIZ(x) - 1; i >= 0; i--) + { + gmp_printf ("%0*MX", SZ, PTR(x)[i]); + if (i != 0) + printf (" "); + } +} diff -Nru gmp-4.3.2+dfsg/tests/mpf/t-muldiv.c gmp-5.0.2+dfsg/tests/mpf/t-muldiv.c --- gmp-4.3.2+dfsg/tests/mpf/t-muldiv.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpf/t-muldiv.c 2011-05-08 09:49:29.000000000 +0000 @@ -36,7 +36,7 @@ int reps = 10000; int i; mpf_t u, v, w, x; - mp_size_t bprec = SIZE * BITS_PER_MP_LIMB; + mp_size_t bprec = SIZE * GMP_LIMB_BITS; mpf_t rerr, limit_rerr; unsigned long ulimb, vlimb; int single_flag; diff -Nru gmp-4.3.2+dfsg/tests/mpn/Makefile.am gmp-5.0.2+dfsg/tests/mpn/Makefile.am --- gmp-4.3.2+dfsg/tests/mpn/Makefile.am 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,6 @@ ## Process this file with automake to generate Makefile.in -# Copyright 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc. # # This file is part of the GNU MP Library. # @@ -21,8 +21,14 @@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la -check_PROGRAMS = t-asmtype t-aors_1 t-divrem_1 t-fat t-get_d \ - t-instrument t-iord_u t-mp_bases t-perfsqr t-scan t-hgcd t-matrix22 +check_PROGRAMS = t-asmtype t-aors_1 t-divrem_1 t-fat t-get_d \ + t-instrument t-iord_u t-mp_bases t-perfsqr t-scan \ + t-toom22 t-toom32 t-toom33 t-toom42 t-toom43 t-toom44 \ + t-toom52 t-toom53 t-toom62 t-toom63 t-toom6h t-toom8h \ + t-hgcd t-matrix22 t-mullo t-mulmod_bnm1 t-sqrmod_bnm1 \ + t-invert t-div t-bdiv + +EXTRA_DIST = toom-shared.h TESTS = $(check_PROGRAMS) diff -Nru gmp-4.3.2+dfsg/tests/mpn/Makefile.in gmp-5.0.2+dfsg/tests/mpn/Makefile.in --- gmp-4.3.2+dfsg/tests/mpn/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -15,7 +15,7 @@ @SET_MAKE@ -# Copyright 2001, 2002, 2003 Free Software Foundation, Inc. +# Copyright 2001, 2002, 2003, 2009, 2010 Free Software Foundation, Inc. # # This file is part of the GNU MP Library. # @@ -54,8 +54,14 @@ check_PROGRAMS = t-asmtype$(EXEEXT) t-aors_1$(EXEEXT) \ t-divrem_1$(EXEEXT) t-fat$(EXEEXT) t-get_d$(EXEEXT) \ t-instrument$(EXEEXT) t-iord_u$(EXEEXT) t-mp_bases$(EXEEXT) \ - t-perfsqr$(EXEEXT) t-scan$(EXEEXT) t-hgcd$(EXEEXT) \ - t-matrix22$(EXEEXT) + t-perfsqr$(EXEEXT) t-scan$(EXEEXT) t-toom22$(EXEEXT) \ + t-toom32$(EXEEXT) t-toom33$(EXEEXT) t-toom42$(EXEEXT) \ + t-toom43$(EXEEXT) t-toom44$(EXEEXT) t-toom52$(EXEEXT) \ + t-toom53$(EXEEXT) t-toom62$(EXEEXT) t-toom63$(EXEEXT) \ + t-toom6h$(EXEEXT) t-toom8h$(EXEEXT) t-hgcd$(EXEEXT) \ + t-matrix22$(EXEEXT) t-mullo$(EXEEXT) t-mulmod_bnm1$(EXEEXT) \ + t-sqrmod_bnm1$(EXEEXT) t-invert$(EXEEXT) t-div$(EXEEXT) \ + t-bdiv$(EXEEXT) subdir = tests/mpn DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -77,6 +83,16 @@ t_asmtype_LDADD = $(LDADD) t_asmtype_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ $(top_builddir)/libgmp.la +t_bdiv_SOURCES = t-bdiv.c +t_bdiv_OBJECTS = t-bdiv$U.$(OBJEXT) +t_bdiv_LDADD = $(LDADD) +t_bdiv_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_div_SOURCES = t-div.c +t_div_OBJECTS = t-div$U.$(OBJEXT) +t_div_LDADD = $(LDADD) +t_div_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la t_divrem_1_SOURCES = t-divrem_1.c t_divrem_1_OBJECTS = t-divrem_1$U.$(OBJEXT) t_divrem_1_LDADD = $(LDADD) @@ -102,6 +118,11 @@ t_instrument_LDADD = $(LDADD) t_instrument_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ $(top_builddir)/libgmp.la +t_invert_SOURCES = t-invert.c +t_invert_OBJECTS = t-invert$U.$(OBJEXT) +t_invert_LDADD = $(LDADD) +t_invert_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la t_iord_u_SOURCES = t-iord_u.c t_iord_u_OBJECTS = t-iord_u$U.$(OBJEXT) t_iord_u_LDADD = $(LDADD) @@ -117,6 +138,16 @@ t_mp_bases_LDADD = $(LDADD) t_mp_bases_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ $(top_builddir)/libgmp.la +t_mullo_SOURCES = t-mullo.c +t_mullo_OBJECTS = t-mullo$U.$(OBJEXT) +t_mullo_LDADD = $(LDADD) +t_mullo_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_mulmod_bnm1_SOURCES = t-mulmod_bnm1.c +t_mulmod_bnm1_OBJECTS = t-mulmod_bnm1$U.$(OBJEXT) +t_mulmod_bnm1_LDADD = $(LDADD) +t_mulmod_bnm1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la t_perfsqr_SOURCES = t-perfsqr.c t_perfsqr_OBJECTS = t-perfsqr$U.$(OBJEXT) t_perfsqr_LDADD = $(LDADD) @@ -127,6 +158,71 @@ t_scan_LDADD = $(LDADD) t_scan_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ $(top_builddir)/libgmp.la +t_sqrmod_bnm1_SOURCES = t-sqrmod_bnm1.c +t_sqrmod_bnm1_OBJECTS = t-sqrmod_bnm1$U.$(OBJEXT) +t_sqrmod_bnm1_LDADD = $(LDADD) +t_sqrmod_bnm1_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom22_SOURCES = t-toom22.c +t_toom22_OBJECTS = t-toom22$U.$(OBJEXT) +t_toom22_LDADD = $(LDADD) +t_toom22_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom32_SOURCES = t-toom32.c +t_toom32_OBJECTS = t-toom32$U.$(OBJEXT) +t_toom32_LDADD = $(LDADD) +t_toom32_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom33_SOURCES = t-toom33.c +t_toom33_OBJECTS = t-toom33$U.$(OBJEXT) +t_toom33_LDADD = $(LDADD) +t_toom33_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom42_SOURCES = t-toom42.c +t_toom42_OBJECTS = t-toom42$U.$(OBJEXT) +t_toom42_LDADD = $(LDADD) +t_toom42_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom43_SOURCES = t-toom43.c +t_toom43_OBJECTS = t-toom43$U.$(OBJEXT) +t_toom43_LDADD = $(LDADD) +t_toom43_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom44_SOURCES = t-toom44.c +t_toom44_OBJECTS = t-toom44$U.$(OBJEXT) +t_toom44_LDADD = $(LDADD) +t_toom44_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom52_SOURCES = t-toom52.c +t_toom52_OBJECTS = t-toom52$U.$(OBJEXT) +t_toom52_LDADD = $(LDADD) +t_toom52_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom53_SOURCES = t-toom53.c +t_toom53_OBJECTS = t-toom53$U.$(OBJEXT) +t_toom53_LDADD = $(LDADD) +t_toom53_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom62_SOURCES = t-toom62.c +t_toom62_OBJECTS = t-toom62$U.$(OBJEXT) +t_toom62_LDADD = $(LDADD) +t_toom62_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom63_SOURCES = t-toom63.c +t_toom63_OBJECTS = t-toom63$U.$(OBJEXT) +t_toom63_LDADD = $(LDADD) +t_toom63_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom6h_SOURCES = t-toom6h.c +t_toom6h_OBJECTS = t-toom6h$U.$(OBJEXT) +t_toom6h_LDADD = $(LDADD) +t_toom6h_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la +t_toom8h_SOURCES = t-toom8h.c +t_toom8h_OBJECTS = t-toom8h$U.$(OBJEXT) +t_toom8h_LDADD = $(LDADD) +t_toom8h_DEPENDENCIES = $(top_builddir)/tests/libtests.la \ + $(top_builddir)/libgmp.la DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = am__depfiles_maybe = @@ -139,12 +235,18 @@ LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ -SOURCES = t-aors_1.c t-asmtype.c t-divrem_1.c t-fat.c t-get_d.c \ - t-hgcd.c t-instrument.c t-iord_u.c t-matrix22.c t-mp_bases.c \ - t-perfsqr.c t-scan.c -DIST_SOURCES = t-aors_1.c t-asmtype.c t-divrem_1.c t-fat.c t-get_d.c \ - t-hgcd.c t-instrument.c t-iord_u.c t-matrix22.c t-mp_bases.c \ - t-perfsqr.c t-scan.c +SOURCES = t-aors_1.c t-asmtype.c t-bdiv.c t-div.c t-divrem_1.c t-fat.c \ + t-get_d.c t-hgcd.c t-instrument.c t-invert.c t-iord_u.c \ + t-matrix22.c t-mp_bases.c t-mullo.c t-mulmod_bnm1.c \ + t-perfsqr.c t-scan.c t-sqrmod_bnm1.c t-toom22.c t-toom32.c \ + t-toom33.c t-toom42.c t-toom43.c t-toom44.c t-toom52.c \ + t-toom53.c t-toom62.c t-toom63.c t-toom6h.c t-toom8h.c +DIST_SOURCES = t-aors_1.c t-asmtype.c t-bdiv.c t-div.c t-divrem_1.c \ + t-fat.c t-get_d.c t-hgcd.c t-instrument.c t-invert.c \ + t-iord_u.c t-matrix22.c t-mp_bases.c t-mullo.c t-mulmod_bnm1.c \ + t-perfsqr.c t-scan.c t-sqrmod_bnm1.c t-toom22.c t-toom32.c \ + t-toom33.c t-toom42.c t-toom43.c t-toom44.c t-toom52.c \ + t-toom53.c t-toom62.c t-toom63.c t-toom6h.c t-toom8h.c ETAGS = etags CTAGS = ctags am__tty_colors = \ @@ -160,7 +262,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -184,10 +285,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -227,6 +327,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -260,10 +361,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -293,7 +394,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -314,6 +414,7 @@ top_srcdir = @top_srcdir@ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/tests LDADD = $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la +EXTRA_DIST = toom-shared.h TESTS = $(check_PROGRAMS) all: all-am @@ -364,6 +465,12 @@ t-asmtype$(EXEEXT): $(t_asmtype_OBJECTS) $(t_asmtype_DEPENDENCIES) @rm -f t-asmtype$(EXEEXT) $(LINK) $(t_asmtype_OBJECTS) $(t_asmtype_LDADD) $(LIBS) +t-bdiv$(EXEEXT): $(t_bdiv_OBJECTS) $(t_bdiv_DEPENDENCIES) + @rm -f t-bdiv$(EXEEXT) + $(LINK) $(t_bdiv_OBJECTS) $(t_bdiv_LDADD) $(LIBS) +t-div$(EXEEXT): $(t_div_OBJECTS) $(t_div_DEPENDENCIES) + @rm -f t-div$(EXEEXT) + $(LINK) $(t_div_OBJECTS) $(t_div_LDADD) $(LIBS) t-divrem_1$(EXEEXT): $(t_divrem_1_OBJECTS) $(t_divrem_1_DEPENDENCIES) @rm -f t-divrem_1$(EXEEXT) $(LINK) $(t_divrem_1_OBJECTS) $(t_divrem_1_LDADD) $(LIBS) @@ -379,6 +486,9 @@ t-instrument$(EXEEXT): $(t_instrument_OBJECTS) $(t_instrument_DEPENDENCIES) @rm -f t-instrument$(EXEEXT) $(LINK) $(t_instrument_OBJECTS) $(t_instrument_LDADD) $(LIBS) +t-invert$(EXEEXT): $(t_invert_OBJECTS) $(t_invert_DEPENDENCIES) + @rm -f t-invert$(EXEEXT) + $(LINK) $(t_invert_OBJECTS) $(t_invert_LDADD) $(LIBS) t-iord_u$(EXEEXT): $(t_iord_u_OBJECTS) $(t_iord_u_DEPENDENCIES) @rm -f t-iord_u$(EXEEXT) $(LINK) $(t_iord_u_OBJECTS) $(t_iord_u_LDADD) $(LIBS) @@ -388,12 +498,57 @@ t-mp_bases$(EXEEXT): $(t_mp_bases_OBJECTS) $(t_mp_bases_DEPENDENCIES) @rm -f t-mp_bases$(EXEEXT) $(LINK) $(t_mp_bases_OBJECTS) $(t_mp_bases_LDADD) $(LIBS) +t-mullo$(EXEEXT): $(t_mullo_OBJECTS) $(t_mullo_DEPENDENCIES) + @rm -f t-mullo$(EXEEXT) + $(LINK) $(t_mullo_OBJECTS) $(t_mullo_LDADD) $(LIBS) +t-mulmod_bnm1$(EXEEXT): $(t_mulmod_bnm1_OBJECTS) $(t_mulmod_bnm1_DEPENDENCIES) + @rm -f t-mulmod_bnm1$(EXEEXT) + $(LINK) $(t_mulmod_bnm1_OBJECTS) $(t_mulmod_bnm1_LDADD) $(LIBS) t-perfsqr$(EXEEXT): $(t_perfsqr_OBJECTS) $(t_perfsqr_DEPENDENCIES) @rm -f t-perfsqr$(EXEEXT) $(LINK) $(t_perfsqr_OBJECTS) $(t_perfsqr_LDADD) $(LIBS) t-scan$(EXEEXT): $(t_scan_OBJECTS) $(t_scan_DEPENDENCIES) @rm -f t-scan$(EXEEXT) $(LINK) $(t_scan_OBJECTS) $(t_scan_LDADD) $(LIBS) +t-sqrmod_bnm1$(EXEEXT): $(t_sqrmod_bnm1_OBJECTS) $(t_sqrmod_bnm1_DEPENDENCIES) + @rm -f t-sqrmod_bnm1$(EXEEXT) + $(LINK) $(t_sqrmod_bnm1_OBJECTS) $(t_sqrmod_bnm1_LDADD) $(LIBS) +t-toom22$(EXEEXT): $(t_toom22_OBJECTS) $(t_toom22_DEPENDENCIES) + @rm -f t-toom22$(EXEEXT) + $(LINK) $(t_toom22_OBJECTS) $(t_toom22_LDADD) $(LIBS) +t-toom32$(EXEEXT): $(t_toom32_OBJECTS) $(t_toom32_DEPENDENCIES) + @rm -f t-toom32$(EXEEXT) + $(LINK) $(t_toom32_OBJECTS) $(t_toom32_LDADD) $(LIBS) +t-toom33$(EXEEXT): $(t_toom33_OBJECTS) $(t_toom33_DEPENDENCIES) + @rm -f t-toom33$(EXEEXT) + $(LINK) $(t_toom33_OBJECTS) $(t_toom33_LDADD) $(LIBS) +t-toom42$(EXEEXT): $(t_toom42_OBJECTS) $(t_toom42_DEPENDENCIES) + @rm -f t-toom42$(EXEEXT) + $(LINK) $(t_toom42_OBJECTS) $(t_toom42_LDADD) $(LIBS) +t-toom43$(EXEEXT): $(t_toom43_OBJECTS) $(t_toom43_DEPENDENCIES) + @rm -f t-toom43$(EXEEXT) + $(LINK) $(t_toom43_OBJECTS) $(t_toom43_LDADD) $(LIBS) +t-toom44$(EXEEXT): $(t_toom44_OBJECTS) $(t_toom44_DEPENDENCIES) + @rm -f t-toom44$(EXEEXT) + $(LINK) $(t_toom44_OBJECTS) $(t_toom44_LDADD) $(LIBS) +t-toom52$(EXEEXT): $(t_toom52_OBJECTS) $(t_toom52_DEPENDENCIES) + @rm -f t-toom52$(EXEEXT) + $(LINK) $(t_toom52_OBJECTS) $(t_toom52_LDADD) $(LIBS) +t-toom53$(EXEEXT): $(t_toom53_OBJECTS) $(t_toom53_DEPENDENCIES) + @rm -f t-toom53$(EXEEXT) + $(LINK) $(t_toom53_OBJECTS) $(t_toom53_LDADD) $(LIBS) +t-toom62$(EXEEXT): $(t_toom62_OBJECTS) $(t_toom62_DEPENDENCIES) + @rm -f t-toom62$(EXEEXT) + $(LINK) $(t_toom62_OBJECTS) $(t_toom62_LDADD) $(LIBS) +t-toom63$(EXEEXT): $(t_toom63_OBJECTS) $(t_toom63_DEPENDENCIES) + @rm -f t-toom63$(EXEEXT) + $(LINK) $(t_toom63_OBJECTS) $(t_toom63_LDADD) $(LIBS) +t-toom6h$(EXEEXT): $(t_toom6h_OBJECTS) $(t_toom6h_DEPENDENCIES) + @rm -f t-toom6h$(EXEEXT) + $(LINK) $(t_toom6h_OBJECTS) $(t_toom6h_LDADD) $(LIBS) +t-toom8h$(EXEEXT): $(t_toom8h_OBJECTS) $(t_toom8h_DEPENDENCIES) + @rm -f t-toom8h$(EXEEXT) + $(LINK) $(t_toom8h_OBJECTS) $(t_toom8h_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -418,6 +573,10 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-aors_1.c; then echo $(srcdir)/t-aors_1.c; else echo t-aors_1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-asmtype_.c: t-asmtype.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-asmtype.c; then echo $(srcdir)/t-asmtype.c; else echo t-asmtype.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-bdiv_.c: t-bdiv.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-bdiv.c; then echo $(srcdir)/t-bdiv.c; else echo t-bdiv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-div_.c: t-div.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-div.c; then echo $(srcdir)/t-div.c; else echo t-div.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-divrem_1_.c: t-divrem_1.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-divrem_1.c; then echo $(srcdir)/t-divrem_1.c; else echo t-divrem_1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-fat_.c: t-fat.c $(ANSI2KNR) @@ -428,23 +587,64 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-hgcd.c; then echo $(srcdir)/t-hgcd.c; else echo t-hgcd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-instrument_.c: t-instrument.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-instrument.c; then echo $(srcdir)/t-instrument.c; else echo t-instrument.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-invert_.c: t-invert.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-invert.c; then echo $(srcdir)/t-invert.c; else echo t-invert.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-iord_u_.c: t-iord_u.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-iord_u.c; then echo $(srcdir)/t-iord_u.c; else echo t-iord_u.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-matrix22_.c: t-matrix22.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-matrix22.c; then echo $(srcdir)/t-matrix22.c; else echo t-matrix22.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-mp_bases_.c: t-mp_bases.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-mp_bases.c; then echo $(srcdir)/t-mp_bases.c; else echo t-mp_bases.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-mullo_.c: t-mullo.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-mullo.c; then echo $(srcdir)/t-mullo.c; else echo t-mullo.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-mulmod_bnm1_.c: t-mulmod_bnm1.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-mulmod_bnm1.c; then echo $(srcdir)/t-mulmod_bnm1.c; else echo t-mulmod_bnm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-perfsqr_.c: t-perfsqr.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-perfsqr.c; then echo $(srcdir)/t-perfsqr.c; else echo t-perfsqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-scan_.c: t-scan.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-scan.c; then echo $(srcdir)/t-scan.c; else echo t-scan.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-sqrmod_bnm1_.c: t-sqrmod_bnm1.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-sqrmod_bnm1.c; then echo $(srcdir)/t-sqrmod_bnm1.c; else echo t-sqrmod_bnm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom22_.c: t-toom22.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom22.c; then echo $(srcdir)/t-toom22.c; else echo t-toom22.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom32_.c: t-toom32.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom32.c; then echo $(srcdir)/t-toom32.c; else echo t-toom32.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom33_.c: t-toom33.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom33.c; then echo $(srcdir)/t-toom33.c; else echo t-toom33.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom42_.c: t-toom42.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom42.c; then echo $(srcdir)/t-toom42.c; else echo t-toom42.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom43_.c: t-toom43.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom43.c; then echo $(srcdir)/t-toom43.c; else echo t-toom43.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom44_.c: t-toom44.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom44.c; then echo $(srcdir)/t-toom44.c; else echo t-toom44.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom52_.c: t-toom52.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom52.c; then echo $(srcdir)/t-toom52.c; else echo t-toom52.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom53_.c: t-toom53.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom53.c; then echo $(srcdir)/t-toom53.c; else echo t-toom53.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom62_.c: t-toom62.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom62.c; then echo $(srcdir)/t-toom62.c; else echo t-toom62.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom63_.c: t-toom63.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom63.c; then echo $(srcdir)/t-toom63.c; else echo t-toom63.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom6h_.c: t-toom6h.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom6h.c; then echo $(srcdir)/t-toom6h.c; else echo t-toom6h.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +t-toom8h_.c: t-toom8h.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/t-toom8h.c; then echo $(srcdir)/t-toom8h.c; else echo t-toom8h.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ t-aors_1_.$(OBJEXT) t-aors_1_.lo t-asmtype_.$(OBJEXT) t-asmtype_.lo \ +t-bdiv_.$(OBJEXT) t-bdiv_.lo t-div_.$(OBJEXT) t-div_.lo \ t-divrem_1_.$(OBJEXT) t-divrem_1_.lo t-fat_.$(OBJEXT) t-fat_.lo \ t-get_d_.$(OBJEXT) t-get_d_.lo t-hgcd_.$(OBJEXT) t-hgcd_.lo \ -t-instrument_.$(OBJEXT) t-instrument_.lo t-iord_u_.$(OBJEXT) \ -t-iord_u_.lo t-matrix22_.$(OBJEXT) t-matrix22_.lo \ -t-mp_bases_.$(OBJEXT) t-mp_bases_.lo t-perfsqr_.$(OBJEXT) \ -t-perfsqr_.lo t-scan_.$(OBJEXT) t-scan_.lo : $(ANSI2KNR) +t-instrument_.$(OBJEXT) t-instrument_.lo t-invert_.$(OBJEXT) \ +t-invert_.lo t-iord_u_.$(OBJEXT) t-iord_u_.lo t-matrix22_.$(OBJEXT) \ +t-matrix22_.lo t-mp_bases_.$(OBJEXT) t-mp_bases_.lo t-mullo_.$(OBJEXT) \ +t-mullo_.lo t-mulmod_bnm1_.$(OBJEXT) t-mulmod_bnm1_.lo \ +t-perfsqr_.$(OBJEXT) t-perfsqr_.lo t-scan_.$(OBJEXT) t-scan_.lo \ +t-sqrmod_bnm1_.$(OBJEXT) t-sqrmod_bnm1_.lo t-toom22_.$(OBJEXT) \ +t-toom22_.lo t-toom32_.$(OBJEXT) t-toom32_.lo t-toom33_.$(OBJEXT) \ +t-toom33_.lo t-toom42_.$(OBJEXT) t-toom42_.lo t-toom43_.$(OBJEXT) \ +t-toom43_.lo t-toom44_.$(OBJEXT) t-toom44_.lo t-toom52_.$(OBJEXT) \ +t-toom52_.lo t-toom53_.$(OBJEXT) t-toom53_.lo t-toom62_.$(OBJEXT) \ +t-toom62_.lo t-toom63_.$(OBJEXT) t-toom63_.lo t-toom6h_.$(OBJEXT) \ +t-toom6h_.lo t-toom8h_.$(OBJEXT) t-toom8h_.lo : $(ANSI2KNR) mostlyclean-libtool: -rm -f *.lo diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-bdiv.c gmp-5.0.2+dfsg/tests/mpn/t-bdiv.c --- gmp-4.3.2+dfsg/tests/mpn/t-bdiv.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-bdiv.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,344 @@ +/* Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see http://www.gnu.org/licenses/. */ + + +#include /* for strtol */ +#include /* for printf */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" +#include "tests/tests.h" + + +static void +dumpy (mp_srcptr p, mp_size_t n) +{ + mp_size_t i; + if (n > 20) + { + for (i = n - 1; i >= n - 4; i--) + { + printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); + printf (" "); + } + printf ("... "); + for (i = 3; i >= 0; i--) + { + printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); + printf (" " + (i == 0)); + } + } + else + { + for (i = n - 1; i >= 0; i--) + { + printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); + printf (" " + (i == 0)); + } + } + puts (""); +} + +static unsigned long test; + +void +check_one (mp_ptr qp, mp_srcptr rp, mp_limb_t rh, + mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, char *fname) +{ + mp_size_t qn; + int cmp; + mp_ptr tp; + mp_limb_t cy = 4711; /* silence warnings */ + TMP_DECL; + + qn = nn - dn; + + if (qn == 0) + return; + + TMP_MARK; + + tp = TMP_ALLOC_LIMBS (nn + 1); + + if (dn >= qn) + mpn_mul (tp, dp, dn, qp, qn); + else + mpn_mul (tp, qp, qn, dp, dn); + + if (rp != NULL) + { + cy = mpn_add_n (tp + qn, tp + qn, rp, dn); + cmp = cy != rh || mpn_cmp (tp, np, nn) != 0; + } + else + cmp = mpn_cmp (tp, np, nn - dn) != 0; + + if (cmp != 0) + { + printf ("\r*******************************************************************************\n"); + printf ("%s inconsistent in test %lu\n", fname, test); + printf ("N= "); dumpy (np, nn); + printf ("D= "); dumpy (dp, dn); + printf ("Q= "); dumpy (qp, qn); + if (rp != NULL) + { + printf ("R= "); dumpy (rp, dn); + printf ("Rb= %d, Cy=%d\n", (int) cy, (int) rh); + } + printf ("T= "); dumpy (tp, nn); + printf ("nn = %ld, dn = %ld, qn = %ld", nn, dn, qn); + printf ("\n*******************************************************************************\n"); + abort (); + } + + TMP_FREE; +} + + +/* These are *bit* sizes. */ +#define SIZE_LOG 16 +#define MAX_DN (1L << SIZE_LOG) +#define MAX_NN (1L << (SIZE_LOG + 1)) + +#define COUNT 500 + +mp_limb_t +random_word (gmp_randstate_ptr rs) +{ + mpz_t x; + mp_limb_t r; + TMP_DECL; + TMP_MARK; + + MPZ_TMP_INIT (x, 2); + mpz_urandomb (x, rs, 32); + r = mpz_get_ui (x); + TMP_FREE; + return r; +} + +int +main (int argc, char **argv) +{ + gmp_randstate_ptr rands; + unsigned long maxnbits, maxdbits, nbits, dbits; + mpz_t n, d, tz; + mp_size_t maxnn, maxdn, nn, dn, clearn, i; + mp_ptr np, dp, qp, rp; + mp_limb_t rh; + mp_limb_t t; + mp_limb_t dinv; + int count = COUNT; + mp_ptr scratch; + mp_limb_t ran; + mp_size_t alloc, itch; + mp_limb_t rran0, rran1, qran0, qran1; + TMP_DECL; + + if (argc > 1) + { + char *end; + count = strtol (argv[1], &end, 0); + if (*end || count <= 0) + { + fprintf (stderr, "Invalid test count: %s.\n", argv[1]); + return 1; + } + } + + + maxdbits = MAX_DN; + maxnbits = MAX_NN; + + tests_start (); + rands = RANDS; + + mpz_init (n); + mpz_init (d); + mpz_init (tz); + + maxnn = maxnbits / GMP_NUMB_BITS + 1; + maxdn = maxdbits / GMP_NUMB_BITS + 1; + + TMP_MARK; + + qp = TMP_ALLOC_LIMBS (maxnn + 2) + 1; + rp = TMP_ALLOC_LIMBS (maxnn + 2) + 1; + + alloc = 1; + scratch = __GMP_ALLOCATE_FUNC_LIMBS (alloc); + + for (test = 0; test < count;) + { + nbits = random_word (rands) % (maxnbits - GMP_NUMB_BITS) + 2 * GMP_NUMB_BITS; + if (maxdbits > nbits) + dbits = random_word (rands) % nbits + 1; + else + dbits = random_word (rands) % maxdbits + 1; + +#if RAND_UNIFORM +#define RANDFUNC mpz_urandomb +#else +#define RANDFUNC mpz_rrandomb +#endif + + do + { + RANDFUNC (n, rands, nbits); + do + { + RANDFUNC (d, rands, dbits); + } + while (mpz_sgn (d) == 0); + + np = PTR (n); + dp = PTR (d); + nn = SIZ (n); + dn = SIZ (d); + } + while (nn < dn); + + dp[0] |= 1; + + mpz_urandomb (tz, rands, 32); + t = mpz_get_ui (tz); + + if (t % 17 == 0) + dp[0] = GMP_NUMB_MAX; + + switch ((int) t % 16) + { + case 0: + clearn = random_word (rands) % nn; + for (i = 0; i <= clearn; i++) + np[i] = 0; + break; + case 1: + mpn_sub_1 (np + nn - dn, dp, dn, random_word (rands)); + break; + case 2: + mpn_add_1 (np + nn - dn, dp, dn, random_word (rands)); + break; + } + + test++; + + binvert_limb (dinv, dp[0]); + + rran0 = random_word (rands); + rran1 = random_word (rands); + qran0 = random_word (rands); + qran1 = random_word (rands); + + qp[-1] = qran0; + qp[nn - dn + 1] = qran1; + rp[-1] = rran0; + + ran = random_word (rands); + + if ((double) (nn - dn) * dn < 1e5) + { + if (nn > dn) + { + /* Test mpn_sbpi1_bdiv_qr */ + MPN_ZERO (qp, nn - dn); + MPN_ZERO (rp, dn); + MPN_COPY (rp, np, nn); + rh = mpn_sbpi1_bdiv_qr (qp, rp, nn, dp, dn, -dinv); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); + check_one (qp, rp + nn - dn, rh, np, nn, dp, dn, "mpn_sbpi1_bdiv_qr"); + } + + if (nn > dn) + { + /* Test mpn_sbpi1_bdiv_q */ + MPN_COPY (rp, np, nn); + MPN_ZERO (qp, nn - dn); + mpn_sbpi1_bdiv_q (qp, rp, nn - dn, dp, MIN(dn,nn-dn), -dinv); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); + check_one (qp, NULL, 0, np, nn, dp, dn, "mpn_sbpi1_bdiv_q"); + } + } + + if (dn >= 4 && nn - dn >= 2) + { + /* Test mpn_dcpi1_bdiv_qr */ + MPN_COPY (rp, np, nn); + MPN_ZERO (qp, nn - dn); + rh = mpn_dcpi1_bdiv_qr (qp, rp, nn, dp, dn, -dinv); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); + check_one (qp, rp + nn - dn, rh, np, nn, dp, dn, "mpn_dcpi1_bdiv_qr"); + } + + if (dn >= 4 && nn - dn >= 2) + { + /* Test mpn_dcpi1_bdiv_q */ + MPN_COPY (rp, np, nn); + MPN_ZERO (qp, nn - dn); + mpn_dcpi1_bdiv_q (qp, rp, nn - dn, dp, MIN(dn,nn-dn), -dinv); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); + check_one (qp, NULL, 0, np, nn, dp, dn, "mpn_dcpi1_bdiv_q"); + } + + if (nn - dn < 2 || dn < 2) + continue; + + /* Test mpn_mu_bdiv_qr */ + itch = mpn_mu_bdiv_qr_itch (nn, dn); + if (itch + 1 > alloc) + { + scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); + alloc = itch + 1; + } + scratch[itch] = ran; + MPN_ZERO (qp, nn - dn); + MPN_ZERO (rp, dn); + rp[dn] = rran1; + rh = mpn_mu_bdiv_qr (qp, rp, np, nn, dp, dn, scratch); + ASSERT_ALWAYS (ran == scratch[itch]); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); ASSERT_ALWAYS (rp[dn] == rran1); + check_one (qp, rp, rh, np, nn, dp, dn, "mpn_mu_bdiv_qr"); + + /* Test mpn_mu_bdiv_q */ + itch = mpn_mu_bdiv_q_itch (nn, dn); + if (itch + 1 > alloc) + { + scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); + alloc = itch + 1; + } + scratch[itch] = ran; + MPN_ZERO (qp, nn - dn + 1); + mpn_mu_bdiv_q (qp, np, nn - dn, dp, dn, scratch); + ASSERT_ALWAYS (ran == scratch[itch]); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + check_one (qp, NULL, 0, np, nn, dp, dn, "mpn_mu_bdiv_q"); + } + + __GMP_FREE_FUNC_LIMBS (scratch, alloc); + + TMP_FREE; + + mpz_clear (n); + mpz_clear (d); + mpz_clear (tz); + + tests_end (); + return 0; +} diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-div.c gmp-5.0.2+dfsg/tests/mpn/t-div.c --- gmp-4.3.2+dfsg/tests/mpn/t-div.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-div.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,443 @@ +/* Copyright 2006, 2007, 2009, 2010 Free Software Foundation, Inc. + +This program is free software; you can redistribute it and/or modify it under +the terms of the GNU General Public License as published by the Free Software +Foundation; either version 3 of the License, or (at your option) any later +version. + +This program is distributed in the hope that it will be useful, but WITHOUT ANY +WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A +PARTICULAR PURPOSE. See the GNU General Public License for more details. + +You should have received a copy of the GNU General Public License along with +this program. If not, see http://www.gnu.org/licenses/. */ + + +#include /* for strtol */ +#include /* for printf */ + +#include "gmp.h" +#include "gmp-impl.h" +#include "longlong.h" +#include "tests/tests.h" + + +static void +dumpy (mp_srcptr p, mp_size_t n) +{ + mp_size_t i; + if (n > 20) + { + for (i = n - 1; i >= n - 4; i--) + { + printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); + printf (" "); + } + printf ("... "); + for (i = 3; i >= 0; i--) + { + printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); + printf (" " + (i == 0)); + } + } + else + { + for (i = n - 1; i >= 0; i--) + { + printf ("%0*lx", (int) (2 * sizeof (mp_limb_t)), p[i]); + printf (" " + (i == 0)); + } + } + puts (""); +} + +static unsigned long test; + +static void +check_one (mp_ptr qp, mp_srcptr rp, + mp_srcptr np, mp_size_t nn, mp_srcptr dp, mp_size_t dn, + char *fname, mp_limb_t q_allowed_err) +{ + mp_size_t qn = nn - dn + 1; + mp_ptr tp; + const char *msg; + const char *tvalue; + mp_limb_t i; + TMP_DECL; + TMP_MARK; + + tp = TMP_ALLOC_LIMBS (nn + 1); + if (dn >= qn) + refmpn_mul (tp, dp, dn, qp, qn); + else + refmpn_mul (tp, qp, qn, dp, dn); + + for (i = 0; i < q_allowed_err && (tp[nn] > 0 || mpn_cmp (tp, np, nn) > 0); i++) + ASSERT_NOCARRY (refmpn_sub (tp, tp, nn+1, dp, dn)); + + if (tp[nn] > 0 || mpn_cmp (tp, np, nn) > 0) + { + msg = "q too large"; + tvalue = "Q*D"; + error: + printf ("\r*******************************************************************************\n"); + printf ("%s failed test %lu: %s\n", fname, test, msg); + printf ("N= "); dumpy (np, nn); + printf ("D= "); dumpy (dp, dn); + printf ("Q= "); dumpy (qp, qn); + if (rp) + { printf ("R= "); dumpy (rp, dn); } + printf ("%5s=", tvalue); dumpy (tp, nn+1); + printf ("nn = %ld, dn = %ld, qn = %ld\n", nn, dn, qn); + abort (); + } + + ASSERT_NOCARRY (refmpn_sub_n (tp, np, tp, nn)); + tvalue = "N-Q*D"; + if (!mpn_zero_p (tp + dn, nn - dn) || mpn_cmp (tp, dp, dn) >= 0) + { + msg = "q too small"; + goto error; + } + + if (rp && mpn_cmp (rp, tp, dn) != 0) + { + msg = "r incorrect"; + goto error; + } + + TMP_FREE; +} + + +/* These are *bit* sizes. */ +#ifndef SIZE_LOG +#define SIZE_LOG 17 +#endif +#define MAX_DN (1L << SIZE_LOG) +#define MAX_NN (1L << (SIZE_LOG + 1)) + +#define COUNT 200 + +mp_limb_t +random_word (gmp_randstate_ptr rs) +{ + mpz_t x; + mp_limb_t r; + TMP_DECL; + TMP_MARK; + + MPZ_TMP_INIT (x, 2); + mpz_urandomb (x, rs, 32); + r = mpz_get_ui (x); + TMP_FREE; + return r; +} + +int +main (int argc, char **argv) +{ + gmp_randstate_ptr rands; + unsigned long maxnbits, maxdbits, nbits, dbits; + mpz_t n, d, q, r, tz; + mp_size_t maxnn, maxdn, nn, dn, clearn, i; + mp_ptr np, dp, qp, rp; + mp_limb_t t; + gmp_pi1_t dinv; + int count = COUNT; + mp_ptr scratch; + mp_limb_t ran; + mp_size_t alloc, itch; + mp_limb_t rran0, rran1, qran0, qran1; + TMP_DECL; + + if (argc > 1) + { + char *end; + count = strtol (argv[1], &end, 0); + if (*end || count <= 0) + { + fprintf (stderr, "Invalid test count: %s.\n", argv[1]); + return 1; + } + } + + + maxdbits = MAX_DN; + maxnbits = MAX_NN; + + tests_start (); + rands = RANDS; + + mpz_init (n); + mpz_init (d); + mpz_init (q); + mpz_init (r); + mpz_init (tz); + + maxnn = maxnbits / GMP_NUMB_BITS + 1; + maxdn = maxdbits / GMP_NUMB_BITS + 1; + + TMP_MARK; + + qp = TMP_ALLOC_LIMBS (maxnn + 2) + 1; + rp = TMP_ALLOC_LIMBS (maxnn + 2) + 1; + + alloc = 1; + scratch = __GMP_ALLOCATE_FUNC_LIMBS (alloc); + + for (test = 0; test < count;) + { + do + { + nbits = random_word (rands) % (maxnbits - GMP_NUMB_BITS) + 2 * GMP_NUMB_BITS; + if (maxdbits > nbits) + dbits = random_word (rands) % nbits + 1; + else + dbits = random_word (rands) % maxdbits + 1; + } + while (nbits < dbits); + +#if RAND_UNIFORM +#define RANDFUNC mpz_urandomb +#else +#define RANDFUNC mpz_rrandomb +#endif + + do + RANDFUNC (d, rands, dbits); + while (mpz_sgn (d) == 0); + dn = SIZ (d); + dp = PTR (d); + dp[dn - 1] |= GMP_NUMB_HIGHBIT; + + if (test % 2 == 0) + { + RANDFUNC (n, rands, nbits); + nn = SIZ (n); + ASSERT_ALWAYS (nn >= dn); + } + else + { + do + { + RANDFUNC (q, rands, random_word (rands) % (nbits - dbits + 1)); + RANDFUNC (r, rands, random_word (rands) % mpz_sizeinbase (d, 2)); + mpz_mul (n, q, d); + mpz_add (n, n, r); + nn = SIZ (n); + } + while (nn > maxnn || nn < dn); + } + + ASSERT_ALWAYS (nn <= maxnn); + ASSERT_ALWAYS (dn <= maxdn); + + np = PTR (n); + + mpz_urandomb (tz, rands, 32); + t = mpz_get_ui (tz); + + if (t % 17 == 0) + dp[dn - 1] = GMP_NUMB_MAX; + + switch ((int) t % 16) + { + case 0: + clearn = random_word (rands) % nn; + for (i = clearn; i < nn; i++) + np[i] = 0; + break; + case 1: + mpn_sub_1 (np + nn - dn, dp, dn, random_word (rands)); + break; + case 2: + mpn_add_1 (np + nn - dn, dp, dn, random_word (rands)); + break; + } + + test++; + + invert_pi1 (dinv, dp[dn - 1], dp[dn - 2]); + + rran0 = random_word (rands); + rran1 = random_word (rands); + qran0 = random_word (rands); + qran1 = random_word (rands); + + qp[-1] = qran0; + qp[nn - dn + 1] = qran1; + rp[-1] = rran0; + + ran = random_word (rands); + + if ((double) (nn - dn) * dn < 1e5) + { + /* Test mpn_sbpi1_div_qr */ + if (dn > 2) + { + MPN_COPY (rp, np, nn); + if (nn > dn) + MPN_ZERO (qp, nn - dn); + qp[nn - dn] = mpn_sbpi1_div_qr (qp, rp, nn, dp, dn, dinv.inv32); + check_one (qp, rp, np, nn, dp, dn, "mpn_sbpi1_div_qr", 0); + } + + /* Test mpn_sbpi1_divappr_q */ + if (dn > 2) + { + MPN_COPY (rp, np, nn); + if (nn > dn) + MPN_ZERO (qp, nn - dn); + qp[nn - dn] = mpn_sbpi1_divappr_q (qp, rp, nn, dp, dn, dinv.inv32); + check_one (qp, NULL, np, nn, dp, dn, "mpn_sbpi1_divappr_q", 1); + } + + /* Test mpn_sbpi1_div_q */ + if (dn > 2) + { + MPN_COPY (rp, np, nn); + if (nn > dn) + MPN_ZERO (qp, nn - dn); + qp[nn - dn] = mpn_sbpi1_div_q (qp, rp, nn, dp, dn, dinv.inv32); + check_one (qp, NULL, np, nn, dp, dn, "mpn_sbpi1_div_q", 0); + } + } + + /* Test mpn_dcpi1_div_qr */ + if (dn >= 6 && nn - dn >= 3) + { + MPN_COPY (rp, np, nn); + if (nn > dn) + MPN_ZERO (qp, nn - dn); + qp[nn - dn] = mpn_dcpi1_div_qr (qp, rp, nn, dp, dn, &dinv); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); + check_one (qp, rp, np, nn, dp, dn, "mpn_dcpi1_div_qr", 0); + } + + /* Test mpn_dcpi1_divappr_q */ + if (dn >= 6 && nn - dn >= 3) + { + MPN_COPY (rp, np, nn); + if (nn > dn) + MPN_ZERO (qp, nn - dn); + qp[nn - dn] = mpn_dcpi1_divappr_q (qp, rp, nn, dp, dn, &dinv); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); + check_one (qp, NULL, np, nn, dp, dn, "mpn_dcpi1_divappr_q", 1); + } + + /* Test mpn_dcpi1_div_q */ + if (dn >= 6 && nn - dn >= 3) + { + MPN_COPY (rp, np, nn); + if (nn > dn) + MPN_ZERO (qp, nn - dn); + qp[nn - dn] = mpn_dcpi1_div_q (qp, rp, nn, dp, dn, &dinv); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); + check_one (qp, NULL, np, nn, dp, dn, "mpn_dcpi1_div_q", 0); + } + + /* Test mpn_mu_div_qr */ + if (nn - dn > 2 && dn >= 2) + { + itch = mpn_mu_div_qr_itch (nn, dn, 0); + if (itch + 1 > alloc) + { + scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); + alloc = itch + 1; + } + scratch[itch] = ran; + MPN_ZERO (qp, nn - dn); + MPN_ZERO (rp, dn); + rp[dn] = rran1; + qp[nn - dn] = mpn_mu_div_qr (qp, rp, np, nn, dp, dn, scratch); + ASSERT_ALWAYS (ran == scratch[itch]); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + ASSERT_ALWAYS (rp[-1] == rran0); ASSERT_ALWAYS (rp[dn] == rran1); + check_one (qp, rp, np, nn, dp, dn, "mpn_mu_div_qr", 0); + } + + /* Test mpn_mu_divappr_q */ + if (nn - dn > 2 && dn >= 2) + { + itch = mpn_mu_divappr_q_itch (nn, dn, 0); + if (itch + 1 > alloc) + { + scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); + alloc = itch + 1; + } + scratch[itch] = ran; + MPN_ZERO (qp, nn - dn); + qp[nn - dn] = mpn_mu_divappr_q (qp, np, nn, dp, dn, scratch); + ASSERT_ALWAYS (ran == scratch[itch]); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + check_one (qp, NULL, np, nn, dp, dn, "mpn_mu_divappr_q", 4); + } + + /* Test mpn_mu_div_q */ + if (nn - dn > 2 && dn >= 2) + { + itch = mpn_mu_div_q_itch (nn, dn, 0); + if (itch + 1> alloc) + { + scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); + alloc = itch + 1; + } + scratch[itch] = ran; + MPN_ZERO (qp, nn - dn); + qp[nn - dn] = mpn_mu_div_q (qp, np, nn, dp, dn, scratch); + ASSERT_ALWAYS (ran == scratch[itch]); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + check_one (qp, NULL, np, nn, dp, dn, "mpn_mu_div_q", 0); + } + + + if (1) + { + itch = nn + 1; + if (itch + 1> alloc) + { + scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); + alloc = itch + 1; + } + scratch[itch] = ran; + mpn_div_q (qp, np, nn, dp, dn, scratch); + ASSERT_ALWAYS (ran == scratch[itch]); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + check_one (qp, NULL, np, nn, dp, dn, "mpn_div_q", 0); + } + + /* Finally, test mpn_div_q without msb set. */ + dp[dn - 1] &= ~GMP_NUMB_HIGHBIT; + if (dp[dn - 1] == 0) + continue; + + itch = nn + 1; + if (itch + 1> alloc) + { + scratch = __GMP_REALLOCATE_FUNC_LIMBS (scratch, alloc, itch + 1); + alloc = itch + 1; + } + scratch[itch] = ran; + mpn_div_q (qp, np, nn, dp, dn, scratch); + ASSERT_ALWAYS (ran == scratch[itch]); + ASSERT_ALWAYS (qp[-1] == qran0); ASSERT_ALWAYS (qp[nn - dn + 1] == qran1); + check_one (qp, NULL, np, nn, dp, dn, "mpn_div_q", 0); + } + + __GMP_FREE_FUNC_LIMBS (scratch, alloc); + + TMP_FREE; + + mpz_clear (n); + mpz_clear (d); + mpz_clear (q); + mpz_clear (r); + mpz_clear (tz); + + tests_end (); + return 0; +} diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-hgcd.c gmp-5.0.2+dfsg/tests/mpn/t-hgcd.c --- gmp-4.3.2+dfsg/tests/mpn/t-hgcd.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-hgcd.c 2011-05-08 09:49:29.000000000 +0000 @@ -162,6 +162,13 @@ one_test (op1, op2, i); } + mpz_clear (bs); + mpz_clear (op1); + mpz_clear (op2); + mpz_clear (temp1); + mpz_clear (temp2); + + tests_end (); exit (0); } diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-instrument.c gmp-5.0.2+dfsg/tests/mpn/t-instrument.c --- gmp-4.3.2+dfsg/tests/mpn/t-instrument.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-instrument.c 2011-05-08 09:49:29.000000000 +0000 @@ -176,9 +176,9 @@ post (); #endif -#if HAVE_NATIVE_mpn_com_n - pre ("mpn_com_n"); - mpn_com_n (wp, xp, size); +#if HAVE_NATIVE_mpn_com + pre ("mpn_com"); + mpn_com (wp, xp, size); post (); #endif diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-invert.c gmp-5.0.2+dfsg/tests/mpn/t-invert.c --- gmp-4.3.2+dfsg/tests/mpn/t-invert.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-invert.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,161 @@ +/* Test for mpn_invert function. + + Contributed to the GNU project by Marco Bodrato. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "tests.h" + +#include +#include + +/* Sizes are up to 2^SIZE_LOG limbs */ +#ifndef SIZE_LOG +#define SIZE_LOG 12 +#endif + +#ifndef COUNT +#define COUNT 1000 +#endif + +#define MAX_N (1L << SIZE_LOG) +#define MIN_N 1 + + +static int +invert_valid (mp_srcptr ip, mp_srcptr dp, mp_size_t n) +{ + mp_ptr tp; + int cy; + TMP_DECL; + + TMP_MARK; + tp = TMP_ALLOC_LIMBS (2*n); + + refmpn_mul (tp, ip, n, dp, n); + cy = refmpn_add_n (tp + n, tp + n, dp, n); /* This must not give a carry. */ + cy -= refmpn_add (tp, tp, 2*n, dp, n); /* This must give a carry. */ + TMP_FREE; + + return (cy == -1); +} + +/* + Chech the result of the mpn_invert function in the library. +*/ + +int +main (int argc, char **argv) +{ + mp_ptr ip, dp, scratch; + int count = COUNT; + int test; + gmp_randstate_ptr rands; + TMP_DECL; + TMP_MARK; + + if (argc > 1) + { + char *end; + count = strtol (argv[1], &end, 0); + if (*end || count <= 0) + { + fprintf (stderr, "Invalid test count: %s.\n", argv[1]); + return 1; + } + } + + tests_start (); + rands = RANDS; + + dp = TMP_ALLOC_LIMBS (MAX_N); + ip = 1+TMP_ALLOC_LIMBS (MAX_N + 2); + scratch + = 1+TMP_ALLOC_LIMBS (mpn_invert_itch (MAX_N) + 2); + + for (test = 0; test < count; test++) + { + unsigned size_min; + unsigned size_range; + mp_size_t n; + mp_size_t itch; + mp_limb_t i_before, i_after, s_before, s_after; + + for (size_min = 1; (1L << size_min) < MIN_N; size_min++) + ; + + /* We generate an in the MIN_N <= n <= (1 << size_range). */ + size_range = size_min + + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); + + n = MIN_N + + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); + + mpn_random2 (dp, n); + + mpn_random2 (ip-1, n + 2); + i_before = ip[-1]; + i_after = ip[n]; + + itch = mpn_invert_itch (n); + ASSERT_ALWAYS (itch <= mpn_invert_itch (MAX_N)); + mpn_random2 (scratch-1, itch+2); + s_before = scratch[-1]; + s_after = scratch[itch]; + + dp[n-1] |= GMP_NUMB_HIGHBIT; + mpn_invert (ip, dp, n, scratch); + if (ip[-1] != i_before || ip[n] != i_after + || scratch[-1] != s_before || scratch[itch] != s_after + || ! invert_valid(ip, dp, n)) + { + printf ("ERROR in test %d, n = %d\n", + test, (int) n); + if (ip[-1] != i_before) + { + printf ("before ip:"); mpn_dump (ip -1, 1); + printf ("keep: "); mpn_dump (&i_before, 1); + } + if (ip[n] != i_after) + { + printf ("after ip:"); mpn_dump (ip + n, 1); + printf ("keep: "); mpn_dump (&i_after, 1); + } + if (scratch[-1] != s_before) + { + printf ("before scratch:"); mpn_dump (scratch-1, 1); + printf ("keep: "); mpn_dump (&s_before, 1); + } + if (scratch[itch] != s_after) + { + printf ("after scratch:"); mpn_dump (scratch + itch, 1); + printf ("keep: "); mpn_dump (&s_after, 1); + } + mpn_dump (dp, n); + mpn_dump (ip, n); + + abort(); + } + } + TMP_FREE; + tests_end (); + return 0; +} diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-matrix22.c gmp-5.0.2+dfsg/tests/mpn/t-matrix22.c --- gmp-4.3.2+dfsg/tests/mpn/t-matrix22.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-matrix22.c 2011-05-08 09:49:29.000000000 +0000 @@ -185,7 +185,7 @@ matrix_init (&B, MAX_SIZE); mpz_init (bs); - for (i = 0; i < 17; i++) + for (i = 0; i < 1000; i++) { mp_size_t an, bn; mpz_urandomb (bs, rands, 32); @@ -202,5 +202,6 @@ matrix_clear (&A); matrix_clear (&B); + tests_end (); return 0; } diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-mullo.c gmp-5.0.2+dfsg/tests/mpn/t-mullo.c --- gmp-4.3.2+dfsg/tests/mpn/t-mullo.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-mullo.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,142 @@ +/* Test for mullo function. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "tests.h" + +#include +#include + +/* Sizes are up to 2^SIZE_LOG limbs */ +#ifndef SIZE_LOG +#define SIZE_LOG 10 +#endif + +#ifndef COUNT +#define COUNT 10000 +#endif + +#define MAX_N (1L << SIZE_LOG) +#define MIN_N (1) + +int +main (int argc, char **argv) +{ + mp_ptr ap, bp, refp, pp, scratch; + int count = COUNT; + int test; + gmp_randstate_ptr rands; + TMP_DECL; + TMP_MARK; + + if (argc > 1) + { + char *end; + count = strtol (argv[1], &end, 0); + if (*end || count <= 0) + { + fprintf (stderr, "Invalid test count: %s.\n", argv[1]); + return 1; + } + } + + tests_start (); + rands = RANDS; + +#define mpn_mullo_itch(n) (0) + + ap = TMP_ALLOC_LIMBS (MAX_N); + bp = TMP_ALLOC_LIMBS (MAX_N); + refp = TMP_ALLOC_LIMBS (MAX_N * 2); + pp = 1+TMP_ALLOC_LIMBS (MAX_N + 2); + scratch + = 1+TMP_ALLOC_LIMBS (mpn_mullo_itch (MAX_N) + 2); + + for (test = 0; test < count; test++) + { + unsigned size_min; + unsigned size_range; + mp_size_t n; + mp_size_t itch; + mp_limb_t p_before, p_after, s_before, s_after; + + for (size_min = 1; (1L << size_min) < MIN_N; size_min++) + ; + + /* We generate an in the MIN_N <= n <= (1 << size_range). */ + size_range = size_min + + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); + + n = MIN_N + + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); + + mpn_random2 (ap, n); + mpn_random2 (bp, n); + mpn_random2 (pp-1, n + 2); + p_before = pp[-1]; + p_after = pp[n]; + + itch = mpn_mullo_itch (n); + ASSERT_ALWAYS (itch <= mpn_mullo_itch (MAX_N)); + mpn_random2 (scratch-1, itch+2); + s_before = scratch[-1]; + s_after = scratch[itch]; + + mpn_mullo_n (pp, ap, bp, n); + mpn_mul_n (refp, ap, bp, n); + if (pp[-1] != p_before || pp[n] != p_after + || scratch[-1] != s_before || scratch[itch] != s_after + || mpn_cmp (refp, pp, n) != 0) + { + printf ("ERROR in test %d, n = %d", + test, (int) n); + if (pp[-1] != p_before) + { + printf ("before pp:"); mpn_dump (pp -1, 1); + printf ("keep: "); mpn_dump (&p_before, 1); + } + if (pp[n] != p_after) + { + printf ("after pp:"); mpn_dump (pp + n, 1); + printf ("keep: "); mpn_dump (&p_after, 1); + } + if (scratch[-1] != s_before) + { + printf ("before scratch:"); mpn_dump (scratch-1, 1); + printf ("keep: "); mpn_dump (&s_before, 1); + } + if (scratch[itch] != s_after) + { + printf ("after scratch:"); mpn_dump (scratch + itch, 1); + printf ("keep: "); mpn_dump (&s_after, 1); + } + mpn_dump (ap, n); + mpn_dump (bp, n); + mpn_dump (pp, n); + mpn_dump (refp, n); + + abort(); + } + } + TMP_FREE; + tests_end (); + return 0; +} diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-mulmod_bnm1.c gmp-5.0.2+dfsg/tests/mpn/t-mulmod_bnm1.c --- gmp-4.3.2+dfsg/tests/mpn/t-mulmod_bnm1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-mulmod_bnm1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,218 @@ +/* Test for mulmod_bnm1 function. + + Contributed to the GNU project by Marco Bodrato. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "tests.h" + +#include +#include + +/* Sizes are up to 2^SIZE_LOG limbs */ +#ifndef SIZE_LOG +#define SIZE_LOG 11 +#endif + +#ifndef COUNT +#define COUNT 5000 +#endif + +#define MAX_N (1L << SIZE_LOG) +#define MIN_N 1 + +/* + Reference function for multiplication modulo B^rn-1. + + The result is expected to be ZERO if and only if one of the operand + already is. Otherwise the class [0] Mod(B^rn-1) is represented by + B^rn-1. This should not be a problem if mulmod_bnm1 is used to + combine results and obtain a natural number when one knows in + advance that the final value is less than (B^rn-1). +*/ + +static void +ref_mulmod_bnm1 (mp_ptr rp, mp_size_t rn, mp_srcptr ap, mp_size_t an, mp_srcptr bp, mp_size_t bn) +{ + mp_limb_t cy; + + ASSERT (0 < an && an <= rn); + ASSERT (0 < bn && bn <= rn); + + if (an >= bn) + refmpn_mul (rp, ap, an, bp, bn); + else + refmpn_mul (rp, bp, bn, ap, an); + an += bn; + if (an > rn) { + cy = mpn_add (rp, rp, rn, rp + rn, an - rn); + /* If cy == 1, then the value of rp is at most B^rn - 2, so there can + * be no overflow when adding in the carry. */ + MPN_INCR_U (rp, rn, cy); + } +} + +/* + Compare the result of the mpn_mulmod_bnm1 function in the library + with the reference function above. +*/ + +int +main (int argc, char **argv) +{ + mp_ptr ap, bp, refp, pp, scratch; + int count = COUNT; + int test; + gmp_randstate_ptr rands; + TMP_DECL; + TMP_MARK; + + if (argc > 1) + { + char *end; + count = strtol (argv[1], &end, 0); + if (*end || count <= 0) + { + fprintf (stderr, "Invalid test count: %s.\n", argv[1]); + return 1; + } + } + + tests_start (); + rands = RANDS; + + ASSERT_ALWAYS (mpn_mulmod_bnm1_next_size (MAX_N) == MAX_N); + + ap = TMP_ALLOC_LIMBS (MAX_N); + bp = TMP_ALLOC_LIMBS (MAX_N); + refp = TMP_ALLOC_LIMBS (MAX_N * 4); + pp = 1+TMP_ALLOC_LIMBS (MAX_N + 2); + scratch + = 1+TMP_ALLOC_LIMBS (mpn_mulmod_bnm1_itch (MAX_N, MAX_N, MAX_N) + 2); + + for (test = 0; test < count; test++) + { + unsigned size_min; + unsigned size_range; + mp_size_t an,bn,rn,n; + mp_size_t itch; + mp_limb_t p_before, p_after, s_before, s_after; + + for (size_min = 1; (1L << size_min) < MIN_N; size_min++) + ; + + /* We generate an in the MIN_N <= n <= (1 << size_range). */ + size_range = size_min + + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); + + n = MIN_N + + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); + n = mpn_mulmod_bnm1_next_size (n); + + if ( (test & 1) || n == 1) { + /* Half of the tests are done with the main scenario in mind: + both an and bn >= rn/2 */ + an = ((n+1) >> 1) + gmp_urandomm_ui (rands, (n+1) >> 1); + bn = ((n+1) >> 1) + gmp_urandomm_ui (rands, (n+1) >> 1); + } else { + /* Second half of the tests are done using mulmod to compute a + full product with n/2 < an+bn <= n. */ + an = 1 + gmp_urandomm_ui (rands, n - 1); + if (an >= n/2) + bn = 1 + gmp_urandomm_ui (rands, n - an); + else + bn = n/2 + 1 - an + gmp_urandomm_ui (rands, (n+1)/2); + } + + /* Make sure an >= bn */ + if (an < bn) + MP_SIZE_T_SWAP (an, bn); + + mpn_random2 (ap, an); + mpn_random2 (bp, bn); + + /* Sometime trigger the borderline conditions + A = -1,0,+1 or B = -1,0,+1 or A*B == -1,0,1 Mod(B^{n/2}+1). + This only makes sense if there is at least a split, i.e. n is even. */ + if ((test & 0x1f) == 1 && (n & 1) == 0) { + mp_size_t x; + MPN_COPY (ap, ap + (n >> 1), an - (n >> 1)); + MPN_ZERO (ap + an - (n >> 1) , n - an); + MPN_COPY (bp, bp + (n >> 1), bn - (n >> 1)); + MPN_ZERO (bp + bn - (n >> 1) , n - bn); + x = (n == an) ? 0 : gmp_urandomm_ui (rands, n - an); + ap[x] += gmp_urandomm_ui (rands, 3) - 1; + x = (n >> 1) - x % (n >> 1); + bp[x] += gmp_urandomm_ui (rands, 3) - 1; + /* We don't propagate carry, this means that the desired condition + is not triggered all the times. A few times are enough anyway. */ + } + rn = MIN(n, an + bn); + mpn_random2 (pp-1, rn + 2); + p_before = pp[-1]; + p_after = pp[rn]; + + itch = mpn_mulmod_bnm1_itch (n, an, bn); + ASSERT_ALWAYS (itch <= mpn_mulmod_bnm1_itch (MAX_N, MAX_N, MAX_N)); + mpn_random2 (scratch-1, itch+2); + s_before = scratch[-1]; + s_after = scratch[itch]; + + mpn_mulmod_bnm1 ( pp, n, ap, an, bp, bn, scratch); + ref_mulmod_bnm1 (refp, n, ap, an, bp, bn); + if (pp[-1] != p_before || pp[rn] != p_after + || scratch[-1] != s_before || scratch[itch] != s_after + || mpn_cmp (refp, pp, rn) != 0) + { + printf ("ERROR in test %d, an = %d, bn = %d, n = %d\n", + test, (int) an, (int) bn, (int) n); + if (pp[-1] != p_before) + { + printf ("before pp:"); mpn_dump (pp -1, 1); + printf ("keep: "); mpn_dump (&p_before, 1); + } + if (pp[rn] != p_after) + { + printf ("after pp:"); mpn_dump (pp + rn, 1); + printf ("keep: "); mpn_dump (&p_after, 1); + } + if (scratch[-1] != s_before) + { + printf ("before scratch:"); mpn_dump (scratch-1, 1); + printf ("keep: "); mpn_dump (&s_before, 1); + } + if (scratch[itch] != s_after) + { + printf ("after scratch:"); mpn_dump (scratch + itch, 1); + printf ("keep: "); mpn_dump (&s_after, 1); + } + mpn_dump (ap, an); + mpn_dump (bp, bn); + mpn_dump (pp, rn); + mpn_dump (refp, rn); + + abort(); + } + } + TMP_FREE; + tests_end (); + return 0; +} diff -Nru gmp-4.3.2+dfsg/tests/mpn/toom-shared.h gmp-5.0.2+dfsg/tests/mpn/toom-shared.h --- gmp-4.3.2+dfsg/tests/mpn/toom-shared.h 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/toom-shared.h 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,158 @@ +/* Test for various Toom functions. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "tests.h" + +#include +#include + +/* Main file is expected to define mpn_toomMN_mul, + * mpn_toomMN_mul_itch, MIN_AN, MIN_BN(an), MAX_BN(an) and then + * include this file. */ + +/* Sizes are up to 2^SIZE_LOG limbs */ +#ifndef SIZE_LOG +#define SIZE_LOG 10 +#endif + +#ifndef COUNT +#define COUNT 2000 +#endif + +#define MAX_AN (1L << SIZE_LOG) + +#ifndef MAX_BN +#define MAX_BN(an) (an) +#endif + +/* For general toomMN_mul, we need + * + * MIN_BN(an) = N + floor(((N-1)*an + M - N)/M) + * + * MAX_BN(an) = floor(N*(an-1)/(M-1)) - N + 1 + */ + +int +main (int argc, char **argv) +{ + mp_ptr ap, bp, refp, pp, scratch; + int count = COUNT; + int test; + gmp_randstate_ptr rands; + TMP_DECL; + TMP_MARK; + + if (argc > 1) + { + char *end; + count = strtol (argv[1], &end, 0); + if (*end || count <= 0) + { + fprintf (stderr, "Invalid test count: %s.\n", argv[1]); + return 1; + } + } + + tests_start (); + rands = RANDS; + + ap = TMP_ALLOC_LIMBS (MAX_AN); + bp = TMP_ALLOC_LIMBS (MAX_BN(MAX_AN)); + refp = TMP_ALLOC_LIMBS (MAX_AN + MAX_BN(MAX_AN)); + pp = 1+TMP_ALLOC_LIMBS (MAX_AN + MAX_BN(MAX_AN)+2); + scratch + = 1+TMP_ALLOC_LIMBS (mpn_toomMN_mul_itch (MAX_AN, MAX_BN(MAX_AN)) + + 2); + + for (test = 0; test < count; test++) + { + unsigned size_min; + unsigned size_range; + mp_size_t an, bn; + mp_size_t itch; + mp_limb_t p_before, p_after, s_before, s_after; + + for (size_min = 1; (1L << size_min) < MIN_AN; size_min++) + ; + + /* We generate an in the MIN_AN <= an <= (1 << size_range). */ + size_range = size_min + + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); + + an = MIN_AN + + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_AN); + bn = MIN_BN(an) + + gmp_urandomm_ui (rands, MAX_BN(an) + 1 - MIN_BN(an)); + + mpn_random2 (ap, an); + mpn_random2 (bp, bn); + mpn_random2 (pp-1, an + bn + 2); + p_before = pp[-1]; + p_after = pp[an + bn]; + + itch = mpn_toomMN_mul_itch (an, bn); + ASSERT_ALWAYS (itch <= mpn_toomMN_mul_itch (MAX_AN, MAX_BN(MAX_AN))); + mpn_random2 (scratch-1, itch+2); + s_before = scratch[-1]; + s_after = scratch[itch]; + + mpn_toomMN_mul (pp, ap, an, bp, bn, scratch); + refmpn_mul (refp, ap, an, bp, bn); + if (pp[-1] != p_before || pp[an + bn] != p_after + || scratch[-1] != s_before || scratch[itch] != s_after + || mpn_cmp (refp, pp, an + bn) != 0) + { + printf ("ERROR in test %d, an = %d, bn = %d\n", + test, (int) an, (int) bn); + if (pp[-1] != p_before) + { + printf ("before pp:"); mpn_dump (pp -1, 1); + printf ("keep: "); mpn_dump (&p_before, 1); + } + if (pp[an + bn] != p_after) + { + printf ("after pp:"); mpn_dump (pp + an + bn, 1); + printf ("keep: "); mpn_dump (&p_after, 1); + } + if (scratch[-1] != s_before) + { + printf ("before scratch:"); mpn_dump (scratch-1, 1); + printf ("keep: "); mpn_dump (&s_before, 1); + } + if (scratch[itch] != s_after) + { + printf ("after scratch:"); mpn_dump (scratch + itch, 1); + printf ("keep: "); mpn_dump (&s_after, 1); + } + mpn_dump (ap, an); + mpn_dump (bp, bn); + mpn_dump (pp, an + bn); + mpn_dump (refp, an + bn); + + abort(); + } + } + TMP_FREE; + + tests_end (); + return 0; +} diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-sqrmod_bnm1.c gmp-5.0.2+dfsg/tests/mpn/t-sqrmod_bnm1.c --- gmp-4.3.2+dfsg/tests/mpn/t-sqrmod_bnm1.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-sqrmod_bnm1.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,191 @@ +/* Test for sqrmod_bnm1 function. + + Contributed to the GNU project by Marco Bodrato. + +Copyright 2009 Free Software Foundation, Inc. + +This file is part of the GNU MP Library. + +The GNU MP Library is free software; you can redistribute it and/or modify +it under the terms of the GNU Lesser General Public License as published by +the Free Software Foundation; either version 3 of the License, or (at your +option) any later version. + +The GNU MP Library is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY +or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public +License for more details. + +You should have received a copy of the GNU Lesser General Public License +along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ + + +#include "gmp.h" +#include "gmp-impl.h" +#include "tests.h" + +#include +#include + +/* Sizes are up to 2^SIZE_LOG limbs */ +#ifndef SIZE_LOG +#define SIZE_LOG 12 +#endif + +#ifndef COUNT +#define COUNT 3000 +#endif + +#define MAX_N (1L << SIZE_LOG) +#define MIN_N 1 + +/* + Reference function for squaring modulo B^rn-1. + + The result is expected to be ZERO if and only if one of the operand + already is. Otherwise the class [0] Mod(B^rn-1) is represented by + B^rn-1. This should not be a problem if sqrmod_bnm1 is used to + combine results and obtain a natural number when one knows in + advance that the final value is less than (B^rn-1). +*/ + +static void +ref_sqrmod_bnm1 (mp_ptr rp, mp_size_t rn, mp_srcptr ap, mp_size_t an) +{ + mp_limb_t cy; + + ASSERT (0 < an && an <= rn); + + refmpn_mul (rp, ap, an, ap, an); + an *= 2; + if (an > rn) { + cy = mpn_add (rp, rp, rn, rp + rn, an - rn); + /* If cy == 1, then the value of rp is at most B^rn - 2, so there can + * be no overflow when adding in the carry. */ + MPN_INCR_U (rp, rn, cy); + } +} + +/* + Compare the result of the mpn_sqrmod_bnm1 function in the library + with the reference function above. +*/ + +int +main (int argc, char **argv) +{ + mp_ptr ap, refp, pp, scratch; + int count = COUNT; + int test; + gmp_randstate_ptr rands; + TMP_DECL; + TMP_MARK; + + if (argc > 1) + { + char *end; + count = strtol (argv[1], &end, 0); + if (*end || count <= 0) + { + fprintf (stderr, "Invalid test count: %s.\n", argv[1]); + return 1; + } + } + + tests_start (); + rands = RANDS; + + ASSERT_ALWAYS (mpn_sqrmod_bnm1_next_size (MAX_N) == MAX_N); + + ap = TMP_ALLOC_LIMBS (MAX_N); + refp = TMP_ALLOC_LIMBS (MAX_N * 4); + pp = 1+TMP_ALLOC_LIMBS (MAX_N + 2); + scratch + = 1+TMP_ALLOC_LIMBS (mpn_sqrmod_bnm1_itch (MAX_N, MAX_N) + 2); + + for (test = 0; test < count; test++) + { + unsigned size_min; + unsigned size_range; + mp_size_t an,rn,n; + mp_size_t itch; + mp_limb_t p_before, p_after, s_before, s_after; + + for (size_min = 1; (1L << size_min) < MIN_N; size_min++) + ; + + /* We generate an in the MIN_N <= n <= (1 << size_range). */ + size_range = size_min + + gmp_urandomm_ui (rands, SIZE_LOG + 1 - size_min); + + n = MIN_N + + gmp_urandomm_ui (rands, (1L << size_range) + 1 - MIN_N); + n = mpn_sqrmod_bnm1_next_size (n); + + if (n == 1) + an = 1; + else + an = ((n+1) >> 1) + gmp_urandomm_ui (rands, (n+1) >> 1); + + mpn_random2 (ap, an); + + /* Sometime trigger the borderline conditions + A = -1,0,+1 Mod(B^{n/2}+1). + This only makes sense if there is at least a split, i.e. n is even. */ + if ((test & 0x1f) == 1 && (n & 1) == 0) { + mp_size_t x; + MPN_COPY (ap, ap + (n >> 1), an - (n >> 1)); + MPN_ZERO (ap + an - (n >> 1) , n - an); + x = (n == an) ? 0 : gmp_urandomm_ui (rands, n - an); + ap[x] += gmp_urandomm_ui (rands, 3) - 1; + } + rn = MIN(n, 2*an); + mpn_random2 (pp-1, rn + 2); + p_before = pp[-1]; + p_after = pp[rn]; + + itch = mpn_sqrmod_bnm1_itch (n, an); + ASSERT_ALWAYS (itch <= mpn_sqrmod_bnm1_itch (MAX_N, MAX_N)); + mpn_random2 (scratch-1, itch+2); + s_before = scratch[-1]; + s_after = scratch[itch]; + + mpn_sqrmod_bnm1 ( pp, n, ap, an, scratch); + ref_sqrmod_bnm1 (refp, n, ap, an); + if (pp[-1] != p_before || pp[rn] != p_after + || scratch[-1] != s_before || scratch[itch] != s_after + || mpn_cmp (refp, pp, rn) != 0) + { + printf ("ERROR in test %d, an = %d, n = %d\n", + test, (int) an, (int) n); + if (pp[-1] != p_before) + { + printf ("before pp:"); mpn_dump (pp -1, 1); + printf ("keep: "); mpn_dump (&p_before, 1); + } + if (pp[rn] != p_after) + { + printf ("after pp:"); mpn_dump (pp + rn, 1); + printf ("keep: "); mpn_dump (&p_after, 1); + } + if (scratch[-1] != s_before) + { + printf ("before scratch:"); mpn_dump (scratch-1, 1); + printf ("keep: "); mpn_dump (&s_before, 1); + } + if (scratch[itch] != s_after) + { + printf ("after scratch:"); mpn_dump (scratch + itch, 1); + printf ("keep: "); mpn_dump (&s_after, 1); + } + mpn_dump (ap, an); + mpn_dump (pp, rn); + mpn_dump (refp, rn); + + abort(); + } + } + TMP_FREE; + tests_end (); + return 0; +} diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom22.c gmp-5.0.2+dfsg/tests/mpn/t-toom22.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom22.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom22.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,10 @@ +#define mpn_toomMN_mul mpn_toom22_mul +#define mpn_toomMN_mul_itch mpn_toom22_mul_itch +#define MIN_AN 2 + +#define MIN_BN(an) \ + ((an) >= 2*MUL_TOOM22_THRESHOLD \ + ? (an) + 2 - MUL_TOOM22_THRESHOLD \ + : ((an)+1)/2 + 1) + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom32.c gmp-5.0.2+dfsg/tests/mpn/t-toom32.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom32.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom32.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,8 @@ +#define mpn_toomMN_mul mpn_toom32_mul +#define mpn_toomMN_mul_itch mpn_toom32_mul_itch + +#define MIN_AN 6 +#define MIN_BN(an) (((an) + 8) / (size_t) 3) +#define MAX_BN(an) ((an) - 2) + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom33.c gmp-5.0.2+dfsg/tests/mpn/t-toom33.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom33.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom33.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,11 @@ +#define mpn_toomMN_mul mpn_toom33_mul +#define mpn_toomMN_mul_itch mpn_toom33_mul_itch + +/* Smaller sizes not supported; may lead to recursive calls to + toom22_mul with invalid input size. */ +#define MIN_AN MUL_TOOM33_THRESHOLD +#define MIN_BN(an) (1 + 2*(((an)+2)/(size_t) 3)) + +#define COUNT 1000 + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom42.c gmp-5.0.2+dfsg/tests/mpn/t-toom42.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom42.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom42.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,8 @@ +#define mpn_toomMN_mul mpn_toom42_mul +#define mpn_toomMN_mul_itch mpn_toom42_mul_itch + +#define MIN_AN 10 +#define MIN_BN(an) (((an) + 7) >> 2) +#define MAX_BN(an) ((2*(an)-5) / (size_t) 3) + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom43.c gmp-5.0.2+dfsg/tests/mpn/t-toom43.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom43.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom43.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,8 @@ +#define mpn_toomMN_mul mpn_toom43_mul +#define mpn_toomMN_mul_itch mpn_toom43_mul_itch + +#define MIN_AN 25 +#define MIN_BN(an) (1 + 2*(((an)+3) >> 2)) +#define MAX_BN(an) ((an)-3) + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom44.c gmp-5.0.2+dfsg/tests/mpn/t-toom44.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom44.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom44.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,11 @@ +#define mpn_toomMN_mul mpn_toom44_mul +#define mpn_toomMN_mul_itch mpn_toom44_mul_itch + +/* Smaller sizes not supported; may lead to recursive calls to + toom22_mul or toom33_mul with invalid input size. */ +#define MIN_AN MUL_TOOM44_THRESHOLD +#define MIN_BN(an) (1 + 3*(((an)+3)>>2)) + +#define COUNT 1000 + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom52.c gmp-5.0.2+dfsg/tests/mpn/t-toom52.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom52.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom52.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,8 @@ +#define mpn_toomMN_mul mpn_toom52_mul +#define mpn_toomMN_mul_itch mpn_toom52_mul_itch + +#define MIN_AN 32 +#define MIN_BN(an) (((an) + 9) / (size_t) 5) +#define MAX_BN(an) (((an) - 3) >> 1) + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom53.c gmp-5.0.2+dfsg/tests/mpn/t-toom53.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom53.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom53.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,8 @@ +#define mpn_toomMN_mul mpn_toom53_mul +#define mpn_toomMN_mul_itch mpn_toom53_mul_itch + +#define MIN_AN 17 +#define MIN_BN(an) (1 + 2*(((an) + 4) / (size_t) 5)) +#define MAX_BN(an) ((3*(an) - 11) >> 2) + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom62.c gmp-5.0.2+dfsg/tests/mpn/t-toom62.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom62.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom62.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,8 @@ +#define mpn_toomMN_mul mpn_toom62_mul +#define mpn_toomMN_mul_itch mpn_toom62_mul_itch + +#define MIN_AN 31 +#define MIN_BN(an) (((an) + 11) / (size_t) 6) +#define MAX_BN(an) ((2*(an) - 7) / (size_t) 5) + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom63.c gmp-5.0.2+dfsg/tests/mpn/t-toom63.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom63.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom63.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,8 @@ +#define mpn_toomMN_mul mpn_toom63_mul +#define mpn_toomMN_mul_itch mpn_toom63_mul_itch + +#define MIN_AN 49 +#define MIN_BN(an) (2*(((an) + 23) / (size_t) 6)) /* 2/6 */ +#define MAX_BN(an) ((3*(an) - 23) / (size_t) 5) /* 3/5 */ + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom6h.c gmp-5.0.2+dfsg/tests/mpn/t-toom6h.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom6h.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom6h.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,9 @@ +#define mpn_toomMN_mul mpn_toom6h_mul +#define mpn_toomMN_mul_itch mpn_toom6h_mul_itch + +/* Smaller sizes not supported; may lead to recursive calls to + toom22_mul, toom33_mul, or toom44_mul with invalid input size. */ +#define MIN_AN MUL_TOOM6H_THRESHOLD +#define MIN_BN(an) (MAX ((an*3)>>3, 42) ) + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpn/t-toom8h.c gmp-5.0.2+dfsg/tests/mpn/t-toom8h.c --- gmp-4.3.2+dfsg/tests/mpn/t-toom8h.c 1970-01-01 00:00:00.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpn/t-toom8h.c 2011-05-08 09:49:29.000000000 +0000 @@ -0,0 +1,22 @@ +#define mpn_toomMN_mul mpn_toom8h_mul +#define mpn_toomMN_mul_itch mpn_toom8h_mul_itch + +/* Smaller sizes not supported; may lead to recursive calls to + toom{22,33,44,6h}_mul with invalid input size. */ +#define MIN_AN MUL_TOOM8H_THRESHOLD + +#if GMP_NUMB_BITS <= 10*3 +#define MIN_BN(an) (MAX ((an*6)/10, 86) ) +#else +#if GMP_NUMB_BITS <= 11*3 +#define MIN_BN(an) (MAX ((an*5)/11, 86) ) +#else +#if GMP_NUMB_BITS <= 12*3 +#define MIN_BN(an) (MAX ((an*4)/12, 86) ) +#else +#define MIN_BN(an) (MAX ((an*4)/13, 86) ) +#endif +#endif +#endif + +#include "toom-shared.h" diff -Nru gmp-4.3.2+dfsg/tests/mpq/Makefile.in gmp-5.0.2+dfsg/tests/mpq/Makefile.in --- gmp-4.3.2+dfsg/tests/mpq/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpq/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -153,7 +153,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -177,10 +176,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -220,6 +218,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -253,10 +252,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -286,7 +285,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/tests/mpq/t-get_str.c gmp-5.0.2+dfsg/tests/mpq/t-get_str.c --- gmp-4.3.2+dfsg/tests/mpq/t-get_str.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpq/t-get_str.c 2011-05-08 09:49:29.000000000 +0000 @@ -65,8 +65,8 @@ { printf ("mpq_get_str wrong return value (passing non-NULL)\n"); printf (" base %d\n", base); - printf (" got 0x%lX\n", (unsigned long) ret); - printf (" want 0x%lX\n", (unsigned long) want); + printf (" got %p\n", ret); + printf (" want %p\n", want); abort (); } if (strcmp (str, want) != 0) diff -Nru gmp-4.3.2+dfsg/tests/mpz/bit.c gmp-5.0.2+dfsg/tests/mpz/bit.c --- gmp-4.3.2+dfsg/tests/mpz/bit.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/bit.c 2011-05-08 09:49:29.000000000 +0000 @@ -165,7 +165,7 @@ if (low1) pos[0] |= 1; - refmpn_neg_n (neg, pos, (mp_size_t) numberof(neg)); + refmpn_neg (neg, pos, (mp_size_t) numberof(neg)); mpz_set_n (z, neg, (mp_size_t) numberof(neg)); mpz_neg (z, z); @@ -207,7 +207,7 @@ { mpz_set_si (x, (long) initial); - bit = (unsigned long) limb*BITS_PER_MP_LIMB + offset; + bit = (unsigned long) limb*GMP_LIMB_BITS + offset; mpz_clrbit (x, bit); MPZ_CHECK_FORMAT (x); diff -Nru gmp-4.3.2+dfsg/tests/mpz/convert.c gmp-5.0.2+dfsg/tests/mpz/convert.c --- gmp-4.3.2+dfsg/tests/mpz/convert.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/convert.c 2011-05-08 09:49:29.000000000 +0000 @@ -78,13 +78,12 @@ size_t len; tests_start (); + TESTS_REPS (reps, argv, argc); + rands = RANDS; mpz_init (bs); - if (argc == 2) - reps = atoi (argv[1]); - mpz_init (op1); mpz_init (op2); @@ -93,8 +92,8 @@ /* 1. Generate random mpz_t and convert to a string and back to mpz_t again. */ mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 15 + 2; /* 2..16 */ - mpz_urandomb (bs, rands, size_range); /* 3..65536 bits */ + size_range = mpz_get_ui (bs) % 17 + 2; /* 2..18 */ + mpz_urandomb (bs, rands, size_range); /* 3..262144 bits */ size = mpz_get_ui (bs); mpz_rrandomb (op1, rands, size); @@ -127,8 +126,8 @@ /* 2. Generate random string and convert to mpz_t and back to a string again. */ mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 14 + 1; /* 1..14 */ - mpz_urandomb (bs, rands, size_range); /* 1..16384 digits */ + size_range = mpz_get_ui (bs) % 16 + 1; /* 1..16 */ + mpz_urandomb (bs, rands, size_range); /* 1..65536 digits */ len = mpz_get_ui (bs) + 1; buf = (*__gmp_allocate_func) (len + 1); if (base == 0) diff -Nru gmp-4.3.2+dfsg/tests/mpz/dive.c gmp-5.0.2+dfsg/tests/mpz/dive.c --- gmp-4.3.2+dfsg/tests/mpz/dive.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/dive.c 2011-05-08 09:49:29.000000000 +0000 @@ -31,21 +31,20 @@ mpz_t prod, quot; mp_size_t size; int i; - int reps = 200000; + int reps = 5000; gmp_randstate_ptr rands; mpz_t bs; unsigned long bsi, size_range; tests_start (); + TESTS_REPS (reps, argv, argc); + rands = RANDS; mp_trace_base = -16; mpz_init (bs); - if (argc == 2) - reps = atoi (argv[1]); - mpz_init (op1); mpz_init (op2); mpz_init (prod); @@ -54,7 +53,7 @@ for (i = 0; i < reps; i++) { mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 10 + 2; /* 0..2047 bit operands */ + size_range = mpz_get_ui (bs) % 17 + 2; /* 0..2047 bit operands */ mpz_urandomb (bs, rands, size_range); size = mpz_get_ui (bs); diff -Nru gmp-4.3.2+dfsg/tests/mpz/Makefile.in gmp-5.0.2+dfsg/tests/mpz/Makefile.in --- gmp-4.3.2+dfsg/tests/mpz/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -421,7 +421,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -445,10 +444,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -488,6 +486,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -521,10 +520,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -554,7 +553,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/tests/mpz/reuse.c gmp-5.0.2+dfsg/tests/mpz/reuse.c --- gmp-4.3.2+dfsg/tests/mpz/reuse.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/reuse.c 2011-05-08 09:49:29.000000000 +0000 @@ -6,7 +6,7 @@ mpz_mul_si mpz_addmul_ui (should this really allow a+=a*c?) -Copyright 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. +Copyright 1996, 1999, 2000, 2001, 2002, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -180,11 +180,12 @@ #endif + int main (int argc, char **argv) { int i; - int pass, reps = 1000; + int pass, reps = 100; mpz_t in1, in2, in3; unsigned long int in2i; mp_size_t size; @@ -198,13 +199,12 @@ unsigned long bsi, size_range; tests_start (); + TESTS_REPS (reps, argv, argc); + rands = RANDS; mpz_init (bs); - if (argc == 2) - reps = atoi (argv[1]); - mpz_init (in1); mpz_init (in2); mpz_init (in3); @@ -219,7 +219,7 @@ for (pass = 1; pass <= reps; pass++) { mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 12 + 2; + size_range = mpz_get_ui (bs) % 17 + 2; mpz_urandomb (bs, rands, size_range); size = mpz_get_ui (bs); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-aorsmul.c gmp-5.0.2+dfsg/tests/mpz/t-aorsmul.c --- gmp-4.3.2+dfsg/tests/mpz/t-aorsmul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-aorsmul.c 2011-05-08 09:49:29.000000000 +0000 @@ -388,14 +388,14 @@ for (i = 0; i < reps; i++) { - mpz_errandomb (w, rands, 5*BITS_PER_MP_LIMB); - mpz_errandomb (x, rands, 5*BITS_PER_MP_LIMB); - mpz_errandomb (y, rands, 5*BITS_PER_MP_LIMB); + mpz_errandomb (w, rands, 5*GMP_LIMB_BITS); + mpz_errandomb (x, rands, 5*GMP_LIMB_BITS); + mpz_errandomb (y, rands, 5*GMP_LIMB_BITS); check_all (w, x, y); check_all_inplace (w, y); - mpz_errandomb (w, rands, 5*BITS_PER_MP_LIMB); - mpz_errandomb (x, rands, 5*BITS_PER_MP_LIMB); + mpz_errandomb (w, rands, 5*GMP_LIMB_BITS); + mpz_errandomb (x, rands, 5*GMP_LIMB_BITS); mpz_errandomb (y, rands, BITS_PER_ULONG); check_all (w, x, y); check_all_inplace (w, y); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-cong_2exp.c gmp-5.0.2+dfsg/tests/mpz/t-cong_2exp.c --- gmp-4.3.2+dfsg/tests/mpz/t-cong_2exp.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-cong_2exp.c 2011-05-08 09:49:29.000000000 +0000 @@ -124,12 +124,12 @@ for (i = 0; i < reps; i++) { - mpz_errandomb (a, rands, 8*BITS_PER_MP_LIMB); - mpz_errandomb (c, rands, 8*BITS_PER_MP_LIMB); - d = urandom() % (8*BITS_PER_MP_LIMB); + mpz_errandomb (a, rands, 8*GMP_LIMB_BITS); + mpz_errandomb (c, rands, 8*GMP_LIMB_BITS); + d = urandom() % (8*GMP_LIMB_BITS); - mpz_mul_2exp (a, a, urandom() % (2*BITS_PER_MP_LIMB)); - mpz_mul_2exp (c, c, urandom() % (2*BITS_PER_MP_LIMB)); + mpz_mul_2exp (a, a, urandom() % (2*GMP_LIMB_BITS)); + mpz_mul_2exp (c, c, urandom() % (2*GMP_LIMB_BITS)); mpz_negrandom (a, rands); mpz_negrandom (c, rands); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-cong.c gmp-5.0.2+dfsg/tests/mpz/t-cong.c --- gmp-4.3.2+dfsg/tests/mpz/t-cong.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-cong.c 2011-05-08 09:49:29.000000000 +0000 @@ -146,11 +146,11 @@ for (i = 0; i < reps; i++) { - mpz_errandomb (a, rands, 8*BITS_PER_MP_LIMB); + mpz_errandomb (a, rands, 8*GMP_LIMB_BITS); MPZ_CHECK_FORMAT (a); - mpz_errandomb (c, rands, 8*BITS_PER_MP_LIMB); + mpz_errandomb (c, rands, 8*GMP_LIMB_BITS); MPZ_CHECK_FORMAT (c); - mpz_errandomb_nonzero (d, rands, 8*BITS_PER_MP_LIMB); + mpz_errandomb_nonzero (d, rands, 8*GMP_LIMB_BITS); mpz_negrandom (a, rands); MPZ_CHECK_FORMAT (a); @@ -171,7 +171,7 @@ if (! mpz_pow2abs_p (d)) { - refmpz_combit (a, urandom() % (8*BITS_PER_MP_LIMB)); + refmpz_combit (a, urandom() % (8*GMP_LIMB_BITS)); check_one (a, c, d, 0); } } diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-divis.c gmp-5.0.2+dfsg/tests/mpz/t-divis.c --- gmp-4.3.2+dfsg/tests/mpz/t-divis.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-divis.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,6 @@ -/* test mpz_divisible_p and mpz_divisible_ui_p */ +/* test mpz_divisible_p and mpz_divisible_ui_p -/* -Copyright 2001 Free Software Foundation, Inc. +Copyright 2001, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -125,8 +124,8 @@ for (i = 0; i < reps; i++) { - mpz_erandomb (a, rands, 512); - mpz_erandomb_nonzero (d, rands, 512); + mpz_erandomb (a, rands, 1 << 19); + mpz_erandomb_nonzero (d, rands, 1 << 18); mpz_fdiv_r (r, a, d); @@ -152,7 +151,7 @@ int main (int argc, char *argv[]) { - int reps = 1000; + int reps = 100; tests_start (); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-fac_ui.c gmp-5.0.2+dfsg/tests/mpz/t-fac_ui.c --- gmp-4.3.2+dfsg/tests/mpz/t-fac_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-fac_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -65,7 +65,7 @@ abort (); } - mpz_mul_ui (f, f, n+1); /* (n+1)! = n! * n */ + mpz_mul_ui (f, f, n+1); /* (n+1)! = n! * (n+1) */ } mpz_clear (f); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-fib_ui.c gmp-5.0.2+dfsg/tests/mpz/t-fib_ui.c --- gmp-4.3.2+dfsg/tests/mpz/t-fib_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-fib_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -73,7 +73,7 @@ main (int argc, char *argv[]) { unsigned long n; - unsigned long limit = 100 * BITS_PER_MP_LIMB; + unsigned long limit = 100 * GMP_LIMB_BITS; mpz_t want_fn, want_fn1, got_fn, got_fn1; tests_start (); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-fits.c gmp-5.0.2+dfsg/tests/mpz/t-fits.c --- gmp-4.3.2+dfsg/tests/mpz/t-fits.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-fits.c 2011-05-08 09:49:29.000000000 +0000 @@ -84,7 +84,7 @@ EXPECT (mpz_fits_sshort_p, 1); mpz_set_ui (z, 1L); - mpz_mul_2exp (z, z, 5L*BITS_PER_MP_LIMB); + mpz_mul_2exp (z, z, 5L*GMP_LIMB_BITS); expr = "2^(5*BPML)"; EXPECT (mpz_fits_ulong_p, 0); EXPECT (mpz_fits_uint_p, 0); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-gcd.c gmp-5.0.2+dfsg/tests/mpz/t-gcd.c --- gmp-4.3.2+dfsg/tests/mpz/t-gcd.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-gcd.c 2011-05-08 09:49:29.000000000 +0000 @@ -108,12 +108,11 @@ gmp_randstate_ptr rands; mpz_t bs; unsigned long bsi, size_range; - int reps = 100; - - if (argc == 2) - reps = atoi (argv[1]); + int reps = 200; tests_start (); + TESTS_REPS (reps, argv, argc); + rands = RANDS; check_data (); @@ -152,7 +151,7 @@ of that other ASSERTs are triggered before it. */ mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 13 + 2; + size_range = mpz_get_ui (bs) % 17 + 2; mpz_urandomb (bs, rands, size_range); mpz_urandomb (op1, rands, mpz_get_ui (bs) + MIN_OPERAND_BITSIZE); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-io_raw.c gmp-5.0.2+dfsg/tests/mpz/t-io_raw.c --- gmp-4.3.2+dfsg/tests/mpz/t-io_raw.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-io_raw.c 2011-05-08 09:49:29.000000000 +0000 @@ -233,7 +233,7 @@ for (i = 0; i < 500; i++) { - mpz_erandomb (want, rands, 10*BITS_PER_MP_LIMB); + mpz_erandomb (want, rands, 10*GMP_LIMB_BITS); mpz_negrandom (want, rands); fp = fopen_wplusb_or_die (FILENAME); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-lucnum_ui.c gmp-5.0.2+dfsg/tests/mpz/t-lucnum_ui.c --- gmp-4.3.2+dfsg/tests/mpz/t-lucnum_ui.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-lucnum_ui.c 2011-05-08 09:49:29.000000000 +0000 @@ -35,7 +35,7 @@ check_sequence (int argc, char *argv[]) { unsigned long n; - unsigned long limit = 100 * BITS_PER_MP_LIMB; + unsigned long limit = 100 * GMP_LIMB_BITS; mpz_t want_ln, want_ln1, got_ln, got_ln1; if (argc > 1 && argv[1][0] == 'x') diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-mul.c gmp-5.0.2+dfsg/tests/mpz/t-mul.c --- gmp-4.3.2+dfsg/tests/mpz/t-mul.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-mul.c 2011-05-08 09:49:29.000000000 +0000 @@ -27,8 +27,7 @@ #include "tests.h" void debug_mp __GMP_PROTO ((mpz_t)); -static void ref_mpn_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); -static void ref_mpz_mul __GMP_PROTO ((mpz_t, const mpz_t, const mpz_t)); +static void refmpz_mul __GMP_PROTO ((mpz_t, const mpz_t, const mpz_t)); void dump_abort __GMP_PROTO ((int, char *, mpz_t, mpz_t, mpz_t, mpz_t)); #define FFT_MIN_BITSIZE 100000 @@ -39,15 +38,13 @@ one (int i, mpz_t multiplicand, mpz_t multiplier) { mpz_t product, ref_product; - mpz_t quotient; mpz_init (product); mpz_init (ref_product); - mpz_init (quotient); /* Test plain multiplication comparing results against reference code. */ mpz_mul (product, multiplier, multiplicand); - ref_mpz_mul (ref_product, multiplier, multiplicand); + refmpz_mul (ref_product, multiplier, multiplicand); if (mpz_cmp (product, ref_product)) dump_abort (i, "incorrect plain product", multiplier, multiplicand, product, ref_product); @@ -62,7 +59,6 @@ mpz_clear (product); mpz_clear (ref_product); - mpz_clear (quotient); } int @@ -141,7 +137,7 @@ } static void -ref_mpz_mul (mpz_t w, const mpz_t u, const mpz_t v) +refmpz_mul (mpz_t w, const mpz_t u, const mpz_t v) { mp_size_t usize = u->_mp_size; mp_size_t vsize = v->_mp_size; @@ -169,9 +165,9 @@ wp = __GMP_ALLOCATE_FUNC_LIMBS (talloc); if (usize > vsize) - ref_mpn_mul (wp, up, usize, vp, vsize); + refmpn_mul (wp, up, usize, vp, vsize); else - ref_mpn_mul (wp, vp, vsize, up, usize); + refmpn_mul (wp, vp, vsize, up, usize); wsize = usize + vsize; wsize -= wp[wsize - 1] == 0; MPZ_REALLOC (w, wsize); @@ -181,121 +177,6 @@ __GMP_FREE_FUNC_LIMBS (wp, talloc); } -static void mul_basecase __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); - -#define TOOM3_THRESHOLD (MAX (MUL_TOOM3_THRESHOLD, SQR_TOOM3_THRESHOLD)) -#define FFT_THRESHOLD (MAX (MUL_FFT_THRESHOLD, SQR_FFT_THRESHOLD)) - -static void -ref_mpn_mul (mp_ptr wp, mp_srcptr up, mp_size_t un, mp_srcptr vp, mp_size_t vn) -{ - mp_ptr tp; - mp_size_t tn; - mp_limb_t cy; - - if (vn < TOOM3_THRESHOLD) - { - /* In the mpn_mul_basecase and mpn_kara_mul_n range, use our own - mul_basecase. */ - if (vn != 0) - mul_basecase (wp, up, un, vp, vn); - else - MPN_ZERO (wp, un); - return; - } - - if (vn < FFT_THRESHOLD) - { - /* In the mpn_toom3_mul_n range, use mpn_kara_mul_n. */ - tn = 2 * vn + MPN_KARA_MUL_N_TSIZE (vn); - tp = __GMP_ALLOCATE_FUNC_LIMBS (tn); - mpn_kara_mul_n (tp, up, vp, vn, tp + 2 * vn); - } - else - { - /* Finally, for the largest operands, use mpn_toom3_mul_n. */ - /* The "- 63 + 255" tweaks the allocation to allow for huge operands. - See the definition of this macro in gmp-impl.h to understand this. */ - tn = 2 * vn + MPN_TOOM3_MUL_N_TSIZE (vn) - 63 + 255; - tp = __GMP_ALLOCATE_FUNC_LIMBS (tn); - mpn_toom3_mul_n (tp, up, vp, vn, tp + 2 * vn); - } - - if (un != vn) - { - if (un - vn < vn) - ref_mpn_mul (wp + vn, vp, vn, up + vn, un - vn); - else - ref_mpn_mul (wp + vn, up + vn, un - vn, vp, vn); - - MPN_COPY (wp, tp, vn); - cy = mpn_add_n (wp + vn, wp + vn, tp + vn, vn); - mpn_incr_u (wp + 2 * vn, cy); - } - else - { - MPN_COPY (wp, tp, 2 * vn); - } - - __GMP_FREE_FUNC_LIMBS (tp, tn); -} - -static void -mul_basecase (mp_ptr wp, mp_srcptr up, mp_size_t un, mp_srcptr vp, mp_size_t vn) -{ - mp_size_t i, j; - mp_limb_t prod_low, prod_high; - mp_limb_t cy_dig; - mp_limb_t v_limb; - - /* Multiply by the first limb in V separately, as the result can - be stored (not added) to PROD. We also avoid a loop for zeroing. */ - v_limb = vp[0]; - cy_dig = 0; - for (j = un; j > 0; j--) - { - mp_limb_t u_limb, w_limb; - u_limb = *up++; - umul_ppmm (prod_high, prod_low, u_limb, v_limb << GMP_NAIL_BITS); - add_ssaaaa (cy_dig, w_limb, prod_high, prod_low, 0, cy_dig << GMP_NAIL_BITS); - *wp++ = w_limb >> GMP_NAIL_BITS; - } - - *wp++ = cy_dig; - wp -= un; - up -= un; - - /* For each iteration in the outer loop, multiply one limb from - U with one limb from V, and add it to PROD. */ - for (i = 1; i < vn; i++) - { - v_limb = vp[i]; - cy_dig = 0; - - for (j = un; j > 0; j--) - { - mp_limb_t u_limb, w_limb; - u_limb = *up++; - umul_ppmm (prod_high, prod_low, u_limb, v_limb << GMP_NAIL_BITS); - w_limb = *wp; - add_ssaaaa (prod_high, prod_low, prod_high, prod_low, 0, w_limb << GMP_NAIL_BITS); - prod_low >>= GMP_NAIL_BITS; - prod_low += cy_dig; -#if GMP_NAIL_BITS == 0 - cy_dig = prod_high + (prod_low < cy_dig); -#else - cy_dig = prod_high; - cy_dig += prod_low >> GMP_NUMB_BITS; -#endif - *wp++ = prod_low & GMP_NUMB_MASK; - } - - *wp++ = cy_dig; - wp -= un; - up -= un; - } -} - void dump_abort (int i, char *s, mpz_t op1, mpz_t op2, mpz_t product, mpz_t ref_product) diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-perfpow.c gmp-5.0.2+dfsg/tests/mpz/t-perfpow.c --- gmp-4.3.2+dfsg/tests/mpz/t-perfpow.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-perfpow.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,8 @@ /* Test mpz_perfect_power_p. -Copyright 2008 Free Software Foundation, Inc. + Contributed to the GNU project by Torbjorn Granlund and Martin Boij. + +Copyright 2008, 2009, 2010 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -100,44 +102,125 @@ mpz_clear (x); } +#define NRP 15 + void -check_random (int n_tests) +check_random (int reps) { - int test; - mpz_t bs, op1, op2, x; + mpz_t n, np, temp, primes[NRP]; + int i, j, k, unique, destroy, res; + unsigned long int nrprimes, primebits; + mp_limb_t g, exp[NRP], e; gmp_randstate_ptr rands; - unsigned long ex; rands = RANDS; - mpz_init (bs); - mpz_init (op1); - mpz_init (op2); - mpz_init (x); + mpz_init (n); + mpz_init (np); + mpz_init (temp); - for (test = 0; test < n_tests; test++) + for (i = 0; i < NRP; i++) + mpz_init (primes[i]); + + for (i = 0; i < reps; i++) { - mpz_urandomb (bs, rands, 32); - mpz_rrandomb (op1, rands, mpz_get_ui (bs) % 32); - if (test & 1) - mpz_neg (op1, op1); - mpz_rrandomb (op2, rands, (mpz_get_ui (bs) >> 5) % 8); + mpz_urandomb (np, rands, 32); + nrprimes = mpz_get_ui (np) % NRP + 1; /* 1-NRP unique primes */ - ex = mpz_get_ui (op2) + 2; - mpz_pow_ui (x, op1, ex); + mpz_urandomb (np, rands, 32); + g = mpz_get_ui (np) % 32 + 2; /* gcd 2-33 */ - if (! mpz_perfect_power_p (x)) + for (j = 0; j < nrprimes;) { - gmp_fprintf (stderr, "mpz_perfect_power_p rejects perfect power %Zd^%ld\n", op1, ex); - gmp_fprintf (stderr, "fault operand: %Zx\n", x); - abort (); + mpz_urandomb (np, rands, 32); + primebits = mpz_get_ui (np) % 100 + 3; /* 3-102 bit primes */ + mpz_urandomb (primes[j], rands, primebits); + mpz_nextprime (primes[j], primes[j]); + unique = 1; + for (k = 0; k < j; k++) + { + if (mpz_cmp (primes[j], primes[k]) == 0) + { + unique = 0; + break; + } + } + if (unique) + { + mpz_urandomb (np, rands, 32); + e = 371 / (10 * primebits) + mpz_get_ui (np) % 11 + 1; /* Magic constants */ + exp[j++] = g * e; + } + } + + if (nrprimes > 1) + { + /* Destroy d exponents, d in [1, nrprimes - 1] */ + if (nrprimes == 2) + { + destroy = 1; + } + else + { + mpz_urandomb (np, rands, 32); + destroy = mpz_get_ui (np) % (nrprimes - 2) + 1; + } + + g = exp[destroy]; + for (k = destroy + 1; k < nrprimes; k++) + g = mpn_gcd_1 (&g, 1, exp[k]); + + for (j = 0; j < destroy; j++) + { + mpz_urandomb (np, rands, 32); + e = mpz_get_ui (np) % 50 + 1; + while (mpn_gcd_1 (&g, 1, e) > 1) + e++; + + exp[j] = e; + } + } + + /* Compute n */ + mpz_pow_ui (n, primes[0], exp[0]); + for (j = 1; j < nrprimes; j++) + { + mpz_pow_ui (temp, primes[j], exp[j]); + mpz_mul (n, n, temp); + } + + res = mpz_perfect_power_p (n); + + if (nrprimes == 1) + { + if (res == 0 && exp[0] > 1) + { + printf("n is a perfect power, perfpow_p disagrees\n"); + gmp_printf("n = %Zu\nprimes[0] = %Zu\nexp[0] = %lu\n", n, primes[0], exp[0]); + abort (); + } + else if (res == 1 && exp[0] == 1) + { + gmp_printf("n = %Zu\n", n); + printf("n is now a prime number, but perfpow_p still believes n is a perfect power\n"); + abort (); + } + } + else + { + if (res == 1) + { + gmp_printf("n = %Zu\nn was destroyed, but perfpow_p still believes n is a perfect power\n", n); + abort (); + } } } - mpz_clear (bs); - mpz_clear (op1); - mpz_clear (op2); - mpz_clear (x); + mpz_clear (n); + mpz_clear (np); + mpz_clear (temp); + for (i = 0; i < NRP; i++) + mpz_clear (primes[i]); } int @@ -150,7 +233,7 @@ check_tests (); - n_tests = 100000; + n_tests = 1000; if (argc == 2) n_tests = atoi (argv[1]); check_random (n_tests); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-popcount.c gmp-5.0.2+dfsg/tests/mpz/t-popcount.c --- gmp-4.3.2+dfsg/tests/mpz/t-popcount.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-popcount.c 2011-05-08 09:49:29.000000000 +0000 @@ -32,7 +32,7 @@ unsigned long i, got; mpz_init (n); - for (i = 0; i < 5 * BITS_PER_MP_LIMB; i++) + for (i = 0; i < 5 * GMP_LIMB_BITS; i++) { mpz_setbit (n, i); got = mpz_popcount (n); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-powm.c gmp-5.0.2+dfsg/tests/mpz/t-powm.c --- gmp-4.3.2+dfsg/tests/mpz/t-powm.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-powm.c 2011-05-08 09:49:29.000000000 +0000 @@ -40,13 +40,12 @@ unsigned long bsi, size_range; tests_start (); + TESTS_REPS (reps, argv, argc); + rands = RANDS; mpz_init (bs); - if (argc == 2) - reps = atoi (argv[1]); - mpz_init (base); mpz_init (exp); mpz_init (mod); @@ -88,9 +87,6 @@ /* printf ("%ld %ld %ld\n", SIZ (base), SIZ (exp), SIZ (mod)); */ - mpz_powm (r1, base, exp, mod); - MPZ_CHECK_FORMAT (r1); - mpz_set_ui (r2, 1); mpz_mod (base2, base, mod); mpz_set (exp2, exp); @@ -110,6 +106,9 @@ mpz_tdiv_q_2exp (exp2, exp2, 1); } + mpz_powm (r1, base, exp, mod); + MPZ_CHECK_FORMAT (r1); + if (mpz_cmp (r1, r2) != 0) { fprintf (stderr, "\nIncorrect results in test %d for operands:\n", i); @@ -122,6 +121,25 @@ debug_mp (r2, -16); abort (); } + + if (mpz_tdiv_ui (mod, 2) == 0) + continue; + + mpz_powm_sec (r1, base, exp, mod); + MPZ_CHECK_FORMAT (r1); + + if (mpz_cmp (r1, r2) != 0) + { + fprintf (stderr, "\nIncorrect results in test %d for operands:\n", i); + debug_mp (base, -16); + debug_mp (exp, -16); + debug_mp (mod, -16); + fprintf (stderr, "mpz_powm_sec result:\n"); + debug_mp (r1, -16); + fprintf (stderr, "reference result:\n"); + debug_mp (r2, -16); + abort (); + } } mpz_clear (bs); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-root.c gmp-5.0.2+dfsg/tests/mpz/t-root.c --- gmp-4.3.2+dfsg/tests/mpz/t-root.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-root.c 2011-05-08 09:49:29.000000000 +0000 @@ -98,20 +98,19 @@ mpz_t root1; mp_size_t x2_size; int i; - int reps = 5000; + int reps = 500; unsigned long nth; gmp_randstate_ptr rands; mpz_t bs; unsigned long bsi, size_range; tests_start (); + TESTS_REPS (reps, argv, argc); + rands = RANDS; mpz_init (bs); - if (argc == 2) - reps = atoi (argv[1]); - mpz_init (x2); mpz_init (root1); @@ -123,7 +122,7 @@ for (i = 0; i < reps; i++) { mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 12 + 2; + size_range = mpz_get_ui (bs) % 17 + 2; mpz_urandomb (bs, rands, size_range); x2_size = mpz_get_ui (bs) + 10; diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-set_f.c gmp-5.0.2+dfsg/tests/mpz/t-set_f.c --- gmp-4.3.2+dfsg/tests/mpz/t-set_f.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-set_f.c 2011-05-08 09:49:29.000000000 +0000 @@ -28,7 +28,7 @@ check_one (mpz_srcptr z) { static const int shift[] = { - 0, 1, BITS_PER_MP_LIMB, 2*BITS_PER_MP_LIMB, 5*BITS_PER_MP_LIMB + 0, 1, GMP_LIMB_BITS, 2*GMP_LIMB_BITS, 5*GMP_LIMB_BITS }; int sh, shneg, neg; @@ -101,10 +101,10 @@ mpz_set_si (z, 123L); check_one (z); - mpz_rrandomb (z, RANDS, 2*BITS_PER_MP_LIMB); + mpz_rrandomb (z, RANDS, 2*GMP_LIMB_BITS); check_one (z); - mpz_rrandomb (z, RANDS, 5*BITS_PER_MP_LIMB); + mpz_rrandomb (z, RANDS, 5*GMP_LIMB_BITS); check_one (z); mpz_clear (z); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-sqrtrem.c gmp-5.0.2+dfsg/tests/mpz/t-sqrtrem.c --- gmp-4.3.2+dfsg/tests/mpz/t-sqrtrem.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-sqrtrem.c 2011-05-08 09:49:29.000000000 +0000 @@ -36,19 +36,18 @@ mpz_t temp, temp2; mp_size_t x2_size; int i; - int reps = 200000; + int reps = 1000; gmp_randstate_ptr rands; mpz_t bs; unsigned long size_range; tests_start (); + TESTS_REPS (reps, argv, argc); + rands = RANDS; mpz_init (bs); - if (argc == 2) - reps = atoi (argv[1]); - mpz_init (x2); mpz_init (x); mpz_init (rem); @@ -58,7 +57,7 @@ for (i = 0; i < reps; i++) { mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 12 + 2; /* 0..8191 bit operands */ + size_range = mpz_get_ui (bs) % 17 + 2; /* 0..262144 bit operands */ mpz_urandomb (bs, rands, size_range); x2_size = mpz_get_ui (bs); diff -Nru gmp-4.3.2+dfsg/tests/mpz/t-tdiv.c gmp-5.0.2+dfsg/tests/mpz/t-tdiv.c --- gmp-4.3.2+dfsg/tests/mpz/t-tdiv.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/mpz/t-tdiv.c 2011-05-08 09:49:29.000000000 +0000 @@ -43,13 +43,12 @@ unsigned long bsi, size_range; tests_start (); + TESTS_REPS (reps, argv, argc); + rands = RANDS; mpz_init (bs); - if (argc == 2) - reps = atoi (argv[1]); - mpz_init (dividend); mpz_init (divisor); mpz_init (quotient); @@ -61,7 +60,7 @@ for (i = 0; i < reps; i++) { mpz_urandomb (bs, rands, 32); - size_range = mpz_get_ui (bs) % 16 + 2; /* 0..131071 bit operands */ + size_range = mpz_get_ui (bs) % 18 + 2; /* 0..524288 bit operands */ do { diff -Nru gmp-4.3.2+dfsg/tests/rand/findlc.c gmp-5.0.2+dfsg/tests/rand/findlc.c --- gmp-4.3.2+dfsg/tests/rand/findlc.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/rand/findlc.c 2011-05-08 09:49:29.000000000 +0000 @@ -47,7 +47,7 @@ signal (SIGSEGV, SIG_DFL); } -/* Input is a modulus (m). We shall find multiplyer (a) and adder (c) +/* Input is a modulus (m). We shall find multiplier (a) and adder (c) conforming to the rules found in the first comment block in file mpz/urandom.c. diff -Nru gmp-4.3.2+dfsg/tests/rand/gen.c gmp-5.0.2+dfsg/tests/rand/gen.c --- gmp-4.3.2+dfsg/tests/rand/gen.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/rand/gen.c 2011-05-08 09:49:29.000000000 +0000 @@ -277,7 +277,7 @@ case RFUNC_mpf_urandomb: #if 0 /* Don't init a too small generator. */ - size = PREC (f1) * BITS_PER_MP_LIMB; + size = PREC (f1) * GMP_LIMB_BITS; /* Fall through. */ #endif case RFUNC_mpz_urandomb: diff -Nru gmp-4.3.2+dfsg/tests/rand/Makefile.in gmp-5.0.2+dfsg/tests/rand/Makefile.in --- gmp-4.3.2+dfsg/tests/rand/Makefile.in 2010-01-09 06:26:22.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/rand/Makefile.in 2011-08-30 01:19:40.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -162,7 +162,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -186,10 +185,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -229,6 +227,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -262,10 +261,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -295,7 +294,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ diff -Nru gmp-4.3.2+dfsg/tests/rand/statlib.c gmp-5.0.2+dfsg/tests/rand/statlib.c --- gmp-4.3.2+dfsg/tests/rand/statlib.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/rand/statlib.c 2011-05-08 09:49:29.000000000 +0000 @@ -298,7 +298,7 @@ X[] must not contain numbers outside the range 0 <= X <= IMAX. - Return value is number of observations actally used, after + Return value is number of observations actually used, after discarding entries out of range. Since X[] contains integers between zero and IMAX, inclusive, we diff -Nru gmp-4.3.2+dfsg/tests/refmpf.c gmp-5.0.2+dfsg/tests/refmpf.c --- gmp-4.3.2+dfsg/tests/refmpf.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/refmpf.c 2011-05-08 09:49:29.000000000 +0000 @@ -40,7 +40,7 @@ if (SIZ (u) == 0) { size = ABSIZ (v); - wt = (mp_ptr) TMP_ALLOC ((size+1) * BYTES_PER_MP_LIMB); + wt = TMP_ALLOC_LIMBS (size + 1); MPN_COPY (wt, PTR (v), size); exp = EXP (v); neg = SIZ (v) < 0; @@ -49,7 +49,7 @@ if (SIZ (v) == 0) { size = ABSIZ (u); - wt = (mp_ptr) TMP_ALLOC ((size+1) * BYTES_PER_MP_LIMB); + wt = TMP_ALLOC_LIMBS (size + 1); MPN_COPY (wt, PTR (u), size); exp = EXP (u); neg = SIZ (u) < 0; @@ -70,9 +70,9 @@ hi = MAX (EXP (u), EXP (v)); lo = MIN (EXP (u) - ABSIZ (u), EXP (v) - ABSIZ (v)); size = hi - lo; - ut = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); - vt = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); - wt = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); + ut = TMP_ALLOC_LIMBS (size + 1); + vt = TMP_ALLOC_LIMBS (size + 1); + wt = TMP_ALLOC_LIMBS (size + 1); MPN_ZERO (ut, size); MPN_ZERO (vt, size); {int off; @@ -211,7 +211,7 @@ if (SIZ (u) == 0) { size = ABSIZ (v); - wt = (mp_ptr) TMP_ALLOC ((size+1) * BYTES_PER_MP_LIMB); + wt = TMP_ALLOC_LIMBS (size + 1); MPN_COPY (wt, PTR (v), size); exp = EXP (v); neg = SIZ (v) > 0; @@ -220,7 +220,7 @@ if (SIZ (v) == 0) { size = ABSIZ (u); - wt = (mp_ptr) TMP_ALLOC ((size+1) * BYTES_PER_MP_LIMB); + wt = TMP_ALLOC_LIMBS (size + 1); MPN_COPY (wt, PTR (u), size); exp = EXP (u); neg = SIZ (u) < 0; @@ -243,9 +243,9 @@ hi = MAX (EXP (u), EXP (v)); lo = MIN (EXP (u) - ABSIZ (u), EXP (v) - ABSIZ (v)); size = hi - lo; - ut = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); - vt = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); - wt = (mp_ptr) TMP_ALLOC ((size + 1) * BYTES_PER_MP_LIMB); + ut = TMP_ALLOC_LIMBS (size + 1); + vt = TMP_ALLOC_LIMBS (size + 1); + wt = TMP_ALLOC_LIMBS (size + 1); MPN_ZERO (ut, size); MPN_ZERO (vt, size); {int off; diff -Nru gmp-4.3.2+dfsg/tests/refmpn.c gmp-5.0.2+dfsg/tests/refmpn.c --- gmp-4.3.2+dfsg/tests/refmpn.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/refmpn.c 2011-05-08 09:49:29.000000000 +0000 @@ -2,7 +2,7 @@ of the normal gmp code. Speed isn't a consideration. Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, -2007, 2008 Free Software Foundation, Inc. +2007, 2008, 2009 Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -184,7 +184,7 @@ mp_limb_t refmpn_msbone (mp_limb_t x) { - mp_limb_t n = (mp_limb_t) 1 << (BITS_PER_MP_LIMB-1); + mp_limb_t n = (mp_limb_t) 1 << (GMP_LIMB_BITS-1); while (n != 0) { @@ -337,20 +337,6 @@ refmpn_zero (wp, wsize-xsize); } -void -refmpn_com_n (mp_ptr rp, mp_srcptr sp, mp_size_t size) -{ - mp_size_t i; - - ASSERT (refmpn_overlap_fullonly_p (rp, sp, size)); - ASSERT (size >= 1); - ASSERT_MPN (sp, size); - - for (i = 0; i < size; i++) - rp[i] = sp[i] ^ GMP_NUMB_MASK; -} - - int refmpn_cmp (mp_srcptr xp, mp_srcptr yp, mp_size_t size) { @@ -611,40 +597,91 @@ } mp_limb_t -refmpn_addlsh1_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +refmpn_addlsh_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, + mp_size_t n, unsigned int s) { mp_limb_t cy; mp_ptr tp; ASSERT (refmpn_overlap_fullonly_two_p (rp, up, vp, n)); ASSERT (n >= 1); + ASSERT (0 < s && s < GMP_NUMB_BITS); ASSERT_MPN (up, n); ASSERT_MPN (vp, n); tp = refmpn_malloc_limbs (n); - cy = refmpn_lshift (tp, vp, n, 1); + cy = refmpn_lshift (tp, vp, n, s); cy += refmpn_add_n (rp, up, tp, n); free (tp); return cy; } mp_limb_t -refmpn_sublsh1_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +refmpn_addlsh1_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +{ + return refmpn_addlsh_n (rp, up, vp, n, 1); +} +mp_limb_t +refmpn_addlsh2_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +{ + return refmpn_addlsh_n (rp, up, vp, n, 2); +} + +mp_limb_t +refmpn_sublsh_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, + mp_size_t n, unsigned int s) { mp_limb_t cy; mp_ptr tp; ASSERT (refmpn_overlap_fullonly_two_p (rp, up, vp, n)); ASSERT (n >= 1); + ASSERT (0 < s && s < GMP_NUMB_BITS); ASSERT_MPN (up, n); ASSERT_MPN (vp, n); tp = refmpn_malloc_limbs (n); - cy = mpn_lshift (tp, vp, n, 1); + cy = mpn_lshift (tp, vp, n, s); cy += mpn_sub_n (rp, up, tp, n); free (tp); return cy; } mp_limb_t +refmpn_sublsh1_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +{ + return refmpn_sublsh_n (rp, up, vp, n, 1); +} + +mp_limb_signed_t +refmpn_rsblsh_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, + mp_size_t n, unsigned int s) +{ + mp_limb_signed_t cy; + mp_ptr tp; + + ASSERT (refmpn_overlap_fullonly_two_p (rp, up, vp, n)); + ASSERT (n >= 1); + ASSERT (0 < s && s < GMP_NUMB_BITS); + ASSERT_MPN (up, n); + ASSERT_MPN (vp, n); + + tp = refmpn_malloc_limbs (n); + cy = mpn_lshift (tp, vp, n, s); + cy -= mpn_sub_n (rp, tp, up, n); + free (tp); + return cy; +} +mp_limb_signed_t +refmpn_rsblsh1_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +{ + return refmpn_rsblsh_n (rp, up, vp, n, 1); +} +mp_limb_signed_t +refmpn_rsblsh2_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) +{ + return refmpn_rsblsh_n (rp, up, vp, n, 2); +} + +mp_limb_t refmpn_rsh1add_n (mp_ptr rp, mp_srcptr up, mp_srcptr vp, mp_size_t n) { mp_limb_t cya, cys; @@ -677,7 +714,7 @@ /* Twos complement, return borrow. */ mp_limb_t -refmpn_neg_n (mp_ptr dst, mp_srcptr src, mp_size_t size) +refmpn_neg (mp_ptr dst, mp_srcptr src, mp_size_t size) { mp_ptr zeros; mp_limb_t ret; @@ -718,10 +755,10 @@ } -#define SHIFTHIGH(x) ((x) << BITS_PER_MP_LIMB/2) -#define SHIFTLOW(x) ((x) >> BITS_PER_MP_LIMB/2) +#define SHIFTHIGH(x) ((x) << GMP_LIMB_BITS/2) +#define SHIFTLOW(x) ((x) >> GMP_LIMB_BITS/2) -#define LOWMASK (((mp_limb_t) 1 << BITS_PER_MP_LIMB/2)-1) +#define LOWMASK (((mp_limb_t) 1 << GMP_LIMB_BITS/2)-1) #define HIGHMASK SHIFTHIGH(LOWMASK) #define LOWPART(x) ((x) & LOWMASK) @@ -936,7 +973,7 @@ } mp_limb_t -refmpn_addsub_nc (mp_ptr r1p, mp_ptr r2p, +refmpn_add_n_sub_nc (mp_ptr r1p, mp_ptr r2p, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size, mp_limb_t carry) { @@ -961,15 +998,15 @@ } mp_limb_t -refmpn_addsub_n (mp_ptr r1p, mp_ptr r2p, +refmpn_add_n_sub_n (mp_ptr r1p, mp_ptr r2p, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size) { - return refmpn_addsub_nc (r1p, r2p, s1p, s2p, size, CNST_LIMB(0)); + return refmpn_add_n_sub_nc (r1p, r2p, s1p, s2p, size, CNST_LIMB(0)); } /* Right shift hi,lo and return the low limb of the result. - Note a shift by BITS_PER_MP_LIMB isn't assumed to work (doesn't on x86). */ + Note a shift by GMP_LIMB_BITS isn't assumed to work (doesn't on x86). */ mp_limb_t rshift_make (mp_limb_t hi, mp_limb_t lo, unsigned shift) { @@ -981,7 +1018,7 @@ } /* Left shift hi,lo and return the high limb of the result. - Note a shift by BITS_PER_MP_LIMB isn't assumed to work (doesn't on x86). */ + Note a shift by GMP_LIMB_BITS isn't assumed to work (doesn't on x86). */ mp_limb_t lshift_make (mp_limb_t hi, mp_limb_t lo, unsigned shift) { @@ -1033,6 +1070,29 @@ return ret; } +void +refmpn_com (mp_ptr rp, mp_srcptr sp, mp_size_t size) +{ + mp_size_t i; + + /* We work downwards since mpn_lshiftc needs that. */ + ASSERT (refmpn_overlap_high_to_low_p (rp, sp, size)); + + for (i = size - 1; i >= 0; i--) + rp[i] = (~sp[i]) & GMP_NUMB_MASK; +} + +mp_limb_t +refmpn_lshiftc (mp_ptr rp, mp_srcptr sp, mp_size_t size, unsigned shift) +{ + mp_limb_t res; + + /* No asserts here, refmpn_lshift will assert what we need. */ + + res = refmpn_lshift (rp, sp, size, shift); + refmpn_com (rp, rp, size); + return res; +} /* accepting shift==0 and doing a plain copyi or copyd in that case */ mp_limb_t @@ -1264,14 +1324,14 @@ tp = refmpn_malloc_limbs (nn + qxn); refmpn_zero (tp, qxn); refmpn_copyi (tp + qxn, np, nn); - qh = refmpn_sb_divrem_mn (qp, tp, nn + qxn, dp, 2); + qh = refmpn_sb_div_qr (qp, tp, nn + qxn, dp, 2); refmpn_copyi (np, tp, 2); free (tp); return qh; } /* Inverse is floor((b*(b-d)-1) / d), per division by invariant integers - paper, figure 8.1 m', where b=2^BITS_PER_MP_LIMB. Note that -d-1 < d + paper, figure 8.1 m', where b=2^GMP_LIMB_BITS. Note that -d-1 < d since d has the high bit set. */ mp_limb_t @@ -1282,6 +1342,48 @@ return refmpn_udiv_qrnnd (&r, -d-1, MP_LIMB_T_MAX, d); } +void +refmpn_invert (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_ptr scratch) +{ + mp_ptr qp, tp; + TMP_DECL; + TMP_MARK; + + tp = TMP_ALLOC_LIMBS (2 * n); + qp = TMP_ALLOC_LIMBS (n + 1); + + MPN_ZERO (tp, 2 * n); mpn_sub_1 (tp, tp, 2 * n, 1); + + refmpn_tdiv_qr (qp, rp, 0, tp, 2 * n, up, n); + refmpn_copyi (rp, qp, n); + + TMP_FREE; +} + +void +refmpn_binvert (mp_ptr rp, mp_srcptr up, mp_size_t n, mp_ptr scratch) +{ + mp_ptr tp; + mp_limb_t binv; + TMP_DECL; + TMP_MARK; + + /* We use the library mpn_sbpi1_bdiv_q here, which isn't kosher in testing + code. To make up for it, we check that the inverse is correct using a + multiply. */ + + tp = TMP_ALLOC_LIMBS (2 * n); + + MPN_ZERO (tp, n); + tp[0] = 1; + binvert_limb (binv, up[0]); + mpn_sbpi1_bdiv_q (rp, tp, n, up, n, -binv); + + refmpn_mul_n (tp, rp, up, n); + ASSERT_ALWAYS (tp[0] == 1 && mpn_zero_p (tp + 1, n - 1)); + + TMP_FREE; +} /* The aim is to produce a dst quotient and return a remainder c, satisfying c*b^n + src-i == 3*dst, where i is the incoming carry. @@ -1357,16 +1459,91 @@ prodp[usize+i] = refmpn_addmul_1 (prodp+i, up, usize, vp[i]); } +#define TOOM3_THRESHOLD (MAX (MUL_TOOM33_THRESHOLD, SQR_TOOM3_THRESHOLD)) +#define TOOM4_THRESHOLD (MAX (MUL_TOOM44_THRESHOLD, SQR_TOOM4_THRESHOLD)) +#if WANT_FFT +#define FFT_THRESHOLD (MAX (MUL_FFT_THRESHOLD, SQR_FFT_THRESHOLD)) +#else +#define FFT_THRESHOLD MP_SIZE_T_MAX /* don't use toom44 here */ +#endif + +void +refmpn_mul (mp_ptr wp, mp_srcptr up, mp_size_t un, mp_srcptr vp, mp_size_t vn) +{ + mp_ptr tp; + mp_size_t tn; + mp_limb_t cy; + + if (vn < TOOM3_THRESHOLD) + { + /* In the mpn_mul_basecase and mpn_kara_mul_n range, use our own + mul_basecase. */ + if (vn != 0) + refmpn_mul_basecase (wp, up, un, vp, vn); + else + MPN_ZERO (wp, un); + return; + } + + if (vn < TOOM4_THRESHOLD) + { + /* In the mpn_toom33_mul range, use mpn_toom22_mul. */ + tn = 2 * vn + mpn_toom22_mul_itch (vn, vn); + tp = refmpn_malloc_limbs (tn); + mpn_toom22_mul (tp, up, vn, vp, vn, tp + 2 * vn); + } + else if (vn < FFT_THRESHOLD) + { + /* In the mpn_toom44_mul range, use mpn_toom33_mul. */ + tn = 2 * vn + mpn_toom33_mul_itch (vn, vn); + tp = refmpn_malloc_limbs (tn); + mpn_toom33_mul (tp, up, vn, vp, vn, tp + 2 * vn); + } + else + { + /* Finally, for the largest operands, use mpn_toom44_mul. */ + tn = 2 * vn + mpn_toom44_mul_itch (vn, vn); + tp = refmpn_malloc_limbs (tn); + mpn_toom44_mul (tp, up, vn, vp, vn, tp + 2 * vn); + } + + if (un != vn) + { + if (un - vn < vn) + refmpn_mul (wp + vn, vp, vn, up + vn, un - vn); + else + refmpn_mul (wp + vn, up + vn, un - vn, vp, vn); + + MPN_COPY (wp, tp, vn); + cy = refmpn_add (wp + vn, wp + vn, un, tp + vn, vn); + } + else + { + MPN_COPY (wp, tp, 2 * vn); + } + + free (tp); +} + void refmpn_mul_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size) { - refmpn_mul_basecase (prodp, up, size, vp, size); + refmpn_mul (prodp, up, size, vp, size); +} + +void +refmpn_mullo_n (mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size) +{ + mp_ptr tp = refmpn_malloc_limbs (2*size); + refmpn_mul (tp, up, size, vp, size); + refmpn_copyi (prodp, tp, size); + free (tp); } void refmpn_sqr (mp_ptr dst, mp_srcptr src, mp_size_t size) { - refmpn_mul_basecase (dst, src, size, src, size); + refmpn_mul (dst, src, size, src, size); } /* Allowing usize= vsize) - refmpn_mul_basecase (prodp, up, usize, vp, vsize); + refmpn_mul (prodp, up, usize, vp, vsize); else - refmpn_mul_basecase (prodp, vp, vsize, up, usize); + refmpn_mul (prodp, vp, vsize, up, usize); } @@ -1629,12 +1806,12 @@ -/* Similar to mpn/generic/sb_divrem_mn.c, but somewhat simplified, in +/* Similar to the old mpn/generic/sb_divrem_mn.c, but somewhat simplified, in particular the trial quotient is allowed to be 2 too big. */ mp_limb_t -refmpn_sb_divrem_mn (mp_ptr qp, - mp_ptr np, mp_size_t nsize, - mp_srcptr dp, mp_size_t dsize) +refmpn_sb_div_qr (mp_ptr qp, + mp_ptr np, mp_size_t nsize, + mp_srcptr dp, mp_size_t dsize) { mp_limb_t retval = 0; mp_size_t i; @@ -1707,7 +1884,7 @@ return retval; } -/* Similar to mpn/generic/sb_divrem_mn.c, but somewhat simplified, in +/* Similar to the old mpn/generic/sb_divrem_mn.c, but somewhat simplified, in particular the trial quotient is allowed to be 2 too big. */ void refmpn_tdiv_qr (mp_ptr qp, mp_ptr rp, mp_size_t qxn, @@ -1734,7 +1911,7 @@ n2p[nsize] = refmpn_lshift_or_copy (n2p, np, nsize, norm); ASSERT_NOCARRY (refmpn_lshift_or_copy (d2p, dp, dsize, norm)); - refmpn_sb_divrem_mn (qp, n2p, nsize+1, d2p, dsize); + refmpn_sb_div_qr (qp, n2p, nsize+1, d2p, dsize); refmpn_rshift_or_copy (rp, n2p, dsize, norm); /* ASSERT (refmpn_zero_p (tp+dsize, nsize-dsize)); */ @@ -1772,7 +1949,7 @@ ASSERT (size >= 0); ASSERT (base >= 2); - ASSERT (base < numberof (__mp_bases)); + ASSERT (base < numberof (mp_bases)); ASSERT (size == 0 || src[size-1] != 0); ASSERT_MPN (src, size); @@ -1838,10 +2015,10 @@ can probably be removed when those normal routines are reliable, though perhaps something independent would still be useful at times. */ -#if BITS_PER_MP_LIMB == 32 +#if GMP_LIMB_BITS == 32 #define RAND_A CNST_LIMB(0x29CF535) #endif -#if BITS_PER_MP_LIMB == 64 +#if GMP_LIMB_BITS == 64 #define RAND_A CNST_LIMB(0xBAECD515DAF0B49D) #endif @@ -1851,13 +2028,13 @@ refmpn_random_half (void) { refmpn_random_seed = refmpn_random_seed * RAND_A + 1; - return (refmpn_random_seed >> BITS_PER_MP_LIMB/2); + return (refmpn_random_seed >> GMP_LIMB_BITS/2); } mp_limb_t refmpn_random_limb (void) { - return ((refmpn_random_half () << (BITS_PER_MP_LIMB/2)) + return ((refmpn_random_half () << (GMP_LIMB_BITS/2)) | refmpn_random_half ()) & GMP_NUMB_MASK; } diff -Nru gmp-4.3.2+dfsg/tests/refmpz.c gmp-5.0.2+dfsg/tests/refmpz.c --- gmp-4.3.2+dfsg/tests/refmpz.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/refmpz.c 2011-05-08 09:49:29.000000000 +0000 @@ -67,10 +67,10 @@ refmpn_copy (yp, PTR(y), ysize); if (SIZ(x) < 0) - refmpn_neg_n (xp, xp, tsize); + refmpn_neg (xp, xp, tsize); if (SIZ(x) < 0) - refmpn_neg_n (yp, yp, tsize); + refmpn_neg (yp, yp, tsize); ret = refmpn_hamdist (xp, yp, tsize); diff -Nru gmp-4.3.2+dfsg/tests/t-constants.c gmp-5.0.2+dfsg/tests/t-constants.c --- gmp-4.3.2+dfsg/tests/t-constants.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/t-constants.c 2011-05-08 09:49:29.000000000 +0000 @@ -209,10 +209,9 @@ int error = 0; CHECK_INT (BYTES_PER_MP_LIMB, (int) sizeof(mp_limb_t)); - CHECK_INT (mp_bits_per_limb, BITS_PER_MP_LIMB); - CHECK_INT (__GMP_BITS_PER_MP_LIMB, BITS_PER_MP_LIMB); + CHECK_INT (mp_bits_per_limb, GMP_LIMB_BITS); - CHECK_BITS (BITS_PER_MP_LIMB, mp_limb_t); + CHECK_BITS (GMP_LIMB_BITS, mp_limb_t); CHECK_BITS (BITS_PER_ULONG, unsigned long); CHECK_HIGHBIT (GMP_LIMB_HIGHBIT, mp_limb_t, LL("0x%lX","0x%llX")); diff -Nru gmp-4.3.2+dfsg/tests/t-count_zeros.c gmp-5.0.2+dfsg/tests/t-count_zeros.c --- gmp-4.3.2+dfsg/tests/t-count_zeros.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/t-count_zeros.c 2011-05-08 09:49:29.000000000 +0000 @@ -63,9 +63,9 @@ check_clz (COUNT_LEADING_ZEROS_0, CNST_LIMB(0)); #endif - for (i=0; i < BITS_PER_MP_LIMB; i++) + for (i=0; i < GMP_LIMB_BITS; i++) { - check_clz (i, CNST_LIMB(1) << (BITS_PER_MP_LIMB-1-i)); + check_clz (i, CNST_LIMB(1) << (GMP_LIMB_BITS-1-i)); check_ctz (i, CNST_LIMB(1) << i); check_ctz (i, MP_LIMB_T_MAX << i); diff -Nru gmp-4.3.2+dfsg/tests/tests.h gmp-5.0.2+dfsg/tests/tests.h --- gmp-4.3.2+dfsg/tests/tests.h 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tests/tests.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,7 @@ /* Tests support prototypes etc. -Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. +Copyright 2000, 2001, 2002, 2003, 2004, 2008, 2009 Free Software Foundation, +Inc. This file is part of the GNU MP Library. @@ -182,6 +183,10 @@ mp_size_t size, mp_limb_t carry)); mp_limb_t refmpn_addlsh1_n __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_srcptr yp, mp_size_t size)); +mp_limb_t refmpn_addlsh2_n __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_srcptr yp, + mp_size_t size)); +mp_limb_t refmpn_addlsh_n __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_srcptr yp, + mp_size_t size, unsigned int)); mp_limb_t refmpn_addmul_1 __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_size_t size, mp_limb_t multiplier)); mp_limb_t refmpn_addmul_1c __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_size_t size, @@ -201,10 +206,10 @@ mp_limb_t refmpn_addmul_8 __GMP_PROTO ((mp_ptr dst, mp_srcptr src, mp_size_t size, mp_srcptr mult)); -mp_limb_t refmpn_addsub_n __GMP_PROTO ((mp_ptr r1p, mp_ptr r2p, +mp_limb_t refmpn_add_n_sub_n __GMP_PROTO ((mp_ptr r1p, mp_ptr r2p, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size)); -mp_limb_t refmpn_addsub_nc __GMP_PROTO ((mp_ptr r1p, mp_ptr r2p, +mp_limb_t refmpn_add_n_sub_nc __GMP_PROTO ((mp_ptr r1p, mp_ptr r2p, mp_srcptr s1p, mp_srcptr s2p, mp_size_t size, mp_limb_t carry)); @@ -222,7 +227,7 @@ int refmpn_cmp_twosizes __GMP_PROTO ((mp_srcptr xp, mp_size_t xsize, mp_srcptr yp, mp_size_t ysize)); -void refmpn_com_n __GMP_PROTO ((mp_ptr rp, mp_srcptr sp, mp_size_t size)); +void refmpn_com __GMP_PROTO ((mp_ptr rp, mp_srcptr sp, mp_size_t size)); void refmpn_copy __GMP_PROTO ((mp_ptr rp, mp_srcptr sp, mp_size_t size)); void refmpn_copyi __GMP_PROTO ((mp_ptr rp, mp_srcptr sp, mp_size_t size)); void refmpn_copyd __GMP_PROTO ((mp_ptr rp, mp_srcptr sp, mp_size_t size)); @@ -268,14 +273,11 @@ void refmpn_iorn_n __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_srcptr yp, mp_size_t size)); -mp_limb_t refmpn_lshift __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_size_t size, - unsigned shift)); -mp_limb_t refmpn_lshift_or_copy __GMP_PROTO ((mp_ptr wp, - mp_srcptr xp, mp_size_t size, - unsigned shift)); -mp_limb_t refmpn_lshift_or_copy_any __GMP_PROTO ((mp_ptr wp, - mp_srcptr xp, mp_size_t size, - unsigned shift)); +mp_limb_t refmpn_lshift __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned)); +mp_limb_t refmpn_lshift_or_copy __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned)); +mp_limb_t refmpn_lshift_or_copy_any __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned)); +mp_limb_t refmpn_lshiftc __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, unsigned)); +void refmpn_com __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t)); mp_ptr refmpn_malloc_limbs __GMP_PROTO ((mp_size_t size)); mp_ptr refmpn_malloc_limbs_aligned __GMP_PROTO ((mp_size_t n, size_t m)); @@ -304,17 +306,20 @@ void refmpn_mul_basecase __GMP_PROTO ((mp_ptr prodp, mp_srcptr up, mp_size_t usize, mp_srcptr vp, mp_size_t vsize)); +void refmpn_mullo_n __GMP_PROTO ((mp_ptr prodp, + mp_srcptr up, mp_srcptr vp, mp_size_t vsize)); void refmpn_mul_any __GMP_PROTO ((mp_ptr prodp, mp_srcptr up, mp_size_t usize, mp_srcptr vp, mp_size_t vsize)); void refmpn_mul_n __GMP_PROTO ((mp_ptr prodp, mp_srcptr up, mp_srcptr vp, mp_size_t size)); +void refmpn_mul __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_srcptr, mp_size_t)); void refmpn_nand_n __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_srcptr yp, mp_size_t size)); void refmpn_nior_n __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_srcptr yp, mp_size_t size)); -mp_limb_t refmpn_neg_n __GMP_PROTO ((mp_ptr dst, mp_srcptr src, mp_size_t size)); +mp_limb_t refmpn_neg __GMP_PROTO ((mp_ptr dst, mp_srcptr src, mp_size_t size)); mp_size_t refmpn_normalize __GMP_PROTO ((mp_srcptr, mp_size_t)); unsigned long refmpn_popcount __GMP_PROTO ((mp_srcptr sp, mp_size_t size)); @@ -343,9 +348,9 @@ mp_srcptr xp, mp_size_t size, unsigned shift)); -mp_limb_t refmpn_sb_divrem_mn __GMP_PROTO ((mp_ptr qp, - mp_ptr np, mp_size_t nsize, - mp_srcptr dp, mp_size_t dsize)); +mp_limb_t refmpn_sb_div_qr __GMP_PROTO ((mp_ptr, + mp_ptr, mp_size_t, + mp_srcptr, mp_size_t)); unsigned long refmpn_scan0 __GMP_PROTO ((mp_srcptr, unsigned long)); unsigned long refmpn_scan1 __GMP_PROTO ((mp_srcptr, unsigned long)); void refmpn_setbit __GMP_PROTO ((mp_ptr, unsigned long)); @@ -366,11 +371,17 @@ mp_size_t size, mp_limb_t carry)); mp_limb_t refmpn_sublsh1_n __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_srcptr yp, mp_size_t size)); +mp_limb_t refmpn_sublsh_n __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_srcptr yp, + mp_size_t size, unsigned int)); mp_limb_t refmpn_submul_1 __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_size_t size, mp_limb_t multiplier)); mp_limb_t refmpn_submul_1c __GMP_PROTO ((mp_ptr wp, mp_srcptr xp, mp_size_t size, mp_limb_t multiplier, mp_limb_t carry)); +mp_limb_signed_t refmpn_rsblsh1_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +mp_limb_signed_t refmpn_rsblsh2_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t)); +mp_limb_signed_t refmpn_rsblsh_n __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, unsigned int)); + void refmpn_tdiv_qr __GMP_PROTO ((mp_ptr qp, mp_ptr rp, mp_size_t qxn, mp_ptr np, mp_size_t nsize, mp_srcptr dp, mp_size_t dsize)); @@ -390,6 +401,9 @@ void refmpn_zero_extend __GMP_PROTO ((mp_ptr, mp_size_t, mp_size_t)); int refmpn_zero_p __GMP_PROTO ((mp_srcptr ptr, mp_size_t size)); +void refmpn_binvert __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +void refmpn_invert __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); + void refmpq_add __GMP_PROTO ((mpq_ptr w, mpq_srcptr x, mpq_srcptr y)); void refmpq_sub __GMP_PROTO ((mpq_ptr w, mpq_srcptr x, mpq_srcptr y)); @@ -447,4 +461,33 @@ #endif /* __cplusplus */ +#define TESTS_REPS(count, argv, argc) \ + do { \ + char *envval, *end; \ + long repfactor; \ + if (argc > 1) \ + { \ + count = strtol (argv[1], &end, 0); \ + if (*end || count <= 0) \ + { \ + fprintf (stderr, "Invalid test count: %s.\n", argv[1]); \ + exit (1); \ + } \ + argv++; \ + argc--; \ + } \ + envval = getenv ("GMP_CHECK_REPFACTOR"); \ + if (envval != NULL) \ + { \ + repfactor = strtol (envval, &end, 0); \ + if (*end || repfactor <= 0) \ + { \ + fprintf (stderr, "Invalid repfactor: %ld.\n", repfactor); \ + exit (1); \ + } \ + count *= repfactor; \ + } \ + } while (0) + + #endif /* __TESTS_H__ */ diff -Nru gmp-4.3.2+dfsg/tune/common.c gmp-5.0.2+dfsg/tune/common.c --- gmp-4.3.2+dfsg/tune/common.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/common.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* Shared speed subroutines. -Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software -Foundation, Inc. +Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2008, 2009, 2010 +Free Software Foundation, Inc. This file is part of the GNU MP Library. @@ -61,9 +61,9 @@ if (fd == -2) { - fd = open ("/dev/wbinvd", O_RDWR); - if (fd == -1) - perror ("open /dev/wbinvd"); + fd = open ("/dev/wbinvd", O_RDWR); + if (fd == -1) + perror ("open /dev/wbinvd"); } if (fd != -1) @@ -122,7 +122,7 @@ double speed_measure (double (*fun) __GMP_PROTO ((struct speed_params *s)), - struct speed_params *s) + struct speed_params *s) { #define TOLERANCE 1.005 /* 0.5% */ const int max_zeros = 10; @@ -147,74 +147,74 @@ for (i = 0; i < numberof (t); i++) { for (;;) - { - s->src_num = 0; - s->dst_num = 0; - - t[i] = (*fun) (s); - - if (speed_option_verbose >= 3) - gmp_printf("size=%ld reps=%u r=%Md attempt=%d %.9f\n", - (long) s->size, s->reps, s->r, i, t[i]); - - if (t[i] == 0.0) - { - zeros++; - if (zeros > max_zeros) - { - fprintf (stderr, "Fatal error: too many (%d) failed measurements (0.0)\n", zeros); - abort (); - } - continue; - } - - if (t[i] == -1.0) - return -1.0; - - if (t[i] >= speed_unittime * speed_precision) - break; - - /* go to a value of reps to make t[i] >= precision */ - reps_d = ceil (1.1 * s->reps - * speed_unittime * speed_precision - / MAX (t[i], speed_unittime)); - if (reps_d > 2e9 || reps_d < 1.0) - { - fprintf (stderr, "Fatal error: new reps bad: %.2f\n", reps_d); - fprintf (stderr, " (old reps %u, unittime %.4g, precision %d, t[i] %.4g)\n", - s->reps, speed_unittime, speed_precision, t[i]); - abort (); - } - s->reps = (unsigned) reps_d; - } + { + s->src_num = 0; + s->dst_num = 0; + + t[i] = (*fun) (s); + + if (speed_option_verbose >= 3) + gmp_printf("size=%ld reps=%u r=%Md attempt=%d %.9f\n", + (long) s->size, s->reps, s->r, i, t[i]); + + if (t[i] == 0.0) + { + zeros++; + if (zeros > max_zeros) + { + fprintf (stderr, "Fatal error: too many (%d) failed measurements (0.0)\n", zeros); + abort (); + } + continue; + } + + if (t[i] == -1.0) + return -1.0; + + if (t[i] >= speed_unittime * speed_precision) + break; + + /* go to a value of reps to make t[i] >= precision */ + reps_d = ceil (1.1 * s->reps + * speed_unittime * speed_precision + / MAX (t[i], speed_unittime)); + if (reps_d > 2e9 || reps_d < 1.0) + { + fprintf (stderr, "Fatal error: new reps bad: %.2f\n", reps_d); + fprintf (stderr, " (old reps %u, unittime %.4g, precision %d, t[i] %.4g)\n", + s->reps, speed_unittime, speed_precision, t[i]); + abort (); + } + s->reps = (unsigned) reps_d; + } t[i] /= s->reps; t_unsorted[i] = t[i]; if (speed_precision == 0) - return t[i]; + return t[i]; /* require 3 values within TOLERANCE when >= 2 secs, 4 when below */ if (t[0] >= 2.0) - e = 3; + e = 3; else - e = 4; + e = 4; /* Look for e many t[]'s within TOLERANCE of each other to consider a - valid measurement. Return smallest among them. */ + valid measurement. Return smallest among them. */ if (i >= e) - { - qsort (t, i+1, sizeof(t[0]), (qsort_function_t) double_cmp_ptr); - for (j = e-1; j < i; j++) - if (t[j] <= t[j-e+1] * TOLERANCE) - return t[j-e+1] / s->time_divisor; - } + { + qsort (t, i+1, sizeof(t[0]), (qsort_function_t) double_cmp_ptr); + for (j = e-1; j < i; j++) + if (t[j] <= t[j-e+1] * TOLERANCE) + return t[j-e+1] / s->time_divisor; + } } fprintf (stderr, "speed_measure() could not get %d results within %.1f%%\n", - e, (TOLERANCE-1.0)*100.0); + e, (TOLERANCE-1.0)*100.0); fprintf (stderr, " unsorted sorted\n"); fprintf (stderr, " %.12f %.12f is about 0.5%%\n", - t_unsorted[0]*(TOLERANCE-1.0), t[0]*(TOLERANCE-1.0)); + t_unsorted[0]*(TOLERANCE-1.0), t[0]*(TOLERANCE-1.0)); for (i = 0; i < numberof (t); i++) fprintf (stderr, " %.09f %.09f\n", t_unsorted[i], t[i]); @@ -305,30 +305,30 @@ different = (s->dst_num != prev.dst_num || s->src_num != prev.src_num); for (i = 0; i < s->dst_num; i++) - different |= (s->dst[i].ptr != prev.dst[i].ptr); + different |= (s->dst[i].ptr != prev.dst[i].ptr); for (i = 0; i < s->src_num; i++) - different |= (s->src[i].ptr != prev.src[i].ptr); + different |= (s->src[i].ptr != prev.src[i].ptr); if (different) - { - if (s->dst_num != 0) - { - printf ("dst"); - for (i = 0; i < s->dst_num; i++) - printf (" %08lX", (unsigned long) s->dst[i].ptr); - printf (" "); - } - - if (s->src_num != 0) - { - printf ("src"); - for (i = 0; i < s->src_num; i++) - printf (" %08lX", (unsigned long) s->src[i].ptr); - printf (" "); - } - printf (" (cf sp approx %08lX)\n", (unsigned long) &different); + { + if (s->dst_num != 0) + { + printf ("dst"); + for (i = 0; i < s->dst_num; i++) + printf (" %08lX", (unsigned long) s->dst[i].ptr); + printf (" "); + } + + if (s->src_num != 0) + { + printf ("src"); + for (i = 0; i < s->src_num; i++) + printf (" %08lX", (unsigned long) s->src[i].ptr); + printf (" "); + } + printf (" (cf sp approx %08lX)\n", (unsigned long) &different); - } + } memcpy (&prev, s, sizeof(prev)); } @@ -402,10 +402,10 @@ code on most CPUs, thereby minimizing overhead in the measurement. It can always be assumed s->reps >= 1. - i = s->reps - do - foo(); - while (--i != 0); + i = s->reps + do + foo(); + while (--i != 0); Additional parameters might be added to "struct speed_params" in the future. Routines should ignore anything they don't use. @@ -452,9 +452,9 @@ SPEED_ROUTINE_MPN_COPY_BYTES (memcpy); } double -speed_mpn_com_n (struct speed_params *s) +speed_mpn_com (struct speed_params *s) { - SPEED_ROUTINE_MPN_COPY (mpn_com_n); + SPEED_ROUTINE_MPN_COPY (mpn_com); } @@ -559,6 +559,11 @@ SPEED_ROUTINE_MPN_UNARY_1 (mpn_lshift); } double +speed_mpn_lshiftc (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_UNARY_1 (mpn_lshiftc); +} +double speed_mpn_rshift (struct speed_params *s) { SPEED_ROUTINE_MPN_UNARY_1 (mpn_rshift); @@ -674,6 +679,26 @@ { SPEED_ROUTINE_MPN_PREINV_MOD_1 (mpn_preinv_mod_1); } +double +speed_mpn_mod_1_1 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MOD_1_1 (mpn_mod_1_1p,mpn_mod_1_1p_cps); +} +double +speed_mpn_mod_1_2 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MOD_1_N (mpn_mod_1s_2p,mpn_mod_1s_2p_cps,2); +} +double +speed_mpn_mod_1_3 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MOD_1_N (mpn_mod_1s_3p,mpn_mod_1s_3p_cps,3); +} +double +speed_mpn_mod_1_4 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MOD_1_N (mpn_mod_1s_4p,mpn_mod_1s_4p_cps,4); +} double speed_mpn_divexact_1 (struct speed_params *s) @@ -693,6 +718,18 @@ SPEED_ROUTINE_MPN_BDIV_DBM1C (mpn_bdiv_dbm1c); } +double +speed_mpn_bdiv_q_1 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_BDIV_Q_1 (mpn_bdiv_q_1); +} + +double +speed_mpn_pi1_bdiv_q_1 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_PI1_BDIV_Q_1 (mpn_pi1_bdiv_q_1); +} + #if HAVE_NATIVE_mpn_modexact_1_odd double speed_mpn_modexact_1_odd (struct speed_params *s) @@ -707,59 +744,123 @@ SPEED_ROUTINE_MPN_MODEXACT_1C_ODD (mpn_modexact_1c_odd); } +double +speed_mpz_mod (struct speed_params *s) +{ + SPEED_ROUTINE_MPZ_MOD (mpz_mod); +} + +double +speed_mpn_sbpi1_div_qr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_PI1_DIV (mpn_sbpi1_div_qr, inv.inv32, 2,0); +} +double +speed_mpn_dcpi1_div_qr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_PI1_DIV (mpn_dcpi1_div_qr, &inv, 6,3); +} +double +speed_mpn_sbpi1_divappr_q (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_PI1_DIV (mpn_sbpi1_divappr_q, inv.inv32, 2,0); +} +double +speed_mpn_dcpi1_divappr_q (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_PI1_DIV (mpn_dcpi1_divappr_q, &inv, 6,3); +} +double +speed_mpn_mu_div_qr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MU_DIV_QR (mpn_mu_div_qr, mpn_mu_div_qr_itch); +} +double +speed_mpn_mu_divappr_q (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MU_DIV_Q (mpn_mu_divappr_q, mpn_mu_divappr_q_itch); +} +double +speed_mpn_mu_div_q (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MU_DIV_Q (mpn_mu_div_q, mpn_mu_div_q_itch); +} +double +speed_mpn_mupi_div_qr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MUPI_DIV_QR (mpn_preinv_mu_div_qr, mpn_preinv_mu_div_qr_itch); +} double -speed_mpn_dc_tdiv_qr (struct speed_params *s) +speed_mpn_sbpi1_bdiv_qr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_PI1_BDIV_QR (mpn_sbpi1_bdiv_qr); +} +double +speed_mpn_dcpi1_bdiv_qr (struct speed_params *s) { - SPEED_ROUTINE_MPN_DC_TDIV_QR (mpn_tdiv_qr); + SPEED_ROUTINE_MPN_PI1_BDIV_QR (mpn_dcpi1_bdiv_qr); } double -speed_mpn_dc_divrem_n (struct speed_params *s) +speed_mpn_sbpi1_bdiv_q (struct speed_params *s) { - SPEED_ROUTINE_MPN_DC_DIVREM_N (mpn_dc_divrem_n); + SPEED_ROUTINE_MPN_PI1_BDIV_Q (mpn_sbpi1_bdiv_q); } double -speed_mpn_dc_divrem_sb (struct speed_params *s) +speed_mpn_dcpi1_bdiv_q (struct speed_params *s) { - SPEED_ROUTINE_MPN_DC_DIVREM_SB (mpn_sb_divrem_mn); + SPEED_ROUTINE_MPN_PI1_BDIV_Q (mpn_dcpi1_bdiv_q); } double -speed_mpn_dc_divrem_sb_div (struct speed_params *s) +speed_mpn_mu_bdiv_q (struct speed_params *s) { - SPEED_ROUTINE_MPN_DC_DIVREM_SB (mpn_sb_divrem_mn_div); + SPEED_ROUTINE_MPN_MU_BDIV_Q (mpn_mu_bdiv_q, mpn_mu_bdiv_q_itch); } double -speed_mpn_dc_divrem_sb_inv (struct speed_params *s) +speed_mpn_mu_bdiv_qr (struct speed_params *s) { - SPEED_ROUTINE_MPN_DC_DIVREM_SB (mpn_sb_divrem_mn_inv); + SPEED_ROUTINE_MPN_MU_BDIV_QR (mpn_mu_bdiv_qr, mpn_mu_bdiv_qr_itch); } double -speed_mpn_sb_divrem_m3 (struct speed_params *s) +speed_mpn_binvert (struct speed_params *s) { - SPEED_ROUTINE_MPN_SB_DIVREM_M3 (mpn_sb_divrem_mn); + SPEED_ROUTINE_MPN_BINVERT (mpn_binvert, mpn_binvert_itch); } + double -speed_mpn_sb_divrem_m3_div (struct speed_params *s) +speed_mpn_invert (struct speed_params *s) { - SPEED_ROUTINE_MPN_SB_DIVREM_M3 (mpn_sb_divrem_mn_div); + SPEED_ROUTINE_MPN_INVERT (mpn_invert, mpn_invert_itch); } + double -speed_mpn_sb_divrem_m3_inv (struct speed_params *s) +speed_mpn_invertappr (struct speed_params *s) { - SPEED_ROUTINE_MPN_SB_DIVREM_M3 (mpn_sb_divrem_mn_inv); + SPEED_ROUTINE_MPN_INVERTAPPR (mpn_invertappr, mpn_invertappr_itch); } double -speed_mpz_mod (struct speed_params *s) +speed_mpn_ni_invertappr (struct speed_params *s) { - SPEED_ROUTINE_MPZ_MOD (mpz_mod); + SPEED_ROUTINE_MPN_INVERTAPPR (mpn_ni_invertappr, mpn_invertappr_itch); } + double speed_mpn_redc_1 (struct speed_params *s) { SPEED_ROUTINE_REDC_1 (mpn_redc_1); } +double +speed_mpn_redc_2 (struct speed_params *s) +{ + SPEED_ROUTINE_REDC_2 (mpn_redc_2); +} +double +speed_mpn_redc_n (struct speed_params *s) +{ + SPEED_ROUTINE_REDC_N (mpn_redc_n); +} double @@ -785,11 +886,11 @@ SPEED_ROUTINE_MPN_BINARY_N (mpn_sub_n); } -#if HAVE_NATIVE_mpn_addsub_n +#if HAVE_NATIVE_mpn_add_n_sub_n double -speed_mpn_addsub_n (struct speed_params *s) +speed_mpn_add_n_sub_n (struct speed_params *s) { - SPEED_ROUTINE_MPN_ADDSUB_N_CALL (mpn_addsub_n (ap, sp, s->xp, s->yp, s->size)); + SPEED_ROUTINE_MPN_ADDSUB_N_CALL (mpn_add_n_sub_n (ap, sp, s->xp, s->yp, s->size)); } #endif @@ -807,6 +908,34 @@ SPEED_ROUTINE_MPN_BINARY_N (mpn_sublsh1_n); } #endif +#if HAVE_NATIVE_mpn_rsblsh1_n +double +speed_mpn_rsblsh1_n (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_BINARY_N (mpn_rsblsh1_n); +} +#endif +#if HAVE_NATIVE_mpn_addlsh2_n +double +speed_mpn_addlsh2_n (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_BINARY_N (mpn_addlsh2_n); +} +#endif +#if HAVE_NATIVE_mpn_sublsh2_n +double +speed_mpn_sublsh2_n (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_BINARY_N (mpn_sublsh2_n); +} +#endif +#if HAVE_NATIVE_mpn_rsblsh2_n +double +speed_mpn_rsblsh2_n (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_BINARY_N (mpn_rsblsh2_n); +} +#endif #if HAVE_NATIVE_mpn_rsh1add_n double speed_mpn_rsh1add_n (struct speed_params *s) @@ -872,9 +1001,9 @@ SPEED_ROUTINE_MPN_MUL_N (mpn_mul_n); } double -speed_mpn_sqr_n (struct speed_params *s) +speed_mpn_sqr (struct speed_params *s) { - SPEED_ROUTINE_MPN_SQR (mpn_sqr_n); + SPEED_ROUTINE_MPN_SQR (mpn_sqr); } double speed_mpn_mul_n_sqr (struct speed_params *s) @@ -908,27 +1037,121 @@ #endif double -speed_mpn_kara_mul_n (struct speed_params *s) +speed_mpn_toom2_sqr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM2_SQR (mpn_toom2_sqr); +} +double +speed_mpn_toom3_sqr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM3_SQR (mpn_toom3_sqr); +} +double +speed_mpn_toom4_sqr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM4_SQR (mpn_toom4_sqr); +} +double +speed_mpn_toom6_sqr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM6_SQR (mpn_toom6_sqr); +} +double +speed_mpn_toom8_sqr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM8_SQR (mpn_toom8_sqr); +} +double +speed_mpn_toom22_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM22_MUL_N (mpn_toom22_mul); +} +double +speed_mpn_toom33_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM33_MUL_N (mpn_toom33_mul); +} +double +speed_mpn_toom44_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM44_MUL_N (mpn_toom44_mul); +} +double +speed_mpn_toom6h_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM6H_MUL_N (mpn_toom6h_mul); +} +double +speed_mpn_toom8h_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM8H_MUL_N (mpn_toom8h_mul); +} + +double +speed_mpn_toom32_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM32_MUL (mpn_toom32_mul); +} +double +speed_mpn_toom42_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM42_MUL (mpn_toom42_mul); +} +double +speed_mpn_toom43_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM43_MUL (mpn_toom43_mul); +} +double +speed_mpn_toom63_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM63_MUL (mpn_toom63_mul); +} +double +speed_mpn_toom32_for_toom43_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM43_MUL (mpn_toom32_mul); +} +double +speed_mpn_toom43_for_toom32_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM43_FOR_TOOM32_MUL (mpn_toom43_mul); +} +double +speed_mpn_toom32_for_toom53_mul (struct speed_params *s) { - SPEED_ROUTINE_MPN_KARA_MUL_N (mpn_kara_mul_n); + SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM53_MUL (mpn_toom32_mul); } double -speed_mpn_kara_sqr_n (struct speed_params *s) +speed_mpn_toom53_for_toom32_mul (struct speed_params *s) { - SPEED_ROUTINE_MPN_KARA_SQR_N (mpn_kara_sqr_n); + SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM32_MUL (mpn_toom53_mul); +} +double +speed_mpn_toom42_for_toom53_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM42_FOR_TOOM53_MUL (mpn_toom42_mul); +} +double +speed_mpn_toom53_for_toom42_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM42_MUL (mpn_toom53_mul); } double -speed_mpn_toom3_mul_n (struct speed_params *s) +speed_mpn_nussbaumer_mul (struct speed_params *s) { - SPEED_ROUTINE_MPN_TOOM3_MUL_N (mpn_toom3_mul_n); + SPEED_ROUTINE_MPN_MUL_N_CALL + (mpn_nussbaumer_mul (wp, s->xp, s->size, s->yp, s->size)); } double -speed_mpn_toom3_sqr_n (struct speed_params *s) +speed_mpn_nussbaumer_mul_sqr (struct speed_params *s) { - SPEED_ROUTINE_MPN_TOOM3_SQR_N (mpn_toom3_sqr_n); + SPEED_ROUTINE_MPN_SQR_CALL + (mpn_nussbaumer_mul (wp, s->xp, s->size, s->xp, s->size)); } +#if WANT_OLD_FFT_FULL double speed_mpn_mul_fft_full (struct speed_params *s) { @@ -941,7 +1164,7 @@ SPEED_ROUTINE_MPN_SQR_CALL (mpn_mul_fft_full (wp, s->xp, s->size, s->xp, s->size)); } - +#endif /* These are mod 2^N+1 multiplies and squares. If s->r is supplied it's used as k, otherwise the best k for the size is used. If s->size isn't a @@ -955,31 +1178,31 @@ unsigned i; \ double t; \ TMP_DECL; \ - \ + \ SPEED_RESTRICT_COND (s->size >= 1); \ - \ + \ if (s->r != 0) \ k = s->r; \ else \ k = mpn_fft_best_k (s->size, sqr); \ - \ + \ TMP_MARK; \ pl = mpn_fft_next_size (s->size, k); \ SPEED_TMP_ALLOC_LIMBS (wp, pl+1, s->align_wp); \ - \ + \ speed_operand_src (s, s->xp, s->size); \ if (!sqr) \ speed_operand_src (s, s->yp, s->size); \ speed_operand_dst (s, wp, pl+1); \ speed_cache_fill (s); \ - \ + \ speed_starttime (); \ i = s->reps; \ do \ call; \ while (--i != 0); \ t = speed_endtime (); \ - \ + \ TMP_FREE; \ return t; \ } @@ -999,14 +1222,50 @@ } double -speed_mpn_mullow_n (struct speed_params *s) +speed_mpn_fft_mul (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MUL_N_CALL (mpn_fft_mul (wp, s->xp, s->size, s->yp, s->size)); +} + +double +speed_mpn_fft_sqr (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_SQR_CALL (mpn_fft_mul (wp, s->xp, s->size, s->xp, s->size)); +} + +double +speed_mpn_mullo_n (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MULLO_N (mpn_mullo_n); +} +double +speed_mpn_mullo_basecase (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MULLO_BASECASE (mpn_mullo_basecase); +} + +double +speed_mpn_mulmod_bnm1 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL (mpn_mulmod_bnm1 (wp, s->size, s->xp, s->size, s->yp, s->size, tp)); +} + +double +speed_mpn_bc_mulmod_bnm1 (struct speed_params *s) +{ + SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL (mpn_bc_mulmod_bnm1 (wp, s->xp, s->yp, s->size, tp)); +} + +double +speed_mpn_mulmod_bnm1_rounded (struct speed_params *s) { - SPEED_ROUTINE_MPN_MULLOW_N (mpn_mullow_n); + SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED (mpn_mulmod_bnm1); } + double -speed_mpn_mullow_basecase (struct speed_params *s) +speed_mpn_sqrmod_bnm1 (struct speed_params *s) { - SPEED_ROUTINE_MPN_MULLOW_BASECASE (mpn_mullow_basecase); + SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL (mpn_sqrmod_bnm1 (wp, s->size, s->xp, s->size, tp)); } double @@ -1015,48 +1274,46 @@ /* Speed params only includes 2 inputs, so we have to invent the other 6. */ - mp_ptr a1, a2, a3; - mp_ptr r0, r1, r2, r3; - mp_ptr b1, b2, b3; + mp_ptr a; + mp_ptr r; + mp_ptr b; mp_ptr tp; - mp_size_t scratch; + mp_size_t itch; unsigned i; double t; TMP_DECL; TMP_MARK; - SPEED_TMP_ALLOC_LIMBS (a1, s->size, s->align_xp); - SPEED_TMP_ALLOC_LIMBS (a2, s->size, s->align_xp); - SPEED_TMP_ALLOC_LIMBS (a3, s->size, s->align_xp); - - SPEED_TMP_ALLOC_LIMBS (b1, s->size, s->align_yp); - SPEED_TMP_ALLOC_LIMBS (b2, s->size, s->align_yp); - SPEED_TMP_ALLOC_LIMBS (b3, s->size, s->align_yp); - - SPEED_TMP_ALLOC_LIMBS (r0, 2 * s->size +1, s->align_xp); - SPEED_TMP_ALLOC_LIMBS (r1, 2 * s->size +1, s->align_xp); - SPEED_TMP_ALLOC_LIMBS (r2, 2 * s->size +1, s->align_xp); - SPEED_TMP_ALLOC_LIMBS (r3, 2 * s->size +1, s->align_xp); - - mpn_random (a1, s->size); - mpn_random (a2, s->size); - mpn_random (a3, s->size); - mpn_random (b1, s->size); - mpn_random (b2, s->size); - mpn_random (b3, s->size); - - scratch = mpn_matrix22_mul_itch (s->size, s->size); - SPEED_TMP_ALLOC_LIMBS (tp, scratch, s->align_wp); + SPEED_TMP_ALLOC_LIMBS (a, 4 * s->size, s->align_xp); + SPEED_TMP_ALLOC_LIMBS (b, 4 * s->size, s->align_yp); + SPEED_TMP_ALLOC_LIMBS (r, 8 * s->size + 4, s->align_wp); + + MPN_COPY (a, s->xp, s->size); + mpn_random (a + s->size, 3 * s->size); + MPN_COPY (b, s->yp, s->size); + mpn_random (b + s->size, 3 * s->size); + + itch = mpn_matrix22_mul_itch (s->size, s->size); + SPEED_TMP_ALLOC_LIMBS (tp, itch, s->align_wp2); + + speed_operand_src (s, a, 4 * s->size); + speed_operand_src (s, b, 4 * s->size); + speed_operand_dst (s, r, 8 * s->size + 4); + speed_operand_dst (s, tp, itch); + speed_cache_fill (s); speed_starttime (); i = s->reps; do { - MPN_COPY (r0, s->xp, s->size); - MPN_COPY (r1, a1, s->size); - MPN_COPY (r2, a2, s->size); - MPN_COPY (r3, a3, s->size); - mpn_matrix22_mul (r0, r1, r2, r3, s->size, s->yp, b1, b2, b3, s->size, tp); + mp_size_t sz = s->size; + MPN_COPY (r + 0 * sz + 0, a + 0 * sz, sz); + MPN_COPY (r + 2 * sz + 1, a + 1 * sz, sz); + MPN_COPY (r + 4 * sz + 2, a + 2 * sz, sz); + MPN_COPY (r + 6 * sz + 3, a + 3 * sz, sz); + mpn_matrix22_mul (r, r + 2 * sz + 1, r + 4 * sz + 2, r + 6 * sz + 3, sz, + b, b + 1 * sz, b + 2 * sz, b + 3 * sz, sz, + tp); } while (--i != 0); t = speed_endtime(); @@ -1072,7 +1329,7 @@ mp_size_t hgcd_scratch = mpn_hgcd_itch (s->size); mp_ptr ap; mp_ptr bp; - mp_ptr tmp1, tmp2; + mp_ptr tmp1; struct hgcd_matrix hgcd; int res; @@ -1117,7 +1374,7 @@ mp_size_t hgcd_scratch = MPN_HGCD_LEHMER_ITCH (s->size); mp_ptr ap; mp_ptr bp; - mp_ptr tmp1, tmp2; + mp_ptr tmp1; struct hgcd_matrix hgcd; int res; @@ -1159,19 +1416,6 @@ { SPEED_ROUTINE_MPN_GCD (mpn_gcd); } -#if 0 -double -speed_mpn_gcd_binary (struct speed_params *s) -{ - SPEED_ROUTINE_MPN_GCD (mpn_gcd_binary); -} -double -speed_mpn_gcd_accel (struct speed_params *s) -{ - SPEED_ROUTINE_MPN_GCD (mpn_gcd_accel); -} -#endif - double speed_mpn_gcdext (struct speed_params *s) @@ -1382,12 +1626,12 @@ { \ unsigned i; \ variables; \ - \ + \ speed_starttime (); \ i = s->reps; \ do \ { \ - calls; \ + calls; \ } \ while (--i != 0); \ return speed_endtime (); \ @@ -1404,8 +1648,8 @@ { size_t bytes = s->size * BYTES_PER_MP_LIMB; SPEED_ROUTINE_ALLOC_FREE (void *p, - p = malloc (bytes); - free (p)); + p = malloc (bytes); + free (p)); } double @@ -1413,9 +1657,9 @@ { size_t bytes = s->size * BYTES_PER_MP_LIMB; SPEED_ROUTINE_ALLOC_FREE (void *p, - p = malloc (BYTES_PER_MP_LIMB); - p = realloc (p, bytes); - free (p)); + p = malloc (BYTES_PER_MP_LIMB); + p = realloc (p, bytes); + free (p)); } double @@ -1423,8 +1667,8 @@ { size_t bytes = s->size * BYTES_PER_MP_LIMB; SPEED_ROUTINE_ALLOC_FREE (void *p, - p = (*__gmp_allocate_func) (bytes); - (*__gmp_free_func) (p, bytes)); + p = (*__gmp_allocate_func) (bytes); + (*__gmp_free_func) (p, bytes)); } double @@ -1442,38 +1686,38 @@ speed_mpz_init_clear (struct speed_params *s) { SPEED_ROUTINE_ALLOC_FREE (mpz_t z, - mpz_init (z); - mpz_clear (z)); + mpz_init (z); + mpz_clear (z)); } double speed_mpz_init_realloc_clear (struct speed_params *s) { SPEED_ROUTINE_ALLOC_FREE (mpz_t z, - mpz_init (z); - _mpz_realloc (z, s->size); - mpz_clear (z)); + mpz_init (z); + _mpz_realloc (z, s->size); + mpz_clear (z)); } double speed_mpq_init_clear (struct speed_params *s) { SPEED_ROUTINE_ALLOC_FREE (mpq_t q, - mpq_init (q); - mpq_clear (q)); + mpq_init (q); + mpq_clear (q)); } double speed_mpf_init_clear (struct speed_params *s) { SPEED_ROUTINE_ALLOC_FREE (mpf_t f, - mpf_init (f); - mpf_clear (f)); + mpf_init (f); + mpf_clear (f)); } /* Compare this to mpn_add_n to see how much overhead mpz_add adds. Note - that repeatedly calling mpz_add with the same data gives branch predition + that repeatedly calling mpz_add with the same data gives branch prediction in it an advantage. */ double @@ -1564,41 +1808,41 @@ mp_limb_t h, l; \ unsigned i; \ double t; \ - \ + \ s->time_divisor = 10; \ - \ + \ h = s->xp[0]; \ l = s->yp[0]; \ - \ + \ if (s->r == 1) \ { \ - speed_starttime (); \ - i = s->reps; \ - do \ - { + speed_starttime (); \ + i = s->reps; \ + do \ + { #define SPEED_MACRO_UMUL_PPMM_B \ - } \ - while (--i != 0); \ - t = speed_endtime (); \ + } \ + while (--i != 0); \ + t = speed_endtime (); \ } \ else \ { \ - speed_starttime (); \ - i = s->reps; \ - do \ - { + speed_starttime (); \ + i = s->reps; \ + do \ + { #define SPEED_MACRO_UMUL_PPMM_C \ - } \ - while (--i != 0); \ - t = speed_endtime (); \ + } \ + while (--i != 0); \ + t = speed_endtime (); \ } \ - \ + \ /* stop the compiler optimizing away the whole calculation! */ \ noop_1 (h); \ noop_1 (l); \ - \ + \ return t; \ } @@ -1734,25 +1978,25 @@ unsigned i; \ mp_limb_t q, r, d; \ mp_limb_t dinv; \ - \ + \ s->time_divisor = 10; \ - \ + \ /* divisor from "r" parameter, or a default */ \ d = s->r; \ if (d == 0) \ - d = __mp_bases[10].big_base; \ - \ + d = mp_bases[10].big_base; \ + \ if (normalize) \ { \ - unsigned norm; \ - count_leading_zeros (norm, d); \ - d <<= norm; \ - invert_limb (dinv, d); \ + unsigned norm; \ + count_leading_zeros (norm, d); \ + d <<= norm; \ + invert_limb (dinv, d); \ } \ - \ + \ q = s->xp[0]; \ r = s->yp[0] % d; \ - \ + \ speed_starttime (); \ i = s->reps; \ do \ @@ -1762,11 +2006,11 @@ } \ while (--i != 0); \ t = speed_endtime (); \ - \ + \ /* stop the compiler optimizing away the whole calculation! */ \ noop_1 (q); \ noop_1 (r); \ - \ + \ return t; \ } @@ -1910,7 +2154,7 @@ /* divisor from "r" parameter, or a default */ d = s->r; if (d == 0) - d = __mp_bases[10].big_base; + d = mp_bases[10].big_base; x = s->xp[0]; q = 0; @@ -1951,7 +2195,7 @@ /* divisor from "r" parameter, or a default */ d = s->r; if (d == 0) - d = __mp_bases[10].big_base; + d = mp_bases[10].big_base; x = s->xp[0]; r = 0; @@ -1985,12 +2229,12 @@ be typical for count_trailing_zeros in a GCD etc. r==1 measures on data with the resultant count uniformly distributed - between 0 and BITS_PER_MP_LIMB-1. This is probably sensible for + between 0 and GMP_LIMB_BITS-1. This is probably sensible for count_leading_zeros on the high limbs of divisors. */ int speed_routine_count_zeros_setup (struct speed_params *s, - mp_ptr xp, int leading, int zero) + mp_ptr xp, int leading, int zero) { int i, c; mp_limb_t n; @@ -1998,26 +2242,26 @@ if (s->r == 0) { /* Make uniformly distributed data. If zero isn't allowed then change - it to 1 for leading, or 0x800..00 for trailing. */ + it to 1 for leading, or 0x800..00 for trailing. */ MPN_COPY (xp, s->xp_block, SPEED_BLOCK_SIZE); if (! zero) - for (i = 0; i < SPEED_BLOCK_SIZE; i++) - if (xp[i] == 0) - xp[i] = leading ? 1 : GMP_LIMB_HIGHBIT; + for (i = 0; i < SPEED_BLOCK_SIZE; i++) + if (xp[i] == 0) + xp[i] = leading ? 1 : GMP_LIMB_HIGHBIT; } else if (s->r == 1) { /* Make counts uniformly distributed. A randomly chosen bit is set, and - for leading the rest above it are cleared, or for trailing then the - rest below. */ + for leading the rest above it are cleared, or for trailing then the + rest below. */ for (i = 0; i < SPEED_BLOCK_SIZE; i++) - { - mp_limb_t set = CNST_LIMB(1) << (s->yp_block[i] % BITS_PER_MP_LIMB); - mp_limb_t keep_below = set-1; - mp_limb_t keep_above = MP_LIMB_T_MAX ^ keep_below; - mp_limb_t keep = (leading ? keep_below : keep_above); - xp[i] = (s->xp_block[i] & keep) | set; - } + { + mp_limb_t set = CNST_LIMB(1) << (s->yp_block[i] % GMP_LIMB_BITS); + mp_limb_t keep_below = set-1; + mp_limb_t keep_above = MP_LIMB_T_MAX ^ keep_below; + mp_limb_t keep = (leading ? keep_below : keep_above); + xp[i] = (s->xp_block[i] & keep) | set; + } } else { @@ -2032,9 +2276,9 @@ xp[i] ^= c; if (leading) - count_leading_zeros (c, n); + count_leading_zeros (c, n); else - count_trailing_zeros (c, n); + count_trailing_zeros (c, n); } return 1; @@ -2150,7 +2394,7 @@ gmp_randseed_ui (rstate, (unsigned long) s->xp_block[j]); j++; if (j >= SPEED_BLOCK_SIZE) - j = 0; + j = 0; } while (--i != 0); t = speed_endtime (); diff -Nru gmp-4.3.2+dfsg/tune/Makefile.am gmp-5.0.2+dfsg/tune/Makefile.am --- gmp-4.3.2+dfsg/tune/Makefile.am 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/Makefile.am 2011-05-08 09:49:29.000000000 +0000 @@ -41,13 +41,12 @@ libspeed_la_SOURCES = \ common.c divrem1div.c divrem1inv.c divrem2div.c divrem2inv.c \ - freq.c \ + freq.c \ gcdext_single.c gcdext_double.c gcdextod.c gcdextos.c \ jacbase1.c jacbase2.c jacbase3.c \ mod_1_div.c mod_1_inv.c modlinv.c \ noop.c powm_mod.c powm_redc.c pre_divrem_1.c \ - set_strb.c set_strs.c set_strp.c time.c \ - sb_div.c sb_inv.c + set_strb.c set_strs.c set_strp.c time.c libspeed_la_DEPENDENCIES = $(SPEED_CYCLECOUNTER_OBJ) \ $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la @@ -123,9 +122,13 @@ # recompiled object will be rebuilt if that file changes. TUNE_MPN_SRCS = $(TUNE_MPN_SRCS_BASIC) divrem_1.c mod_1.c -TUNE_MPN_SRCS_BASIC = dc_divrem_n.c divrem_2.c gcd.c gcdext.c get_str.c \ - set_str.c matrix22_mul.c hgcd.c mul_n.c toom44_mul.c toom4_sqr.c \ - mullow_n.c mul_fft.c mul.c sb_divrem_mn.c tdiv_qr.c +TUNE_MPN_SRCS_BASIC = bdiv_q.c bdiv_qr.c \ + dcpi1_div_qr.c dcpi1_divappr_q.c dcpi1_bdiv_qr.c dcpi1_bdiv_q.c \ + invertappr.c invert.c binvert.c divrem_2.c gcd.c gcdext.c \ + get_str.c set_str.c matrix22_mul.c hgcd.c mul_n.c sqr.c \ + mullo_n.c mul_fft.c mul.c tdiv_qr.c mulmod_bnm1.c sqrmod_bnm1.c \ + nussbaumer_mul.c toom6h_mul.c toom8h_mul.c toom6_sqr.c toom8_sqr.c \ + toom22_mul.c toom2_sqr.c toom33_mul.c toom3_sqr.c toom44_mul.c toom4_sqr.c $(TUNE_MPN_SRCS_BASIC): for i in $(TUNE_MPN_SRCS_BASIC); do \ @@ -144,60 +147,8 @@ echo "#include \"mpn/generic/mod_1.c\"" >>mod_1.c sqr_asm.asm: $(top_builddir)/mpn/sqr_basecase.asm - echo 'define(SQR_KARATSUBA_THRESHOLD_OVERRIDE,SQR_KARATSUBA_THRESHOLD_MAX)' >sqr_asm.asm + echo 'define(SQR_TOOM2_THRESHOLD_OVERRIDE,SQR_TOOM2_THRESHOLD_MAX)' >sqr_asm.asm echo 'include(../mpn/sqr_basecase.asm)' >>sqr_asm.asm include ../mpn/Makeasm.am - - -# "mk" is multiplication in the karatsuba range -# "st" is squaring in the toom-cook range, etc -# "g" forms produce graphs - -mk: - ./speed -s 5-40 -c mpn_mul_basecase mpn_kara_mul_n - -MTS = -s 50-150 -c -mt: - ./speed $(MTS) mpn_kara_mul_n mpn_toom3_mul_n -mtg: - ./speed $(MTS) -P mtg mpn_kara_mul_n mpn_toom3_mul_n - -sk: - ./speed -s 5-40 -c mpn_sqr_basecase mpn_kara_sqr_n - -STS = -s 50-150 -c -st: - ./speed $(STS) mpn_kara_sqr_n mpn_toom3_sqr_n -stg: - ./speed $(STS) -P stg mpn_kara_sqr_n mpn_toom3_sqr_n - -dc: - ./speed -s 5-40 -c mpn_dc_divrem_sb mpn_dc_divrem_n mpn_dc_tdiv_qr - -fib: - ./speed -s 40-60 -c mpz_fib_ui -fibg: - ./speed -s 10-300 -P fibg mpz_fib_ui - - -gcd: - ./speed -s 1-20 -c mpn_gcd - -udiv: - ./speed -s 1 -c udiv_qrnnd udiv_qrnnd_preinv udiv_qrnnd_preinv2norm invert_limb udiv_qrnnd_c - -divn: - ./speed -s 1-30 -c mpn_divrem_1_div.-1 mpn_divrem_1_inv.-1 -divun: - ./speed -s 1-30 -c mpn_divrem_1_div.12345 mpn_divrem_1_inv.12345 -modn: - ./speed -s 1-30 -c mpn_mod_1_div.-1 mpn_mod_1_inv.-1 -modun: - ./speed -s 1-30 -c mpn_mod_1_div.12345 mpn_mod_1_inv.12345 - - -graph: - ./speed -s 1-5000 -f 1.02 -P graph mpn_mul_n mpn_sqr - gnuplot graph.gnuplot diff -Nru gmp-4.3.2+dfsg/tune/Makefile.in gmp-5.0.2+dfsg/tune/Makefile.in --- gmp-4.3.2+dfsg/tune/Makefile.in 2010-01-09 06:26:23.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/Makefile.in 2011-08-30 01:19:41.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.11 from Makefile.am. +# Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, @@ -93,7 +93,7 @@ jacbase2$U.lo jacbase3$U.lo mod_1_div$U.lo mod_1_inv$U.lo \ modlinv$U.lo noop$U.lo powm_mod$U.lo powm_redc$U.lo \ pre_divrem_1$U.lo set_strb$U.lo set_strs$U.lo set_strp$U.lo \ - time$U.lo sb_div$U.lo sb_inv$U.lo + time$U.lo libspeed_la_OBJECTS = $(am_libspeed_la_OBJECTS) libspeed_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ @@ -117,12 +117,21 @@ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(speed_ext_LDFLAGS) $(LDFLAGS) -o $@ am_tuneup_OBJECTS = tuneup$U.$(OBJEXT) -am__objects_1 = dc_divrem_n$U.$(OBJEXT) divrem_2$U.$(OBJEXT) \ - gcd$U.$(OBJEXT) gcdext$U.$(OBJEXT) get_str$U.$(OBJEXT) \ - set_str$U.$(OBJEXT) matrix22_mul$U.$(OBJEXT) hgcd$U.$(OBJEXT) \ - mul_n$U.$(OBJEXT) toom44_mul$U.$(OBJEXT) toom4_sqr$U.$(OBJEXT) \ - mullow_n$U.$(OBJEXT) mul_fft$U.$(OBJEXT) mul$U.$(OBJEXT) \ - sb_divrem_mn$U.$(OBJEXT) tdiv_qr$U.$(OBJEXT) +am__objects_1 = bdiv_q$U.$(OBJEXT) bdiv_qr$U.$(OBJEXT) \ + dcpi1_div_qr$U.$(OBJEXT) dcpi1_divappr_q$U.$(OBJEXT) \ + dcpi1_bdiv_qr$U.$(OBJEXT) dcpi1_bdiv_q$U.$(OBJEXT) \ + invertappr$U.$(OBJEXT) invert$U.$(OBJEXT) binvert$U.$(OBJEXT) \ + divrem_2$U.$(OBJEXT) gcd$U.$(OBJEXT) gcdext$U.$(OBJEXT) \ + get_str$U.$(OBJEXT) set_str$U.$(OBJEXT) \ + matrix22_mul$U.$(OBJEXT) hgcd$U.$(OBJEXT) mul_n$U.$(OBJEXT) \ + sqr$U.$(OBJEXT) mullo_n$U.$(OBJEXT) mul_fft$U.$(OBJEXT) \ + mul$U.$(OBJEXT) tdiv_qr$U.$(OBJEXT) mulmod_bnm1$U.$(OBJEXT) \ + sqrmod_bnm1$U.$(OBJEXT) nussbaumer_mul$U.$(OBJEXT) \ + toom6h_mul$U.$(OBJEXT) toom8h_mul$U.$(OBJEXT) \ + toom6_sqr$U.$(OBJEXT) toom8_sqr$U.$(OBJEXT) \ + toom22_mul$U.$(OBJEXT) toom2_sqr$U.$(OBJEXT) \ + toom33_mul$U.$(OBJEXT) toom3_sqr$U.$(OBJEXT) \ + toom44_mul$U.$(OBJEXT) toom4_sqr$U.$(OBJEXT) am__objects_2 = $(am__objects_1) divrem_1$U.$(OBJEXT) \ mod_1$U.$(OBJEXT) nodist_tuneup_OBJECTS = sqr_basecase$U.$(OBJEXT) $(am__objects_2) @@ -163,7 +172,6 @@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ -BITS_PER_MP_LIMB = @BITS_PER_MP_LIMB@ CALLING_CONVENTIONS_OBJS = @CALLING_CONVENTIONS_OBJS@ CC = @CC@ CCAS = @CCAS@ @@ -187,10 +195,9 @@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ EXEEXT_FOR_BUILD = @EXEEXT_FOR_BUILD@ -F77 = @F77@ -FFLAGS = @FFLAGS@ FGREP = @FGREP@ GMP_LDFLAGS = @GMP_LDFLAGS@ +GMP_LIMB_BITS = @GMP_LIMB_BITS@ GMP_NAIL_BITS = @GMP_NAIL_BITS@ GREP = @GREP@ HAVE_CLOCK_01 = @HAVE_CLOCK_01@ @@ -230,6 +237,7 @@ M4 = @M4@ MAINT = @MAINT@ MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ @@ -263,10 +271,10 @@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ -ac_ct_F77 = @ac_ct_F77@ am__leading_dot = @am__leading_dot@ am__tar = @am__tar@ am__untar = @am__untar@ @@ -296,7 +304,6 @@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ -lt_ECHO = @lt_ECHO@ mandir = @mandir@ mkdir_p = @mkdir_p@ mpn_objects = @mpn_objects@ @@ -332,13 +339,12 @@ EXTRA_LTLIBRARIES = libspeed.la libspeed_la_SOURCES = \ common.c divrem1div.c divrem1inv.c divrem2div.c divrem2inv.c \ - freq.c \ + freq.c \ gcdext_single.c gcdext_double.c gcdextod.c gcdextos.c \ jacbase1.c jacbase2.c jacbase3.c \ mod_1_div.c mod_1_inv.c modlinv.c \ noop.c powm_mod.c powm_redc.c pre_divrem_1.c \ - set_strb.c set_strs.c set_strp.c time.c \ - sb_div.c sb_inv.c + set_strb.c set_strs.c set_strp.c time.c libspeed_la_DEPENDENCIES = $(SPEED_CYCLECOUNTER_OBJ) \ $(top_builddir)/tests/libtests.la $(top_builddir)/libgmp.la @@ -385,9 +391,13 @@ # FIXME: Would like say mul_n.c to depend on $(top_builddir)/mul_n.c so the # recompiled object will be rebuilt if that file changes. TUNE_MPN_SRCS = $(TUNE_MPN_SRCS_BASIC) divrem_1.c mod_1.c -TUNE_MPN_SRCS_BASIC = dc_divrem_n.c divrem_2.c gcd.c gcdext.c get_str.c \ - set_str.c matrix22_mul.c hgcd.c mul_n.c toom44_mul.c toom4_sqr.c \ - mullow_n.c mul_fft.c mul.c sb_divrem_mn.c tdiv_qr.c +TUNE_MPN_SRCS_BASIC = bdiv_q.c bdiv_qr.c \ + dcpi1_div_qr.c dcpi1_divappr_q.c dcpi1_bdiv_qr.c dcpi1_bdiv_q.c \ + invertappr.c invert.c binvert.c divrem_2.c gcd.c gcdext.c \ + get_str.c set_str.c matrix22_mul.c hgcd.c mul_n.c sqr.c \ + mullo_n.c mul_fft.c mul.c tdiv_qr.c mulmod_bnm1.c sqrmod_bnm1.c \ + nussbaumer_mul.c toom6h_mul.c toom8h_mul.c toom6_sqr.c toom8_sqr.c \ + toom22_mul.c toom2_sqr.c toom33_mul.c toom3_sqr.c toom44_mul.c toom4_sqr.c # COMPILE minus CC. @@ -418,8 +428,6 @@ # can be overridden during development, eg. "make RM_TMP=: mul_1.lo" RM_TMP = rm -f -MTS = -s 50-150 -c -STS = -s 50-150 -c all: all-am .SUFFIXES: @@ -488,10 +496,22 @@ .c.lo: $(LTCOMPILE) -c -o $@ $< +bdiv_q_.c: bdiv_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/bdiv_q.c; then echo $(srcdir)/bdiv_q.c; else echo bdiv_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +bdiv_qr_.c: bdiv_qr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/bdiv_qr.c; then echo $(srcdir)/bdiv_qr.c; else echo bdiv_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +binvert_.c: binvert.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/binvert.c; then echo $(srcdir)/binvert.c; else echo binvert.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ common_.c: common.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/common.c; then echo $(srcdir)/common.c; else echo common.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -dc_divrem_n_.c: dc_divrem_n.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dc_divrem_n.c; then echo $(srcdir)/dc_divrem_n.c; else echo dc_divrem_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_bdiv_q_.c: dcpi1_bdiv_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_bdiv_q.c; then echo $(srcdir)/dcpi1_bdiv_q.c; else echo dcpi1_bdiv_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_bdiv_qr_.c: dcpi1_bdiv_qr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_bdiv_qr.c; then echo $(srcdir)/dcpi1_bdiv_qr.c; else echo dcpi1_bdiv_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_div_qr_.c: dcpi1_div_qr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_div_qr.c; then echo $(srcdir)/dcpi1_div_qr.c; else echo dcpi1_div_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +dcpi1_divappr_q_.c: dcpi1_divappr_q.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/dcpi1_divappr_q.c; then echo $(srcdir)/dcpi1_divappr_q.c; else echo dcpi1_divappr_q.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ divrem1div_.c: divrem1div.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/divrem1div.c; then echo $(srcdir)/divrem1div.c; else echo divrem1div.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ divrem1inv_.c: divrem1inv.c $(ANSI2KNR) @@ -522,6 +542,10 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/get_str.c; then echo $(srcdir)/get_str.c; else echo get_str.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ hgcd_.c: hgcd.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/hgcd.c; then echo $(srcdir)/hgcd.c; else echo hgcd.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +invert_.c: invert.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/invert.c; then echo $(srcdir)/invert.c; else echo invert.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +invertappr_.c: invertappr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/invertappr.c; then echo $(srcdir)/invertappr.c; else echo invertappr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ jacbase1_.c: jacbase1.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/jacbase1.c; then echo $(srcdir)/jacbase1.c; else echo jacbase1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ jacbase2_.c: jacbase2.c $(ANSI2KNR) @@ -544,22 +568,20 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mul_fft.c; then echo $(srcdir)/mul_fft.c; else echo mul_fft.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ mul_n_.c: mul_n.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mul_n.c; then echo $(srcdir)/mul_n.c; else echo mul_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -mullow_n_.c: mullow_n.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mullow_n.c; then echo $(srcdir)/mullow_n.c; else echo mullow_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +mullo_n_.c: mullo_n.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mullo_n.c; then echo $(srcdir)/mullo_n.c; else echo mullo_n.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +mulmod_bnm1_.c: mulmod_bnm1.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/mulmod_bnm1.c; then echo $(srcdir)/mulmod_bnm1.c; else echo mulmod_bnm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ noop_.c: noop.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/noop.c; then echo $(srcdir)/noop.c; else echo noop.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +nussbaumer_mul_.c: nussbaumer_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nussbaumer_mul.c; then echo $(srcdir)/nussbaumer_mul.c; else echo nussbaumer_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ powm_mod_.c: powm_mod.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/powm_mod.c; then echo $(srcdir)/powm_mod.c; else echo powm_mod.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ powm_redc_.c: powm_redc.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/powm_redc.c; then echo $(srcdir)/powm_redc.c; else echo powm_redc.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ pre_divrem_1_.c: pre_divrem_1.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/pre_divrem_1.c; then echo $(srcdir)/pre_divrem_1.c; else echo pre_divrem_1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -sb_div_.c: sb_div.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sb_div.c; then echo $(srcdir)/sb_div.c; else echo sb_div.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -sb_divrem_mn_.c: sb_divrem_mn.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sb_divrem_mn.c; then echo $(srcdir)/sb_divrem_mn.c; else echo sb_divrem_mn.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -sb_inv_.c: sb_inv.c $(ANSI2KNR) - $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sb_inv.c; then echo $(srcdir)/sb_inv.c; else echo sb_inv.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ set_str_.c: set_str.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/set_str.c; then echo $(srcdir)/set_str.c; else echo set_str.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ set_strb_.c: set_strb.c $(ANSI2KNR) @@ -572,43 +594,74 @@ $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/speed.c; then echo $(srcdir)/speed.c; else echo speed.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ speed-ext_.c: speed-ext.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/speed-ext.c; then echo $(srcdir)/speed-ext.c; else echo speed-ext.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +sqr_.c: sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqr.c; then echo $(srcdir)/sqr.c; else echo sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ sqr_basecase_.c: sqr_basecase.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqr_basecase.c; then echo $(srcdir)/sqr_basecase.c; else echo sqr_basecase.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +sqrmod_bnm1_.c: sqrmod_bnm1.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/sqrmod_bnm1.c; then echo $(srcdir)/sqrmod_bnm1.c; else echo sqrmod_bnm1.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ tdiv_qr_.c: tdiv_qr.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tdiv_qr.c; then echo $(srcdir)/tdiv_qr.c; else echo tdiv_qr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ time_.c: time.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/time.c; then echo $(srcdir)/time.c; else echo time.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom22_mul_.c: toom22_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom22_mul.c; then echo $(srcdir)/toom22_mul.c; else echo toom22_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom2_sqr_.c: toom2_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom2_sqr.c; then echo $(srcdir)/toom2_sqr.c; else echo toom2_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom33_mul_.c: toom33_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom33_mul.c; then echo $(srcdir)/toom33_mul.c; else echo toom33_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom3_sqr_.c: toom3_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom3_sqr.c; then echo $(srcdir)/toom3_sqr.c; else echo toom3_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ toom44_mul_.c: toom44_mul.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom44_mul.c; then echo $(srcdir)/toom44_mul.c; else echo toom44_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ toom4_sqr_.c: toom4_sqr.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom4_sqr.c; then echo $(srcdir)/toom4_sqr.c; else echo toom4_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom6_sqr_.c: toom6_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom6_sqr.c; then echo $(srcdir)/toom6_sqr.c; else echo toom6_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom6h_mul_.c: toom6h_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom6h_mul.c; then echo $(srcdir)/toom6h_mul.c; else echo toom6h_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom8_sqr_.c: toom8_sqr.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom8_sqr.c; then echo $(srcdir)/toom8_sqr.c; else echo toom8_sqr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ +toom8h_mul_.c: toom8h_mul.c $(ANSI2KNR) + $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/toom8h_mul.c; then echo $(srcdir)/toom8h_mul.c; else echo toom8h_mul.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ tuneup_.c: tuneup.c $(ANSI2KNR) $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/tuneup.c; then echo $(srcdir)/tuneup.c; else echo tuneup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > $@ || rm -f $@ -common_.$(OBJEXT) common_.lo dc_divrem_n_.$(OBJEXT) dc_divrem_n_.lo \ -divrem1div_.$(OBJEXT) divrem1div_.lo divrem1inv_.$(OBJEXT) \ -divrem1inv_.lo divrem2div_.$(OBJEXT) divrem2div_.lo \ -divrem2inv_.$(OBJEXT) divrem2inv_.lo divrem_1_.$(OBJEXT) divrem_1_.lo \ -divrem_2_.$(OBJEXT) divrem_2_.lo freq_.$(OBJEXT) freq_.lo \ -gcd_.$(OBJEXT) gcd_.lo gcdext_.$(OBJEXT) gcdext_.lo \ -gcdext_double_.$(OBJEXT) gcdext_double_.lo gcdext_single_.$(OBJEXT) \ -gcdext_single_.lo gcdextod_.$(OBJEXT) gcdextod_.lo gcdextos_.$(OBJEXT) \ -gcdextos_.lo get_str_.$(OBJEXT) get_str_.lo hgcd_.$(OBJEXT) hgcd_.lo \ +bdiv_q_.$(OBJEXT) bdiv_q_.lo bdiv_qr_.$(OBJEXT) bdiv_qr_.lo \ +binvert_.$(OBJEXT) binvert_.lo common_.$(OBJEXT) common_.lo \ +dcpi1_bdiv_q_.$(OBJEXT) dcpi1_bdiv_q_.lo dcpi1_bdiv_qr_.$(OBJEXT) \ +dcpi1_bdiv_qr_.lo dcpi1_div_qr_.$(OBJEXT) dcpi1_div_qr_.lo \ +dcpi1_divappr_q_.$(OBJEXT) dcpi1_divappr_q_.lo divrem1div_.$(OBJEXT) \ +divrem1div_.lo divrem1inv_.$(OBJEXT) divrem1inv_.lo \ +divrem2div_.$(OBJEXT) divrem2div_.lo divrem2inv_.$(OBJEXT) \ +divrem2inv_.lo divrem_1_.$(OBJEXT) divrem_1_.lo divrem_2_.$(OBJEXT) \ +divrem_2_.lo freq_.$(OBJEXT) freq_.lo gcd_.$(OBJEXT) gcd_.lo \ +gcdext_.$(OBJEXT) gcdext_.lo gcdext_double_.$(OBJEXT) \ +gcdext_double_.lo gcdext_single_.$(OBJEXT) gcdext_single_.lo \ +gcdextod_.$(OBJEXT) gcdextod_.lo gcdextos_.$(OBJEXT) gcdextos_.lo \ +get_str_.$(OBJEXT) get_str_.lo hgcd_.$(OBJEXT) hgcd_.lo \ +invert_.$(OBJEXT) invert_.lo invertappr_.$(OBJEXT) invertappr_.lo \ jacbase1_.$(OBJEXT) jacbase1_.lo jacbase2_.$(OBJEXT) jacbase2_.lo \ jacbase3_.$(OBJEXT) jacbase3_.lo matrix22_mul_.$(OBJEXT) \ matrix22_mul_.lo mod_1_.$(OBJEXT) mod_1_.lo mod_1_div_.$(OBJEXT) \ mod_1_div_.lo mod_1_inv_.$(OBJEXT) mod_1_inv_.lo modlinv_.$(OBJEXT) \ modlinv_.lo mul_.$(OBJEXT) mul_.lo mul_fft_.$(OBJEXT) mul_fft_.lo \ -mul_n_.$(OBJEXT) mul_n_.lo mullow_n_.$(OBJEXT) mullow_n_.lo \ -noop_.$(OBJEXT) noop_.lo powm_mod_.$(OBJEXT) powm_mod_.lo \ -powm_redc_.$(OBJEXT) powm_redc_.lo pre_divrem_1_.$(OBJEXT) \ -pre_divrem_1_.lo sb_div_.$(OBJEXT) sb_div_.lo sb_divrem_mn_.$(OBJEXT) \ -sb_divrem_mn_.lo sb_inv_.$(OBJEXT) sb_inv_.lo set_str_.$(OBJEXT) \ +mul_n_.$(OBJEXT) mul_n_.lo mullo_n_.$(OBJEXT) mullo_n_.lo \ +mulmod_bnm1_.$(OBJEXT) mulmod_bnm1_.lo noop_.$(OBJEXT) noop_.lo \ +nussbaumer_mul_.$(OBJEXT) nussbaumer_mul_.lo powm_mod_.$(OBJEXT) \ +powm_mod_.lo powm_redc_.$(OBJEXT) powm_redc_.lo \ +pre_divrem_1_.$(OBJEXT) pre_divrem_1_.lo set_str_.$(OBJEXT) \ set_str_.lo set_strb_.$(OBJEXT) set_strb_.lo set_strp_.$(OBJEXT) \ set_strp_.lo set_strs_.$(OBJEXT) set_strs_.lo speed_.$(OBJEXT) \ -speed_.lo speed-ext_.$(OBJEXT) speed-ext_.lo sqr_basecase_.$(OBJEXT) \ -sqr_basecase_.lo tdiv_qr_.$(OBJEXT) tdiv_qr_.lo time_.$(OBJEXT) \ -time_.lo toom44_mul_.$(OBJEXT) toom44_mul_.lo toom4_sqr_.$(OBJEXT) \ -toom4_sqr_.lo tuneup_.$(OBJEXT) tuneup_.lo : $(ANSI2KNR) +speed_.lo speed-ext_.$(OBJEXT) speed-ext_.lo sqr_.$(OBJEXT) sqr_.lo \ +sqr_basecase_.$(OBJEXT) sqr_basecase_.lo sqrmod_bnm1_.$(OBJEXT) \ +sqrmod_bnm1_.lo tdiv_qr_.$(OBJEXT) tdiv_qr_.lo time_.$(OBJEXT) \ +time_.lo toom22_mul_.$(OBJEXT) toom22_mul_.lo toom2_sqr_.$(OBJEXT) \ +toom2_sqr_.lo toom33_mul_.$(OBJEXT) toom33_mul_.lo \ +toom3_sqr_.$(OBJEXT) toom3_sqr_.lo toom44_mul_.$(OBJEXT) \ +toom44_mul_.lo toom4_sqr_.$(OBJEXT) toom4_sqr_.lo toom6_sqr_.$(OBJEXT) \ +toom6_sqr_.lo toom6h_mul_.$(OBJEXT) toom6h_mul_.lo \ +toom8_sqr_.$(OBJEXT) toom8_sqr_.lo toom8h_mul_.$(OBJEXT) \ +toom8h_mul_.lo tuneup_.$(OBJEXT) tuneup_.lo : $(ANSI2KNR) mostlyclean-libtool: -rm -f *.lo @@ -839,7 +892,7 @@ echo "#include \"mpn/generic/mod_1.c\"" >>mod_1.c sqr_asm.asm: $(top_builddir)/mpn/sqr_basecase.asm - echo 'define(SQR_KARATSUBA_THRESHOLD_OVERRIDE,SQR_KARATSUBA_THRESHOLD_MAX)' >sqr_asm.asm + echo 'define(SQR_TOOM2_THRESHOLD_OVERRIDE,SQR_TOOM2_THRESHOLD_MAX)' >sqr_asm.asm echo 'include(../mpn/sqr_basecase.asm)' >>sqr_asm.asm # .s assembler, no preprocessing. @@ -898,51 +951,6 @@ .asm.lo: $(LIBTOOL) --mode=compile --tag=CC $(top_srcdir)/mpn/m4-ccas --m4="$(M4)" $(CCAS) $(COMPILE_FLAGS) `test -f '$<' || echo '$(srcdir)/'`$< -# "mk" is multiplication in the karatsuba range -# "st" is squaring in the toom-cook range, etc -# "g" forms produce graphs - -mk: - ./speed -s 5-40 -c mpn_mul_basecase mpn_kara_mul_n -mt: - ./speed $(MTS) mpn_kara_mul_n mpn_toom3_mul_n -mtg: - ./speed $(MTS) -P mtg mpn_kara_mul_n mpn_toom3_mul_n - -sk: - ./speed -s 5-40 -c mpn_sqr_basecase mpn_kara_sqr_n -st: - ./speed $(STS) mpn_kara_sqr_n mpn_toom3_sqr_n -stg: - ./speed $(STS) -P stg mpn_kara_sqr_n mpn_toom3_sqr_n - -dc: - ./speed -s 5-40 -c mpn_dc_divrem_sb mpn_dc_divrem_n mpn_dc_tdiv_qr - -fib: - ./speed -s 40-60 -c mpz_fib_ui -fibg: - ./speed -s 10-300 -P fibg mpz_fib_ui - -gcd: - ./speed -s 1-20 -c mpn_gcd - -udiv: - ./speed -s 1 -c udiv_qrnnd udiv_qrnnd_preinv udiv_qrnnd_preinv2norm invert_limb udiv_qrnnd_c - -divn: - ./speed -s 1-30 -c mpn_divrem_1_div.-1 mpn_divrem_1_inv.-1 -divun: - ./speed -s 1-30 -c mpn_divrem_1_div.12345 mpn_divrem_1_inv.12345 -modn: - ./speed -s 1-30 -c mpn_mod_1_div.-1 mpn_mod_1_inv.-1 -modun: - ./speed -s 1-30 -c mpn_mod_1_div.12345 mpn_mod_1_inv.12345 - -graph: - ./speed -s 1-5000 -f 1.02 -P graph mpn_mul_n mpn_sqr - gnuplot graph.gnuplot - # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff -Nru gmp-4.3.2+dfsg/tune/many.pl gmp-5.0.2+dfsg/tune/many.pl --- gmp-4.3.2+dfsg/tune/many.pl 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/many.pl 2011-05-08 09:49:29.000000000 +0000 @@ -369,23 +369,14 @@ }, { - 'regexp'=> 'addsub_n', + 'regexp'=> 'add_n_sub_n', 'ret' => 'mp_limb_t', 'args' => 'mp_ptr sum, mp_ptr diff, mp_srcptr xp, mp_srcptr yp, mp_size_t size', 'speed_flags'=> 'FLAG_R_OPTIONAL', }, { - 'regexp'=> 'bdivmod', - 'ret' => 'mp_limb_t', - 'args' => 'mp_ptr qp, mp_ptr up, mp_size_t usize, mp_srcptr vp, mp_size_t vsize, unsigned long int d', - 'carrys'=> [''], - 'try' => 'none', - 'speed' => 'none', - }, - - { - 'regexp'=> 'com_n|copyi|copyd', + 'regexp'=> 'com|copyi|copyd', 'ret' => 'void', 'args' => 'mp_ptr wp, mp_srcptr xp, mp_size_t size', 'speed' => 'SPEED_ROUTINE_MPN_COPY', diff -Nru gmp-4.3.2+dfsg/tune/mod_1_div.c gmp-5.0.2+dfsg/tune/mod_1_div.c --- gmp-4.3.2+dfsg/tune/mod_1_div.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/mod_1_div.c 2011-05-08 09:49:29.000000000 +0000 @@ -24,8 +24,12 @@ #undef MOD_1_NORM_THRESHOLD #undef MOD_1_UNNORM_THRESHOLD +#undef MOD_1N_TO_MOD_1_1_THRESHOLD +#undef MOD_1U_TO_MOD_1_1_THRESHOLD #define MOD_1_NORM_THRESHOLD MP_SIZE_T_MAX #define MOD_1_UNNORM_THRESHOLD MP_SIZE_T_MAX +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX +#define MOD_1U_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX #define __gmpn_mod_1 mpn_mod_1_div #include "mpn/generic/mod_1.c" diff -Nru gmp-4.3.2+dfsg/tune/mod_1_inv.c gmp-5.0.2+dfsg/tune/mod_1_inv.c --- gmp-4.3.2+dfsg/tune/mod_1_inv.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/mod_1_inv.c 2011-05-08 09:49:29.000000000 +0000 @@ -24,8 +24,12 @@ #undef MOD_1_NORM_THRESHOLD #undef MOD_1_UNNORM_THRESHOLD +#undef MOD_1N_TO_MOD_1_1_THRESHOLD +#undef MOD_1U_TO_MOD_1_1_THRESHOLD #define MOD_1_NORM_THRESHOLD 0 #define MOD_1_UNNORM_THRESHOLD 0 +#define MOD_1N_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX +#define MOD_1U_TO_MOD_1_1_THRESHOLD MP_SIZE_T_MAX #define __gmpn_mod_1 mpn_mod_1_inv #include "mpn/generic/mod_1.c" diff -Nru gmp-4.3.2+dfsg/tune/modlinv.c gmp-5.0.2+dfsg/tune/modlinv.c --- gmp-4.3.2+dfsg/tune/modlinv.c 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/modlinv.c 2011-05-08 09:49:29.000000000 +0000 @@ -30,7 +30,7 @@ dependent chain, whereas the "2*" in the standard version isn't. Depending on the CPU this should be the same or a touch slower. */ -#if BITS_PER_MP_LIMB <= 32 +#if GMP_LIMB_BITS <= 32 #define binvert_limb_mul1(inv,n) \ do { \ mp_limb_t __n = (n); \ @@ -44,7 +44,7 @@ } while (0) #endif -#if BITS_PER_MP_LIMB > 32 && BITS_PER_MP_LIMB <= 64 +#if GMP_LIMB_BITS > 32 && GMP_LIMB_BITS <= 64 #define binvert_limb_mul1(inv,n) \ do { \ mp_limb_t __n = (n); \ @@ -100,7 +100,7 @@ \ ASSERT ((__n & 1) == 1); \ \ - __count = BITS_PER_MP_LIMB-1; \ + __count = GMP_LIMB_BITS-1; \ do \ { \ __inv >>= 1; \ @@ -131,11 +131,11 @@ \ ASSERT ((__n & 1) == 1); \ \ - __count = BITS_PER_MP_LIMB-1; \ + __count = GMP_LIMB_BITS-1; \ do \ { \ __lowbit = __rem & 1; \ - __inv = (__inv >> 1) | (__lowbit << (BITS_PER_MP_LIMB-1)); \ + __inv = (__inv >> 1) | (__lowbit << (GMP_LIMB_BITS-1)); \ __rem = (__rem - (__n & -__lowbit)) >> 1; \ } \ while (-- __count); \ diff -Nru gmp-4.3.2+dfsg/tune/powerpc.asm gmp-5.0.2+dfsg/tune/powerpc.asm --- gmp-4.3.2+dfsg/tune/powerpc.asm 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/powerpc.asm 2011-05-08 09:49:29.000000000 +0000 @@ -32,7 +32,7 @@ mftbu r4 mftb r5 mftbu r6 - cmp cr0, r4, r6 + cmpw cr0, r4, r6 bne L(again) stw r5, 0(r3) diff -Nru gmp-4.3.2+dfsg/tune/README gmp-5.0.2+dfsg/tune/README --- gmp-4.3.2+dfsg/tune/README 2010-01-07 20:09:03.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/README 2011-05-08 09:49:29.000000000 +0000 @@ -73,6 +73,27 @@ running the speed program repeatedly then set a GMP_CPU_FREQUENCY environment variable (see TIME BASE section below). +Timing on GNU/Linux + + On Linux, timing currently uses the cycle counter. This is unreliable, + since the counter is not saved and restored at context switches (unlike + FreeBSD and Solaris where the cycle counter is "virtualized"). + + Using the clock_gettime method with CLOCK_PROCESS_CPUTIME_ID (posix) or + CLOCK_VIRTUAL (BSD) should be more reliable. To get clock_gettime + with glibc, one has to link with -lrt (which also drags in the pthreads + threading library). configure.in must be hacked to detect this and + arrange proper linking. Something like + + old_LIBS="$LIBS" + AC_SEARCH_LIBS(clock_gettime, rt, [AC_DEFINE(HAVE_CLOCK_GETTIME)]) + TUNE_LIBS="$LIBS" + LIBS="$old_LIBS" + + AC_SUBST(TUNE_LIBS) + + might work. + Low resolution timebase Parameter tuning can be very time consuming if the only timebase @@ -85,7 +106,7 @@ PARAMETER TUNING The "tuneup" program runs some tests designed to find the best settings for -various thresholds, like MUL_KARATSUBA_THRESHOLD. Its output can be put +various thresholds, like MUL_TOOM22_THRESHOLD. Its output can be put into gmp-mparam.h. The program is built and run with make tune @@ -281,7 +302,7 @@ products on the diagonal mean it falls short of this. Here's an example running the two and showing by what factor an NxN mul_basecase is slower than an NxN sqr_basecase. (Some versions of sqr_basecase only allow sizes -below SQR_KARATSUBA_THRESHOLD, so if it crashes at that point don't worry.) +below SQR_TOOM2_THRESHOLD, so if it crashes at that point don't worry.) ./speed -s 1-20 -r mpn_sqr_basecase mpn_mul_basecase @@ -427,12 +448,12 @@ Note further that the various routines may recurse into themselves on sizes far enough above applicable thresholds. For example, mpn_kara_mul_n will recurse into itself on sizes greater than twice the compiled-in -MUL_KARATSUBA_THRESHOLD. +MUL_TOOM22_THRESHOLD. When doing the above comparison between mul_basecase and kara_mul_n what's probably of interest is mul_basecase versus a kara_mul_n that does one level of Karatsuba then calls to mul_basecase, but this only happens on sizes less -than twice the compiled MUL_KARATSUBA_THRESHOLD. A larger value for that +than twice the compiled MUL_TOOM22_THRESHOLD. A larger value for that setting can be compiled-in to avoid the problem if necessary. The same applies to toom3 and DC, though in a trickier fashion. diff -Nru gmp-4.3.2+dfsg/tune/sb_div.c gmp-5.0.2+dfsg/tune/sb_div.c --- gmp-4.3.2+dfsg/tune/sb_div.c 2010-01-07 20:09:04.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/sb_div.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* mpn/generic/sb_divrem_mn.c forced to use plain udiv_qrnnd. */ - -/* -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - -#ifdef DIV_SB_PREINV_THRESHOLD -#undef DIV_SB_PREINV_THRESHOLD -#endif -#define DIV_SB_PREINV_THRESHOLD MP_SIZE_T_MAX -#define __gmpn_sb_divrem_mn mpn_sb_divrem_mn_div - -#include "mpn/generic/sb_divrem_mn.c" diff -Nru gmp-4.3.2+dfsg/tune/sb_inv.c gmp-5.0.2+dfsg/tune/sb_inv.c --- gmp-4.3.2+dfsg/tune/sb_inv.c 2010-01-07 20:09:04.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/sb_inv.c 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -/* mpn/generic/sb_divrem_mn.c forced to use udiv_qrnnd_preinv. */ - -/* -Copyright 2001, 2002 Free Software Foundation, Inc. - -This file is part of the GNU MP Library. - -The GNU MP Library is free software; you can redistribute it and/or modify -it under the terms of the GNU Lesser General Public License as published by -the Free Software Foundation; either version 3 of the License, or (at your -option) any later version. - -The GNU MP Library is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY -or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public -License for more details. - -You should have received a copy of the GNU Lesser General Public License -along with the GNU MP Library. If not, see http://www.gnu.org/licenses/. */ - -#include "gmp.h" -#include "gmp-impl.h" - -#ifdef DIV_SB_PREINV_THRESHOLD -#undef DIV_SB_PREINV_THRESHOLD -#endif -#define DIV_SB_PREINV_THRESHOLD 0 -#define __gmpn_sb_divrem_mn mpn_sb_divrem_mn_inv - -#include "mpn/generic/sb_divrem_mn.c" diff -Nru gmp-4.3.2+dfsg/tune/speed.c gmp-5.0.2+dfsg/tune/speed.c --- gmp-4.3.2+dfsg/tune/speed.c 2010-01-07 20:09:04.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/speed.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,7 @@ /* Speed measuring program. -Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software Foundation, Inc. +Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009, 2010 Free +Software Foundation, Inc. This file is part of the GNU MP Library. @@ -89,10 +90,10 @@ } while (0) -#if BITS_PER_MP_LIMB == 32 +#if GMP_LIMB_BITS == 32 #define GMP_NUMB_0xAA (CNST_LIMB(0xAAAAAAAA) & GMP_NUMB_MASK) #endif -#if BITS_PER_MP_LIMB == 64 +#if GMP_LIMB_BITS == 64 #define GMP_NUMB_0xAA (CNST_LIMB(0xAAAAAAAAAAAAAAAA) & GMP_NUMB_MASK) #endif @@ -152,8 +153,8 @@ { "mpn_add_n", speed_mpn_add_n, FLAG_R_OPTIONAL }, { "mpn_sub_n", speed_mpn_sub_n, FLAG_R_OPTIONAL }, -#if HAVE_NATIVE_mpn_addsub_n - { "mpn_addsub_n", speed_mpn_addsub_n, FLAG_R_OPTIONAL }, +#if HAVE_NATIVE_mpn_add_n_sub_n + { "mpn_add_n_sub_n", speed_mpn_add_n_sub_n, FLAG_R_OPTIONAL }, #endif { "mpn_addmul_1", speed_mpn_addmul_1, FLAG_R }, @@ -197,14 +198,19 @@ { "mpn_divrem_1c", speed_mpn_divrem_1c, FLAG_R }, { "mpn_divrem_1cf", speed_mpn_divrem_1cf,FLAG_R }, #endif - { "mpn_mod_1", speed_mpn_mod_1, FLAG_R }, + { "mpn_mod_1", speed_mpn_mod_1, FLAG_R_OPTIONAL }, #if HAVE_NATIVE_mpn_mod_1c - { "mpn_mod_1c", speed_mpn_mod_1c, FLAG_R }, + { "mpn_mod_1c", speed_mpn_mod_1c, FLAG_R_OPTIONAL }, #endif { "mpn_preinv_divrem_1", speed_mpn_preinv_divrem_1, FLAG_R }, { "mpn_preinv_divrem_1f", speed_mpn_preinv_divrem_1f, FLAG_R }, { "mpn_preinv_mod_1", speed_mpn_preinv_mod_1, FLAG_R }, + { "mpn_mod_1_1", speed_mpn_mod_1_1, FLAG_R_OPTIONAL }, + { "mpn_mod_1s_2", speed_mpn_mod_1_2, FLAG_R_OPTIONAL }, + { "mpn_mod_1s_3", speed_mpn_mod_1_3, FLAG_R_OPTIONAL }, + { "mpn_mod_1s_4", speed_mpn_mod_1_4, FLAG_R_OPTIONAL }, + { "mpn_divrem_1_div", speed_mpn_divrem_1_div, FLAG_R }, { "mpn_divrem_1_inv", speed_mpn_divrem_1_inv, FLAG_R }, { "mpn_divrem_1f_div", speed_mpn_divrem_1f_div, FLAG_R }, @@ -219,6 +225,8 @@ { "mpn_divexact_1", speed_mpn_divexact_1, FLAG_R }, { "mpn_divexact_by3", speed_mpn_divexact_by3 }, + { "mpn_bdiv_q_1", speed_mpn_bdiv_q_1, FLAG_R_OPTIONAL }, + { "mpn_pi1_bdiv_q_1", speed_mpn_pi1_bdiv_q_1, FLAG_R_OPTIONAL }, { "mpn_bdiv_dbm1c", speed_mpn_bdiv_dbm1c, FLAG_R_OPTIONAL }, #if HAVE_NATIVE_mpn_modexact_1_odd @@ -230,17 +238,8 @@ { "mpn_mod_34lsub1", speed_mpn_mod_34lsub1 }, #endif - { "mpn_dc_tdiv_qr", speed_mpn_dc_tdiv_qr }, - { "mpn_dc_divrem_n", speed_mpn_dc_divrem_n }, - { "mpn_dc_divrem_sb", speed_mpn_dc_divrem_sb }, - { "mpn_dc_divrem_sb_div", speed_mpn_dc_divrem_sb_div }, - { "mpn_dc_divrem_sb_inv", speed_mpn_dc_divrem_sb_inv }, - - { "mpn_sb_divrem_m3", speed_mpn_sb_divrem_m3 }, - { "mpn_sb_divrem_m3_div", speed_mpn_sb_divrem_m3_div }, - { "mpn_sb_divrem_m3_inv", speed_mpn_sb_divrem_m3_inv }, - { "mpn_lshift", speed_mpn_lshift, FLAG_R }, + { "mpn_lshiftc", speed_mpn_lshiftc, FLAG_R }, { "mpn_rshift", speed_mpn_rshift, FLAG_R }, { "mpn_and_n", speed_mpn_and_n, FLAG_R_OPTIONAL }, @@ -251,7 +250,7 @@ { "mpn_nior_n", speed_mpn_nior_n, FLAG_R_OPTIONAL }, { "mpn_xor_n", speed_mpn_xor_n, FLAG_R_OPTIONAL }, { "mpn_xnor_n", speed_mpn_xnor_n, FLAG_R_OPTIONAL }, - { "mpn_com_n", speed_mpn_com_n }, + { "mpn_com", speed_mpn_com }, { "mpn_popcount", speed_mpn_popcount }, { "mpn_hamdist", speed_mpn_hamdist }, @@ -293,25 +292,59 @@ #endif { "mpn_mul_n", speed_mpn_mul_n }, - { "mpn_sqr", speed_mpn_sqr_n }, + { "mpn_sqr", speed_mpn_sqr }, - { "mpn_kara_mul_n", speed_mpn_kara_mul_n }, - { "mpn_kara_sqr_n", speed_mpn_kara_sqr_n }, - { "mpn_toom3_mul_n", speed_mpn_toom3_mul_n }, - { "mpn_toom3_sqr_n", speed_mpn_toom3_sqr_n }, + { "mpn_toom2_sqr", speed_mpn_toom2_sqr }, + { "mpn_toom3_sqr", speed_mpn_toom3_sqr }, + { "mpn_toom4_sqr", speed_mpn_toom4_sqr }, + { "mpn_toom6_sqr", speed_mpn_toom6_sqr }, + { "mpn_toom8_sqr", speed_mpn_toom8_sqr }, + { "mpn_toom22_mul", speed_mpn_toom22_mul }, + { "mpn_toom33_mul", speed_mpn_toom33_mul }, + { "mpn_toom44_mul", speed_mpn_toom44_mul }, + { "mpn_toom6h_mul", speed_mpn_toom6h_mul }, + { "mpn_toom8h_mul", speed_mpn_toom8h_mul }, + { "mpn_toom32_mul", speed_mpn_toom32_mul }, + { "mpn_toom42_mul", speed_mpn_toom42_mul }, + { "mpn_toom43_mul", speed_mpn_toom43_mul }, + { "mpn_toom63_mul", speed_mpn_toom63_mul }, + { "mpn_nussbaumer_mul", speed_mpn_nussbaumer_mul }, + { "mpn_nussbaumer_mul_sqr",speed_mpn_nussbaumer_mul_sqr}, +#if WANT_OLD_FFT_FULL { "mpn_mul_fft_full", speed_mpn_mul_fft_full }, { "mpn_mul_fft_full_sqr", speed_mpn_mul_fft_full_sqr }, - +#endif { "mpn_mul_fft", speed_mpn_mul_fft, FLAG_R_OPTIONAL }, { "mpn_mul_fft_sqr", speed_mpn_mul_fft_sqr, FLAG_R_OPTIONAL }, - { "mpn_mullow_n", speed_mpn_mullow_n }, - { "mpn_mullow_basecase", speed_mpn_mullow_basecase}, - - { "mpn_get_str", speed_mpn_get_str, FLAG_R_OPTIONAL }, + { "mpn_mullo_n", speed_mpn_mullo_n }, + { "mpn_mullo_basecase", speed_mpn_mullo_basecase }, - { "mpn_set_str", speed_mpn_set_str, FLAG_R_OPTIONAL }, - { "mpn_set_str_basecase",speed_mpn_bc_set_str, FLAG_R_OPTIONAL }, + { "mpn_bc_mulmod_bnm1", speed_mpn_bc_mulmod_bnm1 }, + { "mpn_mulmod_bnm1", speed_mpn_mulmod_bnm1 }, + { "mpn_mulmod_bnm1_rounded", speed_mpn_mulmod_bnm1_rounded }, + { "mpn_sqrmod_bnm1", speed_mpn_sqrmod_bnm1 }, + + { "mpn_invert", speed_mpn_invert }, + { "mpn_invertappr", speed_mpn_invertappr }, + { "mpn_ni_invertappr", speed_mpn_ni_invertappr }, + { "mpn_binvert", speed_mpn_binvert }, + + { "mpn_sbpi1_div_qr", speed_mpn_sbpi1_div_qr, FLAG_R_OPTIONAL}, + { "mpn_dcpi1_div_qr", speed_mpn_dcpi1_div_qr, FLAG_R_OPTIONAL}, + { "mpn_mu_div_qr", speed_mpn_mu_div_qr, FLAG_R_OPTIONAL}, + { "mpn_mupi_div_qr", speed_mpn_mupi_div_qr, FLAG_R_OPTIONAL}, + { "mpn_sbpi1_divappr_q", speed_mpn_sbpi1_divappr_q, FLAG_R_OPTIONAL}, + { "mpn_dcpi1_divappr_q", speed_mpn_dcpi1_divappr_q, FLAG_R_OPTIONAL}, + + { "mpn_sbpi1_bdiv_qr", speed_mpn_sbpi1_bdiv_qr }, + { "mpn_dcpi1_bdiv_qr", speed_mpn_dcpi1_bdiv_qr }, + { "mpn_sbpi1_bdiv_q", speed_mpn_sbpi1_bdiv_q }, + { "mpn_dcpi1_bdiv_q", speed_mpn_dcpi1_bdiv_q }, + + { "mpn_get_str", speed_mpn_get_str, FLAG_R_OPTIONAL }, + { "mpn_set_str", speed_mpn_set_str, FLAG_R_OPTIONAL }, + { "mpn_set_str_basecase", speed_mpn_bc_set_str, FLAG_R_OPTIONAL }, { "mpn_sqrtrem", speed_mpn_sqrtrem }, { "mpn_rootrem", speed_mpn_rootrem, FLAG_R }, @@ -332,6 +365,8 @@ { "mpz_mod", speed_mpz_mod }, { "mpn_redc_1", speed_mpn_redc_1 }, + { "mpn_redc_2", speed_mpn_redc_2 }, + { "mpn_redc_n", speed_mpn_redc_n }, { "MPN_COPY", speed_MPN_COPY }, { "MPN_COPY_INCR", speed_MPN_COPY_INCR }, @@ -349,6 +384,18 @@ #if HAVE_NATIVE_mpn_sublsh1_n { "mpn_sublsh1_n", speed_mpn_sublsh1_n }, #endif +#if HAVE_NATIVE_mpn_rsblsh1_n + { "mpn_rsblsh1_n", speed_mpn_rsblsh1_n }, +#endif +#if HAVE_NATIVE_mpn_addlsh2_n + { "mpn_addlsh2_n", speed_mpn_addlsh2_n }, +#endif +#if HAVE_NATIVE_mpn_sublsh2_n + { "mpn_sublsh2_n", speed_mpn_sublsh2_n }, +#endif +#if HAVE_NATIVE_mpn_rsblsh2_n + { "mpn_rsblsh2_n", speed_mpn_rsblsh2_n }, +#endif #if HAVE_NATIVE_mpn_rsh1add_n { "mpn_rsh1add_n", speed_mpn_rsh1add_n }, #endif @@ -779,7 +826,7 @@ /* Return a limb with n many one bits (starting from the least significant) */ #define LIMB_ONES(n) \ - ((n) == BITS_PER_MP_LIMB ? MP_LIMB_T_MAX \ + ((n) == GMP_LIMB_BITS ? MP_LIMB_T_MAX \ : (n) == 0 ? CNST_LIMB(0) \ : (CNST_LIMB(1) << (n)) - 1) @@ -806,7 +853,7 @@ { if (siz > 1 || siz < -1) printf ("Warning, r parameter %s truncated to %d bits\n", - s_orig, BITS_PER_MP_LIMB); + s_orig, GMP_LIMB_BITS); return l; } } @@ -819,10 +866,10 @@ if (strcmp (s, "bits") == 0) { mp_limb_t l; - if (n > BITS_PER_MP_LIMB) + if (n > GMP_LIMB_BITS) { fprintf (stderr, "%ld bit parameter invalid (max %d bits)\n", - n, BITS_PER_MP_LIMB); + n, GMP_LIMB_BITS); exit (1); } mpn_random (&l, 1); @@ -830,10 +877,10 @@ } else if (strcmp (s, "ones") == 0) { - if (n > BITS_PER_MP_LIMB) + if (n > GMP_LIMB_BITS) { fprintf (stderr, "%ld bit parameter invalid (max %d bits)\n", - n, BITS_PER_MP_LIMB); + n, GMP_LIMB_BITS); exit (1); } return LIMB_ONES (n); diff -Nru gmp-4.3.2+dfsg/tune/speed-ext.c gmp-5.0.2+dfsg/tune/speed-ext.c --- gmp-4.3.2+dfsg/tune/speed-ext.c 2010-01-07 20:09:04.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/speed-ext.c 2011-05-08 09:49:29.000000000 +0000 @@ -82,8 +82,8 @@ ASSERT (size >= 1); c = mpn_add_n (wp, xp, yp, size); - ret = mpn_rshift (wp, wp, size, 1) >> (BITS_PER_MP_LIMB-1); - wp[size-1] |= (c << (BITS_PER_MP_LIMB-1)); + ret = mpn_rshift (wp, wp, size, 1) >> (GMP_LIMB_BITS-1); + wp[size-1] |= (c << (GMP_LIMB_BITS-1)); return ret; } @@ -107,7 +107,7 @@ c = (wprev < x); ret = (wprev & 1); -#define RSHIFT(hi,lo) (((lo) >> 1) | ((hi) << (BITS_PER_MP_LIMB-1))) +#define RSHIFT(hi,lo) (((lo) >> 1) | ((hi) << (GMP_LIMB_BITS-1))) for (i = 1; i < size; i++) { diff -Nru gmp-4.3.2+dfsg/tune/speed.h gmp-5.0.2+dfsg/tune/speed.h --- gmp-4.3.2+dfsg/tune/speed.h 2010-01-07 20:09:04.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/speed.h 2011-05-08 09:49:29.000000000 +0000 @@ -1,7 +1,7 @@ /* Header for speed and threshold things. -Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006 Free Software Foundation, -Inc. +Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009, 2010 Free +Software Foundation, Inc. This file is part of the GNU MP Library. @@ -31,9 +31,9 @@ } while (0) /* A mask of the least significant n bits. Note 1<<32 doesn't give zero on - x86 family CPUs, hence the separate case for BITS_PER_MP_LIMB. */ + x86 family CPUs, hence the separate case for GMP_LIMB_BITS. */ #define MP_LIMB_T_LOWBITMASK(n) \ - ((n) == BITS_PER_MP_LIMB ? MP_LIMB_T_MAX : ((mp_limb_t) 1 << (n)) - 1) + ((n) == GMP_LIMB_BITS ? MP_LIMB_T_MAX : ((mp_limb_t) 1 << (n)) - 1) /* align must be a power of 2 here, usually CACHE_LINE_SIZE is a good choice */ @@ -117,7 +117,7 @@ struct { mp_ptr ptr; mp_size_t size; - } src[2], dst[3]; + } src[3], dst[3]; }; typedef double (*speed_function_t) __GMP_PROTO ((struct speed_params *s)); @@ -146,7 +146,8 @@ double speed_mpn_add_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_addlsh1_n __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_addsub_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_addlsh2_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_add_n_sub_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_and_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_andn_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_addmul_1 __GMP_PROTO ((struct speed_params *s)); @@ -157,19 +158,16 @@ double speed_mpn_addmul_6 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_addmul_7 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_addmul_8 __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_com_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_com __GMP_PROTO ((struct speed_params *s)); double speed_mpn_copyd __GMP_PROTO ((struct speed_params *s)); double speed_mpn_copyi __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_dc_divrem_n __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_dc_divrem_sb __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_dc_divrem_sb_div __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_dc_divrem_sb_inv __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_dc_tdiv_qr __GMP_PROTO ((struct speed_params *s)); double speed_MPN_COPY __GMP_PROTO ((struct speed_params *s)); double speed_MPN_COPY_DECR __GMP_PROTO ((struct speed_params *s)); double speed_MPN_COPY_INCR __GMP_PROTO ((struct speed_params *s)); double speed_mpn_divexact_1 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_divexact_by3 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_bdiv_q_1 __GMP_PROTO ((struct speed_params *)); +double speed_mpn_pi1_bdiv_q_1 __GMP_PROTO ((struct speed_params *)); double speed_mpn_bdiv_dbm1c __GMP_PROTO ((struct speed_params *s)); double speed_mpn_divrem_1 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_divrem_1f __GMP_PROTO ((struct speed_params *s)); @@ -189,8 +187,6 @@ double speed_mpn_gcd __GMP_PROTO ((struct speed_params *s)); double speed_mpn_gcd_1 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_gcd_1N __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_gcd_binary __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_gcd_accel __GMP_PROTO ((struct speed_params *s)); double speed_mpn_gcdext __GMP_PROTO ((struct speed_params *s)); double speed_mpn_gcdext_double __GMP_PROTO ((struct speed_params *s)); double speed_mpn_gcdext_one_double __GMP_PROTO ((struct speed_params *s)); @@ -204,13 +200,16 @@ double speed_mpn_jacobi_base_1 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_jacobi_base_2 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_jacobi_base_3 __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_kara_mul_n __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_kara_sqr_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_lshift __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_lshiftc __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mod_1 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mod_1c __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mod_1_div __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mod_1_inv __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mod_1_1 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mod_1_2 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mod_1_3 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mod_1_4 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mod_34lsub1 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_modexact_1_odd __GMP_PROTO ((struct speed_params *s)); double speed_mpn_modexact_1c_odd __GMP_PROTO ((struct speed_params *s)); @@ -223,19 +222,47 @@ double speed_mpn_mul_basecase __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mul_fft __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mul_fft_sqr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_fft_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_fft_sqr __GMP_PROTO ((struct speed_params *s)); +#if WANT_OLD_FFT_FULL double speed_mpn_mul_fft_full __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mul_fft_full_sqr __GMP_PROTO ((struct speed_params *s)); +#endif +double speed_mpn_nussbaumer_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_nussbaumer_mul_sqr __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mul_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_mul_n_sqr __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_mullow_n __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_mullow_basecase __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mullo_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mullo_basecase __GMP_PROTO ((struct speed_params *s)); double speed_mpn_nand_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_nior_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_popcount __GMP_PROTO ((struct speed_params *s)); double speed_mpn_preinv_divrem_1 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_preinv_divrem_1f __GMP_PROTO ((struct speed_params *s)); double speed_mpn_preinv_mod_1 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_sbpi1_div_qr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_dcpi1_div_qr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_sbpi1_divappr_q __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_dcpi1_divappr_q __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mu_div_qr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mu_divappr_q __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mupi_div_qr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mu_div_q __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_sbpi1_bdiv_qr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_dcpi1_bdiv_qr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_sbpi1_bdiv_q __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_dcpi1_bdiv_q __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mu_bdiv_q __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mu_bdiv_qr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_invert __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_invertappr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_ni_invertappr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_binvert __GMP_PROTO ((struct speed_params *s)); double speed_mpn_redc_1 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_redc_2 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_redc_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_rsblsh1_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_rsblsh2_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_rsh1add_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_rsh1sub_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_rshift __GMP_PROTO ((struct speed_params *s)); @@ -248,14 +275,37 @@ double speed_mpn_set_str_pre __GMP_PROTO ((struct speed_params *s)); double speed_mpn_sqr_basecase __GMP_PROTO ((struct speed_params *s)); double speed_mpn_sqr_diagonal __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_sqr_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_sqr __GMP_PROTO ((struct speed_params *s)); double speed_mpn_sqrtrem __GMP_PROTO ((struct speed_params *s)); double speed_mpn_rootrem __GMP_PROTO ((struct speed_params *s)); double speed_mpn_sub_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_sublsh1_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_sublsh2_n __GMP_PROTO ((struct speed_params *s)); double speed_mpn_submul_1 __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_toom3_mul_n __GMP_PROTO ((struct speed_params *s)); -double speed_mpn_toom3_sqr_n __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom2_sqr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom3_sqr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom4_sqr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom6_sqr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom8_sqr __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom22_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom33_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom44_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom6h_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom8h_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom32_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom42_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom43_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom63_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom32_for_toom43_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom43_for_toom32_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom32_for_toom53_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom53_for_toom32_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom42_for_toom53_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_toom53_for_toom42_mul __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mulmod_bnm1 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_bc_mulmod_bnm1 __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_mulmod_bnm1_rounded __GMP_PROTO ((struct speed_params *s)); +double speed_mpn_sqrmod_bnm1 __GMP_PROTO ((struct speed_params *s)); double speed_mpn_udiv_qrnnd __GMP_PROTO ((struct speed_params *s)); double speed_mpn_udiv_qrnnd_r __GMP_PROTO ((struct speed_params *s)); double speed_mpn_umul_ppmm __GMP_PROTO ((struct speed_params *s)); @@ -313,7 +363,7 @@ is used without a -DPIC to tell us about it. */ #if defined(__GNUC__) && ! defined (NO_ASM) \ && (defined (__i386__) || defined (__i486__)) -#ifdef PIC +#if defined (PIC) || defined (__APPLE_CC__) #define speed_cyclecounter(p) \ do { \ int __speed_cyclecounter__save_ebx; \ @@ -396,11 +446,7 @@ mp_limb_t mpn_sb_divrem_mn_inv __GMP_PROTO ((mp_ptr, mp_ptr, mp_size_t, mp_srcptr, mp_size_t)); mp_size_t mpn_set_str_basecase __GMP_PROTO ((mp_ptr, const unsigned char *, size_t, int)); - -void mpn_toom3_mul_n_open __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr)); -void mpn_toom3_sqr_n_open __GMP_PROTO ((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); -void mpn_toom3_mul_n_mpn __GMP_PROTO ((mp_ptr, mp_srcptr, mp_srcptr, mp_size_t, mp_ptr)); -void mpn_toom3_sqr_n_mpn __GMP_PROTO((mp_ptr, mp_srcptr, mp_size_t, mp_ptr)); +void mpn_pre_set_str __GMP_PROTO ((mp_ptr, unsigned char *, size_t, powers_t *, mp_ptr)); void mpz_powm_mod __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr)); void mpz_powm_redc __GMP_PROTO ((mpz_ptr, mpz_srcptr, mpz_srcptr, mpz_srcptr)); @@ -734,6 +780,26 @@ #define SPEED_ROUTINE_MPN_DIVEXACT_1(function) \ SPEED_ROUTINE_MPN_UNARY_1_CALL ((*function) (wp, s->xp, s->size, s->r)) +#define SPEED_ROUTINE_MPN_BDIV_Q_1(function) \ + SPEED_ROUTINE_MPN_UNARY_1_CALL ((*function) (wp, s->xp, s->size, s->r)) + +#define SPEED_ROUTINE_MPN_PI1_BDIV_Q_1_CALL(call) \ + { \ + unsigned shift; \ + mp_limb_t dinv; \ + \ + SPEED_RESTRICT_COND (s->size > 0); \ + SPEED_RESTRICT_COND (s->r != 0); \ + \ + count_trailing_zeros (shift, s->r); \ + binvert_limb (dinv, s->r >> shift); \ + \ + SPEED_ROUTINE_MPN_UNARY_1_CALL (call); \ + } +#define SPEED_ROUTINE_MPN_PI1_BDIV_Q_1(function) \ + SPEED_ROUTINE_MPN_PI1_BDIV_Q_1_CALL \ + ((*function) (wp, s->xp, s->size, s->r, dinv, shift)) + #define SPEED_ROUTINE_MPN_BDIV_DBM1C(function) \ SPEED_ROUTINE_MPN_UNARY_1_CALL ((*function) (wp, s->xp, s->size, s->r, 0)) @@ -892,7 +958,7 @@ #define SPEED_ROUTINE_MPN_MUL_N(function) \ SPEED_ROUTINE_MPN_MUL_N_CALL (function (wp, s->xp, s->yp, s->size)); -#define SPEED_ROUTINE_MPN_MULLOW_N_CALL(call) \ +#define SPEED_ROUTINE_MPN_MULLO_N_CALL(call) \ { \ mp_ptr wp; \ unsigned i; \ @@ -920,11 +986,11 @@ return t; \ } -#define SPEED_ROUTINE_MPN_MULLOW_N(function) \ - SPEED_ROUTINE_MPN_MULLOW_N_CALL (function (wp, s->xp, s->yp, s->size)); +#define SPEED_ROUTINE_MPN_MULLO_N(function) \ + SPEED_ROUTINE_MPN_MULLO_N_CALL (function (wp, s->xp, s->yp, s->size)); /* For mpn_mul_basecase, xsize=r, ysize=s->size. */ -#define SPEED_ROUTINE_MPN_MULLOW_BASECASE(function) \ +#define SPEED_ROUTINE_MPN_MULLO_BASECASE(function) \ { \ mp_ptr wp; \ unsigned i; \ @@ -952,6 +1018,72 @@ return t; \ } +#define SPEED_ROUTINE_MPN_MULMOD_BNM1_CALL(call) \ + { \ + mp_ptr wp, tp; \ + unsigned i; \ + double t; \ + mp_size_t itch; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 1); \ + \ + itch = mpn_mulmod_bnm1_itch (s->size, s->size, s->size); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (wp, 2 * s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, itch, s->align_wp2); \ + \ + speed_operand_src (s, s->xp, s->size); \ + speed_operand_src (s, s->yp, s->size); \ + speed_operand_dst (s, wp, 2 * s->size); \ + speed_operand_dst (s, tp, itch); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do \ + call; \ + while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_MPN_MULMOD_BNM1_ROUNDED(function) \ + { \ + mp_ptr wp, tp; \ + unsigned i; \ + double t; \ + mp_size_t size, itch; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 1); \ + \ + size = mpn_mulmod_bnm1_next_size (s->size); \ + itch = mpn_mulmod_bnm1_itch (size, size, size); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (wp, size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, itch, s->align_wp2); \ + \ + speed_operand_src (s, s->xp, s->size); \ + speed_operand_src (s, s->yp, s->size); \ + speed_operand_dst (s, wp, size); \ + speed_operand_dst (s, tp, itch); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do \ + function (wp, size, s->xp, s->size, s->yp, s->size, tp); \ + while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } + #define SPEED_ROUTINE_MPN_MUL_N_TSPACE(call, tsize, minsize) \ { \ mp_ptr wp, tspace; \ @@ -982,17 +1114,93 @@ return t; \ } -#define SPEED_ROUTINE_MPN_KARA_MUL_N(function) \ +#define SPEED_ROUTINE_MPN_TOOM22_MUL_N(function) \ SPEED_ROUTINE_MPN_MUL_N_TSPACE \ - (function (wp, s->xp, s->xp, s->size, tspace), \ - MPN_KARA_MUL_N_TSIZE (s->size), \ - MPN_KARA_MUL_N_MINSIZE) + (function (wp, s->xp, s->size, s->yp, s->size, tspace), \ + mpn_toom22_mul_itch (s->size, s->size), \ + MPN_TOOM22_MUL_MINSIZE) -#define SPEED_ROUTINE_MPN_TOOM3_MUL_N(function) \ +#define SPEED_ROUTINE_MPN_TOOM33_MUL_N(function) \ SPEED_ROUTINE_MPN_MUL_N_TSPACE \ - (function (wp, s->xp, s->yp, s->size, tspace), \ - MPN_TOOM3_MUL_N_TSIZE (s->size), \ - MPN_TOOM3_MUL_N_MINSIZE) + (function (wp, s->xp, s->size, s->yp, s->size, tspace), \ + mpn_toom33_mul_itch (s->size, s->size), \ + MPN_TOOM33_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM44_MUL_N(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, s->size, tspace), \ + mpn_toom44_mul_itch (s->size, s->size), \ + MPN_TOOM44_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM6H_MUL_N(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, s->size, tspace), \ + mpn_toom6h_mul_itch (s->size, s->size), \ + MPN_TOOM6H_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM8H_MUL_N(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, s->size, tspace), \ + mpn_toom8h_mul_itch (s->size, s->size), \ + MPN_TOOM8H_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM32_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, 2*s->size/3, tspace), \ + mpn_toom32_mul_itch (s->size, 2*s->size/3), \ + MPN_TOOM32_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM42_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, s->size/2, tspace), \ + mpn_toom42_mul_itch (s->size, s->size/2), \ + MPN_TOOM42_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM43_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, s->size*3/4, tspace), \ + mpn_toom43_mul_itch (s->size, s->size*3/4), \ + MPN_TOOM43_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM63_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, s->size/2, tspace), \ + mpn_toom63_mul_itch (s->size, s->size/2), \ + MPN_TOOM63_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM43_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, 17*s->size/24, tspace), \ + mpn_toom32_mul_itch (s->size, 17*s->size/24), \ + MPN_TOOM32_MUL_MINSIZE) +#define SPEED_ROUTINE_MPN_TOOM43_FOR_TOOM32_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, 17*s->size/24, tspace), \ + mpn_toom43_mul_itch (s->size, 17*s->size/24), \ + MPN_TOOM43_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM32_FOR_TOOM53_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, 19*s->size/30, tspace), \ + mpn_toom32_mul_itch (s->size, 19*s->size/30), \ + MPN_TOOM32_MUL_MINSIZE) +#define SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM32_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, 19*s->size/30, tspace), \ + mpn_toom53_mul_itch (s->size, 19*s->size/30), \ + MPN_TOOM53_MUL_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM42_FOR_TOOM53_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, 11*s->size/20, tspace), \ + mpn_toom42_mul_itch (s->size, 11*s->size/20), \ + MPN_TOOM42_MUL_MINSIZE) +#define SPEED_ROUTINE_MPN_TOOM53_FOR_TOOM42_MUL(function) \ + SPEED_ROUTINE_MPN_MUL_N_TSPACE \ + (function (wp, s->xp, s->size, s->yp, 11*s->size/20, tspace), \ + mpn_toom53_mul_itch (s->size, 11*s->size/20), \ + MPN_TOOM53_MUL_MINSIZE) + #define SPEED_ROUTINE_MPN_SQR_CALL(call) \ @@ -1058,17 +1266,32 @@ return t; \ } -#define SPEED_ROUTINE_MPN_KARA_SQR_N(function) \ +#define SPEED_ROUTINE_MPN_TOOM2_SQR(function) \ SPEED_ROUTINE_MPN_SQR_TSPACE (function (wp, s->xp, s->size, tspace), \ - MPN_KARA_SQR_N_TSIZE (s->size), \ - MPN_KARA_SQR_N_MINSIZE) + mpn_toom2_sqr_itch (s->size), \ + MPN_TOOM2_SQR_MINSIZE) -#define SPEED_ROUTINE_MPN_TOOM3_SQR_N(function) \ +#define SPEED_ROUTINE_MPN_TOOM3_SQR(function) \ SPEED_ROUTINE_MPN_SQR_TSPACE (function (wp, s->xp, s->size, tspace), \ - MPN_TOOM3_SQR_N_TSIZE (s->size), \ - MPN_TOOM3_SQR_N_MINSIZE) + mpn_toom3_sqr_itch (s->size), \ + MPN_TOOM3_SQR_MINSIZE) +#define SPEED_ROUTINE_MPN_TOOM4_SQR(function) \ + SPEED_ROUTINE_MPN_SQR_TSPACE (function (wp, s->xp, s->size, tspace), \ + mpn_toom4_sqr_itch (s->size), \ + MPN_TOOM4_SQR_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM6_SQR(function) \ + SPEED_ROUTINE_MPN_SQR_TSPACE (function (wp, s->xp, s->size, tspace), \ + mpn_toom6_sqr_itch (s->size), \ + MPN_TOOM6_SQR_MINSIZE) + +#define SPEED_ROUTINE_MPN_TOOM8_SQR(function) \ + SPEED_ROUTINE_MPN_SQR_TSPACE (function (wp, s->xp, s->size, tspace), \ + mpn_toom8_sqr_itch (s->size), \ + MPN_TOOM8_SQR_MINSIZE) + #define SPEED_ROUTINE_MPN_MOD_CALL(call) \ { \ unsigned i; \ @@ -1123,6 +1346,47 @@ return speed_endtime (); \ } +#define SPEED_ROUTINE_MPN_MOD_1_1(function,pfunc) \ + { \ + unsigned i; \ + mp_limb_t inv[4]; \ + \ + SPEED_RESTRICT_COND (s->size >= 2); \ + \ + mpn_mod_1_1p_cps (inv, s->r); \ + speed_operand_src (s, s->xp, s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + pfunc (inv, s->r); \ + function (s->xp, s->size, s->r, inv); \ + } while (--i != 0); \ + \ + return speed_endtime (); \ + } +#define SPEED_ROUTINE_MPN_MOD_1_N(function,pfunc,N) \ + { \ + unsigned i; \ + mp_limb_t inv[N+3]; \ + \ + SPEED_RESTRICT_COND (s->size >= 1); \ + SPEED_RESTRICT_COND (s->r <= ~(mp_limb_t)0 / N); \ + \ + speed_operand_src (s, s->xp, s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + pfunc (inv, s->r); \ + function (s->xp, s->size, s->r, inv); \ + } while (--i != 0); \ + \ + return speed_endtime (); \ + } + /* A division of 2*s->size by s->size limbs */ @@ -1131,6 +1395,7 @@ unsigned i; \ mp_ptr a, d, q, r; \ double t; \ + gmp_pi1_t dinv; \ TMP_DECL; \ \ SPEED_RESTRICT_COND (s->size >= 1); \ @@ -1150,6 +1415,8 @@ d[s->size-1] |= GMP_NUMB_HIGHBIT; \ a[2*s->size-1] = d[s->size-1] - 1; \ \ + invert_pi1 (dinv, d[s->size-1], d[s->size-2]); \ + \ speed_operand_src (s, a, 2*s->size); \ speed_operand_src (s, d, s->size); \ speed_operand_dst (s, q, s->size+1); \ @@ -1167,52 +1434,415 @@ return t; \ } -#define SPEED_ROUTINE_MPN_DC_DIVREM_N(function) \ - SPEED_ROUTINE_MPN_DC_DIVREM_CALL((*function) (q, a, d, s->size)) -#define SPEED_ROUTINE_MPN_DC_DIVREM_SB(function) \ - SPEED_ROUTINE_MPN_DC_DIVREM_CALL \ - ((*function) (q, a, 2*s->size, d, s->size)) - -#define SPEED_ROUTINE_MPN_DC_TDIV_QR(function) \ - SPEED_ROUTINE_MPN_DC_DIVREM_CALL \ - ((*function) (q, r, 0, a, 2*s->size, d, s->size)) +/* A remainder 2*s->size by s->size limbs */ +#define SPEED_ROUTINE_MPZ_MOD(function) \ + { \ + unsigned i; \ + mpz_t a, d, r; \ + \ + SPEED_RESTRICT_COND (s->size >= 1); \ + \ + mpz_init_set_n (d, s->yp, s->size); \ + \ + /* high part less than d, low part a duplicate copied in */ \ + mpz_init_set_n (a, s->xp, s->size); \ + mpz_mod (a, a, d); \ + mpz_mul_2exp (a, a, GMP_LIMB_BITS * s->size); \ + MPN_COPY (PTR(a), s->xp, s->size); \ + \ + mpz_init (r); \ + \ + speed_operand_src (s, PTR(a), SIZ(a)); \ + speed_operand_src (s, PTR(d), SIZ(d)); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do \ + function (r, a, d); \ + while (--i != 0); \ + return speed_endtime (); \ + } -/* A division of s->size by 3 limbs */ +#define SPEED_ROUTINE_MPN_PI1_DIV(function, INV, DMIN, QMIN) \ + { \ + unsigned i; \ + mp_ptr dp, tp, ap, qp; \ + gmp_pi1_t inv; \ + double t; \ + mp_size_t size1; \ + TMP_DECL; \ + \ + size1 = (s->r == 0 ? 2 * s->size : s->r); \ + \ + SPEED_RESTRICT_COND (s->size >= DMIN); \ + SPEED_RESTRICT_COND (size1 - s->size >= QMIN); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (ap, size1, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (qp, size1 - s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, size1, s->align_wp2); \ + \ + /* we don't fill in dividend completely when size1 > s->size */ \ + MPN_COPY (ap, s->xp, s->size); \ + MPN_COPY (ap + size1 - s->size, s->xp, s->size); \ + \ + MPN_COPY (dp, s->yp, s->size); \ + \ + /* normalize the data */ \ + dp[s->size-1] |= GMP_NUMB_HIGHBIT; \ + ap[size1 - 1] = dp[s->size - 1] - 1; \ + \ + invert_pi1 (inv, dp[s->size-1], dp[s->size-2]); \ + \ + speed_operand_src (s, ap, size1); \ + speed_operand_dst (s, tp, size1); \ + speed_operand_src (s, dp, s->size); \ + speed_operand_dst (s, qp, size1 - s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + MPN_COPY (tp, ap, size1); \ + function (qp, tp, size1, dp, s->size, INV); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_MPN_MU_DIV_Q(function,itchfn) \ + { \ + unsigned i; \ + mp_ptr dp, tp, qp, scratch; \ + double t; \ + mp_size_t itch; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 2); \ + \ + itch = itchfn (2 * s->size, s->size, 0); \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (qp, s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, 2 * s->size, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (scratch, itch, s->align_wp2); \ + \ + MPN_COPY (tp, s->xp, s->size); \ + MPN_COPY (tp+s->size, s->xp, s->size); \ + \ + /* normalize the data */ \ + dp[s->size-1] |= GMP_NUMB_HIGHBIT; \ + tp[2*s->size-1] = dp[s->size-1] - 1; \ + \ + speed_operand_dst (s, qp, s->size); \ + speed_operand_src (s, tp, 2 * s->size); \ + speed_operand_src (s, dp, s->size); \ + speed_operand_dst (s, scratch, itch); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + function (qp, tp, 2 * s->size, dp, s->size, scratch); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_MPN_MU_DIV_QR(function,itchfn) \ + { \ + unsigned i; \ + mp_ptr dp, tp, qp, rp, scratch; \ + double t; \ + mp_size_t size1, itch; \ + TMP_DECL; \ + \ + size1 = (s->r == 0 ? 2 * s->size : s->r); \ + \ + SPEED_RESTRICT_COND (s->size >= 2); \ + SPEED_RESTRICT_COND (size1 >= s->size); \ + \ + itch = itchfn (size1, s->size, 0); \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (qp, size1 - s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, size1, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (scratch, itch, s->align_wp2); \ + SPEED_TMP_ALLOC_LIMBS (rp, s->size, s->align_wp2); /* alignment? */ \ + \ + /* we don't fill in dividend completely when size1 > s->size */ \ + MPN_COPY (tp, s->xp, s->size); \ + MPN_COPY (tp + size1 - s->size, s->xp, s->size); \ + \ + MPN_COPY (dp, s->yp, s->size); \ + \ + /* normalize the data */ \ + dp[s->size-1] |= GMP_NUMB_HIGHBIT; \ + tp[size1 - 1] = dp[s->size - 1] - 1; \ + \ + speed_operand_dst (s, qp, size1 - s->size); \ + speed_operand_dst (s, rp, s->size); \ + speed_operand_src (s, tp, size1); \ + speed_operand_src (s, dp, s->size); \ + speed_operand_dst (s, scratch, itch); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + function (qp, rp, tp, size1, dp, s->size, scratch); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_MPN_MUPI_DIV_QR(function,itchfn) \ + { \ + unsigned i; \ + mp_ptr dp, tp, qp, rp, ip, scratch; \ + double t; \ + mp_size_t size1, itch; \ + TMP_DECL; \ + \ + size1 = (s->r == 0 ? 2 * s->size : s->r); \ + \ + SPEED_RESTRICT_COND (s->size >= 2); \ + SPEED_RESTRICT_COND (size1 >= s->size); \ + \ + itch = itchfn (size1, s->size, s->size); \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (qp, size1 - s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, size1, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (scratch, itch, s->align_wp2); \ + SPEED_TMP_ALLOC_LIMBS (rp, s->size, s->align_wp2); /* alignment? */ \ + SPEED_TMP_ALLOC_LIMBS (ip, s->size, s->align_wp2); /* alignment? */ \ + \ + /* we don't fill in dividend completely when size1 > s->size */ \ + MPN_COPY (tp, s->xp, s->size); \ + MPN_COPY (tp + size1 - s->size, s->xp, s->size); \ + \ + MPN_COPY (dp, s->yp, s->size); \ + \ + /* normalize the data */ \ + dp[s->size-1] |= GMP_NUMB_HIGHBIT; \ + tp[size1 - 1] = dp[s->size-1] - 1; \ + \ + mpn_invert (ip, dp, s->size, NULL); \ + \ + speed_operand_dst (s, qp, size1 - s->size); \ + speed_operand_dst (s, rp, s->size); \ + speed_operand_src (s, tp, size1); \ + speed_operand_src (s, dp, s->size); \ + speed_operand_src (s, ip, s->size); \ + speed_operand_dst (s, scratch, itch); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + function (qp, rp, tp, size1, dp, s->size, ip, s->size, scratch); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } -#define SPEED_ROUTINE_MPN_SB_DIVREM_M3(function) \ +#define SPEED_ROUTINE_MPN_PI1_BDIV_QR(function) \ { \ unsigned i; \ - mp_ptr a, d, q; \ - mp_size_t qsize; \ + mp_ptr dp, tp, ap, qp; \ + mp_limb_t inv; \ double t; \ TMP_DECL; \ \ - SPEED_RESTRICT_COND (s->size >= 3); \ + SPEED_RESTRICT_COND (s->size >= 1); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (ap, 2*s->size, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (qp, s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, 2*s->size, s->align_wp2); \ + \ + MPN_COPY (ap, s->xp, s->size); \ + MPN_COPY (ap+s->size, s->xp, s->size); \ + \ + /* divisor must be odd */ \ + MPN_COPY (dp, s->yp, s->size); \ + dp[0] |= 1; \ + binvert_limb (inv, dp[0]); \ + inv = -inv; \ + \ + speed_operand_src (s, ap, 2*s->size); \ + speed_operand_dst (s, tp, 2*s->size); \ + speed_operand_src (s, dp, s->size); \ + speed_operand_dst (s, qp, s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + MPN_COPY (tp, ap, 2*s->size); \ + function (qp, tp, 2*s->size, dp, s->size, inv); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_MPN_PI1_BDIV_Q(function) \ + { \ + unsigned i; \ + mp_ptr dp, tp, qp; \ + mp_limb_t inv; \ + double t; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 1); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (qp, s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, s->size, s->align_wp2); \ + \ + /* divisor must be odd */ \ + MPN_COPY (dp, s->yp, s->size); \ + dp[0] |= 1; \ + binvert_limb (inv, dp[0]); \ + inv = -inv; \ + \ + speed_operand_src (s, s->xp, s->size); \ + speed_operand_dst (s, tp, s->size); \ + speed_operand_src (s, dp, s->size); \ + speed_operand_dst (s, qp, s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + MPN_COPY (tp, s->xp, s->size); \ + function (qp, tp, s->size, dp, s->size, inv); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_MPN_MU_BDIV_Q(function,itchfn) \ + { \ + unsigned i; \ + mp_ptr dp, qp, scratch; \ + double t; \ + mp_size_t itch; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 2); \ + \ + itch = itchfn (s->size, s->size); \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (qp, s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (scratch, itch, s->align_wp2); \ + \ + /* divisor must be odd */ \ + MPN_COPY (dp, s->yp, s->size); \ + dp[0] |= 1; \ + \ + speed_operand_dst (s, qp, s->size); \ + speed_operand_src (s, s->xp, s->size); \ + speed_operand_src (s, dp, s->size); \ + speed_operand_dst (s, scratch, itch); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + function (qp, s->xp, s->size, dp, s->size, scratch); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_MPN_MU_BDIV_QR(function,itchfn) \ + { \ + unsigned i; \ + mp_ptr dp, tp, qp, rp, scratch; \ + double t; \ + mp_size_t itch; \ + TMP_DECL; \ \ + SPEED_RESTRICT_COND (s->size >= 2); \ + \ + itch = itchfn (2 * s->size, s->size); \ TMP_MARK; \ - SPEED_TMP_ALLOC_LIMBS (a, s->size, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (dp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (qp, s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, 2 * s->size, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (scratch, itch, s->align_wp2); \ + SPEED_TMP_ALLOC_LIMBS (rp, s->size, s->align_wp2); /* alignment? */ \ + \ + MPN_COPY (tp, s->xp, s->size); \ + MPN_COPY (tp+s->size, s->xp, s->size); \ + \ + /* divisor must be odd */ \ + MPN_COPY (dp, s->yp, s->size); \ + dp[0] |= 1; \ + \ + speed_operand_dst (s, qp, s->size); \ + speed_operand_dst (s, rp, s->size); \ + speed_operand_src (s, tp, 2 * s->size); \ + speed_operand_src (s, dp, s->size); \ + speed_operand_dst (s, scratch, itch); \ + speed_cache_fill (s); \ \ - SPEED_TMP_ALLOC_LIMBS (d, 3, s->align_yp); \ - MPN_COPY (d, s->yp, 3); \ - d[2] |= GMP_NUMB_HIGHBIT; \ - \ - qsize = s->size - 3; \ - SPEED_TMP_ALLOC_LIMBS (q, qsize, s->align_wp); \ - \ - speed_operand_dst (s, a, s->size); \ - speed_operand_src (s, d, 3); \ - speed_operand_dst (s, q, qsize); \ + speed_starttime (); \ + i = s->reps; \ + do { \ + function (qp, rp, tp, 2 * s->size, dp, s->size, scratch); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } + +#define SPEED_ROUTINE_MPN_INVERT(function,itchfn) \ + { \ + long i; \ + mp_ptr up, tp, ip; \ + double t; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 1); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (ip, s->size, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (up, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (tp, itchfn (s->size), s->align_wp); \ + \ + MPN_COPY (up, s->xp, s->size); \ + \ + /* normalize the data */ \ + up[s->size-1] |= GMP_NUMB_HIGHBIT; \ + \ + speed_operand_src (s, up, s->size); \ + speed_operand_dst (s, tp, s->size); \ + speed_operand_dst (s, ip, s->size); \ speed_cache_fill (s); \ \ speed_starttime (); \ i = s->reps; \ do \ - { \ - MPN_COPY (a, s->xp, s->size); \ - function (q, a, s->size, d, 3); \ - } \ + function (ip, up, s->size, tp); \ while (--i != 0); \ t = speed_endtime (); \ \ @@ -1220,43 +1850,158 @@ return t; \ } -/* A remainder 2*s->size by s->size limbs */ - -#define SPEED_ROUTINE_MPZ_MOD(function) \ +#define SPEED_ROUTINE_MPN_INVERTAPPR(function,itchfn) \ { \ - unsigned i; \ - mpz_t a, d, r; \ + long i; \ + mp_ptr up, tp, ip; \ + double t; \ + TMP_DECL; \ \ SPEED_RESTRICT_COND (s->size >= 1); \ \ - mpz_init_set_n (d, s->yp, s->size); \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (ip, s->size, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (up, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (tp, itchfn (s->size), s->align_wp); \ \ - /* high part less than d, low part a duplicate copied in */ \ - mpz_init_set_n (a, s->xp, s->size); \ - mpz_mod (a, a, d); \ - mpz_mul_2exp (a, a, BITS_PER_MP_LIMB * s->size); \ - MPN_COPY (PTR(a), s->xp, s->size); \ + MPN_COPY (up, s->xp, s->size); \ \ - mpz_init (r); \ + /* normalize the data */ \ + up[s->size-1] |= GMP_NUMB_HIGHBIT; \ \ - speed_operand_src (s, PTR(a), SIZ(a)); \ - speed_operand_src (s, PTR(d), SIZ(d)); \ + speed_operand_src (s, up, s->size); \ + speed_operand_dst (s, tp, s->size); \ + speed_operand_dst (s, ip, s->size); \ speed_cache_fill (s); \ \ speed_starttime (); \ i = s->reps; \ do \ - function (r, a, d); \ + function (ip, up, s->size, tp); \ while (--i != 0); \ - return speed_endtime (); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ } +#define SPEED_ROUTINE_MPN_NI_INVERTAPPR(function,itchfn) \ + { \ + long i; \ + mp_ptr up, tp, ip; \ + double t; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 3); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (ip, s->size, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (up, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (tp, itchfn (s->size), s->align_wp); \ + \ + MPN_COPY (up, s->xp, s->size); \ + \ + /* normalize the data */ \ + up[s->size-1] |= GMP_NUMB_HIGHBIT; \ + \ + speed_operand_src (s, up, s->size); \ + speed_operand_dst (s, tp, s->size); \ + speed_operand_dst (s, ip, s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do \ + function (ip, up, s->size, tp); \ + while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } + +#define SPEED_ROUTINE_MPN_BINVERT(function,itchfn) \ + { \ + long i; \ + mp_ptr up, tp, ip; \ + double t; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 1); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (ip, s->size, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (up, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (tp, itchfn (s->size), s->align_wp); \ + \ + MPN_COPY (up, s->xp, s->size); \ + \ + /* normalize the data */ \ + up[0] |= 1; \ + \ + speed_operand_src (s, up, s->size); \ + speed_operand_dst (s, tp, s->size); \ + speed_operand_dst (s, ip, s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do \ + function (ip, up, s->size, tp); \ + while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } #define SPEED_ROUTINE_REDC_1(function) \ { \ unsigned i; \ mp_ptr cp, mp, tp, ap; \ - mp_limb_t Nprim; \ + mp_limb_t inv; \ + double t; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size >= 1); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (ap, 2*s->size+1, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (mp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (cp, s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, 2*s->size+1, s->align_wp2); \ + \ + MPN_COPY (ap, s->xp, s->size); \ + MPN_COPY (ap+s->size, s->xp, s->size); \ + \ + /* modulus must be odd */ \ + MPN_COPY (mp, s->yp, s->size); \ + mp[0] |= 1; \ + binvert_limb (inv, mp[0]); \ + inv = -inv; \ + \ + speed_operand_src (s, ap, 2*s->size+1); \ + speed_operand_dst (s, tp, 2*s->size+1); \ + speed_operand_src (s, mp, s->size); \ + speed_operand_dst (s, cp, s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + MPN_COPY (tp, ap, 2*s->size); \ + function (cp, tp, mp, s->size, inv); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_REDC_2(function) \ + { \ + unsigned i; \ + mp_ptr cp, mp, tp, ap; \ + mp_limb_t invp[2]; \ double t; \ TMP_DECL; \ \ @@ -1274,7 +2019,49 @@ /* modulus must be odd */ \ MPN_COPY (mp, s->yp, s->size); \ mp[0] |= 1; \ - binvert_limb (Nprim, mp[0]); \ + mpn_binvert (invp, mp, 2, tp); \ + invp[0] = -invp[0]; invp[1] = ~invp[1]; \ + \ + speed_operand_src (s, ap, 2*s->size+1); \ + speed_operand_dst (s, tp, 2*s->size+1); \ + speed_operand_src (s, mp, s->size); \ + speed_operand_dst (s, cp, s->size); \ + speed_cache_fill (s); \ + \ + speed_starttime (); \ + i = s->reps; \ + do { \ + MPN_COPY (tp, ap, 2*s->size); \ + function (cp, tp, mp, s->size, invp); \ + } while (--i != 0); \ + t = speed_endtime (); \ + \ + TMP_FREE; \ + return t; \ + } +#define SPEED_ROUTINE_REDC_N(function) \ + { \ + unsigned i; \ + mp_ptr cp, mp, tp, ap, invp; \ + double t; \ + TMP_DECL; \ + \ + SPEED_RESTRICT_COND (s->size > 8); \ + \ + TMP_MARK; \ + SPEED_TMP_ALLOC_LIMBS (ap, 2*s->size+1, s->align_xp); \ + SPEED_TMP_ALLOC_LIMBS (mp, s->size, s->align_yp); \ + SPEED_TMP_ALLOC_LIMBS (cp, s->size, s->align_wp); \ + SPEED_TMP_ALLOC_LIMBS (tp, 2*s->size+1, s->align_wp2); \ + SPEED_TMP_ALLOC_LIMBS (invp, s->size, s->align_wp2); /* align? */ \ + \ + MPN_COPY (ap, s->xp, s->size); \ + MPN_COPY (ap+s->size, s->xp, s->size); \ + \ + /* modulus must be odd */ \ + MPN_COPY (mp, s->yp, s->size); \ + mp[0] |= 1; \ + mpn_binvert (invp, mp, s->size, tp); \ \ speed_operand_src (s, ap, 2*s->size+1); \ speed_operand_dst (s, tp, 2*s->size+1); \ @@ -1286,7 +2073,7 @@ i = s->reps; \ do { \ MPN_COPY (tp, ap, 2*s->size); \ - function (cp, tp, mp, s->size, Nprim); \ + function (cp, tp, mp, s->size, invp); \ } while (--i != 0); \ t = speed_endtime (); \ \ @@ -2065,8 +2852,8 @@ for (i = 0; i < s->size; i++) \ xp[i] = s->xp[i] % base; \ \ - wn = ((mp_size_t) (s->size / __mp_bases[base].chars_per_bit_exactly)) \ - / BITS_PER_MP_LIMB + 2; \ + wn = ((mp_size_t) (s->size / mp_bases[base].chars_per_bit_exactly)) \ + / GMP_LIMB_BITS + 2; \ SPEED_TMP_ALLOC_LIMBS (wp, wn, s->align_wp); \ \ /* use this during development to check wn is big enough */ \ diff -Nru gmp-4.3.2+dfsg/tune/time.c gmp-5.0.2+dfsg/tune/time.c --- gmp-4.3.2+dfsg/tune/time.c 2010-01-07 20:09:04.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/time.c 2011-05-08 09:49:29.000000000 +0000 @@ -1289,7 +1289,7 @@ psecs might overflow. 2^32 microseconds is only a bit over an hour, or 2^32 nanoseconds only about 4 seconds. - The casts to "long" are for the beneifit of timebasestruct_t, where the + The casts to "long" are for the benefit of timebasestruct_t, where the fields are only "unsigned int", but we want a signed difference. */ #define DIFF_SECS_ROUTINE(sec, psec, punit) \ diff -Nru gmp-4.3.2+dfsg/tune/tuneup.c gmp-5.0.2+dfsg/tune/tuneup.c --- gmp-4.3.2+dfsg/tune/tuneup.c 2010-01-07 20:09:04.000000000 +0000 +++ gmp-5.0.2+dfsg/tune/tuneup.c 2011-05-08 09:49:29.000000000 +0000 @@ -1,6 +1,7 @@ /* Create tuned thresholds for various algorithms. -Copyright 1999, 2000, 2001, 2002, 2003, 2005 Free Software Foundation, Inc. +Copyright 1999, 2000, 2001, 2002, 2003, 2005, 2006, 2008, 2009, 2010 Free +Software Foundation, Inc. This file is part of the GNU MP Library. @@ -64,11 +65,11 @@ instead. #define TUNE_PROGRAM_BUILD does this, with help from code at the end of gmp-impl.h, and rules in tune/Makefile.am. - MUL_KARATSUBA_THRESHOLD for example uses a recompiled mpn_mul_n. The + MUL_TOOM22_THRESHOLD for example uses a recompiled mpn_mul_n. The threshold is set to "size+1" to avoid karatsuba, or to "size" to use one level, but recurse into the basecase. - MUL_TOOM3_THRESHOLD makes use of the tuned MUL_KARATSUBA_THRESHOLD value. + MUL_TOOM33_THRESHOLD makes use of the tuned MUL_TOOM22_THRESHOLD value. Other routines in turn will make use of both of those. Naturally the dependants must be tuned first. @@ -87,7 +88,7 @@ DIVREM_1_NORM_THRESHOLD. An assembler mpn_divrem_1 is expected to be written and tuned all by hand. Assembler routines that might have hard limits are recompiled though, to make them accept a bigger range of sizes - than normal, eg. mpn_sqr_basecase to compare against mpn_kara_sqr_n. + than normal, eg. mpn_sqr_basecase to compare against mpn_toom2_sqr. Limitations: @@ -142,27 +143,53 @@ /* This is not defined if mpn_sqr_basecase doesn't declare a limit. In that case use zero here, which for params.max_size means no limit. */ -#ifndef TUNE_SQR_KARATSUBA_MAX -#define TUNE_SQR_KARATSUBA_MAX 0 +#ifndef TUNE_SQR_TOOM2_MAX +#define TUNE_SQR_TOOM2_MAX 0 #endif -mp_size_t mul_karatsuba_threshold = MP_SIZE_T_MAX; -mp_size_t mul_toom3_threshold = MUL_TOOM3_THRESHOLD_LIMIT; +mp_size_t mul_toom22_threshold = MP_SIZE_T_MAX; +mp_size_t mul_toom33_threshold = MUL_TOOM33_THRESHOLD_LIMIT; mp_size_t mul_toom44_threshold = MUL_TOOM44_THRESHOLD_LIMIT; +mp_size_t mul_toom6h_threshold = MUL_TOOM6H_THRESHOLD_LIMIT; +mp_size_t mul_toom8h_threshold = MUL_TOOM8H_THRESHOLD_LIMIT; +mp_size_t mul_toom32_to_toom43_threshold = MP_SIZE_T_MAX; +mp_size_t mul_toom32_to_toom53_threshold = MP_SIZE_T_MAX; +mp_size_t mul_toom42_to_toom53_threshold = MP_SIZE_T_MAX; +mp_size_t mul_toom42_to_toom63_threshold = MP_SIZE_T_MAX; mp_size_t mul_fft_threshold = MP_SIZE_T_MAX; mp_size_t mul_fft_modf_threshold = MP_SIZE_T_MAX; mp_size_t sqr_basecase_threshold = MP_SIZE_T_MAX; -mp_size_t sqr_karatsuba_threshold - = (TUNE_SQR_KARATSUBA_MAX == 0 ? MP_SIZE_T_MAX : TUNE_SQR_KARATSUBA_MAX); +mp_size_t sqr_toom2_threshold + = (TUNE_SQR_TOOM2_MAX == 0 ? MP_SIZE_T_MAX : TUNE_SQR_TOOM2_MAX); mp_size_t sqr_toom3_threshold = SQR_TOOM3_THRESHOLD_LIMIT; mp_size_t sqr_toom4_threshold = SQR_TOOM4_THRESHOLD_LIMIT; +mp_size_t sqr_toom6_threshold = SQR_TOOM6_THRESHOLD_LIMIT; +mp_size_t sqr_toom8_threshold = SQR_TOOM8_THRESHOLD_LIMIT; mp_size_t sqr_fft_threshold = MP_SIZE_T_MAX; mp_size_t sqr_fft_modf_threshold = MP_SIZE_T_MAX; -mp_size_t mullow_basecase_threshold = MP_SIZE_T_MAX; -mp_size_t mullow_dc_threshold = MP_SIZE_T_MAX; -mp_size_t mullow_mul_n_threshold = MP_SIZE_T_MAX; +mp_size_t mullo_basecase_threshold = MP_SIZE_T_MAX; +mp_size_t mullo_dc_threshold = MP_SIZE_T_MAX; +mp_size_t mullo_mul_n_threshold = MP_SIZE_T_MAX; +mp_size_t mulmod_bnm1_threshold = MP_SIZE_T_MAX; +mp_size_t sqrmod_bnm1_threshold = MP_SIZE_T_MAX; mp_size_t div_sb_preinv_threshold = MP_SIZE_T_MAX; -mp_size_t div_dc_threshold = MP_SIZE_T_MAX; +mp_size_t dc_div_qr_threshold = MP_SIZE_T_MAX; +mp_size_t dc_divappr_q_threshold = MP_SIZE_T_MAX; +mp_size_t mu_div_qr_threshold = MP_SIZE_T_MAX; +mp_size_t mu_divappr_q_threshold = MP_SIZE_T_MAX; +mp_size_t mupi_div_qr_threshold = MP_SIZE_T_MAX; +mp_size_t mu_div_q_threshold = MP_SIZE_T_MAX; +mp_size_t dc_bdiv_qr_threshold = MP_SIZE_T_MAX; +mp_size_t dc_bdiv_q_threshold = MP_SIZE_T_MAX; +mp_size_t mu_bdiv_qr_threshold = MP_SIZE_T_MAX; +mp_size_t mu_bdiv_q_threshold = MP_SIZE_T_MAX; +mp_size_t inv_mulmod_bnm1_threshold = MP_SIZE_T_MAX; +mp_size_t inv_newton_threshold = MP_SIZE_T_MAX; +mp_size_t inv_appr_threshold = MP_SIZE_T_MAX; +mp_size_t binv_newton_threshold = MP_SIZE_T_MAX; +mp_size_t redc_1_to_redc_2_threshold = MP_SIZE_T_MAX; +mp_size_t redc_1_to_redc_n_threshold = MP_SIZE_T_MAX; +mp_size_t redc_2_to_redc_n_threshold = MP_SIZE_T_MAX; mp_size_t powm_threshold = MP_SIZE_T_MAX; mp_size_t matrix22_strassen_threshold = MP_SIZE_T_MAX; mp_size_t hgcd_threshold = MP_SIZE_T_MAX; @@ -173,10 +200,11 @@ mp_size_t divrem_1_unnorm_threshold = MP_SIZE_T_MAX; mp_size_t mod_1_norm_threshold = MP_SIZE_T_MAX; mp_size_t mod_1_unnorm_threshold = MP_SIZE_T_MAX; -mp_size_t mod_1_1_threshold = MP_SIZE_T_MAX; -mp_size_t mod_1_2_threshold = MP_SIZE_T_MAX; -mp_size_t mod_1_3_threshold = MP_SIZE_T_MAX; -mp_size_t mod_1_4_threshold = MP_SIZE_T_MAX; +mp_size_t mod_1n_to_mod_1_1_threshold = MP_SIZE_T_MAX; +mp_size_t mod_1u_to_mod_1_1_threshold = MP_SIZE_T_MAX; +mp_size_t mod_1_1_to_mod_1_2_threshold = MP_SIZE_T_MAX; +mp_size_t mod_1_2_to_mod_1_4_threshold = MP_SIZE_T_MAX; +mp_size_t preinv_mod_1_to_mod_1_threshold = MP_SIZE_T_MAX; mp_size_t divrem_2_threshold = MP_SIZE_T_MAX; mp_size_t get_str_dc_threshold = MP_SIZE_T_MAX; mp_size_t get_str_precompute_threshold = MP_SIZE_T_MAX; @@ -190,7 +218,8 @@ const char *name; speed_function_t function; speed_function_t function2; - double step_factor; /* how much to step sizes (rounded down) */ + double step_factor; /* how much to step relatively */ + int step; /* how much to step absolutely */ double function_fudge; /* multiplier for "function" speeds */ int stop_since_change; double stop_factor; @@ -390,7 +419,7 @@ } -#define PRINT_WIDTH 28 +#define PRINT_WIDTH 31 void print_define_start (const char *name) @@ -414,6 +443,7 @@ if (remark != NULL) printf (" /* %s */", remark); printf ("\n"); + fflush (stdout); } void @@ -455,6 +485,7 @@ DEFAULT (param->function_fudge, 1.0); DEFAULT (param->function2, param->function); DEFAULT (param->step_factor, 0.01); /* small steps by default */ + DEFAULT (param->step, 1); /* small steps by default */ DEFAULT (param->stop_since_change, 80); DEFAULT (param->stop_factor, 1.2); DEFAULT (param->min_size, 10); @@ -510,21 +541,10 @@ for (s.size = param->min_size; s.size < param->max_size; - s.size += MAX ((mp_size_t) floor (s.size * param->step_factor), 1)) + s.size += MAX ((mp_size_t) floor (s.size * param->step_factor), param->step)) { double ti, tiplus1, d; - /* If there's a size limit and it's reached then it should still - be sensible to analyze the data since we want the threshold put - either at or near the limit. */ - if (s.size >= param->max_size) - { - if (option_trace) - printf ("Reached maximum size (%ld) without otherwise stopping\n", - (long) param->max_size); - break; - } - /* FIXME: check minimum size requirements are met, possibly by just checking for the -1 returns from the speed functions. @@ -584,7 +604,7 @@ } /* Stop if the threshold implied hasn't changed in a certain - number of measurements. (It's this condition that ususally + number of measurements. (It's this condition that usually stops the loop.) */ if (thresh_idx != new_thresh_idx) since_thresh_change = 0, thresh_idx = new_thresh_idx; @@ -659,6 +679,7 @@ mp_size_t first_size; mp_size_t max_size; speed_function_t function; + speed_function_t mul_modf_function; speed_function_t mul_function; mp_size_t sqr; }; @@ -673,7 +694,7 @@ { mp_size_t step; - step = MAX ((mp_size_t) 1 << (k-1), BITS_PER_MP_LIMB) / BITS_PER_MP_LIMB; + step = MAX ((mp_size_t) 1 << (k-1), GMP_LIMB_BITS) / GMP_LIMB_BITS; step *= (mp_size_t) 1 << k; if (step <= 0) @@ -699,126 +720,435 @@ return pl; } +#define NMAX_DEFAULT 1000000 +#define MAX_REPS 25 +#define MIN_REPS 5 + +static inline size_t +mpn_mul_fft_lcm (size_t a, unsigned int k) +{ + unsigned int l = k; + + while (a % 2 == 0 && k > 0) + { + a >>= 1; + k--; + } + return a << l; +} + +mp_size_t +fftfill (mp_size_t pl, int k, int sqr) +{ + mp_size_t maxLK; + mp_bitcnt_t N, Nprime, nprime, M; + + N = pl * GMP_NUMB_BITS; + M = N >> k; + + maxLK = mpn_mul_fft_lcm ((unsigned long) GMP_NUMB_BITS, k); + + Nprime = (1 + (2 * M + k + 2) / maxLK) * maxLK; + nprime = Nprime / GMP_NUMB_BITS; + if (nprime >= (sqr ? SQR_FFT_MODF_THRESHOLD : MUL_FFT_MODF_THRESHOLD)) + { + size_t K2; + for (;;) + { + K2 = 1L << mpn_fft_best_k (nprime, sqr); + if ((nprime & (K2 - 1)) == 0) + break; + nprime = (nprime + K2 - 1) & -K2; + Nprime = nprime * GMP_LIMB_BITS; + } + } + ASSERT_ALWAYS (nprime < pl); + + return Nprime; +} + +static int +compare_double (const void *ap, const void *bp) +{ + double a = * (const double *) ap; + double b = * (const double *) bp; + + if (a < b) + return -1; + else if (a > b) + return 1; + else + return 0; +} + +double +median (double *times, int n) +{ + qsort (times, n, sizeof (double), compare_double); + return times[n/2]; +} + +#define FFT_CACHE_SIZE 25 +typedef struct fft_cache +{ + mp_size_t n; + double time; +} fft_cache_t; + +fft_cache_t fft_cache[FFT_CACHE_SIZE]; + +double +cached_measure (mp_ptr rp, mp_srcptr ap, mp_srcptr bp, mp_size_t n, int k, + int n_measurements) +{ + int i; + double t, ttab[MAX_REPS]; + + if (fft_cache[k].n == n) + return fft_cache[k].time; + + for (i = 0; i < n_measurements; i++) + { + speed_starttime (); + mpn_mul_fft (rp, n, ap, n, bp, n, k); + ttab[i] = speed_endtime (); + } + + t = median (ttab, n_measurements); + fft_cache[k].n = n; + fft_cache[k].time = t; + return t; +} + +#define INSERT_FFTTAB(idx, nval, kval) \ + do { \ + fft_tab[idx].n = nval; \ + fft_tab[idx].k = kval; \ + fft_tab[idx+1].n = -1; /* sentinel */ \ + fft_tab[idx+1].k = -1; \ + } while (0) + +int +fftmes (mp_size_t nmin, mp_size_t nmax, int initial_k, struct fft_param_t *p, int idx, int print) +{ + mp_size_t n, n1, prev_n1; + int k, best_k, last_best_k, kmax; + int eff, prev_eff; + double t0, t1; + int n_measurements; + mp_limb_t *ap, *bp, *rp; + mp_size_t alloc; + char *linepref; + struct fft_table_nk *fft_tab; + + fft_tab = mpn_fft_table3[p->sqr]; + + for (k = 0; k < FFT_CACHE_SIZE; k++) + fft_cache[k].n = 0; + + if (nmin < (p->sqr ? SQR_FFT_MODF_THRESHOLD : MUL_FFT_MODF_THRESHOLD)) + { + nmin = (p->sqr ? SQR_FFT_MODF_THRESHOLD : MUL_FFT_MODF_THRESHOLD); + } + + if (print) + printf ("#define %s%*s", p->table_name, 38, ""); + + if (idx == 0) + { + INSERT_FFTTAB (0, nmin, initial_k); + + if (print) + { + printf ("\\\n { "); + printf ("{%7u,%2u}", fft_tab[0].n, fft_tab[0].k); + linepref = " "; + } + + idx = 1; + } + + ap = malloc (sizeof (mp_limb_t)); + if (p->sqr) + bp = ap; + else + bp = malloc (sizeof (mp_limb_t)); + rp = malloc (sizeof (mp_limb_t)); + alloc = 1; + + /* Round n to comply to initial k value */ + n = (nmin + ((1ul << initial_k) - 1)) & (MP_SIZE_T_MAX << initial_k); + + n_measurements = (18 - initial_k) | 1; + n_measurements = MAX (n_measurements, MIN_REPS); + n_measurements = MIN (n_measurements, MAX_REPS); + + last_best_k = initial_k; + best_k = initial_k; + + while (n < nmax) + { + int start_k, end_k; + + /* Assume the current best k is best until we hit its next FFT step. */ + t0 = 99999; + + prev_n1 = n + 1; + + start_k = MAX (4, best_k - 4); + end_k = MIN (24, best_k + 4); + for (k = start_k; k <= end_k; k++) + { + n1 = mpn_fft_next_size (prev_n1, k); + + eff = 200 * (n1 * GMP_NUMB_BITS >> k) / fftfill (n1, k, p->sqr); + + if (eff < 70) /* avoid measuring too slow fft:s */ + continue; + + if (n1 > alloc) + { + alloc = n1; + if (p->sqr) + { + ap = realloc (ap, sizeof (mp_limb_t)); + rp = realloc (rp, sizeof (mp_limb_t)); + ap = bp = realloc (ap, alloc * sizeof (mp_limb_t)); + mpn_random (ap, alloc); + rp = realloc (rp, alloc * sizeof (mp_limb_t)); + } + else + { + ap = realloc (ap, sizeof (mp_limb_t)); + bp = realloc (bp, sizeof (mp_limb_t)); + rp = realloc (rp, sizeof (mp_limb_t)); + ap = realloc (ap, alloc * sizeof (mp_limb_t)); + mpn_random (ap, alloc); + bp = realloc (bp, alloc * sizeof (mp_limb_t)); + mpn_random (bp, alloc); + rp = realloc (rp, alloc * sizeof (mp_limb_t)); + } + } + + t1 = cached_measure (rp, ap, bp, n1, k, n_measurements); + + if (t1 * n_measurements > 0.3) + n_measurements -= 2; + n_measurements = MAX (n_measurements, MIN_REPS); + + if (t1 < t0) + { + best_k = k; + t0 = t1; + } + } + + n1 = mpn_fft_next_size (prev_n1, best_k); + + if (last_best_k != best_k) + { + ASSERT_ALWAYS ((prev_n1 & ((1ul << last_best_k) - 1)) == 1); + + if (idx >= FFT_TABLE3_SIZE) + { + printf ("FFT table exhausted, increase FFT_TABLE3_SIZE in gmp-impl.h\n"); + abort (); + } + INSERT_FFTTAB (idx, prev_n1 >> last_best_k, best_k); + + if (print) + { + printf (", "); + if (idx % 4 == 0) + printf ("\\\n "); + printf ("{%7u,%2u}", fft_tab[idx].n, fft_tab[idx].k); + } + + if (option_trace >= 2) + { + printf ("{%lu,%u}\n", prev_n1, best_k); + fflush (stdout); + } + + last_best_k = best_k; + idx++; + } + + for (;;) + { + prev_n1 = n1; + prev_eff = fftfill (prev_n1, best_k, p->sqr); + n1 = mpn_fft_next_size (prev_n1 + 1, best_k); + eff = fftfill (n1, best_k, p->sqr); + + if (eff != prev_eff) + break; + } + + n = prev_n1; + } + + kmax = sizeof (mp_size_t) * 4; /* GMP_MP_SIZE_T_BITS / 2 */ + kmax = MIN (kmax, 25-1); + for (k = last_best_k + 1; k <= kmax; k++) + { + if (idx >= FFT_TABLE3_SIZE) + { + printf ("FFT table exhausted, increase FFT_TABLE3_SIZE in gmp-impl.h\n"); + abort (); + } + INSERT_FFTTAB (idx, ((1ul << (2*k-2)) + 1) >> (k-1), k); + + if (print) + { + printf (", "); + if (idx % 4 == 0) + printf ("\\\n "); + printf ("{%7u,%2u}", fft_tab[idx].n, fft_tab[idx].k); + } + + idx++; + } + + if (print) + printf (" }\n"); + + free (ap); + if (! p->sqr) + free (bp); + free (rp); + + return idx; +} + void fft (struct fft_param_t *p) { mp_size_t size; - int i, k; + int k, idx, initial_k; - for (i = 0; i < numberof (mpn_fft_table[p->sqr]); i++) - mpn_fft_table[p->sqr][i] = MP_SIZE_T_MAX; + /*** Generate MUL_FFT_MODF_THRESHOLD / SQR_FFT_MODF_THRESHOLD ***/ - *p->p_threshold = MP_SIZE_T_MAX; - *p->p_modf_threshold = MP_SIZE_T_MAX; +#if 1 + { + /* Use plain one() mechanism, for some reasonable initial values of k. The + advantage is that we don't depend on mpn_fft_table3, which can therefore + leave it completely uninitialized. */ + + static struct param_t param; + mp_size_t thres, best_thres; + int best_k; + char buf[20]; - option_trace = MAX (option_trace, option_fft_trace); + best_thres = MP_SIZE_T_MAX; + best_k = -1; - printf ("#define %s {", p->table_name); - if (option_trace >= 2) - printf ("\n"); + for (k = 5; k <= 7; k++) + { + param.name = p->modf_threshold_name; + param.min_size = 100; + param.max_size = 2000; + param.function = p->mul_function; + param.step_factor = 0.0; + param.step = 4; + param.function2 = p->mul_modf_function; + param.noprint = 1; + s.r = k; + one (&thres, ¶m); + if (thres < best_thres) + { + best_thres = thres; + best_k = k; + } + } - k = FFT_FIRST_K; + *(p->p_modf_threshold) = best_thres; + sprintf (buf, "k = %d", best_k); + print_define_remark (p->modf_threshold_name, best_thres, buf); + initial_k = best_k; + } +#else size = p->first_size; for (;;) { - double tk, tk1; + double tk, tm; - size = fft_next_size (size+1, k+1); + size = mpn_fft_next_size (size+1, mpn_fft_best_k (size+1, p->sqr)); + k = mpn_fft_best_k (size, p->sqr); if (size >= p->max_size) break; - if (k >= FFT_FIRST_K + numberof (mpn_fft_table[p->sqr])) - break; - /* compare k to k+1 in the middle of the current k+1 step */ - s.size = size + fft_step_size (k+1) / 2; + s.size = size + fft_step_size (k) / 2; s.r = k; - tk = tuneup_measure (p->function, NULL, &s); + tk = tuneup_measure (p->mul_modf_function, NULL, &s); if (tk == -1.0) abort (); - s.r = k+1; - tk1 = tuneup_measure (p->function, NULL, &s); - if (tk1 == -1.0) + tm = tuneup_measure (p->mul_function, NULL, &s); + if (tm == -1.0) abort (); if (option_trace >= 2) - printf ("at %ld size=%ld k=%d %.9f k=%d %.9f\n", - (long) size, (long) s.size, k, tk, k+1, tk1); + printf ("at %ld size=%ld k=%d %.9f size=%ld modf %.9f\n", + (long) size, + (long) size + fft_step_size (k) / 2, k, tk, + (long) s.size, tm); - /* declare the k+1 threshold as soon as it's faster at its midpoint */ - if (tk1 < tk) + if (tk < tm) { - mpn_fft_table[p->sqr][k-FFT_FIRST_K] = s.size; - printf (" %ld,", (long) s.size); - if (option_trace >= 2) printf ("\n"); - k++; + *p->p_modf_threshold = s.size; + print_define (p->modf_threshold_name, *p->p_modf_threshold); + break; } } + initial_k = ?; +#endif - mpn_fft_table[p->sqr][k-FFT_FIRST_K] = 0; - printf (" 0 }\n"); + /*** Generate MUL_FFT_TABLE3 / SQR_FFT_TABLE3 ***/ + idx = fftmes (*p->p_modf_threshold, p->max_size, initial_k, p, 0, 1); + printf ("#define %s_SIZE %d\n", p->table_name, idx); - size = p->first_size; + /*** Generate MUL_FFT_THRESHOLD / SQR_FFT_THRESHOLD ***/ - /* Declare an FFT faster than a plain toom4 etc multiplication found as - soon as one faster measurement obtained. A multiplication in the - middle of the FFT step is tested. */ + size = 2 * *p->p_modf_threshold; /* OK? */ for (;;) { - int modf = (*p->p_modf_threshold == MP_SIZE_T_MAX); double tk, tm; - - /* k=7 should be the first FFT which can beat toom4 on a full - multiply, so jump to that threshold and save some probing after the - modf threshold is found. */ - if (!modf && size < mpn_fft_table[p->sqr][2]) - { - size = mpn_fft_table[p->sqr][2]; - if (option_trace >= 2) - printf ("jump to size=%ld\n", (long) size); - } - - size = fft_next_size (size+1, mpn_fft_best_k (size, p->sqr)); - k = mpn_fft_best_k (size, p->sqr); + mp_size_t mulmod_size, mul_size;; if (size >= p->max_size) break; - s.size = size + fft_step_size (k) / 2; - s.r = k; + mulmod_size = mpn_mulmod_bnm1_next_size (2 * (size + 1)) / 2; + mul_size = (size + mulmod_size) / 2; /* middle of step */ + + s.size = mulmod_size; tk = tuneup_measure (p->function, NULL, &s); if (tk == -1.0) abort (); - if (!modf) s.size /= 2; + s.size = mul_size; tm = tuneup_measure (p->mul_function, NULL, &s); if (tm == -1.0) abort (); if (option_trace >= 2) - printf ("at %ld size=%ld k=%d %.9f size=%ld %s mul %.9f\n", + printf ("at %ld size=%ld %.9f size=%ld mul %.9f\n", (long) size, - (long) size + fft_step_size (k) / 2, k, tk, - (long) s.size, modf ? "modf" : "full", tm); + (long) mulmod_size, tk, + (long) mul_size, tm); + + size = mulmod_size; if (tk < tm) { - if (modf) - { - *p->p_modf_threshold = s.size; - print_define (p->modf_threshold_name, *p->p_modf_threshold); - } - else - { - *p->p_threshold = s.size; - print_define (p->threshold_name, *p->p_threshold); - break; - } + *p->p_threshold = s.size; + print_define (p->threshold_name, *p->p_threshold); + break; } } - } @@ -826,58 +1156,150 @@ /* Start karatsuba from 4, since the Cray t90 ieee code is much faster at 2, giving wrong results. */ void -tune_mul (void) +tune_mul_n (void) { static struct param_t param; param.function = speed_mpn_mul_n; - param.name = "MUL_KARATSUBA_THRESHOLD"; - param.min_size = MAX (4, MPN_KARA_MUL_N_MINSIZE); - param.max_size = MUL_KARATSUBA_THRESHOLD_LIMIT-1; - one (&mul_karatsuba_threshold, ¶m); - - param.name = "MUL_TOOM3_THRESHOLD"; - param.min_size = MAX (mul_karatsuba_threshold, MPN_TOOM3_MUL_N_MINSIZE); - param.max_size = MUL_TOOM3_THRESHOLD_LIMIT-1; - one (&mul_toom3_threshold, ¶m); + param.name = "MUL_TOOM22_THRESHOLD"; + param.min_size = MAX (4, MPN_TOOM22_MUL_MINSIZE); + param.max_size = MUL_TOOM22_THRESHOLD_LIMIT-1; + one (&mul_toom22_threshold, ¶m); + + param.name = "MUL_TOOM33_THRESHOLD"; + param.min_size = MAX (mul_toom22_threshold, MPN_TOOM33_MUL_MINSIZE); + param.max_size = MUL_TOOM33_THRESHOLD_LIMIT-1; + one (&mul_toom33_threshold, ¶m); param.name = "MUL_TOOM44_THRESHOLD"; - param.min_size = MAX (mul_toom3_threshold, MPN_TOOM44_MUL_N_MINSIZE); + param.min_size = MAX (mul_toom33_threshold, MPN_TOOM44_MUL_MINSIZE); param.max_size = MUL_TOOM44_THRESHOLD_LIMIT-1; one (&mul_toom44_threshold, ¶m); + param.name = "MUL_TOOM6H_THRESHOLD"; + param.min_size = MAX (mul_toom44_threshold, MPN_TOOM6H_MUL_MINSIZE); + param.max_size = MUL_TOOM6H_THRESHOLD_LIMIT-1; + one (&mul_toom6h_threshold, ¶m); + + param.name = "MUL_TOOM8H_THRESHOLD"; + param.min_size = MAX (mul_toom6h_threshold, MPN_TOOM8H_MUL_MINSIZE); + param.max_size = MUL_TOOM8H_THRESHOLD_LIMIT-1; + one (&mul_toom8h_threshold, ¶m); + /* disabled until tuned */ MUL_FFT_THRESHOLD = MP_SIZE_T_MAX; } +void +tune_mul (void) +{ + static struct param_t param; + mp_size_t thres; + + param.noprint = 1; + + param.function = speed_mpn_toom32_for_toom43_mul; + param.function2 = speed_mpn_toom43_for_toom32_mul; + param.name = "MUL_TOOM32_TO_TOOM43_THRESHOLD"; + param.min_size = MPN_TOOM43_MUL_MINSIZE; + one (&thres, ¶m); + mul_toom32_to_toom43_threshold = 17*thres/24; + print_define ("MUL_TOOM32_TO_TOOM43_THRESHOLD", mul_toom32_to_toom43_threshold); + + param.function = speed_mpn_toom32_for_toom53_mul; + param.function2 = speed_mpn_toom53_for_toom32_mul; + param.name = "MUL_TOOM32_TO_TOOM53_THRESHOLD"; + param.min_size = MPN_TOOM53_MUL_MINSIZE; + one (&thres, ¶m); + mul_toom32_to_toom53_threshold = 19*thres/30; + print_define ("MUL_TOOM32_TO_TOOM53_THRESHOLD", mul_toom32_to_toom53_threshold); + + param.function = speed_mpn_toom42_for_toom53_mul; + param.function2 = speed_mpn_toom53_for_toom42_mul; + param.name = "MUL_TOOM42_TO_TOOM53_THRESHOLD"; + param.min_size = MPN_TOOM53_MUL_MINSIZE; + one (&thres, ¶m); + mul_toom42_to_toom53_threshold = 11*thres/20; + print_define ("MUL_TOOM42_TO_TOOM53_THRESHOLD", mul_toom42_to_toom53_threshold); + + param.function = speed_mpn_toom42_mul; + param.function2 = speed_mpn_toom63_mul; + param.name = "MUL_TOOM42_TO_TOOM63_THRESHOLD"; + param.min_size = MPN_TOOM63_MUL_MINSIZE; + one (&thres, ¶m); + mul_toom42_to_toom63_threshold = thres/2; + print_define ("MUL_TOOM42_TO_TOOM63_THRESHOLD", mul_toom42_to_toom63_threshold); +} + -/* This was written by the tuneup challenged tege. Kevin, please delete - this comment when you've reviewed/rewritten this. :-) */ void -tune_mullow (void) +tune_mullo (void) { static struct param_t param; - param.function = speed_mpn_mullow_n; + param.function = speed_mpn_mullo_n; - param.name = "MULLOW_BASECASE_THRESHOLD"; - param.min_size = 3; + param.name = "MULLO_BASECASE_THRESHOLD"; + param.min_size = 1; param.min_is_always = 1; - param.max_size = MULLOW_BASECASE_THRESHOLD_LIMIT-1; - one (&mullow_basecase_threshold, ¶m); - - param.min_is_always = 0; /* ??? */ + param.max_size = MULLO_BASECASE_THRESHOLD_LIMIT-1; + param.stop_factor = 1.5; + param.noprint = 1; + one (&mullo_basecase_threshold, ¶m); - param.name = "MULLOW_DC_THRESHOLD"; - param.min_size = mul_karatsuba_threshold; + param.name = "MULLO_DC_THRESHOLD"; + param.min_size = 8; + param.min_is_always = 0; param.max_size = 1000; - one (&mullow_dc_threshold, ¶m); + one (&mullo_dc_threshold, ¶m); - param.name = "MULLOW_MUL_N_THRESHOLD"; - param.min_size = mullow_dc_threshold; - param.max_size = 2000; - one (&mullow_mul_n_threshold, ¶m); + if (mullo_basecase_threshold >= mullo_dc_threshold) + { + print_define ("MULLO_BASECASE_THRESHOLD", mullo_dc_threshold); + print_define_remark ("MULLO_DC_THRESHOLD", 0, "never mpn_mullo_basecase"); + } + else + { + print_define ("MULLO_BASECASE_THRESHOLD", mullo_basecase_threshold); + print_define ("MULLO_DC_THRESHOLD", mullo_dc_threshold); + } + +#if WANT_FFT + param.name = "MULLO_MUL_N_THRESHOLD"; + param.min_size = mullo_dc_threshold; + param.max_size = 2 * mul_fft_threshold; + param.noprint = 0; + param.step_factor = 0.03; + one (&mullo_mul_n_threshold, ¶m); +#else + print_define_remark ("MULLO_MUL_N_THRESHOLD", MP_SIZE_T_MAX, + "without FFT use mullo forever"); +#endif +} + +void +tune_mulmod_bnm1 (void) +{ + static struct param_t param; + + param.name = "MULMOD_BNM1_THRESHOLD"; + param.function = speed_mpn_mulmod_bnm1; + param.min_size = 4; + param.max_size = 100; + one (&mulmod_bnm1_threshold, ¶m); +} + +void +tune_sqrmod_bnm1 (void) +{ + static struct param_t param; + + param.name = "SQRMOD_BNM1_THRESHOLD"; + param.function = speed_mpn_sqrmod_bnm1; + param.min_size = 4; + param.max_size = 100; + one (&sqrmod_bnm1_threshold, ¶m); } @@ -900,130 +1322,283 @@ { static struct param_t param; param.name = "SQR_BASECASE_THRESHOLD"; - param.function = speed_mpn_sqr_n; + param.function = speed_mpn_sqr; param.min_size = 3; param.min_is_always = 1; - param.max_size = TUNE_SQR_KARATSUBA_MAX; + param.max_size = TUNE_SQR_TOOM2_MAX; param.noprint = 1; one (&sqr_basecase_threshold, ¶m); } { static struct param_t param; - param.name = "SQR_KARATSUBA_THRESHOLD"; - param.function = speed_mpn_sqr_n; - param.min_size = MAX (4, MPN_KARA_SQR_N_MINSIZE); - param.max_size = TUNE_SQR_KARATSUBA_MAX; + param.name = "SQR_TOOM2_THRESHOLD"; + param.function = speed_mpn_sqr; + param.min_size = MAX (4, MPN_TOOM2_SQR_MINSIZE); + param.max_size = TUNE_SQR_TOOM2_MAX; param.noprint = 1; - one (&sqr_karatsuba_threshold, ¶m); + one (&sqr_toom2_threshold, ¶m); if (! HAVE_NATIVE_mpn_sqr_basecase - && sqr_karatsuba_threshold < sqr_basecase_threshold) + && sqr_toom2_threshold < sqr_basecase_threshold) { /* Karatsuba becomes faster than mul_basecase before sqr_basecase does. Arrange for the expression - "BELOW_THRESHOLD (un, SQR_KARATSUBA_THRESHOLD))" which - selects mpn_sqr_basecase in mpn_sqr_n to be false, by setting - SQR_KARATSUBA_THRESHOLD to zero, making - SQR_BASECASE_THRESHOLD the karatsuba threshold. */ + "BELOW_THRESHOLD (un, SQR_TOOM2_THRESHOLD))" which + selects mpn_sqr_basecase in mpn_sqr to be false, by setting + SQR_TOOM2_THRESHOLD to zero, making + SQR_BASECASE_THRESHOLD the toom2 threshold. */ - sqr_basecase_threshold = SQR_KARATSUBA_THRESHOLD; - SQR_KARATSUBA_THRESHOLD = 0; + sqr_basecase_threshold = SQR_TOOM2_THRESHOLD; + SQR_TOOM2_THRESHOLD = 0; print_define_remark ("SQR_BASECASE_THRESHOLD", sqr_basecase_threshold, - "karatsuba"); - print_define_remark ("SQR_KARATSUBA_THRESHOLD",SQR_KARATSUBA_THRESHOLD, + "toom2"); + print_define_remark ("SQR_TOOM2_THRESHOLD",SQR_TOOM2_THRESHOLD, "never sqr_basecase"); } else { if (! HAVE_NATIVE_mpn_sqr_basecase) print_define ("SQR_BASECASE_THRESHOLD", sqr_basecase_threshold); - print_define ("SQR_KARATSUBA_THRESHOLD", SQR_KARATSUBA_THRESHOLD); + print_define ("SQR_TOOM2_THRESHOLD", SQR_TOOM2_THRESHOLD); } } { static struct param_t param; - mp_size_t toom3_start = MAX (sqr_karatsuba_threshold, sqr_basecase_threshold); + mp_size_t toom3_start = MAX (sqr_toom2_threshold, sqr_basecase_threshold); - param.function = speed_mpn_sqr_n; + param.function = speed_mpn_sqr; param.name = "SQR_TOOM3_THRESHOLD"; - param.min_size = MAX (toom3_start, MPN_TOOM3_SQR_N_MINSIZE); + param.min_size = MAX (toom3_start, MPN_TOOM3_SQR_MINSIZE); param.max_size = SQR_TOOM3_THRESHOLD_LIMIT-1; one (&sqr_toom3_threshold, ¶m); param.name = "SQR_TOOM4_THRESHOLD"; - param.min_size = MAX (sqr_toom3_threshold, MPN_TOOM4_SQR_N_MINSIZE); + param.min_size = MAX (sqr_toom3_threshold, MPN_TOOM4_SQR_MINSIZE); param.max_size = SQR_TOOM4_THRESHOLD_LIMIT-1; one (&sqr_toom4_threshold, ¶m); + + param.name = "SQR_TOOM6_THRESHOLD"; + param.min_size = MAX (sqr_toom4_threshold, MPN_TOOM6_SQR_MINSIZE); + param.max_size = SQR_TOOM6_THRESHOLD_LIMIT-1; + one (&sqr_toom6_threshold, ¶m); + + param.name = "SQR_TOOM8_THRESHOLD"; + param.min_size = MAX (sqr_toom6_threshold, MPN_TOOM8_SQR_MINSIZE); + param.max_size = SQR_TOOM8_THRESHOLD_LIMIT-1; + one (&sqr_toom8_threshold, ¶m); } } void -tune_sb_preinv (void) +tune_dc_div (void) { - static struct param_t param; + s.r = 0; /* clear to make speed function do 2n/n */ + { + static struct param_t param; + param.name = "DC_DIV_QR_THRESHOLD"; + param.function = speed_mpn_sbpi1_div_qr; + param.function2 = speed_mpn_dcpi1_div_qr; + param.min_size = 6; + one (&dc_div_qr_threshold, ¶m); + } + { + static struct param_t param; + param.name = "DC_DIVAPPR_Q_THRESHOLD"; + param.function = speed_mpn_sbpi1_divappr_q; + param.function2 = speed_mpn_dcpi1_divappr_q; + param.min_size = 6; + one (&dc_divappr_q_threshold, ¶m); + } +} - if (GMP_NAIL_BITS != 0) - { - DIV_SB_PREINV_THRESHOLD = MP_SIZE_T_MAX; - print_define_remark ("DIV_SB_PREINV_THRESHOLD", MP_SIZE_T_MAX, - "no preinv with nails"); - return; - } +static double +speed_mpn_sbordcpi1_div_qr (struct speed_params *s) +{ + if (s->size < DC_DIV_QR_THRESHOLD) + return speed_mpn_sbpi1_div_qr (s); + else + return speed_mpn_dcpi1_div_qr (s); +} - if (UDIV_PREINV_ALWAYS) - { - print_define_remark ("DIV_SB_PREINV_THRESHOLD", 0L, "preinv always"); - return; - } +void +tune_mu_div (void) +{ + s.r = 0; /* clear to make speed function do 2n/n */ + { + static struct param_t param; + param.name = "MU_DIV_QR_THRESHOLD"; + param.function = speed_mpn_dcpi1_div_qr; + param.function2 = speed_mpn_mu_div_qr; + param.min_size = 6; + param.max_size = 5000; + param.step_factor = 0.02; + one (&mu_div_qr_threshold, ¶m); + } + { + static struct param_t param; + param.name = "MU_DIVAPPR_Q_THRESHOLD"; + param.function = speed_mpn_dcpi1_divappr_q; + param.function2 = speed_mpn_mu_divappr_q; + param.min_size = 6; + param.max_size = 5000; + param.step_factor = 0.02; + one (&mu_divappr_q_threshold, ¶m); + } + { + static struct param_t param; + param.name = "MUPI_DIV_QR_THRESHOLD"; + param.function = speed_mpn_sbordcpi1_div_qr; + param.function2 = speed_mpn_mupi_div_qr; + param.min_size = 6; + param.min_is_always = 1; + param.max_size = 1000; + param.step_factor = 0.02; + one (&mupi_div_qr_threshold, ¶m); + } +} - param.check_size = 256; - param.min_size = 3; - param.min_is_always = 1; - param.size_extra = 3; - param.stop_factor = 2.0; - param.name = "DIV_SB_PREINV_THRESHOLD"; - param.function = speed_mpn_sb_divrem_m3; - one (&div_sb_preinv_threshold, ¶m); +void +tune_dc_bdiv (void) +{ + s.r = 0; /* clear to make speed function do 2n/n*/ + { + static struct param_t param; + param.name = "DC_BDIV_QR_THRESHOLD"; + param.function = speed_mpn_sbpi1_bdiv_qr; + param.function2 = speed_mpn_dcpi1_bdiv_qr; + param.min_size = 4; + one (&dc_bdiv_qr_threshold, ¶m); + } + { + static struct param_t param; + param.name = "DC_BDIV_Q_THRESHOLD"; + param.function = speed_mpn_sbpi1_bdiv_q; + param.function2 = speed_mpn_dcpi1_bdiv_q; + param.min_size = 4; + one (&dc_bdiv_q_threshold, ¶m); + } } +void +tune_mu_bdiv (void) +{ + s.r = 0; /* clear to make speed function do 2n/n*/ + { + static struct param_t param; + param.name = "MU_BDIV_QR_THRESHOLD"; + param.function = speed_mpn_dcpi1_bdiv_qr; + param.function2 = speed_mpn_mu_bdiv_qr; + param.min_size = 4; + param.max_size = 5000; + param.step_factor = 0.02; + one (&mu_bdiv_qr_threshold, ¶m); + } + { + static struct param_t param; + param.name = "MU_BDIV_Q_THRESHOLD"; + param.function = speed_mpn_dcpi1_bdiv_q; + param.function2 = speed_mpn_mu_bdiv_q; + param.min_size = 4; + param.max_size = 5000; + param.step_factor = 0.02; + one (&mu_bdiv_q_threshold, ¶m); + } +} void -tune_dc (void) +tune_invertappr (void) { static struct param_t param; - param.name = "DIV_DC_THRESHOLD"; - param.function = speed_mpn_dc_tdiv_qr; - param.step_factor = 0.02; - one (&div_dc_threshold, ¶m); -} + param.function = speed_mpn_ni_invertappr; + param.name = "INV_MULMOD_BNM1_THRESHOLD"; + param.min_size = 4; + one (&inv_mulmod_bnm1_threshold, ¶m); -/* This is an indirect determination, based on a comparison between redc and - mpz_mod. A fudge factor of 1.04 is applied to redc, to represent - additional overheads it gets in mpz_powm. + param.function = speed_mpn_invertappr; + param.name = "INV_NEWTON_THRESHOLD"; + param.min_size = 3; + one (&inv_newton_threshold, ¶m); +} - stop_factor is 1.1 to hopefully help cray vector systems, where otherwise - currently it hits the 1000 limb limit with only a factor of about 1.18 - (threshold should be around 650). */ +void +tune_invert (void) +{ + static struct param_t param; + + param.function = speed_mpn_invert; + param.name = "INV_APPR_THRESHOLD"; + param.min_size = 3; + one (&inv_appr_threshold, ¶m); +} void -tune_powm (void) +tune_binvert (void) { static struct param_t param; - param.name = "POWM_THRESHOLD"; - param.function = speed_mpn_redc_1; - param.function2 = speed_mpz_mod; - param.step_factor = 0.03; - param.stop_factor = 1.1; - param.function_fudge = 1.04; - one (&powm_threshold, ¶m); + + param.function = speed_mpn_binvert; + param.name = "BINV_NEWTON_THRESHOLD"; + param.min_size = 8; /* pointless with smaller operands */ + one (&binv_newton_threshold, ¶m); } +void +tune_redc (void) +{ +#define TUNE_REDC_2_MAX 100 +#if HAVE_NATIVE_mpn_addmul_2 || HAVE_NATIVE_mpn_redc_2 +#define WANT_REDC_2 1 +#endif + +#if WANT_REDC_2 + { + static struct param_t param; + param.name = "REDC_1_TO_REDC_2_THRESHOLD"; + param.function = speed_mpn_redc_1; + param.function2 = speed_mpn_redc_2; + param.min_size = 1; + param.min_is_always = 1; + param.max_size = TUNE_REDC_2_MAX; + param.noprint = 1; + one (&redc_1_to_redc_2_threshold, ¶m); + } + { + static struct param_t param; + param.name = "REDC_2_TO_REDC_N_THRESHOLD"; + param.function = speed_mpn_redc_2; + param.function2 = speed_mpn_redc_n; + param.min_size = 16; + param.noprint = 1; + one (&redc_2_to_redc_n_threshold, ¶m); + } + if (redc_1_to_redc_2_threshold >= TUNE_REDC_2_MAX - 1) + { + /* Disable REDC_2. This is not supposed to happen. */ + print_define ("REDC_1_TO_REDC_2_THRESHOLD", REDC_2_TO_REDC_N_THRESHOLD); + print_define_remark ("REDC_2_TO_REDC_N_THRESHOLD", 0, "anomaly: never REDC_2"); + } + else + { + print_define ("REDC_1_TO_REDC_2_THRESHOLD", REDC_1_TO_REDC_2_THRESHOLD); + print_define ("REDC_2_TO_REDC_N_THRESHOLD", REDC_2_TO_REDC_N_THRESHOLD); + } +#else + { + static struct param_t param; + param.name = "REDC_1_TO_REDC_N_THRESHOLD"; + param.function = speed_mpn_redc_1; + param.function2 = speed_mpn_redc_n; + param.min_size = 16; + one (&redc_1_to_redc_n_threshold, ¶m); + } +#endif +} void tune_matrix22_mul (void) @@ -1046,17 +1621,6 @@ one (&hgcd_threshold, ¶m); } -#if 0 -void -tune_gcd_accel (void) -{ - static struct param_t param; - param.name = "GCD_ACCEL_THRESHOLD"; - param.function = speed_mpn_gcd; - param.min_size = 1; - one (&gcd_accel_threshold, ¶m); -} -#endif void tune_gcd_dc (void) { @@ -1154,14 +1718,9 @@ } -double (*tuned_speed_mpn_mod_1) __GMP_PROTO ((struct speed_params *)); - void tune_mod_1 (void) { - /* plain version by default */ - tuned_speed_mpn_mod_1 = speed_mpn_mod_1; - /* No support for tuning native assembler code, do that by hand and put the results in the .asm file, there's no need for such thresholds to appear in gmp-mparam.h. */ @@ -1184,8 +1743,6 @@ } else { - tuned_speed_mpn_mod_1 = speed_mpn_mod_1_tune; - { static struct param_t param; param.name = "MOD_1_NORM_THRESHOLD"; @@ -1206,26 +1763,72 @@ { static struct param_t param; - s.r = GMP_NUMB_MASK / 5; + param.check_size = 256; + + s.r = randlimb_norm (); + param.function = speed_mpn_mod_1_tune; + + param.name = "MOD_1N_TO_MOD_1_1_THRESHOLD"; + param.min_size = 2; + one (&mod_1n_to_mod_1_1_threshold, ¶m); + } + { + static struct param_t param; + + param.check_size = 256; + + s.r = randlimb_norm () / 5; param.function = speed_mpn_mod_1_tune; - param.min_size = 1; + param.noprint = 1; + + param.name = "MOD_1U_TO_MOD_1_1_THRESHOLD"; + param.min_size = 2; + one (&mod_1u_to_mod_1_1_threshold, ¶m); + + param.name = "MOD_1_1_TO_MOD_1_2_THRESHOLD"; + param.min_size = mod_1u_to_mod_1_1_threshold; + one (&mod_1_1_to_mod_1_2_threshold, ¶m); - param.name = "MOD_1_1_THRESHOLD"; - one (&mod_1_1_threshold, ¶m); + if (mod_1u_to_mod_1_1_threshold + 2 >= mod_1_1_to_mod_1_2_threshold) + { + /* Disable mod_1_1, mod_1_2 is always faster. Measure when to switch + (from mod_1_unnorm) to mod_1_2. */ + mod_1_1_to_mod_1_2_threshold = 0; + + /* This really measures mod_1u -> mod_1_2 */ + param.min_size = 1; + one (&mod_1u_to_mod_1_1_threshold, ¶m); + } + print_define_remark ("MOD_1U_TO_MOD_1_1_THRESHOLD", mod_1u_to_mod_1_1_threshold, NULL); - param.name = "MOD_1_2_THRESHOLD"; - param.min_size = mod_1_1_threshold + 1; - one (&mod_1_2_threshold, ¶m); + param.name = "MOD_1_2_TO_MOD_1_4_THRESHOLD"; + param.min_size = mod_1_1_to_mod_1_2_threshold; + one (&mod_1_2_to_mod_1_4_threshold, ¶m); -#if 0 - param.name = "MOD_1_3_THRESHOLD"; - param.min_size = mod_1_2_threshold + 1; - one (&mod_1_3_threshold, ¶m); -#endif + if (mod_1_1_to_mod_1_2_threshold + 2 >= mod_1_2_to_mod_1_4_threshold) + { + /* Disable mod_1_2, mod_1_4 is always faster. Measure when to switch + (from mod_1_unnorm or mod_1_1) to mod_1_4. */ + mod_1_2_to_mod_1_4_threshold = 0; - param.name = "MOD_1_4_THRESHOLD"; - param.min_size = mod_1_2_threshold + 1; - one (&mod_1_4_threshold, ¶m); + param.min_size = 1; + one (&mod_1_1_to_mod_1_2_threshold, ¶m); + } + print_define_remark ("MOD_1_1_TO_MOD_1_2_THRESHOLD", mod_1_1_to_mod_1_2_threshold, NULL); + print_define_remark ("MOD_1_2_TO_MOD_1_4_THRESHOLD", mod_1_2_to_mod_1_4_threshold, NULL); + } + + { + static struct param_t param; + + param.check_size = 256; + + param.name = "PREINV_MOD_1_TO_MOD_1_THRESHOLD"; + s.r = randlimb_norm (); + param.function = speed_mpn_preinv_mod_1; + param.function2 = speed_mpn_mod_1_tune; + param.min_size = 1; + one (&preinv_mod_1_to_mod_1_threshold, ¶m); } } @@ -1302,72 +1905,6 @@ } -/* A non-zero MOD_1_UNNORM_THRESHOLD (or MOD_1_NORM_THRESHOLD) would imply - that udiv_qrnnd_preinv is worth using, but it seems most straightforward - to compare mpn_preinv_mod_1 and mpn_mod_1_div directly. */ - -void -tune_preinv_mod_1 (void) -{ - static struct param_t param; - speed_function_t mod_1; - const char *mod_1_name; - double t1, t2; - - /* Any native version of mpn_preinv_mod_1 is assumed to exist because it's - faster than mpn_mod_1. */ - if (HAVE_NATIVE_mpn_preinv_mod_1) - { - print_define_remark ("USE_PREINV_MOD_1", 1, "native"); - return; - } - - if (GMP_NAIL_BITS != 0) - { - print_define_remark ("USE_PREINV_MOD_1", 0, "no preinv with nails"); - return; - } - - /* If udiv_qrnnd_preinv is the only division method then of course - mpn_preinv_mod_1 should be used. */ - if (UDIV_PREINV_ALWAYS) - { - print_define_remark ("USE_PREINV_MOD_1", 1, "preinv always"); - return; - } - - /* If we've got an assembler version of mpn_mod_1, then compare against - that, not the mpn_mod_1_div generic C. */ - if (HAVE_NATIVE_mpn_mod_1) - { - mod_1 = speed_mpn_mod_1; - mod_1_name = "mpn_mod_1"; - } - else - { - mod_1 = speed_mpn_mod_1_div; - mod_1_name = "mpn_mod_1_div"; - } - - param.data_high = DATA_HIGH_LT_R; /* let mpn_mod_1 skip one division */ - s.size = 200; /* generous but not too big */ - s.r = randlimb_norm(); /* divisor */ - - t1 = tuneup_measure (speed_mpn_preinv_mod_1, ¶m, &s); - t2 = tuneup_measure (mod_1, ¶m, &s); - if (t1 == -1.0 || t2 == -1.0) - { - printf ("Oops, can't measure mpn_preinv_mod_1 and %s at %ld\n", - mod_1_name, (long) s.size); - abort (); - } - if (option_trace >= 1) - printf ("size=%ld, mpn_preinv_mod_1 %.9f, %s %.9f\n", - (long) s.size, t1, mod_1_name, t2); - - print_define_remark ("USE_PREINV_MOD_1", (mp_size_t) (t1 < t2), NULL); -} - void tune_divrem_2 (void) @@ -1504,22 +2041,22 @@ static struct param_t param; mp_size_t thresh_lt, thresh_ge, average; +#if 0 /* Any native mpn_modexact_1_odd is assumed to incorporate all the speed of a full mpn_mod_1. */ if (HAVE_NATIVE_mpn_modexact_1_odd) { - print_define_remark ("MODEXACT_1_ODD_THRESHOLD", 0, "always (native)"); + print_define_remark ("BMOD_1_TO_MOD_1_THRESHOLD", MP_SIZE_T_MAX, "always bmod_1"); return; } +#endif - ASSERT_ALWAYS (tuned_speed_mpn_mod_1 != NULL); - - param.name = "MODEXACT_1_ODD_THRESHOLD"; + param.name = "BMOD_1_TO_MOD_1_THRESHOLD"; param.check_size = 256; param.min_size = 2; param.stop_factor = 1.5; - param.function = tuned_speed_mpn_mod_1; - param.function2 = speed_mpn_modexact_1c_odd; + param.function = speed_mpn_modexact_1c_odd; + param.function2 = speed_mpn_mod_1_tune; param.noprint = 1; s.r = randlimb_half () | 1; @@ -1557,7 +2094,7 @@ double t1, t2, t3; int method; - s.size = BITS_PER_MP_LIMB * 3 / 4; + s.size = GMP_LIMB_BITS * 3 / 4; t1 = tuneup_measure (speed_mpn_jacobi_base_1, ¶m, &s); if (option_trace >= 1) @@ -1641,8 +2178,8 @@ for (i = 0; i < s->size; i++) str[i] = s->xp[i] % base; - wn = ((mp_size_t) (s->size / __mp_bases[base].chars_per_bit_exactly)) - / BITS_PER_MP_LIMB + 2; + wn = ((mp_size_t) (s->size / mp_bases[base].chars_per_bit_exactly)) + / GMP_LIMB_BITS + 2; SPEED_TMP_ALLOC_LIMBS (wp, wn, s->align_wp); /* use this during development to check wn is big enough */ @@ -1654,7 +2191,7 @@ speed_operand_dst (s, wp, wn); speed_cache_fill (s); - chars_per_limb = __mp_bases[base].chars_per_limb; + chars_per_limb = mp_bases[base].chars_per_limb; un = s->size / chars_per_limb + 1; powtab_mem = TMP_BALLOC_LIMBS (mpn_dc_set_str_powtab_alloc (un)); mpn_set_str_compute_powtab (powtab, powtab_mem, un, base); @@ -1676,8 +2213,6 @@ void tune_set_str (void) { - static struct param_t param; - s.r = 10; /* decimal */ { static struct param_t param; @@ -1709,14 +2244,15 @@ if (option_fft_max_size == 0) return; - param.table_name = "MUL_FFT_TABLE"; + param.table_name = "MUL_FFT_TABLE3"; param.threshold_name = "MUL_FFT_THRESHOLD"; param.p_threshold = &mul_fft_threshold; param.modf_threshold_name = "MUL_FFT_MODF_THRESHOLD"; param.p_modf_threshold = &mul_fft_modf_threshold; - param.first_size = MUL_TOOM3_THRESHOLD / 2; + param.first_size = MUL_TOOM33_THRESHOLD / 2; param.max_size = option_fft_max_size; - param.function = speed_mpn_mul_fft; + param.function = speed_mpn_fft_mul; + param.mul_modf_function = speed_mpn_mul_fft; param.mul_function = speed_mpn_mul_n; param.sqr = 0; fft (¶m); @@ -1731,20 +2267,20 @@ if (option_fft_max_size == 0) return; - param.table_name = "SQR_FFT_TABLE"; + param.table_name = "SQR_FFT_TABLE3"; param.threshold_name = "SQR_FFT_THRESHOLD"; param.p_threshold = &sqr_fft_threshold; param.modf_threshold_name = "SQR_FFT_MODF_THRESHOLD"; param.p_modf_threshold = &sqr_fft_modf_threshold; param.first_size = SQR_TOOM3_THRESHOLD / 2; param.max_size = option_fft_max_size; - param.function = speed_mpn_mul_fft_sqr; - param.mul_function = speed_mpn_sqr_n; - param.sqr = 0; + param.function = speed_mpn_fft_sqr; + param.mul_modf_function = speed_mpn_mul_fft_sqr; + param.mul_function = speed_mpn_sqr; + param.sqr = 1; fft (¶m); } - void all (void) { @@ -1811,52 +2347,66 @@ } printf ("\n"); + tune_divrem_1 (); + tune_mod_1 (); + tune_preinv_divrem_1 (); + tune_divrem_2 (); + tune_divexact_1 (); + tune_modexact_1_odd (); + printf("\n"); + + tune_mul_n (); + printf("\n"); + tune_mul (); printf("\n"); tune_sqr (); printf("\n"); - tune_mullow (); + tune_mulmod_bnm1 (); + tune_sqrmod_bnm1 (); + printf("\n"); + + tune_fft_mul (); + printf("\n"); + + tune_fft_sqr (); + printf ("\n"); + + tune_mullo (); + printf("\n"); + + tune_dc_div (); + tune_dc_bdiv (); + + printf("\n"); + tune_invertappr (); + tune_invert (); + printf("\n"); + + tune_binvert (); + tune_redc (); printf("\n"); - tune_sb_preinv (); - tune_dc (); - tune_powm (); + tune_mu_div (); + tune_mu_bdiv (); printf("\n"); tune_matrix22_mul (); tune_hgcd (); tune_gcd_dc (); tune_gcdext_dc (); -#if 0 - tune_gcd_accel (); -#endif tune_jacobi_base (); printf("\n"); - tune_divrem_1 (); - tune_mod_1 (); - tune_preinv_divrem_1 (); - tune_preinv_mod_1 (); - tune_divrem_2 (); - tune_divexact_1 (); - tune_modexact_1_odd (); - printf("\n"); - tune_get_str (); tune_set_str (); printf("\n"); - tune_fft_mul (); - printf("\n"); - - tune_fft_sqr (); - printf ("\n"); - time (&end_time); printf ("/* Tuneup completed successfully, took %ld seconds */\n", - end_time - start_time); + (long) (end_time - start_time)); TMP_FREE; }