From patchwork Tue Nov 15 15:21:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Zakharov Vlad X-Patchwork-Id: 695061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3tJB250fkzz9s9c for ; Wed, 16 Nov 2016 02:21:48 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 130FAC1B4F; Tue, 15 Nov 2016 15:21:46 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bAUNLOTgHihD; Tue, 15 Nov 2016 15:21:44 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 98132C1B58; Tue, 15 Nov 2016 15:21:44 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 557041CE76F for ; Tue, 15 Nov 2016 15:21:43 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 509518951E for ; Tue, 15 Nov 2016 15:21:43 +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 3cf5Ox67z5DF for ; Tue, 15 Nov 2016 15:21:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from smtprelay.synopsys.com (smtprelay.synopsys.com [198.182.60.111]) by whitealder.osuosl.org (Postfix) with ESMTPS id CC65F8A05A for ; Tue, 15 Nov 2016 15:21:41 +0000 (UTC) Received: from mailhost.synopsys.com (mailhost1.synopsys.com [10.12.238.239]) by smtprelay.synopsys.com (Postfix) with ESMTP id 010EA10C13AE; Tue, 15 Nov 2016 07:21:41 -0800 (PST) Received: from mailhost.synopsys.com (localhost [127.0.0.1]) by mailhost.synopsys.com (Postfix) with ESMTP id DFCD9BF1; Tue, 15 Nov 2016 07:21:40 -0800 (PST) Received: from ru20arcgnu1.internal.synopsys.com (ru20arcgnu1.internal.synopsys.com [10.121.9.48]) by mailhost.synopsys.com (Postfix) with ESMTP id 3B3B0BE6; Tue, 15 Nov 2016 07:21:39 -0800 (PST) From: Vlad Zakharov To: buildroot@busybox.net Date: Tue, 15 Nov 2016 18:21:31 +0300 Message-Id: <1479223291-5657-1-git-send-email-vzakhar@synopsys.com> X-Mailer: git-send-email 2.6.3 Cc: Thomas Petazzoni , Vlad Zakharov , Alexey Brodkin , Eugeniy Paltsev Subject: [Buildroot] [PATCH] gdb: arc: remove C++ dependency and disable build with C++ X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 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" gdb arc-2016.09-rc1 is based on upstream 7.12 gdb version where we can still disable C++ build. For more information take a look at: https://sourceware.org/gdb/wiki/cxx-conversion We wanted to build gdb with C++ as it is used as default in 7.12 and is even a mandatory requirement since 2016/09. But unfortunately we missed one runtime failure that C++ build causes and so no we have to disable C++ build. When gdb arc-2016.09-rc1 is built as C++ application it segfaults at runtime for ARC. We are going to fix the issue in 2017.03 ARC toolchain release. and before this we remove C++ dependency are adding temporary workaround to prevent runtime segfaults. The workaround is to disable building gdb as C++ application via passing --disable-build-with-cxx config option when building gdb for arc. Signed-off-by: Vlad Zakharov --- package/gdb/Config.in | 6 ------ package/gdb/gdb.mk | 7 +++++++ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/package/gdb/Config.in b/package/gdb/Config.in index 0c6966a..809e02d 100644 --- a/package/gdb/Config.in +++ b/package/gdb/Config.in @@ -2,10 +2,6 @@ comment "gdb/gdbserver needs a toolchain w/ threads, threads debug" depends on !BR2_nios2 && !BR2_bfin depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_HAS_THREADS_DEBUG -comment "gdb/gdbserver needs a toolchain w/ C++" - depends on BR2_arc - depends on !BR2_INSTALL_LIBSTDCPP - config BR2_PACKAGE_GDB bool "gdb" # When the external toolchain gdbserver is copied to the @@ -15,8 +11,6 @@ config BR2_PACKAGE_GDB (!BR2_PACKAGE_GDB_DEBUGGER && !BR2_TOOLCHAIN_EXTERNAL_GDB_SERVER_COPY) depends on BR2_TOOLCHAIN_HAS_THREADS && BR2_TOOLCHAIN_HAS_THREADS_DEBUG depends on !BR2_nios2 && !BR2_bfin - # Since ARC gdb moved to 7.12 toolchain requires C++ support to build gdb. - depends on !BR2_arc || BR2_INSTALL_LIBSTDCPP help GDB, the GNU Project debugger, allows you to see what is going on `inside' another program while it executes -- or diff --git a/package/gdb/gdb.mk b/package/gdb/gdb.mk index ccf9e49..ea27d0c 100644 --- a/package/gdb/gdb.mk +++ b/package/gdb/gdb.mk @@ -100,6 +100,13 @@ GDB_CONF_OPTS = \ --disable-werror \ --enable-static +# When gdb is built as C++ application for ARC it segfaults at runtime +# So we pass --disable-build-with-cxx config option to force gdb not to +# be built as C++ app. +ifeq ($(BR2_arc),y) +GDB_CONF_OPTS += --disable-build-with-cxx +endif + ifeq ($(BR2_PACKAGE_GDB_TUI),y) GDB_CONF_OPTS += --enable-tui else