build: always build with -fPIC

This allows the same objects to be linked into static and shared
libraries and allows the creation of position-independent executables
with the static libraries.

Change-Id: I119949c3644c02a83e414227615dcc2d8f896286
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
This commit is contained in:
Daniel Verkamp 2015-10-13 10:11:38 -07:00
parent 557f3bd6c2
commit 3adea82331

View File

@ -47,6 +47,9 @@ COMMON_CFLAGS = -g $(C_OPT) -Wall -Werror -fno-strict-aliasing -march=native -m6
COMMON_CFLAGS += -Wformat -Wformat-security -Wformat-nonliteral
# Always build PIC code so that objects can be used in shared libs and position-independent executables
COMMON_CFLAGS += -fPIC
# Enable stack buffer overflow checking
COMMON_CFLAGS += -fstack-protector