LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1222|回复: 10

AMD64的CPU应该怎么设置优化参数??

[复制链接]
发表于 2004-10-9 12:49:13 | 显示全部楼层 |阅读模式
如题。
 楼主| 发表于 2004-10-9 14:38:17 | 显示全部楼层
那位大侠帮我一下
 楼主| 发表于 2004-10-9 19:02:48 | 显示全部楼层
奇怪,难道没人装过gentoo AMD64的?
想知道CFLAG的-march参数怎么设置,谢谢!!
-march=i686???
发表于 2004-10-9 21:05:21 | 显示全部楼层
我这边是没有加,当时看gcc3.3的帮助还特别说了不能用athlon-xp的优化参数,不过gcc3.4有了专门的优化参数是k8
发表于 2004-10-10 10:09:13 | 显示全部楼层
# AMD64 users who want to use a native 64 bit system should not use athlon-xp
-march=athlon-xp
发表于 2004-10-10 10:09:58 | 显示全部楼层
# AMD64 users who want to use a native 64 bit system should not use athlon-xp
-march=athlon-xp
native 64
http://forums.gentoo.org/viewtopic.php?t=225828
 楼主| 发表于 2004-10-10 14:53:59 | 显示全部楼层
3.k. Properly Setting CFLAGS

The name of the CPU is "k8", but you don't need to put it as a -march=k8 since there is only one x86-64 CPU out there anyways. GCC version before 3.4 will not recognize -march=k8 and will FAIL if it is set.

Code Listing 7: gcc-3.3 CFLAGS

...
CFLAGS="-O2 -pipe"
...


Code Listing 8: gcc-3.4 CFLAGS

...
CFLAGS="-march=k8 -O2 -pipe"
...


Note: -march=k8 equals -march=athlon64 equals -march=opteron.
发表于 2005-8-1 18:51:28 | 显示全部楼层
兄弟的电脑基本跟我一样,就是显卡我是6200A的……
安装基本系统,快很多么?
回复 支持 反对

使用道具 举报

发表于 2005-8-1 19:50:58 | 显示全部楼层
优化是在use中设置是否需要编译32位代码。记不太请了,看精华区吧。
回复 支持 反对

使用道具 举报

发表于 2005-8-1 21:34:49 | 显示全部楼层
先看官方文档啊--说的很清啊。k8
What CFLAGS should I use for AMD64/EM64T?

You should use simple CFLAGS to avoid future problems with your system. For example, you should use CFLAGS="-march=k8 -O2 -pipe" for Athlon64 or Opteron and CFLAGS="-march=nocona -O2 -pipe" for a EM64T processor. If you plan to use a 32-bit chroot, you should use CFLAGS="-march=athlon-xp -O2 -pipe -msse2" for a AMD64 processor; for a EM64T, you should use CFLAGS="-march=pentium4 -O2 -pipe" inside the chroot.

Note: -march=k8 is the same as -march=athlon64 and -march=opteron.

Warning: You should never place -fPIC, -m32 or -m64 in your CFLAGS. They are automatically added whenever they are needed. Please also note that the -Os flag is currently not supported.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表