public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
From: Florian Philipp <lists@binarywings.net>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] "universal" CFLAGS/CXXFLAGS/CHOST for 64bit (AMD64 & EMT64T)?
Date: Sat, 11 Jun 2011 20:20:02 +0200	[thread overview]
Message-ID: <4DF3B1D2.5060909@binarywings.net> (raw)
In-Reply-To: <4DF388FC.9010600@gmail.com>

[-- 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 --]

      reply	other threads:[~2011-06-11 19:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-11 15:25 [gentoo-user] "universal" CFLAGS/CXXFLAGS/CHOST for 64bit (AMD64 & EMT64T)? Jarry
2011-06-11 18:20 ` Florian Philipp [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4DF3B1D2.5060909@binarywings.net \
    --to=lists@binarywings.net \
    --cc=gentoo-user@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox