diff options
Diffstat (limited to 'gdb/gdbserver')
-rw-r--r-- | gdb/gdbserver/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/gdbserver/Makefile.in | 2 | ||||
-rw-r--r-- | gdb/gdbserver/acinclude.m4 | 3 | ||||
-rwxr-xr-x | gdb/gdbserver/configure | 70 | ||||
-rw-r--r-- | gdb/gdbserver/configure.ac | 12 |
5 files changed, 92 insertions, 1 deletions
diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index 7171cfa..39fa741 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,9 @@ +2013-07-03 Pedro Alves <palves@redhat.com> + + * Makefile.in (config.status): Depend on development.sh. + * acinclude.m4: Include libmcheck.m4. + * configure: Regenerate. + 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com> * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI diff --git a/gdb/gdbserver/Makefile.in b/gdb/gdbserver/Makefile.in index db4e086..3286fe1 100644 --- a/gdb/gdbserver/Makefile.in +++ b/gdb/gdbserver/Makefile.in @@ -379,7 +379,7 @@ $(GNULIB_BUILDDIR)/Makefile: $(srcdir)/../gnulib/Makefile.in config.status CONFIG_LINKS= \ $(SHELL) config.status -config.status: configure configure.srv +config.status: configure configure.srv $(srcdir)/../development.sh $(SHELL) ./config.status --recheck # automatic rebuilding in automake-generated Makefiles requires diff --git a/gdb/gdbserver/acinclude.m4 b/gdb/gdbserver/acinclude.m4 index 0e0bdc8..4008d96 100644 --- a/gdb/gdbserver/acinclude.m4 +++ b/gdb/gdbserver/acinclude.m4 @@ -3,6 +3,9 @@ sinclude(../../bfd/bfd.m4) sinclude(../acx_configure_dir.m4) +# This gets GDB_AC_LIBMCHECK. +sinclude(../libmcheck.m4) + dnl This gets autoconf bugfixes sinclude(../../config/override.m4) diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure index 49b9ab6..2ba961d 100755 --- a/gdb/gdbserver/configure +++ b/gdb/gdbserver/configure @@ -687,6 +687,7 @@ ac_user_opts=' enable_option_checking enable_maintainer_mode enable_largefile +enable_libmcheck with_ust with_ust_include with_ust_lib @@ -1326,6 +1327,7 @@ Optional Features: --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-largefile omit support for large files + --enable-libmcheck Try linking with -lmcheck if available --enable-werror treat compile warnings as errors --enable-inprocess-agent inprocess agent @@ -4480,6 +4482,74 @@ _ACEOF fi +# Set the 'development' global. +. $srcdir/../development.sh + +# Enable -lmcheck by default (it provides cheap-enough memory +# mangling), but turn it off for releases. +if $development; then + libmcheck_default=yes +else + libmcheck_default=no +fi + + # Check whether --enable-libmcheck was given. +if test "${enable_libmcheck+set}" = set; then : + enableval=$enable_libmcheck; case "${enableval}" in + yes | y) ENABLE_LIBMCHECK="yes" ;; + no | n) ENABLE_LIBMCHECK="no" ;; + *) as_fn_error "bad value ${enableval} for --enable-libmcheck" "$LINENO" 5 ;; + esac +fi + + + if test -z "${ENABLE_LIBMCHECK}"; then + ENABLE_LIBMCHECK=${libmcheck_default} + fi + + if test "$ENABLE_LIBMCHECK" = "yes" ; then + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lmcheck" >&5 +$as_echo_n "checking for main in -lmcheck... " >&6; } +if test "${ac_cv_lib_mcheck_main+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lmcheck $LIBS" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + + +int +main () +{ +return main (); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + ac_cv_lib_mcheck_main=yes +else + ac_cv_lib_mcheck_main=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_mcheck_main" >&5 +$as_echo "$ac_cv_lib_mcheck_main" >&6; } +if test "x$ac_cv_lib_mcheck_main" = x""yes; then : + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBMCHECK 1 +_ACEOF + + LIBS="-lmcheck $LIBS" + +fi + + fi + + # Dependency checking. rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 2658bef..4ce7918 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -41,6 +41,18 @@ AC_HEADER_DIRENT AC_FUNC_ALLOCA +# Set the 'development' global. +. $srcdir/../development.sh + +# Enable -lmcheck by default (it provides cheap-enough memory +# mangling), but turn it off for releases. +if $development; then + libmcheck_default=yes +else + libmcheck_default=no +fi +GDB_AC_LIBMCHECK(${libmcheck_default}) + # Dependency checking. ZW_CREATE_DEPDIR ZW_PROG_COMPILER_DEPENDENCIES([CC]) |