diff options
-rw-r--r-- | meta/conf/distro/include/security_flags.inc | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc index e113f999a1..620978a8ed 100644 --- a/meta/conf/distro/include/security_flags.inc +++ b/meta/conf/distro/include/security_flags.inc | |||
@@ -21,11 +21,13 @@ SECURITY_PIE_CFLAGS ?= "${@'' if '${GCCPIE}' else '-pie -fPIE'}" | |||
21 | 21 | ||
22 | SECURITY_NOPIE_CFLAGS ?= "-no-pie -fno-PIE" | 22 | SECURITY_NOPIE_CFLAGS ?= "-no-pie -fno-PIE" |
23 | 23 | ||
24 | SECURITY_CFLAGS ?= "-fstack-protector-strong ${SECURITY_PIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}" | 24 | SECURITY_STACK_PROTECTOR ?= "-fstack-protector-strong" |
25 | SECURITY_NO_PIE_CFLAGS ?= "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}" | ||
26 | 25 | ||
27 | SECURITY_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro,-z,now" | 26 | SECURITY_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${SECURITY_PIE_CFLAGS} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}" |
28 | SECURITY_X_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro" | 27 | SECURITY_NO_PIE_CFLAGS ?= "${SECURITY_STACK_PROTECTOR} ${lcl_maybe_fortify} ${SECURITY_STRINGFORMAT}" |
28 | |||
29 | SECURITY_LDFLAGS ?= "${SECURITY_STACK_PROTECTOR} -Wl,-z,relro,-z,now" | ||
30 | SECURITY_X_LDFLAGS ?= "${SECURITY_STACK_PROTECTOR} -Wl,-z,relro" | ||
29 | 31 | ||
30 | # powerpc does not get on with pie for reasons not looked into as yet | 32 | # powerpc does not get on with pie for reasons not looked into as yet |
31 | GCCPIE_powerpc = "" | 33 | GCCPIE_powerpc = "" |
@@ -56,9 +58,9 @@ SECURITY_STRINGFORMAT_pn-gcc = "" | |||
56 | TARGET_CC_ARCH_append_class-target = " ${SECURITY_CFLAGS}" | 58 | TARGET_CC_ARCH_append_class-target = " ${SECURITY_CFLAGS}" |
57 | TARGET_LDFLAGS_append_class-target = " ${SECURITY_LDFLAGS}" | 59 | TARGET_LDFLAGS_append_class-target = " ${SECURITY_LDFLAGS}" |
58 | 60 | ||
59 | SECURITY_LDFLAGS_remove_pn-gcc-runtime = "-fstack-protector-strong" | 61 | SECURITY_STACK_PROTECTOR_pn-gcc-runtime = "" |
60 | SECURITY_LDFLAGS_remove_pn-glibc = "-fstack-protector-strong" | 62 | SECURITY_STACK_PROTECTOR_pn-glibc = "" |
61 | SECURITY_LDFLAGS_remove_pn-glibc-initial = "-fstack-protector-strong" | 63 | SECURITY_STACK_PROTECTOR_pn-glibc-initial = "" |
62 | # All xorg module drivers need to be linked this way as well and are | 64 | # All xorg module drivers need to be linked this way as well and are |
63 | # handled in recipes-graphics/xorg-driver/xorg-driver-common.inc | 65 | # handled in recipes-graphics/xorg-driver/xorg-driver-common.inc |
64 | SECURITY_LDFLAGS_pn-xserver-xorg = "${SECURITY_X_LDFLAGS}" | 66 | SECURITY_LDFLAGS_pn-xserver-xorg = "${SECURITY_X_LDFLAGS}" |