fix config/nim.cfg: @if not bsd or haiku: was buggy (#16748)

This commit is contained in:
Timothee Cour
2021-01-18 23:25:21 -08:00
committed by GitHub
parent 580b8f744b
commit 2e5254ff27

View File

@@ -111,7 +111,18 @@ path="$lib/pure"
@end
@if unix:
@if not bsd or haiku:
@if bsd:
# BSD got posix_spawn only recently, so we deactivate it for osproc:
define:useFork
# at least NetBSD has problems with thread local storage:
tlsEmulation:on
@elif haiku:
gcc.options.linker = "-Wl,--as-needed -lnetwork"
gcc.cpp.options.linker = "-Wl,--as-needed -lnetwork"
clang.options.linker = "-Wl,--as-needed -lnetwork"
clang.cpp.options.linker = "-Wl,--as-needed -lnetwork"
tcc.options.linker = "-Wl,--as-needed -lnetwork"
@else:
# -fopenmp
gcc.options.linker = "-ldl"
gcc.cpp.options.linker = "-ldl"
@@ -119,19 +130,6 @@ path="$lib/pure"
clang.cpp.options.linker = "-ldl"
tcc.options.linker = "-ldl"
@end
@if bsd:
# BSD got posix_spawn only recently, so we deactivate it for osproc:
define:useFork
# at least NetBSD has problems with thread local storage:
tlsEmulation:on
@end
@if haiku:
gcc.options.linker = "-Wl,--as-needed -lnetwork"
gcc.cpp.options.linker = "-Wl,--as-needed -lnetwork"
clang.options.linker = "-Wl,--as-needed -lnetwork"
clang.cpp.options.linker = "-Wl,--as-needed -lnetwork"
tcc.options.linker = "-Wl,--as-needed -lnetwork"
@end
@end
@if android: