Hi, a few days ago I changed from gcc 4.0.2 (on a fedora core 4 system) to gcc 4.1.1. (on a fedora core 5 system). My application consists of several dynamically linked libraries written in c++ using quite a lot of stl and other template code. Especially linking these libraries with the new gcc is very slow compared to 4.0 (I don't know if the same problem occurs with executables as my execuatables consist of only a few hundred lines of code while the libs consists of ten thousands of lines). For example linking one of the bigger libraries takes about 30 seconds on gcc 4.0 but 5 minutes on gcc 4.1.
I'm quite sure that it's neither a problem of the system nor of the linker itself. Compling the c++-Files with gcc 4.0 and linking them with 4.1 is as fast as before. But compling with 4.1 and linking with 4.0 is very slow, too. There seems to be a problem with the compiler ...? I'm using -O0 while developping, so there should be no optimization. Perhaps there is a new magic switch in 4.1 to switch off some of the new optimizations (like ipa), which I have not found yet ??? Here are the calls of the compiler and the linker: g++ -x c++ -c -fPIC -ansi -Wall -W -Wno-unused-parameter -D_REENTRANT -O0 -I. -I<several include pathes...> -ggdb -o Trees/TreeOperands.o Trees/TreeOperands.cc g++ -rdynamic -shared -Wl,-soname,libSDL.so.0.0.0 <lots of *.o-files> -o libMyLib.so.0.0.0 -L<some lib pathes...> -l<some libs...> -Wl,-rpath,/home/sk/lib and the versions of the compilers: "old" Version: gcc version 4.0.2 20051125 (Red Hat 4.0.2-8) "new" version: gcc version 4.1.1 20060525 (Red Hat 4.1.1-1) Thanks for any suggestions Sven _______________________________________________ help-gplusplus mailing list [email protected] http://lists.gnu.org/mailman/listinfo/help-gplusplus
