aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2024-10-05 12:34:14 +0100
committerAndrew Burgess <aburgess@redhat.com>2024-10-08 14:19:00 +0100
commitcd5e87850f36882acaa3220207737b9ca136f3f9 (patch)
tree4d0e12aa17082f7a40b2a2eed267567111ea0544
parent16a6f7d2ee33b50f4b6c35f8932379f963bc2beb (diff)
downloadbinutils-cd5e87850f36882acaa3220207737b9ca136f3f9.zip
binutils-cd5e87850f36882acaa3220207737b9ca136f3f9.tar.gz
binutils-cd5e87850f36882acaa3220207737b9ca136f3f9.tar.bz2
gdb: include --enable-targets in 'show configuration' output
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). Approved-By: Tom Tromey <tom@tromey.com>
-rw-r--r--gdb/config.in3
-rwxr-xr-xgdb/configure10
-rw-r--r--gdb/configure.ac7
-rw-r--r--gdb/top.c5
4 files changed, 23 insertions, 2 deletions
diff --git a/gdb/config.in b/gdb/config.in
index 57be033..59a5da3 100644
--- a/gdb/config.in
+++ b/gdb/config.in
@@ -46,6 +46,9 @@
language is requested. */
#undef ENABLE_NLS
+/* Additional targets configured into GDB. */
+#undef ENABLE_TARGETS
+
/* The .gdbearlyinit filename. */
#undef GDBEARLYINIT
diff --git a/gdb/configure b/gdb/configure
index 53eaad4..ec9bbd3 100755
--- a/gdb/configure
+++ b/gdb/configure
@@ -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 #(
diff --git a/gdb/configure.ac b/gdb/configure.ac
index 8368fea..21f5dc8 100644
--- a/gdb/configure.ac
+++ b/gdb/configure.ac
@@ -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
diff --git a/gdb/top.c b/gdb/top.c
index eae54aa..d34e733 100644
--- a/gdb/top.c
+++ b/gdb/top.c
@@ -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\