1
0
mirror of https://git.yoctoproject.org/poky synced 2026-06-01 00:59:48 +00:00

gcc-cross.inc: Prevent native sysroot from leaking into configargs.h

Prevent the native(sdk) sysroot path from leaking into configargs.h. The
configargs.h header is intended to be static and unchanged as the
content is used as a means of determining that a gcc plugin is built for
the same gcc. This also effects the output of 'gcc --version'. Due to
per recipe sysroots and staging, the sysroot path would be replaced with
the sysroot local to the recipe thus changing the content of
configargs.h.

The sysroot path is replaced with a generic "/host" prefix which
represents the host sysroot (e.g. native or nativesdk).

(From OE-Core rev: 84a78f46d59447eeec3d69532a7506148f64c979)

Signed-off-by: Nathan Rossi <nathan@nathanrossi.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Nathan Rossi
2019-11-25 06:58:00 +00:00
committed by Richard Purdie
parent 5507707f0d
commit decb74d362
2 changed files with 7 additions and 4 deletions
@@ -302,10 +302,6 @@ do_check() {
# HACK: this works around the configure setting CXX with -nostd* args
sed -i 's/-nostdinc++ -nostdlib++//g' $(find ${B} -name testsuite_flags | head -1)
# HACK: this works around the de-stashing changes to configargs.h, as well as recipe-sysroot changing the content
sed -i '/static const char configuration_arguments/d' ${B}/gcc/configargs.h
${CC} -v 2>&1 | grep "^Configured with:" | \
sed 's/Configured with: \(.*\)/static const char configuration_arguments[] = "\1";/g' >> ${B}/gcc/configargs.h
if [ "${TOOLCHAIN_TEST_TARGET}" = "user" ]; then
# qemu user has issues allocating large amounts of memory