summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/0014-configure-remove-dependencies-on-gmp-and-mpfr-when-g.patch
blob: 04c1310cbe9728f05c6f85d9a4e6bab464edb14b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
From 518c167116ab7aa6bb84a97200aeda2c4289e064 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Cl=C3=A9ment=20Chigot?= <chigot@adacore.com>
Date: Tue, 3 Jan 2023 14:24:43 +0100
Subject: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is
 disabled

Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure checks
about GMP and MPFR for gdb builds have been moved to the toplevel
configure.
However, it doesn't take into account the --disable-gdb option. Meaning
that a build without gdb will require these libraries even if not
needed.

ChangeLog:

	* configure.ac: Skip GMP and MPFR when --disable-gdb is
	provided.
	* configure: Regenerate.

Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=5fb0e308577143ceb313fde5538dc9ecb038f29f]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 configure    | 4 +++-
 configure.ac | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index bdc3583215f..b63b5cd3de0 100755
--- a/configure
+++ b/configure
@@ -8032,7 +8032,9 @@ if test -d ${srcdir}/gcc ; then
   require_mpc=yes
 fi
 if test -d ${srcdir}/gdb ; then
-  require_gmp=yes
+  if test "x$enable_gdb" != xno; then
+   require_gmp=yes
+  fi
 fi
 
 gmplibs="-lmpfr -lgmp"
diff --git a/configure.ac b/configure.ac
index 1c00b9aec42..2df870b86af 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then
   require_mpc=yes
 fi
 if test -d ${srcdir}/gdb ; then
-  require_gmp=yes
+  if test "x$enable_gdb" != xno; then
+   require_gmp=yes
+  fi
 fi
 
 gmplibs="-lmpfr -lgmp"