From 9165031fd589c1c6e724ecc0a31ed91a482ed512 Mon Sep 17 00:00:00 2001 From: Sebastien Bourdeauducq Date: Sat, 6 Dec 2014 14:52:33 +0800 Subject: [PATCH] test/py2llvm: support 32-bit machines --- test/py2llvm.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/test/py2llvm.py b/test/py2llvm.py index 69aa89231..0c82f98dd 100644 --- a/test/py2llvm.py +++ b/test/py2llvm.py @@ -3,6 +3,7 @@ import ast import inspect from fractions import Fraction from ctypes import CFUNCTYPE, c_int, c_int32, c_int64, c_double +import struct import llvmlite.binding as llvm @@ -15,6 +16,9 @@ from artiq.py2llvm.module import Module llvm.initialize() llvm.initialize_native_target() llvm.initialize_native_asmprinter() +if struct.calcsize("P") < 8: + from ctypes import _dlopen, RTLD_GLOBAL + _dlopen("libgcc_s.so", RTLD_GLOBAL) def _base_types(choice):