toolchain: add gcc configure default PIE and SSP
[openwrt/openwrt.git] / toolchain / gcc / common.mk
index 7c4e773a0fbe8f5f6855fb2b214f1e13b89b2679..ece71ef0289c2824f63a3503849219fc87bef858 100644 (file)
@@ -133,6 +133,16 @@ ifndef GCC_VERSION_4_8
   GCC_CONFIGURE += --with-diagnostics-color=auto-if-env
 endif
 
+ifneq ($(CONFIG_GCC_DEFAULT_PIE),)
+  GCC_CONFIGURE+= \
+               --enable-default-pie
+endif
+
+ifneq ($(CONFIG_GCC_DEFAULT_SSP),)
+  GCC_CONFIGURE+= \
+               --enable-default-ssp
+endif
+
 ifneq ($(CONFIG_SSP_SUPPORT),)
   GCC_CONFIGURE+= \
                --enable-libssp