[Clfs-support] Cross tool chain output

Joe Ciccone jciccone at gmail.com
Tue Sep 15 05:54:15 PDT 2009


Jonathan Cave wrote:
> Hi,
>
> I have been following the pattern described in stable series CLFS to
> produce a cross-compiling tool chain. I have two servers available
> that I would like to use as hosts both of which are Intel x86 based,
> however one runs RHEL 3 and one runs CentOS 5.x.
>
> I have been able to construct the toolchain on both servers, but have
> been surprised that source code compiled for the target with the
> toolchain on one server does not produce identical binary output to
> that built with the toolchain on the other server. The file size of
> object files produced always differs from one server to the other and
> investigations with nm indicates that are differences throughout the
> files.
>
> Is this what should be expected? I felt that the cross toolchain and
> target filesystem if properly built would result in identical output.
I would assume that they should be 100% identical if the toolchains are
also identical. Were you following the stable book or the development
book. The development book is in constant flux. If you used a different
dev book I wouldn't be suprised if the output was different.

Another possibility is that GCC is optimizing the code for the cpu of
the host. It shouldn't be doing this, but if the host and target
tripplets are similar enough it may. Take a look at $CLFS_TARGET-gcc
-dumpspecs in the *cc1_cpu: section.



More information about the Clfs-support mailing list