summaryrefslogtreecommitdiffstats
path: root/meta/conf
diff options
context:
space:
mode:
Diffstat (limited to 'meta/conf')
-rw-r--r--meta/conf/distro/include/security_flags.inc4
1 files changed, 3 insertions, 1 deletions
diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index 05253b2df9..f996ca9be2 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -10,7 +10,9 @@ GCCPIE ?= "--enable-default-pie"
10 10
11# _FORTIFY_SOURCE requires -O1 or higher, so disable in debug builds as they use 11# _FORTIFY_SOURCE requires -O1 or higher, so disable in debug builds as they use
12# -O0 which then results in a compiler warning. 12# -O0 which then results in a compiler warning.
13lcl_maybe_fortify ?= "${@oe.utils.conditional('DEBUG_BUILD','1','','-O -D_FORTIFY_SOURCE=2',d)}" 13OPTLEVEL = "${@bb.utils.filter('SELECTED_OPTIMIZATION', '-O0 -O1 -O2 -O3 -Ofast -Og -Os -Oz -O', d)}"
14
15lcl_maybe_fortify ?= "${@oe.utils.conditional('OPTLEVEL','-O0','','${OPTLEVEL} -D_FORTIFY_SOURCE=2',d)}"
14 16
15# Error on use of format strings that represent possible security problems 17# Error on use of format strings that represent possible security problems
16SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security -Werror=format-security" 18SECURITY_STRINGFORMAT ?= "-Wformat -Wformat-security -Werror=format-security"