From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 803 invoked by alias); 28 Sep 2016 08:39:03 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 789 invoked by uid 89); 28 Sep 2016 08:39:02 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=mangles X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Wed, 28 Sep 2016 08:38:52 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 48249ACB7; Wed, 28 Sep 2016 08:38:50 +0000 (UTC) From: Andreas Schwab To: Matthew Wahab Cc: gdb-patches@sourceware.org Subject: Re: [GDB] Use AC_CHECK_SIZEOF to test for PRFPREGSET_T_BROKEN References: <57EB70F9.6050808@foss.arm.com> X-Yow: Is this an out-take from the ``BRADY BUNCH''? Date: Wed, 28 Sep 2016 08:45:00 -0000 In-Reply-To: <57EB70F9.6050808@foss.arm.com> (Matthew Wahab's message of "Wed, 28 Sep 2016 08:27:53 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2016-09/txt/msg00391.txt.bz2 On Sep 28 2016, Matthew Wahab 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 > - 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) 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."