Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Unsupported Software
  • Search

GCC 4.3.0 testing!

This forum covers all Gentoo-related software not officially supported by Gentoo. Ebuilds/software posted here might harm the health and stability of your system(s), and are not supported by Gentoo developers. Bugs/errors caused by ebuilds from overlays.gentoo.org are covered by this forum, too.
Locked
Advanced search
702 posts
  • Page 1 of 29
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 29
  • Next
Author
Message
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

GCC 4.3.0 testing!

Post by Belliash » Sun Nov 19, 2006 2:47 pm

Code: Select all

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
Top
Voltago
Advocate
Advocate
User avatar
Posts: 2593
Joined: Tue Sep 02, 2003 1:54 pm
Location: userland

Re: GCC 4.3.0 testing!

Post by Voltago » Sun Nov 19, 2006 2:50 pm

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.
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Sun Nov 19, 2006 2:57 pm

ecj? what's that? :P
Asio Software Technologies
Belliash IT Weblog
Top
Voltago
Advocate
Advocate
User avatar
Posts: 2593
Joined: Tue Sep 02, 2003 1:54 pm
Location: userland

Post by Voltago » Sun Nov 19, 2006 3:00 pm

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.
Top
Phenax
l33t
l33t
User avatar
Posts: 972
Joined: Fri Mar 10, 2006 8:12 pm

Post by Phenax » Sun Nov 19, 2006 4:23 pm

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).
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Sun Nov 19, 2006 4:34 pm

are there any patches for 4.2 or 4.3?
Asio Software Technologies
Belliash IT Weblog
Top
rhill
Retired Dev
Retired Dev
User avatar
Posts: 1629
Joined: Fri Oct 22, 2004 9:58 am
Location: sk.ca

Post by rhill » Sun Nov 19, 2006 5:46 pm

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
Top
f0rk
Apprentice
Apprentice
User avatar
Posts: 273
Joined: Mon Nov 15, 2004 11:18 am
Location: Moscow

Post by f0rk » Sun Nov 19, 2006 10:16 pm

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.
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Mon Nov 20, 2006 3:28 pm

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
Top
f0rk
Apprentice
Apprentice
User avatar
Posts: 273
Joined: Mon Nov 15, 2004 11:18 am
Location: Moscow

Post by f0rk » Mon Nov 20, 2006 4:14 pm

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.
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Mon Nov 20, 2006 4:18 pm

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
Top
f0rk
Apprentice
Apprentice
User avatar
Posts: 273
Joined: Mon Nov 15, 2004 11:18 am
Location: Moscow

Post by f0rk » Mon Nov 20, 2006 5:02 pm

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
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Mon Nov 20, 2006 5:16 pm

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: Select all

# 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
Top
f0rk
Apprentice
Apprentice
User avatar
Posts: 273
Joined: Mon Nov 15, 2004 11:18 am
Location: Moscow

Post by f0rk » Mon Nov 20, 2006 5:35 pm

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 .
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Mon Nov 20, 2006 5:42 pm

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
Top
playfool
l33t
l33t
User avatar
Posts: 688
Joined: Tue Jun 01, 2004 12:49 am
Location: Århus, Denmark

Post by playfool » Mon Nov 20, 2006 5:48 pm

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

Proud supporter of The EFF, The FSF and The Triad of Reason.
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Mon Nov 20, 2006 5:51 pm

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
Top
cruzki
Tux's lil' helper
Tux's lil' helper
Posts: 137
Joined: Tue Dec 13, 2005 1:50 pm

Post by cruzki » Mon Nov 20, 2006 6:13 pm

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: Select all

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 ... )
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Mon Nov 20, 2006 6:28 pm

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

But i think this is the best one:

Code: Select all

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
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

Post by vipernicus » Mon Nov 20, 2006 8:10 pm

Morpheouss wrote:

Code: Select all

# 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: Select all

# 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: Select all

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: Select all

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: Select all

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: Select all

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
Top
f0rk
Apprentice
Apprentice
User avatar
Posts: 273
Joined: Mon Nov 15, 2004 11:18 am
Location: Moscow

Post by f0rk » Mon Nov 20, 2006 10:34 pm

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 ;)
Top
cruzki
Tux's lil' helper
Tux's lil' helper
Posts: 137
Joined: Tue Dec 13, 2005 1:50 pm

Post by cruzki » Tue Nov 21, 2006 9:27 am

@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: Select all

#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??¿?
Top
Belliash
Advocate
Advocate
User avatar
Posts: 2503
Joined: Wed Nov 24, 2004 1:39 pm
Location: Wroclaw, Poland
Contact:
Contact Belliash
Website

Post by Belliash » Tue Nov 21, 2006 12:11 pm

@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
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

Post by vipernicus » Tue Nov 21, 2006 1:03 pm

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: Select all

#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
Top
vipernicus
Veteran
Veteran
User avatar
Posts: 1462
Joined: Mon Jan 17, 2005 10:35 pm
Location: Your College IT Dept.
Contact:
Contact vipernicus
Website

Post by vipernicus » Tue Nov 21, 2006 1:12 pm

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
Top
Locked

702 posts
  • Page 1 of 29
    • Jump to page:
  • 1
  • 2
  • 3
  • 4
  • 5
  • …
  • 29
  • Next

Return to “Unsupported Software”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy