GCC -m32 option on FreeBSD/AMD64 7.2

Peter Jeremy peterjeremy at acm.org
Wed Sep 9 20:57:57 UTC 2009


On 2009-Sep-01 19:13:03 +0200, Václav Haisman <v.haisman at sh.cvut.cz> wrote:
>is C++ + GCC -m32 option officially supported by FreeBSD/AMD64 7.2?

The short answer is "no" - though this is a common request and there
are some PRs open for it.  At present, the only supported way to build
i386 code on amd64 is by installing an i386 world and compiling in
either a jail or chroot.

Basically, whilst '-m32' correctly generates 32-bit code, virtually
all programs wind up (indirectly) #include'ing files from
/usr/include/machine and this directory assumes the native machine
definitions - in the case of amd64, longs and pointers are 64-bits.
Whilst it's not immediately obvious what happened here, I am confident
this is the underlying cause.

-- 
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20090909/8440d7d0/attachment.pgp


More information about the freebsd-stable mailing list