LinuxSir.cn,穿越时空的Linuxsir!

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

大家都用什么CFLAGS?

[复制链接]
发表于 2008-2-23 14:54:23 | 显示全部楼层 |阅读模式
我的pentium-m 用
CFLAGS="-mtune=pentium-m -Wall -O2 -march=pentium-m -pipe -fomit-frame-pointer -msse2 -mmmx -mfpmath=sse"

可以么?
发表于 2008-2-23 16:00:21 | 显示全部楼层
CFLAGS="-march=k8 -O3 -pipe -fomit-frame-pointer -msse3"

我的。
回复 支持 反对

使用道具 举报

发表于 2008-2-23 16:30:54 | 显示全部楼层
回复 支持 反对

使用道具 举报

 楼主| 发表于 2008-2-23 19:01:56 | 显示全部楼层
Mercy......
回复 支持 反对

使用道具 举报

发表于 2008-2-24 08:52:25 | 显示全部楼层
arch下用的试默认的,但是那个默认-j2改成了-j3(双核最好这样改,加快编译速度)
回复 支持 反对

使用道具 举报

发表于 2008-2-24 14:49:37 | 显示全部楼层
jn好像应该由核心数x2+1这样定义,单核就应该是j3,双核是j5
回复 支持 反对

使用道具 举报

发表于 2008-2-24 14:58:53 | 显示全部楼层
  1. CFLAGS="-march=pentium4 -mtune=pentium4 -O2 -pipe -fomit-frame-pointer"
  2. CXXFLAGS="-march=pentium4 -mtune=pentium4 -O2 -pipe -fomit-frame-pointer"
复制代码
回复 支持 反对

使用道具 举报

发表于 2008-2-24 15:19:54 | 显示全部楼层
GCC 4.2 introduces a new -march option, -march=native, which automatically detects the features your CPU supports and sets the options appropriately. If you have an Intel or AMD CPU and are using >=sys-devel/gcc-4.2.0, using -march=native is recommended. Do NOT use -march=native if you use distcc on nodes with different architectures as this may produce unusable code.

有多少人不是>=gcc4.2.2的?
回复 支持 反对

使用道具 举报

发表于 2008-2-24 19:31:46 | 显示全部楼层
Post by jarryson;1819561
jn好像应该由核心数x2+1这样定义,单核就应该是j3,双核是j5


记得用gentoo的时候配置文件里面注释的说明写是核心数+1 也就是 单核是j2,双核是j3
难道arch特殊点?
回复 支持 反对

使用道具 举报

发表于 2008-2-24 20:45:52 | 显示全部楼层
一般不需要-mtune,如果开启-march,则不需要-mssex,至于--mfpmath=sse,387 据gentoo wiki,除非你是amd64,则不需开启,否则会有不少问题,如gtk程序。
回复 支持 反对

使用道具 举报

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

本版积分规则

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