summaryrefslogtreecommitdiff
path: root/compiler/main
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-11-25 01:12:47 +0000
committerIan Lynagh <igloo@earth.li>2011-11-25 01:31:50 +0000
commit498467cf44e871a6abdb1e16714f6e91c7b10a80 (patch)
tree22eeb486ec5b5b17e422069d1f3207ea6ef9abbc /compiler/main
parent3a907bff7fc7f6fd0c4f1f61b6e16aaed450874d (diff)
downloadhaskell-498467cf44e871a6abdb1e16714f6e91c7b10a80.tar.gz
Fixes for NetBSD
Based on a patch from Arnaud Degroote <degroote@NetBSD.org> in trac #5480.
Diffstat (limited to 'compiler/main')
-rw-r--r--compiler/main/DriverPipeline.hs2
-rw-r--r--compiler/main/StaticFlags.hs4
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index c33730e6cb..2230f3fa40 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -1714,7 +1714,7 @@ linkBinary dflags o_files dep_packages = do
let
thread_opts | WayThreaded `elem` ways = [
-#if !defined(mingw32_TARGET_OS) && !defined(freebsd_TARGET_OS) && !defined(openbsd_TARGET_OS) && !defined(haiku_TARGET_OS)
+#if !defined(mingw32_TARGET_OS) && !defined(freebsd_TARGET_OS) && !defined(openbsd_TARGET_OS) && !defined(netbsd_TARGET_OS) && !defined(haiku_TARGET_OS)
"-lpthread"
#endif
#if defined(osf3_TARGET_OS)
diff --git a/compiler/main/StaticFlags.hs b/compiler/main/StaticFlags.hs
index dd00d3d6b3..e89d9b32a4 100644
--- a/compiler/main/StaticFlags.hs
+++ b/compiler/main/StaticFlags.hs
@@ -491,7 +491,7 @@ way_details =
-- the problems are our fault or theirs, but it seems that using the
-- alternative 1:1 threading library libthr works around it:
"-optl-lthr"
-#elif defined(openbsd_TARGET_OS)
+#elif defined(openbsd_TARGET_OS) || defined(netbsd_TARGET_OS)
"-optc-pthread"
, "-optl-pthread"
#elif defined(solaris2_TARGET_OS)
@@ -509,7 +509,7 @@ way_details =
-- with -fPIC. Labels not in the current package are assumed to be in a DLL
-- different from the current one.
, "-fPIC"
-#elif defined(openbsd_TARGET_OS)
+#elif defined(openbsd_TARGET_OS) || defined(netbsd_TARGET_OS)
-- Without this, linking the shared libHSffi fails because
-- it uses pthread mutexes.
, "-optl-pthread"