From 0b04e52316079981b2b77124198a405d826a05cd Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 19 Jan 2014 14:33:37 -0700 Subject: link gdbserver against libiberty This builds a libiberty just for gdbserver and arranges for gdbserver to use it. I've tripped across the lack of libiberty in gdbserver at least once, and I have seen other threads where it would have been useful. 2014-06-12 Tom Tromey * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks. * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check. (parse_debug_format_options): Likewise. (gdbserver_usage): Likewise. * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables. (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty. (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link against libiberty. ($(LIBGNU)): Depend on libiberty. (all-lib): Recurse into all subdirs. (install-only): Invoke "install" target in subdirs. (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove targets. * configure: Rebuild. * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check for vasprintf, vsnprintf, or gettimeofday. * configure.srv: Don't add safe-ctype.o or lbasename.o to srv_tgtobj. --- gdb/gdbserver/configure.ac | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gdb/gdbserver/configure.ac') diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac index 5a10ee7577..ede38d03fe 100644 --- a/gdb/gdbserver/configure.ac +++ b/gdb/gdbserver/configure.ac @@ -77,12 +77,14 @@ AC_PROG_MAKE_SET # build it in the same directory, when building in the source dir. ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"]) +ACX_CONFIGURE_DIR(["../../libiberty"], ["build-libiberty-gdbserver"]) + AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl proc_service.h sys/procfs.h linux/elf.h dnl errno.h fcntl.h signal.h sys/file.h malloc.h dnl sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl netinet/tcp.h arpa/inet.h) -AC_CHECK_FUNCS(gettimeofday pread pwrite pread64 readlink) +AC_CHECK_FUNCS(pread pwrite pread64 readlink) AC_REPLACE_FUNCS(vasprintf vsnprintf) GDB_AC_COMMON -- cgit v1.2.3