From patchwork Sun Apr 7 10:04:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Petazzoni X-Patchwork-Id: 234470 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 0E5302C0099 for ; Sun, 7 Apr 2013 20:06:38 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5AB7B8BCCF; Sun, 7 Apr 2013 10:06:35 +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 Y8oCZgj99lou; Sun, 7 Apr 2013 10:06:25 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id F35788B3BC; Sun, 7 Apr 2013 10:05:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 96A548F753 for ; Sun, 7 Apr 2013 10:05:17 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B2D7E8BB72 for ; Sun, 7 Apr 2013 10:05:09 +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 G-3VqYYGTnRV for ; Sun, 7 Apr 2013 10:05:06 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.free-electrons.com (mail.free-electrons.com [94.23.35.102]) by whitealder.osuosl.org (Postfix) with ESMTP id 176798B3BC for ; Sun, 7 Apr 2013 10:05:06 +0000 (UTC) Received: by mail.free-electrons.com (Postfix, from userid 106) id E203E865; Sun, 7 Apr 2013 12:05:05 +0200 (CEST) Received: from localhost (humanoidz.org [82.247.183.72]) by mail.free-electrons.com (Postfix) with ESMTPSA id F20D3E04 for ; Sun, 7 Apr 2013 12:04:52 +0200 (CEST) From: Thomas Petazzoni To: buildroot@uclibc.org Date: Sun, 7 Apr 2013 12:04:35 +0200 Message-Id: <1365329076-19853-4-git-send-email-thomas.petazzoni@free-electrons.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1365329076-19853-1-git-send-email-thomas.petazzoni@free-electrons.com> References: <1365329076-19853-1-git-send-email-thomas.petazzoni@free-electrons.com> Subject: [Buildroot] [PATCHv4 3/4] gdb: install gdbserver into the SDK X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net In order for a Buildroot toolchain to be usable as an external toolchain, we should copy the target gdbserver somewhere into $(HOST_DIR). In order to match what Crosstool-NG does (and therefore to match something the external toolchain logic already understands), we install gdbserver in $(HOST_DIR)/usr//debug-root/usr/bin/gdbserver. Signed-off-by: Thomas Petazzoni --- This replaces http://patchwork.ozlabs.org/patch/229438/ --- package/gdb/gdb.mk | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index 24ce9bf..cec64d5 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -78,6 +78,20 @@ endef GDB_POST_INSTALL_TARGET_HOOKS += GDB_REMOVE_UNNEEDED_FILES +# This installs the gdbserver somewhere into the $(HOST_DIR) so that +# it becomes an integral part of the SDK, if the toolchain generated +# by Buildroot is later used as an external toolchain. We install it +# in debug-root/usr/bin/gdbserver so that it matches what Crosstool-NG +# does. +define GDB_SDK_INSTALL_GDBSERVER + $(INSTALL) -D -m 0755 $(TARGET_DIR)/usr/bin/gdbserver \ + $(HOST_DIR)/usr/$(GNU_TARGET_NAME)/debug-root/usr/bin/gdbserver +endef + +ifeq ($(BR2_PACKAGE_GDB_SERVER),y) +GDB_POST_INSTALL_TARGET_HOOKS += GDB_SDK_INSTALL_GDBSERVER +endif + # A few notes: # * --target, because we're doing a cross build rather than a real # host build.