[Clfs-support] 64 bit cross compile

Nicholai Vesterløkke nve at mpitech.com
Thu Mar 19 02:18:07 PDT 2009


> "Koornstra, Reinoud" <koornstra at hp.com>
> I read in the gcc release notes:
Try 'info gcc' for the full manual

> "Tuning for Intel Core 2 processors is available via -mtune=core2 
> and -march=core2"
> 
> Is there any difference in setting -mtune and -march?
Yes,  mtune is only reordering instructions.
mach is generating code specific for the arch, and it also reorder 
instructions, that is why mach implies mtune.

> The BUILD64="-m64" is something that is advised on the clfs page for
> building for 64 bit.
m32/m64 is about the size on integer, float, etc.
 Since you are compiling for 64 bit, you should use m64, but I don't know 
if setting mach=core2 also implies m64.

> When building tools they start every time with: CC="${CC} ${BUILD64}"
> Hence I am considering to say BUILD64="-m64 -march=core2"
> Maybe this is already not necessary, in which case BUILD64="-m64 -
> march=core2 -mtune=core2"
> Would be totally useless and redundant?
Yes, IMHO

Regards
Nicholai



More information about the Clfs-support mailing list