This is the mail archive of the gcc@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: g++/GNU ld/position independent libraries


>>>>> "Wheeler," == Wheeler, Fred (CRD) <wheeler@crd.ge.com> writes:

> To get right to the point -- If it is truly the case that one should not use GNU ld in Solaris when
> making relocatable libraries then I hope somebody active in the GCC/binutils projects can add
> warnings to the documentation or configure processes so that others can avoid this problem.

> Over the past several days I have gone through a great deal of trouble to figure out why suddenly all
> programs in a big project (VXL) build crashed with a bus error on Solaris 2.7 and 2.8 immediately
> upon execution.  My build system (CMake) recently switched me from -Wl,-G to -shared -nostdlib for
> shared libs, which started to the problem.

GCC shared libraries should always be built with gcc -shared.  -nostdlib is
wrong.

I haven't heard about problems with Solaris shared libraries and GNU ld,
though that doesn't mean there aren't any.  You really want to use GNU as
and ld for C++ if at all possible, so that duplicate template
instantiations, vtables and such get discarded.

Jason


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