summaryrefslogtreecommitdiff
path: root/classes
diff options
context:
space:
mode:
authorMarcin Juszkiewicz <hrw@openembedded.org>2008-01-03 15:23:12 +0000
committerMarcin Juszkiewicz <hrw@openembedded.org>2008-01-03 15:23:12 +0000
commit7377bcfa7701f0d9b88d5d312b40d356b0f0e018 (patch)
tree54ba0161a3b0e48123df6f8d775c127f608c8c44 /classes
parentc21939e0df0a469763cee67fa7f8bf6f5099ccd9 (diff)
base and sanity bbclasses + qemu: move gcc3 availability checking into base.bbclass (from Poky)
Diffstat (limited to 'classes')
-rw-r--r--classes/base.bbclass17
-rw-r--r--classes/sanity.bbclass8
2 files changed, 17 insertions, 8 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
diff --git a/classes/sanity.bbclass b/classes/sanity.bbclass
index cc413b7011..9994febf0d 100644
--- a/classes/sanity.bbclass
+++ b/classes/sanity.bbclass
@@ -24,14 +24,6 @@ def check_conf_exists(fn, data):
return True
return False
-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_sanity(e):
from bb import note, error, data, __version__
from bb.event import Handled, NotHandled, getName