From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id C/aTL4Dk119vbwAAWB0awg (envelope-from ) for ; Mon, 14 Dec 2020 17:17:36 -0500 Received: by simark.ca (Postfix, from userid 112) id B52B71F0B7; Mon, 14 Dec 2020 17:17:36 -0500 (EST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on simark.ca X-Spam-Level: X-Spam-Status: No, score=0.3 required=5.0 tests=MAILING_LIST_MULTI,RDNS_NONE, URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (unknown [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 5270B1F075 for ; Mon, 14 Dec 2020 17:17:36 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A9868389600B; Mon, 14 Dec 2020 22:17:35 +0000 (GMT) Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 7C8823858D29 for ; Mon, 14 Dec 2020 22:17:33 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 7C8823858D29 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark@simark.ca Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id A65911E99A; Mon, 14 Dec 2020 17:17:32 -0500 (EST) Subject: Re: [PATCH v2] Enable GDB build with in-tree GMP and MPFR To: Tom Tromey References: <1604817017-25807-1-git-send-email-brobecker@adacore.com> <1605429345-78384-2-git-send-email-brobecker@adacore.com> <20201116034518.GA609903@adacore.com> <20201118034455.GE617116@adacore.com> <71f5437f-c4f5-b58d-06f7-67a4d0b31007@simark.ca> <214e9564-5dfd-65a2-c2d8-6e8398ebc913@simark.ca> <87o8iw9ilx.fsf@tromey.com> From: Simon Marchi Message-ID: Date: Mon, 14 Dec 2020 17:17:32 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <87o8iw9ilx.fsf@tromey.com> Content-Type: text/plain; charset=utf-8 Content-Language: tl Content-Transfer-Encoding: 7bit X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Pedro Alves , Bernd Edlinger , "gdb-patches@sourceware.org" , Joel Brobecker Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 2020-12-14 4:35 p.m., Tom Tromey wrote: >>>>>> "Simon" == Simon Marchi writes: > > Simon> So with this patch, we now have: > > Simon> --with-gmp-include=DIR GMP include directory > Simon> --with-gmp-lib=DIR GMP lib directory > Simon> --with-gmp=DIR GMP install directory > Simon> --with-libgmp-prefix[=DIR] search for libgmp in DIR/include and DIR/lib > Simon> --without-libgmp-prefix don't search for libgmp in includedir and libdir > > Simon> I think that's getting a bit confusing. That's too many ways to set gmp > Simon> paths, with -with-libgmp-prefix and --with-gmp doing the same thing. > > FWIW we have the same situation with MPFR. :( > Simon> It might mean that we have to stop using AC_LIB_HAVE_LINKFLAGS > Simon> though, or customize it. > > Yes. Perhaps alternatively we could promote its use to the top level. > It's maybe a pain to do that. Perhaps, but --with-{gmp,mpfr} would need to be kept as backwards compatibility. I think it would be hard to convince the gcc people of the benefits of such a change. > Simon> An alternative to downloading the pre-requisites would be to check them > Simon> in the repo. We do it for readline already: there is a copy in the > Simon> repo, which is used by default, but you can specify > Simon> --with-system-readline if you want to use the system's readline. We > Simon> could do the same with gmp and mpfr. The downside is that we deviate a > Simon> bit from how gcc does, the the upside is that it's simpler, IMO. > > For me the main difference here is that, historically, we've had to > patch readline. In cases where GDB has never needed to patch a > dependency (libiconv comes to mind), we've haven't bothered. Ok, when you put it like that then it doesn't make as much sense to check the code in the repo. Thinking about it a bit more, I don't see why gmp and mpfr get this treatment, what is it that makes them different from other dependencies? If you want to build GDB with XML support, you download and build expat, or install it using your package manager. Why can't you do the same with mpfr/gmp? The only reason for us I can see is "because gcc does it" and we share the build system with gcc. But otherwise, I'd just tell people to build/install mpfr and gmp themselves. Simon