Add security compiling option (RELRO, SC, and FORTIFY) in CFLAGS.
Change-Id: Ic32765cd1967b7f8d028acac238a3ccf001c6992
Signed-off-by: Unsung Lee <unsung.lee@samsung.com>
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fvisibility=hidden -fPIC")
SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -g -fno-omit-frame-pointer -finstrument-functions")
+SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} -fstack-protector-strong -D_FORTIFY_SOURCE=2 -O2 -Wl,-z,relro")
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -lrt")
SET(CMAKE_EXE_LINKER_FLAGS "-pie")