On Fri, 9 Jan 2015, Daniel Micay wrote: > > --with-specs="%{pie|fpic|fPIC|fpie|fPIE|fno-pic|fno-PIC|fno-pie|fno-PIE|shared|static|nostdlib|nodefaultlibs|nostartfiles:;:-fPIE > > -pie}" > > > > at configure time (using CONFIGURE_SPECS). > > > > I have no idea if the above is really the proper spec to use - why > > do you include static, nostdlib, nodefaultlibs and nostartfiles > > for example? Similar, if I say > > PIE isn't supported for static executables by binutils, etc. so it > does need to exclude that. The checks for nostdlib, nodefaultlibs
Well - that would indicate excluding -pie if one of the link-time options conflicting with it is used, -fPIE if one of the compile-time options conflicting with it is used. That way, "gcc -static file.c" would still have the same effect as "gcc -c file.c; gcc -static file.o" (building a PIE object, linking it into a non-PIE static executable), which makes logical sense to me (although there may be no great benefit either way). -- Joseph S. Myers jos...@codesourcery.com