Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC 4.3.0 testing!
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3 ... 27, 28, 29  Next  
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Sun Nov 19, 2006 2:47 pm    Post subject: GCC 4.3.0 testing! Reply with quote

Code:
A new forward propagation pass on RTL was added. The new pass replaces several slower transformations, resulting in compile-time improvements as well as better code generation in some cases.


What do you think about it?
I know, it's in early, stage 1, but maybe someone wanna test it?
It's in portage.
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Sun Nov 19, 2006 2:50 pm    Post subject: Re: GCC 4.3.0 testing! Reply with quote

Morpheouss wrote:
I know, it's in early, stage 1, but maybe someone wanna test it?

Nah. Gonna wait until ecj is merged into the trunk as java compiler.
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Sun Nov 19, 2006 2:57 pm    Post subject: Reply with quote

ecj? what's that? :P
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
Voltago
Advocate
Advocate


Joined: 02 Sep 2003
Posts: 2593
Location: userland

PostPosted: Sun Nov 19, 2006 3:00 pm    Post subject: Reply with quote

Eclipse Compiler for Java. It will replace gcj and bring support for JDK-5.
EDIT: For JDK-5 language features (generics, annotations), that is.


Last edited by Voltago on Sun Nov 19, 2006 5:05 pm; edited 1 time in total
Back to top
View user's profile Send private message
Phenax
l33t
l33t


Joined: 10 Mar 2006
Posts: 972

PostPosted: Sun Nov 19, 2006 4:23 pm    Post subject: Reply with quote

I was going to try it on the day of the release, but it didn't even compile here. 4.2.0 compiles fine, and fails on very few packages (Most notably Perl).
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Sun Nov 19, 2006 4:34 pm    Post subject: Reply with quote

are there any patches for 4.2 or 4.3?
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
rhill
Retired Dev
Retired Dev


Joined: 22 Oct 2004
Posts: 1629
Location: sk.ca

PostPosted: Sun Nov 19, 2006 5:46 pm    Post subject: Reply with quote

no, there's not much point in writing patches for an alpha compiler that still has most of the projects yet to be merged. 4.2 is relatively stable but we don't support it and we haven't migrated the patchset and probably won't until release.
_________________
by design, by neglect
for a fact or just for effect
Back to top
View user's profile Send private message
f0rk
Apprentice
Apprentice


Joined: 15 Nov 2004
Posts: 273
Location: Moscow

PostPosted: Sun Nov 19, 2006 10:16 pm    Post subject: Reply with quote

Gcc 4.3.0-alpha20061111 is c00l ! ;)
I'm using gentoo with these unstable flags:
LDFLAGSHASHSTYLE=" -Wl,--hash-style=both"
CFLAGS="-Os -march=pentium3 -frename-registers -fweb -pipe -fomit-frame-pointer -funit-at-a-time -freorder-blocks -fno-ident -freorder-blocks-and-partition -fgcse-sm -fgcse-las -fgcse-after-reload -fmerge-all-constants -combine"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1${LDFLAGSHASHSTYLE}"

Earlier when I used gcc-4.1.1 whole system compiled well but except python.
It doesn't emerge with stable gcc-4.1.1 (segfault)
Now I use gcc-4.3 as a default compiler.
With new experimental gcc python compiled and works fine !!!

And compile-time rather reduced...

Now I migrated from original qt-3.3.6-r4 to nxsty's QT.
And it was compiled faster than with gcc 4.1.1
(I won about 40 min !)


Last edited by f0rk on Mon Nov 20, 2006 4:15 pm; edited 2 times in total
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Mon Nov 20, 2006 3:28 pm    Post subject: Reply with quote

f0rk wrote:
Gcc 4.3.0-alpha20061111 is c00l ! ;)
I'm using gentoo with these unstable flags:
LDFLAGSHASHSTYLE=" -Wl,--hash-style=both"
CFLAGS="-Os -march=pentium3 -frename-registers -fweb -pipe -fomit-frame-pointer -funit-at-a-time -freorder-blocks -fno-ident -freorder-blocks-and-partition -fgcse-sm -fgcse-las -fgcse-after-reload -fmerge-all-constants -combine"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1${LDFLAGSHASHSTYLE}"

