4 ms·
Is there any reason that compilers don't somehow fix this thing by default?
by ansgri 14y ago
Is there any reason that compilers don't somehow fix this thing by default?
- izacus 14y agoThey can't - you get this error when trying to link other objects, which are already compiled without position-independent code. So the linker can't really fix this. Also, if you're not doing dynamic linking, code without -fPIC is generally faster and for use-cases where C (and/or C++) is used that can make a difference.