From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id 4QNoHXgKr2k8hCAAWB0awg (envelope-from ) for ; Mon, 09 Mar 2026 13:59:20 -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=EXvLnFG8; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=EXvLnFG8; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 724561E089; Mon, 09 Mar 2026 13:59:20 -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 9FE231E089 for ; Mon, 09 Mar 2026 13:59:17 -0400 (EDT) Received: from vm01.sourceware.org (localhost [127.0.0.1]) by sourceware.org (Postfix) with ESMTP id 15FC34BA23FC for ; Mon, 9 Mar 2026 17:59:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 15FC34BA23FC 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=EXvLnFG8; dkim=pass (1024-bit key) header.d=arm.com header.i=@arm.com header.a=rsa-sha256 header.s=selector1 header.b=EXvLnFG8 Received: from AM0PR02CU008.outbound.protection.outlook.com (mail-westeuropeazlp170130006.outbound.protection.outlook.com [IPv6:2a01:111:f403:c201::6]) by sourceware.org (Postfix) with ESMTPS id 836EE4BA2E3D for ; Mon, 9 Mar 2026 17:58:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 836EE4BA2E3D 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 836EE4BA2E3D Authentication-Results: server2.sourceware.org; arc=pass smtp.remote-ip=2a01:111:f403:c201::6 ARC-Seal: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1773079095; cv=pass; b=kUjSg7Y6XP1mR2ZLEvlrih5A4e6euZj6Ys3evJOsTQjdyZJPNCmzSMcZK5HXiU5oPGSvnLm0QarWCZv5e2fNcz9k7fd164UNyRr0JkzcsW9zDZj88vJpYAI94NmajVcD3uDx/iMEdXSHwp4gZ5Pl6umT6EMpDxuy7gNepEuKlJk= ARC-Message-Signature: i=3; a=rsa-sha256; d=sourceware.org; s=key; t=1773079095; c=relaxed/simple; bh=AoboD2pT1JU3Swb9eKO/zTQAqoy2RdYgcoEFH4KPT1w=; h=DKIM-Signature:DKIM-Signature:From:To:Subject:Date:Message-ID: MIME-Version; b=q0bDoVlYNO9O1e4Z2AGsSTgD80LaQ+BuY1ry2n+XB2MI/xCO8qkCen0K+rttElsnIAvzhKauI1sLW5+8ZY0qMCBVWcgSnSlLKP7wgx6ce9kGPO6OFqEZG4uT4KhqG+uM8NgpnmJ43i4mSqg6vzmpZJjbfGRZGe865lXq/c/TfkA= ARC-Authentication-Results: i=3; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 836EE4BA2E3D ARC-Seal: i=2; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=pass; b=xpBbOO+G4/BZRo0JQAyeZCZpV696y7044G2FTbjtRk4OjVekXoVei5hNssjkh/585pM2ohUE2qf/uXbN1apjxvaytuAi2kjI8XxMmJxnVcLMQ8DVHH+hi65l65hlUgaMnRZPZNywT2E3ik2Ro27D6bn9TzY3erzcJxzpUZO5od+y2IOuKudghk5JPvy5rEBHN2Fo4tebZI2hM/F7/pVLa5hqKhwwXSpdYN8ObgUWhwlRbjmGbKWjqhxZCSv5JE/zAUmwc0+eqeMkUPxDQcL2xUjGIFRAlWUezQ3qFTxhBz0Smb/afZ331XNTsRz0gC/+iYCE/cTXtvhWA8YEFfe10g== 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=NNnekW5giolJEGxY3fTrm7KyCQ3NrDeyAwqg9QgFFjQ=; b=luceh/IyjbiW0fad9j6ztar8m/NUY2w5oDkhFPfq6J8moH2N6o49WQrCJvqvbzAJE/Hhno5YBzQq8CxnXBb7AoX69tmgEfMRy3Eo36J6boLil49GgQLKalbpBUoO86FXavqJRMTOei25viNSt1rXanNuudZ4O2/taAlnMdv42WedLoM7YoRGtG7ZSFhhv5rHMndrLvrXOUp06As17ftiMaZxLhr/o4R2lD0sG5mnvPHma6qe6p6S9Rj4X2yjUqyVeDOXgOezAKpkQEAQVI7EgKsklPjQxJ2/by/r1J+dytsuYFVZX3tzI1SQCcZhBxA0sKamUTB13I7S8THsKFFvGA== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 4.158.2.129) smtp.rcpttodomain=sourceware.org 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] 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=NNnekW5giolJEGxY3fTrm7KyCQ3NrDeyAwqg9QgFFjQ=; b=EXvLnFG8FWmQ8WG+ng1/hGrAb5tbGlh98cSvAPH9SpJh1ueCw9gGyJrA5ov3ck7UfBLYD1Iiyf81D2XaO3HfsvyL2+7MHAJVUuw7FsjfxRjxJEc24QtYHljzqC2pNrP4h0zEIUl8GIaUFuxxTpmnOuYBzHEx2GIF+umWtm7H1EQ= Received: from AS4P195CA0017.EURP195.PROD.OUTLOOK.COM (2603:10a6:20b:5d6::8) by GV1PR08MB8377.eurprd08.prod.outlook.com (2603:10a6:150:a6::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.22; Mon, 9 Mar 2026 17:57:56 +0000 Received: from AM2PEPF0001C710.eurprd05.prod.outlook.com (2603:10a6:20b:5d6:cafe::82) by AS4P195CA0017.outlook.office365.com (2603:10a6:20b:5d6::8) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.25 via Frontend Transport; Mon, 9 Mar 2026 17:57:53 +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 AM2PEPF0001C710.mail.protection.outlook.com (10.167.16.180) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Mon, 9 Mar 2026 17:57:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=rfr74Cae90vj+THzeXPwrUARcrs5d9hwmc7WmYR+h1ya3vZxsqrI/b1tcDf7k5V5xvgRx3B192F3iTwmiWrHjorgG2LMoR4/yVQ4dRzgaRa2VYvKTA6Nlnb6zAH6R2c9LYjp1KZnzfppDap/8uUa6OD9AQrE+upANVqZpErD7aW1DG957QkMogFhJIwqDNXE29W9DqLbMM/DR469gXz4VBmMf1iuQ/qIThEd4GvVFo0qX/FSO1/z2bIv52JQKdu1cI/oAj2VtIj40Pc7Wbbi0RntC9iFmoXIXBaC76IJbD2Vx0MIvJ2QrgTwF/l0WwRSFWVyme7TITDMCy1f8vIoYg== 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=NNnekW5giolJEGxY3fTrm7KyCQ3NrDeyAwqg9QgFFjQ=; b=k9tBA/cyP2UiD3G2HeSZ3EpVVaopAPmotLFvEgLkCAG1zCztaP5pMSJMd+HxAppnLoJDDOO+LEa1vR0lP0nPU7G8BBa/SoORj6IZVL9wrQZy/G+KC5r8/rIYdnizVWIoQkENaCAg7Ajm5JpwA1Erp6TmRPEdBDtO1zTslcCIwjRgVZWyye6ir3ewiykps8+e4uEoqS7FK7f03lV79EhsCCJKrSTkyqDFXQQFEXJvSrqhbzTQwkMmMDPlxVI7Wj2Da6HqIgyNa2tFTG25hlTafaH2AUTkk4VQNRCcqqmHIqgpB2iPdG4OON+KQy2VU4xyjNQzO7sLdlGVnOf+b+rqoA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 172.205.89.229) smtp.rcpttodomain=sourceware.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=none (message not signed); arc=none (0) 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=NNnekW5giolJEGxY3fTrm7KyCQ3NrDeyAwqg9QgFFjQ=; b=EXvLnFG8FWmQ8WG+ng1/hGrAb5tbGlh98cSvAPH9SpJh1ueCw9gGyJrA5ov3ck7UfBLYD1Iiyf81D2XaO3HfsvyL2+7MHAJVUuw7FsjfxRjxJEc24QtYHljzqC2pNrP4h0zEIUl8GIaUFuxxTpmnOuYBzHEx2GIF+umWtm7H1EQ= Received: from DU2P251CA0014.EURP251.PROD.OUTLOOK.COM (2603:10a6:10:230::15) by PAVPR08MB8919.eurprd08.prod.outlook.com (2603:10a6:102:324::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.24; Mon, 9 Mar 2026 17:56:48 +0000 Received: from DB5PEPF00014B9A.eurprd02.prod.outlook.com (2603:10a6:10:230:cafe::ea) by DU2P251CA0014.outlook.office365.com (2603:10a6:10:230::15) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.9678.24 via Frontend Transport; Mon, 9 Mar 2026 17:56:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 172.205.89.229) smtp.mailfrom=arm.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 172.205.89.229 as permitted sender) receiver=protection.outlook.com; client-ip=172.205.89.229; helo=nebula.arm.com; pr=C Received: from nebula.arm.com (172.205.89.229) by DB5PEPF00014B9A.mail.protection.outlook.com (10.167.8.167) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.9678.18 via Frontend Transport; Mon, 9 Mar 2026 17:56:48 +0000 Received: from AZ-NEU-EX04.Arm.com (10.240.25.138) by AZ-NEU-EX03.Arm.com (10.240.25.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.2562.29; Mon, 9 Mar 2026 17:56:47 +0000 Received: from PF4S4363.arm.com (10.57.58.75) by mail.arm.com (10.240.25.138) with Microsoft SMTP Server id 15.2.2562.29 via Frontend Transport; Mon, 9 Mar 2026 17:56:47 +0000 From: Matthieu Longo To: , Tom Tromey CC: Matthieu Longo Subject: [PATCH v3 2/7] gdb: fail configure if Python version is too old for limited API Date: Mon, 9 Mar 2026 17:56:19 +0000 Message-ID: <20260309175624.236491-3-matthieu.longo@arm.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260309175624.236491-1-matthieu.longo@arm.com> References: <20260309175624.236491-1-matthieu.longo@arm.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EOPAttributedMessage: 1 X-MS-TrafficTypeDiagnostic: DB5PEPF00014B9A:EE_|PAVPR08MB8919:EE_|AM2PEPF0001C710:EE_|GV1PR08MB8377:EE_ X-MS-Office365-Filtering-Correlation-Id: 08bc7b8e-e724-46c9-d9a8-08de7e0564c3 x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0; ARA:13230040|376014|82310400026|36860700016|1800799024|13003099007; X-Microsoft-Antispam-Message-Info-Original: y/uo1eqpJ6dXlEhUY6u5ZK7rDTyPfB4vP9cwNCfz0mm/OBKtTv4wDAazXpfyhNINHslu89gNc8VPlVWhtv7Pm6T7xlpsbYqqv8rpyMono8FHswvcXYphLWHZ6/WOqj7+os02ZCRYjdEEVZYR6RL7J/AepOdqmf7CuNGKlGUT+2M6rA75LIOOEmTC5QGTDQhutJCH473wx+jqo4WsaeSUI9rs+/+ReY8pxT+FVom9lU/erec2BT+mL+uwBPRr8c6YY3EbGXoc3glFKi4y6l3Jq5ABBvy1cfsrNzN/5dRzk2y9b52Xug/R+/jxji2vvPdSiP7eEbv4oOWi/8VgFoxtJaQPIp4Vr6v/Gr9n4Jd658w66wVzXXdIFrq2GxWQ47iOEswY1hx5Pnz3l+3HRsTMCy5mfHu33x6OoOAsafTWyC38MXd/ei7xKRgiki+awx8pekQL6xZW3d/P79HYKZGDsdKoOJyQsZ1WUG05/uwWxlRzs9nDBkwtwvsQqFxYhPk1BVLrsc5pg990FIhN2Mq/H8uacVbGhNU2Vqm/wJqDREPVvqla7FomJYaXONcFIKbchM4IvSDg1duXDJA7OB88ctPjvFDxiTTr3j56T18/ktnFud4MP1mboSbNLWXsE88AjrzCuYkrjBJm0nZkf0HWQS691AvdBO/WJEOhHim6FQaEdyndCxQw/LLtz01GQloaCZNoNW009RjqHi0lNBlS6p8m/6OgQIYGq0GKwFmF2aI= X-Forefront-Antispam-Report-Untrusted: CIP:172.205.89.229; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:nebula.arm.com; PTR:InfoDomainNonexistent; CAT:NONE; SFS:(13230040)(376014)(82310400026)(36860700016)(1800799024)(13003099007); DIR:OUT; SFP:1101; X-Exchange-RoutingPolicyChecked: hGCH0/P2i3HKjsqtCIIeB6hjo0/NpszTS4voQGIl9S7Fc09AEY0ndlnBw+Jq5Kg5yEUNUI77kNsV2b1w5+a6dxAwSzGDxJNnr7gGKHuhUrU60UAh6hplvNEHlwBohTxU1Z5bvAwBOIk2znDiE5PtpmOXiiMW+pZlDGdsVaJKg476E9L/QWREDanizIo5LANMFCZ3dKkZfaZ8ENFRi2dNv4Zei3HIpaZMGRj46CjdtxzZgcjNa1dH22M2ALZXhZMA6PL3LwpHJmCtWnzLgAQDe7tmV+MrErGeazBFIArXUAH2p4sevipl48okEgb0Db3qQ0WoCOucqdIpo1pvxLaNTw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAVPR08MB8919 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM2PEPF0001C710.eurprd05.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: 4597f9a1-361e-41b8-0b52-08de7e053c21 X-Microsoft-Antispam: BCL:0; ARA:13230040|1800799024|36860700016|82310400026|35042699022|376014|14060799003|13003099007; X-Microsoft-Antispam-Message-Info: R6DPsTF0wYV+F3y6ORc/W1M3vd7a6OGdu+WsfmC52FGDLszmNc5sxHWaATcDEgkcQ7kNmPpikmCXmpfWDUr2UlwLtmqRWUvvc+OMOTnoascWQNxmdkXGT8abn66H2g/aZprxxdIE+MOKLuYe9Y7nk66VBCJxUbdsHKKjwVTr6YYPHSLUUMsaomBHPPi3lYnV3fAcb3NTEWHJ0RFlaEBaGqxYUZ3agF4WzLkAv0mMMS4KpktnwIw+CwX/s+eoBDh7KSTxXSyFgvQ0rEll1RXg+PD6zNtyXpzpHVK9UapgTsFmgTjjfJIbC+FmUDdCUrrYnkyTtBG2sLes3Hr1xSrHYjA8FK+VaIUzvJ66OIZtuuuIoi+4LgibyRTetjr2JbTZ4zyBxck93WyDad6mtMReMCf0fTFNF1jffcTGDkPKef4hVYTYKMldV4gVl4QVUubWDF5yedrzgi6fPeljtTsVQDNL8BZ6ozeTKD2jWMbOlPmpO1udn876P7xKq0pAlrZRxtadOyEm9kU1agiUeJ1SjymS+NT7sb0zhh8qaleG8GbmSYO+DOu2tnCjonEyGcGvdciN938+Z8rBStsWbi3G4wTz2g9Dea1aKKH3ty0URYcceR7jmgxzYLNDHSTY5t+HZT11OhX+RW5P93SQ2AR+V6Lc5NFUdUcfka3iy30KfpLxcGyuj4U1U3HHYSEEV7jY5DLVtDqswaMbLwxwpgJxXadqJudGfSv4vFrCUBRkyYc= 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)(36860700016)(82310400026)(35042699022)(376014)(14060799003)(13003099007); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bB+aUY8Itu6pSFJrytqAS4exOXwpin61edYkGTzkT9hL+UsGhmd8mf6JOEIInruQ9sNmStZSh3/5EQhVu+hhdfiNJV0z4dQCjCAM6D98ZhSyAg9qWi4SuUNlzPmhS3XPynE/JLoM+C9PVobEkSz+wT5LWsmTrBh3eLztNrqJ+aOaW8fXNcgDXeJbMUELtjIMEXG8SmUCiPSd2z4nkQrhXuuz+EF7yftGmUN00nbCSlIM5ctfSuIOD/JlVNQf/trLjBv6AXZ3UTm05Ry+xa3dfCUIvNkhK7t8HKikjIGK2M2rYEpOvDyEkAXaM3r0fpMCpfy2bZWDNskVFSeANGFWfXyBxjjXdYVaVEAKf1CqzOF7/T7NmpXzIojIM9LmBk+r1JOQGGnMPsZ0laGCi8U18eADsgVUPFlc1oLE6qgQYRXh4yGW8k6WmolRcnX96vw2 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2026 17:57:56.3149 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 08bc7b8e-e724-46c9-d9a8-08de7e0564c3 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: AM2PEPF0001C710.eurprd05.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB8377 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 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. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=23830 --- gdb/aclocal.m4 | 253 +++++++++++++++++++++++++++++++++++++++++++++++ gdb/configure | 27 ++++- gdb/configure.ac | 20 +++- 3 files changed, 294 insertions(+), 6 deletions(-) diff --git a/gdb/aclocal.m4 b/gdb/aclocal.m4 index cae09708e01..254cb4edadc 100644 --- a/gdb/aclocal.m4 +++ b/gdb/aclocal.m4 @@ -154,6 +154,259 @@ AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) ] ) +# Copyright (C) 1999-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + + +# AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# --------------------------------------------------------------------------- +# Adds support for distributing Python modules and packages. To +# install modules, copy them to $(pythondir), using the python_PYTHON +# automake variable. To install a package with the same name as the +# automake package, install to $(pkgpythondir), or use the +# pkgpython_PYTHON automake variable. +# +# The variables $(pyexecdir) and $(pkgpyexecdir) are provided as +# locations to install python extension modules (shared libraries). +# Another macro is required to find the appropriate flags to compile +# extension modules. +# +# If your package is configured with a different prefix to python, +# users will have to add the install directory to the PYTHONPATH +# environment variable, or create a .pth file (see the python +# documentation for details). +# +# If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will +# cause an error if the version of python installed on the system +# doesn't meet the requirement. MINIMUM-VERSION should consist of +# numbers and dots only. +AC_DEFUN([AM_PATH_PYTHON], + [ + dnl Find a Python interpreter. Python versions prior to 2.0 are not + dnl supported. (2.0 was released on October 16, 2000). + dnl FIXME: Remove the need to hard-code Python versions here. + m4_define_default([_AM_PYTHON_INTERPRETER_LIST], +[python python2 python3 python3.5 python3.4 python3.3 python3.2 python3.1 python3.0 python2.7 dnl + python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) + + AC_ARG_VAR([PYTHON], [the Python interpreter]) + + m4_if([$1],[],[ + dnl No version check is needed. + # Find any Python interpreter. + if test -z "$PYTHON"; then + AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) + fi + am_display_PYTHON=python + ], [ + dnl A version check is needed. + if test -n "$PYTHON"; then + # If the user set $PYTHON, use it and don't search something else. + AC_MSG_CHECKING([whether $PYTHON version is >= $1]) + AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], + [AC_MSG_RESULT([yes])], + [AC_MSG_RESULT([no]) + AC_MSG_ERROR([Python interpreter is too old])]) + am_display_PYTHON=$PYTHON + else + # Otherwise, try each interpreter until we find one that satisfies + # VERSION. + AC_CACHE_CHECK([for a Python interpreter with version >= $1], + [am_cv_pathless_PYTHON],[ + for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do + test "$am_cv_pathless_PYTHON" = none && break + AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) + done]) + # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. + if test "$am_cv_pathless_PYTHON" = none; then + PYTHON=: + else + AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) + fi + am_display_PYTHON=$am_cv_pathless_PYTHON + fi + ]) + + if test "$PYTHON" = :; then + dnl Run any user-specified action, or abort. + m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) + else + + dnl Query Python for its version number. Getting [:3] seems to be + dnl the best way to do this; it's what "site.py" does in the standard + dnl library. + + AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], + [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) + AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) + + dnl Use the values of $prefix and $exec_prefix for the corresponding + dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made + dnl distinct variables so they can be overridden if need be. However, + dnl general consensus is that you shouldn't need this ability. + + AC_SUBST([PYTHON_PREFIX], ['${prefix}']) + AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) + + dnl At times (like when building shared libraries) you may want + dnl to know which OS platform Python thinks this is. + + AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], + [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) + AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) + + # Just factor out some code duplication. + am_python_setup_sysconfig="\ +import sys +# Prefer sysconfig over distutils.sysconfig, for better compatibility +# with python 3.x. See automake bug#10227. +try: + import sysconfig +except ImportError: + can_use_sysconfig = 0 +else: + can_use_sysconfig = 1 +# Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: +# +try: + from platform import python_implementation + if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': + can_use_sysconfig = 0 +except ImportError: + pass" + + dnl Set up 4 directories: + + dnl pythondir -- where to install python scripts. This is the + dnl site-packages directory, not the python standard library + dnl directory like in previous automake betas. This behavior + dnl is more consistent with lispdir.m4 for example. + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON script directory], + [am_cv_python_pythondir], + [if test "x$prefix" = xNONE + then + am_py_prefix=$ac_default_prefix + else + am_py_prefix=$prefix + fi + am_cv_python_pythondir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pythondir in + $am_py_prefix*) + am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` + am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` + ;; + *) + case $am_py_prefix in + /usr|/System*) ;; + *) + am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pythondir], [$am_cv_python_pythondir]) + + dnl pkgpythondir -- $PACKAGE directory under pythondir. Was + dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is + dnl more consistent with the rest of automake. + + AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) + + dnl pyexecdir -- directory for installing python extension modules + dnl (shared libraries) + dnl Query distutils for this directory. + AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], + [am_cv_python_pyexecdir], + [if test "x$exec_prefix" = xNONE + then + am_py_exec_prefix=$am_py_prefix + else + am_py_exec_prefix=$exec_prefix + fi + am_cv_python_pyexecdir=`$PYTHON -c " +$am_python_setup_sysconfig +if can_use_sysconfig: + sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) +else: + from distutils import sysconfig + sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') +sys.stdout.write(sitedir)"` + case $am_cv_python_pyexecdir in + $am_py_exec_prefix*) + am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` + am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` + ;; + *) + case $am_py_exec_prefix in + /usr|/System*) ;; + *) + am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages + ;; + esac + ;; + esac + ]) + AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) + + dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) + + AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) + + dnl Run any user-specified action. + $2 + fi + +]) + + +# AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) +# --------------------------------------------------------------------------- +# Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. +# Run ACTION-IF-FALSE otherwise. +# This test uses sys.hexversion instead of the string equivalent (first +# word of sys.version), in order to cope with versions such as 2.2c1. +# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). +AC_DEFUN([AM_PYTHON_CHECK_VERSION], + [prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] +sys.exit(sys.hexversion < minverhex)" + AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) + +# Copyright (C) 2001-2017 Free Software Foundation, Inc. +# +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# AM_RUN_LOG(COMMAND) +# ------------------- +# Run COMMAND, save the exit status in ac_status, and log it. +# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) +AC_DEFUN([AM_RUN_LOG], +[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD + ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + (exit $ac_status); }]) + # Copyright (C) 2001-2017 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation diff --git a/gdb/configure b/gdb/configure index 12c54521682..dcd5c030713 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,32 @@ 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. + prog="import sys +# split strings by '.' and convert to numeric. Append some zeros +# because we need at least 4 digits for the hex conversion. +# map returns an iterator in Python 3.0 and a list in 2.x +minver = list(map(int, '3.11'.split('.'))) + [0, 0, 0] +minverhex = 0 +# xrange is not present in Python 3.0 and range returns an iterator +for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] +sys.exit(sys.hexversion < minverhex)" + if { echo "$as_me:$LINENO: $python_prog -c "$prog"" >&5 + ($python_prog -c "$prog") >&5 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; 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 fi # -------------------- # diff --git a/gdb/configure.ac b/gdb/configure.ac index cf8078e1d89..17f648d0b49 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,14 @@ 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. + AM_PYTHON_CHECK_VERSION([$python_prog], [3.11], [ + 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]) + ]) fi # -------------------- # -- 2.53.0