public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] configure: remove dependencies on gmp and mpfr when gdb is disabled
@ 2023-01-03 16:25 Clément Chigot
  2023-01-05  8:06 ` Clément Chigot
  2023-01-05 20:44 ` Tom Tromey
  0 siblings, 2 replies; 3+ messages in thread
From: Clément Chigot @ 2023-01-03 16:25 UTC (permalink / raw)
  To: binutils; +Cc: pinskia, nickc, Clément Chigot

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.
---
 configure    | 4 +++-
 configure.ac | 4 +++-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/configure b/configure
index 417fc5a970c..9cb953a197e 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 3a1eb0357e5..e95a9ed116e 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"
-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] configure: remove dependencies on gmp and mpfr when gdb is disabled
  2023-01-03 16:25 [PATCH v2] configure: remove dependencies on gmp and mpfr when gdb is disabled Clément Chigot
@ 2023-01-05  8:06 ` Clément Chigot
  2023-01-05 20:44 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Clément Chigot @ 2023-01-05  8:06 UTC (permalink / raw)
  To: binutils; +Cc: pinskia, nickc

Hi Nick, Andrew,

On Tue, Jan 3, 2023 at 5:25 PM Clément Chigot <chigot@adacore.com> wrote:
>
> 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.
> ---
>  configure    | 4 +++-
>  configure.ac | 4 +++-
>  2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/configure b/configure
> index 417fc5a970c..9cb953a197e 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 3a1eb0357e5..e95a9ed116e 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"
> --
> 2.25.1

Would you mind reviewing/approving this patch, please ?

Thanks in advance,
Clément

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v2] configure: remove dependencies on gmp and mpfr when gdb is disabled
  2023-01-03 16:25 [PATCH v2] configure: remove dependencies on gmp and mpfr when gdb is disabled Clément Chigot
  2023-01-05  8:06 ` Clément Chigot
@ 2023-01-05 20:44 ` Tom Tromey
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Tromey @ 2023-01-05 20:44 UTC (permalink / raw)
  To: Clément Chigot via Binutils; +Cc: Clément Chigot, pinskia, nickc

>>>>> "Clément" == Clément Chigot via Binutils <binutils@sourceware.org> writes:

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

Thank you for the patch.  This is ok, please check it in.  It should go
in GCC as well, you'll have to send it to gcc-patches.

Tom

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-01-05 20:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-03 16:25 [PATCH v2] configure: remove dependencies on gmp and mpfr when gdb is disabled Clément Chigot
2023-01-05  8:06 ` Clément Chigot
2023-01-05 20:44 ` Tom Tromey

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).