gcc-configure-common: Address problems with gengtype
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 16 Jun 2014 12:13:38 +0000 (13:13 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 17 Jun 2014 07:59:03 +0000 (08:59 +0100)
The gengtype patch we apply to gcc aims to ensure that the build and host
config headers don't get confused. We're seeing build failures where
both headers have been included, likely due to a race over the configuration
files.

It seems the gengtype-lex.c file isn't being regenerated when it should
and the unconditional inclusion of bconfig.h is resulting in these issues.

The fix is therefore to remove the file, forcing its regeneration.

[YOCTO #6393]

(From OE-Core rev: dd649374b30eb2d9980dce6eae95db0563593ef7)

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

index 4a10554..75fb379 100644 (file)
@@ -91,6 +91,8 @@ python do_preconfigure () {
     import subprocess
     cmd = d.expand('PATH=${PATH} cd ${S} && gnu-configize')
     subprocess.check_output(cmd, stderr=subprocess.STDOUT, shell=True)
+    # See 0044-gengtypes.patch, we need to regenerate this file
+    bb.utils.remove(d.expand("${S}/gcc/gengtype-lex.c"))
 }
 addtask do_preconfigure after do_patch before do_configure
 do_preconfigure[depends] += "gnu-config-native:do_populate_sysroot autoconf-native:do_populate_sysroot"