So everything in Rawhide must be compiled with -fPIC?

Richard W.M. Jones rjones at
Thu Feb 19 10:30:50 UTC 2015

On Thu, Feb 19, 2015 at 11:23:18AM +0100, Jakub Jelinek wrote:
> On Thu, Feb 19, 2015 at 10:11:07AM +0000, Richard W.M. Jones wrote:
> > 
> > I'm still no closer to being able to fix the problem.
> > 
> > I have to add -fPIE (or is that -pie or -fpie or -DPIE) to every
> > executable?  Upstream?  Will that break on some platforms/architectures?
> It really should be just about using the %{optflags} and
> %{__global_ldflags} consistently, unless somebody introduced recently a
> redhat-rpm-config bug.
> > And indeed what is the difference between -fPIE / -pie / -fpie /
> > -fPIC / -fpic / -DPIC / etc?  Where is this stuff documented?
> Have you tried something so obvious as man gcc ?

info gcc, of course yes.  -DPIC is not documented at all, and the
various pie/pic options are obscure to say the least.

The GCC 5 documentation is not online, but here is what
GCC 4.9.2 has to say:

I've written compilers (two of them, from scratch) and this stuff
barely makes sense.


Richard Jones, Virtualization Group, Red Hat
Read my programming and virtualization blog:
virt-builder quickly builds VMs from scratch

More information about the devel mailing list