diff -r 9c7b55faea5d SConstruct --- a/SConstruct Tue Apr 05 08:08:12 2016 -0500 +++ b/SConstruct Wed Apr 13 14:16:16 2016 +0000 @@ -635,6 +635,9 @@ '-Wno-sign-compare', '-Wno-unused-parameter']) # We always compile using C++11 main.Append(CXXFLAGS=['-std=c++11']) + if sys.platform.startswith('freebsd'): + main.Append(CCFLAGS=['-I/usr/local/include']) + main.Append(CXXFLAGS=['-I/usr/local/include']) else: print termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal, print "Don't know what compiler options to use for your compiler." @@ -749,6 +752,10 @@ main.Append(CXXFLAGS=['-stdlib=libc++']) main.Append(LIBS=['c++']) + # On FreeBSD we need libthr. + if sys.platform.startswith('freebsd'): + main.Append(LIBS=['thr']) + else: print termcap.Yellow + termcap.Bold + 'Error' + termcap.Normal, print "Don't know what compiler options to use for your compiler." @@ -862,8 +869,12 @@ # Check for 'timeout' from GNU coreutils. If present, regressions will # be run with a time limit. We require version 8.13 since we rely on # support for the '--foreground' option. -timeout_lines = readCommand(['timeout', '--version'], - exception='').splitlines() +if sys.platform.startswith('freebsd'): + timeout_lines = readCommand(['gtimeout', '--version'], + exception='').splitlines() +else: + timeout_lines = readCommand(['timeout', '--version'], + exception='').splitlines() # Get the first line and tokenize it timeout_version = timeout_lines[0].split() if timeout_lines else [] main['TIMEOUT'] = timeout_version and \ diff -r 9c7b55faea5d tests/SConscript --- a/tests/SConscript Tue Apr 05 08:08:12 2016 -0500 +++ b/tests/SConscript Wed Apr 13 14:16:16 2016 +0000 @@ -107,7 +107,10 @@ # The slowest regression (bzip2) requires ~4 hours; # 5 hours was chosen to be conservative. elif env['TIMEOUT']: - cmd = 'timeout --foreground 5h %s' % cmd + if sys.platform.startswith('freebsd'): + cmd = 'gtimeout --foreground 5h %s' % cmd + else: + cmd = 'timeout --foreground 5h %s' % cmd # Create a default value for the status string, changed as needed # based on the status.