Commit 3adea823 authored by Daniel Verkamp's avatar Daniel Verkamp
Browse files

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: default avatarDaniel Verkamp <daniel.verkamp@intel.com>
parent 557f3bd6
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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