summaryrefslogtreecommitdiff
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/base.bbclass17
-rw-r--r--meta/classes/sanity.bbclass10
2 files changed, 18 insertions, 9 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index d4cae4931c..816f872f0b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -897,6 +897,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/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 8b5526075c..957e24e1e1 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/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
@@ -96,7 +88,7 @@ def check_sanity(e):
if "qemu-native" not in assume_provided:
gcc_version = commands.getoutput("${BUILD_PREFIX}gcc --version | head -n 1 | cut -f 3 -d ' '")
- if not check_app_exists('gcc-3.4', e.data) and not check_app_exists('gcc-3.3', e.data) and gcc_version[0] != '3':
+ if not check_gcc3(e.data) and gcc_version[0] != '3':
missing = missing + "gcc-3.x (needed for qemu-native),"
else:
required_utilities = required_utilities + " qemu-arm"