From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 114259 invoked by alias); 8 Feb 2020 00:22:31 -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 114249 invoked by uid 89); 8 Feb 2020 00:22:30 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy= X-HELO: mail-wm1-f68.google.com Received: from mail-wm1-f68.google.com (HELO mail-wm1-f68.google.com) (209.85.128.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 08 Feb 2020 00:22:29 +0000 Received: by mail-wm1-f68.google.com with SMTP id a5so4281660wmb.0 for ; Fri, 07 Feb 2020 16:22:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=yaTdz0ly1+K8eQx6ixAe3zmayFDF75uctA28jrLhLBc=; b=Nx5/9yVP3wrVWPwNDx3atYw/Nk4VlIOM/36tXT8PNo9fNCvjmn5RX4c7rVuhB7Wqwe eq+6BNzylM2Y9r/J4C7diNGPEo3+TdGdCvFFHFlOoVbu9MN7QQbiApea3NfG9dCDBaWn Sy70ROGzrCX9FJe79ok7vGJ9adFruRfZV91PO0YZxe3mA1QjFw5bi6il+bBMqrhR9pC1 U2cW6xaXbpT6bE9GDU+VovzUHcQQZnJSVwGamVdBA6zr9RD5dCkI789dg/WTQPhXclBi ORlYnso6lrEs5ddn6T4BVX9ZiG8BZ9LnbbN/CoRvKyxOqyTrz+SLflFleAHuuchttUjl I7Ng== Return-Path: Received: from localhost (host86-191-239-73.range86-191.btcentralplus.com. [86.191.239.73]) by smtp.gmail.com with ESMTPSA id n8sm5272982wrx.42.2020.02.07.16.22.26 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Feb 2020 16:22:26 -0800 (PST) Date: Sat, 08 Feb 2020 00:22:00 -0000 From: Andrew Burgess To: Simon Marchi Cc: gdb-patches@sourceware.org, Richard Bunt Subject: Re: [PATCH] gdb: Allow more control over where to find python libraries Message-ID: <20200208002226.GK4020@embecosm.com> References: <20200206164617.7461-1-andrew.burgess@embecosm.com> <7cbcb092-3a66-32d5-f09d-2a90443a1cc4@simark.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <7cbcb092-3a66-32d5-f09d-2a90443a1cc4@simark.ca> X-Fortune: Necessity is a mother. X-Editor: GNU Emacs [ http://www.gnu.org/software/emacs ] User-Agent: Mutt/1.9.2 (2017-12-15) X-IsSubscribed: yes X-SW-Source: 2020-02/txt/msg00201.txt.bz2 * Simon Marchi [2020-02-07 12:58:46 -0500]: > 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. Yes, this is it exactly. I will rewrite the commit message to say '.py files' instead as that's much clearer. Thanks, Andrew > > 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