[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAMe9rOpMFbpcOWsXxcUJv3ns3TWS9w5kmryUv-ofePaTU+atHw@mail.gmail.com>
Date: Fri, 16 Mar 2012 09:14:55 -0700
From: "H.J. Lu" <hjl.tools@...il.com>
To: "Joseph S. Myers" <joseph@...esourcery.com>
Cc: "H. Peter Anvin" <hpa@...or.com>, Paul Eggert <eggert@...ucla.edu>,
LKML <linux-kernel@...r.kernel.org>,
GNU C Library <libc-alpha@...rceware.org>
Subject: Re: x32 and width of blksize_t, suseconds_t
On Fri, Mar 16, 2012 at 7:45 AM, Joseph S. Myers
<joseph@...esourcery.com> wrote:
> On Fri, 16 Mar 2012, H. Peter Anvin wrote:
>
>> On 03/16/2012 01:19 AM, Paul Eggert wrote:
>> > Come to think of it, the proposed x32 patch may have issues
>> > with blksize_t and suseconds_t as well. POSIX says that an x32
>> > implementation must support at least one programming environment
>> > (presumably settable via a feature test macro) where blksize_t
>> > and suseconds_t are no wider than 'long'; see
>> > <http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html>.
>> > But if I understand things correctly, x32 glibc would
>> > define these to be 'long long'. This issue affects system
>> > calls such as 'stat' and 'select'.
>>
>> That's just not going to happen, sorry. Why on Earth is this a
>> requirement? It makes no sense whatsoever.
>
> It's probably to support code written for C90. Note that it's the
> POSIX-conforming system as a whole that is to support such an environment
> - but it might be an environment that uses the traditional 32-bit or
> 64-bit ABIs, it needn't be one using the x32 ABI. "getconf
> POSIX_V7_WIDTH_RESTRICTED_ENVS" must print the names of the environments
> meeting this requirement; if one is "POSIX_V7_ILP32_OFF32", for example,
> then "getconf POSIX_V7_ILP32_OFF32_CFLAGS" will print the flags (maybe
> -m32) and likewise for _LDFLAGS and _LIBS. In glibc this means defining
> appropriate macros in bits/environment.h to give the right flags - and
> also probably changing posix/confstr.c which has comments saying
> "Currently this means all environment which the system allows." (the x32
> patch series may need to adjust this in some way).
>
I took a look at POSIX getconf. It only supports one 32bit ABI and one 64bit
ABI. I can't find a way to support another 32bit ABI. I decided not to change
it for x32. If you use POSIX getconf to select a 32bit ABI, you will get IA32.
--
H.J.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists