This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Leveraging objdump extensions for better autoconf cross-compilation support?
- From: Andreas Schwab <schwab at suse dot de>
- To: Philip Prindeville <philipp_subx at redfish-solutions dot com>
- Cc: binutils at sourceware dot org
- Date: Mon, 16 Oct 2017 09:36:21 +0200
- Subject: Re: Leveraging objdump extensions for better autoconf cross-compilation support?
- Authentication-results: sourceware.org; auth=none
- References: <25AF7B8D-0497-4B65-A3CC-A53CC65A8344@redfish-solutions.com>
On Okt 15 2017, Philip Prindeville <philipp_subx@redfish-solutions.com> wrote:
> You’d have things like:
>
> #include <stdio.h>
>
> int main(int argc, char *argv[])
> {
> printf(“sizeof long=%u\n”, sizeof(long));
> exit(0);
> }
>
> or whatever being compiled and run.
>
> What if you could get by with:
>
> const unsigned size_long = sizeof(long);
autoconf already has a standard macro for these kind of tests,
AC_CHECK_SIZEOF, which is cross-friendly.
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."