summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
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