Move many configure checks to common.m4

This moves many needed configure checks from gdb and gdbserver into
common.m4.  This helps gdbsupport, nat, and target be self-contained.

The result is a bit spaghetti-ish, because gdbsupport uses another m4
file from gdb/.  The resulting code is somewhat non-obvious.  However,
these problems already exist, so it's not really that much worse than
what is already done.

gdb/ChangeLog
2020-01-14  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac: Move many checks to ../gdbsupport/common.m4.

gdb/gdbserver/ChangeLog
2020-01-14  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac: Remove any checks that were added to common.m4.
	* acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
	lib-link.m4.

gdbsupport/ChangeLog
2020-01-14  Tom Tromey  <tom@tromey.com>

	* configure, Makefile.in, aclocal.m4, common.m4, config.in:
	Rebuild.
	* common.m4 (GDB_AC_COMMON): Move many checks from
	gdb/configure.ac.
	* acinclude.m4: Include bfd.m4, ptrace.m4.

Change-Id: I931eaa94065df268b30a2f1354390710df89c7f8
This commit is contained in:
Tom Tromey 2019-12-19 16:40:15 -07:00
parent 01027315f5
commit 05ea2a0510
16 changed files with 5360 additions and 1980 deletions

View File

@ -1,3 +1,8 @@
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Move many checks to ../gdbsupport/common.m4.
2020-01-14 Tom Tromey <tom@tromey.com>
* nat/x86-linux-dregs.c: Include configh.h.

