* [Buildroot] [PATCH] gdb: arc: remove C++ dependency and disable build with C++
@ 2016-11-15 15:21 Vlad Zakharov
2016-11-15 22:22 ` Thomas Petazzoni
0 siblings, 1 reply; 2+ messages in thread
From: Vlad Zakharov @ 2016-11-15 15:21 UTC (permalink / raw)
To: 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 <vzakhar@synopsys.com>
---
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
--
2.6.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH] gdb: arc: remove C++ dependency and disable build with C++
2016-11-15 15:21 [Buildroot] [PATCH] gdb: arc: remove C++ dependency and disable build with C++ Vlad Zakharov
@ 2016-11-15 22:22 ` Thomas Petazzoni
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Petazzoni @ 2016-11-15 22:22 UTC (permalink / raw)
To: buildroot
Hello,
On Tue, 15 Nov 2016 18:21:31 +0300, Vlad Zakharov wrote:
> 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 <vzakhar@synopsys.com>
> ---
> package/gdb/Config.in | 6 ------
> package/gdb/gdb.mk | 7 +++++++
> 2 files changed, 7 insertions(+), 6 deletions(-)
Applied to master, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-11-15 22:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-11-15 15:21 [Buildroot] [PATCH] gdb: arc: remove C++ dependency and disable build with C++ Vlad Zakharov
2016-11-15 22:22 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.