From 2e5cb8f727feaf1b473cdd24849ad10749d51e70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Mizsei?= Date: Thu, 26 Jan 2017 08:31:32 +0100 Subject: [PATCH] Linker flags for the build script --- setup/build.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/setup/build.py b/setup/build.py index 16cb5b4b36..4acf4715d9 100644 --- a/setup/build.py +++ b/setup/build.py @@ -9,7 +9,7 @@ __docformat__ = 'restructuredtext en' import textwrap, os, shlex, subprocess, glob, shutil, re, sys, json from collections import namedtuple -from setup import Command, islinux, isbsd, isosx, SRC, iswindows, __version__ +from setup import Command, islinux, isbsd, isosx, ishaiku, SRC, iswindows, __version__ isunix = islinux or isosx or isbsd py_lib = os.path.join(sys.prefix, 'libs', 'python%d%d.lib' % sys.version_info[:2]) @@ -100,6 +100,8 @@ def parse_extension(ext): ans = ext.pop('osx_' + k, ans) elif isbsd: ans = ext.pop('bsd_' + k, ans) + elif ishaiku: + ans = ext.pop('haiku_' + k, ans) else: ans = ext.pop('linux_' + k, ans) return ans @@ -156,6 +158,12 @@ def init_env(): cflags.append('-I'+sysconfig.get_python_inc()) ldflags.append('-lpython'+sysconfig.get_python_version()) + if ishaiku: + cflags.append('-lpthread') + ldflags.append('-shared') + cflags.append('-I'+sysconfig.get_python_inc()) + ldflags.append('-lpython'+sysconfig.get_python_version()) + if isosx: cflags.append('-D_OSX') ldflags.extend('-bundle -undefined dynamic_lookup'.split())