* [gentoo-user] "universal" CFLAGS/CXXFLAGS/CHOST for 64bit (AMD64 & EMT64T)?
@ 2011-06-11 15:25 Jarry
2011-06-11 18:20 ` Florian Philipp
0 siblings, 1 reply; 2+ messages in thread
From: Jarry @ 2011-06-11 15:25 UTC (permalink / raw
To: gentoo-user
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
--
_______________________________________________________________
This mailbox accepts e-mails only from selected mailing-lists!
Everything else is considered to be spam and therefore deleted.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [gentoo-user] "universal" CFLAGS/CXXFLAGS/CHOST for 64bit (AMD64 & EMT64T)?
2011-06-11 15:25 [gentoo-user] "universal" CFLAGS/CXXFLAGS/CHOST for 64bit (AMD64 & EMT64T)? Jarry
@ 2011-06-11 18:20 ` Florian Philipp
0 siblings, 0 replies; 2+ messages in thread
From: Florian Philipp @ 2011-06-11 18:20 UTC (permalink / raw
To: gentoo-user
[-- Attachment #1: Type: text/plain, Size: 1399 bytes --]
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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 262 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-06-11 19:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-11 15:25 [gentoo-user] "universal" CFLAGS/CXXFLAGS/CHOST for 64bit (AMD64 & EMT64T)? Jarry
2011-06-11 18:20 ` Florian Philipp
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox