From: Ian Lynagh Date: Wed, 8 Jun 2011 17:51:18 +0000 (+0100) Subject: Fill out the osElfTarget definition X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=265bedd9b4869cf5f323ab32ed1e4af0f7a0bfe0;ds=sidebyside 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. --- diff --git a/compiler/utils/Platform.hs b/compiler/utils/Platform.hs index 8f07b47..f3749ca 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