From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca (simark.ca [158.69.221.121]) by sourceware.org (Postfix) with ESMTPS id 419813858C2D for ; Sun, 31 Dec 2023 23:58:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 419813858C2D Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=simark.ca Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=simark.ca ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 419813858C2D Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=158.69.221.121 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704067135; cv=none; b=t9pmFULrvMSVEnI7Gui+Hwa+Y0eXXPtS14vPZnFOXNSX4aOP7rcZJGyTjdjjKSvlYPBMVRKlRFcqpW+MfFNkVJ1sqjGJZJCa1wSHJDI07NiWRvXZfJREf93DdhliCciei+5rsvhbhSPlFGQVNvd6BSgiwPETTIg4StzcxN2E2c0= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1704067135; c=relaxed/simple; bh=O36jaltb1jJpV7eUCVfS1zMHhXDS213YGrUFUPUW1gM=; h=DKIM-Signature:Message-ID:Date:MIME-Version:Subject:To:From; b=WRu3FIPXpxYlJ11lkScZBGvaZ6HIonDLjB/CmyPDn9uMU9QuYpckM9LDfKy1sOil8U64pUiQ91/oj4FEWz0mmXyKAs6ZA/TROdsoFYEKfCddvACfuKFTOL0GyoeqmNgAI1tcNhB49i1VCxo0V3Anfvv83gNIPPB/OLfaAXYCOr4= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=simark.ca; s=mail; t=1704067133; bh=O36jaltb1jJpV7eUCVfS1zMHhXDS213YGrUFUPUW1gM=; h=Date:Subject:To:References:From:In-Reply-To:From; b=UfbVjFiKf2/zCjj/D0oIYfLBuGoGsZTXGj50rfmwYvddLEm/LLZbqEdQk9TwMTzBs +XAmmfcI5S2iN/cjdh/HeUsdEsLGSKgG7yuEk6UJnZiVhjRz+19UWQIZtxHfIVHs6f c1z7mwT3wSNAxUKsRGLEvNnnIbylKmRy+AgW4dv0= Received: from [10.0.0.11] (modemcable238.237-201-24.mc.videotron.ca [24.201.237.238]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 29E8A1E092; Sun, 31 Dec 2023 18:58:52 -0500 (EST) Message-ID: Date: Sun, 31 Dec 2023 18:58:52 -0500 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] Allow configure with python on macOS Content-Language: en-US To: Simon Wright , gdb-patches@sourceware.org References: <20231226154530.1074-1-simon@pushface.org> From: Simon Marchi In-Reply-To: <20231226154530.1074-1-simon@pushface.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-10.8 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,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 List-Id: On 2023-12-26 10:36, Simon Wright wrote: > 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))) I can't say that I understand all the reasons behind this change, but given that we aim to replicate what upstream Python does, I guess it's fine. But, can you help me understand what is the point of having this script in the GDB repo? Don't Python distributions normally ship with a python-config.py? Why would one use the GDB one over the one shipped with Python? Simon