[oe] [PATCH v2] base.bbclass: introduce COMPATIBLE_TARGET_SYS and COMPATIBLE_TARGET_ARCH

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Sun Jul 11 07:48:50 UTC 2010


This patch introduces COMPATIBLE_TARGET_SYS and COMPATIBLE_TARGET_ARCH
They are similar to COMPATIBLE_MACHINE but where COMPATIBLE_MACHINE
is used to specify that a certain recipe is for a certain machine
COMPATIBLE_TARGET_SYS can be used to specify that a certain recipe
is for a certain target system (e.g. mips-oe-linux),
COMPATIBLE_TARGET_ARCH can be used that a certain recipe is for a certain
architecture (e.g. mips)

Signed-off-by: Frans Meulenbroeks <fransmeulenbroeks at gmail.com>
---

This patch supersedes [PATCH] base.bbclass: introduce COMPATIBLE_TARGET_SY

as restrictions may apply for both native and cross recipes, the patch is in base.bbclass, not cross.bbclass.

Khem, if you agree, can you confirm your ack.
And can I see one more ack for this?

Thanks, Frans.

 classes/base.bbclass |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/classes/base.bbclass b/classes/base.bbclass
index b30310d..4bc7650 100644
--- a/classes/base.bbclass
+++ b/classes/base.bbclass
@@ -391,6 +391,20 @@ python () {
             if this_machine and not re.match(need_machine, this_machine):
                 raise bb.parse.SkipPackage("incompatible with machine %s" % this_machine)
 
+        need_target = bb.data.getVar('COMPATIBLE_TARGET_SYS', d, 1)
+        if need_target:
+            import re
+            this_target = bb.data.getVar('TARGET_SYS', d, 1)
+            if this_target and not re.match(need_target, this_target):
+                raise bb.parse.SkipPackage("incompatible with target system %s" % this_target)
+
+        need_arch = bb.data.getVar('COMPATIBLE_TARGET_ARCH', d, 1)
+        if need_arch:
+            import re
+            this_arch = bb.data.getVar('TARGET_ARCH', d, 1)
+            if this_arch and not re.match(need_arch, this_arch):
+                raise bb.parse.SkipPackage("incompatible with architecture %s" % this_arch)
+
     pn = bb.data.getVar('PN', d, 1)
 
     # OBSOLETE in bitbake 1.7.4
-- 
1.6.4.2





More information about the Openembedded-devel mailing list