]> code.ossystems Code Review - openembedded-core.git/commitdiff
bitbake: use Psyco only on x86 (no support for other archs)
authorMarcin Juszkiewicz <hrw@openedhand.com>
Thu, 23 Aug 2007 07:36:58 +0000 (07:36 +0000)
committerMarcin Juszkiewicz <hrw@openedhand.com>
Thu, 23 Aug 2007 07:36:58 +0000 (07:36 +0000)
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@2541 311d38ba-8fff-0310-9ca6-ca027cbcb966

bitbake/lib/bb/cooker.py

index 0eda9eed99c8a455a369477392f464b76ffa7aa9..2ddb590c5b19520bdea468919a8fc5975fb53121 100644 (file)
@@ -474,15 +474,17 @@ class BBCooker:
 
     def updateCache(self):
         # Import Psyco if available and not disabled
-        if not self.configuration.disable_psyco:
-            try:
-                import psyco
-            except ImportError:
-                bb.msg.note(1, bb.msg.domain.Collection, "Psyco JIT Compiler (http://psyco.sf.net) not available. Install it to increase performance.")
+        import platform
+        if platform.machine() in ['i386', 'i486', 'i586', 'i686']:
+            if not self.configuration.disable_psyco:
+                try:
+                    import psyco
+                except ImportError:
+                    bb.msg.note(1, bb.msg.domain.Collection, "Psyco JIT Compiler (http://psyco.sf.net) not available. Install it to increase performance.")
+                else:
+                    psyco.bind( self.parse_bbfiles )
             else:
-                psyco.bind( self.parse_bbfiles )
-        else:
-            bb.msg.note(1, bb.msg.domain.Collection, "You have disabled Psyco. This decreases performance.")
+                bb.msg.note(1, bb.msg.domain.Collection, "You have disabled Psyco. This decreases performance.")
 
         self.status = bb.cache.CacheData()