On Wed, Dec 12, 2007 at 12:36:23AM +0000, Hugo Silva wrote:
>Building 32 bit binaries on amd64 apparently isn't working:
>
># cc -m64 -march=k8 -o test64 test.c && ./test64
>testing!!
>
># cc -m32 -march=k8 -o test32 test.c  && ./test32
>/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for 
>-lgcc
>/usr/bin/ld: skipping incompatible /usr/lib/libgcc.a when searching for 
>-lgcc
>/usr/bin/ld: cannot find -lgcc

This isn't supported at present.  Note that just pointing at
/usr/lib32 results in executables that won't run on FreeBSD/i386.
And, quite apart from the linker issues, 'cc -m32' is using the wrong
include files: All the machine-dependent types are defined in terms of
I32LP64 primitives whilst 'cc -m32' uses ILP32 primitives.

The current suggestion is to perform i386 compiles in a FreeBSD/i386
chroot environment.

-- 
Peter Jeremy
Please excuse any delays as the result of my ISP's inability to implement
an MTA that is either RFC2821-compliant or matches their claimed behaviour.

Attachment: pgplAAwvGyWcP.pgp
Description: PGP signature

Reply via email to