[09/22] security_flags.inc: Do not build gcc for powerpc with PIE defaults

Message ID d9650572dc46b76450c6e811ed0df22a5b305f0c.1499351361.git.raj.khem@gmail.com
State Accepted
Commit 4f3a9ccdb1d45804f4c094589e69e0bc87dc9c62
Headers show
Series
  • Glibc 2.26 update and musl updates
Related show

Commit Message

Khem Raj July 6, 2017, 2:33 p.m.
Since we have disabled FPIE from SECURITY_CFLAGS already, we have
to ensure the same with gcc, otherwise gcc (on-device) will be built
defaulting to PIE, and such binaries will fail to execute

Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 meta/conf/distro/include/security_flags.inc | 1 +
 1 file changed, 1 insertion(+)

-- 
2.13.2

-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Patch

diff --git a/meta/conf/distro/include/security_flags.inc b/meta/conf/distro/include/security_flags.inc
index dd713b9818..ab2062b78f 100644
--- a/meta/conf/distro/include/security_flags.inc
+++ b/meta/conf/distro/include/security_flags.inc
@@ -29,6 +29,7 @@  SECURITY_X_LDFLAGS ?= "-fstack-protector-strong -Wl,-z,relro"
 # powerpc does not get on with pie for reasons not looked into as yet
 SECURITY_CFLAGS_powerpc = "-fstack-protector-strong ${lcl_maybe_fortify} ${SECURITY_NOPIE_CFLAGS}"
 SECURITY_CFLAGS_pn-libgcc_powerpc = ""
+GCCPIE_powerpc = ""
 
 # arm specific security flag issues
 SECURITY_CFLAGS_pn-glibc = ""