amd64/164425: stat function doesn't 32bit mode on amd64
eligis at orange.fr
Wed Jan 25 16:20:12 UTC 2012
The following reply was made to PR kern/164425; it has been noted by GNATS.
From: "Christian Jullien" <eligis at orange.fr>
To: "'John Baldwin'" <jhb at freebsd.org>,
<freebsd-amd64 at freebsd.org>
Cc: "'C. Jullien'" <jullien at eligis.com>,
<freebsd-gnats-submit at freebsd.org>
Subject: RE: amd64/164425: stat function doesn't 32bit mode on amd64
Date: Wed, 25 Jan 2012 16:40:09 +0100
Thanks for the reply.
In that case, you must admit it is strange that gcc on FreeBSD amd64 has
a-m32 support which does not work!
I see two options that work equally well for me:
- remove -m32 option on gcc amd64, distro will reduce
- add /usr/include32 which gcc will use instead of /usr/include in case -m32
is passed (or something similar)
NetBSD requires a 32bit OS version to compile and use 32bit programs. At
least it is clear.
From: John Baldwin [mailto:jhb at freebsd.org]
Sent: mercredi 25 janvier 2012 14:37
To: freebsd-amd64 at freebsd.org
Cc: C. Jullien; freebsd-gnats-submit at freebsd.org
Subject: Re: amd64/164425: stat function doesn't 32bit mode on amd64
On Monday, January 23, 2012 5:17:11 pm C. Jullien wrote:
> >Number: 164425
> >Category: amd64
> >Synopsis: stat function doesn't 32bit mode on amd64
> >Confidential: no
> >Severity: critical
> >Priority: low
> >Responsible: freebsd-amd64
> >State: open
> >Class: sw-bug
> >Submitter-Id: current-users
> >Arrival-Date: Mon Jan 23 22:20:03 UTC 2012
> >Originator: C. Jullien
> >Release: 8.1 and 9.0
> FreeBSD freebsd.eligis.com 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan
> 30 UTC 2012 root at farrell.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC
> A friend of mine also confirmed this issue I discovered at least on
> 8.1 and
is still present on 9.0-RELEASE.
> The problem is that, when compiled on amd64 but for i686 target, stat
function hangs with a core dump.
> $ gcc -m32 -DCOMPAT_32BIT -L/usr/lib32 -B/usr/lib32
> I don't see where I'm wrong but can't imagine I'm the only one having
Yes, -m32 doesn't work currently as it uses the wrong set of headers
(/usr/include/machine references amd64 headers, not i386 headers).
More information about the freebsd-bugs