This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Use +z or +Z to recompile...
- From: Jeff Law <law at porcupine dot cygnus dot com>
- To: "Venkatakrishnan, V" <v dot venkatakrishnan at channels dot usa dot xerox dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Mon, 21 Oct 2002 10:33:59 -0600
- Subject: Re: Use +z or +Z to recompile...
- Reply-to: law at redhat dot com
In message <8229C4577A00D511ABC00090277A45A0012361B1@us0111-ch-ms1.sdi.xcdg.xer
ox.com>, "Venkatakrishnan, V" writes:
>Hi,
> I'm using gcc ver 3.2 20020708 (experimental) on my HPUX 11.0 box.
> When building a shared library I get an error as follows....
>
>/usr/ccs/bin/ld: DP relative code in file /var/tmp//ccCoJZUg.o - shared
>library must be position independent. Use +z or +Z to recompile.
>
> Now I'm already using the -fpic option while compiling my .c to .o
>using which I then try to build my .sl, so I guess my object file is already
>position independent. Why the error during link though?
> Is there something I'm missing here??
Use -fPIC rather than -fpic.
jeff