From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22675 invoked by alias); 7 Feb 2020 17:58:50 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 22660 invoked by uid 89); 7 Feb 2020 17:58:49 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-5.2 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: simark.ca Received: from simark.ca (HELO simark.ca) (158.69.221.121) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 07 Feb 2020 17:58:48 +0000 Received: from [172.16.0.95] (192-222-181-218.qc.cable.ebox.net [192.222.181.218]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by simark.ca (Postfix) with ESMTPSA id 8F0FF1E47D; Fri, 7 Feb 2020 12:58:46 -0500 (EST) Subject: Re: [PATCH] gdb: Allow more control over where to find python libraries To: Andrew Burgess , gdb-patches@sourceware.org Cc: Richard Bunt References: <20200206164617.7461-1-andrew.burgess@embecosm.com> From: Simon Marchi Message-ID: <7cbcb092-3a66-32d5-f09d-2a90443a1cc4@simark.ca> Date: Fri, 07 Feb 2020 17:58:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 MIME-Version: 1.0 In-Reply-To: <20200206164617.7461-1-andrew.burgess@embecosm.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-SW-Source: 2020-02/txt/msg00178.txt.bz2 On 2020-02-06 11:46 a.m., Andrew Burgess wrote: > The motivation behind this commit is to make it easier to bundle the > Python libraries with GDB when linking GDB against a static > libpython, the Python libraries will be manually added into the GDB > installation tree, and GDB should be able to find them at run-time. > The installation tree will look like this: > > . > |-- bin/ > |-- include/ > |-- lib/ > | `-- python3.8/ > `-- share/ > > The benefit here is that the entire installation tree can be bundled > into a single archive and copied to another machine with a different > version of Python installed, and GDB will still work, including its > Python support. For those who might be wondering, like me: isn't the goal of linking statically with the lib to avoid having an external library? This patch actually deals with finding the .py files provided by the Python standard library, not the native code. The native code is indeed linked statically inside the gdb executable. I won't pretend to understand in details what's happening with the Python detection in configure (I find it's quite messy), but I didn't spot anything wrong with your patch, and it seems to address a valid use case, so I'm not against it. Simon