aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2021-04-12 18:33:45 +0930
committerAlan Modra <amodra@gmail.com>2021-04-13 00:35:44 +0930
commit43e05cd4f48b550023819d823fec02abf54e26d3 (patch)
tree8db8be01bef7bae060fcfef55b7d6d0843731274 /binutils
parent04977957ecfc723bc4f57460e8e4eed7e6b69f32 (diff)
downloadgdb-43e05cd4f48b550023819d823fec02abf54e26d3.zip
gdb-43e05cd4f48b550023819d823fec02abf54e26d3.tar.gz
gdb-43e05cd4f48b550023819d823fec02abf54e26d3.tar.bz2
ENABLE_CHECKING in bfd, opcodes, binutils, ld
gas already has this. Here it enables checking hash table type passed to elf_link_hash_lookup and elf_link_hash_traverse. bfd/ * elf-bfd.h (ENABLE_CHECKING): Define. (elf_link_hash_lookup): Abort if wrong type of hash table. (elf_link_hash_traverse): Likewise. * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate. binutils/ * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate. ld/ * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate. opcodes/ * configure.ac (--enable-checking): Add support. * config.in: Regenerate. * configure: Regenerate.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/config.in3
-rwxr-xr-xbinutils/configure22
-rw-r--r--binutils/configure.ac13
4 files changed, 42 insertions, 2 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 9e88373..1dbb038 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2021-04-12 Alan Modra <amodra@gmail.com>
+
+ * configure.ac (--enable-checking): Add support.
+ * config.in: Regenerate.
+ * configure: Regenerate.
+
2021-04-09 Alan Modra <amodra@gmail.com>
* objdump.c (struct objdump_disasm_info): Delete dynrelbuf and
diff --git a/binutils/config.in b/binutils/config.in
index 78b8a51..cc6aad1 100644
--- a/binutils/config.in
+++ b/binutils/config.in
@@ -19,6 +19,9 @@
/* Should strings use -a behavior by default? */
#undef DEFAULT_STRINGS_ALL
+/* Define if you want run-time sanity checks. */
+#undef ENABLE_CHECKING
+
/* Handle .ctf type-info sections */
#undef ENABLE_LIBCTF
diff --git a/binutils/configure b/binutils/configure
index 9958379..938ef48 100755
--- a/binutils/configure
+++ b/binutils/configure
@@ -817,6 +817,7 @@ with_gnu_ld
enable_libtool_lock
enable_plugins
enable_largefile
+enable_checking
enable_targets
enable_deterministic_archives
enable_default_strings_all
@@ -1481,6 +1482,7 @@ Optional Features:
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-plugins Enable support for plugins
--disable-largefile omit support for large files
+ --enable-checking enable run-time checks
--enable-targets alternative target configurations
--enable-deterministic-archives
ar and ranlib default to -D behavior
@@ -10872,7 +10874,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10875 "configure"
+#line 10877 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -10978,7 +10980,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 10981 "configure"
+#line 10983 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11583,6 +11585,22 @@ fi
+ac_checking=
+. ${srcdir}/../bfd/development.sh
+test "$development" = true && ac_checking=yes
+# Check whether --enable-checking was given.
+if test "${enable_checking+set}" = set; then :
+ enableval=$enable_checking; case "${enableval}" in
+ no|none) ac_checking= ;;
+ *) ac_checking=yes ;;
+esac
+fi
+if test x$ac_checking != x ; then
+
+$as_echo "#define ENABLE_CHECKING 1" >>confdefs.h
+
+fi
+
# Check whether --enable-targets was given.
if test "${enable_targets+set}" = set; then :
enableval=$enable_targets; case "${enableval}" in
diff --git a/binutils/configure.ac b/binutils/configure.ac
index ad6d2aa..2553b80 100644
--- a/binutils/configure.ac
+++ b/binutils/configure.ac
@@ -33,6 +33,19 @@ AC_USE_SYSTEM_EXTENSIONS
LT_INIT
ACX_LARGEFILE
+ac_checking=
+. ${srcdir}/../bfd/development.sh
+test "$development" = true && ac_checking=yes
+AC_ARG_ENABLE(checking,
+[ --enable-checking enable run-time checks],
+[case "${enableval}" in
+ no|none) ac_checking= ;;
+ *) ac_checking=yes ;;
+esac])dnl
+if test x$ac_checking != x ; then
+ AC_DEFINE(ENABLE_CHECKING, 1, [Define if you want run-time sanity checks.])
+fi
+
AC_ARG_ENABLE(targets,
[ --enable-targets alternative target configurations],
[case "${enableval}" in