[Feature][T8TSK-58][TCAM_T800_SW_0263] support ASLR
Change-Id: I8bc99e28c6c2f6f25eec3ecd2a3b55b0cacf29d2
diff --git a/meta/meta-mediatek-mt2735/conf/base/auto2735evb-ivt-main/local.conf.sample b/meta/meta-mediatek-mt2735/conf/base/auto2735evb-ivt-main/local.conf.sample
index 1273859..2747987 100644
--- a/meta/meta-mediatek-mt2735/conf/base/auto2735evb-ivt-main/local.conf.sample
+++ b/meta/meta-mediatek-mt2735/conf/base/auto2735evb-ivt-main/local.conf.sample
@@ -1,3 +1,5 @@
require conf/base/local-common.conf
+require ${PWD}/../meta/poky/meta/conf/distro/include/security_flags.inc
+
MACHINE ??= "auto2735evb-ivt-main"
diff --git a/meta/poky/meta/conf/distro/include/security_flags.inc b/meta/poky/meta/conf/distro/include/security_flags.inc
index 620978a..af5d22c 100644
--- a/meta/poky/meta/conf/distro/include/security_flags.inc
+++ b/meta/poky/meta/conf/distro/include/security_flags.inc
@@ -13,7 +13,7 @@
lcl_maybe_fortify ?= "${@oe.utils.conditional('DEBUG_BUILD','1','','-D_FORTIFY_SOURCE=2',d)}"
# Error on use of format strings that represent possible security problems
-SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security -Werror=format-security"
+SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security"
# Inject pie flags into compiler flags if not configured with gcc itself
# especially useful with external toolchains
@@ -23,8 +23,9 @@
SECURITY_STACK_PROTECTOR ?= "-fstack-protector-strong"
-SECURITY_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${SECURITY_PIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
-SECURITY_NO_PIE_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}"
+SECURITY_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${SECURITY_PIE_CFLAGS} ${SECURITY_STRINGFORMAT}"
+
+SECURITY_NO_PIE_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${SECURITY_STRINGFORMAT}"
SECURITY_LDFLAGS ?= "${SECURITY_STACK_PROTECTOR} -Wl,-z,relro,-z,now"
SECURITY_X_LDFLAGS ?= "${SECURITY_STACK_PROTECTOR} -Wl,-z,relro"