This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: building shared libs with g++ 2.95.2 on HP-UX 11
- To: Alexandre Oliva <aoliva at redhat dot com>
- Subject: Re: building shared libs with g++ 2.95.2 on HP-UX 11
- From: Martin Sebor <sebor at roguewave dot com>
- Date: Sat, 09 Sep 2000 18:33:17 -0600
- CC: gcc bug reports <gcc-bugs at gcc dot gnu dot org>
- Organization: Rogue Wave Software, Inc.
- References: <39BACA11.DC10F18B@roguewave.com> <or3dj9cdg5.fsf@guarana.lsd.ic.unicamp.br>
Alexandre Oliva wrote:
>
> On Sep 9, 2000, Martin Sebor <sebor@roguewave.com> wrote:
>
> > $ echo "void foo () { }" > t.cpp ; gcc -c -fPIC t.cpp && gcc t.o -shared
> > -o libt.sl
> > /usr/bin/ld: DP relative code in file /var/tmp/ccyhoDuR.o - shared
> > library must be position
> > independent. Use +z or +Z to recompile.
>
> Use -fPIC when linking too, so that the C file implicitly compiled by
> collect is compiled with -fPIC too.
>
Thanks, I should have thought of that. I'm still getting errors but
that's where the "unsupported business" comes in, I suppose.
Martin
...
/usr/bin/ld: Target of unconditional branch is out of range
Reference from: instance.o(0x44028)
/usr/bin/ld: Target of unconditional branch is out of range
Reference from: instance.o(0x4a638)
/usr/bin/ld: Invalid fixups exist
collect2: ld returned 1 exit status
> --
> Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
> Red Hat GCC Developer aoliva@{cygnus.com, redhat.com}
> CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org}
> Free Software Evangelist *Please* write to mailing lists, not to me