On 02/04/2015 09:59 AM, Peter wrote:
> I simplified it down to this and was still got the error:
> make makefiles shared=yes 'CCARGS=-fPIC' 'AUXLIBS=-pie'
> 
> If I remove the -pie from AUXLIBS (either from the simplified version or
> the full version) it builds just fine.  It also builds just fine if I
> remove the shared=yes (and dynamicmaps=yes).  So it appears that -pie
> doesn't want to work with shared=yes.
> 
> I honestly don't know where or why -pie was added in the first place, so
> I'll remove it for now, I don't know if postfix is supposed to be
> compatible with that option or not.

A bit of googling shows that it's for security hardening of the code.  I
also found the fix.  If I move -pie from AUXLIBS to CCARGS then it
appears to build just fine.  I think the issue is that with the new
AUXLIBS_X attributes those options specified in AUXLIBS are no longer
applied to everything so the linker was trying to link some
position-independent code against other code that was not compiled with
-pie.  Moving -pie to CCARGS forces it to be applied to everything and
fixes the issue.


Peter

Reply via email to