This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix sanitizer build on sparc64.
- From: Konstantin Serebryany <konstantin dot s dot serebryany at gmail dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: David Miller <davem at davemloft dot net>, gcc-patches at gcc dot gnu dot org
- Date: Wed, 21 Nov 2012 08:02:43 +0400
- Subject: Re: [PATCH] Fix sanitizer build on sparc64.
- References: <20121120.155705.982750470062898456.davem@davemloft.net> <m2a9ub28jv.fsf@igel.home>
On Wed, Nov 21, 2012 at 2:50 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> David Miller <davem@davemloft.net> writes:
>
>> +// Are we using 32-bit or 64-bit syscalls?
>> +// x32 (which defines __x86_64__) has __WORDSIZE == 32
>> +// but it still needs to use 64-bit syscalls.
>> +#if defined(__x86_64__) || __WORDSIZE == 64
>
> I don't think it is a good idea to use a glibc-internal macro. How
> about __LP64__?
__WORDSIZE is used throughout the library; it is also redefined
properly for the compilers which don't have it and may not have
__LP64__
The upstream fix for the problem David is solving here also uses __WORDSIZE.
--kcc
>
> Andreas.
>
> --
> Andreas Schwab, schwab@linux-m68k.org
> GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
> "And now for something completely different."