public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled
@ 2023-01-06  8:39 Clément Chigot
  2023-01-06  8:43 ` Clément Chigot
  0 siblings, 1 reply; 3+ messages in thread
From: Clément Chigot @ 2023-01-06  8:39 UTC (permalink / raw)
  To: gcc-patches; +Cc: tom, pinskia, Clément Chigot

Since 91e0d22025e0bf2af2e364cb7214a05512a0c431, 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 d6716e38e99..85883099410 100755
--- a/configure
+++ b/configure
@@ -7913,7 +7913,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 737c1a1172b..2b612dce6e9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1489,7 +1489,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] configure: remove dependencies on gmp and mpfr when gdb is disabled
  2023-01-06  8:39 [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled Clément Chigot
@ 2023-01-06  8:43 ` Clément Chigot
  2023-01-06  9:01   ` Richard Biener
  0 siblings, 1 reply; 3+ messages in thread
From: Clément Chigot @ 2023-01-06  8:43 UTC (permalink / raw)
  To: gcc-patches; +Cc: tom, pinskia

On Fri, Jan 6, 2023 at 9:39 AM Clément Chigot <chigot@adacore.com> wrote:
>
> Since 91e0d22025e0bf2af2e364cb7214a05512a0c431, 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 d6716e38e99..85883099410 100755
> --- a/configure
> +++ b/configure
> @@ -7913,7 +7913,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 737c1a1172b..2b612dce6e9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -1489,7 +1489,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

This patch has already been merged in the binutils repository see [1].

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5fb0e308577143ceb313fde5538dc9ecb038f29f

Thanks,
Clément

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

* Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled
  2023-01-06  8:43 ` Clément Chigot
@ 2023-01-06  9:01   ` Richard Biener
  0 siblings, 0 replies; 3+ messages in thread
From: Richard Biener @ 2023-01-06  9:01 UTC (permalink / raw)
  To: Clément Chigot; +Cc: gcc-patches, tom, pinskia



> Am 06.01.2023 um 09:44 schrieb Clément Chigot via Gcc-patches <gcc-patches@gcc.gnu.org>:
> 
> On Fri, Jan 6, 2023 at 9:39 AM Clément Chigot <chigot@adacore.com> wrote:
>> 
>> Since 91e0d22025e0bf2af2e364cb7214a05512a0c431, 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 d6716e38e99..85883099410 100755
>> --- a/configure
>> +++ b/configure
>> @@ -7913,7 +7913,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 737c1a1172b..2b612dce6e9 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1489,7 +1489,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
> 
> This patch has already been merged in the binutils repository see [1].

Ok for GCC 

Richard 

> [1] https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=5fb0e308577143ceb313fde5538dc9ecb038f29f
> 
> Thanks,
> Clément

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

end of thread, other threads:[~2023-01-06  9:02 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-06  8:39 [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled Clément Chigot
2023-01-06  8:43 ` Clément Chigot
2023-01-06  9:01   ` Richard Biener

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).