]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/selftest.m4: ensure $development is set
authorSimon Marchi <simon.marchi@efficios.com>
Thu, 12 Mar 2020 18:12:36 +0000 (14:12 -0400)
committerSimon Marchi <simon.marchi@efficios.com>
Thu, 12 Mar 2020 18:17:57 +0000 (14:17 -0400)
Before commit 3d1e5a43cbe ("gdbsupport/configure.ac: source
development.sh"), the GDB build in non-development mode (turn
development to false in bfd/development.sh if you want to try) was
broken because the gdbsupport configure script didn't source
bfd/development.sh to set the development variable.

Since the GDB_AC_SELFTEST macro relies on the `development` variable, I
propose to modify it such that it errors out if $development does not
have an expected value of "true" or "false".  This could prevent a
future similar problem from happening while refactoring the configure
scripts.  It would have caught the problem fixed by the patch mentioned
earlier.

gdb/ChangeLog:

* selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
not "true" or "false".
* configure: Re-generate.

gdbserver/ChangeLog:

* configure: Re-generate.

gdbsupport/ChangeLog:

* configure: Re-generate.

gdb/ChangeLog
gdb/configure
gdb/selftest.m4
gdbserver/ChangeLog
gdbserver/configure
gdbsupport/ChangeLog
gdbsupport/configure

index 4ae6fd63102db520e6b64068b888b35612d1be5d..490d9cbae5c77767f89fff743ba333a86af47f94 100644 (file)
@@ -1,3 +1,9 @@
+2020-03-12  Simon Marchi  <simon.marchi@efficios.com>
+
+       * selftest.m4 (GDB_AC_SELFTEST): Error out if $development is
+       not "true" or "false".
+       * configure: Re-generate.
+
 2020-03-12  Christian Biesinger  <cbiesinger@google.com>
 
        * Makefile.in (HFILES_NO_SRCDIR): Add new arm-nbsd-tdep.h file.
index 47ca77f400c88b12a2b5681a4f41be129ba69df2..dd34688687edc915611902dcfd91f69834e55bdf 100755 (executable)
@@ -19187,6 +19187,11 @@ $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
 # The default value of this option changes depending whether we're on
 # development mode (in which case it's "true") or not (in which case
 # it's "false").
+
+if test "x$development" != xtrue && test "x$development" != xfalse; then :
+  as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
+fi
+
 # Check whether --enable-unit-tests was given.
 if test "${enable_unit_tests+set}" = set; then :
   enableval=$enable_unit_tests; case "${enableval}" in
index 4969de1cada9263b4c6a769861b739d4df667f26..a88aa96171cb4cee78a91ccdbd9a4b740933bc22 100644 (file)
@@ -27,6 +27,10 @@ AC_DEFUN([GDB_AC_SELFTEST],[
 # The default value of this option changes depending whether we're on
 # development mode (in which case it's "true") or not (in which case
 # it's "false").
+
+AS_IF([test "x$development" != xtrue && test "x$development" != xfalse],
+  [AC_MSG_ERROR([Invalid value for \$development, got "$development", expecting "true" or "false".])])
+
 AC_ARG_ENABLE(unit-tests,
 AS_HELP_STRING([--enable-unit-tests],
 [Enable the inclusion of unit tests when compiling GDB]),
index ef8addbfe87f1436f5d0951db03e29ffe4fdc420..94e1c040ea75dd70c0323bcc1243c688b32125d6 100644 (file)
@@ -1,3 +1,7 @@
+2020-03-12  Simon Marchi  <simon.marchi@efficios.com>
+
+       * configure: Re-generate.
+
 2020-03-11  Simon Marchi  <simon.marchi@efficios.com>
 
        * configure: Re-generate.
index 13ac7188454da109904ead5cd5b226bde7524a5d..b0a25688c75d3cb4e322c1365928cef807c8c26c 100755 (executable)
@@ -6083,6 +6083,11 @@ fi
 # The default value of this option changes depending whether we're on
 # development mode (in which case it's "true") or not (in which case
 # it's "false").
+
+if test "x$development" != xtrue && test "x$development" != xfalse; then :
+  as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
+fi
+
 # Check whether --enable-unit-tests was given.
 if test "${enable_unit_tests+set}" = set; then :
   enableval=$enable_unit_tests; case "${enableval}" in
index f9fe58a7f591c4590fed7a94159e01b31245ad34..5e4f27758dc5738123aa27505c1fb88ffb41560b 100644 (file)
@@ -1,3 +1,7 @@
+2020-03-12  Simon Marchi  <simon.marchi@efficios.com>
+
+       * configure: Re-generate.
+
 2020-03-11  Simon Marchi  <simon.marchi@efficios.com>
 
        * configure: Re-generate.
index 1b141387e5a191b1ea2406ba1a351c0a06b1d110..66dc9062045c1631e40e3a711bccade4a9d84867 100755 (executable)
@@ -10606,6 +10606,11 @@ $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
 # The default value of this option changes depending whether we're on
 # development mode (in which case it's "true") or not (in which case
 # it's "false").
+
+if test "x$development" != xtrue && test "x$development" != xfalse; then :
+  as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5
+fi
+
 # Check whether --enable-unit-tests was given.
 if test "${enable_unit_tests+set}" = set; then :
   enableval=$enable_unit_tests; case "${enableval}" in