By default, a shared library (.so) will be selected.
If you want to change this behavior, you can use the -staticgcc option
-static
On systems that support dynamic linking, this prevents linking to shared libraries. On other systems, this option has no effect.
source
share