From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id QbP3LdnlampvQDQAWB0awg (envelope-from ) for ; Thu, 30 Jul 2026 01:49:13 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=sN2ihig4; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B90951E09E; Thu, 30 Jul 2026 01:49:13 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-5.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [IPv6:2620:52:6:3111::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 001751E033 for ; Thu, 30 Jul 2026 01:49:12 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 06D4F4BB5932 for ; Thu, 30 Jul 2026 05:49:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 06D4F4BB5932 Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=sN2ihig4 Received: from mail-pg1-x531.google.com (mail-pg1-x531.google.com [IPv6:2607:f8b0:4864:20::531]) by sourceware.org (Postfix) with ESMTPS id 7C1774BA23EC for ; Thu, 30 Jul 2026 05:48:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7C1774BA23EC Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gmail.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 7C1774BA23EC Authentication-Results: sourceware.org; arc=none smtp.remote-ip=2607:f8b0:4864:20::531 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785390527; cv=none; b=dg4m4AGIJRpL8Hv8Qet5SbZ7zhb1XoYQ/WVkD+pRWCyAxMoIdUcYQjGyyJmFu44k6Z70BZIZxgGOnVXbC9B3FqIcK8vYl1SrhA9amGN0qpBv01ng+899oE4sczf0b+zN2xOA+Aft/BWbG7+POY/aLH0YkxJ/5CzeyLK84o4UIO4= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1785390527; c=relaxed/simple; bh=8edkU59sUhU86q9IHV7Rl6Wr1sqEUS5F8y3YMW5xK1Q=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=P+S8KaMWOGJZ+n0D3BRnrwQ+qsaQELnY6LdVSS2fn0QDBA/0o/R/P/SgdVo6SvdCDSsno3pamusfhAucTAA27PvmNl2ARu3DJ5iueF/SCwzIH7ZgoNHaNz/r4jyvQsB5goW1vPpACsmy6non96+XOe6mYWnsxdrgVdJ3gCUbZIo= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20251104 header.b=sN2ihig4 DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7C1774BA23EC Received: by mail-pg1-x531.google.com with SMTP id 41be03b00d2f7-c966b9ee9cbso958906a12.1 for ; Wed, 29 Jul 2026 22:48:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1785390526; x=1785995326; darn=sourceware.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=VcsEOSv63D509bTEMJn0J1WL+FViqMTf3KmgVNETiIU=; b=sN2ihig4Uod5ft0cJ23VhgMD3ojx8NGrs/Q/AIUSWpMKFI6iUCn4658a8FdVLscuE6 e1/hG4X16zSH14LL3LvTGvbk/j6hH/s7yzDponk9VdZABTUpzBwiRjXqrP8ZfhpEeulF K/9LQbbiWieBde75xGkmYzOQy6p6sfteVId1FMw/o7wxp+HqngD29FB3560lpoJ1Gv/y e7Z5Yo7esAPqkIuFKnWJ0srkvEvcOIHtiH79uLleDcHsbeYt3+xnuYrUlN5r4bShXIC0 ZrVV5qF5jdO0loFooB5KBDwVWOBwg7EjBhuZbllFColdCEl5nYUF3Zm5A6s8ts0kOpWz /27g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1785390526; x=1785995326; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=VcsEOSv63D509bTEMJn0J1WL+FViqMTf3KmgVNETiIU=; b=UyNT57Qzv3y8d/5uW26WekO94HgxUOOcuPDQZoGa7kdJ852xicnCYL3yfII/fYpwFn gcpzpglZarIbP0oUQnGJYk/Owp4bylMOLmtgoNCz8YhAusge/3VQBiEUA44h+qWZwpOk ZLoucK1Fdaaobv6Gcq4TnpEHh+vv31gVwqAlxNUCYzQQiOHPoaBzkQZF13jEIE9KVbYR IhBR5xGOQpKhbJHc9v296bzVtY6bk1/Q2XlapMK49q/ELW5flRnB38M0pQtWR1kSSCKm ulPjsMn5PL5POAXsXan6Bh8dKssHSed2lgH1gAlr/HhzftwyYT89UN+4ieoUHbXVgzpS ix8g== X-Gm-Message-State: AOJu0Yw/ZP+O9mZAoMw9X20959PWy2PjKYWyfFIDeY9LLIh/+DSEs50q MgByhnIaiaoAoiZwtIbnQxgZ1hyBy/V9RGWn7XVgGUrnS93QUxu5Rxu6hftxXqGE X-Gm-Gg: AR+sD10pSYCgo2XacTGu7d7gA40asNb1ruzJhsRXgVBnu9CeAzjq21spXZUOAw8wJwt 95Bat/8Zq3yybBZKHjNRZ7UO/ffqS1DkbaZVhg6uXkLKXLpKLNZemz7NwL6+CFg2W34SMKNBLbM N6BmmrKq+r5rBYiNjp8R+O/1MiV9QE0xnMObu0EmDr3U7dlQrjMiQjljY2DhRvmnA/L38z/pz/T +C7NYvPCQrFBS5VPJFpC/TTY3fYDpKY5RbWyPsRK7hRnFjNtkUGqej0esMTQNaQHsAs2oJTaPft 8HcpSpHbfTuYJKqQhIpK6zgZg1bwOmvkDQoMgdlrfZNeUeeCDYjnB0J2AD5io4ZLCK3PlrE4jwg maDdOz1pEZrVoTmcxfvVvewGYWumovcIqKesJZqMB54b0xmj9Xa8xV8yoSBJ6AhIX/4VVK1HKUZ OLJh77YCSGLb8uQRXc8IJNiSeyeAGHUqvUCRA+qaWhBUUYf/xwbxV5MS1wj5fjgS8a597iqFajJ RJHKFq3THQfNJ6YHw== X-Received: by 2002:a05:6a20:d808:b0:3c3:bb14:f0b8 with SMTP id adf61e73a8af0-3c9009f2dd3mr1122327637.71.1785390526461; Wed, 29 Jul 2026 22:48:46 -0700 (PDT) Received: from localhost.localdomain ([122.171.21.177]) by smtp.gmail.com with ESMTPSA id a92af1059eb24-13e7271f0ddsm16177630c88.11.2026.07.29.22.48.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 29 Jul 2026 22:48:45 -0700 (PDT) From: Aditya Vidyadhar Kamath To: ulrich.weigand@de.ibm.com, simon.marchi@polymtl.ca, tom@tromey.com Cc: gdb-patches@sourceware.org, Aditya.Kamath1@ibm.com, sangamesh.swamy@in.ibm.com, PRAJWAL.B.MEHENDARKAR@ibm.com Subject: [PATCH v1] Fix wrong build tree in python.exp path on AIX Date: Thu, 30 Jul 2026 11:18:27 +0530 Message-ID: <20260730054826.89712-2-akamath996@gmail.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 From: Aditya Kamath Python records the path to the export file in LINKFORSHARED sysconfig variable as a build tree relative path: -Wl,bE:Modules/python.exp But this will fail in AIX. When configure runs python-config.py --ldflags to test for libpython, the linker cannot find Modules/python.exp, the link test fails, and GDB is built without Python support. So in this patch we fix the same by replacing the relative path with LIBPL/python.exp (e.g. /opt/freeware/lib64/python3.12/config-3.12/python.exp) on AIX only, where LIBPL is the installed config directory that already contains the file. --- gdb/python/python-config.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gdb/python/python-config.py b/gdb/python/python-config.py index 061eae1ac64..7190f799b0a 100644 --- a/gdb/python/python-config.py +++ b/gdb/python/python-config.py @@ -78,5 +78,16 @@ for opt in opt_flags: elif os.name == "nt": libs.insert(0, "-L" + os.path.normpath(sys.prefix) + "/libs") if getvar("LINKFORSHARED") is not None: - libs.extend(getvar("LINKFORSHARED").split()) + linkforshared = getvar("LINKFORSHARED") + # On AIX, LINKFORSHARED contains "-Wl,-bE:Modules/python.exp" + # where "Modules/python.exp" is a build-tree-relative path that + # does not exist on installed systems. Replace it with the + # absolute installed path using LIBPL, which always points to + # the pythonX.Y/config-X.Y directory where python.exp is kept. + if sys.platform.startswith("aix") and getvar("LIBPL") is not None: + linkforshared = linkforshared.replace( + "Modules/python.exp", + getvar("LIBPL") + "/python.exp", + ) + libs.extend(linkforshared.split()) print(to_unix_path(" ".join(libs))) -- 2.51.2