3000
gdb/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -480,11 +480,6 @@ AC_SEARCH_LIBS(kinfo_getvmmap, util util-freebsd,
[AC_DEFINE(HAVE_KINFO_GETVMMAP, 1,
[Define to 1 if your system has the kinfo_getvmmap function. ])])
# fbsd-nat.c can also use kinfo_getfile.
AC_SEARCH_LIBS(kinfo_getfile, util util-freebsd,
[AC_DEFINE(HAVE_KINFO_GETFILE, 1,
[Define to 1 if your system has the kinfo_getfile function. ])])
AM_ICONV
# GDB may fork/exec the iconv program to get the list of supported character
@ -1204,57 +1199,16 @@ fi
AC_SUBST(SRCHIGH_LIBS)
AC_SUBST(SRCHIGH_CFLAGS)
AC_ARG_WITH(intel_pt,
AS_HELP_STRING([--with-intel-pt], [include Intel Processor Trace support (auto/yes/no)]),
[], [with_intel_pt=auto])
AC_MSG_CHECKING([whether to use intel pt])
AC_MSG_RESULT([$with_intel_pt])
if test "${with_intel_pt}" = no; then
AC_MSG_WARN([Intel Processor Trace support disabled; some features may be unavailable.])
HAVE_LIBIPT=no
else
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5
# error
#endif
]])], [perf_event=yes], [perf_event=no])
if test "$perf_event" != yes; then
if test "$with_intel_pt" = yes; then
AC_MSG_ERROR([linux/perf_event.h missing or too old])
else
AC_MSG_WARN([linux/perf_event.h missing or too old; some features may be unavailable.])
fi
fi
AC_LIB_HAVE_LINKFLAGS([ipt], [], [#include "intel-pt.h"], [pt_insn_alloc_decoder (0);])
if test "$HAVE_LIBIPT" != yes; then
if test "$with_intel_pt" = yes; then
AC_MSG_ERROR([libipt is missing or unusable])
else
AC_MSG_WARN([libipt is missing or unusable; some features may be unavailable.])
fi
else
save_LIBS=$LIBS
LIBS="$LIBS $LIBIPT"
AC_CHECK_FUNCS(pt_insn_event)
AC_CHECK_MEMBERS([struct pt_insn.enabled, struct pt_insn.resynced], [], [],
[#include <intel-pt.h>])
LIBS=$save_LIBS
fi
fi
# ------------------------- #
# Checks for header files. #
# ------------------------- #
AC_HEADER_STDC
# elf_hp.h is for HP/UX 64-bit shared library support.
AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h proc_service.h \
thread_db.h linux/elf.h \
AC_CHECK_HEADERS([nlist.h machine/reg.h poll.h sys/poll.h \
thread_db.h \
sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
sys/resource.h sys/procfs.h sys/ptrace.h ptrace.h \
sys/resource.h sys/ptrace.h ptrace.h \
sys/reg.h sys/debugreg.h sys/select.h \
termios.h elf_hp.h])
AC_CHECK_HEADERS(sys/user.h, [], [],
@ -1279,12 +1233,6 @@ libiberty_INIT
AC_CHECK_DECLS([snprintf])
AM_LC_MESSAGES
# ----------------------- #
# Checks for structures. #
# ----------------------- #
AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_blksize])
# ------------------ #
# Checks for types. #
# ------------------ #
@ -1306,15 +1254,13 @@ AC_C_BIGENDIAN
# Checks for library functions. #
# ------------------------------ #
AC_FUNC_MMAP
AC_FUNC_VFORK
AC_CHECK_FUNCS([getauxval getrusage getuid getgid \
AC_CHECK_FUNCS([getuid getgid \
pipe poll pread pread64 pwrite resize_term \
sbrk getpgid setpgid setpgrp setsid \
getpgid setsid \
sigaction sigsetmask socketpair \
ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
setrlimit getrlimit posix_madvise waitpid \
ptrace64 sigaltstack setns use_default_colors])
use_default_colors])
AM_LANGINFO_CODESET
GDB_AC_COMMON
@ -1475,17 +1421,6 @@ AC_CHECK_MEMBERS([struct ptrace_lwpinfo.pl_tdname], [], [],
AC_CHECK_MEMBERS([struct ptrace_lwpinfo.pl_syscall_code], [], [],
[#include <sys/ptrace.h>])
if test "$ac_cv_header_sys_procfs_h" = yes; then
BFD_HAVE_SYS_PROCFS_TYPE(gregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(fpregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(prgregset32_t)
BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t)
fi
# Check if the compiler supports the `long long' type.
AC_CACHE_CHECK([for long long support in compiler], gdb_cv_c_long_long,
@ -1737,29 +1672,6 @@ if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
[Define if <thread_db.h> has the TD_NOTLS error code.])
fi
dnl Check if we can disable the virtual address space randomization.
dnl The functionality of setarch -R.
AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])
define([PERSONALITY_TEST], [AC_LANG_PROGRAM([#include <sys/personality.h>], [
# if !HAVE_DECL_ADDR_NO_RANDOMIZE
# define ADDR_NO_RANDOMIZE 0x0040000
# endif
/* Test the flag could be set and stays set. */
personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
return 1])])
AC_RUN_IFELSE([PERSONALITY_TEST],
[have_personality=true],
[have_personality=false],
[AC_LINK_IFELSE([PERSONALITY_TEST],
[have_personality=true],
[have_personality=false])])
if $have_personality
then
AC_DEFINE([HAVE_PERSONALITY], 1,
[Define if you support the personality syscall.])
fi
dnl Set the host's .gdbinit filename.
case $host_os in
go32* | *djgpp*)

View File

@ -1,3 +1,10 @@
2020-01-14 Tom Tromey <tom@tromey.com>
* configure: Rebuild.
* configure.ac: Remove any checks that were added to common.m4.
* acinclude.m4: Include lib-ld.m4, lib-prefix.m4, and
lib-link.m4.
2020-01-14 Tom Tromey <tom@tromey.com>
* server.h: Include config.h.

View File

@ -15,6 +15,11 @@ m4_include(../../config/acx.m4)
m4_include(../../config/depstand.m4)
m4_include(../../config/lead-dot.m4)
dnl Needed for common.m4
dnl For AC_LIB_HAVE_LINKFLAGS.
m4_include(../../config/lib-ld.m4)
m4_include(../../config/lib-prefix.m4)
m4_include(../../config/lib-link.m4)
dnl codeset.m4 is needed for common.m4, but not for
dnl anything else in gdbserver.
m4_include(../../config/codeset.m4)

View File

@ -110,21 +110,39 @@
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* Define if <sys/procfs.h> has fpregset_t. */
#undef HAVE_FPREGSET_T
/* Define to 1 if you have the `getauxval' function. */
#undef HAVE_GETAUXVAL
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
/* Define to 1 if you have the `getrusage' function. */
#undef HAVE_GETRUSAGE
/* Define if <sys/procfs.h> has gregset_t. */
#undef HAVE_GREGSET_T
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if your system has the kinfo_getfile function. */
#undef HAVE_KINFO_GETFILE
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define to 1 if you have the `dl' library (-ldl). */
#undef HAVE_LIBDL
/* Define if you have the ipt library. */
#undef HAVE_LIBIPT
/* Define if the target supports branch tracing. */
#undef HAVE_LINUX_BTRACE
@ -152,6 +170,9 @@
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define to 1 if you have the <netdb.h> header file. */
#undef HAVE_NETDB_H
@ -179,6 +200,9 @@
/* Define if <sys/procfs.h> has prfpregset_t. */
#undef HAVE_PRFPREGSET_T
/* Define if <sys/procfs.h> has prgregset32_t. */
#undef HAVE_PRGREGSET32_T
/* Define if <sys/procfs.h> has prgregset_t. */
#undef HAVE_PRGREGSET_T
@ -197,6 +221,9 @@
/* Define to 1 if you have the `pthread_sigmask' function. */
#undef HAVE_PTHREAD_SIGMASK
/* Define to 1 if you have the `ptrace64' function. */
#undef HAVE_PTRACE64
/* Define if the target supports PTRACE_GETFPXREGS for extended register
access. */
#undef HAVE_PTRACE_GETFPXREGS
@ -207,15 +234,30 @@
/* Define to 1 if you have the <ptrace.h> header file. */
#undef HAVE_PTRACE_H
/* Define to 1 if you have the `pt_insn_event' function. */
#undef HAVE_PT_INSN_EVENT
/* Define to 1 if you have the `pwrite' function. */
#undef HAVE_PWRITE
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
/* Define to 1 if you have the `setns' function. */
#undef HAVE_SETNS
/* Define to 1 if you have the `setpgid' function. */
#undef HAVE_SETPGID
/* Define to 1 if you have the `setpgrp' function. */
#undef HAVE_SETPGRP
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
/* Define to 1 if you have the `sigaltstack' function. */
#undef HAVE_SIGALTSTACK
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
@ -243,6 +285,12 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if `enabled' is a member of `struct pt_insn'. */
#undef HAVE_STRUCT_PT_INSN_ENABLED
/* Define to 1 if `resynced' is a member of `struct pt_insn'. */
#undef HAVE_STRUCT_PT_INSN_RESYNCED
/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
@ -264,6 +312,9 @@
/* Define to 1 if you have the <sys/ioctl.h> header file. */
#undef HAVE_SYS_IOCTL_H
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H

2000
gdb/gdbserver/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -85,12 +85,12 @@ ACX_CONFIGURE_DIR(["../../gnulib"], ["build-gnulib-gdbserver"],
ACX_CONFIGURE_DIR(["../../libiberty"], ["build-libiberty-gdbserver"])
AC_CHECK_HEADERS(termios.h sys/reg.h string.h dnl
proc_service.h sys/procfs.h linux/elf.h dnl
sys/procfs.h linux/elf.h dnl
fcntl.h signal.h sys/file.h dnl
sys/ioctl.h netinet/in.h sys/socket.h netdb.h dnl
netinet/tcp.h arpa/inet.h)
AC_FUNC_FORK
AC_CHECK_FUNCS(getauxval pread pwrite pread64 setns)
AC_CHECK_FUNCS(pread pwrite pread64)
GDB_AC_COMMON
@ -160,8 +160,6 @@ libiberty_INIT
AC_CHECK_DECLS([perror, vasprintf, vsnprintf])
AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_blksize])
# See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
# Older amd64 Linux's don't have the fs_base and gs_base members of
# `struct user_regs_struct'.
@ -298,14 +296,6 @@ if test "${srv_linux_btrace}" = "yes"; then
[Define if the target supports branch tracing.])
fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t)
fi
dnl Some systems (e.g., Android) have lwpid_t defined in libthread_db.h.
if test "$bfd_cv_have_sys_procfs_type_lwpid_t" != yes; then
GDBSERVER_HAVE_THREAD_DB_TYPE(lwpid_t)
@ -404,30 +394,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([])],
[gdbsrv_cv_have_visibility_hidden=no])
CFLAGS="$saved_cflags"
dnl Check if we can disable the virtual address space randomization.
dnl The functionality of setarch -R.
AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])
define([PERSONALITY_TEST], [AC_LANG_PROGRAM([#include <sys/personality.h>], [
# if !HAVE_DECL_ADDR_NO_RANDOMIZE
# define ADDR_NO_RANDOMIZE 0x0040000
# endif
/* Test the flag could be set and stays set. */
personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
return 1])])
AC_RUN_IFELSE([PERSONALITY_TEST],
[gdbsrv_cv_have_personality=true],
[gdbsrv_cv_have_personality=false],
[AC_LINK_IFELSE([PERSONALITY_TEST],
[gdbsrv_cv_have_personality=true],
[gdbsrv_cv_have_personality=false])])
if $gdbsrv_cv_have_personality
then
AC_DEFINE([HAVE_PERSONALITY], 1,
[Define if you support the personality syscall.])
fi
IPA_DEPFILES=""
extra_libraries=""

