[fbsd_questions] i386 vs amd64, on intel_64

spellberg_robert emailrob at emailrob.com
Mon Oct 4 23:18:34 UTC 2010


aha !

this relates to what i found in <machine/types.h>,
   on my existing i386 version of freebsd on my intel_64 hardware platform.

i will look into the "questions" archive.

meanwhile, back at the ranch,
   does this mean that i need the "amd64" version of freebsd to get the right headers ?



Dan Nelson wrote:
> In the last episode (Oct 04), David Brodbeck said:
> 
>>On a 64-bit system, if you build a binary with the -m32 flag, it
>>should run on both i386 and x86-64 systems.  A binary built with -m64
>>will only run on x86-64.  Does that help?
> 
> 
> Actually, -m32 on amd64 won't generate usable binaries, since
> /usr/include/machine/* are all amd64 headers and you end up with things like
> struct FILE with wrong-size elements.  There was a thread a few weeks ago
> discussing this.  If you need to generate 32-bit executables, you'll need to
> do it inside an all-32-bit chroot or a virtual machine.
> 




More information about the freebsd-questions mailing list