From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) by sourceware.org (Postfix) with ESMTPS id 9EE6B3858D1E for ; Tue, 3 Jan 2023 16:24:41 +0000 (GMT) Received: by mail-pj1-x102e.google.com with SMTP id n65-20020a17090a2cc700b0021bc5ef7a14so31641520pjd.0 for ; Tue, 03 Jan 2023 08:24:41 -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=20iqaFx1lxtgk+jqxXHjoxTutkEg8sytXCiFAm2eyz8=; b=Zjvl4QKaZev4V0LloKbCy8AbZabAfMRmjFoDW/R8b9iNsH58SBfiojC/jtEBYxdb1Q kq5iNEUDyjueayf6buQy8aZzh3kwnnd+ypnVsdioKILVsQlasnpAoA5WLH92drk+Dwzb xSKP3gqAiD2Hlu0MlsMr3xInn+UBo3Ej8U9kXH8pk8iufmA6uwoR2T/s0o+CY7eooo0s FsLBi8xKxwB9FlYPXFAUtxklWdGJTG81OQ+RyALjwXHI+HhhZ4UZrWsUhjYcVTi3eowi ahcZkNTUJiyML0Gnv4F6OPKNyy0V5zgHQEVBzwozP18CeNBtaXWiBX2AZjRxudcxfGqd otHA== 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=20iqaFx1lxtgk+jqxXHjoxTutkEg8sytXCiFAm2eyz8=; b=tA3O4iqApxt5zTUsu20au0khXLr6FJUYBUFeZEuPcWX5erFd6yfK90NpLWiLh2JWiG 8IAPS8N7/NhskdJG9uV9sBwZc4blYq0/8tWtWZHSqjTIuJGwkz9osaIvB5mWnZfiwEVi F3x5laXlkKgBzcjzTnsmdU0TP9iYqLJlfwwEtqc7YIO/hM+1QeavUKMRWnA+8Pna7dYk EQf79rKTX5d/hzOneXx0tMM+sJ8gRUwR4deOTSTo0moQ7SZaqoRxhLk56nJJZyn1yR9H N2s8Oq+TG5JFnibzBv8WLrlq908T3sbSEsgE7gDlIMo72h0OmOLfKkM9EWmwuU3bI2Pp Hiww== X-Gm-Message-State: AFqh2kq0mgR4ZP6uQJp41zjp1VGMKyop7aM0MPmyqcvIf9TcTKagZFkg eEjmW5Iz/DCL7JZKEIoxrHFfHoEh9Q+eeBm7aTw= X-Google-Smtp-Source: AMrXdXvABkDlBmG6dBTcG/arUJ8suf9UAg+Li/lfQlyOJk+0wRJZy8TFPz62ew/cOlXJzoUsRkktG0kOM/Nh4ic5mpU= X-Received: by 2002:a17:902:8218:b0:192:c6aa:b039 with SMTP id x24-20020a170902821800b00192c6aab039mr604209pln.123.1672763080664; Tue, 03 Jan 2023 08:24:40 -0800 (PST) MIME-Version: 1.0 References: <20230103135330.1225218-1-chigot@adacore.com> In-Reply-To: From: Andrew Pinski Date: Tue, 3 Jan 2023 08:24:28 -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 8:21 AM Cl=C3=A9ment Chigot wro= te: > > 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 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. > > > > 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" > > 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. Thanks, Andrew Pinski > > Thanks, > Cl=C3=A9ment