summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorJan Lübbe <jluebbe@debian.org>2008-01-03 15:48:31 +0000
committerJan Lübbe <jluebbe@debian.org>2008-01-03 15:48:31 +0000
commitf6add5fe0f052e3f9e42036c4c30df7b45225900 (patch)
tree068c8abf1a5173af26d72f2f852e4e787498ee78 /classes/base.bbclass
parentbc7aa85e1bf3db6ac7e31fe15fe27ec05526205a (diff)
parent23f2decbe62225e537aa4b8b72daf0f307340bbf (diff)
merge of '128beb53ed0092647984a87f2a86eaec9d1f3510'
and '2a1403c40d81aff7aa7bbe8236c502336c5b9a09'
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass17
1 files changed, 17 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 2b508a8e84..e0b4c59e5f 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -902,6 +902,23 @@ python () {
base_after_parse(d)
}
+def check_app_exists(app, d):
+ from bb import which, data
+
+ app = data.expand(app, d)
+ path = data.getVar('PATH', d)
+ return len(which(path, app)) != 0
+
+def check_gcc3(data):
+
+ gcc3_versions = 'gcc-3.4 gcc34 gcc-3.4.4 gcc-3.4.6 gcc-3.4.7 gcc-3.3 gcc33 gcc-3.3.6 gcc-3.2 gcc32'
+
+ for gcc3 in gcc3_versions.split():
+ if check_app_exists(gcc3, data):
+ return gcc3
+
+ return False
+
# Patch handling
inherit patch