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
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.
 
-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Reply via email to