From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id Q0YFE7sI1Wnw4gsAWB0awg (envelope-from ) for ; Tue, 07 Apr 2026 09:38:03 -0400 Authentication-Results: simark.ca; dkim=pass (1024-bit key; unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=jSlJeV+C; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=jSlJeV+C; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 35D261E04F; Tue, 07 Apr 2026 09:38:03 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED,RCVD_IN_VALIDITY_CERTIFIED_BLOCKED, RCVD_IN_VALIDITY_RPBL_BLOCKED,RCVD_IN_VALIDITY_SAFE_BLOCKED autolearn=ham autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id B1C721E04F for ; Tue, 07 Apr 2026 09:38:01 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id EA6184BA2E06 for ; Tue, 7 Apr 2026 13:38:00 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org EA6184BA2E06 Authentication-Results: sourceware.org; dkim=pass (1024-bit key, unprotected) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=jSlJeV+C; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=jSlJeV+C Received: from OSPPR02CU001.outbound.protection.outlook.com (mail-norwayeastazlp170130007.outbound.protection.outlook.com [IPv6:2a01:111:f403:c20f::7]) by sourceware.org (Postfix) with ESMTPS id B9DC94BA2E1B for ; Tue, 7 Apr 2026 13:37:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org B9DC94BA2E1B Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org B9DC94BA2E1B Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c20f::7 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1775569052; cv=pass; b=oU30uZ3uYWlxZbQQcKPm81okDfhwH4RMSiZ5NaqIaElnDeBXzzAxLHG51pJrYwOT7v+mXvDDFrW63D8yF8mnrV76PvFQWwSb07QEW8m1j2DwkYemCVhbQTS4jnQid+oNTgGm2oI3gP9cGA7ZX/kriJJDepoyrlEBr7eogVCIcjE= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1775569052; c=relaxed/simple; bh=v3XAYgZOX/Qq57vgee6Phy+2epgJQTEslkFP7TOqu4s=; h=DKIM-Signature:DKIM-Signature:Message-ID:Date:Subject:From:To: MIME-Version; b=OSaBjbBt7v+R/kiN+A21KztRElqTW5J91JKUftSVzsoIl3hoI8HtyXVSEOcir6y0rq2d2E44r9kxqPhuixybCt7hIgkeo7pA1gOt4FwZJINe5uQcOoFn7YKVYl4SOfweSSbXOlmNSHApOaSIqOcM0xknQVxtgV93MsJK+0THh0o= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org B9DC94BA2E1B ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=fYRV1BzqVsA0d9yCPMmLlv3L4BQ2pT0kenSoGLo2kF7OqiWHCgwQgYU1WXqJ28zIHORrcS+stfZ9e9fr4WqFajkCtDGPybp6dpEn7R/YSIkR1Z5cj0mNm+WLK1KJRNgEbEjaZgeGHBPBVdUTZqJXmS0DEme8Q48+gPhB4rZfqLrnrrfsZhnKkNUVkBTdto0MItE49iKHvYemRU33+wj25D/k809wAae1KhuAKVIhkmLXyOhaGP2ovfd5lC5Io7mzjSOv9RDr4B68ETEmd4jY/DY7wEQVDrdk81iqEXQoZ/gdzfwTdiQU7yoEvWkKNvI1KcUHMhaPWPjKVynG711OPg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vYhlAykMEMdbQ2CPDyzffCwEQNYY+qgHxyHJKP6acwE=; b=ZRdL0JiZTpGGUYj/wtfqKbfaWs2v8qcUF35CQzJcrcqcTwCHanlftdXJitzPfDo7iunaPYh7scBSL6ZFBymRdH3WILpc6OPN/TAbVSwi5NvcPhcY5/jngdAHXiNCMwTKyNFOf5QLHnVp+4Kw9iqbJalAM7T5/I3BA7iQDc8TsKDq8p/MdhXlkg1ecMUtXtTg0EDvCWPhRBaLiHbbL4TDzIrej/goMUXHVQTdb9IXA805dDurGmzF+jlWGsXDd+t4sK6+sq78dYE8Bifx7ux65cow+XELNqF0u6IKCUZUqbnQO3h0F/1WGjOQMj5533ITeAQaAPOydEXxgcDlOM4BZA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=tromey.com smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vYhlAykMEMdbQ2CPDyzffCwEQNYY+qgHxyHJKP6acwE=; b=jSlJeV+CdaJ1ZSYi8GA8dJ6gcvHzbDlseGdEr52HNGINjzI6p6YTQut7L4BNu/LRl89MM3N55duu5NgBu5eADKx+SoyGFXNa6FGYxUVo5EH3fFhNgiduQYpF+We/fPWIZr5kRcyt+PRuvYzs5YkR178n9DscjYtX8PBmwg6AMVw= Received: from DU7PR01CA0016.eurprd01.prod.exchangelabs.com (2603:10a6:10:50f::11) by DBBPR08MB10795.eurprd08.prod.outlook.com (2603:10a6:10:530::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.18; Tue, 7 Apr 2026 13:37:20 +0000 Received: from DU6PEPF0000A7DF.eurprd02.prod.outlook.com (2603:10a6:10:50f:cafe::63) by DU7PR01CA0016.outlook.office365.com (2603:10a6:10:50f::11) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9769.32 via Frontend Transport; Tue, 7 Apr 2026 13:37:20 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 4.158.2.129) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 4.158.2.129 as permitted sender) receiver=protection.outlook.com; client-ip=4.158.2.129; helo=outbound-uk1.az.dlp.m.darktrace.com; pr=C Received: from outbound-uk1.az.dlp.m.darktrace.com (4.158.2.129) by DU6PEPF0000A7DF.mail.protection.outlook.com (10.167.8.36) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9769.17 via Frontend Transport; Tue, 7 Apr 2026 13:37:20 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=YNO3iBZWfkJrh9UM/q8rJW/93AL02Af+EUDeaTWvl+ESrO7B7tf6TJSMyl0s+vV3krWtCyUpWnTKQJWqgnCb7jjJM8a1W15vKmPt/YW/GOyw+OOeSN4WcJ3gVAD2ZU72S+PUeKuIFlDgxacp4GA9q5tBnGURi7siZjGLc9lXt0PSH49t5wxp3TkOYOkr/pX75nSmMU9f0VtongnpXsXoDWH0dXqZe6HyqigDw79pXF5BM9erWYqapNN/drHRk7NhSbi//pXnjXXuUF3Uky4WI4yKdt1ORnNo6lwRxzCoxzod6g0XOdvTolCV+iewqHtxeZSV4dwKVI3+Bw3E9qMOBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vYhlAykMEMdbQ2CPDyzffCwEQNYY+qgHxyHJKP6acwE=; b=DoInyhuj3uWXS5hLeHhcPR0iEjy8yiAoykr6Kg31B1jtjulvyI3Jx5ibkV3VN06qnvYzRsVD5obozIqCy4Ux4QJqli85pWmDcWfJNBrUyKugLX/9qZ0kwUNktnDQZCi+IztRU55WRzp2cLhlBWlAul++CbC1hRKhlZnXRJ+Ldto3Bx6+IUY/FBBMHdECXos7mrfVGoUCWnHMCkKkBg2oaf0Mc7TC3qAWkgCM4hyUa86ASCq49YBp6h39I0pAhzmMde7unM0bKBxPkYHE5gJ/goival6ZVhaVsI81T+EU3MGLqMT96YQSEjknjhFkHqv5vpcy0ZpZUW+unlD52ra3oQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vYhlAykMEMdbQ2CPDyzffCwEQNYY+qgHxyHJKP6acwE=; b=jSlJeV+CdaJ1ZSYi8GA8dJ6gcvHzbDlseGdEr52HNGINjzI6p6YTQut7L4BNu/LRl89MM3N55duu5NgBu5eADKx+SoyGFXNa6FGYxUVo5EH3fFhNgiduQYpF+We/fPWIZr5kRcyt+PRuvYzs5YkR178n9DscjYtX8PBmwg6AMVw= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DU0PR08MB8663.eurprd08.prod.outlook.com (2603:10a6:10:401::6) by FRZPR08MB11072.eurprd08.prod.outlook.com (2603:10a6:d10:13a::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9769.17; Tue, 7 Apr 2026 13:36:15 +0000 Received: from DU0PR08MB8663.eurprd08.prod.outlook.com ([fe80::f957:cec9:ec8d:7968]) by DU0PR08MB8663.eurprd08.prod.outlook.com ([fe80::f957:cec9:ec8d:7968%2]) with mapi id 15.20.9769.017; Tue, 7 Apr 2026 13:36:14 +0000 Message-ID: <55120329-8df7-412e-8233-94040bca934a@arm.com> Date: Tue, 7 Apr 2026 14:36:13 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 2/7] gdb: fail configure if Python version is too old for limited API From: Matthieu Longo To: Tom Tromey Cc: gdb-patches@sourceware.org References: <20260309175624.236491-1-matthieu.longo@arm.com> <20260309175624.236491-3-matthieu.longo@arm.com> <87h5q55a9o.fsf@tromey.com> <7437a144-6d93-414f-a7c3-f67babc0a901@arm.com> Content-Language: en-US In-Reply-To: <7437a144-6d93-414f-a7c3-f67babc0a901@arm.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0275.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:37a::11) To DU0PR08MB8663.eurprd08.prod.outlook.com (2603:10a6:10:401::6) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DU0PR08MB8663:EE_|FRZPR08MB11072:EE_|DU6PEPF0000A7DF:EE_|DBBPR08MB10795:EE_ X-MS-Office365-Filtering-Correlation-Id: edf26d93-832b-4de1-b7c6-08de94aacac8 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|366016|1800799024|376014|18002099003|22082099003|56012099003; X-Microsoft-Antispam-Message-Info-Original: rp7JxOrL5Rj6XjcHofs7whcsu59xkCmUq422xVYMay0CtED18iiA/PFI4fCiMLJ/dKxFqNY6faoTL/t2IrgHbWScpKXHS5HLFrIEp58f6aIk6ranJV8tjGfW6Ae+Ze/5Ix134uyEzIQ/gLbIL3wTZmDZvZMRFxraf31SXSbmccaeCjr2HgFPudRwueIBnOK8v/PTgAqJJO4MXxaFtn+0rAPBPDvLEwSAvpd90SihAH24MOX20azWsoS5Ze73rAG5MFSHUohA3xNFDCkCA4IsP51n4jnmRqMX2dS/axgjcvJESmgBI7GEzT/ZDizZPxcWWuxxNUaJJxWhpm1lCX6UckU6gvq6waMt1dC8sNBVjXoMlWc0fwnGaSPYsirvBu0+s8/EYBfXqDPWgtmS1vMJawRUIdW8QEL1/mxHUXE+/3ohgG+ZHU3MShxDQS6r/hEmFI1RAEJdmuG+3oQoMMWBBvE1ic0bREctXXaE42Rg7S7vuFju0eYGL3w4uhKdaUa/YaaU/OerPV0riJHX4u+7ov1mDeHLK4NP2hmkxGgDPWs6wiYgJYGeZ1u2H5zhtw9JkTsECq53xA+cxmUHKR1AWODA7S6+6Xw7Vrwc1opjX/IwzuS99203LbzdyhQW62yNII5Eq9jG6CqbP+sXZ3bPwgSSRBbdL3pfn5QA7QIa66QLhTxnpJr2hAgfVhUmEtGUuT6UgNcW579uXEQFRKJZ67fWKe6PxJr18/Nboj4Og4k= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DU0PR08MB8663.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(366016)(1800799024)(376014)(18002099003)(22082099003)(56012099003); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: YrYAeH5k5j0GiB3H/d51jp3XftAuzAaDzUQRW0qC1TNHw44OoKRSCzGSIa2TABYT0pldrjkwTEhCyNKolYwQy9OJaE6d1it2Ry7Mue0umgsOpUkuGlTE2bu+MUGbiwa4tR7k6NxpHrj3q9J0Gd27jKoeOU3r5i9W5o/7zhfG8/bQJr9TrYkdqC3lGcIpR31bYoCFZKk1H+PBY7Z8TbIlLboXOOttp+QBO8jIQPfQxFTV24aWwzFutjacgemq7VAsHeFYjtkaU6WsFVD1fRv4AqjF/bT1T8Uud0gWtdmhjZY8/dklXczwSJbSrRBlNCJ/teVGoFKx18mqpmuKI8BZ2A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: FRZPR08MB11072 X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: DU6PEPF0000A7DF.eurprd02.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 92bee239-4203-4a01-be3d-08de94aaa3b6 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|35042699022|36860700016|376014|14060799003|82310400026|56012099003|18002099003|22082099003; X-Microsoft-Antispam-Message-Info: vFJE3UFJE5DZGgvSVbnhe06y3wD+T5+e6HyYYthIWiFdHUb8yXmWs7ywy8ehNnA5od4t0xPvXmVY5aXfelaF29iO/TBkdlpIJwcPXUF0zF5TojI8lpoud9+HezAB95LAHTO7Vui8BhyIyO/hgEJZ1GUUl9ovqW/7HJ9yiblSd26xpQyDoWVDMf/lHuSq6732+Wb6o9eycBSHyaDGvYlW/CPALQB+WJsjDI8LvYS1VSxmepIcKwAOWqalxd+JoprzjTq2APltOWg2EBCQHbA6Ez766Ddahp2ihLZGTq48QLIfS+ZqF+G9uRdT9KRC7l39ZctFNvuxlkZv3WRiH/O2aqU70bA9fKCw0+09bb5K48NDP6C1t/x6fpBOoCiZVYVbvd45JKNndunBGLxzHNmgrxjP6BHxmEewLZRUE+P0OI5BqODcw5WB7HTsXwXClcP6d6ffqbRnzJxuAt4doEzO/Hzq2X8DTfzQaF4X24RsGaupNAjETSs3ErELdX/whTn3yDL1XhWCnos3NJcA17r0o9r0K/Fc/8CmfZuFRs+iwIHYV8Nycze/iwztsSmatsuE9hc8fcCq1acjcRVZGJ4e2LlMInt2/vkmdXNhA3lLi5aCnRC5yvZvlQwMMox3CUSpYj/vKxv3YAC8V51hXhmYUZOPY9KbJBWSfryi/ac3wpur88UZcAP5yrZL9syhXWGRufx6yuq2ZNo6c5fMpkd7mVvgH6/Si0y1WZ9O02lNJHNL2K1g1Lg2PzWjntZ7Eh5ajVp9NhnaHZ6m5q+7NzVZLw== X-Forefront-Antispam-Report: CIP:4.158.2.129; CTRY:GB; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:outbound-uk1.az.dlp.m.darktrace.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(1800799024)(35042699022)(36860700016)(376014)(14060799003)(82310400026)(56012099003)(18002099003)(22082099003); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: hL3noyVNDahaDCDCtv1WIvDxrUCSFh794/oFT4iOR6uoz0iN40p0OcanPNx2lq6wEcSQO8/XjHrxu8ptZvYCb5HcWRbSrZRE/bPnB4gyJkoyteRuS2gRDeJ5iR1kjr4+oTPU07m3FTO8Cyy7rppBGXfOvcqFOrc9rsIoGmFVIsZ57KSa7IWie76s5QvD3DtnPL9Qdp3Ti8IZ7WdI536ENomoFX6eKdeXDM6cQQPQbUYEJj8pw+0T3vPBjw1TCHsN7ou/gWI9r1dUkCrIf3jqdpnWr60LbC6/m/rXG9sjDX0QESjvkiu0WPQQiQwOgkZXaHQt2khkTgSjQGsOy8h/J+2/Woz+28gkdprqXn2iZnIMDhp2ZySLwowOp0MQG/Sa7YrbQ/hZgjX/51OavRJA6CT5gS2ayzKeIhdVSZD7FuMJ1tD5ID6AGMWXIVdeslGI X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Apr 2026 13:37:20.0148 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: edf26d93-832b-4de1-b7c6-08de94aacac8 X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[4.158.2.129]; Helo=[outbound-uk1.az.dlp.m.darktrace.com] X-MS-Exchange-CrossTenant-AuthSource: DU6PEPF0000A7DF.eurprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBBPR08MB10795 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org On 31/03/2026 11:16, Matthieu Longo wrote: > On 24/03/2026 18:53, Tom Tromey wrote: >>>>>>> Matthieu Longo writes: >> >>> GDB can be built against the Python limited API using the configure >>> flag '--enable-py-limited-api=yes'. This flag is currently experimental, >>> and the build is not yet fully successful. Today, the minimum required >>> Python version for this option is 3.11. This requirement is not final >>> and will be raised to a later version as the migration progresses. >> >>> However, the configure script does not currently report an error if an >>> older version of Python is used. Instead, the build fails later with >>> numerous errors that are difficult to relate to Python limited API >>> compatiblity. >> >>> This patch adds a version check when '--enable-py-limited-api=yes' is >>> specified, ensuring that the provided Python version meets the minimum >>> requirements for the limited API support. If it does not, configure will >>> now fail with a clear error message. >> >> Sorry about the delay on this. >> >> I'm a bit worried about adding a bunch of new python-related configury. >> Like are we sure it will agree with what's already in there?  As in, >> picking up the same version from the same place, etc?  For instance does >> this new code respect --with-python-libdir? >> >> I wonder if instead there could just be a new compile test that is run >> when --enable-py-limited-api is used.  This test could just check >> PY_VERSION_HEX and #error on failure. >> >> Wouldn't that have the same effect but without adding a ton of new code? >> >> TBH I'd even be happy with not doing this check in configure at all and >> saying that if you specify --enable-py-limited-api then you should know >> what you're doing and if you mess up you'll just get compile-time >> errors.  That is, stick the check in python-internal.h. >> >> Tom > > So I followed your advice and added a compile test checking PY_VERSION_HEX and #erroring on failure. > Here below is the new patch that I posted here to avoid a new revision. > > Matthieu > > > diff --git a/gdb/configure b/gdb/configure > index 12c54521682..16580e4af7d 100755 > --- a/gdb/configure > +++ b/gdb/configure > @@ -28507,6 +28507,7 @@ fi >      # do except assume that the compiler will be able to find those files. >      python_includes= >      python_libs= > +    python_prefix= >      have_python_config=no >    fi > > @@ -28743,6 +28744,7 @@ else >  fi > > > + >  # Check whether to build GDB against Python limited C API. >  # Check whether --enable-py-limited-api was given. >  if test "${enable_py_limited_api+set}" = set; then : > @@ -28763,11 +28765,46 @@ fi >  if test "$enable_py_limited_api" = yes; then >    # The minimal Python limited API version is currently set to 3.11 for the >    # support of PyBuffer_FillInfo and PyBuffer_Release. > -  # The choice of the minimal version for the Python limited API won't be frozen > -  # until the end of the migration. > +  # The choice of the minimal version for the Python limited API won't be > +  # frozen until the end of the migration. > +  old_CFLAGS="$CFLAGS" > +  CFLAGS="$CFLAGS $PYTHON_CFLAGS" > +  old_CPPFLAGS="$CPPFLAGS" > +  CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" > +  old_LIBS="$LIBS" > +  LIBS="$LIBS $PYTHON_LIBS" > +  cat confdefs.h - <<_ACEOF >conftest.$ac_ext > +/* end confdefs.h.  */ > +#include > +#ifndef PY_VERSION_HEX > +#error "PY_VERSION_HEX is not defined" > +#endif > +#if PY_VERSION_HEX < 0x030b0000 > +#error "Python limited API support requires at least Python version 3.11" > +#endif > + > +int > +main () > +{ > + > +  ; > +  return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > >  $as_echo "#define Py_LIMITED_API 0x030b0000" >>confdefs.h > > + > +else > + > +      as_fn_error $? "Python limited API support requires at least Python version 3.11" "$LINENO" 5 > + > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > +  CFLAGS="$old_CFLAGS" > +  CPPFLAGS="$old_CPPFLAGS" > +  LIBS="$old_LIBS" >  fi > >  # -------------------- # > diff --git a/gdb/configure.ac b/gdb/configure.ac > index cf8078e1d89..c6b0653e3b0 100644 > --- a/gdb/configure.ac > +++ b/gdb/configure.ac > @@ -933,6 +933,7 @@ else >      # do except assume that the compiler will be able to find those files. >      python_includes= >      python_libs= > +    python_prefix= >      have_python_config=no >    fi > > @@ -1062,6 +1063,13 @@ AC_SUBST(PYTHON_CPPFLAGS) >  AC_SUBST(PYTHON_LIBS) >  AM_CONDITIONAL(HAVE_PYTHON, test "${have_libpython}" != no) > > +dnl Use --enable-py-limited-api to enable the build of GDB against the Python > +dnl limited API. > +dnl > +dnl no -   Disable the Python limited API. > +dnl yes -  Use the Python limited API to build GDB, error if the selected > +dnl        version of Python is not compatible with the Python limited API. > + >  # Check whether to build GDB against Python limited C API. >  AC_ARG_ENABLE([py-limited-api], >               [AS_HELP_STRING([--enable-py-limited-api], > @@ -1072,10 +1080,31 @@ AC_ARG_ENABLE([py-limited-api], >  if test "$enable_py_limited_api" = yes; then >    # The minimal Python limited API version is currently set to 3.11 for the >    # support of PyBuffer_FillInfo and PyBuffer_Release. > -  # The choice of the minimal version for the Python limited API won't be frozen > -  # until the end of the migration. > -  AC_DEFINE(Py_LIMITED_API, 0x030b0000, > -           [Define if GDB should be built against the Python limited C API.]) > +  # The choice of the minimal version for the Python limited API won't be > +  # frozen until the end of the migration. > +  old_CFLAGS="$CFLAGS" > +  CFLAGS="$CFLAGS $PYTHON_CFLAGS" > +  old_CPPFLAGS="$CPPFLAGS" > +  CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" > +  old_LIBS="$LIBS" > +  LIBS="$LIBS $PYTHON_LIBS" > +  AC_COMPILE_IFELSE([AC_LANG_PROGRAM( > +    [[#include > +#ifndef PY_VERSION_HEX > +#error "PY_VERSION_HEX is not defined" > +#endif > +#if PY_VERSION_HEX < 0x030b0000 > +#error "Python limited API support requires at least Python version 3.11" > +#endif > +    ]],[[]])], > +    [AC_DEFINE(Py_LIMITED_API, 0x030b0000, > +      [Define if GDB should be built against the Python limited C API.]) > +    ],[ > +      AC_MSG_ERROR([Python limited API support requires at least Python version 3.11]) > +    ]) > +  CFLAGS="$old_CFLAGS" > +  CPPFLAGS="$old_CPPFLAGS" > +  LIBS="$old_LIBS" >  fi > >  # -------------------- # Ping ?