From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x52a.google.com (mail-pg1-x52a.google.com [IPv6:2607:f8b0:4864:20::52a]) by sourceware.org (Postfix) with ESMTPS id B2BF73858D1E for ; Tue, 3 Jan 2023 15:59:15 +0000 (GMT) Received: by mail-pg1-x52a.google.com with SMTP id 7so20417370pga.1 for ; Tue, 03 Jan 2023 07:59:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=dGi4gZDHaLESHhN1PzER7tkQqAjWHaC2ZF4oEGdYhLI=; b=Sn9tK+HBLdFOCDevgK6J7QINCCOLc1ULb/bJsdP6+KyvP/iVH58KhnkqFG9Y9v3UoU nU2gmQE16mgGEyeqz76PxLV6w5kfJNlo52T8ByGolPzk7vum4E644WnaZM48P4FOKDfy e2cz2FIaYn6y5aygpRybFZRQe0UG8nFbcsL1HwgzaWoJcahKgoBj+XoC89dxcxsG+nOy aMyo4POWtEb1DEqGiBRrqygf1gsOqW01iYw18riU5o6DHjNVspRu0uCsEM94dhhF/nJW 8Gk/vuT5edNT8kYgTe7OEA3+WTZ8rVB2Dk6ytGY5oS56yiQ1KNMkV/a9iBHFLtDVY74h WPqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=dGi4gZDHaLESHhN1PzER7tkQqAjWHaC2ZF4oEGdYhLI=; b=5eUxFxWQbEhOlC760QpvycwWR5Qg0i67IGtWdn0OEQ1INmnd81u1Ca0Rgm7cCUnEEU 5UNoPR1oWzezXAdpTx+106TLH3VYLTUoEKvCF6JCJJVrY09Jthr1CUC2eLphRRydDjRl c+n9+2euZCPF6m1ra/BUX9SmmlK5znHrOiQ/AtwWLj9zLfQmoJWBv8eiDec4yWnPjtIJ EWzkX8d9f77quk1A2R53YbX/3Pgt+c3lq7H9LImqQYBVdYDecLJbPSdpJK/XofEwjGpj 1G9dg5idw2f3Qo0oQmq5xjSGuhJM9LWwM0lEx7I6dVAqEHthvGcMhbPJ48p39LiNIAuB CpJg== X-Gm-Message-State: AFqh2kqqY5dMh0rNkF6HF0GQP4fbuhD8QgM46n3ZlF7LCxS8cpH51VTs A4nn8lci8GolFMfVgQVCHJBHc7VGiOOs5K4S7zGtbbyGqTk= X-Google-Smtp-Source: AMrXdXtK/F94HeZYju09wu2S0N0qkJtwRvSrs04hlqOfbjTsWba5O0nWTE1O44ZRWsw1qlpvocIoz/KY/3gIkgArbjs= X-Received: by 2002:a63:751:0:b0:434:7885:6ade with SMTP id 78-20020a630751000000b0043478856ademr3113912pgh.243.1672761554684; Tue, 03 Jan 2023 07:59:14 -0800 (PST) MIME-Version: 1.0 References: <20230103135330.1225218-1-chigot@adacore.com> In-Reply-To: <20230103135330.1225218-1-chigot@adacore.com> From: Andrew Pinski Date: Tue, 3 Jan 2023 07:59:02 -0800 Message-ID: Subject: Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled To: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= Cc: binutils@sourceware.org, nickc@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM,GIT_PATCH_0,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, Jan 3, 2023 at 5:53 AM Cl=C3=A9ment Chigot wro= te: > > 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. Here is a much simpler patch and disables the whole check for gmp/mpfr rather than just disables the error message, it is like the gdbserver check earlier: diff --git a/configure.ac b/configure.ac index 3a1eb0357e5..c184dc27201 100644 --- a/configure.ac +++ b/configure.ac @@ -1585,7 +1585,9 @@ if test -d ${srcdir}/gcc ; then require_mpc=3Dyes fi if test -d ${srcdir}/gdb ; then - require_gmp=3Dyes + if test x$enable_gdb =3D x; then + require_gmp=3Dyes + fi fi gmplibs=3D"-lmpfr -lgmp" Thanks, Andrew Pinski > > ChangeLog: > > * configure.ac: Skip GMP and MPFR errors 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..0fb8279cb8f 100755 > --- a/configure > +++ b/configure > @@ -8426,11 +8426,13 @@ you obtained GMP, MPFR and/or MPC from a vendor d= istribution package, > make sure that you have installed both the libraries and the header > files. They may be located in separate packages." "$LINENO" 5 > else > - as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > + if test "x$enable_gdb" !=3D xno; then > + as_fn_error $? "Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > Try the --with-gmp and/or --with-mpfr options to specify > their locations. If you obtained GMP and/or MPFR from a vendor > distribution package, make sure that you have installed both the librari= es > and the header files. They may be located in separate packages." "$LINE= NO" 5 > + fi > fi > fi > fi > diff --git a/configure.ac b/configure.ac > index 3a1eb0357e5..0ec2fffcb56 100644 > --- a/configure.ac > +++ b/configure.ac > @@ -1814,11 +1814,13 @@ you obtained GMP, MPFR and/or MPC from a vendor d= istribution package, > make sure that you have installed both the libraries and the header > files. They may be located in separate packages.]) > else > - AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > + if test "x$enable_gdb" !=3D xno; then > + AC_MSG_ERROR([Building GDB requires GMP 4.2+, and MPFR 3.1.0+. > Try the --with-gmp and/or --with-mpfr options to specify > their locations. If you obtained GMP and/or MPFR from a vendor > distribution package, make sure that you have installed both the librari= es > and the header files. They may be located in separate packages.]) > + fi > fi > fi > fi > -- > 2.25.1 >