Author: Amaury Forgeot d'Arc <[email protected]>
Branch: remove-PYPY_NOT_MAIN_FILE
Changeset: r58099:c470cecdd863
Date: 2012-10-13 14:46 +0200
http://bitbucket.org/pypy/pypy/changeset/c470cecdd863/
Log: Another attempt to fix the boehm/thread interaction.
diff --git a/pypy/translator/c/gc.py b/pypy/translator/c/gc.py
--- a/pypy/translator/c/gc.py
+++ b/pypy/translator/c/gc.py
@@ -224,7 +224,9 @@
eci = eci.merge(ExternalCompilationInfo(
pre_include_bits=pre_include_bits,
- post_include_bits=['#define PYPY_USING_BOEHM_GC'],
+ # The following define is required by the thread module,
+ # See module/thread/test/test_ll_thread.py
+ compile_extra=['-DPYPY_USING_BOEHM_GC'],
))
return eci
diff --git a/pypy/translator/c/src/thread.c b/pypy/translator/c/src/thread.c
--- a/pypy/translator/c/src/thread.c
+++ b/pypy/translator/c/src/thread.c
@@ -1,6 +1,14 @@
/* Thread implementation */
#include "src/thread.h"
+#ifdef PYPY_USING_BOEHM_GC
+/* The following include is required by the Boehm GC, which apparently
+ * crashes when pthread_create_thread() is not redefined to call a
+ * Boehm wrapper function instead. Ugly.
+ */
+#include "common_header.h"
+#endif
+
#ifdef _WIN32
#include "src/thread_nt.c"
#else
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit