]> code.ossystems Code Review - openembedded-core.git/commitdiff
gcc-cross: Fix header file corruption problems
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 4 Sep 2019 10:22:22 +0000 (11:22 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Fri, 6 Sep 2019 07:24:36 +0000 (08:24 +0100)
gcc's makefile can move files, replacing with the contents "timestamp". This
corrupts the headers and breaks things like the gcc testsuite.

Add in a fix to ensure the headers are not corrupted through their hardlink copies.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/gcc/gcc-cross.inc

index e417b8987345fa6109c2acc3161970ad89b485f1..95af6d89a9dd0f3e018fc249e28a28a43c3694a5 100644 (file)
@@ -212,6 +212,9 @@ do_gcc_stash_builddir[cleandirs] = "${BUILDDIRSTASH}"
 do_gcc_stash_builddir () {
        dest=${BUILDDIRSTASH}
        hardlinkdir . $dest
+       # Makefile does move-if-change which can end up with 'timestamp' as file contents so break links to those files
+       rm $dest/gcc/include/*.h
+       cp gcc/include/*.h $dest/gcc/include/
 }
 addtask do_gcc_stash_builddir after do_compile before do_install
 SSTATETASKS += "do_gcc_stash_builddir"