View File

@ -1,3 +1,11 @@
2020-01-14 Tom Tromey <tom@tromey.com>
* configure, Makefile.in, aclocal.m4, common.m4, config.in:
Rebuild.
* common.m4 (GDB_AC_COMMON): Move many checks from
gdb/configure.ac.
* acinclude.m4: Include bfd.m4, ptrace.m4.
2020-01-14 Tom Tromey <tom@tromey.com>
* common-defs.h: Add GDBSERVER case. Update includes.

View File

@ -114,12 +114,17 @@ am__aclocal_m4_deps = $(top_srcdir)/../config/codeset.m4 \
$(top_srcdir)/../config/gettext-sister.m4 \
$(top_srcdir)/../config/largefile.m4 \
$(top_srcdir)/../config/lead-dot.m4 \
$(top_srcdir)/../config/lib-ld.m4 \
$(top_srcdir)/../config/lib-link.m4 \
$(top_srcdir)/../config/lib-prefix.m4 \
$(top_srcdir)/../config/override.m4 \
$(top_srcdir)/../config/plugins.m4 $(top_srcdir)/acinclude.m4 \
$(top_srcdir)/common.m4 $(top_srcdir)/../config/ax_pthread.m4 \
$(top_srcdir)/../bfd/bfd.m4 $(top_srcdir)/common.m4 \
$(top_srcdir)/../config/ax_pthread.m4 \
$(top_srcdir)/../gdb/ax_cxx_compile_stdcxx.m4 \
$(top_srcdir)/../gdb/libiberty.m4 \
$(top_srcdir)/../gdb/selftest.m4 $(top_srcdir)/configure.ac
$(top_srcdir)/../gdb/selftest.m4 \
$(top_srcdir)/../gdb/ptrace.m4 $(top_srcdir)/configure.ac
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
$(ACLOCAL_M4)
DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \
@ -243,6 +248,7 @@ GENCAT = @GENCAT@
GMSGFMT = @GMSGFMT@
GREP = @GREP@
HAVE_CXX11 = @HAVE_CXX11@
HAVE_LIBIPT = @HAVE_LIBIPT@
INCINTL = @INCINTL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
@ -253,8 +259,10 @@ INSTOBJEXT = @INSTOBJEXT@
LDFLAGS = @LDFLAGS@
LIBINTL = @LIBINTL@
LIBINTL_DEP = @LIBINTL_DEP@
LIBIPT = @LIBIPT@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LTLIBIPT = @LTLIBIPT@
LTLIBOBJS = @LTLIBOBJS@
MAINT = @MAINT@
MAKEINFO = @MAKEINFO@

