diff options
author | David Terei <davidterei@gmail.com> | 2013-01-24 13:45:56 -0800 |
---|---|---|
committer | David Terei <davidterei@gmail.com> | 2013-01-24 16:54:29 -0800 |
commit | 538891939b65d60014aebe7aab6ad5c72825979e (patch) | |
tree | 054d20b74dd6bddbd9ccc2a3754438f6b8df5f80 /compiler | |
parent | b4797136887e9c1d3dbb2dcb045b60030f7726b4 (diff) | |
download | haskell-538891939b65d60014aebe7aab6ad5c72825979e.tar.gz |
do not use -rpath-link linker option on Solaris.
Patch from Karel Gardas <karel.gardas@centrum.cz>.
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index f47aea7097..c24bb51833 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -1752,7 +1752,16 @@ linkBinary dflags o_files dep_packages = do rpath = if gopt Opt_RPath dflags then ["-Wl,-rpath", "-Wl," ++ libpath] else [] - in ["-L" ++ l, "-Wl,-rpath-link", "-Wl," ++ l] ++ rpath + -- Solaris 11's linker does not support -rpath-link option. It silently + -- ignores it and then complains about next option which is -l<some + -- dir> as being a directory and not expected object file, E.g + -- ld: elf error: file + -- /tmp/ghc-src/libraries/base/dist-install/build: + -- elf_begin: I/O error: region read: Is a directory + rpathlink = if (platformOS platform) == OSSolaris2 + then [] + else ["-Wl,-rpath-link", "-Wl," ++ l] + in ["-L" ++ l] ++ rpathlink ++ rpath | otherwise = ["-L" ++ l] let lib_paths = libraryPaths dflags |