blob: 04c1310cbe9728f05c6f85d9a4e6bab464edb14b [file] [log] [blame]
Andrew Geisslerc5535c92023-01-27 16:10:19 -06001From 518c167116ab7aa6bb84a97200aeda2c4289e064 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <chigot@adacore.com>
3Date: Tue, 3 Jan 2023 14:24:43 +0100
4Subject: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is
5 disabled
6
7Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks
8about GMP and MPFR for gdb builds have been moved to the toplevel
9configure.
10However, it doesn't take into account the --disable-gdb option. Meaning
11that a build without gdb will require these libraries even if not
12needed.
13
14ChangeLog:
15
16 * configure.ac: Skip GMP and MPFR when --disable-gdb is
17 provided.
18 * configure: Regenerate.
19
20Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=5fb0e308577143ceb313fde5538dc9ecb038f29f]
21Signed-off-by: Khem Raj <raj.khem@gmail.com>
22---
23 configure | 4 +++-
24 configure.ac | 4 +++-
25 2 files changed, 6 insertions(+), 2 deletions(-)
26
27diff --git a/configure b/configure
28index bdc3583215f..b63b5cd3de0 100755
29--- a/configure
30+++ b/configure
31@@ -8032,7 +8032,9 @@ if test -d ${srcdir}/gcc ; then
32 require_mpc=yes
33 fi
34 if test -d ${srcdir}/gdb ; then
35- require_gmp=yes
36+ if test "x$enable_gdb" != xno; then
37+ require_gmp=yes
38+ fi
39 fi
40
41 gmplibs="-lmpfr -lgmp"
42diff --git a/configure.ac b/configure.ac
43index 1c00b9aec42..2df870b86af 100644
44--- a/configure.ac
45+++ b/configure.ac
46@@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then
47 require_mpc=yes
48 fi
49 if test -d ${srcdir}/gdb ; then
50- require_gmp=yes
51+ if test "x$enable_gdb" != xno; then
52+ require_gmp=yes
53+ fi
54 fi
55
56 gmplibs="-lmpfr -lgmp"