gdb: include --enable-targets in 'show configuration' output
Checks
Context |
Check |
Description |
linaro-tcwg-bot/tcwg_gdb_build--master-aarch64 |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_build--master-arm |
success
|
Build passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-arm |
success
|
Test passed
|
linaro-tcwg-bot/tcwg_gdb_check--master-aarch64 |
success
|
Test passed
|
Commit Message
Include the value of configuration flag --enable-targets in the output
of GDB command 'show configuration' and also in the output printed for
'gdb --configuration'. This will make it easier to see how GDB was
built.
No tests added or updated as we can't really check for a specific flag
appearing or not appearing on the configuration output. But we do
print the configuration within lib/gdb.exp to check which features are
built into GDB, so if this change broke configuration printing then
plenty of tests should stop working (they don't).
---
gdb/config.in | 3 +++
gdb/configure | 10 +++++++++-
gdb/configure.ac | 7 ++++++-
gdb/top.c | 5 +++++
4 files changed, 23 insertions(+), 2 deletions(-)
base-commit: bcb92f7ba7b22ac882c000cabfd7ca8bea47c184
Comments
>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
Andrew> Include the value of configuration flag --enable-targets in the output
Andrew> of GDB command 'show configuration' and also in the output printed for
Andrew> 'gdb --configuration'. This will make it easier to see how GDB was
Andrew> built.
Andrew> No tests added or updated as we can't really check for a specific flag
Andrew> appearing or not appearing on the configuration output. But we do
Andrew> print the configuration within lib/gdb.exp to check which features are
Andrew> built into GDB, so if this change broke configuration printing then
Andrew> plenty of tests should stop working (they don't).
Seems reasonable to me.
Approved-By: Tom Tromey <tom@tromey.com>
Tom
Tom Tromey <tom@tromey.com> writes:
>>>>>> "Andrew" == Andrew Burgess <aburgess@redhat.com> writes:
>
> Andrew> Include the value of configuration flag --enable-targets in the output
> Andrew> of GDB command 'show configuration' and also in the output printed for
> Andrew> 'gdb --configuration'. This will make it easier to see how GDB was
> Andrew> built.
>
> Andrew> No tests added or updated as we can't really check for a specific flag
> Andrew> appearing or not appearing on the configuration output. But we do
> Andrew> print the configuration within lib/gdb.exp to check which features are
> Andrew> built into GDB, so if this change broke configuration printing then
> Andrew> plenty of tests should stop working (they don't).
>
> Seems reasonable to me.
> Approved-By: Tom Tromey <tom@tromey.com>
Pushed.
Thanks,
Andrew
@@ -46,6 +46,9 @@
language is requested. */
#undef ENABLE_NLS
+/* Additional targets configured into GDB. */
+#undef ENABLE_TARGETS
+
/* The .gdbearlyinit filename. */
#undef GDBEARLYINIT
@@ -24828,11 +24828,19 @@ if test "${enable_targets+set}" = set; then :
yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
;;
no) enable_targets= ;;
- *) enable_targets=$enableval ;;
+ *)
+ enable_targets=$enableval
+
+cat >>confdefs.h <<_ACEOF
+#define ENABLE_TARGETS "$enable_targets"
+_ACEOF
+
+ ;;
esac
fi
+
# Check whether --enable-64-bit-bfd was given.
if test "${enable_64_bit_bfd+set}" = set; then :
enableval=$enable_64_bit_bfd; case $enableval in #(
@@ -184,9 +184,14 @@ AS_HELP_STRING([--enable-targets=TARGETS], [alternative target configurations]),
yes | "") AC_MSG_ERROR(enable-targets option must specify target names or 'all')
;;
no) enable_targets= ;;
- *) enable_targets=$enableval ;;
+ *)
+ enable_targets=$enableval
+ AC_DEFINE_UNQUOTED(ENABLE_TARGETS, "$enable_targets",
+ Additional targets configured into GDB. )
+ ;;
esac])
+
BFD_64_BIT
# Provide defaults for some variables set by the per-host and per-target
@@ -1379,6 +1379,11 @@ This GDB was configured as follows:\n\
configure --host=%s --target=%s\n\
"), host_name, target_name);
+#ifdef ENABLE_TARGETS
+ gdb_printf (stream, _("\
+ --enable-targets=%s\n"), ENABLE_TARGETS);
+#endif
+
gdb_printf (stream, _("\
--with-auto-load-dir=%s\n\
--with-auto-load-safe-path=%s\n\