Use toplevel configure for GMP and MPFR for gdb

This patch uses the toplevel configure parts for GMP/MPFR for
gdb. The only thing is that gdb now requires MPFR for building.
Before it was a recommended but not required library.
Also this allows building of GMP and MPFR with the toplevel
directory just like how it is done for GCC.
We now error out in the toplevel configure of the version
of GMP and MPFR that is wrong.

OK after GDB 13 branches? Build gdb 3 ways:
with GMP and MPFR in the toplevel (static library used at that point for both)
With only MPFR in the toplevel (GMP distro library used and MPFR built from source)
With neither GMP and MPFR in the toplevel (distro libraries used)

Changes from v1:
* Updated gdb/README and gdb/doc/gdb.texinfo.
* Regenerated using unmodified autoconf-2.69

Thanks,
Andrew Pinski

ChangeLog:
	* Makefile.def: Add configure-gdb dependencies
	on all-gmp and all-mpfr.
	* configure.ac: Split out MPC checking from MPFR.
	Require GMP and MPFR if the gdb directory exist.
	* Makefile.in: Regenerate.
	* configure: Regenerate.

gdb/ChangeLog:

	PR bug/28500
	* configure.ac: Remove AC_LIB_HAVE_LINKFLAGS
	for gmp and mpfr.
	Use GMPLIBS and GMPINC which is provided by the
	toplevel configure.
	* Makefile.in (LIBGMP, LIBMPFR): Remove.
	(GMPLIBS, GMPINC): Add definition.
	(INTERNAL_CFLAGS_BASE): Add GMPINC.
	(CLIBS): Exchange LIBMPFR and LIBGMP
	for GMPLIBS.
	* target-float.c: Make the code conditional on
	HAVE_LIBMPFR unconditional.
	* top.c: Remove code checking HAVE_LIBMPFR.
	* configure: Regenerate.
	* config.in: Regenerate.
	* README: Update GMP/MPFR section of the config
	options.
	* doc/gdb.texinfo: Likewise.

Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=28500
This commit is contained in:
Andrew Pinski 2022-11-08 07:57:18 +00:00
parent 68ce1575fc
commit 9911806278
12 changed files with 141 additions and 1093 deletions

View File

@ -419,6 +419,8 @@ dependencies = { module=configure-isl; on=all-gmp; };
dependencies = { module=all-intl; on=all-libiconv; }; dependencies = { module=all-intl; on=all-libiconv; };
// Host modules specific to gdb. // Host modules specific to gdb.
dependencies = { module=configure-gdb; on=all-gmp; };
dependencies = { module=configure-gdb; on=all-mpfr; };
dependencies = { module=configure-gdb; on=all-intl; }; dependencies = { module=configure-gdb; on=all-intl; };
dependencies = { module=configure-gdb; on=configure-sim; }; dependencies = { module=configure-gdb; on=configure-sim; };
dependencies = { module=configure-gdb; on=all-bfd; }; dependencies = { module=configure-gdb; on=all-bfd; };

View File

@ -65037,6 +65037,8 @@ configure-libcc1: maybe-configure-gcc
all-libcc1: maybe-all-gcc all-libcc1: maybe-all-gcc
all-c++tools: maybe-all-gcc all-c++tools: maybe-all-gcc
all-utils: maybe-all-libiberty all-utils: maybe-all-libiberty
configure-gdb: maybe-all-gmp
configure-gdb: maybe-all-mpfr
configure-gdb: maybe-all-intl configure-gdb: maybe-all-intl
configure-gdb: maybe-all-bfd configure-gdb: maybe-all-bfd
configure-gdb: maybe-all-libiconv configure-gdb: maybe-all-libiconv

67
configure vendored
View File

