Messages in this thread | | | Date | Fri, 16 Mar 2012 09:14:55 -0700 | Subject | Re: x32 and width of blksize_t, suseconds_t | From | "H.J. Lu" <> |
| |
On Fri, Mar 16, 2012 at 7:45 AM, Joseph S. Myers <joseph@codesourcery.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@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |