Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] RfC: Incomplete morty toolchain config (gcc-6.2 in poky and oe-core)
@ 2017-02-12  3:36 Stephen Arnold
  2017-02-12  3:59 ` ✗ patchtest: failure for " Patchwork
  0 siblings, 1 reply; 2+ messages in thread
From: Stephen Arnold @ 2017-02-12  3:36 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer


[-- Attachment #1.1: Type: text/plain, Size: 1062 bytes --]

Above toolchain breaks in both possible sets of metadata on hardened host
(hardened amd64 profile with PAX kernel).  This issue does not occur on
krogoth or older branches with 5.4 or previous gcc versions.

Rolling back to 5.4 toolchain in morty results in random build failures
from the kernel killing gcc processes:

[122053.140618] PAX: terminating task:
/home/sarnold/foss-boundary-morty/oe-core/build-nitrogen6x/tmp-glibc/sysroots/x86_64-linux/usr/libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/5.4.0/cc1plus(cc1plus):7943,
uid/euid: 1002/1002, PC

The 6.2 toolchain build error (failure to link gcov/other due to relocs) is
caused by incomplete no-PIE flags not being included in ALL* flag
variables, which is fixed in the attached Gentoo patch.

I've tested it on two build machines with both oe-core and poky builds and
both the toolchain and PAX are happy now.  I would highly recommend fixing
the no-PIE config; I probably have time to extract a patch and mail it
as-is, otherwise I'm fine if someone else fixes it.

Steve

[-- Attachment #1.2: Type: text/html, Size: 1162 bytes --]

[-- Attachment #2: 54_all_nopie-all-flags.patch --]
[-- Type: text/x-patch, Size: 650 bytes --]

We need to pass NO_PIE_CFLAGS to ALL_* so gcc don't fail when
we compile it with older gcc and pie.

--- a/gcc/Makefile.in	2015-06-25 19:18:12.000000000 +0200
+++ b/gcc/Makefile.in	2016-04-22 00:12:54.029178860 +0200
@@ -991,10 +991,10 @@ ALL_CXXFLAGS = $(T_CFLAGS) $(CFLAGS-$@)
 ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
 
 # This is the variable to use when using $(COMPILER).
-ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
+ALL_COMPILERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
 
 # This is the variable to use when using $(LINKER).
-ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
+ALL_LINKERFLAGS = $(NO_PIE_CFLAGS) $(ALL_CXXFLAGS)
 
 # Build and host support libraries.
 

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

end of thread, other threads:[~2017-02-12  3:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-12  3:36 [PATCH] RfC: Incomplete morty toolchain config (gcc-6.2 in poky and oe-core) Stephen Arnold
2017-02-12  3:59 ` ✗ patchtest: failure for " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox