summaryrefslogtreecommitdiff
path: root/compiler/utils
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2011-06-08 18:51:18 +0100
committerIan Lynagh <igloo@earth.li>2011-06-08 18:51:18 +0100
commit265bedd9b4869cf5f323ab32ed1e4af0f7a0bfe0 (patch)
tree050e21ec12d0c91b12ed79be20d7aa3976cac3e1 /compiler/utils
parent417f4d59739cc478ca47d081c22d7b0a928c4e95 (diff)
downloadhaskell-265bedd9b4869cf5f323ab32ed1e4af0f7a0bfe0.tar.gz
Fill out the osElfTarget definition
For now we panic in the OSUnknown case. It would probably be better to make the enumerations complete instead, though.
Diffstat (limited to 'compiler/utils')
-rw-r--r--compiler/utils/Platform.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs
index 8f07b471bb..f3749ca09c 100644
--- a/compiler/utils/Platform.hs
+++ b/compiler/utils/Platform.hs
@@ -67,11 +67,14 @@ target32Bit p = case platformArch p of
-- | This predicates tells us whether the OS supports ELF-like shared libraries.
osElfTarget :: OS -> Bool
-osElfTarget OSLinux = True
-osElfTarget OSFreeBSD = True
-osElfTarget OSOpenBSD = True
+osElfTarget OSLinux = True
+osElfTarget OSFreeBSD = True
+osElfTarget OSOpenBSD = True
osElfTarget OSSolaris2 = True
-osElfTarget _ = False
+osElfTarget OSDarwin = False
+osElfTarget OSMinGW32 = False
+osElfTarget OSUnknown = panic "Don't know if OSUnknown is elf"
+
-- | This is the target platform as far as the #ifdefs are concerned.
-- These are set in includes/ghcplatform.h by the autoconf scripts