Whole system compiled well but except python.
It doesn't emerge with stable gcc-4.1.1 (segfault)
With new experimental gcc it compiled and works fine !!!

And compile-time rather reduced...

Now I migrated from original qt-3.3.6-r4 to nxsty's QT.
And it was compiled faster than with gcc 4.1.1
(I won about 40 min !)


I don't understand something..
1) Have you successfull compiled python using GCC 4.3?
2) You have compiled QT 40minutes faster, haven't you?



Another question: Why don't you upgrade ebuild for gcc 4.3.0?
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
f0rk
Apprentice
Apprentice


Joined: 15 Nov 2004
Posts: 273
Location: Moscow

PostPosted: Mon Nov 20, 2006 4:14 pm    Post subject: Reply with quote

Sorry. Updated. See above! :)
1) Yes, I compiled successfull python using GCC 4.3
Earlier I couldn't do it with gcc 4.1.1 (using unsafe flags)
2) Yes! You understood right!
genlop -t qt says:
//----------- gcc 4.1.1-r2:
Thu Nov 16 15:46:03 2006 >>> x11-libs/qt-3.3.6-r4
merge time: 2 hours, 1 minute and 29 seconds.
//----------- gcc 4.3.0-alpha:
Mon Nov 20 04:21:53 2006 >>> x11-libs/qt-3.3.6-r4
merge time: 1 hour, 17 minutes and 30 seconds.

I have pentium-3 750 Hz on my laptop.
I'm using glibc-2.5 and binutils-2.17.50.0.5 with hashstyle.
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Mon Nov 20, 2006 4:18 pm    Post subject: Reply with quote

questions to f0rk:
1) Have you successful recompiled all packages in your system using GCC 4.3?
2) Have you compiled firefox? Does it work faster? Doesn't it fault?
3) Have you compiled KDE?
4) Do you use beryl? How does it work after compiltion using GCC 4.3?
5) Have you compiled OpenOffice? If QT compiled 40minutes faster, maybe OOo will compile much faster too?
6) Why don't you use tree vectorization? It had to be repaired in GCC 4.2
7) Do you use prelink?
8) Do you use x86 ~x86, amd64 or maybe ~amd64?
9) Wchi python version have you compiled? ;)

Thanks!
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
f0rk
Apprentice
Apprentice


Joined: 15 Nov 2004
Posts: 273
Location: Moscow

PostPosted: Mon Nov 20, 2006 5:02 pm    Post subject: Reply with quote

Morpheouss wrote:
questions to f0rk:
1) Have you successful recompiled all packages in your system using GCC 4.3?
2) Have you compiled firefox? Does it work faster? Doesn't it fault?
3) Have you compiled KDE?
4) Do you use beryl? How does it work after compiltion using GCC 4.3?
5) Have you compiled OpenOffice? If QT compiled 40minutes faster, maybe OOo will compile much faster too?
6) Why don't you use tree vectorization? It had to be repaired in GCC 4.2
7) Do you use prelink?
8) Do you use x86 ~x86, amd64 or maybe ~amd64?
9) Wchi python version have you compiled? ;)

Thanks!


1) No. I didn't try to do it.
But I think it wouldn't be a problem! ;)
IMHO: it is more useful than 4.1 and rather stable at the same time...
2) I use opera instead firefox. But now I'm emering seamonkey (mozilla like)...
And there is no faults ...
I suggest firefox also will be compiled well.
3) Some part of KDE:
kde-base/kdelibs-3.5.5
kde-base/libkonq-3.5.5
kde-base/ksmserver-3.5.5
kde-base/kcontrol-3.5.5
kde-base/kdesktop-3.5.5
kde-base/kicker-3.5.5
kde-base/konqueror-3.5.5
and some themes...
All packages were compiled fine!
I'm using kde 3.5.5 + KIP.
4) No, unfortunatelly I don't use it, because I have only ATI Rage 128 8 mb on my laptop... :(
5) No. I'm using openoffice-bin. Good idea about attempt to compile it! May be I'll try it later...
6) What is "tree vectorization" ??? I didn't hear about it.
7) Yes. I do.
By the way: patched glibc + patched qt + patched kde + prelink + no2-sources help me to reduce time of kde startup. It takes about 4-5 sec !!! :)
(It takes about 10-13 seconds on my friend's desktop with intel conroe core duo ;) )
8) I use: x86 + ~x86 for some packages, but packages.keywords becomes rather big and I'm pondering about migrating to ~x86 only.
9) python-2.4.3-r4
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Mon Nov 20, 2006 5:16 pm    Post subject: Reply with quote

