From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) by sourceware.org (Postfix) with ESMTPS id 2D09A3858C36 for ; Wed, 4 Jan 2023 07:51:40 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 2D09A3858C36 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-pj1-x1034.google.com with SMTP id p4so35366662pjk.2 for ; Tue, 03 Jan 2023 23:51:40 -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=POTVICraHl0I2V8g+Tc5aEn5k0QpWjnoyUBNndtrYW4=; b=Zd6tZ5t79ZCPiWS59ONWTdP7xztNzKhA+coHyLytvmX0odWGWBoj/X6oPMJkydPNxr 7l0G13u25uq4ppgS631L2JVqlyQOL40Cv1tyUpdxpAmBBa05l++vg91V/BM+EjNYx1Ze U2f2VZ6GEjn3SrAGBgIi4TwjF2R8cW/VDwSPUpVaG4C4nPO1HRvld5R+ATiRqdUQDQLy Qp/rocs4rYmWS3XsPOAPYB6QsmAW5xcgxyMHfqYrApkahvjAqz1bocDQOw7ACPYjtjE5 VJmsufKekPqtgRRY/BMiIOvWyn+uBBUYhraCcAxOP6zvtPoc6GD6ZS6y4s1i9zhwsbIR 6Bpw== 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=POTVICraHl0I2V8g+Tc5aEn5k0QpWjnoyUBNndtrYW4=; b=ix+Tcv60zBP3tMOLPABIlXYLxP50wq/FAFWq8Cq+ux1vO2tx88SJOZG0Id+gMeov6C Bvurst5epuFS7oV9yTOCpuyqtHOe4zSlU5MyJGpEEw9EWlS6gtWsI+WoxHN7zfMdJNTG QaxbqqKR2cvHCTXbpyR/17blkgbJXSIsdy9kAkQwhDL8Z0V5rPtoFu81Ym4ZuHJqLsUw TKacnx5y87Thfz+Njwt0RFOHsuoAAZHKBZSQrX2y0PnPVdAp3/NX+GUI7cvBuxQb370e MzrWiRDf3jI/wKBzAUDZmgboXnXtf0rYLN6mC+BCba2PR63uR5BKqLs4n5dOkcOHWNXw 9sPg== X-Gm-Message-State: AFqh2krfiZjFm98tZtrO4TpE1ZQ4TEPvGnYWL9f3lCosXloE4ujKE9ms +lJM7RFT3lKw+b1p2gQa118fJHZV9xoEanGj3wDGUEICK3uplQ== X-Google-Smtp-Source: AMrXdXscA1q+tKEIZS5Udt1hoZ8U9w1V9NCq3XQfzG+ms0kKOURONmYq7KTUKwtLqAErIjWikqkkrpCleeBXMAk4Y2A= X-Received: by 2002:a17:903:54d:b0:191:4627:af80 with SMTP id jo13-20020a170903054d00b001914627af80mr2278921plb.37.1672818699248; Tue, 03 Jan 2023 23:51:39 -0800 (PST) MIME-Version: 1.0 References: <20230103135330.1225218-1-chigot@adacore.com> In-Reply-To: From: =?UTF-8?Q?Cl=C3=A9ment_Chigot?= Date: Wed, 4 Jan 2023 08:51:28 +0100 Message-ID: Subject: Re: [PATCH] configure: remove dependencies on gmp and mpfr when gdb is disabled To: Andrew Pinski Cc: binutils@sourceware.org, nickc@redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-9.6 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: 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 w= rote: > > > > 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. > > 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. 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 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 > > 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 libra= ries > > and the header files. They may be located in separate packages." "$LI= NENO" 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= 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 libra= ries > > and the header files. They may be located in separate packages.]) > > + fi > > fi > > fi > > fi > > -- > > 2.25.1 > >