mirror of
https://github.com/NixOS/nix.git
synced 2025-11-08 19:46:02 +01:00
fix cross-build for cygwin
This commit is contained in:
parent
28c0089268
commit
32d4ea8140
2 changed files with 13 additions and 0 deletions
|
|
@ -5,6 +5,15 @@ if not (host_machine.system() == 'windows' and cxx.get_id() == 'gcc')
|
|||
deps_private += dependency('threads')
|
||||
endif
|
||||
|
||||
if host_machine.system() == 'cygwin'
|
||||
# -std=gnu on cygwin defines 'unix', which conflicts with the namespace
|
||||
add_project_arguments(
|
||||
'-D_POSIX_C_SOURCE=200809L',
|
||||
'-D_GNU_SOURCE',
|
||||
language : 'cpp',
|
||||
)
|
||||
endif
|
||||
|
||||
add_project_arguments(
|
||||
'-Wdeprecated-copy',
|
||||
'-Werror=suggest-override',
|
||||
|
|
|
|||
|
|
@ -69,6 +69,10 @@ if bdw_gc.found()
|
|||
define_value = cxx.has_function(funcspec).to_int()
|
||||
configdata_priv.set(define_name, define_value)
|
||||
endforeach
|
||||
if host_machine.system() == 'cygwin'
|
||||
# undefined reference to `__wrap__Znwm'
|
||||
configdata_pub.set('GC_NO_INLINE_STD_NEW', 1)
|
||||
endif
|
||||
endif
|
||||
# Used in public header. Affects ABI!
|
||||
configdata_pub.set('NIX_USE_BOEHMGC', bdw_gc.found().to_int())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue