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: Philip Prindeville <philipp_subx at redfish-solutions dot com>
- To: Andreas Schwab <schwab at suse dot de>
- Cc: binutils at sourceware dot org
- Date: Mon, 16 Oct 2017 16:53:18 -0600
- 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> <mvmmv4r7de2.fsf@suse.de>
> On Oct 16, 2017, at 1:36 AM, Andreas Schwab <schwab@suse.de> wrote:
>
> 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.
>
Well, it would still be useful for other things, like (as I mentioned) detecting the format that floating point numbers are stored natively.
-Philip