bitbake: use Psyco only on x86 (no support for other archs) - taken from Poky
authorMarcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Thu, 23 Aug 2007 08:03:24 +0000 (08:03 +0000)
committerMarcin Juszkiewicz <marcin@juszkiewicz.com.pl>
Thu, 23 Aug 2007 08:03:24 +0000 (08:03 +0000)
ChangeLog
lib/bb/cooker.py

index 7b99a1b..debdedf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,5 @@
 Changes in BitBake 1.8.x:
+       - Psyco is available only for x86 - do not use it on other architectures.
 
 Changes in Bitbake 1.8.8:
        - Rewrite svn fetcher to make adding extra operations easier 
index 0eda9ee..2ddb590 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()