Add CFLAGS/LDFLAGS for ASLR 92/144392/1 submit/tizen/20170816.231957
authorŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 16 Aug 2017 10:45:03 +0000 (12:45 +0200)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Wed, 16 Aug 2017 11:14:40 +0000 (13:14 +0200)
Change-Id: I215a8c004194973c1b54688a91fa806ad71802d7
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
Makefile.am
configure.ac

index a05c48c394d948c1cf43b468318824d3eb5ccc4c..951bf6a70f96cc1e0b43aff6c2b30863009964fe 100644 (file)
@@ -21,12 +21,26 @@ basetarget = $(basename $(notdir $@))
 modname = $(basetarget)
 name_fix = $(subst $(comma),_,$(subst -,_,$1))
 
-AM_CFLAGS = ${my_CFLAGS} \
+AM_CFLAGS = \
+       -Wall \
+       -Wchar-subscripts \
+       -Wformat-security \
+       -Wmissing-declarations \
+       -Wmissing-prototypes \
+       -Wnested-externs \
+       -Wpointer-arith \
+       -Wshadow \
+       -Wsign-compare \
+       -Wstrict-prototypes \
+       -Wtype-limits \
+       -D_GNU_SOURCE=1 \
+       -fPIE \
        -D"FAULTD_MODNAME_T=$(call name_fix,$(modname))"
 
 AM_LDFLAGS = \
        -Wl,--gc-sections \
-       -Wl,--as-needed
+       -Wl,--as-needed \
+       -pie
 
 SED_PROCESS = \
        $(AM_V_GEN)$(MKDIR_P) $(dir $@) && $(SED) \
index 9c9a7c271ce9bdd38a41407a22230d067dd2e8bf..222ef8112950fa32f266f6dae3cb73a31efa808a 100644 (file)
@@ -125,22 +125,6 @@ AC_CHECK_FUNCS([ \
        printf\
 ])
 
-my_CFLAGS="\
--Wall \
--Wchar-subscripts \
--Wformat-security \
--Wmissing-declarations \
--Wmissing-prototypes \
--Wnested-externs \
--Wpointer-arith \
--Wshadow \
--Wsign-compare \
--Wstrict-prototypes \
--Wtype-limits \
--D_GNU_SOURCE=1
-"
-AC_SUBST([my_CFLAGS])
-
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES([
         Makefile