From patchwork Thu Sep 20 15:22:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thierry Bultel X-Patchwork-Id: 185422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 642732C009E for ; Fri, 21 Sep 2012 01:22:40 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2343AA020F; Thu, 20 Sep 2012 15:22:39 +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 9sDHE2p9LXuy; Thu, 20 Sep 2012 15:22:35 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id E462AA03FB; Thu, 20 Sep 2012 15:22:34 +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 93DBE8F74A for ; Thu, 20 Sep 2012 15:22:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id EB9BB8D05B for ; Thu, 20 Sep 2012 15:22:32 +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 qkqRuyBdEM5t for ; Thu, 20 Sep 2012 15:22:31 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtp.smtpout.orange.fr (smtp03.smtpout.orange.fr [80.12.242.125]) by whitealder.osuosl.org (Postfix) with ESMTP id 5C64A8CEB1 for ; Thu, 20 Sep 2012 15:22:29 +0000 (UTC) Received: from [192.168.0.5] ([109.218.142.2]) by mwinf5d38 with ME id 1TNR1k00N03JhEM03TNRaL; Thu, 20 Sep 2012 17:22:28 +0200 Message-ID: <505B34B5.2050503@wanadoo.fr> Date: Thu, 20 Sep 2012 17:22:29 +0200 From: Thierry Bultel User-Agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0 MIME-Version: 1.0 To: Thomas Petazzoni References: <505A397B.80404@mind.be> <20120920144226.70dd0e27@skate> In-Reply-To: <20120920144226.70dd0e27@skate> Cc: "buildroot@busybox.net" Subject: [Buildroot] [PATCH] Enables thread debugging with full gdb on target 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net The libthread_db was not copied on target GDB needs libpthread to be not stripped Signed-off-by: Thierry Bultel diff -Naur buildroot-2012.08.orig/Makefile buildroot-2012.08/Makefile --- buildroot-2012.08.orig/Makefile 2012-08-31 10:49:41.000000000 +0200 +++ buildroot-2012.08/Makefile 2012-09-20 16:42:11.938021804 +0200 @@ -416,6 +416,10 @@ $(TARGET_DIR): $(BUILD_DIR)/.root +ifeq ($(BR2_PACKAGE_GDB),y) +BR2_STRIP_EXCLUDE_FILES += libpthread*.so* +endif + STRIP_FIND_CMD = find $(TARGET_DIR) ifneq (,$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) STRIP_FIND_CMD += \( $(call finddirclauses,$(TARGET_DIR),$(call qstrip,$(BR2_STRIP_EXCLUDE_DIRS))) \) -prune -o diff -Naur buildroot-2012.08.orig/toolchain/toolchain-crosstool-ng/crosstool-ng.mk buildroot-2012.08/toolchain/toolchain-crosstool-ng/crosstool-ng.mk --- buildroot-2012.08.orig/toolchain/toolchain-crosstool-ng/crosstool-ng.mk 2012-08-31 10:49:41.000000000 +0200 +++ buildroot-2012.08/toolchain/toolchain-crosstool-ng/crosstool-ng.mk 2012-09-20 16:41:46.741771907 +0200 @@ -41,6 +41,18 @@ CTNG_LIBS_LIB := ld*.so libc.so libcrypt.so libdl.so libgcc_s.so libm.so \ libnsl.so libpthread.so libresolv.so librt.so libutil.so +ifeq ($(BR2_PACKAGE_GDB_SERVER),y) +CTNG_LIBS_LIB_THREAD_DB_NEEDED := y +endif + +ifeq ($(BR2_PACKAGE_GDB),y) +CTNG_LIBS_LIB_THREAD_DB_NEEDED := y +endif + +ifeq ($(CTNG_LIBS_LIB_THREAD_DB_NEEDED),y) +CTNG_LIBS_LIB += libthread_db.so +endif + #-------------- # The libc-specific system libraries (in /lib) # Note: it may be needed to tweak the NSS libs in the glibc and eglibc cases...