From: Joel Brobecker Date: Sun, 15 Nov 2020 08:08:40 +0000 (-0500) Subject: gdb: Make GMP a required dependency for building GDB X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=1b4ac058f7daeb9bac9ab0e63a7e73535208dfef;p=binutils-gdb.git gdb: Make GMP a required dependency for building GDB This commit modifies gdb's configure script to trigger an error if we cannot find a usable libgmp. For the record, making this a requirement was discussed in March 2018: https://sourceware.org/pipermail/gdb-patches/2018-March/147373.html gdb/ChangeLog: * configure.ac: Generate an error if a usable GMP library could not be found. * configure: Regenerate. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index ee1dea309f4..8de390a7c72 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2020-11-15 Joel Brobecker + + * configure.ac: Generate an error if a usable GMP library + could not be found. + * configure: Regenerate. + 2020-11-15 Joel Brobecker * configure.ac: Add support for --with-libgmp-prefix. diff --git a/gdb/configure b/gdb/configure index 2bf08569bf5..a3e73b431c4 100755 --- a/gdb/configure +++ b/gdb/configure @@ -10469,6 +10469,9 @@ $as_echo "$LIBGMP" >&6; } +if test "$HAVE_LIBGMP" != yes; then + as_fn_error $? "GMP is missing or unusable" "$LINENO" 5 +fi # Check whether --with-mpfr was given. diff --git a/gdb/configure.ac b/gdb/configure.ac index 0264a4f2c9c..32f25d96551 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -687,6 +687,9 @@ fi AC_LIB_HAVE_LINKFLAGS([gmp], [], [#include ], [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)]),