Re: [RFC/PATCH 1/2] sparse: Fix including glibc headers on x86-64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 23, 2012 at 11:03 AM, Josh Triplett <josh@xxxxxxxxxxxxxxxx> wrote:
> On Fri, Mar 23, 2012 at 03:03:51AM -0700, Christopher Li wrote:
>> --- a/lib.c
>> +++ b/lib.c
>> @@ -224,6 +224,15 @@ static enum { STANDARD_C89,
>>                STANDARD_GNU89,
>>                STANDARD_GNU99, } standard = STANDARD_GNU89;
>>
>> +#ifdef __x86_64__
>> +#define ARCH_M64_DEFAULT 1
>> +#else
>> +#define ARCH_M64_DEFAULT 0
>> +#endif
>
> Ideally this should work on other 64-bit architectures as well.


Thanks for the review.

I totally agree.  In the case it did not get it right,
it is not worse than existing code so that is not too bad.
I don't have other 64bit platform to test with though so
I am afraid to change some thing I can't test.

It would be a nice to have follow up patch adding different architecture
handling using the handle_arch_finalize(). As it is, it will
still be wrong if you use sparse as a cross compiler.
We need proper arch handling for that.

Patch are definitely welcome.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux