This is the mail archive of the gcc-bugs@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]

Re: Can't create shared lib on HPUX 10.20 with egcs v1.0.1



  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


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