Skip to content

Commit

Permalink
z3: Fix broken build system by pretending SunOS is Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
jperkin committed Jun 15, 2018
1 parent 728572f commit d86c32a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
4 changes: 2 additions & 2 deletions math/z3/distinfo
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
$NetBSD: distinfo,v 1.5 2018/03/13 21:20:34 khorben Exp $
$NetBSD: distinfo,v 1.6 2018/06/15 15:11:34 jperkin Exp $

SHA1 (z3-4.5.0.tar.gz) = 6f4e94e025fcc2fa2896524d8fbb9de0b3033854
RMD160 (z3-4.5.0.tar.gz) = 81121307ac83f42989da49efda31964a94f7f5d5
SHA512 (z3-4.5.0.tar.gz) = 1ebc2c908d90b6b879f1e819c864ff894613276af47a440f27cf94968c195656952434754c3eb20f4bdbdd8497d227d22e1b4821c0d320b11052b5648d9e2dc7
Size (z3-4.5.0.tar.gz) = 3573695 bytes
SHA1 (patch-configure) = 8d5fe787f15fe781c3c23cee27058f898de8c95e
SHA1 (patch-scripts_mk__util.py) = f0a7cfabdbf9b6c1eb92e75f381d8a3f8a088d35
SHA1 (patch-scripts_mk__util.py) = f3c6f13daeffb31e01f0ad50ca2c0dab2cdb87a2
SHA1 (patch-src_util_scoped__timer.cpp) = 68e0bdee94d54c93f3d493bf71abebcdccd921ba
SHA1 (patch-src_util_stopwatch.h) = dbeab175ed4f507d5378f1966f8ed173c4c9a9a7
29 changes: 25 additions & 4 deletions math/z3/patches/patch-scripts_mk__util.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$NetBSD: patch-scripts_mk__util.py,v 1.3 2018/03/13 00:31:16 khorben Exp $
$NetBSD: patch-scripts_mk__util.py,v 1.4 2018/06/15 15:11:35 jperkin Exp $

--- scripts/mk_util.py.orig 2016-11-07 22:02:30.000000000 +0000
+++ scripts/mk_util.py
Expand Down Expand Up @@ -28,15 +28,27 @@ def is_freebsd():
def is_openbsd():
return IS_OPENBSD

@@ -607,6 +612,8 @@ elif os.name == 'posix':
IS_LINUX=True
@@ -603,16 +608,18 @@ elif os.name == 'posix':
if os.uname()[0] == 'Darwin':
IS_OSX=True
PREFIX="/usr/local"
- elif os.uname()[0] == 'Linux':
- IS_LINUX=True
elif os.uname()[0] == 'FreeBSD':
IS_FREEBSD=True
+ elif os.uname()[0] == 'NetBSD':
+ IS_NETBSD=True
elif os.uname()[0] == 'OpenBSD':
IS_OPENBSD=True
elif os.uname()[0][:6] == 'CYGWIN':
IS_CYGWIN=True
if (CC != None and "mingw" in CC):
IS_CYGWIN_MINGW=True
+ else:
+ IS_LINUX=True

def display_help(exit_code):
print("mk_make.py: Z3 Makefile generator\n")
@@ -623,6 +630,7 @@ def display_help(exit_code):
print(" -s, --silent do not print verbose messages.")
if not IS_WINDOWS:
Expand Down Expand Up @@ -107,7 +119,7 @@ def mk_unix_dist(self, build_path, dist_path):

class PythonComponent(Component):
def __init__(self, name, libz3Component):
@@ -1403,7 +1413,7 @@ class PythonComponent(Component):
@@ -1403,7 +1413,7 @@ class PythonComponent(Component):
return

src = os.path.join(build_path, 'python', 'z3')
Expand Down Expand Up @@ -156,6 +168,15 @@ def mk_unix_dist(self, build_path, dist_path):

def mk_install(self, out):
if is_java_enabled() and self.install:
@@ -2437,7 +2449,7 @@ def mk_config():
if sysname == 'Darwin':
SO_EXT = '.dylib'
SLIBFLAGS = '-dynamiclib'
- elif sysname == 'Linux':
+ elif sysname == 'Linux' or sysname == 'SunOS':
CXXFLAGS = '%s -fno-strict-aliasing -D_LINUX_' % CXXFLAGS
OS_DEFINES = '-D_LINUX_'
SO_EXT = '.so'
@@ -2451,6 +2463,13 @@ def mk_config():
LDFLAGS = '%s -lrt' % LDFLAGS
SLIBFLAGS = '-shared'
Expand Down

0 comments on commit d86c32a

Please sign in to comment.