Am 11.06.2011 17:25, schrieb Jarry:
> Hi,
> how should I change/set CFLAGS/CXXFLAGS/CHOST if I want to have
> system which can be easily migrated between AMD64 and Intel/Core
> without recompilation? I have a few virtual servers which I can
> not move from one arch to the other, as they have hw-specific
> CFLAGS (different host-server hardware, both AMD64 and EM64T):
> 
> I have systems with Athlon64/X2 and Core2Quad, with settings:
> CFLAGS="-march=athlon64 -O2 -pipe"
> CFLAGS="-march=core2 -O2 -pipe"
> CHOST is always "x86_64-pc-linux-gnu".
> 
> I'm not sure "-mtune=generic" is the right solution, because
> it would generate code for IA32/AMD64/EM64T (if I understand
> gcc manual correctly, for both 32bit as well as 64bit HW).
> 
> What I'm looking for are some generic 64bit settings only for
> AMD64/EM64T (not 32bit/IA32) similar as for distros with binary
> distributions (i.e. I can download Ubuntu either 32bit or 64bit
> version, no other hardware-specific difference). I know with
> "universal" 64bit binaries I'm going to loose some pefrormance,
> but for me flexibility with migration would overweight this
> disadvantage...
> 
> Jarry
> 

Unless you specify -m32, your x86_64 gcc will create generic x86_64
code. That means it will use the common AMD64/EM64T instruction set
which also includes SSE2 instructions.

Regards,
Florian Philipp

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to