-fpic or -fPIC flag, gcc creates an object file with position independent code. This is usually necessary when creating a shared object. -fpic and -fPIC are equivalent. On other architectures, there is a difference. -fpic, the compiler defines the macro __pic__ and __PIC__ to 1. When copmiling with -fPIC, these macros are defined to 2.