openembedded-core.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] security_flags.inc: don't default to PIE if image-prelink is enabled
@ 2022-01-20  3:30 Kyle Russell
  2022-01-20  8:30 ` [OE-core] " Alexander Kanavin
  0 siblings, 1 reply; 5+ messages in thread
From: Kyle Russell @ 2022-01-20  3:30 UTC (permalink / raw)
  To: openembedded-core; +Cc: Kyle Russell

Since a prelinked rootfs is in conflict with PIE, don't attempt the latter
if the image enables prelink.
---
 meta/conf/distro/include/security_flags.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index e469eadca1..be6feb9e5f 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -5,7 +5,7 @@
 # From a Yocto Project perspective, this file is included and tested
 # in the DISTRO="poky" configuration.
 
-GCCPIE ?= "--enable-default-pie"
+GCCPIE ?= "${@bb.utils.contains('USER_CLASSES', 'image-prelink', '--disable-default-pie', '--enable-default-pie', d)}"
 # If static PIE is known to work well, GLIBCPIE="--enable-static-pie" can be set
 
 # _FORTIFY_SOURCE requires -O1 or higher, so disable in debug builds as they use
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-01-20 20:51 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20  3:30 [PATCH] security_flags.inc: don't default to PIE if image-prelink is enabled Kyle Russell
2022-01-20  8:30 ` [OE-core] " Alexander Kanavin
2022-01-20 17:41   ` Kyle Russell
2022-01-20 20:43     ` Richard Purdie
2022-01-20 20:51     ` Peter Kjellerstedt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).