From 2d681be471cf8aff8f296cb7713c39e9aa4fc2bb Mon Sep 17 00:00:00 2001 From: Andreas Arnez Date: Wed, 27 Apr 2016 15:52:16 +0200 Subject: [PATCH] Avoid non-C++-enabled babeltrace versions In some babeltrace versions before 1.2.0, the header file iterator.h declares the enum values `BT_SEEK_*' within the struct declaration of bt_iter_pos. The enum values are supposed to be globally-scoped, which works for C, but not for C++. Later babeltrace versions declare the enum outside the struct: https://lists.lttng.org/pipermail/lttng-dev/2013-September/021411.html Now that GDB is compiled with C++, the GDB build fails on a system with an affected babeltrace version: the compiler complains about a missing declaration of BT_SEEK_BEGIN in ctf.c. This patch enhances the configure check to recognize such babeltrace versions as unusable for GDB. gdb/ChangeLog: * configure.ac: Enhance configure check for babeltrace to reject non-C++-enabled versions. * configure: Regenerate. --- gdb/ChangeLog | 6 ++++++ gdb/configure | 1 + gdb/configure.ac | 1 + 3 files changed, 8 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 1335563fae6..df10de45abd 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,9 @@ +2016-04-27 Andreas Arnez + + * configure.ac: Enhance configure check for babeltrace to reject + non-C++-enabled versions. + * configure: Regenerate. + 2016-04-26 Sanimir Agovic Keven Boell Bernhard Heckel diff --git a/gdb/configure b/gdb/configure index 3cf95e76998..228cb99a77e 100755 --- a/gdb/configure +++ b/gdb/configure @@ -16390,6 +16390,7 @@ struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); struct bt_ctf_event *event = NULL; const struct bt_definition *scope; + pos.type = BT_SEEK_BEGIN; bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); scope = bt_ctf_get_top_level_scope (event, BT_STREAM_EVENT_HEADER); diff --git a/gdb/configure.ac b/gdb/configure.ac index 70452d3ff05..3aa132aea41 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -2286,6 +2286,7 @@ else struct bt_ctf_event *event = NULL; const struct bt_definition *scope; + pos.type = BT_SEEK_BEGIN; bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); scope = bt_ctf_get_top_level_scope (event, BT_STREAM_EVENT_HEADER); -- 2.30.2