public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Roland McGrath <roland@redhat.com>
To: Jakub Jelinek <jakub@redhat.com>
Cc: Ulrich Drepper <drepper@redhat.com>,
	Glibc hackers <libc-hacker@sources.redhat.com>
Subject: Re: [PATCH] Fix some i386 vs. x86_64 -m32 glibc header differences
Date: Thu, 04 Nov 2004 23:47:00 -0000	[thread overview]
Message-ID: <200411042347.iA4NlKks029556@magilla.sf.frob.com> (raw)
In-Reply-To: Jakub Jelinek's message of  Monday, 1 November 2004 15:04:20 +0100 <20041101140420.GS30497@sunsite.ms.mff.cuni.cz>

> 2004-11-01  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* sysdeps/unix/sysv/linux/x86_64/sys/procfs.h [__WORDSIZE == 32]
> 	(elf_fpxregset_t): New type.
> 	(struct elf_prpsinfo): If __WORDSIZE == 32, change pr_[ug]id type
> 	to unsigned short int.
> 	* sysdeps/unix/sysv/linux/x86_64/sys/user.h
> 	(struct user_fpregs_struct): Fix comment.
> 	* sysdeps/i386/fpu/bits/mathdef.h (float_t, double_t): If
> 	__FLOAT_EVAL_METHOD__ is defined and 0, typedef to float resp. double.
> 	* sysdeps/x86_64/fpu/bits/mathdef.h: Include bits/wordsize.h.
> 	(float_t, double_t): If -m32 and not -mfpmath=sse, typedef to
> 	long double.
> 	* sysdeps/x86_64/fpu/bits/fenv.h: Include bits/wordsize.h.
> 	(fenv_t): Remove __mxcsr field for -m32.

I've put these in.

> 1) missing sys/elf.h on x86_64 - it is a deprecated header, so probably not
>    a big deal, though not hard to add

If anyone actually uses this despite the #warning, then it probably ought
to just move up to linux/ and be installed for compatibility on all machines.
OTOH, forcing people to use sys/procfs.h instead is not a bad thing.

> 2) missing sys/vm86.h on x86_64 - vm86 doesn't work on x86-64 64-bit kernel
>    even for 32-bit programs AFAIK, so again not a big deal

Perhaps programs would prefer to diagnose this at runtime than be uncompilable.
But let's wait for a complaint.

> 3) gnu/lib-names.h, gnu/stubs.h - hard to fix

gnu/stubs.h is pretty hard to fix.  What are the differences?
gnu/lib-names.h is less hard.  I can make it dtrt if it's worth the trouble.

> 4) bits/wchar.h - not sure why __WCHAR_M{IN,AX} on i386 are long constants
>    and int elsewhere, doesn't match what arches have unsigned long wchar_t
>    and which have unsigned int wchar_t

> 5) bits/mathinline.h, bits/string.h

Are these unusable in -m32, or just differ?  These already differ for other
ABI-compatible differing configurations (i386 vs i486, etc).  So if these
under -m32 just define the versions that work in 32-bit mode but are
optimized for AMD64 or EM64T processors, this is fine as is.

> 6) bits/byteswap.h - no support for !__GNUC__ compilers on x86_64 -m32

We don't care about non-GCC.  But I would put in a patch if one were sent.

      reply	other threads:[~2004-11-04 23:47 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-01 14:06 Jakub Jelinek
2004-11-04 23:47 ` Roland McGrath [this message]

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=200411042347.iA4NlKks029556@magilla.sf.frob.com \
    --to=roland@redhat.com \
    --cc=drepper@redhat.com \
    --cc=jakub@redhat.com \
    --cc=libc-hacker@sources.redhat.com \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).