Question: what is fpic option in gcc?
Answer: Answered Jun 19, 2015. You should probably always use -fPIC when you compile a shared library. The -fPIC option tells the compiler to generate position-independent code (i.e. code that can be loaded at any particular virtual memory address at runtime).