Bug 14200

Summary: _{POSIX_V7|_POSIX_V6|XBS5}_ILP32_OFFBIG are wrong for -mx32 build
Product: glibc Reporter: H.J. Lu <hjl.tools>
Component: libcAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: drepper.fsp, fweimer, roland
Priority: P2 Flags: fweimer: security-
Version: 2.16   
Target Milestone: 2.18   
URL: http://sourceware.org/ml/libc-alpha/2012-06/msg00168.html
Host: Target:
Build: Last reconfirmed:

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