From patchwork Mon Mar 23 06:46:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramon Fried X-Patchwork-Id: 1259866 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=JgWlrb1o; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48m4fl0Zdgz9sQt for ; Mon, 23 Mar 2020 17:46:36 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2FF4D86837; Mon, 23 Mar 2020 06:46:33 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kRh1SrRa7rwb; Mon, 23 Mar 2020 06:46:31 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 5D9D987D8B; Mon, 23 Mar 2020 06:46:31 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id E7A1C1BF3BC for ; Mon, 23 Mar 2020 06:46:30 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E487088409 for ; Mon, 23 Mar 2020 06:46:30 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nWt5QQg2sLVF for ; Mon, 23 Mar 2020 06:46:30 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f48.google.com (mail-wm1-f48.google.com [209.85.128.48]) by hemlock.osuosl.org (Postfix) with ESMTPS id 12A2B883F6 for ; Mon, 23 Mar 2020 06:46:30 +0000 (UTC) Received: by mail-wm1-f48.google.com with SMTP id l20so13395179wmi.3 for ; Sun, 22 Mar 2020 23:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J1oLgTUY1OHGxD7B3/m2rAOsYIoUHxbesdqzWhNHAJg=; b=JgWlrb1oOJCJSR3YEf3YY8plKmHzCk0/vSnbD6nnBhcogeOIupVFBSB72n1mOh71GI b4nQgWqaG+ZqOj4FawX2mOS20e0fHIqYzMoBsYNTHOe2b0ih/Drh7yqsMU5scpktqA8S aJDl360S4hGDfPFmXODSjPHPBQYkO5FD9zYCIiQ/05gx+6bwmx0sgHcz1fU26/fCmdZG uyyFc5LugGIsHpAYEP3vhWbeK5vlvfEDYeNACDGsN4R/6GVB7WHDHnW4Jbjeat0Ax85R PQ65Q5jIpZ7rbZesdidS+LIHqinXrjeEleQTU2EV3Z2L7VFTG808dIWhlfRBpWmi0Vts DHjA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=J1oLgTUY1OHGxD7B3/m2rAOsYIoUHxbesdqzWhNHAJg=; b=MR8kbtZDL0mdlT6IUvEIApCKaHPmHoJXw8UBXYoLV8q7zNIFybmiq4teponiN+f5eK WRwvYPkB/wheCNFbG6J8CYAhzyx0/8/r84j5UbOrPi9KV0jy6jCJOUVv5mrX8hOZaR3x IEEh2XDO44tanDbJ99NezhaAeH0I0KgcRLqs8wijnl9uJnlG4n1ZNcUXRDcqPx2gnneS F9yr/N2MYBX9e9N6ZxvwtTGpVTZyH+xnC/CHXHcmUMVRTFefvs+O8zfZDaKcUVhzGhuT 9hQtQ2txAB/diU4G0FKc3KXQnvi9q0FO5IhT3dFjupw56/K/FStm5KPP7oVQPygSi225 ZriQ== X-Gm-Message-State: ANhLgQ2k+TPQaUpQtFR5WhcdVVCdY5TosdfQMsrHs/vsGG33mdYDcTBc OkWJSBqqwc1+yI5sbWE/OGrSbR+p9jo= X-Google-Smtp-Source: ADFU+vvwp+Mt+hVqAWNPOwoFc0w73ub+g6G7IZhCQLy/K8Euz3+dxd7RPpZJ1oz+MlHsaZI/vyO0Ww== X-Received: by 2002:a05:600c:24c:: with SMTP id 12mr25353774wmj.119.1584945988117; Sun, 22 Mar 2020 23:46:28 -0700 (PDT) Received: from localhost.localdomain ([2a00:a040:198:f262:380f:56ad:9daf:2ba4]) by smtp.gmail.com with ESMTPSA id c18sm20616799wrx.5.2020.03.22.23.46.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 22 Mar 2020 23:46:27 -0700 (PDT) From: Ramon Fried To: buildroot@uclibc.org Date: Mon, 23 Mar 2020 08:46:21 +0200 Message-Id: <20200323064621.205273-1-rfried.dev@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2] package/gdb: Add support for host-gdb with python3 X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ramon Fried Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" host-gdb was limited to link only with Python 2 although it's possible to build Python 3 for host. Add the ability to link with Python 3. Signed-off-by: Ramon Fried --- v2: Add choice menu for mutaly exclusive selection of Python3/2 as suggested by Romain package/gdb/Config.in.host | 16 ++++++++++++++-- package/gdb/gdb.mk | 3 +++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/package/gdb/Config.in.host b/package/gdb/Config.in.host index 5315f10493..e5e8fae5eb 100644 --- a/package/gdb/Config.in.host +++ b/package/gdb/Config.in.host @@ -32,10 +32,22 @@ config BR2_PACKAGE_HOST_GDB_TUI help This option enables terminal user interface (TUI) for gdb +choice + prompt "Python support" + help + Select the version of Python you wish to use + config BR2_PACKAGE_HOST_GDB_PYTHON - bool "Python support" + bool "Python 2 support" help - This option enables the Python support in the cross gdb. + This option enables the Python 2 support in the cross gdb. + +config BR2_PACKAGE_HOST_GDB_PYTHON3 + bool "Python 3 support" + help + This option enables the Python 3 support in the cross gdb. + +endchoice config BR2_PACKAGE_HOST_GDB_SIM bool "Simulator support" diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index 01f7e14460..8c74a0e2f6 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -238,6 +238,9 @@ endif ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON),y) HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python2 HOST_GDB_DEPENDENCIES += host-python +else ifeq ($(BR2_PACKAGE_HOST_GDB_PYTHON3),y) +HOST_GDB_CONF_OPTS += --with-python=$(HOST_DIR)/bin/python3 +HOST_GDB_DEPENDENCIES += host-python3 else HOST_GDB_CONF_OPTS += --without-python endif