[pypy-svn] r24364 - pypy/dist/pypy/translator/c

ac at codespeak.net ac at codespeak.net
Tue Mar 14 17:26:12 CET 2006


Author: ac
Date: Tue Mar 14 17:26:12 2006
New Revision: 24364

Modified:
   pypy/dist/pypy/translator/c/genc.py
Log:
(pedronis, arre) Enable HAVE___THREAD only for standalone targets.
We have seen it triggering obscure bugs when used with many dynamic libraries.



Modified: pypy/dist/pypy/translator/c/genc.py
==============================================================================
--- pypy/dist/pypy/translator/c/genc.py	(original)
+++ pypy/dist/pypy/translator/c/genc.py	Tue Mar 14 17:26:12 2006
@@ -75,8 +75,6 @@
         # defines={'COUNT_OP_MALLOCS': 1}
         if CBuilder.have___thread is None:
             CBuilder.have___thread = check_under_under_thread()
-        if CBuilder.have___thread:
-            defines['HAVE___THREAD'] = 1
         if not self.standalone:
             from pypy.translator.c.symboltable import SymbolTable
             self.symboltable = SymbolTable()
@@ -85,6 +83,8 @@
                                       exports = {self.entrypoint.func_name: pf},
                                       symboltable = self.symboltable)
         else:
+            if CBuilder.have___thread:
+                defines['HAVE___THREAD'] = 1
             if self.stackless:
                 defines['USE_STACKLESS'] = '1'
                 defines['USE_OPTIMIZED_STACKLESS_UNWIND'] = '1'



More information about the Pypy-commit mailing list