apt-build CPU最佳化參數? - Linux

By Hazel
at 2011-06-13T00:13
at 2011-06-13T00:13
Table of Contents
說真的,我很怕我根本就不知道我到底在問什麼...囧
我試著用apt-build編譯FireFox,並根據Core2Duo作最佳化。
因為我...不會寫程式,在這之前也對gcc之類的東西毫無概念。但還是很勉強的查了一些
資料出來:
march和mtune的区别
http://bit.ly/l9lSsK
Safe Cflags @ Gentoo Wiki
http://bit.ly/lRsTps
使用 apt-get build 編譯你的 firefox @ Ubuntu正體中文站
http://bit.ly/m6Wh9s
目前我的/etc/apt/apt-build.conf長這副德性:
build-dir = /var/cache/apt-build/build
repository-dir = /var/cache/apt-build/repository
Olevel = -O2
mtune = -mtune=core2
options = " "
make_options = "-j2"
我希望能盡量達到最好的效果,但...我根本不知該從何下手。
以下問題可能很可笑或根本牛頭不對馬嘴:
1.如果我只想盡量榨乾CPU,是不是就該用march?
2.我又在http://bit.ly/jld8sk中看到這段:
Warning: GCC 4.2 and above support -march=native, which automatically detects
the optimum settings to use based on your processor. -march=native also
detects and applies additional settings beyond -march specific to your CPU,
(eg. -msse4). Unless you have a specific reason not to (e.g. distcc
cross-compiling), you should probably be using -march=native rather than
anything listed below.
也就是說,好像根本不用管-msse -msse2 -msse3之類的參數?但有個問題...那我那一行
mtune = -mtune=core2到底該怎麼改?直接改成mtune = -march=native這樣,還是在
options裡加上-march=native而mtune = -mtune=core2繼續保持原樣?可是這樣感覺很矛盾
。
3.我找到有一個是說/etc/makepkg.conf的檔案可以自訂成像這樣
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O3 -msse -msse2 -msse3 -pipe -fomit-frame-pointer"
,不過這好像是Arch Linux獨有的的設定檔?
4.所以...最後一個問題:我到底該怎麼做?囧
我已經盡我所能的查出可能有用的說明,也自己動手做過,只是還是不懂。希望這樣不會
感覺像是來乞討答案的...謝謝。
--
--
我試著用apt-build編譯FireFox,並根據Core2Duo作最佳化。
因為我...不會寫程式,在這之前也對gcc之類的東西毫無概念。但還是很勉強的查了一些
資料出來:
march和mtune的区别
http://bit.ly/l9lSsK
Safe Cflags @ Gentoo Wiki
http://bit.ly/lRsTps
使用 apt-get build 編譯你的 firefox @ Ubuntu正體中文站
http://bit.ly/m6Wh9s
目前我的/etc/apt/apt-build.conf長這副德性:
build-dir = /var/cache/apt-build/build
repository-dir = /var/cache/apt-build/repository
Olevel = -O2
mtune = -mtune=core2
options = " "
make_options = "-j2"
我希望能盡量達到最好的效果,但...我根本不知該從何下手。
以下問題可能很可笑或根本牛頭不對馬嘴:
1.如果我只想盡量榨乾CPU,是不是就該用march?
2.我又在http://bit.ly/jld8sk中看到這段:
Warning: GCC 4.2 and above support -march=native, which automatically detects
the optimum settings to use based on your processor. -march=native also
detects and applies additional settings beyond -march specific to your CPU,
(eg. -msse4). Unless you have a specific reason not to (e.g. distcc
cross-compiling), you should probably be using -march=native rather than
anything listed below.
也就是說,好像根本不用管-msse -msse2 -msse3之類的參數?但有個問題...那我那一行
mtune = -mtune=core2到底該怎麼改?直接改成mtune = -march=native這樣,還是在
options裡加上-march=native而mtune = -mtune=core2繼續保持原樣?可是這樣感覺很矛盾
。
3.我找到有一個是說/etc/makepkg.conf的檔案可以自訂成像這樣
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=core2 -O3 -msse -msse2 -msse3 -pipe -fomit-frame-pointer"
,不過這好像是Arch Linux獨有的的設定檔?
4.所以...最後一個問題:我到底該怎麼做?囧
我已經盡我所能的查出可能有用的說明,也自己動手做過,只是還是不懂。希望這樣不會
感覺像是來乞討答案的...謝謝。
--
推 defenser:我承認她們全都是我的後宮(  ̄ c ̄)y▇▇▇▇▇▇▇~※ 04/08 21:32
推 BSpowerx: ◤ 大砲 █● 04/08 21:34
推 cy0816: ▇▇▇▇▇▇▇▇▇▇04/08 21:35
→ Augustus5: ●04/08 21:35
→ LoveMakeLove: *******************04/08 21:35
推 Raptorjet:樓上那啥鬼04/08 21:38
--
Tags:
Linux
All Comments

