Add pie,relro compile option 09/168509/1 accepted/tizen/base/20180209.132436 submit/tizen_base/20180205.003440
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 29 Jan 2018 06:23:41 +0000 (15:23 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 29 Jan 2018 06:23:41 +0000 (15:23 +0900)
[Model] All
[BinType] AP
[Customer] OPEN

[Issue#] N/A
[Request] N/A
[Occurrence Version] N/A

[Problem] not adjust pie,relro compile option
[Cause & Measure] add pie,relro compile option at Makefile
[Checking Method]

[Team] Open Source Management and Setting Part
[Developer] dh0128.kwak
[Solution company] Samsung
[Change Type] N/A

Change-Id: I8b75c13661817ee4b4a597f5800e33ffcda3d18c
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
src/Makefile

index b8f440e..bcd8723 100644 (file)
@@ -597,7 +597,8 @@ CONF_OPT_FEAT = --with-features=huge
 #CFLAGS = -g -O2 '-DSTARTUPTIME="vimstartup"' -fno-strength-reduce -Wall -Wmissing-prototypes
 
 # Use this with GCC to check for mistakes, unused arguments, etc.
-CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
+#CFLAGS = -g -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
+CFLAGS = -g -O2 -Wall -Wextra -Wshadow -Wmissing-prototypes -Wunreachable-code -fstack-protector-strong -Wl,-z,relro -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
 #CFLAGS = -g -O2 -Wall -Wextra -Wmissing-prototypes -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DU_DEBUG
 #PYTHON_CFLAGS_EXTRA = -Wno-missing-field-initializers
 #MZSCHEME_CFLAGS_EXTRA = -Wno-unreachable-code -Wno-unused-parameter
@@ -664,6 +665,7 @@ LINT_OPTIONS = -beprxzF
 #
 # PROFILE_CFLAGS=-g -O0 -fprofile-arcs -ftest-coverage
 # LDFLAGS=--coverage
+LDFLAGS= -Wl,-z,relro -pie
 
 
 # Uncomment one of the next two lines to compile Vim with the