Following along from this question: how-do-i-check-if-gcc-is-performing-tail-recursion-optimization, I noticed that using gcc with -fPIC seems to destroy this optimization. I am creating a shared library, but I doesn't seem to need the -fPIC option.
Well, my question is, why does -fPIC change gcc optimizations ? Do I need to keep -fPIC for any reason ?