All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-java][PATCH v2] openjdk-8: ignore wrong GCCVERSION-flag
@ 2016-07-21 13:09 Sven Ebenfeld
  2016-07-21 14:10 ` Fabio Berton
  0 siblings, 1 reply; 2+ messages in thread
From: Sven Ebenfeld @ 2016-07-21 13:09 UTC (permalink / raw)
  To: openembedded-devel; +Cc: Sven Ebenfeld

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 <sven.ebenfeld@vaillant-group.com>
---
 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 089f907..33b7909 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -271,10 +271,12 @@ def version_specific_cflags(d):
         # doesn't work anyway.
         version = d.getVar('GCCVERSION', expand=True)[0]
 
-    if int(version) >= 4:
+    if version.isdigit() and int(version) >= 4:
         extraflags = d.getVar('FLAGS_GCC%d' % int(version), True)
 
-    return ''.join(extraflags)
+    if extraflags:
+        return ''.join(extraflags)
+    return ''
 
 CFLAGS_append = " ${@version_specific_cflags(d)}"
 CXXFLAGS_append = " ${@version_specific_cflags(d)}"
-- 
1.9.1



^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-07-21 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-21 13:09 [meta-java][PATCH v2] openjdk-8: ignore wrong GCCVERSION-flag Sven Ebenfeld
2016-07-21 14:10 ` Fabio Berton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.