View File

@ -1,5 +1,7 @@
m4_include([../bfd/bfd.m4])
m4_include([common.m4])
m4_include([../config/ax_pthread.m4])
m4_include([../gdb/ax_cxx_compile_stdcxx.m4])
m4_include([../gdb/libiberty.m4])
m4_include([../gdb/selftest.m4])
m4_include([../gdb/ptrace.m4])

View File

@ -1201,6 +1201,9 @@ m4_include([../config/depstand.m4])
m4_include([../config/gettext-sister.m4])
m4_include([../config/largefile.m4])
m4_include([../config/lead-dot.m4])
m4_include([../config/lib-ld.m4])
m4_include([../config/lib-link.m4])
m4_include([../config/lib-prefix.m4])
m4_include([../config/override.m4])
m4_include([../config/plugins.m4])
m4_include([acinclude.m4])

View File

@ -42,13 +42,50 @@ AC_DEFUN([GDB_AC_COMMON], [
sys/un.h sys/wait.h dnl
thread_db.h wait.h dnl
termios.h dnl
dlfcn.h)
dlfcn.h dnl
linux/elf.h sys/procfs.h proc_service.h)
AC_FUNC_MMAP
AC_FUNC_VFORK
AC_CHECK_FUNCS([fdwalk getrlimit pipe pipe2 socketpair sigaction \
sigprocmask])
ptrace64 sbrk setns sigaltstack sigprocmask \
setpgid setpgrp getrusage getauxval])
dnl Check if we can disable the virtual address space randomization.
dnl The functionality of setarch -R.
AC_CHECK_DECLS([ADDR_NO_RANDOMIZE],,, [#include <sys/personality.h>])
define([PERSONALITY_TEST], [AC_LANG_PROGRAM([#include <sys/personality.h>], [
# if !HAVE_DECL_ADDR_NO_RANDOMIZE
# define ADDR_NO_RANDOMIZE 0x0040000
# endif
/* Test the flag could be set and stays set. */
personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
return 1])])
AC_RUN_IFELSE([PERSONALITY_TEST],
[have_personality=true],
[have_personality=false],
[AC_LINK_IFELSE([PERSONALITY_TEST],
[have_personality=true],
[have_personality=false])])
if $have_personality
then
AC_DEFINE([HAVE_PERSONALITY], 1,
[Define if you support the personality syscall.])
fi
AC_CHECK_DECLS([strstr])
# ----------------------- #
# Checks for structures. #
# ----------------------- #
AC_CHECK_MEMBERS([struct stat.st_blocks, struct stat.st_blksize])
AC_SEARCH_LIBS(kinfo_getfile, util util-freebsd,
[AC_DEFINE(HAVE_KINFO_GETFILE, 1,
[Define to 1 if your system has the kinfo_getfile function. ])])
# Check for std::thread. This does not work on some platforms, like
# mingw and DJGPP.
AC_LANG_PUSH([C++])
@ -90,4 +127,56 @@ AC_DEFUN([GDB_AC_COMMON], [
if test "$gdb_cv_func_sigsetjmp" = "yes"; then
AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available. ])
fi
AC_ARG_WITH(intel_pt,
AS_HELP_STRING([--with-intel-pt], [include Intel Processor Trace support (auto/yes/no)]),
[], [with_intel_pt=auto])
AC_MSG_CHECKING([whether to use intel pt])
AC_MSG_RESULT([$with_intel_pt])
if test "${with_intel_pt}" = no; then
AC_MSG_WARN([Intel Processor Trace support disabled; some features may be unavailable.])
HAVE_LIBIPT=no
else
AC_PREPROC_IFELSE([AC_LANG_SOURCE([[
#include <linux/perf_event.h>
#ifndef PERF_ATTR_SIZE_VER5
# error
#endif
]])], [perf_event=yes], [perf_event=no])
if test "$perf_event" != yes; then
if test "$with_intel_pt" = yes; then
AC_MSG_ERROR([linux/perf_event.h missing or too old])
else
AC_MSG_WARN([linux/perf_event.h missing or too old; some features may be unavailable.])
fi
fi
AC_LIB_HAVE_LINKFLAGS([ipt], [], [#include "intel-pt.h"], [pt_insn_alloc_decoder (0);])
if test "$HAVE_LIBIPT" != yes; then
if test "$with_intel_pt" = yes; then
AC_MSG_ERROR([libipt is missing or unusable])
else
AC_MSG_WARN([libipt is missing or unusable; some features may be unavailable.])
fi
else
save_LIBS=$LIBS
LIBS="$LIBS $LIBIPT"
AC_CHECK_FUNCS(pt_insn_event)
AC_CHECK_MEMBERS([struct pt_insn.enabled, struct pt_insn.resynced], [], [],
[#include <intel-pt.h>])
LIBS=$save_LIBS
fi
fi
if test "$ac_cv_header_sys_procfs_h" = yes; then
BFD_HAVE_SYS_PROCFS_TYPE(gregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(fpregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(prgregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(prfpregset_t)
BFD_HAVE_SYS_PROCFS_TYPE(prgregset32_t)
BFD_HAVE_SYS_PROCFS_TYPE(lwpid_t)
BFD_HAVE_SYS_PROCFS_TYPE(psaddr_t)
BFD_HAVE_SYS_PROCFS_TYPE(elf_fpregset_t)
fi
])

View File

@ -28,6 +28,10 @@
/* define if the compiler supports basic C++11 syntax */
#undef HAVE_CXX11
/* Define to 1 if you have the declaration of `ADDR_NO_RANDOMIZE', and to 0 if
you don't. */
#undef HAVE_DECL_ADDR_NO_RANDOMIZE
/* Define to 1 if you have the declaration of `asprintf', and to 0 if you
don't. */
#undef HAVE_DECL_ASPRINTF
@ -39,6 +43,10 @@
/* Define to 1 if you have the declaration of `ffs', and to 0 if you don't. */
#undef HAVE_DECL_FFS
/* Define to 1 if you have the declaration of `ptrace', and to 0 if you don't.
*/
#undef HAVE_DECL_PTRACE
/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
don't. */
#undef HAVE_DECL_SNPRINTF
@ -78,18 +86,48 @@
/* Define to 1 if you have the <dlfcn.h> header file. */
#undef HAVE_DLFCN_H
/* Define if <sys/procfs.h> has elf_fpregset_t. */
#undef HAVE_ELF_FPREGSET_T
/* Define to 1 if you have the `fdwalk' function. */
#undef HAVE_FDWALK
/* Define to 1 if you have the `fork' function. */
#undef HAVE_FORK
/* Define if <sys/procfs.h> has fpregset_t. */
#undef HAVE_FPREGSET_T
/* Define to 1 if you have the `getauxval' function. */
#undef HAVE_GETAUXVAL
/* Define to 1 if you have the `getpagesize' function. */
#undef HAVE_GETPAGESIZE
/* Define to 1 if you have the `getrlimit' function. */
#undef HAVE_GETRLIMIT
/* Define to 1 if you have the `getrusage' function. */
#undef HAVE_GETRUSAGE
/* Define if <sys/procfs.h> has gregset_t. */
#undef HAVE_GREGSET_T
/* Define to 1 if you have the <inttypes.h> header file. */
#undef HAVE_INTTYPES_H
/* Define to 1 if your system has the kinfo_getfile function. */
#undef HAVE_KINFO_GETFILE
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
#undef HAVE_LANGINFO_CODESET
/* Define if you have the ipt library. */
#undef HAVE_LIBIPT
/* Define to 1 if you have the <linux/elf.h> header file. */
#undef HAVE_LINUX_ELF_H
/* Define to 1 if you have the <linux/perf_event.h> header file. */
#undef HAVE_LINUX_PERF_EVENT_H
@ -99,15 +137,39 @@
/* Define to 1 if the system has the type `long long'. */
#undef HAVE_LONG_LONG
/* Define if <sys/procfs.h> has lwpid_t. */
#undef HAVE_LWPID_T
/* Define to 1 if you have the <memory.h> header file. */
#undef HAVE_MEMORY_H
/* Define to 1 if you have a working `mmap' system call. */
#undef HAVE_MMAP
/* Define if you support the personality syscall. */
#undef HAVE_PERSONALITY
/* Define to 1 if you have the `pipe' function. */
#undef HAVE_PIPE
/* Define to 1 if you have the `pipe2' function. */
#undef HAVE_PIPE2
/* Define if <sys/procfs.h> has prfpregset_t. */
#undef HAVE_PRFPREGSET_T
/* Define if <sys/procfs.h> has prgregset32_t. */
#undef HAVE_PRGREGSET32_T
/* Define if <sys/procfs.h> has prgregset_t. */
#undef HAVE_PRGREGSET_T
/* Define to 1 if you have the <proc_service.h> header file. */
#undef HAVE_PROC_SERVICE_H
/* Define if <sys/procfs.h> has psaddr_t. */
#undef HAVE_PSADDR_T
/* Have PTHREAD_PRIO_INHERIT. */
#undef HAVE_PTHREAD_PRIO_INHERIT
@ -117,9 +179,33 @@
/* Define to 1 if you have the `pthread_sigmask' function. */
#undef HAVE_PTHREAD_SIGMASK
/* Define to 1 if you have the `ptrace64' function. */
#undef HAVE_PTRACE64
/* Define to 1 if you have the <ptrace.h> header file. */
#undef HAVE_PTRACE_H
/* Define to 1 if you have the `pt_insn_event' function. */
#undef HAVE_PT_INSN_EVENT
/* Define to 1 if you have the `sbrk' function. */
#undef HAVE_SBRK
/* Define to 1 if you have the `setns' function. */
#undef HAVE_SETNS
/* Define to 1 if you have the `setpgid' function. */
#undef HAVE_SETPGID
/* Define to 1 if you have the `setpgrp' function. */
#undef HAVE_SETPGRP
/* Define to 1 if you have the `sigaction' function. */
#undef HAVE_SIGACTION
/* Define to 1 if you have the `sigaltstack' function. */
#undef HAVE_SIGALTSTACK
/* Define to 1 if you have the <signal.h> header file. */
#undef HAVE_SIGNAL_H
@ -144,6 +230,27 @@
/* Define to 1 if you have the <string.h> header file. */
#undef HAVE_STRING_H
/* Define to 1 if `enabled' is a member of `struct pt_insn'. */
#undef HAVE_STRUCT_PT_INSN_ENABLED
/* Define to 1 if `resynced' is a member of `struct pt_insn'. */
#undef HAVE_STRUCT_PT_INSN_RESYNCED
/* Define to 1 if `st_blksize' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLKSIZE
/* Define to 1 if `st_blocks' is a member of `struct stat'. */
#undef HAVE_STRUCT_STAT_ST_BLOCKS
/* Define to 1 if you have the <sys/param.h> header file. */
#undef HAVE_SYS_PARAM_H
/* Define to 1 if you have the <sys/procfs.h> header file. */
#undef HAVE_SYS_PROCFS_H
/* Define to 1 if you have the <sys/ptrace.h> header file. */
#undef HAVE_SYS_PTRACE_H
/* Define to 1 if you have the <sys/resource.h> header file. */
#undef HAVE_SYS_RESOURCE_H
@ -171,12 +278,24 @@
/* Define to 1 if you have the <unistd.h> header file. */
#undef HAVE_UNISTD_H
/* Define to 1 if you have the `vfork' function. */
#undef HAVE_VFORK
/* Define to 1 if you have the <vfork.h> header file. */
#undef HAVE_VFORK_H
/* Define to 1 if you have the <wait.h> header file. */
#undef HAVE_WAIT_H
/* Define to 1 if you have the <windows.h> header file. */
#undef HAVE_WINDOWS_H
/* Define to 1 if `fork' works. */
#undef HAVE_WORKING_FORK
/* Define to 1 if `vfork' works. */
#undef HAVE_WORKING_VFORK
/* Name of package */
#undef PACKAGE
@ -202,6 +321,21 @@
your system. */
#undef PTHREAD_CREATE_JOINABLE
/* Define to the type of arg 1 for ptrace. */
#undef PTRACE_TYPE_ARG1
/* Define to the type of arg 3 for ptrace. */
#undef PTRACE_TYPE_ARG3
/* Define to the type of arg 4 for ptrace. */
#undef PTRACE_TYPE_ARG4
/* Define to the type of arg 5 for ptrace. */
#undef PTRACE_TYPE_ARG5
/* Define as the return type of ptrace. */
#undef PTRACE_TYPE_RET
/* The size of `long long', as computed by sizeof. */
#undef SIZEOF_LONG_LONG
@ -270,5 +404,11 @@
/* Define to 1 if you need to in order for `stat' and other things to work. */
#undef _POSIX_SOURCE
/* Define to `int' if <sys/types.h> does not define. */
#undef pid_t
/* Define to `unsigned int' if <sys/types.h> does not define. */
#undef size_t
/* Define as `fork' if `vfork' does not work. */
#undef vfork

1873
gdbsupport/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -45,6 +45,9 @@ GDB_AC_COMMON
GDB_AC_SELFTEST
AM_CONDITIONAL(SELFTEST, $enable_unittests)
# Check the return and argument types of ptrace.
GDB_AC_PTRACE
TARGET_WORD_SIZE=`sed -n 's,#define BFD_ARCH_SIZE \(.*\)$,\1,p' ../bfd/bfd-in3.h`
AC_DEFINE_UNQUOTED(TARGET_WORD_SIZE, $TARGET_WORD_SIZE,
[Define to the word size for the target.])