summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/main/DynFlags.hs1
-rw-r--r--compiler/main/SysTools.lhs9
2 files changed, 10 insertions, 0 deletions
diff --git a/compiler/main/DynFlags.hs b/compiler/main/DynFlags.hs
index 193303eeef..20b61c1599 100644
--- a/compiler/main/DynFlags.hs
+++ b/compiler/main/DynFlags.hs
@@ -3728,6 +3728,7 @@ data LinkerInfo
= GnuLD [Option]
| GnuGold [Option]
| DarwinLD [Option]
+ | SolarisLD [Option]
| UnknownLD
deriving Eq
diff --git a/compiler/main/SysTools.lhs b/compiler/main/SysTools.lhs
index d0545fd06e..510475e88b 100644
--- a/compiler/main/SysTools.lhs
+++ b/compiler/main/SysTools.lhs
@@ -638,6 +638,7 @@ neededLinkArgs :: LinkerInfo -> [Option]
neededLinkArgs (GnuLD o) = o
neededLinkArgs (GnuGold o) = o
neededLinkArgs (DarwinLD o) = o
+neededLinkArgs (SolarisLD o) = o
neededLinkArgs UnknownLD = []
-- Grab linker info and cache it in DynFlags.
@@ -676,6 +677,14 @@ getLinkerInfo' dflags = do
-- Process the executable call
info <- catchIO (do
case os of
+ OSSolaris2 ->
+ -- Solaris uses its own Solaris linker. Even all
+ -- GNU C are receommended to configure with Solaris
+ -- linker instead of using GNU binutils linker. Also
+ -- all GCC distributed with Solaris follows this rule
+ -- precisely so we assume here, the Solaris linker is
+ -- used.
+ return $ SolarisLD []
OSDarwin ->
-- Darwin has neither GNU Gold or GNU LD, but a strange linker
-- that doesn't support --version. We can just assume that's