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: RFC: when using libunwind, add -lunwind to link line when usingshared libgcc


Jim Wilson <wilson@specifixinc.com> writes:

> It was made unnecessary by a change to config/t-libunwind that linked
> libgcc_s.so with libunwind by adding it to SHLIB_LC.  libgcc_s.so thus
> brings in libunwind via DT_NEEDED, and there is no need for the gcc
> driver to link with libunwind a second time.  That serves no
> purpose. The DT_NEEDED for libunwind incidentally is necessary for
> other reasons, without it, some uses of libgcc can fail.  We can't
> rely on the gcc driver to supply the necessary -lunwind linker command.
>
> Unfortunately, I now see that HPUX is a complication.  HPUX is also
> using the USE_LIBUNWIND_EXCEPTIONS stuff, but in a different way than
> linux.  HPUX has its own SHLIB* macros in config/ia64/t-hpux.  I'd
> suggest a better way to fix this is to modify the t-hpux SHLIB_LINK to
> include a -lunwind, and remove (again) the -lunwind from the shared
> part of init_gcc_specs.
>
> I don't have a copy of hpux to test this with.  I am not willing to
> spend my own money to buy a copy.

I will test this patch on ia64-hpux.

I strongly suspect that it will not work, however; I remember
DT_NEEDED not being honored by the HPUX linker/loader.

zw


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