This is the mail archive of the
mailing list for the binutils project.
Re: [GDB] Use AC_CHECK_SIZEOF to test for PRFPREGSET_T_BROKEN
- From: Matthew Wahab <matthew dot wahab at foss dot arm dot com>
- To: Yao Qi <qiyaoltc at gmail dot com>
- Cc: "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Wed, 28 Sep 2016 08:28:23 +0100
- Subject: Re: [GDB] Use AC_CHECK_SIZEOF to test for PRFPREGSET_T_BROKEN
- Authentication-results: sourceware.org; auth=none
- References: <57E92E06.firstname.lastname@example.org> <CAH=s-PNuTo_42V9HoNFmp2vPKgTfvM0FY1E=2dveGYwcH2-a8A@mail.gmail.com>
On 28/09/16 00:41, Yao Qi wrote:
On Mon, Sep 26, 2016 at 3:17 PM, Matthew Wahab
If the GDB configure script finds sys/procfs.h and the prfpregset_t
type, it checks whether prfpregset_t is usable, setting
PRFPREGSET_T_BROKEN if so. It does this using AC_TRY_RUN to test the
value of sizeof(prfregset_t). This doesn't work for cross-compiled
builds so for those PRFPREGSET_T_BROKEN is always set.
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.
Tested by cross-compiling for aarch64-none-linux-gnu and recent
glibc and by building with the logic inverted, to check the conditional was
correctly executing. Also by building for native x86_64-none-linux-gnu.
Ok for trunk?
Thanks for the follow-up patch. The patch should be sent gdb-patches@ mailing
Sorry about that. Now done.