Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
nochmal CFLAGS
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German)
View previous topic :: View next topic  
Author Message
flammenflitzer
Advocate
Advocate


Joined: 25 Nov 2003
Posts: 3541
Location: Berlin

PostPosted: Tue Feb 05, 2008 9:14 pm    Post subject: nochmal CFLAGS Reply with quote

Hallo
Ich habe mich geraume Zeit nicht mehr mit dem Thema beschäftigt.
Nachdem ich eine zeit lang
Code:
 CHOST="x86_64-pc-linux-gnu"

 CFLAGS="-mtune=nocona"
 CFLAGS="${CFLAGS} -march=nocona"
 CFLAGS="${CFLAGS} -O2"
 CFLAGS="${CFLAGS} -combine"
 CFLAGS="${CFLAGS} -falign-functions=0"
 CFLAGS="${CFLAGS} -falign-jumps=0"
 CFLAGS="${CFLAGS} -falign-labels=0"
 CFLAGS="${CFLAGS} -falign-loops=0"
 CFLAGS="${CFLAGS} -fearly-inlining"
 CFLAGS="${CFLAGS} -ffunction-cse"
 CFLAGS="${CFLAGS} -fgcse-after-reload"
 CFLAGS="${CFLAGS} -fgcse-lm"
 CFLAGS="${CFLAGS} -fkeep-static-consts"
 CFLAGS="${CFLAGS} -floop-optimize2"
 CFLAGS="${CFLAGS} -fmerge-constants"
 CFLAGS="${CFLAGS} -fno-ident"
 CFLAGS="${CFLAGS} -fomit-frame-pointer"
 CFLAGS="${CFLAGS} -fprefetch-loop-arrays"
 CFLAGS="${CFLAGS} -frename-registers"
 CFLAGS="${CFLAGS} -fweb"
 CFLAGS="${CFLAGS} -mmmx"
 CFLAGS="${CFLAGS} -msse"
 CFLAGS="${CFLAGS} -msse2"
 CFLAGS="${CFLAGS} -msse3"
 CFLAGS="${CFLAGS} -msse4"
 CFLAGS="${CFLAGS} -m80387"
 CFLAGS="${CFLAGS} -pipe"
 CFLAGS="${CFLAGS} -s"

 LDFLAGS="-Wl,-O4"
 LDFLAGS="${LDFLAGS} -Wl,--as-needed"
 LDFLAGS="${LDFLAGS} -Wl,--enable-new-dtags"
 LDFLAGS="${LDFLAGS} -Wl,-s"
 LDFLAGS="${LDFLAGS} -Wl,--sort-common"
 LDFLAGS="${LDFLAGS} -Wl,-z"
 LDFLAGS="${LDFLAGS} -Wl,now"

 CXXFLAGS="${CFLAGS}"

 Makeopts="-j1 -s"

 FORKS="2"
(hatte so meine Zweifel, ob das wirklich etwas bringt, außer längerem kompilieren)
habe ich jetzt schon ziemlich lange
Code:

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -s -mfpmath=sse -msse2 -mmmx"
CXXFLAGS="${CFLAGS}"

