Date: Tue, 05 Oct 2010 00:37:47 +0100 From: spellberg_robert <emailrob@emailrob.com> To: Dan Nelson <dnelson@allantgroup.com>, fbsd_questions <freebsd-questions@freebsd.org> Subject: Re: [fbsd_questions] i386 vs amd64, on intel_64 Message-ID: <4CAA654B.7040409@emailrob.com> References: <4CAA3030.3090001@emailrob.com> <AANLkTintm_XubwCCRNJci99Y4M6nwbFr=oiKqBw2%2Ba9M@mail.gmail.com> <4CAA3CFE.1060609@emailrob.com> <AANLkTi=e8cBqd6Z=zxOxpMZm_RD=-RODupzprK843=qF@mail.gmail.com> <20101004225757.GK40148@dan.emsphone.com>
next in thread | previous in thread | raw e-mail | index | archive | help
well, i looked at questions back to the beginning of august. on aug_09 i found a thread that suggests the following questions. for a given release of freebsd, q: is it that the version labeled "i386" contains only 32_bit headers and source, which creates the 32_bit version of freebsd, as well as 32_bit versions of what i write, which will run as 32_bit code on either i_386, intel_64 or amd_64 ? q: is it that the version labeled "amd64" contains only 64_bit headers and source, which creates the 64_bit version of freebsd, as well as 64_bit versions of what i write, which will run as 64_bit code on the intel_64 and the amd_64, but, not the i_386 ? q: if a "i386" version is installed on an intel_64 platform, then the pointers are 32_bits_wide, no matter what ? q: if i want to produce both 32_bit and 64_bit versions of my "killer_app", then i need two machines, one a 32_bit or a 64_bit running "i386", the other --only-- a 64_bit running "amd64" ? q: given that i have intel_64 hardware, do i need to start acquiring the "amd64" versions of the releases, rather_than / in_addition_to the "i386" versions ? q: given that --i-- am committed to 64_bit hardware, perhaps, i should give up on the "i386" versions of the releases and require my users to spend us$_300 on 64_bit hardware [ it would save a large number of conditional_compilation directives; nudge_nudge, wink_wink, say no more ] ? again, i thank you for your assistance. rob 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. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4CAA654B.7040409>