@ -8025,7 +8025,20 @@ _ACEOF
# Check for GMP, MPFR and MPC # Check for GMP, MPFR and MPC
gmplibs="-lmpc -lmpfr -lgmp" require_gmp=no
require_mpc=no
if test -d ${srcdir}/gcc ; then
require_gmp=yes
require_mpc=yes
fi
if test -d ${srcdir}/gdb ; then
require_gmp=yes
fi
gmplibs="-lmpfr -lgmp"
if test x"$require_mpc" = "xyes" ; then
gmplibs="-lmpc $gmplibs"
fi
gmpinc= gmpinc=
have_gmp=no have_gmp=no
@ -8160,7 +8173,7 @@ if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp;
have_gmp=yes have_gmp=yes
fi fi
if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then if test "x$require_gmp" = xyes && test "x$have_gmp" = xno; then
have_gmp=yes have_gmp=yes
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc" CFLAGS="$CFLAGS $gmpinc"
@ -8270,7 +8283,7 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
fi fi
# Check for the MPC header version. # Check for the MPC header version.
if test x"$have_gmp" = xyes ; then if test "x$require_mpc" = xyes && test x"$have_gmp" = xyes ; then
# Check for the recommended and required versions of MPC. # Check for the recommended and required versions of MPC.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpc.h" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of mpc.h" >&5
$as_echo_n "checking for the correct version of mpc.h... " >&6; } $as_echo_n "checking for the correct version of mpc.h... " >&6; }
@ -8324,18 +8337,17 @@ rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
if test x"$have_gmp" = xyes; then if test x"$have_gmp" = xyes; then
saved_LIBS="$LIBS" saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs" LIBS="$LIBS $gmplibs"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the gmp/mpfr/mpc libraries" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the gmp/mpfr libraries" >&5
$as_echo_n "checking for the correct version of the gmp/mpfr/mpc libraries... " >&6; } $as_echo_n "checking for the correct version of the gmp/mpfr libraries... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */ /* end confdefs.h. */
#include <mpc.h> #include <mpfr.h>
int int
main () main ()
{ {
mpfr_t n; mpfr_t n;
mpfr_t x; mpfr_t x;
mpc_t c;
int t; int t;
mpfr_init (n); mpfr_init (n);
mpfr_init (x); mpfr_init (x);
@ -8344,6 +8356,37 @@ main ()
mpfr_subnormalize (x, t, MPFR_RNDN); mpfr_subnormalize (x, t, MPFR_RNDN);
mpfr_clear(n); mpfr_clear(n);
mpfr_clear(x); mpfr_clear(x);
;
return 0;
}
_ACEOF
if ac_fn_c_try_link "$LINENO"; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
$as_echo "no" >&6; }; have_gmp=no
fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
LIBS="$saved_LIBS"
fi
# Now check the MPC library
if test "x$require_mpc" = xyes && test x"$have_gmp" = xyes; then
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the correct version of the mpc libraries" >&5
$as_echo_n "checking for the correct version of the mpc libraries... " >&6; }
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
#include <mpc.h>
int
main ()
{
mpc_t c;
mpc_init2 (c, 53); mpc_init2 (c, 53);
mpc_set_ui_ui (c, 1, 1, MPC_RNDNN); mpc_set_ui_ui (c, 1, 1, MPC_RNDNN);
mpc_cosh (c, c, MPC_RNDNN); mpc_cosh (c, c, MPC_RNDNN);
@ -8372,7 +8415,8 @@ rm -f core conftest.err conftest.$ac_objext \
# The library versions listed in the error message below should match # The library versions listed in the error message below should match
# the HARD-minimums enforced above. # the HARD-minimums enforced above.
if test x$have_gmp != xyes; then if test x$have_gmp != xyes; then
as_fn_error $? "Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+. if test -d ${srcdir}/gcc ; then
as_fn_error $? "Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at their locations. Source code for these libraries can be found at
their respective hosting sites as well as at their respective hosting sites as well as at
@ -8381,6 +8425,13 @@ http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package, you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header make sure that you have installed both the libraries and the header
files. They may be located in separate packages." "$LINENO" 5 files. They may be located in separate packages." "$LINENO" 5
else
as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+.
Try the --with-gmp and/or --with-mpfr options to specify
their locations. If you obtained GMP and/or MPFR from a vendor
distribution package, make sure that you have installed both the libraries
and the header files. They may be located in separate packages." "$LINENO" 5
fi
fi fi
fi fi

View File

@ -1578,7 +1578,20 @@ AC_SUBST(PGO_BUILD_LTO_CFLAGS)
_LT_CHECK_OBJDIR _LT_CHECK_OBJDIR
# Check for GMP, MPFR and MPC # Check for GMP, MPFR and MPC
gmplibs="-lmpc -lmpfr -lgmp" require_gmp=no
require_mpc=no
if test -d ${srcdir}/gcc ; then
require_gmp=yes
require_mpc=yes
fi
if test -d ${srcdir}/gdb ; then
require_gmp=yes
fi
gmplibs="-lmpfr -lgmp"
if test x"$require_mpc" = "xyes" ; then
gmplibs="-lmpc $gmplibs"
fi
gmpinc= gmpinc=
have_gmp=no have_gmp=no
@ -1693,7 +1706,7 @@ if test "x$with_gmp$with_gmp_include$with_gmp_lib" = x && test -d ${srcdir}/gmp;
have_gmp=yes have_gmp=yes
fi fi
if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then if test "x$require_gmp" = xyes && test "x$have_gmp" = xno; then
have_gmp=yes have_gmp=yes
saved_CFLAGS="$CFLAGS" saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $gmpinc" CFLAGS="$CFLAGS $gmpinc"
@ -1733,7 +1746,7 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
fi fi
# Check for the MPC header version. # Check for the MPC header version.
if test x"$have_gmp" = xyes ; then if test "x$require_mpc" = xyes && test x"$have_gmp" = xyes ; then
# Check for the recommended and required versions of MPC. # Check for the recommended and required versions of MPC.
AC_MSG_CHECKING([for the correct version of mpc.h]) AC_MSG_CHECKING([for the correct version of mpc.h])
AC_TRY_COMPILE([#include <mpc.h>],[ AC_TRY_COMPILE([#include <mpc.h>],[
@ -1752,11 +1765,10 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
if test x"$have_gmp" = xyes; then if test x"$have_gmp" = xyes; then
saved_LIBS="$LIBS" saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs" LIBS="$LIBS $gmplibs"
AC_MSG_CHECKING([for the correct version of the gmp/mpfr/mpc libraries]) AC_MSG_CHECKING([for the correct version of the gmp/mpfr libraries])
AC_TRY_LINK([#include <mpc.h>],[ AC_TRY_LINK([#include <mpfr.h>],[
mpfr_t n; mpfr_t n;
mpfr_t x; mpfr_t x;
mpc_t c;
int t; int t;
mpfr_init (n); mpfr_init (n);
mpfr_init (x); mpfr_init (x);
@ -1765,6 +1777,17 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
mpfr_subnormalize (x, t, MPFR_RNDN); mpfr_subnormalize (x, t, MPFR_RNDN);
mpfr_clear(n); mpfr_clear(n);
mpfr_clear(x); mpfr_clear(x);
], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); have_gmp=no])
LIBS="$saved_LIBS"
fi
# Now check the MPC library
if test "x$require_mpc" = xyes && test x"$have_gmp" = xyes; then
saved_LIBS="$LIBS"
LIBS="$LIBS $gmplibs"
AC_MSG_CHECKING([for the correct version of the mpc libraries])
AC_TRY_LINK([#include <mpc.h>],[
mpc_t c;
mpc_init2 (c, 53); mpc_init2 (c, 53);
mpc_set_ui_ui (c, 1, 1, MPC_RNDNN); mpc_set_ui_ui (c, 1, 1, MPC_RNDNN);
mpc_cosh (c, c, MPC_RNDNN); mpc_cosh (c, c, MPC_RNDNN);
@ -1780,7 +1803,8 @@ if test -d ${srcdir}/gcc && test "x$have_gmp" = xno; then
# The library versions listed in the error message below should match # The library versions listed in the error message below should match
# the HARD-minimums enforced above. # the HARD-minimums enforced above.
if test x$have_gmp != xyes; then if test x$have_gmp != xyes; then
AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+. if test -d ${srcdir}/gcc ; then
AC_MSG_ERROR([Building GCC requires GMP 4.2+, MPFR 3.1.0+ and MPC 0.8.0+.
Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify Try the --with-gmp, --with-mpfr and/or --with-mpc options to specify
their locations. Source code for these libraries can be found at their locations. Source code for these libraries can be found at
their respective hosting sites as well as at their respective hosting sites as well as at
@ -1789,6 +1813,13 @@ http://gcc.gnu.org/install/prerequisites.html for additional info. If
you obtained GMP, MPFR and/or MPC from a vendor distribution package, you obtained GMP, MPFR and/or MPC from a vendor distribution package,
make sure that you have installed both the libraries and the header make sure that you have installed both the libraries and the header
files. They may be located in separate packages.]) files. They may be located in separate packages.])
else
AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+.
Try the --with-gmp and/or --with-mpfr options to specify
their locations. If you obtained GMP and/or MPFR from a vendor
distribution package, make sure that you have installed both the libraries
and the header files. They may be located in separate packages.])
fi
fi fi
fi fi