By Rachel
at 2011-06-13T10:19
at 2011-06-13T10:19

By Olga
at 2011-06-17T23:58
at 2011-06-17T23:58

By Emily
at 2011-06-18T11:00
at 2011-06-18T11:00

By Lydia
at 2011-06-21T04:00
at 2011-06-21T04:00

By Kumar
at 2011-06-23T00:23
at 2011-06-23T00:23

By Skylar DavisLinda
at 2011-06-27T18:59
at 2011-06-27T18:59

By Odelette
at 2011-06-30T20:06
at 2011-06-30T20:06

By Rebecca
at 2011-07-04T01:48
at 2011-07-04T01:48

By Todd Johnson
at 2011-07-08T04:51
at 2011-07-08T04:51

By Sarah
at 2011-07-11T03:47
at 2011-07-11T03:47

By Thomas
at 2011-07-11T23:10
at 2011-07-11T23:10

By Queena
at 2011-07-13T20:07
at 2011-07-13T20:07

By Megan
at 2011-07-17T12:50
at 2011-07-17T12:50

By Hazel
at 2011-07-17T23:42
at 2011-07-17T23:42

By Ingrid
at 2011-07-21T16:21
at 2011-07-21T16:21

By Carolina Franco
at 2011-07-23T03:35
at 2011-07-23T03:35

By Kama
at 2011-07-24T04:01
at 2011-07-24T04:01

By Wallis
at 2011-07-25T08:16
at 2011-07-25T08:16

By Carolina Franco
at 2011-07-28T04:22
at 2011-07-28T04:22

By Emily
at 2011-08-01T09:22
at 2011-08-01T09:22

By Hedwig
at 2011-08-03T11:26
at 2011-08-03T11:26

By Lydia
at 2011-08-04T11:26
at 2011-08-04T11:26

By Blanche
at 2011-08-05T10:01
at 2011-08-05T10:01

By Ursula
at 2011-08-10T09:34
at 2011-08-10T09:34

By Barb Cronin
at 2011-08-15T06:45
at 2011-08-15T06:45

By Lily
at 2011-08-17T11:56
at 2011-08-17T11:56

By Erin
at 2011-08-18T04:12
at 2011-08-18T04:12

By Valerie
at 2011-08-21T20:49
at 2011-08-21T20:49
Related Posts
LXDE ppa更新後垃圾桶看不到任何檔案

By Mia
at 2011-06-12T16:12
at 2011-06-12T16:12
在linux底下影音編輯(WandererM大大推薦的OPENSHOT很好用!)

By Regina
at 2011-06-12T13:45
at 2011-06-12T13:45
請教該如何安裝行列輸入法

By Mason
at 2011-06-12T10:41
at 2011-06-12T10:41
顯示卡驅動問題

By Necoo
at 2011-06-12T02:34
at 2011-06-12T02:34
Gparted+Testdisk問題

By Freda
at 2011-06-12T01:27
at 2011-06-12T01:27