mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 12:06:01 +01:00
Merge pull request #14042 from corngood/cygwin-cross
fix cross build for cygwin
This commit is contained in:
commit
74b31d10db
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')
|
deps_private += dependency('threads')
|
||||||
endif
|
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(
|
add_project_arguments(
|
||||||
'-Wdeprecated-copy',
|
'-Wdeprecated-copy',
|
||||||
'-Werror=suggest-override',
|
'-Werror=suggest-override',
|
||||||
|
|
|
||||||
|
|
@ -69,6 +69,10 @@ if bdw_gc.found()
|
||||||
define_value = cxx.has_function(funcspec).to_int()
|
define_value = cxx.has_function(funcspec).to_int()
|
||||||
configdata_priv.set(define_name, define_value)
|
configdata_priv.set(define_name, define_value)
|
||||||
endforeach
|
endforeach
|
||||||
|
if host_machine.system() == 'cygwin'
|
||||||
|
# undefined reference to `__wrap__Znwm'
|
||||||
|
configdata_pub.set('GC_NO_INLINE_STD_NEW', 1)
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
# Used in public header. Affects ABI!
|
# Used in public header. Affects ABI!
|
||||||
configdata_pub.set('NIX_USE_BOEHMGC', bdw_gc.found().to_int())
|
configdata_pub.set('NIX_USE_BOEHMGC', bdw_gc.found().to_int())
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue