From patchwork Tue Dec 26 15:36:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Wright X-Patchwork-Id: 82849 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 4252A3858412 for ; Tue, 26 Dec 2023 15:45:59 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from smtp.hosts.co.uk (smtp.hosts.co.uk [85.233.160.19]) by sourceware.org (Postfix) with ESMTPS id C818C3858D32 for ; Tue, 26 Dec 2023 15:45:36 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C818C3858D32 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=pushface.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=pushface.org ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C818C3858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=85.233.160.19 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703605539; cv=none; b=Swvx6qMM8S8wXIuWlxyn9LGi4eD1I9xl8miaIsIam4UGiZqgkrs9DY4CIJqHbCAX5OsQJ2Kt1TdxU0p5X5g9BdGJF/Y92AtI0REdO+ILWrkzJuZRdsMV5HvLFbr6te/2pi9hE0QfhZZr2Ag/nTyVQNa7uzd90XAth4FH8P27QlI= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1703605539; c=relaxed/simple; bh=9ONMlRkWChxPzR/yzWXeDmgGY10nwyYNNf6Fn9tSHqU=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=NEzQrlUCTVxCbJoveD5LaHBmh950NzUOJ51sM5hUQBfXjOQNSJU/duoWHCwTbxZyZt+gcrLznzf2MOi5DED9FI1KHg8jE0rkolrvH6CV+iPkYg/VU54kInlRbsQ+Fo/CJBpukeBblJONKg122ymH3mal48UmC+cNVtFKjR78yuM= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from host-80-43-112-170.as13285.net ([80.43.112.170] helo=localhost.localdomain) by smtp.hosts.co.uk with esmtpsa (TLS1.3:TLS_AES_256_GCM_SHA384:256) (Exim) (envelope-from ) id 1rI9cc-0003ws-Ce; Tue, 26 Dec 2023 15:45:35 +0000 From: Simon Wright To: gdb-patches@sourceware.org Cc: Simon Wright Subject: [PATCH] Allow configure with python on macOS Date: Tue, 26 Dec 2023 15:36:05 +0000 Message-ID: <20231226154530.1074-1-simon@pushface.org> X-Mailer: git-send-email 2.42.1 MIME-Version: 1.0 X-Spam-Status: No, score=-10.2 required=5.0 tests=BAYES_00, GIT_PATCH_0, KAM_DMARC_STATUS, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org 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+patchwork=sourceware.org@sourceware.org PR29070 reports that a framework build of GDB, configured --with-python, fails becaue of an inappropriately set value in the LINKFORSHARED variable. Python PR36508: python-config --ldflags must not contain LINKFORSHARED ("-Xlinker -export-dynamic" on Linux) (https://bugs.python.org/issue36508) states (2019-04-16) that the issue is resolved in Python 3.7. This patch removes the use of LINKFORSHARED. * gdb/python/python-config.py: --ldflags doesn't include LINKFORSHARED --- I've seen this problem in binutils-gdb at gcc-12.1-release, gcc-13.1-release, gcc-14.1-release; previous fixes were as in PR29070, but looking at Python PR36508 I think that LINKFORSHARED shouldn't be there at all. I haven't run the testsuite, because without this patch there's no build. I have GCC copyright assignment 1016382. gdb/python/python-config.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/gdb/python/python-config.py b/gdb/python/python-config.py index e89e0fd40bb..748ced64b75 100644 --- a/gdb/python/python-config.py +++ b/gdb/python/python-config.py @@ -77,6 +77,4 @@ for opt in opt_flags: libs.insert(0, "-L" + getvar("LIBPL")) 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()) print(to_unix_path(" ".join(libs)))