From patchwork Mon Jan 20 12:02:49 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?5YKF57un5pmX?= X-Patchwork-Id: 37443 Received: (qmail 69565 invoked by alias); 20 Jan 2020 12:03:13 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 69557 invoked by uid 89); 20 Jan 2020 12:03:12 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-11.1 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT, FREEMAIL_FROM, GIT_PATCH_2, GIT_PATCH_3, HTML_MESSAGE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.1 spammy=holiday, HX-HELO:sk:mail-ed, sk:python, sk:python- X-HELO: mail-ed1-f52.google.com Received: from mail-ed1-f52.google.com (HELO mail-ed1-f52.google.com) (209.85.208.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Jan 2020 12:03:02 +0000 Received: by mail-ed1-f52.google.com with SMTP id j17so29230510edp.3 for ; Mon, 20 Jan 2020 04:03:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=eUdI8x9PtTudULwOjPodIfnBOMwaZggh8mRXVo69E1U=; b=mfH5qgOlbs3d5e5Myy7CDeWHiZO/LNgCUD/izavEsChh0tpGGedSV2Zdu+n9/zRc+c mHDfxp+MOkcIqgAfjNiw01DQRyyJl+FANjHyfBksvQeWSvl02XJdQZcIeEzlv/aA4A79 cpjxwK+DVIjxLA3ASerCtqi4Gnziwbms8Pjn5KPcc4+L+bCFEThcaangQFH6VkbCRMgN GK+JQoJTWOjHWRqZNwA6qGWZm3ao0aRjnZdcVVm3QWadeXnYoe2I27urP6Hxx3PJcebW /BXS/5BXTv4Sgb6xx3HngTxPkHHy+ULnZ5A5StNblNxk85fyUoC1HA1BN5lq7DA/nSbf +JPw== MIME-Version: 1.0 From: =?UTF-8?B?5YKF57un5pmX?= Date: Mon, 20 Jan 2020 20:02:49 +0800 Message-ID: Subject: [PATCH] Modify python-config.py or replace it with official one to support python3 To: gdb-patches@sourceware.org Cc: dje@google.com By default,gdb is compiled with python2 script support on OSX. However,when compiled with arg "--with-python=/path/to/python3 " to support python3 ,some error occurred that seems python3 is not recognized. The reason is that the python-config.py is not the same as the official one.BTW,this issue was once referred at 20 Dec 2012 mail : https://sourceware.org/ml/gdb-patches/2012-12/msg00751.html. Somehow,It is not committed(maybe the maintainer forgot it due to the happy chrismas holiday). And here is my patch: index: b/gdb/python/python-config.py =============================== --- a/gdb/python/python-config.py +++ b/gdb/python/python-config.py @@ -72,7 +72,7 @@ for opt in opt_flags: libs.insert(0, '-L' + getvar('LIBPL')) elif os.name == 'nt': libs.insert(0, '-L' + sysconfig.PREFIX + '/libs') - if getvar('LINKFORSHARED') is not None: + if not getvar('PYTHONFRAMEWORK'): libs.extend(getvar('LINKFORSHARED').split()) print (to_unix_path(' '.join(libs)))