mirror of
https://github.com/Z3Prover/z3
synced 2025-04-06 17:44:08 +00:00
Add hurd support
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
This commit is contained in:
parent
16d4ccd396
commit
da061bbcc3
|
@ -199,6 +199,9 @@ if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||||
if ("${TARGET_ARCHITECTURE}" STREQUAL "x86_64")
|
if ("${TARGET_ARCHITECTURE}" STREQUAL "x86_64")
|
||||||
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_USE_THREAD_LOCAL")
|
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_USE_THREAD_LOCAL")
|
||||||
endif()
|
endif()
|
||||||
|
elseif ("${CMAKE_SYSTEM_NAME}" MATCHES "GNU")
|
||||||
|
message(STATUS "Platform: GNU/Hurd")
|
||||||
|
list(APPEND Z3_COMPONENT_CXX_DEFINES "-D_HURD_")
|
||||||
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
elseif ("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
||||||
# Does macOS really not need any special flags?
|
# Does macOS really not need any special flags?
|
||||||
message(STATUS "Platform: Darwin")
|
message(STATUS "Platform: Darwin")
|
||||||
|
|
|
@ -70,6 +70,7 @@ PYTHON_COMPONENT='python'
|
||||||
#####################
|
#####################
|
||||||
IS_WINDOWS=False
|
IS_WINDOWS=False
|
||||||
IS_LINUX=False
|
IS_LINUX=False
|
||||||
|
IS_HURD=False
|
||||||
IS_OSX=False
|
IS_OSX=False
|
||||||
IS_FREEBSD=False
|
IS_FREEBSD=False
|
||||||
IS_NETBSD=False
|
IS_NETBSD=False
|
||||||
|
@ -145,6 +146,9 @@ def is_windows():
|
||||||
def is_linux():
|
def is_linux():
|
||||||
return IS_LINUX
|
return IS_LINUX
|
||||||
|
|
||||||
|
def is_hurd():
|
||||||
|
return IS_HURD
|
||||||
|
|
||||||
def is_freebsd():
|
def is_freebsd():
|
||||||
return IS_FREEBSD
|
return IS_FREEBSD
|
||||||
|
|
||||||
|
@ -591,6 +595,8 @@ elif os.name == 'posix':
|
||||||
PREFIX="/usr/local"
|
PREFIX="/usr/local"
|
||||||
elif os.uname()[0] == 'Linux':
|
elif os.uname()[0] == 'Linux':
|
||||||
IS_LINUX=True
|
IS_LINUX=True
|
||||||
|
elif os.uname()[0] == 'GNU':
|
||||||
|
IS_HURD=True
|
||||||
elif os.uname()[0] == 'FreeBSD':
|
elif os.uname()[0] == 'FreeBSD':
|
||||||
IS_FREEBSD=True
|
IS_FREEBSD=True
|
||||||
elif os.uname()[0] == 'NetBSD':
|
elif os.uname()[0] == 'NetBSD':
|
||||||
|
@ -1258,7 +1264,7 @@ def get_so_ext():
|
||||||
sysname = os.uname()[0]
|
sysname = os.uname()[0]
|
||||||
if sysname == 'Darwin':
|
if sysname == 'Darwin':
|
||||||
return 'dylib'
|
return 'dylib'
|
||||||
elif sysname == 'Linux' or sysname == 'FreeBSD' or sysname == 'NetBSD' or sysname == 'OpenBSD':
|
elif sysname == 'Linux' or sysname == 'GNU' or sysname == 'FreeBSD' or sysname == 'NetBSD' or sysname == 'OpenBSD':
|
||||||
return 'so'
|
return 'so'
|
||||||
elif sysname == 'CYGWIN' or sysname.startswith('MSYS_NT') or sysname.startswith('MINGW'):
|
elif sysname == 'CYGWIN' or sysname.startswith('MSYS_NT') or sysname.startswith('MINGW'):
|
||||||
return 'dll'
|
return 'dll'
|
||||||
|
@ -1825,6 +1831,8 @@ class JavaDLLComponent(Component):
|
||||||
t = t.replace('PLATFORM', 'darwin')
|
t = t.replace('PLATFORM', 'darwin')
|
||||||
elif IS_LINUX:
|
elif IS_LINUX:
|
||||||
t = t.replace('PLATFORM', 'linux')
|
t = t.replace('PLATFORM', 'linux')
|
||||||
|
elif IS_GNU:
|
||||||
|
t = t.replace('PLATFORM', 'hurd')
|
||||||
elif IS_FREEBSD:
|
elif IS_FREEBSD:
|
||||||
t = t.replace('PLATFORM', 'freebsd')
|
t = t.replace('PLATFORM', 'freebsd')
|
||||||
elif IS_NETBSD:
|
elif IS_NETBSD:
|
||||||
|
@ -2553,6 +2561,11 @@ def mk_config():
|
||||||
SO_EXT = '.so'
|
SO_EXT = '.so'
|
||||||
SLIBFLAGS = '-shared'
|
SLIBFLAGS = '-shared'
|
||||||
SLIBEXTRAFLAGS = '%s -Wl,-soname,libz3.so' % SLIBEXTRAFLAGS
|
SLIBEXTRAFLAGS = '%s -Wl,-soname,libz3.so' % SLIBEXTRAFLAGS
|
||||||
|
elif sysname == 'GNU':
|
||||||
|
CXXFLAGS = '%s -D_HURD_' % CXXFLAGS
|
||||||
|
OS_DEFINES = '-D_HURD_'
|
||||||
|
SO_EXT = '.so'
|
||||||
|
SLIBFLAGS = '-shared'
|
||||||
elif sysname == 'FreeBSD':
|
elif sysname == 'FreeBSD':
|
||||||
CXXFLAGS = '%s -D_FREEBSD_' % CXXFLAGS
|
CXXFLAGS = '%s -D_FREEBSD_' % CXXFLAGS
|
||||||
OS_DEFINES = '-D_FREEBSD_'
|
OS_DEFINES = '-D_FREEBSD_'
|
||||||
|
|
Loading…
Reference in a new issue