This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: User directed Function Multiversioning via Function Overloading (issue5752064)


Sriraman Tallam <tmsriram@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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]