From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by sourceware.org (Postfix) with ESMTPS id 748403858D35 for ; Wed, 4 Jan 2023 17:50:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 748403858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com Received: by mail-pl1-x631.google.com with SMTP id w3so4960403ply.3 for ; Wed, 04 Jan 2023 09:50:53 -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=vFWG5Jbbvitj1jIiMSyvPtYwwIjWhoxcT0yi7fnDQBc=; b=afsajXrzZFGkdQ00wfjULUP8g5VPHBcievkJkndSURbPX3OcLd/xnykt1ieiOKPBuW Z4X1jlF747iJaHIHhOU+rVXtl0SF174A/ASj0wRmV6SwtqlV831xxL2kMa33IPUvW2K8 dHSha4FfIXyWKMGsvckRJ/R+cGkFbMjCeapFYdVpwggsXVsRygYwIphOWxV63mvbLy49 u/SQvoLXOO+LunjB05et9a2g7rJUgVaBwPBX7Wc0kN0QL8hmkpwgkDXT71dnwPSfJ4nZ iHHuoREjm53FEdsY3rSndFu4mDqRtJ1AbTfash8eIUGLp1xrNLQJAtAThg/JpzysvAKH E3LA== 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=vFWG5Jbbvitj1jIiMSyvPtYwwIjWhoxcT0yi7fnDQBc=; b=Q5I0AmgOIJI/TpaypqQw9SXFVTRzyWMs6KnJsPt5b2aQYy++NtPkDI7bPrQsrAQ5K5 bNJtYHf2BRHy4PaFx/ww68WzOcBJUwjMPMCZYnglmad8VKj3nZk7WPuD8dU76Q46YWvx viu9LKp1FZr7OHNI/CRcbmeKZyxN7OhjQ7cxd57nAp9I7f0kZa0MaTj8610W6EXzYG2A v3ihHLgOdiXzAfKQ551Obzt5LJCKR9G0gWu6sGMaBMA5pHiBVV6RXjAYcIrAKWPdzFU0 /V1L6a8JOwnBoFnrcIk5rCBe8+LRtbog7VNBXFXQGt/gS/jIhOzkQnf3i9dQMWNENqNS +b/g== X-Gm-Message-State: AFqh2kq93suYNrDQ8lVYy7HTNdeQuwjLJuSlsO0Uq4d/L69B+Cz5nOvt +hHTajDn3uhHbLR21oPg467DhzNo0TykJN7TkAE= X-Google-Smtp-Source: AMrXdXvyeU2TLviGAEd8UNAaV61HDutDRjiw3o9kpINlOojqGE1GvgKRk1pYV8irKAURG76dAottHOSVP/qt+t9RjMs= X-Received: by 2002:a17:90a:b101:b0:223:4d09:2523 with SMTP id z1-20020a17090ab10100b002234d092523mr4354823pjq.161.1672854652351; Wed, 04 Jan 2023 09:50:52 -0800 (PST) MIME-Version: 1.0 References: <20230103135330.1225218-1-chigot@adacore.com> <55bc5097-8f31-655d-032d-3a90f1fd0b55@foss.arm.com> In-Reply-To: <55bc5097-8f31-655d-032d-3a90f1fd0b55@foss.arm.com> From: Andrew Pinski Date: Wed, 4 Jan 2023 09:50:40 -0800 Message-ID: Subject: Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled To: Richard Earnshaw Cc: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= , binutils@sourceware.org, nickc@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-7.5 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 Wed, Jan 4, 2023 at 6:50 AM Richard Earnshaw wrote: > > > > On 04/01/2023 07:51, Cl=C3=A9ment Chigot via Binutils wrote: > > Hi Andrew, > > > > On Tue, Jan 3, 2023 at 6:41 PM Andrew Pinski wrote: > >> > >> On Tue, Jan 3, 2023 at 5:53 AM Cl=C3=A9ment Chigot 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. Meani= ng > >>> that a build without gdb will require these libraries even if not > >>> needed. > >> > >> I see the conversion of enable_gdb to noconfigdirs is not done until > >> later or I would have suggested the patch below. > >> Though I wonder if we should rearrange configure.ac but maybe that is > >> post GCC 13 branching off. > > > > That might be a good idea. But for now, I would rather fix the build > > of binutils rapidly, if you don't mind. > > > > For my personal knowledge, why are the GCC directories being > > "configurable" with the binutils configure ? I find it weird to have > > --enable-libgo in binutils configure. > > The top-level configure framework supports a 'unified' build tree > containing sources for all the GNU toolchain components. I for one > still use that. I use it too and that was the original reason why I did the original GDB GMP/MPFR patch; otherwise I would need to compile GMP/MPFR out of tree for a "native" cross build first even though the support was there to support it for GCC already. Thanks, Andrew Pinski > > R. > > > > > Cl=C3=A9ment > > > >> Thanks, > >> Andrew Pinski > >> > >> diff --git a/configure.ac b/configure.ac > >> index 3a1eb0357e5..cbfc21eb2e9 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 > >> + case "${noconfigdirs}" in > >> + *gdb*) require_gmp=3Dyes ;; > >> + esac > >> fi > >> > >> gmplibs=3D"-lmpfr -lgmp" > >> > >>> > >>> 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 vend= or distribution 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 li= braries > >>> and the header files. They may be located in separate packages." "= $LINENO" 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 vend= or distribution 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 li= braries > >>> and the header files. They may be located in separate packages.]) > >>> + fi > >>> fi > >>> fi > >>> fi > >>> -- > >>> 2.25.1 > >>>