This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: 32-bit host vs 64-bit host


On 02/24/2014 10:26 PM, Grant Edwards wrote:
Let's say I build two copies of the "same" toolchain: one on a 32-bit
(i686) host and the other on a 64-bit (amd64) host: both are using the
same configuration, same sources files, for the same target (e.g. ARM).

Would you expect the two toolchains to produce identical code when
given identical sources?
Theoretically, yes.

Or are there certain optimizations or transformations that differ
depend on the _host_ machine word-size or architecture?
Theoretically, this should not happen, but it's thinkable.

What I've occasionally seen in the past, is bugs (not design limitations) related to using 32bit/64bit hosts (in GCC or binutils) showing effect on target binaries. However, these occasion were rare.

For example: for the past few years you've been building an embedded
linux linux system for an ARM9 target using a 32-bit hosted toolchain.
How much of a risk is there if you move development to a 64-bit host
and rebuild your toolchains as 64-bit apps?
There is a risk, but it's fairly small. Negligible, IMHO, in comparison to other factors contributing to potential differences (Host-libraries, host-OS-toolchain bugs/incompatiblities, target-toolchain bugs, etc.).

> [Yes, I know that if you have 32-bit compatibility libraries you can
> continue to use the existing 32-bit toolchain binaries.]
It you're really scared, this feature would enable you to check yourself. Build a 32bit and a 64bit-hosted toolchain, install them in parallel and compare the resulting target files.

Ralf



--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]