@@ -82,9 +82,9 @@ python do_preconfigure() {
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_CHECK#%s#g' % check, source + '/clang/include/clang/Driver/Distro.h']
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_TRIPLES#%s#g' % triple, source + '/clang/lib/Driver/ToolChains/Linux.cpp']
+ cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_TRIPLE#%s#g' % triple, source + '/clang/lib/Driver/ToolChains/Linux.cpp']
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
- cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_CASES#%s#g' % case, source + '/clang/lib/Driver/Distro.cpp']
+ cmd = ['sed', '-i', 's#//CLANG_EXTRA_OE_DISTRO_CASE#%s#g' % case, source + '/clang/lib/Driver/Distro.cpp']
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
}
Both CLANG_EXTRA_OE_DISTRO_CASE and CLANG_EXTRA_OE_DISTRO_TRIPLE are added by the same patch: 0016-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch and they are supposed to be replaced by a couple of sed commands in do_preconfigure. However, sed looks for CLANG_EXTRA_OE_DISTRO_CASES (and CLANG_EXTRA_OE_DISTRO_TRIPLES) and since none is found, the code is left with the dangling comment like so: @ clang/lib/Driver/ToolChains/Linux.cpp 82 if (TargetEnvironment == llvm::Triple::GNUX32) 83 return "x86_64-linux-gnux32"; 84 //CLANG_EXTRA_OE_DISTRO_TRIPLE 85 return "x86_64-linux-gnu"; Fix that by removing the 'S' in the end of ..._CASES and ..._TRIPLES. Another way to fix this would be to directly change the patch, but simply changing do_preconfigure feels cleaner. Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com> --- meta/recipes-devtools/clang/llvm-project-source.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)