View File

@ -208,11 +208,9 @@ LIBXXHASH = @LIBXXHASH@
# Where is libipt? This will be empty if libipt was not available. # Where is libipt? This will be empty if libipt was not available.
LIBIPT = @LIBIPT@ LIBIPT = @LIBIPT@
# Where is libgmp? # How to find GMP and MPFR
LIBGMP = @LIBGMP@ GMPLIBS = @GMPLIBS@
GMPINC = @GMPINC@
# Where is libmpfr? This will be empty if libmpfr was not available.
LIBMPFR = @LIBMPFR@
# GNU source highlight library. # GNU source highlight library.
SRCHIGH_LIBS = @SRCHIGH_LIBS@ SRCHIGH_LIBS = @SRCHIGH_LIBS@
@ -633,7 +631,7 @@ INTERNAL_CFLAGS_BASE = \
$(ZSTD_CFLAGS) $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \ $(ZSTD_CFLAGS) $(BFD_CFLAGS) $(INCLUDE_CFLAGS) $(LIBDECNUMBER_CFLAGS) \
$(INTL_CFLAGS) $(INCGNU) $(INCSUPPORT) $(LIBBACKTRACE_INC) \ $(INTL_CFLAGS) $(INCGNU) $(INCSUPPORT) $(LIBBACKTRACE_INC) \
$(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS) $(SRCHIGH_CFLAGS) \ $(ENABLE_CFLAGS) $(INTERNAL_CPPFLAGS) $(SRCHIGH_CFLAGS) \
$(TOP_CFLAGS) $(PTHREAD_CFLAGS) $(DEBUGINFOD_CFLAGS) $(TOP_CFLAGS) $(PTHREAD_CFLAGS) $(DEBUGINFOD_CFLAGS) $(GMPINC)
INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS) INTERNAL_WARN_CFLAGS = $(INTERNAL_CFLAGS_BASE) $(GDB_WARN_CFLAGS)
INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS) INTERNAL_CFLAGS = $(INTERNAL_WARN_CFLAGS) $(GDB_WERROR_CFLAGS)
@ -658,7 +656,7 @@ CLIBS = $(SIM) $(READLINE) $(OPCODES) $(LIBCTF) $(BFD) $(ZLIB) $(ZSTD_LIBS) \
@LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \ @LIBS@ @GUILE_LIBS@ @PYTHON_LIBS@ \
$(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \ $(LIBEXPAT) $(LIBLZMA) $(LIBBABELTRACE) $(LIBIPT) \
$(WIN32LIBS) $(LIBGNU) $(LIBGNU_EXTRA_LIBS) $(LIBICONV) \ $(WIN32LIBS) $(LIBGNU) $(LIBGNU_EXTRA_LIBS) $(LIBICONV) \
$(LIBMPFR) $(LIBGMP) $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS) \ $(GMPLIBS) $(SRCHIGH_LIBS) $(LIBXXHASH) $(PTHREAD_LIBS) \
$(DEBUGINFOD_LIBS) $(LIBBABELTRACE_LIB) $(DEBUGINFOD_LIBS) $(LIBBABELTRACE_LIB)
CDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) $(CTF_DEPS) \ CDEPS = $(NAT_CDEPS) $(SIM) $(BFD) $(READLINE_DEPS) $(CTF_DEPS) \
$(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \ $(OPCODES) $(INTL_DEPS) $(LIBIBERTY) $(CONFIG_DEPS) $(LIBGNU) \

View File

@ -484,22 +484,32 @@ more obscure GDB `configure' options are not listed here.
not have liblzma installed, you can get the latest version from not have liblzma installed, you can get the latest version from
`https://tukaani.org/xz/'. `https://tukaani.org/xz/'.
`--with-libgmp-prefix=DIR' `--with-gmp=DIR'
`--with-gmp-lib=LIBDIR'
`--with-gmp-include=INCDIR'
Build GDB using the GMP library installed at the directory DIR. Build GDB using the GMP library installed at the directory DIR.
If your host does not have GMP installed, you can get the latest If your host does not have GMP installed, you can get the latest
version at `https://gmplib.org/'. version at `https://gmplib.org/'.
The `--with-gmp=gmpinstalldir` option is shorthand for
`--with-gmp-lib=gmpinstalldir/lib` and
`--with-gmp-include=gmpinstalldir/include`.
`--with-mpfr' `--with-mpfr=DIR'
Build GDB with GNU MPFR, a library for multiple-precision `--with-mpfr-lib=LIBDIR'
floating-point computation with correct rounding. (Done by `--with-mpfr-include=INCDIR'
default if GNU MPFR is installed and found at configure time.) Build GDB using GNU MPFR installed at the directory DIR,
a library for multiple-precision floating-point computation
with correct rounding.
This library is used to emulate target floating-point arithmetic This library is used to emulate target floating-point arithmetic
during expression evaluation when the target uses different during expression evaluation when the target uses different
floating-point formats than the host. If GNU MPFR is not floating-point formats than the host.
available, GDB will fall back to using host floating-point If your host does not have GNU MPFR installed, you
arithmetic. If your host does not have GNU MPFR installed, you
can get the latest version from `https://www.mpfr.org/'. can get the latest version from `https://www.mpfr.org/'.
The `--with-mpfr=mpfrinstalldir` option is shorthand for
`--with-mpfr-lib=mpfrinstalldir/lib` and
`--with-mpfr-include=mpfrinstalldir/include`.
`--with-python[=PYTHON]' `--with-python[=PYTHON]'
Build GDB with Python scripting support. (Done by default if Build GDB with Python scripting support. (Done by default if
libpython is present and found at configure time.) Python makes libpython is present and found at configure time.) Python makes

