🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #41566

Re: -fPIC on HP/UX, gcc 2.7.2 not working

#41566
From: Timothy Mooney
Date: Sun, 10 Mar 1996 00:00
36 lines
2109 bytes
In article <4hsemp$ch7@winx03.informatik.uni-wuerzburg.de>,
Frank Hofmann <hofmann@cip.physik.uni-wuerzburg.de> wrote:
>According to the gcc 2.7.2 readme, there should be support for shared
>libraries and position independent code on HP/UX 9.

There is; it works fine for me under HP-UX 9.01 & 10.01.

> But the following
>extremely simple example gives incorrect output with our gcc installation

You should have included the output it generates, to illustrate your point.

>Is this a (perhaps known ?) gcc problem or is our installation screwed up ?

I would tend to believe that something is wrong with your installation;
I've had no problems with gcc 2.7.2 under HP-UX, and I've built lots of stuff
with it that requires position independent code (eg perl5).

>Are there any special procedures to follow during build to get a gcc binary
>that supports pic on HP/UX ?

I built gcc with GNU as; this is necessary for gdb support.  Perhaps it is
also a (undocumented?) requirement for PIC support.

>In fact, I fell over this trying to build zlib 0.99 - it doesn't work with
>our version of HP's cc (which I normally use for shared libs), so I tried
>gcc which creates working output if not using '-fPIC/-fpic'...

Does `ld -b' complain about the object files generated by gcc?

Tim
-- 
Tim Mooney                              mooney@toons.cc.ndsu.nodak.edu
Information Technology Services         (701) 231-1076 (Voice)
Room 242-J6, IACC Bldg.                 (701) 231-8541 (FAX)
North Dakota State University, Fargo, ND 58105
Technical Details
Message-ID: <4htrbg$648@golem.phys.ndsu.NoDak.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <4hsemp$ch7@winx03.informatik.uni-wuerzburg.de>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,919c47dad4787bcd,start
X-Google-Attributes: gid11318c,public
From: mooney@golem.phys.ndsu.NoDak.edu (Timothy Mooney)
Subject: Re: -fPIC on HP/UX, gcc 2.7.2 not working
Date: 1996/03/10
Message-ID: <4htrbg$648@golem.phys.ndsu.NoDak.edu>
X-Deja-AN: 142813823
references: <4hsemp$ch7@winx03.informatik.uni-wuerzburg.de>
content-type: text/plain; charset=US-ASCII
organization: North Dakota Higher Education Computing Network
mime-version: 1.0
newsgroups: gnu.gcc.help