Merge pull request #1094 from urbit/build-compat

fixes various build and compatibility issues
This commit is contained in:
Joe Bryan 2018-12-13 19:46:13 -05:00 committed by GitHub
commit e0880a5b2e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 20 additions and 6 deletions

View File

@ -271,13 +271,20 @@ elif osdet == 'darwin'
os_deps = os_deps + [ncurses_dep]
elif osdet == 'bsd'
elif osdet == 'bsd' or osdet == 'freebsd'
conf_data.set('U3_OS_bsd', true)
pthread_dep = meson.get_compiler('c').find_library('pthread')
kvm_dep = meson.get_compiler('c').find_library('kvm')
ncurses_dep = dependency('ncurses')
os_deps = os_deps + [kvm_dep, pthread_dep, ncurses_dep]
elif osdet == 'openbsd'
conf_data.set('U3_OS_bsd', true)
os_link_flags = ['-L /usr/local/lib', '-lgmp', '-lsigsegv', '-lcurses']
gmp_dep = []
sigsegv_dep = []
else
error('Unsupported OS detected:' + osdet)
endif
@ -295,7 +302,7 @@ configure_file(input : 'include/config.h.in',
configuration : conf_data)
# We expect these libs to supplied with the distribution
curl_dep = dependency('libcurl', version: '>=7.35.0')
curl_dep = dependency('libcurl', version: '>=7.19.0')
if osdet == 'darwin' and not get_option('nix')
libcrypto = meson.get_compiler('c').find_library('crypto', dirs: [ '/usr/local/opt/openssl/lib/' ])
@ -308,7 +315,7 @@ endif
if(legacy_meson)
gmp_dep = find_library('gmp')
sigsegv_dep = find_library('sigsegv')
else
elif osdet != 'openbsd'
gmp_dep = meson.get_compiler('c').find_library('gmp')
sigsegv_dep = meson.get_compiler('c').find_library('sigsegv')
endif

View File

@ -604,7 +604,7 @@ u3t_boot(void)
setitimer(ITIMER_PROF, &itm_v, 0);
}
#elif defined(U3_OS_bsd)
# error "Profiling isn't yet supported on BSD"
// XX "Profiling isn't yet supported on BSD"
#else
# error "port: profiling"
#endif
@ -644,7 +644,7 @@ u3t_boff(void)
}
#elif defined(U3_OS_bsd)
# error "Profiling isn't yet supported on BSD"
// XX "Profiling isn't yet supported on BSD"
#else
# error "port: profiling"
#endif

@ -1 +1 @@
Subproject commit 66a72cf2084799d0799874d4fa3c530a73713d81
Subproject commit 87f73ffad3d3047baf1ed134fb7827a9dca163ee

View File

@ -186,6 +186,13 @@ _main_getopt(c3_i argc, c3_c** argv)
}
}
#if defined(U3_OS_bsd)
{
fprintf(stderr, "profiling isn't yet supported on BSD\r\n");
return c3n;
}
#endif
if ( 0 != u3_Host.ops_u.fak_c ) {
if ( 28 < strlen(u3_Host.ops_u.fak_c) ) {
fprintf(stderr, "fake comets are disallowed\r\n");