fpic

Tells the compiler to generate position-independent code.

IDE Equivalent

None

Architectures

IA-32, IntelŪ EM64T, IntelŪ ItaniumŪ architecture

Syntax

Linux: -fpic
-fno-pic
Windows:  None

Arguments

None

Default

OFF The compiler does not generate position-independent code.

Description

This option tells the compiler to generate position-independent code.

It specifies full symbol preemption. Global symbol definitions as well as global symbol references get default (that is, preemptable) visibility unless explicitly specified otherwise.

On ItaniumŪ-based systems and Intel EM64T systems, this option must be used when building shared objects.

This option can also be specified as -fPIC.

Alternate Options

Linux: -Kpic, -KPIC (these are deprecated options)
Windows: None