-wassup-
12-10-2002, 10:19 AM
i am thinking about upgrading to gcc 3.2. what are the positives and negatives of doing this upgrade? i have heard that gcc 3.2 has trouble with existing code that is older and was created before gcc 3.2. what are your experiences with this?
thank you for any help
bwkaz
12-10-2002, 10:50 AM
I've compiled my entire system with it (LFS). No problems that I couldn't figure out, though there were a couple of minor ones.
For one, it spits out a warning whenever a standard system include directory is also specified with -I, which is lame. So I commented the lines that did that before I compiled it. If you're going to install it from a precompiled package, then perhaps the person that created the package did the same, and perhaps not.
The other reason I fixed that is because packages like vim 6.1 didn't configure properly when it was printing those warnings -- the configure script would compile a small test program, and then check to see if anything was printed to stderr. The warning was, of course, so it took that as evidence that the feature it was looking for wasn't there. Caused no end of trouble with that package.
It also prints warnings when people use the old, outdated, deprecated <iostream.h> header instead of the draft-ANSI-C++ standard <iostream> header. If you can live with that, it's no big deal.
The upside (for me) is that you can optimize specifically for a lot of newer processors (up to athlon-xp on the AMD side, and at least i686 on the Intel side, maybe higher), plus use the newer floating-point instruction sets (MMX, SSE, SSE3, 3Dnow, etc).
Then there's the issue of the C++ ABI (application binary interface, I think). It's different. Which means that no C++ programs compiled with g++ 2 (or indeed, g++ 3.0 or g++ 3.1) will link against anything compiled with g++ 3.2. However, the developers (last I heard) think that they have a standard ABI-compliant compiler now, so the ABI shouldn't change anytime soon (barring bugs, of course). This can be both an upside and a downside -- the upside is, you can link against programs or libs compiled with another ABI-compliant compiler, but the downside is, you can't link against stuff compiled with an older g++.
I think that's about it.
Penrich
12-10-2002, 11:45 AM
Well, reading you "title" - if someone sent you 8.1 I think you would be sorted. However, the alternative is to do what I did (in SuSE 8.0) and add gcc-3.2 while keeping your current 2.95 (IIRC). Basically, it was a little bit fiddly, and took some time, but it all went pretty smoothly really.
Lets look for some links for you...
My threads on installing gcc-3.2
www.linuxnewbie.org/forum/showthread.php?s=&threadid=73096
www.linuxnewbie.org/forum/showthread.php?s=&threadid=71873
Multiple Compilers: http://gcc.gnu.org/faq.html#multiple
Also read: http://gcc.gnu.org/install/specific.html#*-*-linux-gnu
And of course: http://gcc.gnu.org