> I have a question about the different behaviour of the Linux and Solaris > versions of gcc (3.4.x and 4.0.x) regarding static linking of libgcc. I do > the static linking by adding the libgcc.a library.
Ideally you should not. Use -shared-libgcc or -static-libgcc instead. > The Linux versions link libgcc statically, as do the Solaris versions. But > then the Solaris version requires to additionally load libgcc_s.so, although > there there no undefined references to GCC. When I change the specs file > (for 3.4.x), so that the libgcc section of the Solaris version matches the > Linux version, also the Solaris version behaves like *I* expect. The shared version is required on Solaris to properly support exception handling across shared libraries. > Now my question: which behaviour is the correct one? Both. -- Eric Botcazou