[commit: Cabal] master: GHC 7.2+ no longer generates _stub.o files (67da356)
Ian Lynagh
igloo at earth.li
Tue Oct 11 17:56:54 CEST 2011
Repository : ssh://darcs.haskell.org//srv/darcs/packages/Cabal
On branch : master
http://hackage.haskell.org/trac/ghc/changeset/67da3565a3f7e604fc28ae11d5f6c7067623d707
>---------------------------------------------------------------
commit 67da3565a3f7e604fc28ae11d5f6c7067623d707
Author: Duncan Coutts <duncan at community.haskell.org>
Date: Sat Sep 10 19:53:29 2011 +0000
GHC 7.2+ no longer generates _stub.o files
So stop looking for them. This could otherwise cause problems if one
switches ghc version without cleaning the build dir since we'll pick
up the old _stub.o files and end up with duplicate linker symbols.
>---------------------------------------------------------------
cabal/Distribution/Simple/GHC.hs | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/cabal/Distribution/Simple/GHC.hs b/cabal/Distribution/Simple/GHC.hs
index 5d8f46d..f48e148 100644
--- a/cabal/Distribution/Simple/GHC.hs
+++ b/cabal/Distribution/Simple/GHC.hs
@@ -585,6 +585,7 @@ buildLib verbosity pkg_descr lbi lib clbi = do
ifSharedLib = when (withSharedLib lbi)
ifGHCiLib = when (withGHCiLib lbi && withVanillaLib lbi)
comp = compiler lbi
+ ghcVersion = compilerVersion comp
libBi <- hackThreadedFlag verbosity
comp (withProfLib lbi) (libBuildInfo lib)
@@ -645,15 +646,18 @@ buildLib verbosity pkg_descr lbi lib clbi = do
stubObjs <- fmap catMaybes $ sequence
[ findFileWithExtension [objExtension] [libTargetDir]
(ModuleName.toFilePath x ++"_stub")
- | x <- libModules lib ]
+ | ghcVersion < Version [7,2] [] -- ghc-7.2+ does not make _stub.o files
+ , x <- libModules lib ]
stubProfObjs <- fmap catMaybes $ sequence
[ findFileWithExtension ["p_" ++ objExtension] [libTargetDir]
(ModuleName.toFilePath x ++"_stub")
- | x <- libModules lib ]
+ | ghcVersion < Version [7,2] [] -- ghc-7.2+ does not make _stub.o files
+ , x <- libModules lib ]
stubSharedObjs <- fmap catMaybes $ sequence
[ findFileWithExtension ["dyn_" ++ objExtension] [libTargetDir]
(ModuleName.toFilePath x ++"_stub")
- | x <- libModules lib ]
+ | ghcVersion < Version [7,2] [] -- ghc-7.2+ does not make _stub.o files
+ , x <- libModules lib ]
hObjs <- getHaskellObjects lib lbi
pref objExtension True
More information about the Cvs-libraries
mailing list