summaryrefslogtreecommitdiff
path: root/classes/base.bbclass
diff options
context:
space:
mode:
authorOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-01-31 21:24:36 +0000
committerOpenEmbedded Project <openembedded-devel@lists.openembedded.org>2008-01-31 21:24:36 +0000
commitb20edcd38445574cbdd667d5e82fb59572e4cab2 (patch)
tree5a52d1265144694e035f2087d0495c83b69f5c9a /classes/base.bbclass
parent64529f883fb70f97a28cb8fe082fb7b357d509d9 (diff)
parentd8918d114e1286ff97435a543b65d270e79a0f92 (diff)
merge of '4ea5971c2dd26e9c357b906128f0e339d80e3d50'
and 'e651c4fa9a5d1fc6120cc2309e9cba1388cecc52'
Diffstat (limited to 'classes/base.bbclass')
-rw-r--r--classes/base.bbclass31
1 files changed, 31 insertions, 0 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass
index 7526dff65e..c8ee75627f 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -128,6 +128,14 @@ def base_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
else:
return falsevalue
+def base_version_less_or_equal(variable, checkvalue, truevalue, falsevalue, d):
+ import bb
+ result = bb.vercmp(bb.data.getVar(variable,d,True), checkvalue)
+ if result <= 0:
+ return truevalue
+ else:
+ return falsevalue
+
def base_contains(variable, checkvalues, truevalue, falsevalue, d):
import bb
matches = 0
@@ -848,6 +856,12 @@ def base_after_parse(d):
bb.data.delVarFlag('MACHINE', 'export', d)
bb.data.setVarFlag('MACHINE', 'unexport', 1, d)
+ # Make sure TARGET_ARCH isn't exported
+ # (breaks Makefiles using implicit rules, e.g. quilt, as GNU make has this
+ # in them, undocumented)
+ bb.data.delVarFlag('TARGET_ARCH', 'export', d)
+ bb.data.setVarFlag('TARGET_ARCH', 'unexport', 1, d)
+
# Make sure DISTRO isn't exported
# (breaks sysvinit at least)
bb.data.delVarFlag('DISTRO', 'export', d)
@@ -896,6 +910,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, 1)
+ 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