Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pcc, -fPIC



On Wed, 7 Sep 2011, bch%methodlogic.net@localhost wrote:

> On Wed, Sep 07, 2011 at 01:58:28PM +0000, bch%methodlogic.net@localhost wrote:
> > On Wed, Sep 07, 2011 at 08:30:41AM +0100, Iain Hibbert wrote:
> > > On Wed, 7 Sep 2011, bch%methodlogic.net@localhost wrote:
> > >
> > > > I'm having issue w/ pcc creating .so's. Specifically, when using the 
> > > > -fPIC
> > > > flag, ld(1) complains that the binaries are not compiled w/ -fPIC. I've
> > > > got a fairly recent -current, pcc version 1.1.0.DEVEL 20110901.
> > > >
> > > > I don't actually use pcc that often, so can't say this used to work but
> > > > broke afer [date xyz].
> > >
> > > I run i386 builds with pcc fairly regularly (partial builds anyway, I have
> > > a script that runs through most of what I know can be compiled) and have
> > > seen no problems like that lately, what arch are you using and how do you
> > > invoke pcc?
> >
> > I'm running amd64; my project is simple by comparison. It my project
> > *does* compile using gcc, but is linking against libs also compiled w/
> > gcc. Could be the pcc generated code in my project is not compatible w/
> > the gcc libs on the system?
> >
> > Thanks for your sample output. I'll try to reduce my steps until I get
> > _something_ that builds, and make things more complex until it fails.
>
> So far, it appears I'm running into issues linking against gcc-compiled
> libs wrt PIC code (PIC is not recognized). Ian, have you worked with
> switches in gcc for compatibility (ie: -fpcc-struct-return), or have
> any insight into my predicament?

I believe gcc on NetBSD uses -fpcc-struct-return by default so that
shouldn't be an issue (and I'm not sure if it is pertinent for amd64
anyway), and I have never found any especial problem linking programs
built with pcc against libs built with gcc

If you can show a process that fails I can try to reproduce it..  there
have been various issues in the past that have all been fixed for i386 but
it may be that something is not quite right in the PIC code generation for
amd64. Alas I don't have one..

iain


Home | Main Index | Thread Index | Old Index