[commit: ghc] master: Fix #8451 (1ad599e)
git at git.haskell.org
git at git.haskell.org
Sat Jan 18 11:02:45 UTC 2014
Repository : ssh://git@git.haskell.org/ghc
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/1ad599ea241626f47006fa386e4aaf38dc91fdbb/ghc
>---------------------------------------------------------------
commit 1ad599ea241626f47006fa386e4aaf38dc91fdbb
Author: Gabor Pali <pali.gabor at gmail.com>
Date: Sat Jan 18 03:02:21 2014 +0100
Fix #8451
On FreeBSD, /usr/lib has to be added to the library path on linking when
libthr is needed but -nostdlib is used (which is the case when the -prof
and -threaded flags are combined).
>---------------------------------------------------------------
1ad599ea241626f47006fa386e4aaf38dc91fdbb
compiler/main/DriverPipeline.hs | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs
index 19fb717..b2f182a 100644
--- a/compiler/main/DriverPipeline.hs
+++ b/compiler/main/DriverPipeline.hs
@@ -2124,12 +2124,16 @@ joinObjectFiles :: DynFlags -> [FilePath] -> FilePath -> IO ()
joinObjectFiles dflags o_files output_fn = do
let mySettings = settings dflags
ldIsGnuLd = sLdIsGnuLd mySettings
+ osInfo = platformOS (targetPlatform dflags)
ld_r args ccInfo = SysTools.runLink dflags ([
SysTools.Option "-nostdlib",
SysTools.Option "-Wl,-r"
]
++ (if ccInfo == Clang then []
else [SysTools.Option "-nodefaultlibs"])
+ ++ (if osInfo == OSFreeBSD
+ then [SysTools.Option "-L/usr/lib"]
+ else [])
-- gcc on sparc sets -Wl,--relax implicitly, but
-- -r and --relax are incompatible for ld, so
-- disable --relax explicitly.
More information about the ghc-commits
mailing list