Bug 14200 - _{POSIX_V7|_POSIX_V6|XBS5}_ILP32_OFFBIG are wrong for -mx32 build
Summary: _{POSIX_V7|_POSIX_V6|XBS5}_ILP32_OFFBIG are wrong for -mx32 build
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: libc (show other bugs)
Version: 2.16
: P2 normal
Target Milestone: 2.18
Assignee: Not yet assigned to anyone
URL: http://sourceware.org/ml/libc-alpha/2...
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-04 20:56 UTC by H.J. Lu
Modified: 2014-06-19 14:33 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:
fweimer: security-


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description H.J. Lu 2012-06-04 20:56:56 UTC
X32 is an ILP32 environment with 64-bit off_t.  We use
-mx32 for _{POSIX_V7|_POSIX_V6|XBS5}_ILP32_OFFBIG.  However,
This will introduce a regression for an -m32 build:

http://sourceware.org/ml/libc-alpha/2012-06/msg00154.html

---
where ILP32_OFFBIG will no
longer be offered.  That is unacceptable.  This whole area is subtle
and nonobvious, because it's a header in one build environment talking
about what other build environments are available.  

If a user program is using confstr itself, and that program is built
with -mx32, then it recommending -mx32 makes some sense.  But having
which environment the installed getconf binary was built for affect
what it reports to scripts is much more questionable.
---

This may be handled at installation time by

1. -mx32 build provides POSIX_V6_ILP32_OFFBIG,
POSIX_V7_ILP32_OFFBIG and XBS5_ILP32_OFFBIG.
2. -m32 build provides POSIX_V6_ILP32_OFF32,
POSIX_V7_ILP32_OFF32, XBS5_ILP32_OFF32,
POSIX_V6_ILP32_OFFBIG, POSIX_V7_ILP32_OFFBIG
and XBS5_ILP32_OFFBIG.

If x32 glibc installed, ia32 glibc won't install
the ia32 version of POSIX_V6_ILP32_OFFBIG,
POSIX_V7_ILP32_OFFBIG and XBS5_ILP32_OFFBIG.
Comment 1 H.J. Lu 2012-11-29 16:00:27 UTC
A patch is posted at

http://sourceware.org/ml/libc-alpha/2012-06/msg00168.html