From 4c9fa7bd9a00bacc55fb2217d62d42e887221f5b Mon Sep 17 00:00:00 2001 From: Sven Ebenfeld Date: Mon, 25 Jul 2016 08:16:57 +0200 Subject: openjdk-8: ignore wrong GCCVERSION-flag During my recipe parsing, GCCVERSION in the cross case seems to be 'l' this leads to a ValueError during recipe parsing. Therefore check type before trying to parse the version flag. Signed-off-by: Sven Ebenfeld Signed-off-by: Maxin B. John --- recipes-core/openjdk/openjdk-8-common.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc index 7ad802a..c2f9eb4 100644 --- a/recipes-core/openjdk/openjdk-8-common.inc +++ b/recipes-core/openjdk/openjdk-8-common.inc @@ -271,8 +271,10 @@ def version_specific_cflags(d): # doesn't work anyway. version = d.getVar('GCCVERSION', expand=True)[0] - extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or '' - return extraflags + if version.isdigit(): + extraflags = d.getVar('FLAGS_GCC%d' % int(version), True) or '' + return extraflags + return '' CFLAGS_append = " ${@version_specific_cflags(d)}" CXXFLAGS_append = " ${@version_specific_cflags(d)}" -- cgit v1.2.3-54-g00ecf