From 4a885ebffa2c9152a2d90855b120d8d380fdc522 Mon Sep 17 00:00:00 2001 From: Fraser Tweedale Date: Thu, 14 Aug 2014 10:41:40 +1000 Subject: [PATCH] c_image.py: use cc instead of gcc Compile using ``cc`` instead of ``gcc`` to support systems where the default C compiler is not GCC. For example, GCC does not ship in FreeBSD 10, but Clang is installed as ``cc`` and works fine. On systems where GCC is the default C compiler, it is usually installed as ``cc`` as well, so this change should not result in problems for existing users. --- rainbowstream/c_image.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rainbowstream/c_image.py b/rainbowstream/c_image.py index 96cab29..94299ec 100644 --- a/rainbowstream/c_image.py +++ b/rainbowstream/c_image.py @@ -15,7 +15,7 @@ def call_c(): library = expanduser('~/.image.so') sauce = join(dirname(__file__), 'image.c') if not exists(library) or getmtime(sauce) > getmtime(library): - build = "gcc -fPIC -shared -o %s %s" % (library, sauce) + build = "cc -fPIC -shared -o %s %s" % (library, sauce) assert os.system(build + " >/dev/null 2>&1") == 0 image_c = ctypes.cdll.LoadLibrary(library) image_c.init() -- 2.25.1