| View previous topic :: View next topic |
| Author |
Message |
Bob P Veteran


Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Sat Jan 22, 2005 4:48 pm Post subject: In Praise of GCC 3.4.3.20050110 |
|
|
My luck being what it is, I caught the upgrade from GCC 3.4.3-r1 to GCC 3.4.3.20050110 about a week ago when I was updating my main Gentoo box, and committed to a full system rebuild before it was hard masked out of the portage tree.
I already had a fully functional GCC 3.4.3-r1 system that was built using the "proper" but painfully detailed method of rebuilding the toolkit components redundantly (so that the entire toolkit was built with a 3.4.3-r1 compiler that was compiled on a 3.4.3-r1 compiler that was built with a 3.4.3-r1 compiler). after rebuliding the toolkit, I did the complete emerge -e system (twice) and a complete emerge -e world (twice). the result was a very stable GCC 3.4.3-r1 system. of course, why would any basement-dwelling linux geek be satisfied with that? i just had to upgrade to GCC 3.4.3.20050110.
So I downloaded 20050110. then i rebuilt the entire toolkit three times, so that i would have a toolkit built on a compiler that was compiled with a compiler that was built on itself. then i changed some USE flags to get rid of a host of unwanted gnome dependencies. that bottom line was that i needed to rebuild the system again. so i did an emerge -e system, and then did the "emerge -uDv --newuse world", depclean, and revdep-rebuild. i was amazed by the results:
much to my amazement, i was able to complete the entire system rebuild using GCC 3.4.3.20050110 using the following set of flags, which many experienced gentoo users would consider "insane":
| Code: | gentoo ~ # emerge info
Portage 2.0.51-r13 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0,2.6.10-gentoo-r5 i686)
=================================================================
System uname: 2.6.10-gentoo-r5 i686 Pentium III (Coppermine)
Gentoo Base System version 1.6.8
Python: dev-lang/python-2.3.4 [2.3.4 (#1, Jan 19 2005, 06:19:15)]
dev-lang/python: 2.3.4
sys-devel/autoconf: 2.59-r6, 2.13
sys-devel/automake: 1.8.5-r2, 1.5, 1.4_p6, 1.6.3, 1.7.9, 1.9.4
sys-devel/binutils: 2.15.92.0.2-r2
sys-devel/libtool: 1.5.10-r2
virtual/os-headers: 2.6.8.1-r2
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CFLAGS=" -O3 -march=pentium3 -pipe -mtune=pentium3 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -funroll-loops -falign-functions -fmerge-all-constants -mfpmath=sse -maccumulate-outgoing-args -fprefetch-loop-arrays"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS=" -O3 -march=pentium3 -pipe -mtune=pentium3 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -funroll-loops -falign-functions -fmerge-all-constants -mfpmath=sse -maccumulate-outgoing-args -fprefetch-loop-arrays -fvisibility-inlines-hidden -fvisibility=hidden"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig candy ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="http://gentoo.netnitco.net http://gentoo.osuosl.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 X aalib acpi alsa apm arts avi berkdb bitmap-fonts cdr crypt cups encodeesd f77 fam flac font-server foomaticdb fortran gdbm gif gpm gtk2 hal ide imagemagick imlib ipv6 ithreads java jpeg kde ldap libg++ libwww mad mikmod motif mpeg mysql ncurses nls nptl oggvorbis opengl oss pam pdf pdflib perl png posix pthreads python qt quicktime readline samba sdl slang snmp spell ssl svga tcpd tiff truetypetruetype-fonts type1-fonts userlocales xine xinerama xml xml2 xmms xscreensaver xv zlib"
Unset: LDFLAGS |
even more amazing was that my entire world file's contents could subsequently be compiled using this "insane" set of cflags and cxxflags:
| Code: | CFLAGS=" -O3 -march=pentium3 -pipe -mtune=pentium3 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -funroll-loops -falign-functions -fmerge-all-constants -mfpmath=sse -maccumulate-outgoing-args -fprefetch-loop-arrays"
CXXFLAGS=" -O3 -march=pentium3 -pipe -mtune=pentium3 -fforce-addr -momit-leaf-frame-pointer -fomit-frame-pointer -ftracer -funroll-loops -falign-functions -fmerge-all-constants -mfpmath=sse -maccumulate-outgoing-args -fprefetch-loop-arrays -fvisibility-inlines-hidden -fvisibility=hidden" |
okay, let me qualify that -- the "fvisibility=hidden" cxxflag did cause problems with the usual suspects: kdemultimedia, kdegraphics, kdelibs and k3b. so i removed that cflag and used the remainder of the "insane" flags to recompile these troublemakers.
the result? well, i'm very surprised and happy to say that:
1. GCC 3.4.3.20050110 could successfully compile my entire toolkit and perform the emerge -e system using the full set of "insane" cflags and cxxflags, even though GCC 3.4.3-r1 couldn't do so.
2. this version of GCC could also compile my entire world file (with the exception of KDE and K3b) using the full set of "insane" flags. to compile all of my world files, i only needed to remove the "-fvisibility=hidden" CXXFLAG, while keeping the full set of "insane" CFLAGS.
3. the system is palpably faster after being rebuilt with 2005.0110 than it was under 3.4.3-r1. it feels like i've had a hardware upgrade.
looking at the GCC 3.4.3 is Upon Us thread, it seems that 20050110 was quitely masked out of the portage tree with litte explanation. although i understand that some people may have had problems with it, i'm happy to say that after following a necessarily thorough installation procedure, this version of GCC is the best one i've encountered yet. _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
| Back to top |
|
 |
Deranger Veteran


Joined: 26 Aug 2004 Posts: 1215 Location: Finland
|
Posted: Sat Jan 22, 2005 5:57 pm Post subject: |
|
|
I'm still using 3.4.3-r1, but that sounds really great. However, I suggest removing -funroll-loops (bloats binaries, totally useless) and moving from -O3 to -O2 (-O2 is faster in many cases, and produces not-so-bloated binaries) when you are rebuilding your toolchain next time
It might sound useless to build a proper toolchain, but it really isn't! _________________ -fomg-optimized Debian/OpenBSD user. |
|
| Back to top |
|
 |
piwacet Guru

Joined: 29 Dec 2004 Posts: 376
|
Posted: Sat Jan 22, 2005 7:58 pm Post subject: |
|
|
Yeah - I actually caught this compiler also during it's brief life.... while I was doing Bob P's Stage 1 install on Stage 3 tarball with gcc-3.4.3.... So my system, also, had it's entire toolchain compiled 3 times with this now masked version of gcc 3.4.3, and I have subsequently emerged my entire world using this toolchain.
My system is rock-solid. Maybe because Bob P and I both have pentium 3's? Perhaps we're avoiding architecture-specific bugs in the compiler.
Although I used much more conservative C-flags the whole way through:
| Code: | bash-2.05b# emerge info
Portage 2.0.51-r14 (default-linux/x86/2004.3, gcc-3.4.3, glibc-2.3.4.20041102-r0, 2.6.10-gentoo-r5 i686)
=================================================================
System uname: 2.6.10-gentoo-r5 i686 Pentium III (Katmai)
Gentoo Base System version 1.4.16
Python: dev-lang/python-2.3.4 [2.3.4 (#1, Jan 19 2005, 16:54:45)]
dev-lang/python: 2.3.4
sys-devel/autoconf: 2.59-r5
sys-devel/automake: 1.8.5-r1
sys-devel/binutils: 2.15.92.0.2-r1
sys-devel/libtool: 1.5.2-r7
virtual/os-headers: 2.6.8.1-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/X11R6/lib/X11/xkb /usr/kde/2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3/share/config /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium3 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoaddcvs autoconfig ccache distlocks sandbox sfperms"
GENTOO_MIRRORS="ftp://206.75.217.205/ ftp://gentoo.mirrors.tds.net/gentoo http://mirror.datapipe.net/gentoo http://chod.cwru.edu/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 X acpi alsa apm arts avi berkdb bitmap-fonts cdr crypt cups dvd encode f77 font-server foomaticdb fortran gdbm gif gpm gtk gtk2 imlib ipv6 ithreads jpeg libg++ libwww mad mikmod mmx motif mpeg ncurses nls nptl oggvorbis opengl oss pam pdflib perl png pthreads python qt quicktime readline sdl spell sse ssl svga tcpd tiff truetype truetype-fonts type1-fonts xml2 xmms xv zlib"
Unset: LDFLAGS, PORTDIR_OVERLAY |
So I'm not rebuilding as of yet... |
|
| Back to top |
|
 |
Torangan Tux's lil' helper

Joined: 21 Mar 2003 Posts: 128
|
Posted: Sun Jan 23, 2005 1:40 pm Post subject: |
|
|
Just out of curiosity - does neither of you use LDFLAGS="-Wl,-O1"? I found that it really does improve the startup times of some applications without harm.
BTW I also had the mentioned version of GCC on my system for some time and could go back to former one without problems. In fact, I had no problems with it at all (I didn't do an emerge -e world, takes too much time). |
|
| Back to top |
|
 |
Deranger Veteran


Joined: 26 Aug 2004 Posts: 1215 Location: Finland
|
Posted: Sun Jan 23, 2005 1:58 pm Post subject: |
|
|
| Torangan wrote: | Just out of curiosity - does neither of you use LDFLAGS="-Wl,-O1"? I found that it really does improve the startup times of some applications without harm.
BTW I also had the mentioned version of GCC on my system for some time and could go back to former one without problems. In fact, I had no problems with it at all (I didn't do an emerge -e world, takes too much time). |
Yup, I am using LDFLAGS="-Wl,-O1". It decreases startup times a bit and I would say it's safe. _________________ -fomg-optimized Debian/OpenBSD user. |
|
| Back to top |
|
 |
Bob P Veteran


Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Sun Jan 23, 2005 3:59 pm Post subject: |
|
|
nope, no LDFLAGS for me. there's a limit to how far i want to push the insane flag settings while still expecting things to work. but then perhaps my success is only an artifact of aggressive flag filtration on the part of the developers anyway.
about the LDFLAGS: i may put them on my list of things to try next time, provided my next system build comes along before 2005.0, where LDFLAGS will probably be set invisibly by the developers. _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
| Back to top |
|
 |
Duncan Mac Leod Tux's lil' helper


Joined: 02 May 2004 Posts: 134 Location: Germany
|
Posted: Mon Jan 24, 2005 9:19 pm Post subject: |
|
|
| piwacet wrote: | | My system is rock-solid. Maybe because Bob P and I both have pentium 3's? Perhaps we're avoiding architecture-specific bugs in the compiler. |
I am running GCC 3.4.3.20050110 on Pentium3, too!
No problems !
HTH,
Duncan |
|
| Back to top |
|
 |
sigSEGV2003 Tux's lil' helper

Joined: 11 Mar 2003 Posts: 81 Location: Kansas
|
Posted: Mon Jan 24, 2005 9:24 pm Post subject: |
|
|
| GCC 3.4.3.20050110 on athlon-tbird with -O3 and no problems at all here. |
|
| Back to top |
|
 |
Gnufsh Guru


Joined: 28 Dec 2002 Posts: 400 Location: Portland, OR
|
Posted: Tue Jan 25, 2005 9:26 am Post subject: |
|
|
| It seems to be back in ~x86 now, I'm compiling it now. |
|
| Back to top |
|
 |
brullonulla Tux's lil' helper

Joined: 13 Jan 2005 Posts: 117 Location: bologna
|
Posted: Tue Jan 25, 2005 6:14 pm Post subject: |
|
|
I came on this thread by chance and I'm scared!
Do I need to re-emerge my whole system at every GCC upgrade or do you do it just because it's fancy?
I'm a young (2 months) gentoo user, and I never read about it in the docs, so please let me know... _________________ Google is the index to the unwritten Linux manual. |
|
| Back to top |
|
 |
firephoto Veteran

Joined: 28 Oct 2003 Posts: 1489 Location: +48° 5' 23.40", -119° 48' 30.00"
|
Posted: Tue Jan 25, 2005 8:11 pm Post subject: |
|
|
| I noticed it's back too but haven't updated again since there's no mention of it getting unmasked in the changlog just a reference to something else. I noticed that it's properly not slotted too. |
|
| Back to top |
|
 |
Bob P Veteran


Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Wed Jan 26, 2005 11:37 am Post subject: |
|
|
| brullonulla wrote: | I came on this thread by chance and I'm scared!
Do I need to re-emerge my whole system at every GCC upgrade or do you do it just because it's fancy?
I'm a young (2 months) gentoo user, and I never read about it in the docs, so please let me know... |
IMO you should never upgrage a major toolkit component without rebuilding your toolkit. i don't see much point of keeping the remnants of a system built upon an obsolete toolkit, so i do the complete system rebuild.
i think that the majority of the failures that new users encounter are atributable to the desire to over-update their system. they automate the update process to pick up every new package as soon as it comes out, and they insert them into their system in a totally unplanned fashion, paying no attention to the integrity of their toolkit. in contrast, the experienced people tend to plan system updates at less frequent intervals in order to avoid these sorts of issues. _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks
Last edited by Bob P on Wed Jan 26, 2005 11:45 am; edited 1 time in total |
|
| Back to top |
|
 |
Bob P Veteran


Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Wed Jan 26, 2005 11:40 am Post subject: |
|
|
| firephoto wrote: | | I noticed it's back too but haven't updated again since there's no mention of it getting unmasked in the changlog just a reference to something else. I noticed that it's properly not slotted too. |
i for one, am happy to see it back, as i no longer have to override the system when it wants to revert to an older version of GCC, which would require a major system revision like the one i had just finished. until i notice a problem with the current verison of gcc, i'm not going to stand my computer on its head for a few days just because it GCC has been masked. _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
| Back to top |
|
 |
Devport Guru

Joined: 14 Dec 2004 Posts: 331
|
Posted: Wed Jan 26, 2005 12:17 pm Post subject: |
|
|
| brullonulla wrote: | | Do I need to re-emerge my whole system at every GCC upgrade or do you do it just because it's fancy? |
I recently upgraded from gcc 3.3.5 to 3.4.3 and did not rebuild the whole system. Formerly I had a handcrafted linux from scratch system and the system was rock solid even after I had upgraded it from 3.3 to 3.4 and removed 3.3 afterwards. No problems at all. Sure - compiler improvements will have an effect only if you recompile a package with the new compiler, but it is not normally neccessary. Packages will be rebuilt one after another thanks to emerge --sync anyway.
| brullonulla wrote: | | I'm a young (2 months) gentoo user, and I never read about it in the docs, so please let me know... |
A two month old gentoo user - people grow up so quick today. |
|
| Back to top |
|
 |
Bob P Veteran


Joined: 20 Oct 2004 Posts: 3355 Location: Jackass! Development Labs
|
Posted: Wed Jan 26, 2005 7:10 pm Post subject: |
|
|
| Devport wrote: | | A two month old gentoo user - people grow up so quick today. |
you know, when i see that your registration date is 12/14/2004, i see that you've been here for just over a month. when you say that people grow up so fast, is that in reference to a two month old user looking old to you? (the only reason that i can get away with a joke like this is because according to my registration date, *I* am a three month old gentoo user! ) _________________ .
Stage 1/3 | Jackass! | Rockhopper! | Thanks | Google Sucks |
|
| Back to top |
|
 |
hiroki Guru

Joined: 29 Jul 2003 Posts: 327 Location: @home in germany
|
Posted: Wed Jan 26, 2005 7:19 pm Post subject: |
|
|
hi!
anyone using gcc-3.4.3-20050110 forbuilding the kernel?
today i tried to build gentoo-dev-sources-2.6.10-r6 with it. it worked, compiled without errors, but when i boot ... it's booting veeeeery slow. like slow motion >< every line that appears on the console needs several seconds, some even take a minute... how can this happen?
the X server also took years (!) to start. after loggin in (via GDM) X had average speed (as usual). so just the console seems sooooo slow. how come? any ideas?
grtz. |
|
| Back to top |
|
 |
MrApples Guru

Joined: 13 Dec 2002 Posts: 511
|
Posted: Wed Jan 26, 2005 7:57 pm Post subject: |
|
|
try building whatever kernel you were using before with it, and see if there is a difference _________________ http://www.whatsinyourbox.org -- Technology discussion, news, and more. |
|
| Back to top |
|
 |
TwoMinds Tux's lil' helper

Joined: 14 Jul 2004 Posts: 135 Location: Italy
|
Posted: Thu Jan 27, 2005 3:05 am Post subject: |
|
|
...I had a problem building the same kernel I had... everything goes fine: kernel + qc-usb + 3dfx.ko + svgalib but subfs now doesn't work... it's built and loaded but can't access any mount giving no medium found...
quickpgk gcc-3.4.3-20050110 && emerge =gcc-3.4.3-r1 and rebuilding everything works... |
|
| Back to top |
|
 |
hiroki Guru

Joined: 29 Jul 2003 Posts: 327 Location: @home in germany
|
Posted: Thu Jan 27, 2005 4:10 am Post subject: |
|
|
| MrApples wrote: | | try building whatever kernel you were using before with it, and see if there is a difference |
if you read what i've written you'd know that i already compiled a kernel with it! but the problem [also written in my previous post] is that it's awfully slow. like when booting the computer it take several minutes (at least 15 min. in total) to boot. that's not normal!
so i was asking about some other people's experiences.
but propably you won't read this post post completely either  |
|
| Back to top |
|
 |
Hauser l33t


Joined: 27 Dec 2003 Posts: 650 Location: 4-dimensional hyperplane
|
Posted: Fri Jan 28, 2005 1:37 pm Post subject: |
|
|
| Bob P wrote: | | nope, no LDFLAGS for me. there's a limit to how far i want to push the insane flag settings while still expecting things to work. |
Well I've just finished building a pentium-m stage3 tarball with LDFLAGS="-Wl,-O1" in my make.conf, and of course it's compiled with GCC 3.4.3.20050110 and all the latest glibc and others, haven't met any problem.
Besides my current system was built with gcc-3.4.3-r1 and LDFLAGS="-Wl,-O1" in make.conf from the very beginning, no problem so far.  _________________ AMD Athlon XP 2600+; 512M RAM;
nVidia FX5700LE; Hitachi 120Gb
2.6.9-nitro4, reiser4, linux26-headers+nptl
Do I like to compile everything?
Positive definite! |
|
| Back to top |
|
 |
MrApples Guru

Joined: 13 Dec 2002 Posts: 511
|
Posted: Fri Jan 28, 2005 2:09 pm Post subject: |
|
|
| hiroki wrote: | | MrApples wrote: | | try building whatever kernel you were using before with it, and see if there is a difference |
if you read what i've written you'd know that i already compiled a kernel with it! but the problem [also written in my previous post] is that it's awfully slow. like when booting the computer it take several minutes (at least 15 min. in total) to boot. that's not normal!
so i was asking about some other people's experiences.
but propably you won't read this post post completely either  |
first off, your rudeness is not appreciated, and ironically, you are the one who has misinterpreted my post, i said to try compiling whatever kernel you were using before with the latest gcc and see if there is any difference, meaning try a different kernel and see if it runs faster
if you maintain a poor attitude, people will not want to help you _________________ http://www.whatsinyourbox.org -- Technology discussion, news, and more. |
|
| Back to top |
|
 |
Stormblazer Tux's lil' helper


Joined: 28 Jan 2005 Posts: 76 Location: Colorado
|
Posted: Fri Jan 28, 2005 4:09 pm Post subject: |
|
|
Is there a script I can use to rebuild the toolchain (redundant fashion), because I don't want to do it by hand, and I also don't think I should use the bootstrap script.
Or do I just emerge the toolchain 3 times?
I'm planning on remerging the whole thing too
finally, what do these flags do? I haven't seen them before (I also like using insane flag settings )
fmerge-all-constants
fvisibility=hidden
fvisibility-inlines=hidden |
|
| Back to top |
|
 |
Roguelazer Veteran


Joined: 10 Feb 2003 Posts: 1233 Location: Harvey Mudd College
|
Posted: Fri Jan 28, 2005 4:15 pm Post subject: |
|
|
Stormblazer:
| Code: |
# emerge -e system; emerge -e system; emerge -e system
|
That should rebuild your toolchain a few times.  _________________ Registered Linux User #263260 |
|
| Back to top |
|
 |
Deranger Veteran


Joined: 26 Aug 2004 Posts: 1215 Location: Finland
|
Posted: Fri Jan 28, 2005 4:29 pm Post subject: |
|
|
A complete toolchain rebuild is basically the following:
| Code: |
emerge linux26-headers && emerge linux26-headers glibc && emerge glibc binutils gcc && emerge binutils gcc
|
Then you can recompile all packages with the proper toolchain if you want:
See my signature for hielvc's emerge wrapper, which is awesome!  _________________ -fomg-optimized Debian/OpenBSD user. |
|
| Back to top |
|
 |
MrApples Guru

Joined: 13 Dec 2002 Posts: 511
|
Posted: Fri Jan 28, 2005 4:52 pm Post subject: |
|
|
while rebuilding the toolchain 2 or 3 times is fine, i would also really recommend the wrapper script from hielvc _________________ http://www.whatsinyourbox.org -- Technology discussion, news, and more. |
|
| Back to top |
|
 |
|