CFLAGS="-ftree-vectorize"

it speeds up bigsoftware like KDE, OpenOffice, Firefox imho should speedup too.


It would be great if you try to emerge -e world ;) and it end successful...

Also, you could try to recompile OOo then...

I you had no trubles with it, i would compile new 64-bit Gentoo using GCC 4.3

using this make.conf:
Code:
# MAKE.CONF made by Morpheouss!
# 19/11/2006

# Architecture specific
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -mtune=athlon64 -O2 -s -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse -msse2 -msse3 -mmmx -m3dnow -ffast-math -ftracer -finline-limit=1200 -fno-ident -fforce-addr -fpeel-loops -fprefetch-loop-arrays -funroll-loops -funswitch-loops -ftree-vectorize -fprefetch-loop-arrays -frerun-cse-after-loop -momit-leaf-frame-pointer -maccumulate-outgoing-args -mno-align-stringops -minline-all-stringops -DNDEBUG -DG_DISABLE_ASSERT -DNO_DEBUG"
CXXFLAGS="${CFLAGS} -fpermissive -fno-enforce-eh-specs -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=both -Wl,--as-needed -Bdirect -s"

PORTAGE_STRIP_FLAGS="--strip-all --discard-all -R .comment -R .note -R .note.ABI-tag"

# Locale Settings
LINGUAS="en pl"
LANG="en_US"
LC_ALL="en_US"

# Mirrors
GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gentoo.zie.pg.gda.pl http://gentoo.po.opole.pl http://gentoo.prz.rzeszow.pl ftp://mirror.icis.pcz.pl/gentoo/ ftp://gentoo.po.opole.pl"

# Portage Specific Settings
ACCEPT_KEYWORDS="amd64 ~amd64"
ALSA_CARDS="emu10k1"
AUTOCLEAN="yes"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="2G"
CLEAN_DELAY="0"
CONFIG_PROTECT="/etc"
DISTDIR="/usr/portage/distfiles"
EMERGE_WARNING_DELAY="5"
FEATURES="autoconfig digest distlocks nodoc parallel-fetch sandbox sfperms -metadata-transfer"
INPUT_DEVICES="mouse keyboard"
MAKEOPTS="-j2 -s"
PORT_LOGDIR=/var/log/portage
PORTAGE_TMPDIR=/var/tmp
PORTDIR_OVERLAY="/usr/local/portage-morph /usr/local/portage-xgl"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
VIDEO_CARDS="nv nvidia"

# USE Flags
USE="3dnow 3dnowext aac alsa avi bitmap-fonts cairo cdr cdrom cups divx4linux dvd dvdr dvdread flash gif glitz gtk2 hal jpeg jpeg2k kde kdeenablefinal mmx mmxext mp3 mpeg nptl nptlonly nvidia ogg oggvorbis opengl pic png qt qt3 speedup sse sse2 sse3 tga tiff truetype type1-fonts udev usb userlocales v4l vorbis wmf X xml2 xv xvid -arts -fortran -gdbm -gnome -gpm -ipv6 -motif -ncurses -nls -oss -perl -python -samba -slang -spell -unicode -xmms"



That's the reason why i ask you so much.
I wanna try GCC 4.3 but befere that i must know if i'll be able to compile base system packages... (eg coreutils :P ).

So, .... Could you try emerge -e world using GCC 4.3.0? ;-)
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
f0rk
Apprentice
Apprentice


Joined: 15 Nov 2004
Posts: 273
Location: Moscow

PostPosted: Mon Nov 20, 2006 5:35 pm    Post subject: Reply with quote

1. About flags:
DON'T USE -ffast-math !!! NEVER !!! :evil: ;)
It will break your system.
I'm sure! I tried to use it, but every time I have to abandon it.
What differences are between my:
LDFLAGS="-Wl,-O1 -Wl,--hash-style=both"
and your:
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=both -Wl,--as-needed -Bdirect -s"
Are you sure that hashstyle doesn't include -Bdirect ?
2. OK, I will try to do emerge -e world...
But may be not today...

By the way, my email: 4ndrey[at]gmail.com, icq 4064065 .
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Mon Nov 20, 2006 5:42 pm    Post subject: Reply with quote

1) --as-needed speeds up big software -Bdirect speeds up dynamic library loading...

2) -ffast-math is filtered out by most packages... From that, which i use only ZSH and HAL have troubles with it ;) I have tested it long time ;)
By the way, i had to remove it, but i've forgotten :P Thanks!


3) i'll be really glad if you try to reemerge world ;) Big thanks!

I'm waiting for infos ;)
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
playfool
l33t
l33t


Joined: 01 Jun 2004
Posts: 688
Location: Århus, Denmark

PostPosted: Mon Nov 20, 2006 5:48 pm    Post subject: Reply with quote

the best thing I've heard about -ffast-math was from rac "If I wanted math done wrong I'd ask my cat"
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Mon Nov 20, 2006 5:51 pm    Post subject: Reply with quote

playfool wrote:
the best thing I've heard about -ffast-math was from rac "If I wanted math done wrong I'd ask my cat"


OT: Maybe should i ask mine cat? :lol:


I've already removed this flag ;)
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
cruzki
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2005
Posts: 137

PostPosted: Mon Nov 20, 2006 6:13 pm    Post subject: Reply with quote

Quote:
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=both -Wl,--as-needed -Bdirect -s"


are you sure that this LDFLAGS will work?

1º what convination of glibc and binutils will you use?¿?¿?¿? (and what overlay will you use?)

2º this line has two --as-needed and miss one Wl, I think this is more correct.

Code:
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=both -Wl, -Bdirect -s"


maybe I tree to campile a similar system this weekend... depends of yours experiencies (or how mach I will be boring this weekend ... )
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Mon Nov 20, 2006 6:28 pm    Post subject: Reply with quote

Yes, there shouldn't be --as-needed twice :P You're right.

But i think this is the best one:
Code:
LDFLAGS="-Wl,-O1,--enable-new-dtags,--sort-common,--hash-style=both,--as-needed -Bdirect -s"



Using this make.conf, i have compiled successful system using GCC 4.0.1, 4.0.2, 4.1.1
Never tried using GCC 4.0.3, 4.2.0, 4.3.0

Also new is --hash-style=both LDFLAG ;)
But i think it should break system in connection with --as-needed and -Bdirect ;)

I'll back to nxsty's binutils 2.17.50.0.5 which have patches for, which allows me to use -Bdirect.
Also wanna back to nxsty's glibc 2.5, becouse it allows me to use -Bdirect and have patches which improves performance on amd64 (mostly patched libmath).


Changes, which i've made to make.conf:
* added --hash-style=both
* removed -ffash-math

On listed above version of GCC everything worked for me good on amd64...
On x86 i have a lot of troubles when i tried to use this flags :P

Conclusion: AMD64 is easier to better optimise than x86 ;-)
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
vipernicus
Veteran
Veteran


Joined: 17 Jan 2005
Posts: 1462
Location: Your College IT Dept.

PostPosted: Mon Nov 20, 2006 8:10 pm    Post subject: Reply with quote

Morpheouss wrote:
Code:
# MAKE.CONF made by Morpheouss!
# 19/11/2006

# Architecture specific
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -mtune=athlon64 -O2 -s -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse -msse2 -msse3 -mmmx -m3dnow -ffast-math -ftracer -finline-limit=1200 -fno-ident -fforce-addr -fpeel-loops -fprefetch-loop-arrays -funroll-loops -funswitch-loops -ftree-vectorize -fprefetch-loop-arrays -frerun-cse-after-loop -momit-leaf-frame-pointer -maccumulate-outgoing-args -mno-align-stringops -minline-all-stringops -DNDEBUG -DG_DISABLE_ASSERT -DNO_DEBUG"
CXXFLAGS="${CFLAGS} -fpermissive -fno-enforce-eh-specs -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=both -Wl,--as-needed -Bdirect -s"

PORTAGE_STRIP_FLAGS="--strip-all --discard-all -R .comment -R .note -R .note.ABI-tag"

# Locale Settings
LINGUAS="en pl"
LANG="en_US"
LC_ALL="en_US"

# Mirrors
GENTOO_MIRRORS="ftp://ftp.belnet.be/mirror/rsync.gentoo.org/gentoo/ http://gentoo.zie.pg.gda.pl http://gentoo.po.opole.pl http://gentoo.prz.rzeszow.pl ftp://mirror.icis.pcz.pl/gentoo/ ftp://gentoo.po.opole.pl"

# Portage Specific Settings
ACCEPT_KEYWORDS="amd64 ~amd64"
ALSA_CARDS="emu10k1"
AUTOCLEAN="yes"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="2G"
CLEAN_DELAY="0"
CONFIG_PROTECT="/etc"
DISTDIR="/usr/portage/distfiles"
EMERGE_WARNING_DELAY="5"
FEATURES="autoconfig digest distlocks nodoc parallel-fetch sandbox sfperms -metadata-transfer"
INPUT_DEVICES="mouse keyboard"
MAKEOPTS="-j2 -s"
PORT_LOGDIR=/var/log/portage
PORTAGE_TMPDIR=/var/tmp
PORTDIR_OVERLAY="/usr/local/portage-morph /usr/local/portage-xgl"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
VIDEO_CARDS="nv nvidia"

# USE Flags
USE="3dnow 3dnowext aac alsa avi bitmap-fonts cairo cdr cdrom cups divx4linux dvd dvdr dvdread flash gif glitz gtk2 hal jpeg jpeg2k kde kdeenablefinal mmx mmxext mp3 mpeg nptl nptlonly nvidia ogg oggvorbis opengl pic png qt qt3 speedup sse sse2 sse3 tga tiff truetype type1-fonts udev usb userlocales v4l vorbis wmf X xml2 xv xvid -arts -fortran -gdbm -gnome -gpm -ipv6 -motif -ncurses -nls -oss -perl -python -samba -slang -spell -unicode -xmms"


There are some big flaws in your make.conf.

Code:
# Architecture specific
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -mtune=athlon64 -O2 -s -pipe -fomit-frame-pointer -mfpmath=sse,387 -msse -msse2 -msse3 -mmmx -m3dnow -ffast-math -ftracer -finline-limit=1200 -fno-ident -fforce-addr -fpeel-loops -fprefetch-loop-arrays -funroll-loops -funswitch-loops -ftree-vectorize -fprefetch-loop-arrays -frerun-cse-after-loop -momit-leaf-frame-pointer -maccumulate-outgoing-args -mno-align-stringops -minline-all-stringops -DNDEBUG -DG_DISABLE_ASSERT -DNO_DEBUG"
CXXFLAGS="${CFLAGS} -fpermissive -fno-enforce-eh-specs -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--as-needed -Wl,--hash-style=both -Wl,--as-needed -Bdirect -s"


Code:
Redundant flags:
CFLAGS: -mtune=athlon64, -s, -msse -msse2 -msse3 -mmmx -m3dnow, -momit-leaf-frame-pointer
CXXFLAGS: -fvisibility-inlines-hidden, -fpermissive
LDFLAGS: --enable-new-dtags, --hash-style=both, -Bdirect, -s


When you use -march you do not want to use -mtune as well. Gentoo by default strips. You -march defines -msse -msse2 -mmmx -m3dnow. When you use -momit-leaf-frame-pointer in conjunction with -fomit-frame-pointer, -fomit-frame-pointer is ignored and only -momit-leaf-frame-pointer is used, and if you use only -fomit-frame-pointer, then the leaf-frame-pointer is omitted as well (I believe). -fvisibility-lines-hidden is already enabled in the ebuilds for the apps that can benefit from it. -fpermissive is ridiculous to use, because it downgrades diagnostics so that you can compile bad code. --enable-new-dtags is enabled by Gentoo by default, you just won't see it in the compile. --hash-style=both will not work in conjunction with -Bdirect, one of these two flags is being ignored.


Code:
Flags that will slow you down:
CFLAGS: -mfpmath=sse,387, -fpeel-loops, -fprefetch-loop-arrays, -funroll-loops, -funswitch-loops, -frerun-cse-after-loop
CXXFLAGS:
LDFLAGS:


-mfpmath=sse,387 will only slow you down. All of the rest will bloat your binaries to the point of sluggishness. Whenever your binaries are larger, they use up more RAM, more CPU cache, and also cause more cache misses. Cache misses increase latency. So imagine if you will, you created a binary that uses more resources and cause cache misses, so you not only have extra overhead, but also increased latencies!

Code:
Flags with stability problems:
CFLAGS: -ffast-math, -ftree-vectorize
CXXFLAGS: -fno-enforce-eh-specs
LDFLAGS:


-ffast-math is known to break just about everything, and normally whenever it can benefit a program, Gentoo Devs use it in the ebuild. -ftree-vectorize is known to cause stability issues with gtk programs and zlib. -fno-enforce-eh-specs decreases size, but also make applications not work the way they are supposed to, for instance when a program should have crashed, it just keeps running.

Code:
My recommendations:
CHOST="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O2 -pipe -fomit-frame-pointer -fno-ident"
CXXFLAGS="${CFLAGS}"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-z,now -Wl,--hash-style=gnu"


And in many situations -Os might be better than -O2.
_________________
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Back to top
View user's profile Send private message
f0rk
Apprentice
Apprentice


Joined: 15 Nov 2004
Posts: 273
Location: Moscow

PostPosted: Mon Nov 20, 2006 10:34 pm    Post subject: Reply with quote

Morpheouss, don't use gcc-4.3-alpha to build your system!
glibc-2.5 doesn't want to compile... :(

vipernicus, thanks!
I simplify my CFLAGS and changed my LDFLAGS ;)
Back to top
View user's profile Send private message
cruzki
Tux's lil' helper
Tux's lil' helper


Joined: 13 Dec 2005
Posts: 137

PostPosted: Tue Nov 21, 2006 9:27 am    Post subject: Reply with quote

@vipernicus

It's safe to use hash-style=gnu?¿?¿?

What are your recomendation to an x86 machine?¿?¿?, what do you think about the CFLAGS that use nesl247 in the evolution-emission guide?¿?¿

Code:

#nesl247's CFLAGS in the evo-emi 4.0
CHOST="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CFLAGS="${CFLAGS} -fno-ident -frename-registers -combine -fprefetch-loop-arrays -fweb -fgcse-after-reload"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-znow"
LDFLAGS="${LDFLAGS} -Wl,--hash-style=both"
MAKEOPTS="-j2"


PS: where I will learnd about the new options in GCC-4.2 or 4.3 for a non experiment programer like kernel-for-newbies??¿?
Back to top
View user's profile Send private message
Belliash
Advocate
Advocate


Joined: 24 Nov 2004
Posts: 2503
Location: Wroclaw, Poland

PostPosted: Tue Nov 21, 2006 12:11 pm    Post subject: Reply with quote

@vipernicus:

