From 568b341cbf730e0323e4add85003a8ab57fab09d Mon Sep 17 00:00:00 2001 From: Matthew Wahab Date: Tue, 23 Aug 2016 11:03:42 +0100 Subject: [PATCH] [GDB] Use AC_CHECK_SIZEOF to test for PRFPREGSET_T_BROKEN This patch replaces the use of AC_TRY_RUN with a test that uses AC_CHECK_SIZEOF to decide whether to set PRFPREGSET_T_BROKEN. This can be run for cross-compiled builds. gdb/ 2016-09-20 Matthew Wahab * configure.ac (PRFPREGSET_T_BROKEN): Replace AC_TRY_RUN test with AC_CHECK_SIZEOF. * configure: Regenerate. --- gdb/configure | 87 ++++++++++++++++++++++++++++++++++++++++++-------------- gdb/configure.ac | 19 ++++--------- 2 files changed, 72 insertions(+), 34 deletions(-) diff --git a/gdb/configure.ac b/gdb/configure.ac index e451e60..b162d87 100644 --- a/gdb/configure.ac +++ b/gdb/configure.ac @@ -1573,21 +1573,14 @@ if test "$ac_cv_header_sys_procfs_h" = yes; then if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then AC_MSG_CHECKING(whether prfpregset_t type is broken) - AC_CACHE_VAL(gdb_cv_prfpregset_t_broken, - [AC_TRY_RUN([#include - int main () - { - if (sizeof (prfpregset_t) == sizeof (void *)) - return 1; - return 0; - }], - gdb_cv_prfpregset_t_broken=no, - gdb_cv_prfpregset_t_broken=yes, - gdb_cv_prfpregset_t_broken=yes)]) - AC_MSG_RESULT($gdb_cv_prfpregset_t_broken) - if test $gdb_cv_prfpregset_t_broken = yes; then + AC_CHECK_SIZEOF(prfpregset_t, [], [ #include ]) + AC_CHECK_SIZEOF(void *) + if test "${ac_cv_sizeof_prfpregset_t}" = "${ac_cv_sizeof_void_p}"; then + AC_MSG_RESULT(yes) AC_DEFINE(PRFPREGSET_T_BROKEN, 1, [Define if the prfpregset_t type is broken.]) + else + AC_MSG_RESULT(no) fi fi fi -- 2.1.4