Jetzt bin ich gerade über info2flags gestolpert.
Code:
[localhost olaf # info2flags
Giving up
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-m64 -O3 -pipe -fPIC"
CXXFLAGS="-m64 -O3 -pipe -fPIC"
Ist das denn performanter?
Code:
localhost olaf # cat /proc/cpuinfo
model name      : Intel(R) Core(TM)2 Duo CPU     E6750  @ 2.66GHz
flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall lm constant_tsc arch_perfmon pebs bts rep_good pni monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr lahf_lm
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Tue Feb 05, 2008 9:40 pm    Post subject: Re: nochmal CFLAGS Reply with quote

flammenflitzer wrote:
Jetzt bin ich gerade über info2flags gestolpert.
Code:
[localhost olaf # info2flags
Giving up
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-m64 -O3 -pipe -fPIC"
CXXFLAGS="-m64 -O3 -pipe -fPIC"
Ist das denn performanter?

Das ist eher einfach nur totaler Unfug.
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
blu3bird
Retired Dev
Retired Dev


Joined: 04 Oct 2003
Posts: 614
Location: Munich, Germany

PostPosted: Tue Feb 05, 2008 10:55 pm    Post subject: Re: nochmal CFLAGS Reply with quote

gimpel wrote:
flammenflitzer wrote:
Jetzt bin ich gerade über info2flags gestolpert.
Code:
[localhost olaf # info2flags
Giving up
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-m64 -O3 -pipe -fPIC"
CXXFLAGS="-m64 -O3 -pipe -fPIC"
Ist das denn performanter?

Das ist eher einfach nur totaler Unfug.

++

Das wäre auf jeden Fall performanter:
Code:
CC="icc"
CXX="icpc"
CFLAGS="-O3 -Ob2 -tpp7 -xT -parallel -complex_limited_range -rcd -openmp -fp_port -ipo -static -no-prec-div"
CXXFLAGS="${CFLAGS}"
CPPFLAGS="${CFLAGS}"

Hätte aber den Nachteil, dass 70% aller Anwedungen nicht kompilieren und von den 30% die kompilieren haben nochmal 80% unvorhersehbare Laufzeitfehler...

Ps: Irgendwie vermiss ich bei Deinem 1. Post -funroll-loops *g*
_________________
Black Holes are created when God divides by zero!
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Wed Feb 06, 2008 11:45 am    Post subject: Re: nochmal CFLAGS Reply with quote

flammenflitzer wrote:

CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer -s -mfpmath=sse -msse2 -mmmx"
CXXFLAGS="${CFLAGS}"[/code]


die besten Flags in deinem Fall:
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"
CXXFLAGS="${CFLAGS}"

und natürlich
MAKEOPTS="-j3"
und LDFLAGS nicht gesetzt.

Kompiliert am schnellsten, läuft am schnellsten, ist am stabilsten.

-s?

Wer hat dir das geflüstert?
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Wed Feb 06, 2008 12:12 pm    Post subject: Re: nochmal CFLAGS Reply with quote

energyman76b wrote:

die besten Flags in deinem Fall:
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"


-fomit-frame-pointer ist bei AMD64 bereits ab -O2 automatisch aktiviert und damit als CFLAG redundant.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
energyman76b
Advocate
Advocate


Joined: 26 Mar 2003
Posts: 2048
Location: Germany

PostPosted: Wed Feb 06, 2008 12:14 pm    Post subject: Re: nochmal CFLAGS Reply with quote

schachti wrote:
energyman76b wrote:

die besten Flags in deinem Fall:
CFLAGS="-march=nocona -O2 -pipe -fomit-frame-pointer"


-fomit-frame-pointer ist bei AMD64 bereits ab -O2 automatisch aktiviert und damit als CFLAG redundant.


auch bei nocona?
_________________
Study finds stunning lack of racial, gender, and economic diversity among middle-class white males

I identify as a dirty penismensch.
Back to top
View user's profile Send private message
schachti
Advocate
Advocate


Joined: 28 Jul 2003
Posts: 3765
Location: Gifhorn, Germany

PostPosted: Wed Feb 06, 2008 12:30 pm    Post subject: Reply with quote

Ich bin mir eigentlich relativ sicher, ja. Selbst herausfinden kann man das leicht, indem man die Option -v benutzt. Und im gentoo-wiki taucht -fomit-frame-pointer für nocona ebenfalls nicht auf.
_________________
Never argue with an idiot. He brings you down to his level, then beats you with experience.

How-To: Daten verschlüsselt auf DVD speichern.
Back to top
View user's profile Send private message
flammenflitzer
Advocate
Advocate


Joined: 25 Nov 2003
Posts: 3541
Location: Berlin

PostPosted: Wed Feb 06, 2008 1:34 pm    Post subject: Reply with quote

Dann taugt das Tool info2flags wohl nichts.
Übrigens hatte ich bei meinem alten amd64 ein AMD pdf, in dem u.a. die möglichen und die empfohlenen Compileroptionen für gcc 4 enthalten waren. Habe ich für meinen Intel Dual Core noch nicht gefunden.
Back to top
View user's profile Send private message
Klaus Meier
Advocate
Advocate


Joined: 18 Apr 2005
Posts: 2908
Location: Bozen

PostPosted: Wed Feb 06, 2008 2:57 pm    Post subject: Reply with quote

flammenflitzer wrote:
Dann taugt das Tool info2flags wohl nichts.
Übrigens hatte ich bei meinem alten amd64 ein AMD pdf, in dem u.a. die möglichen und die empfohlenen Compileroptionen für gcc 4 enthalten waren. Habe ich für meinen Intel Dual Core noch nicht gefunden.

Wenn du die Datei noch hast, dann wirf sie ganz schnell weg. Totaler Unfung. Gibt in der Doku zu Gentoo da eine ganz eindeutige Aussage, finde es aber gerade nicht. Jedenfalls ist es genau das, was energyman76b geschrieben hat.

-fomit-frame-pointer sollte nach meinen Informationen bei 64-bit Versionen automatisch aktiv sein, aber die Aussage kann auch aus einer Zeit stammen, als 64-bit ausschließlich AMD war.
Back to top
View user's profile Send private message
flammenflitzer
Advocate
Advocate


Joined: 25 Nov 2003
Posts: 3541
Location: Berlin

PostPosted: Wed Feb 06, 2008 3:06 pm    Post subject: Reply with quote

Ich wollte damit sagen, das ich von Intel noch kein Dokument gefunden habe, wo eine Aussage vom Hersteller zur Problematik enthalten ist.
Back to top
View user's profile Send private message
gimpel
Advocate
Advocate


Joined: 15 Oct 2004
Posts: 2720
Location: Munich, Bavaria

PostPosted: Wed Feb 06, 2008 3:19 pm    Post subject: Reply with quote

flammenflitzer wrote:
Dann taugt das Tool info2flags wohl nichts.

Nicht wirklich. GCC kann das selber besser, seit 4.2 iirc.

-march=native
_________________
http://proaudio.tuxfamily.org/wiki - pro-audio software overlay
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Deutsches Forum (German) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum