From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23424 invoked by alias); 21 Oct 2002 17:47:18 -0000 Mailing-List: contact gcc-help-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-help-owner@gcc.gnu.org Received: (qmail 23416 invoked from network); 21 Oct 2002 17:47:17 -0000 Received: from unknown (HELO ariel.eastgw.xerox.com) (208.140.33.25) by sources.redhat.com with SMTP; 21 Oct 2002 17:47:17 -0000 Received: from sdi-adm1.sdi.xcdg.xerox.com (sdi-adm1.sdi.xcdg.xerox.com [13.231.36.100]) by ariel.eastgw.xerox.com (8.9.3/8.9.3) with ESMTP id NAA12347; Mon, 21 Oct 2002 13:47:03 -0400 (EDT) Received: by sdi-adm1.sdi.xcdg.xerox.com with Internet Mail Service (5.5.2654.89) id <4QZGFZCJ>; Mon, 21 Oct 2002 13:47:15 -0400 Message-ID: <8229C4577A00D511ABC00090277A45A0012361B2@us0111-ch-ms1.sdi.xcdg.xerox.com> From: "Venkatakrishnan, V" To: "'law@redhat.com'" Cc: gcc-help@gcc.gnu.org Subject: RE: Use +z or +Z to recompile... Date: Mon, 21 Oct 2002 10:47:00 -0000 MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2002-10/txt/msg00252.txt.bz2 Using -fPIC gives the same error. -----Original Message----- From: Jeff Law [mailto:law@porcupine.cygnus.com] Sent: Monday, October 21, 2002 12:34 PM To: Venkatakrishnan, V Cc: gcc-help@gcc.gnu.org Subject: Re: Use +z or +Z to recompile... 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