From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pf1-x42d.google.com (mail-pf1-x42d.google.com [IPv6:2607:f8b0:4864:20::42d]) by sourceware.org (Postfix) with ESMTPS id E16513858D35 for ; Thu, 5 Jan 2023 08:04:19 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org E16513858D35 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=adacore.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=adacore.com Received: by mail-pf1-x42d.google.com with SMTP id a184so13989222pfa.9 for ; Thu, 05 Jan 2023 00:04:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=adacore.com; s=google; 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=1HAQ4yA22Yk5r/pt1qf4yrlsKoO/SCubn+7w/VzNyFU=; b=Ofrw9wZiAiNg3IG2nx2pdqC9bPG4BrEik8hVwim51n+E6tKi7/vVZ9NgHA7Xc19l90 DK2K7HmUGHUYAs2d4sFt9S8gNsEt7X7CjzpR6v5yBOJIDEDXYCq2beLP73xQb0r9bRI8 kHJdZGbkGKPyIyTFdE8MxfIs/JVSUffH8+aCgdN5v5UyVtl0QU3BasSeGIFEgCO5MlGf lDgW2DjzcBAPeyeps0Kd5Jo4qDFLHqDFQpMStp/v3kPAWRQcSF+1WCGgtXQmp4x8Y2O4 dBpAOrU+uSSD4x5PJTy2vYCUtmv/TcSXdZrnlqsiG7txBxZJu0zGG/Es9NcURI5jLyW4 g1yQ== 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=1HAQ4yA22Yk5r/pt1qf4yrlsKoO/SCubn+7w/VzNyFU=; b=E4O3X92DuXw8VoOMM5VX3ziGGacDqzPgtrccj/Ih3OcfsE6RL/k03EYD7xpyF8LRaF VmX/okA7+DuyTFFYPR9izaeyc0SYw28ZYrrLWjUNbWK+MCHroSD4YlTSdAk68Bfgm5kS v6qqLch4SQdILwYuQDNBSJFTBnKSljyQUqJ7vFGwgeIQg40QwOIML2tJlSlpdTxoSjaK L4iFiE/hZ3ny0oZln6KYkV70nqxz8aBzvGe/4vt7p/UtZpg04E0jug2LMTvDiFUEnNyJ vcEW/FLN0aDTG3FKVwuA/lOLiK/+W/jiDlpi9dvSKd7z7HNxoaCKaYWVI2KO6sGxNwgq uEpA== X-Gm-Message-State: AFqh2ko6hA+F3n9rWKSrHKi26qS3F+eKZDBe4G4rYv6SWnhGskW6peF6 ra6Hc8nPWvrc3ei8uzTV1zPTC/M9EsjxSOqjCvvhbQ== X-Google-Smtp-Source: AMrXdXs0ttSCRpi/SZn5eCHtvC307EzsXNyMYGpwtwIyIjmiWu56laTYJ/Ws9BhjEdmMvNdwY+BgtXMC2l99ejmph/w= X-Received: by 2002:a05:6a00:e12:b0:580:c492:ab39 with SMTP id bq18-20020a056a000e1200b00580c492ab39mr2826606pfb.63.1672905858887; Thu, 05 Jan 2023 00:04:18 -0800 (PST) MIME-Version: 1.0 References: <20230103135330.1225218-1-chigot@adacore.com> <55bc5097-8f31-655d-032d-3a90f1fd0b55@foss.arm.com> In-Reply-To: From: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= Date: Thu, 5 Jan 2023 09:04:08 +0100 Message-ID: Subject: Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled To: Andrew Pinski Cc: Richard Earnshaw , binutils@sourceware.org, nickc@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,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 PM Andrew Pinski wrote: > > 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 wrot= e: > > >> > > >> On Tue, Jan 3, 2023 at 5:53 AM Cl=C3=A9ment Chigot wrote: > > >>> > > >>> Since 991180627851801f1999d1ebbc0e569a17e47c74, the configure check= s > > >>> 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. Mea= ning > > >>> 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 i= s > > >> 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. Ok I wasn't aware of that possibility. Thanks for the clarifications ! Cl=C3=A9ment > > > > 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-gd= b 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 ve= ndor distribution package, > > >>> make sure that you have installed both the libraries and the head= er > > >>> 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 = libraries > > >>> 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 ve= ndor distribution package, > > >>> make sure that you have installed both the libraries and the head= er > > >>> 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 = libraries > > >>> and the header files. They may be located in separate packages.]= ) > > >>> + fi > > >>> fi > > >>> fi > > >>> fi > > >>> -- > > >>> 2.25.1 > > >>>