From 16231b7b9de982c605ea14f61b46054eeac01628 Mon Sep 17 00:00:00 2001 From: Daniel Gutson Date: Tue, 5 Jan 2010 00:40:07 +0000 Subject: [PATCH] 2010-01-04 Daniel Gutson * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC before including procfs.h. (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise. * configure.in: Added autoconf probe for the pr_fpreg member. * configure: Regenerated. * config.in: Regenerated. * elf.c: Define _STRUCTURE_PROC before including procfs.h. --- bfd/ChangeLog | 10 +++++++ bfd/bfd.m4 | 4 +++ bfd/config.in | 3 +++ bfd/configure | 69 ++++++++++++++++++++++++++++++++++++++++++++++++ bfd/configure.in | 1 + bfd/elf.c | 2 ++ 6 files changed, 89 insertions(+) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 0bc91a02d68..4d0db31debd 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,13 @@ +2010-01-04 Daniel Gutson + + * bfd.m4 (BFD_HAVE_SYS_PROCFS_TYPE): Define _STRUCTURE_PROC + before including procfs.h. + (BFD_HAVE_SYS_PROCFS_TYPE_MEMBER): Likewise. + * configure.in: Added autoconf probe for the pr_fpreg member. + * configure: Regenerated. + * config.in: Regenerated. + * elf.c: Define _STRUCTURE_PROC before including procfs.h. + 2010-01-04 Joel Brobecker Fix -Wshadow warnings in dwarf2.c (seen on alpha-tru64). diff --git a/bfd/bfd.m4 b/bfd/bfd.m4 index 55cc2bebbb8..394c41af2c9 100644 --- a/bfd/bfd.m4 +++ b/bfd/bfd.m4 @@ -8,6 +8,8 @@ AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE], AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_$1, [AC_TRY_COMPILE([ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include ], [$1 avar], bfd_cv_have_sys_procfs_type_$1=yes, @@ -27,6 +29,8 @@ AC_DEFUN([BFD_HAVE_SYS_PROCFS_TYPE_MEMBER], AC_CACHE_VAL(bfd_cv_have_sys_procfs_type_member_$1_$2, [AC_TRY_COMPILE([ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include ], [$1 avar; void* aref = (void*) &avar.$2], bfd_cv_have_sys_procfs_type_member_$1_$2=yes, diff --git a/bfd/config.in b/bfd/config.in index 3cb2bfc675f..5881b8d0cc9 100644 --- a/bfd/config.in +++ b/bfd/config.in @@ -114,6 +114,9 @@ /* Define if has lwpstatus_t.pr_context. */ #undef HAVE_LWPSTATUS_T_PR_CONTEXT +/* Define if has lwpstatus_t.pr_fpreg. */ +#undef HAVE_LWPSTATUS_T_PR_FPREG + /* Define if has lwpstatus_t.pr_reg. */ #undef HAVE_LWPSTATUS_T_PR_REG diff --git a/bfd/configure b/bfd/configure index b4bdb3cf3bf..37652fe66cd 100755 --- a/bfd/configure +++ b/bfd/configure @@ -13950,6 +13950,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -13985,6 +13987,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14020,6 +14024,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14055,6 +14061,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14090,6 +14098,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14125,6 +14135,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14160,6 +14172,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14195,6 +14209,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14230,6 +14246,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14265,6 +14283,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14300,6 +14320,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14335,6 +14357,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14370,6 +14394,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14405,6 +14431,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14440,6 +14468,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () @@ -14466,6 +14496,43 @@ $as_echo "#define HAVE_LWPSTATUS_T_PR_REG 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&5 $as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_reg" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpstatus_t.pr_fpreg in sys/procfs.h" >&5 +$as_echo_n "checking for lwpstatus_t.pr_fpreg in sys/procfs.h... " >&6; } + if test "${bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg+set}" = set; then : + $as_echo_n "(cached) " >&6 +else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +#define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 +#include +int +main () +{ +lwpstatus_t avar; void* aref = (void*) &avar.pr_fpreg + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg=yes +else + bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg=no + +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi + + if test $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg = yes; then + +$as_echo "#define HAVE_LWPSTATUS_T_PR_FPREG 1" >>confdefs.h + + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg" >&5 +$as_echo "$bfd_cv_have_sys_procfs_type_member_lwpstatus_t_pr_fpreg" >&6; } + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for win32_pstatus_t in sys/procfs.h" >&5 $as_echo_n "checking for win32_pstatus_t in sys/procfs.h... " >&6; } if test "${bfd_cv_have_sys_procfs_type_win32_pstatus_t+set}" = set; then : @@ -14475,6 +14542,8 @@ else /* end confdefs.h. */ #define _SYSCALL32 +/* Needed for new procfs interface on sparc-solaris. */ +#define _STRUCTURED_PROC 1 #include int main () diff --git a/bfd/configure.in b/bfd/configure.in index d2d12bdc814..3713d5669ed 100644 --- a/bfd/configure.in +++ b/bfd/configure.in @@ -481,6 +481,7 @@ changequote([,])dnl BFD_HAVE_SYS_PROCFS_TYPE(lwpxstatus_t) BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_context) BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_reg) + BFD_HAVE_SYS_PROCFS_TYPE_MEMBER(lwpstatus_t, pr_fpreg) BFD_HAVE_SYS_PROCFS_TYPE(win32_pstatus_t) fi fi diff --git a/bfd/elf.c b/bfd/elf.c index 3287d0f8fa3..aac33148589 100644 --- a/bfd/elf.c +++ b/bfd/elf.c @@ -7445,6 +7445,8 @@ _bfd_elf_rel_vtable_reloc_fn out details about the corefile. */ #ifdef HAVE_SYS_PROCFS_H +/* Needed for new procfs interface on sparc-solaris. */ +# define _STRUCTURED_PROC 1 # include #endif -- 2.30.2