1) i've already removed -ffast-math
2) -ftree-vectorize speeds up, but it's broken since 4.0.2 i think, they told, they'll repair it in 4.2.0
3) Some packages filters flags out... So if it filter -momit-frame-pointer, then package can use -fomit-frame-pointer
4) -mfpmath=sse,387 slows down on alder AMD CPUs. AMD's SSE implementation was terrible... I know, that, i had Athlon XP t-bird. But it speeds up on Intel's CPUS and on K8. 387 is old, and slow FPU. This flag forces it to use newer and better SSE... If some package cannot use SSE, then it uses 387.
5) -msse3 => GCC does not support SSE3 and SSE4, you can add -msse3 -msse4, but it does nothing ;) Look at KInfoCenter/OpenGL: I see there "GeForce 6600/PCI/SSE2/3DNOW!" GCC can't enable SSE3!

So you're wrong in some points ;)


@f0rk:
1) Maybe we have to make new ebuild for newer version of GCC 4.3.0? Eg dated at 20061121 ? ;-)
2) Have you tried GCC 4.2.0? Any problems? Recompiled world? How much faster is it?
_________________
Asio Software Technologies
Belliash IT Weblog
Back to top
View user's profile Send private message
vipernicus
Veteran
Veteran


Joined: 17 Jan 2005
Posts: 1462
Location: Your College IT Dept.

PostPosted: Tue Nov 21, 2006 1:03 pm    Post subject: Reply with quote

cruzki wrote:
@vipernicus

It's safe to use hash-style=gnu?¿?¿?

What are your recomendation to an x86 machine?¿?¿?, what do you think about the CFLAGS that use nesl247 in the evolution-emission guide?¿?¿

Code:

#nesl247's CFLAGS in the evo-emi 4.0
CHOST="i686-pc-linux-gnu"
CFLAGS="-O2 -march=pentium4 -pipe -fomit-frame-pointer"
CFLAGS="${CFLAGS} -fno-ident -frename-registers -combine -fprefetch-loop-arrays -fweb -fgcse-after-reload"
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,-znow"
LDFLAGS="${LDFLAGS} -Wl,--hash-style=both"
MAKEOPTS="-j2"


PS: where I will learnd about the new options in GCC-4.2 or 4.3 for a non experiment programer like kernel-for-newbies??¿?


evo-mission flags are great, if you want support, keep those flags.
_________________
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Back to top
View user's profile Send private message
vipernicus
Veteran
Veteran


Joined: 17 Jan 2005
Posts: 1462
Location: Your College IT Dept.

PostPosted: Tue Nov 21, 2006 1:12 pm    Post subject: Reply with quote

Morpheouss wrote:
@vipernicus:

1) i've already removed -ffast-math
2) -ftree-vectorize speeds up, but it's broken since 4.0.2 i think, they told, they'll repair it in 4.2.0
3) Some packages filters flags out... So if it filter -momit-frame-pointer, then package can use -fomit-frame-pointer
4) -mfpmath=sse,387 slows down on alder AMD CPUs. AMD's SSE implementation was terrible... I know, that, i had Athlon XP t-bird. But it speeds up on Intel's CPUS and on K8. 387 is old, and slow FPU. This flag forces it to use newer and better SSE... If some package cannot use SSE, then it uses 387.
5) -msse3 => GCC does not support SSE3 and SSE4, you can add -msse3 -msse4, but it does nothing ;) Look at KInfoCenter/OpenGL: I see there "GeForce 6600/PCI/SSE2/3DNOW!" GCC can't enable SSE3!



1) good job
2) hope you removed it too
3) And every package that doesn't filter either ONLY uses -momit-leaf-frame-pointer, but if you really want a worthwhile optimization, you'd want them to only use -fomit-frame-pointer. It's like having the choice between throwing 50 pounds off the truck or 150.
4) -march=athlon64 uses -mfpmath=sse by default
5) redundant - 1 a : exceeding what is necessary or normal : SUPERFLUOUS b : characterized by or containing an excess; specifically : using more words than necessary
_________________
Viper-Sources Maintainer || nesl247 Projects || vipernicus.org blog
Back to top
View user's profile Send private message
Display posts from previous:   
This topic is locked: you cannot edit posts or make replies.    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2, 3 ... 27, 28, 29  Next
Page 1 of 29

 
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