Which GCC is the Best for Slackware 10.2?
I'm wondering: Which is the best version of GCC to go with Slackware 10.2?
The version that comes with Slack 10.2 is 3.3.5. I once successfully upgraded to GCC 4.0.3 and it worked fine, except that some apps wouldn't compile with GCC 4.x. So, is 3.3.5 the best choice? Which compiles the most apps and is stable and bug-free enough even in the optimizer department? |
Well, applying some basic logic along with knowing that PV strives to ensure a stable release, and the release was compiled with the version that ships with it, I'd say that the one that ships with the release would be the best one.
|
Is it possible to recompile the entire release? I wondered about that a couple of times.
I had Kernel 2.6.16 recompiled with GCC 4.0.3, and it seemed much faster somehow. When I compared the disassembly of one of my own programs, it showed that 4.0.3 generates much shorter, better code. When I wanted to compile the latest versions of KDE or GNOME, I had no luck, however; then I briefly migrated to SuSE Linux 10.1 to see Xgl/Compiz in action, and I noticed they had GCC 4.1.0. Weird!! But I'm back to Slackware 10.2 now, because it's my pair of shoes! :) I'm using KDE instead of GNOME, because when I used XFCE and installed FRG from Linuxpackages, some things in XFCE stopped working, so with my new install, I decided to use only KDE for a while. So you think I should not tamper with the system, and leave it just as it is? Do any people here have experience with customizing their system with the latest and greatest stuff? Is that even possible? |
If you don't want GCC 3.3, 10.2 has GCC 3.4 in testing/ (it's now the default compiler for -current and in turn, will be for 11.0)
Slackware sticks to GCC 3.x because it is tried and tested - there is nothing to stop you switching to GCC 4 if you are prepared to build it yourself. And yes, it is quite possible to then rebuild the entire release from scratch if you really want to. Quote:
|
The new gentoo uses GCC 4.1.0 as default option so it should be relatively safe to use it to compile KDE. Atleast I just compiled it with no problems :)
|
Thanks, you two! :)
I'll give GCC 4.1.0 a try; perhaps it's more compatible to the 3.x version than 4.0.3. :) |
Well, that is the whole idea behind Linux as well as Slackware. It's your system so do what you want with it.
|
It would be nice if you can post your results. And if possible a description how you compiled gcc-4.X for Slackware, maybe I can (with help from others) write a slackbuild-file.
regards Thorsten |
OK, so here goes:
1. Download the full "gcc-4.1.1" source package from gcc.gnu.org (ca. 38 MB). 2. As a normal user (not root), enter the untarred directory (e.g. "gcc-4.1.1") 3. Run the command: Code:
configure --prefix=/usr Code:
make Code:
make install I just compiled a bunch of stuff with 4.1.1, and things are looking very good indeed!! My kernel 2.6.16 compiled with 4.1.1 runs about 5-10 times faster than the old version that was compiled with 3.3.5 (subjective impression). I built the dependencies for KDE 3.5.4 (from linuxpackages.net) and installed everything, and now I'm running KDE 3.5.4! :) (btw, I have to tell the maintainer of that package that is package list is incomplete). The reason for me to upgrade to GCC 4.1.1 was that compiling "liboil" caused a GCC 3.3.5 crash with internal compiler error while compiling optimized SSE2 code. With GCC 4.1.1, no problem!! :) |
Quote:
I also upgraded my gentoo to gcc-4.1.1 and i'm done with it, i had to recompile every single package, working fine, no noticeable improvement in anything. I'll replace it with crux soon. Can't beat Slackware to get out of the way and let you experiment, do whatever you want, trash it all, reinstall in 20 min and keep on having fun :) |
Quote:
How du you measure the speed of your running kernel? And 5-10 times - isn't it too much, even for subjective impression? :) |
Like, for instance, the NVidia driver installer took a couple of minutes before, and a couple of seconds afterwards (going thru the same stages). :)
Or the kernel boots more quickly, ReiserFS accesses the hard drive much faster, and during mounting, I hear a noise that sounds like WAV file from the hard drive! ;) Not so before that, everything was much slower. I have a Pentium 4 processor with hyperthreading. Perhaps using the GCC 4.1.1 had some benefits in that regard. |
Quote:
Code:
#!/bin/sh |
Quote:
|
Well... Lot's of time is the first thing you'll need..
http://www.diy-linux.org/x86-reference-build/ There's the base that I follow. Much, much better way to bootstrap a system than LFS IMO. After your done with the toolchain, install pkgtools. http://jaguarlinux.com/pub/DIY/ The pkgtools in 'base' is version 11.0 with the xorg stuff removed and "slack-desc" changed to "desc" via patch, but vanilla otherwise. Once you finish the base system, you'll need to scour Pat's FTP site for the bootscripts. I personally use SysVinit cause I think they look purty... Really, I guess the only reason why I call it DIYSlackware is because of pkgtool... :scratch: I do use the network scripts from Slack tho. They are just modified to display evaluate_retval from rc. Actually... Give me a day or so and I'll upload all my crap to that site all orderly with instructions as well. If people want to use it verbatum then cool, if not, it's a decent something to look at just to see what's possible. I have some neat Xorg-7.1 scripts that some of you may be aware that I was working on a couple weeks ago. I'll throw them up there as well. They work a charm on slack and my DIY system. Here is a preliminary README that I'll upload with all my scripts. Code:
There are alot of personal prefrences in these build scripts that |
All times are GMT -5. The time now is 07:58 AM. |