summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/HsVersions.h2
-rw-r--r--compiler/nativeGen/Platform.hs1
-rw-r--r--mk/config.mk.in1
3 files changed, 3 insertions, 1 deletions
diff --git a/compiler/HsVersions.h b/compiler/HsVersions.h
index 4d8e52133f..303d2bdc65 100644
--- a/compiler/HsVersions.h
+++ b/compiler/HsVersions.h
@@ -17,7 +17,7 @@ you will screw up the layout where they are used in case expressions!
#include "ghc_boot_platform.h"
/* This macro indicates that the target OS supports ELF-like shared libraries */
-#if linux_TARGET_OS || freebsd_TARGET_OS || openbsd_TARGET_OS
+#if linux_TARGET_OS || freebsd_TARGET_OS || openbsd_TARGET_OS || solaris2_TARGET_OS
#define elf_OBJ_FORMAT 1
#endif
diff --git a/compiler/nativeGen/Platform.hs b/compiler/nativeGen/Platform.hs
index 023d9acfdb..20cb5f5e96 100644
--- a/compiler/nativeGen/Platform.hs
+++ b/compiler/nativeGen/Platform.hs
@@ -58,6 +58,7 @@ osElfTarget :: OS -> Bool
osElfTarget OSLinux = True
osElfTarget OSFreeBSD = True
osElfTarget OSOpenBSD = True
+osElfTarget OSSolaris2 = True
osElfTarget _ = False
-- | This is the target platform as far as the #ifdefs are concerned.
diff --git a/mk/config.mk.in b/mk/config.mk.in
index 5b04f6b355..902c0dc632 100644
--- a/mk/config.mk.in
+++ b/mk/config.mk.in
@@ -109,6 +109,7 @@ PlatformSupportsSharedLibs = $(if $(filter $(TARGETPLATFORM),\
i386-unknown-freebsd x86_64-unknown-freebsd \
i386-unknown-openbsd x86_64-unknown-openbsd \
i386-unknown-mingw32 \
+ i386-unknown-solaris2 \
i386-apple-darwin powerpc-apple-darwin),YES,NO)
# Build a compiler that will build *unregisterised* libraries and