Arch(..),
OS(..),
- defaultTargetPlatform
+ defaultTargetPlatform,
+ osElfTarget
)
where
| OSDarwin
| OSSolaris
| OSMinGW32
+ | OSFreeBSD
+ | OSOpenBSD
deriving (Show, Eq)
+-- | 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 _ = False
+
-- | This is the target platform as far as the #ifdefs are concerned.
-- These are set in includes/ghcplatform.h by the autoconf scripts
defaultTargetPlatform :: Platform
defaultTargetOS = OSSolaris
#elif mingw32_TARGET_OS
defaultTargetOS = OSMinGW32
+#elif freebsd_TARGET_OS
+defaultTargetOS = OSFreeBSD
+#elif openbsd_TARGET_OS
+defaultTargetOS = OSOpenBSD
#else
defaultTargetOS = OSUnknown
#endif