From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by sourceware.org (Postfix) with ESMTPS id 40F633858C53 for ; Tue, 3 Jan 2023 16:26:27 +0000 (GMT) Received: by mail-pg1-x530.google.com with SMTP id r18so20438168pgr.12 for ; Tue, 03 Jan 2023 08:26:27 -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=Q78Lbxm9RL/nrnJ/bE5qVkCBgF+gB143xVmphZOhTUg=; b=GLVPy3HZ8AP27dbLhPLrXDY3PW5+czCXAiKtRibSa5WdSdAj+kdjxX6MvTX38F959h YyGUUueuL62eSfEE9cXtlB39bmkxmarPsxkPQbyLrQJEYp2ezIYpbraRJg6DRSo6BZbc w+AuHoEN89NFq/sntL1hGeOEkjL1k+hstSI492ovz+nsRmNPf3eRBEZYBTGht6mpHKeb EN28npTJrnf8kELGvtljt1LM7bUSbI9vOGOM+gnyn8Cb96340MRq2mm1Xe6E9FjaNtWF f0kyvCsF8JZ0dxnzouV4ljMPwGbKbZMcHtgXdvZtqCazcETk1QHxlG3eAimwcem3VM9O RrsA== 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=Q78Lbxm9RL/nrnJ/bE5qVkCBgF+gB143xVmphZOhTUg=; b=Kjy+W1k0M+gJzV63w8/2+2H3F71KYydHigxfs59mN+4nsw09WsNTMEviWaENel8PFd oyM4Hc+84Y7wDr/FQ5zltOyvP2CnIA6qvuF648CYYlfIBC5dlhoAGTmoNoDErmBM3zGh hVVkYRbR/jqQjhq8KGX9IRScRj3cnJY472PdmJn4fBtRBPfyHF5+XSQ4jjOEPGXHNlqL 9I3x2xMqpbARVpjLpsKbe/TFaHAYEYyNjJKTUf//LGw7YBTpem9GAx6LlXW2DA0QRMJl D2GvS7Dt4oA8Fbosw810cDf453hUAm2pQxrKt03mcUpUl/Ch8aDYDuYWtYo2+HQkLDDs dcjw== X-Gm-Message-State: AFqh2kp4JTUPDiNe1xZrCtIZ02BpBQ+VnyaH6X3AmdHDU9CCbRDfgrXM B46K2RuEVh76c8s2cP5o3e1Lple3Sqj2MAL0ai7fWg== X-Google-Smtp-Source: AMrXdXu1nqyMCXu9JxXpktb+YXA2V6uhDP7SkBMqXDMkWNKlF/J4x/Y6sBUEtqTyCyqK+yBxlJtLtJptAXb1qnT2a+0= X-Received: by 2002:a05:6a00:e12:b0:580:c492:ab39 with SMTP id bq18-20020a056a000e1200b00580c492ab39mr2330428pfb.63.1672763186338; Tue, 03 Jan 2023 08:26:26 -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: Tue, 3 Jan 2023 17:26:15 +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.8 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 Tue, Jan 3, 2023 at 5:24 PM Andrew Pinski wrote: > > On Tue, Jan 3, 2023 at 8:21 AM Cl=C3=A9ment Chigot w= rote: > > > > Hi Andrew, > > > > On Tue, Jan 3, 2023 at 4:59 PM Andrew Pinski wrote: > > > > > > 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. > > > > > > Here is a much simpler patch and disables the whole check for gmp/mpf= r > > > 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" > > > > Indeed, thanks for that. > > > > However, it should be "test x$enable_gdb !=3D xno". Otherwise, > > require_gmp is also disabled when gdb is explicitly enable (with > > --enable-gdb). > > But as all the similar patterns are similar to yours, I'm wondering if > > there isn't something wrong here. > > Yes it should be "!=3D xno". Looking at the other uses of "!=3D x" they > are there to test if overriding the other check if they should be > enabled or disabled so those uses are ok. I just missed that. Ok thanks for confirming. Send v2. Cl=C3=A9ment