[GDB] Use AC_CHECK_SIZEOF to test for PRFPREGSET_T_BROKEN
Matthew Wahab
matthew.wahab@foss.arm.com
Mon Sep 26 14:17:00 GMT 2016
Hello,
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?
Matthew
gdb/
2016-09-26 Matthew Wahab <matthew.wahab@arm.com>
* configure.ac (PRFPREGSET_T_BROKEN): Replace AC_TRY_RUN test with
AC_CHECK_SIZEOF.
* configure: Regenerate.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-GDB-Use-AC_CHECK_SIZEOF-to-test-for-PRFPREGSET_T_BRO.patch
Type: text/x-patch
Size: 1876 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20160926/9eedab8b/attachment.bin>
More information about the Binutils
mailing list