summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/main/DriverPipeline.hs2
-rw-r--r--compiler/main/StaticFlags.hs4
-rw-r--r--compiler/nativeGen/PPC/CodeGen.hs1
-rw-r--r--compiler/utils/Platform.hs2
4 files changed, 6 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"
diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
index 607e05d66b..8c80ec40c1 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -853,6 +853,7 @@ genCCall target dest_regs argsAndHints
OSMinGW32 -> panic "PPC.CodeGen.genCCall: not defined for this os"
OSFreeBSD -> panic "PPC.CodeGen.genCCall: not defined for this os"
OSOpenBSD -> panic "PPC.CodeGen.genCCall: not defined for this os"
+ OSNetBSD -> panic "PPC.CodeGen.genCCall: not defined for this os"
OSUnknown -> panic "PPC.CodeGen.genCCall: not defined for this os"
data GenCCallPlatform = GCPLinux | GCPDarwin
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index e99d70600f..027c510546 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -55,6 +55,7 @@ data OS
| OSMinGW32
| OSFreeBSD
| OSOpenBSD
+ | OSNetBSD
deriving (Read, Show, Eq)
-- | ARM Instruction Set Architecture and Extensions
@@ -90,6 +91,7 @@ osElfTarget :: OS -> Bool
osElfTarget OSLinux = True
osElfTarget OSFreeBSD = True
osElfTarget OSOpenBSD = True
+osElfTarget OSNetBSD = True
osElfTarget OSSolaris2 = True
osElfTarget OSDarwin = False
osElfTarget OSMinGW32 = False