From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id qHPqF0HX2F+5CgAAWB0awg (envelope-from ) for ; Tue, 15 Dec 2020 10:33:21 -0500 Received: by simark.ca (Postfix, from userid 112) id 5AD081F0AA; Tue, 15 Dec 2020 10:33:21 -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.6 required=5.0 tests=FORGED_MUA_MOZILLA, FREEMAIL_FROM,MAILING_LIST_MULTI,MSGID_FROM_MTA_HEADER,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [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 0793B1E965 for ; Tue, 15 Dec 2020 10:33:21 -0500 (EST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 85BF0386F011; Tue, 15 Dec 2020 15:33:20 +0000 (GMT) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-oln040092065081.outbound.protection.outlook.com [40.92.65.81]) by sourceware.org (Postfix) with ESMTPS id F2097386EC0E for ; Tue, 15 Dec 2020 15:33:17 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org F2097386EC0E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=hotmail.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=bernd.edlinger@hotmail.de ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AQCNLXHx31gGFhkOeytDAe2sByTcHLznwYeFxbHJ7M9//ECGQsJQY3tgkB7nzsyGwH3X4Hq87gJLUV2iK8Bjl2Ke2reQGJO7MOLSPjUtfWQw36FF4qyajs110TdgUwD+dvJh0O+7ZVzkZ8kDZq4P2eK58lc3LqKJkdbAsAxP+fRo6iNDyK94EWEekmetBlpZdpJR06AgSxrJgkqdNcViBS3GLgHCI7ZMlYWDZqZepLW+y0CEJZoxF14A3cBZazF3L1K/c2/OGCKu0TdJcqdEnV3/HtxIzElJabgce7VFSnCh6lReUeFNLJX8IARACJVK+0bgfGmitEA46ZT9NsuUAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lkC9cJE3bif3oUFBxz3Ctj00+zdi+evxilfjIxpnTok=; b=by605qdwEF36G6lAnZCrs5zDVzB4b0gk+wIKRltyHYfEojZ0NSMo9GlPwpcWYxkt1Gm6PTpSSq9kSuY7r0LSCzw+cLEi/IxlRrz/WEXD+ZHWTKi4tPKXz7Q9PF9dwLSYvB+6sah9RxqfU1HglY4P+J34pHbWGx9wZoF2YtOyGJ3rBPBraMq9RMdb+SMdcUWX3z3e2DEeuZXGaAnE7ydhpSpRDB2v3OCeXlO3ZLAwknZu3J0OBqI9Q5x9VuTGgnUvZAgPvHzDnKXvTh4xKVQ5W1ox+7eIaCv2UhXvZv70Vd2e3U5C/8KTwsjkn8ffny81XHSJJI2uQSECgYfXOT98pg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none Received: from VE1EUR01FT057.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::4d) by VE1EUR01HT177.eop-EUR01.prod.protection.outlook.com (2a01:111:e400:7e19::491) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12; Tue, 15 Dec 2020 15:33:16 +0000 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com (2a01:111:e400:7e19::49) by VE1EUR01FT057.mail.protection.outlook.com (2a01:111:e400:7e19::408) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3654.12 via Frontend Transport; Tue, 15 Dec 2020 15:33:16 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:708A5B33EECDD7867B18669674C017BA9EEBD41543CF3DC1F79C6730D413124B; UpperCasedChecksum:8FEB008253631BED68E6B90121063E69D00B8E1C249050029398649811333009; SizeAsReceived:9782; Count:48 Received: from AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::184e:5e8c:db8f:a596]) by AM6PR03MB5170.eurprd03.prod.outlook.com ([fe80::184e:5e8c:db8f:a596%5]) with mapi id 15.20.3654.025; Tue, 15 Dec 2020 15:33:16 +0000 Subject: Re: [PATCH v2] Enable GDB build with in-tree GMP and MPFR To: Simon Marchi , Tom Tromey References: <1604817017-25807-1-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: Bernd Edlinger Message-ID: Date: Tue, 15 Dec 2020 16:33:14 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.6.1 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TMN: [ouE/WJ/N3WUAAHrPKrfSwjhx5xfWzw/m] X-ClientProxiedBy: FRYP281CA0005.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::15) To AM6PR03MB5170.eurprd03.prod.outlook.com (2603:10a6:20b:ca::23) X-Microsoft-Original-Message-ID: <28cb603d-6cd9-6be4-fad1-669c34c1b254@hotmail.de> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from [192.168.1.101] (88.68.3.2) by FRYP281CA0005.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.12 via Frontend Transport; Tue, 15 Dec 2020 15:33:15 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 48 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: d50638f1-e9a7-4b60-3739-08d8a10ebdea X-MS-TrafficTypeDiagnostic: VE1EUR01HT177: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Kf38A+Pd85qufHmJMz/CwZ2rcIhJugrRbUM9OOYLOkB8RC3NmmN1akxpmaz8Ph0Q2r/F2Ul4UPpGgvCBCBLpWC9x8aF5nuxi/Z6wusKHnc2M37DUmuDduQ6kgnlTKUbklx+WTJbgEJmEuoBdbg8PJYQYLIQAdGlPUmGUnMTkva1UUqn+fTZeSSFSGkM9jk84C4EXDlFEWDL5H1Zq/HLNag== X-MS-Exchange-AntiSpam-MessageData: hV6c3x3DEntYLiHRPXSfYitxCMphlYeBy8H7q1tQB4O/3ia02O0bOgO4hBJoZiGRSEXgEiKOtZp5QDLTqRR1Gq6Uq6IveGVobfZp4lMFlcT+ub99NFYUkG5XNaFWM/VUk4WcQzX/b1I0WYMPlWxg9g== X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Dec 2020 15:33:15.9403 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-Network-Message-Id: d50638f1-e9a7-4b60-3739-08d8a10ebdea X-MS-Exchange-CrossTenant-AuthSource: VE1EUR01FT057.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR01HT177 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 , "gdb-patches@sourceware.org" , Joel Brobecker Errors-To: gdb-patches-bounces@sourceware.org Sender: "Gdb-patches" On 12/14/20 11:17 PM, Simon Marchi wrote: > 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. > I think the difference, is other libraries may be missing, but there is still a reasonable default in that case, just when the build starts to fail completely without them, that makes it inconvenient. Bernd. > Simon >