3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-23 09:05:31 +00:00

Add support of the SunOS platform (Solaris, OpenSolaris, OpenIndiana) (#4757)

* Add support of the SunOS plateform (OpenSolaris, OpenIndiana) in scripts/mk_util.py

* Add missing casts for the SunOS plateform (OpenSolaris, OpenIndiana) for the pow function
This commit is contained in:
Pierre Bouvier 2020-10-27 19:39:21 +01:00 committed by GitHub
parent 9e9963d765
commit 24321e311b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 34 additions and 17 deletions

View file

@ -72,6 +72,7 @@ IS_OSX=False
IS_FREEBSD=False
IS_NETBSD=False
IS_OPENBSD=False
IS_SUNOS=False
IS_CYGWIN=False
IS_CYGWIN_MINGW=False
IS_MSYS2=False
@ -154,6 +155,9 @@ def is_netbsd():
def is_openbsd():
return IS_OPENBSD
def is_sunos():
return IS_SUNOS
def is_osx():
return IS_OSX
@ -488,7 +492,10 @@ def find_ml_lib():
def is64():
global LINUX_X64
return LINUX_X64 and sys.maxsize >= 2**32
if is_sunos() and sys.version_info.major < 3:
return LINUX_X64
else:
return LINUX_X64 and sys.maxsize >= 2**32
def check_ar():
if is_verbose():
@ -598,6 +605,8 @@ elif os.name == 'posix':
IS_NETBSD=True
elif os.uname()[0] == 'OpenBSD':
IS_OPENBSD=True
elif os.uname()[0] == 'SunOS':
IS_SUNOS=True
elif os.uname()[0][:6] == 'CYGWIN':
IS_CYGWIN=True
if (CC != None and "mingw" in CC):
@ -1768,6 +1777,8 @@ class JavaDLLComponent(Component):
t = t.replace('PLATFORM', 'netbsd')
elif IS_OPENBSD:
t = t.replace('PLATFORM', 'openbsd')
elif IS_SUNOS:
t = t.replace('PLATFORM', 'SunOS')
elif IS_CYGWIN:
t = t.replace('PLATFORM', 'cygwin')
elif IS_MSYS2:
@ -2514,6 +2525,12 @@ def mk_config():
OS_DEFINES = '-D_OPENBSD_'
SO_EXT = '.so'
SLIBFLAGS = '-shared'
elif sysname == 'SunOS':
CXXFLAGS = '%s -D_SUNOS_' % CXXFLAGS
OS_DEFINES = '-D_SUNOS_'
SO_EXT = '.so'
SLIBFLAGS = '-shared'
SLIBEXTRAFLAGS = '%s -mimpure-text' % SLIBEXTRAFLAGS
elif sysname.startswith('CYGWIN'):
CXXFLAGS = '%s -D_CYGWIN' % CXXFLAGS
OS_DEFINES = '-D_CYGWIN'