This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: Can't create shared lib on HPUX 10.20 with egcs v1.0.1
- To: Graham Hudspith <ghudspit at mltsa dot uk dot lucent dot com>
- Subject: Re: Can't create shared lib on HPUX 10.20 with egcs v1.0.1
- From: Jeffrey A Law <law at unknown>
- Date: Tue, 20 Jan 1998 08:13:36 -0700
- cc: egcs-bugs at cygnus dot com
- Reply-To: law at cygnus dot com
In message <34B4D83F.AD7@mltsa.uk.lucent.com>you write:
> ============================= make output ===========================
> + c++ -g -fpic -fpcc-struct-return
> -I/apps/gcc/egcs1.0/lib/gcc-lib/hppa1.1-hp-hpux10.20/egcs-2.90.23/include
> -I/usr/include -I- -I. -D_TRACE_ -c int_add.C
> + c++ -shared -g -fpic -fpcc-struct-return -D_TRACE_ -o libfoo.sl
> int_add.o
> /usr/ccs/bin/ld: DP relative code in file
> /apps/gcc/egcs1.0/lib/libstdc++.a(iostream.o) - shared library must be
> position
> independent. Use +z or +Z to recompile.
> collect2: ld returned 1 exit status
> make: *** exit code 1 making libfoo.sl
You need to build libstdc++ either as a shared library, or with -fpic so
that the linker does not need to link in parts of libstdc++ into your
program, or any such parts are PIC code.
This is not an egcs bug.
jeff