configure: cflags: add initial cflags
authorWaLyong Cho <walyong.cho@samsung.com>
Tue, 15 Nov 2016 05:12:25 +0000 (14:12 +0900)
committerWaLyong Cho <walyong.cho@samsung.com>
Tue, 15 Nov 2016 05:17:29 +0000 (14:17 +0900)
Change-Id: Id29d5fad8016144e31d49dabfd42b08871f10ce2
Signed-off-by: WaLyong Cho <walyong.cho@samsung.com>
configure.ac

index 3d7a691..b8c8daf 100644 (file)
@@ -53,6 +53,23 @@ if test -z "$GPERF" ; then
 fi
 
 # ------------------------------------------------------------------------------
+our_cflags=" \
+        -g -O2 \
+        -Werror \
+        -fpie"
+
+our_ldflags=" \
+        -Wl,--as-needed \
+        -Wl,--no-undefined \
+        -Wl,--gc-sections \
+        -Wl,-z,relro \
+        -Wl,-z,now \
+        -pie"
+
+AC_SUBST([OUR_CFLAGS], "$our_cflags")
+AC_SUBST([OUR_LDFLAGS], "$our_ldflags")
+
+# ------------------------------------------------------------------------------
 PKG_CHECK_MODULES(DBUS, [dbus-1 >= 1.3.2])
 PKG_CHECK_MODULES(GLIB, [glib-2.0])
 PKG_CHECK_MODULES(GIO, [gio-2.0])