mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: "H. Peter Anvin" <hpa@zytor.com>
Cc: Paul Eggert <eggert@cs.ucla.edu>, "H.J. Lu" <hjl.tools@gmail.com>,
	LKML <linux-kernel@vger.kernel.org>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: x32 and width of blksize_t, suseconds_t
Date: Fri, 16 Mar 2012 14:45:44 +0000 (UTC)	[thread overview]
Message-ID: <Pine.LNX.4.64.1203161435530.31619@digraph.polyomino.org.uk> (raw)
In-Reply-To: <4F634EA4.9070709@zytor.com>

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).

-- 
Joseph S. Myers
joseph@codesourcery.com

  reply	other threads:[~2012-03-16 14:45 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20120315192515.GA6585@intel.com>
     [not found] ` <20120315195000.7E3BE2C0A3@topped-with-meat.com>
     [not found]   ` <CAMe9rOpXRcO6a4cFEU=s1Gjzzt87zvyzuLhAWupc2pOX6az6ig@mail.gmail.com>
     [not found]     ` <4F625570.7050003@cs.ucla.edu>
     [not found]       ` <CAMe9rOpvnhPmpmsLedmOjjYB9SghZiov-cOUi+wrYvKaP+c9pQ@mail.gmail.com>
     [not found]         ` <4F6267B1.3090805@cs.ucla.edu>
2012-03-15 22:19           ` PATCH [3/n]: Add __snseconds_t and __SNSECONDS_T_TYPE H.J. Lu
2012-03-16  7:52             ` Paul Eggert
2012-03-16  8:19               ` x32 and width of blksize_t, suseconds_t Paul Eggert
2012-03-16 14:31                 ` H. Peter Anvin
2012-03-16 14:45                   ` Joseph S. Myers [this message]
2012-03-16 16:14                     ` H.J. Lu
2012-03-16 15:49               ` PATCH [3/n]: Add __snseconds_t and __SNSECONDS_T_TYPE H.J. Lu
2012-03-16 18:54                 ` Paul Eggert
2012-03-16 19:16                   ` H.J. Lu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1203161435530.31619@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=eggert@cs.ucla.edu \
    --cc=hjl.tools@gmail.com \
    --cc=hpa@zytor.com \
    --cc=libc-alpha@sourceware.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®