View File

@ -241,9 +241,6 @@
/* Define if you have the expat library. */ /* Define if you have the expat library. */
#undef HAVE_LIBEXPAT #undef HAVE_LIBEXPAT
/* Define if you have the gmp library. */
#undef HAVE_LIBGMP
/* Define to 1 if you have the `libiconvlist' function. */ /* Define to 1 if you have the `libiconvlist' function. */
#undef HAVE_LIBICONVLIST #undef HAVE_LIBICONVLIST
@ -256,9 +253,6 @@
/* Define to 1 if you have the `m' library (-lm). */ /* Define to 1 if you have the `m' library (-lm). */
#undef HAVE_LIBM #undef HAVE_LIBM
/* Define if you have the mpfr library. */
#undef HAVE_LIBMPFR
/* Define to 1 if you have the <libunwind-ia64.h> header file. */ /* Define to 1 if you have the <libunwind-ia64.h> header file. */
#undef HAVE_LIBUNWIND_IA64_H #undef HAVE_LIBUNWIND_IA64_H

1014
gdb/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -656,35 +656,8 @@ else
fi fi
fi fi
# Verify that we have a usable GMP library. AC_ARG_VAR(GMPLIBS,[How to link GMP])
AC_LIB_HAVE_LINKFLAGS([gmp], [], [#include <gmp.h>], AC_ARG_VAR(GMPINC,[How to find GMP include files])
[mpz_t n;
mpz_init (n);])
if test "$HAVE_LIBGMP" != yes; then
AC_MSG_ERROR([GMP is missing or unusable])
fi
AC_ARG_WITH(mpfr,
AS_HELP_STRING([--with-mpfr], [include MPFR support (auto/yes/no)]),
[], [with_mpfr=auto])
AC_MSG_CHECKING([whether to use MPFR])
AC_MSG_RESULT([$with_mpfr])
if test "${with_mpfr}" = no; then
AC_MSG_WARN([MPFR support disabled; some features may be unavailable.])
HAVE_LIBMPFR=no
else
AC_LIB_HAVE_LINKFLAGS([mpfr], [gmp], [#include <mpfr.h>],
[mpfr_exp_t exp; mpfr_t x;
mpfr_frexp (&exp, x, x, MPFR_RNDN);])
if test "$HAVE_LIBMPFR" != yes; then
if test "$with_mpfr" = yes; then
AC_MSG_ERROR([MPFR is missing or unusable])
else
AC_MSG_WARN([MPFR is missing or unusable; some features may be unavailable.])
fi
fi
fi
# --------------------- # # --------------------- #
# Check for libpython. # # Check for libpython. #

View File

@ -39317,7 +39317,8 @@ make program. Other variants of @code{make} will not work.
This library may be included with your operating system distribution; This library may be included with your operating system distribution;
if it is not, you can get the latest version from if it is not, you can get the latest version from
@url{https://gmplib.org/}. If GMP is installed at an unusual path, @url{https://gmplib.org/}. If GMP is installed at an unusual path,
you can use the @option{--with-libgmp-prefix} option to specify you can use the @option{--with-gmp} option or options
@option{--with-gmp-include} and @option{--with-gmp-lib} to specify
its location. its location.
@end table @end table
@ -39399,18 +39400,18 @@ automatically. If it is installed in an unusual path, you can use the
@item MPFR @item MPFR
@anchor{MPFR} @anchor{MPFR}
@value{GDBN} can use the GNU MPFR multiple-precision floating-point @value{GDBN} now uses the GNU MPFR multiple-precision floating-point
library. This library may be included with your operating system library. This library may be included with your operating system
distribution; if it is not, you can get the latest version from distribution; if it is not, you can get the latest version from
@url{http://www.mpfr.org}. The @file{configure} script will search @url{http://www.mpfr.org}. The @file{configure} script will search
for this library in several standard locations; if it is installed for this library in several standard locations; if it is installed
in an unusual path, you can use the @option{--with-libmpfr-prefix} in an unusual path, you can use the @option{--with-mpfr} option or options
option to specify its location. @option{--with-mpfr-include} and @option{--with-mpfr-lib} to specify
its location.
GNU MPFR is used to emulate target floating-point arithmetic during GNU MPFR is used to emulate target floating-point arithmetic during
expression evaluation when the target uses different floating-point expression evaluation when the target uses different floating-point
formats than the host. If GNU MPFR it is not available, @value{GDBN} formats than the host.
will fall back to using host floating-point arithmetic.
@item Python @item Python
@value{GDBN} can be scripted using Python language. @xref{Python}. @value{GDBN} can be scripted using Python language. @xref{Python}.

View File

@ -1156,8 +1156,6 @@ host_float_ops<T>::compare (const gdb_byte *x, const struct type *type_x,
/* Implementation of target_float_ops using the MPFR library /* Implementation of target_float_ops using the MPFR library
mpfr_t as intermediate type. */ mpfr_t as intermediate type. */
#ifdef HAVE_LIBMPFR
#define MPFR_USE_INTMAX_T #define MPFR_USE_INTMAX_T
#include <mpfr.h> #include <mpfr.h>
@ -1715,8 +1713,6 @@ mpfr_float_ops::compare (const gdb_byte *x, const struct type *type_x,
return 1; return 1;
} }
#endif
/* Helper routines operating on decimal floating-point data. */ /* Helper routines operating on decimal floating-point data. */
@ -2266,11 +2262,7 @@ get_target_float_ops (enum target_float_ops_kind kind)
use the largest host floating-point type as intermediate format. */ use the largest host floating-point type as intermediate format. */
case target_float_ops_kind::binary: case target_float_ops_kind::binary:
{ {
#ifdef HAVE_LIBMPFR
static mpfr_float_ops binary_float_ops; static mpfr_float_ops binary_float_ops;
#else
static host_float_ops<long double> binary_float_ops;
#endif
return &binary_float_ops; return &binary_float_ops;
} }

View File

@ -1581,14 +1581,6 @@ This GDB was configured as follows:\n\
")); "));
#endif #endif
#if HAVE_LIBMPFR
gdb_printf (stream, _("\
--with-mpfr\n\
"));
#else
gdb_printf (stream, _("\
--without-mpfr\n\
"));
#endif #endif
#if HAVE_LIBXXHASH #if HAVE_LIBXXHASH
gdb_printf (stream, _("\ gdb_printf (stream, _("\