Sriraman Tallam <tmsri...@google.com> writes:

> Any reason why gcc should not be made to prefer libgcc_s.so too like g++?

It's controlled by the -shared-libgcc and -static-libgcc options.

The -shared-libgcc option is the default for g++ because several years
ago a shared libgcc was required to make exception handling work
correctly when exceptions were thrown across shared library boundaries.
That is no longer true when using GNU ld or gold on a GNU/Linux system,
but it is still true on some systems.

The -static-libgcc option is the default for gcc because the assumption
is that most C programs do not throw exceptions.  The -shared-libgcc
option is available for those that do.

Ian

Reply via email to