diff --git a/3rdparty/libbacktrace/wscript b/3rdparty/libbacktrace/wscript index e2897d2d..cd9ed118 100644 --- a/3rdparty/libbacktrace/wscript +++ b/3rdparty/libbacktrace/wscript @@ -20,10 +20,10 @@ int main (void) { }''' FRAGMENT_GETPAGESIZE='''#include -int main(void) { return getpagesize() }''' +int main(void) { return getpagesize(); }''' FRAGMENT_GETEXECNAME='''#include -int main(void) { return getexecname() != 0 }''' +int main(void) { return getexecname() != 0; }''' FRAGMENT_STRNLEN='''#include int main(int argc, char **argv) { return (int)strnlen(argv[0], 10); }''' @@ -120,8 +120,8 @@ def configure(conf): check_frag(FRAGMENT_SYNC, ' __sync extensions', 'HAVE_SYNC_FUNCTIONS'), check_frag(FRAGMENT_GETPAGESIZE, ' getpagesize function', 'HAVE_DECL_GETPAGESIZE'), check_frag(FRAGMENT_STRNLEN, ' strnlen function', 'HAVE_DECL_STRNLEN'), - check_frag(FRAGMENT_DL_ITERATE_PHDR % 'link.h', ' dl_iterate_phdr function in link.h', 'HAVE_DL_ITERATE_PHDR', after_tests=['link.h']), - check_frag(FRAGMENT_DL_ITERATE_PHDR % 'sys/link.h', ' dl_iterate_phdr function in sys/link.h', 'HAVE_DL_ITERATE_PHDR', after_tests=['sys/link.h']), + check_frag(FRAGMENT_DL_ITERATE_PHDR % 'link.h', ' dl_iterate_phdr function in link.h', 'HAVE_DL_ITERATE_PHDR_LINK_H', after_tests=['link.h']), + check_frag(FRAGMENT_DL_ITERATE_PHDR % 'sys/link.h', ' dl_iterate_phdr function in sys/link.h', 'HAVE_DL_ITERATE_PHDR_SYS_LINK_H', after_tests=['sys/link.h']), check_frag(FRAGMENT_FCNTL, 'fnctl function', 'HAVE_FCNTL'), check_frag(FRAGMENT_GETEXECNAME, 'getexecname function','HAVE_GETEXECNAME'), check_frag(FRAGMENT_GETIPINFO, '_Unwind_GetIPInfo function', 'HAVE_GETIPINFO'), @@ -137,6 +137,9 @@ def configure(conf): msg='Checking for in parallel' ) + if conf.is_defined('HAVE_DL_ITERATE_PHDR_LINK_H') or conf.is_defined('HAVE_DL_ITERATE_PHDR_SYS_LINK_H'): + conf.define('HAVE_DL_ITERATE_PHDR', 1) + conf.env[DEFKEYS].sort() conf.write_config_header() @@ -181,7 +184,8 @@ def build(bld): task = bld.stlib( source = ['libbacktrace/' + i for i in sources], - target = 'backtrace', + # while we're using upstream libbacktrace, sometimes compiler picks up it's own version that isn't built with required options + target = 'backtrace_custom', features = 'frandomseed' if bld.env.HAVE_FRANDOM_SEED else '', use = 'EXTRAFLAGS lzma z zstd', includes = '. libbacktrace/', diff --git a/engine/wscript b/engine/wscript index fd81124b..5b5e3a6e 100644 --- a/engine/wscript +++ b/engine/wscript @@ -186,7 +186,7 @@ def build(bld): # public includes for renderers and utils use bld(name = 'engine_includes', export_includes = '. common common/imagelib', use = 'filesystem_includes') - libs = ['engine_includes', 'public', 'werror', 'backtrace', 'library_suffix', 'build_vcs'] + libs = ['engine_includes', 'public', 'werror', 'backtrace_custom', 'library_suffix', 'build_vcs'] includes = ['server', 'client', 'client/vgui', 'common/soundlib', 'platform'] # basic build: dedicated only