aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/python/python.le32.bcbin0 -> 7810608 bytes
-rw-r--r--tests/python/readme.txt16
-rwxr-xr-xtests/runner.py15
3 files changed, 23 insertions, 8 deletions
diff --git a/tests/python/python.le32.bc b/tests/python/python.le32.bc
new file mode 100644
index 00000000..2a6bc77c
--- /dev/null
+++ b/tests/python/python.le32.bc
Binary files differ
diff --git a/tests/python/readme.txt b/tests/python/readme.txt
index 2b14754c..31b0ff45 100644
--- a/tests/python/readme.txt
+++ b/tests/python/readme.txt
@@ -1,3 +1,19 @@
+Updates to Python 2.7.4 and emscripten of Arp 29 2013 with le32
+
+Go to js dir, run EMCONFIGURE_JS=1 ~/Dev/emscripten/emconfigure ./configure --without-threads --without-pymalloc --enable-shared --disable-ipv6
+clean out MULTIARCH= in Makefile
+make, until error on pgen
+Go to native, run ./configure --without-threads --without-pymalloc --enable-shared --disable-ipv6
+cp Parser/pgen ../JS_DIR/Parser
+return to JS
+chmod +x Parser/pgen
+remove #defines of DOUBLE_IS_BIG_ENDIAN_IEEE754 and DOUBLE_IS_ARM_MIXED_ENDIAN_IEEE754 and HAVE_GCC_ASM_FOR_X87 in pyconfig.h
+make
+link libpython2.7.so with Modules/python.o to get the bitcode file you want
+
+=========================
+
+
This is Python 2.7.2, compiled to .bc as follows:
Uncompress Python into two separate directories, one for native and one for JS.
diff --git a/tests/runner.py b/tests/runner.py
index f0763ba8..f9f46f10 100755
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -7978,16 +7978,15 @@ def process(filename):
def test_python(self):
if self.emcc_args is None: return self.skip('requires emcc')
if Settings.QUANTUM_SIZE == 1: return self.skip('TODO: make this work')
- if 'le32-unknown-nacl' in COMPILER_OPTS: return self.skip('cannot use our existing bitcode file which is of a different target')
- # Overflows in string_hash
- Settings.CORRECT_OVERFLOWS = 1
- Settings.CHECK_OVERFLOWS = 0
- if self.emcc_args is None: Settings.SAFE_HEAP = 0 # Has bitfields which are false positives. Also the PyFloat_Init tries to detect endianness.
- Settings.CORRECT_SIGNS = 1 # Not sure why, but needed
- Settings.EXPORTED_FUNCTIONS += ['_PyRun_SimpleStringFlags'] # for the demo
+ #Settings.EXPORTED_FUNCTIONS += ['_PyRun_SimpleStringFlags'] # for the demo
+
+ if 'le32-unknown-nacl' in COMPILER_OPTS:
+ bitcode = path_from_root('tests', 'python', 'python.le32.bc')
+ else:
+ bitcode = path_from_root('tests', 'python', 'python.small.bc')
- self.do_ll_run(path_from_root('tests', 'python', 'python.small.bc'),
+ self.do_ll_run(bitcode,
'hello python world!\n[0, 2, 4, 6]\n5\n22\n5.470000',
args=['-S', '-c' '''print "hello python world!"; print [x*2 for x in range(4)]; t=2; print 10-3-t; print (lambda x: x*2)(11); print '%f' % 5.47'''])