Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: Matthew Wahab <matthew.wahab@foss.arm.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [GDB] Use AC_CHECK_SIZEOF to test for PRFPREGSET_T_BROKEN
Date: Wed, 28 Sep 2016 08:45:00 -0000	[thread overview]
Message-ID: <mvmr3841krq.fsf@hawking.suse.de> (raw)
In-Reply-To: <57EB70F9.6050808@foss.arm.com> (Matthew Wahab's message of "Wed,	28 Sep 2016 08:27:53 +0100")

On Sep 28 2016, Matthew Wahab <matthew.wahab@foss.arm.com> wrote:

> 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 <sys/procfs.h>
> -       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 <sys/procfs.h> ])
> +    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)

This mangles the configure output.  The output of the AC_CHECK_SIZEOF
checks occurs in the middle of the output of the prfpregset_t check.
You should not nest configure checks.

Andreas.

-- 
Andreas Schwab, SUSE Labs, schwab@suse.de
GPG Key fingerprint = 0196 BAD8 1CE9 1970 F4BE  1748 E4D4 88E3 0EEA B9D7
"And now for something completely different."


      reply	other threads:[~2016-09-28  8:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-28  8:39 Matthew Wahab
2016-09-28  8:45 ` Andreas Schwab [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=mvmr3841krq.fsf@hawking.suse.de \
    --to=schwab@suse.de \
    --cc=gdb-patches@sourceware.org \
    --cc=matthew.wahab@foss.arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox