(still doesn't build: system libffi patch seems incomplete - can't find the libffi headers)epel9
parent
80a3e4101e
commit
56ca87f87c
@ -0,0 +1,33 @@
|
|||||||
|
diff -u ghc-7.2.0.20110728/libraries/Cabal/cabal/Distribution/Simple/GHC.hs.orig ghc-7.2.0.20110728/libraries/Cabal/cabal/Distribution/Simple/GHC.hs
|
||||||
|
--- ghc-7.2.0.20110728/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs.orig 2011-07-29 02:12:09.000000000 +0900
|
||||||
|
+++ ghc-7.2.0.20110728/libraries/Cabal/Cabal/Distribution/Simple/GHC.hs 2011-08-05 18:08:05.192042529 +0900
|
||||||
|
@@ -778,7 +778,10 @@
|
||||||
|
++ ["-L"++libDir | libDir <- extraLibDirs exeBi]
|
||||||
|
++ concat [["-framework", f] | f <- PD.frameworks exeBi]
|
||||||
|
++ if dynExe
|
||||||
|
- then ["-dynamic"]
|
||||||
|
+ then ["-dynamic",
|
||||||
|
+ "-hisuf", "dyn_hi",
|
||||||
|
+ "-osuf", "dyn_o"
|
||||||
|
+ ]
|
||||||
|
else []
|
||||||
|
++ if profExe
|
||||||
|
then ["-prof",
|
||||||
|
@@ -787,13 +790,14 @@
|
||||||
|
] ++ ghcProfOptions exeBi
|
||||||
|
else []
|
||||||
|
|
||||||
|
- -- For building exe's for profiling that use TH we actually
|
||||||
|
+ -- For building exe's for profiling or dynamic that use TH we actually
|
||||||
|
-- have to build twice, once without profiling and the again
|
||||||
|
-- with profiling. This is because the code that TH needs to
|
||||||
|
-- run at compile time needs to be the vanilla ABI so it can
|
||||||
|
-- be loaded up and run by the compiler.
|
||||||
|
- when (withProfExe lbi && EnableExtension TemplateHaskell `elem` allExtensions exeBi)
|
||||||
|
- (runGhcProg (binArgs False (withDynExe lbi) False))
|
||||||
|
+ when ((withProfExe lbi || withDynExe lbi) &&
|
||||||
|
+ EnableExtension TemplateHaskell `elem` allExtensions exeBi)
|
||||||
|
+ (runGhcProg (binArgs False False False))
|
||||||
|
|
||||||
|
runGhcProg (binArgs True (withDynExe lbi) (withProfExe lbi))
|
||||||
|
|
@ -1,145 +0,0 @@
|
|||||||
diff -rN -u old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Configure.hs new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Configure.hs
|
|
||||||
--- old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Configure.hs 2011-01-22 14:49:22.000000000 +1000
|
|
||||||
+++ new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Configure.hs 2011-01-22 14:49:22.000000000 +1000
|
|
||||||
@@ -488,6 +488,7 @@
|
|
||||||
withVanillaLib = fromFlag $ configVanillaLib cfg,
|
|
||||||
withProfLib = fromFlag $ configProfLib cfg,
|
|
||||||
withSharedLib = fromFlag $ configSharedLib cfg,
|
|
||||||
+ withDynExe = fromFlag $ configDynExe cfg,
|
|
||||||
withProfExe = fromFlag $ configProfExe cfg,
|
|
||||||
withOptimization = fromFlag $ configOptimization cfg,
|
|
||||||
withGHCiLib = fromFlag $ configGHCiLib cfg,
|
|
||||||
diff -u ghc-7.0.1/libraries/Cabal/Distribution/Simple/GHC.hs.orig ghc-7.0.1/libraries/Cabal/Distribution/Simple/GHC.hs
|
|
||||||
--- ghc-7.0.1/libraries/Cabal/Distribution/Simple/GHC.hs.orig 2010-11-13 04:10:09.000000000 +1000
|
|
||||||
+++ ghc-7.0.1/libraries/Cabal/Distribution/Simple/GHC.hs 2011-01-22 14:52:52.000000000 +1000
|
|
||||||
@@ -537,6 +537,7 @@
|
|
||||||
info verbosity "Building C Sources..."
|
|
||||||
sequence_ [do let (odir,args) = constructCcCmdLine lbi libBi clbi pref
|
|
||||||
filename verbosity
|
|
||||||
+ False
|
|
||||||
(withProfLib lbi)
|
|
||||||
createDirectoryIfMissingVerbose verbosity True odir
|
|
||||||
runGhcProg args
|
|
||||||
@@ -671,7 +672,7 @@
|
|
||||||
info verbosity "Building C Sources."
|
|
||||||
sequence_ [do let (odir,args) = constructCcCmdLine lbi exeBi clbi
|
|
||||||
exeDir filename verbosity
|
|
||||||
- (withProfExe lbi)
|
|
||||||
+ (withDynExe lbi) (withProfExe lbi)
|
|
||||||
createDirectoryIfMissingVerbose verbosity True odir
|
|
||||||
runGhcProg args
|
|
||||||
| filename <- cSources exeBi]
|
|
||||||
@@ -679,7 +680,7 @@
|
|
||||||
srcMainFile <- findFile (exeDir : hsSourceDirs exeBi) modPath
|
|
||||||
|
|
||||||
let cObjs = map (`replaceExtension` objExtension) (cSources exeBi)
|
|
||||||
- let binArgs linkExe profExe =
|
|
||||||
+ let binArgs linkExe dynExe profExe =
|
|
||||||
"--make"
|
|
||||||
: (if linkExe
|
|
||||||
then ["-o", targetDir </> exeNameReal]
|
|
||||||
@@ -691,6 +692,9 @@
|
|
||||||
++ ["-l"++lib | lib <- extraLibs exeBi]
|
|
||||||
++ ["-L"++libDir | libDir <- extraLibDirs exeBi]
|
|
||||||
++ concat [["-framework", f] | f <- PD.frameworks exeBi]
|
|
||||||
+ ++ if dynExe
|
|
||||||
+ then ["-dynamic"]
|
|
||||||
+ else []
|
|
||||||
++ if profExe
|
|
||||||
then ["-prof",
|
|
||||||
"-hisuf", "p_hi",
|
|
||||||
@@ -704,9 +708,9 @@
|
|
||||||
-- run at compile time needs to be the vanilla ABI so it can
|
|
||||||
-- be loaded up and run by the compiler.
|
|
||||||
when (withProfExe lbi && TemplateHaskell `elem` allExtensions exeBi)
|
|
||||||
- (runGhcProg (binArgs False False))
|
|
||||||
+ (runGhcProg (binArgs (withDynExe lbi) False False))
|
|
||||||
|
|
||||||
- runGhcProg (binArgs True (withProfExe lbi))
|
|
||||||
+ runGhcProg (binArgs True (withDynExe lbi) (withProfExe lbi))
|
|
||||||
|
|
||||||
-- | Filter the "-threaded" flag when profiling as it does not
|
|
||||||
-- work with ghc-6.8 and older.
|
|
||||||
@@ -836,9 +840,9 @@
|
|
||||||
ierror = error ("internal error: unexpected package db stack: " ++ show dbstack)
|
|
||||||
|
|
||||||
constructCcCmdLine :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo
|
|
||||||
- -> FilePath -> FilePath -> Verbosity -> Bool
|
|
||||||
+ -> FilePath -> FilePath -> Verbosity -> Bool -> Bool
|
|
||||||
->(FilePath,[String])
|
|
||||||
-constructCcCmdLine lbi bi clbi pref filename verbosity profiling
|
|
||||||
+constructCcCmdLine lbi bi clbi pref filename verbosity dynamic profiling
|
|
||||||
= let odir | compilerVersion (compiler lbi) >= Version [6,4,1] [] = pref
|
|
||||||
| otherwise = pref </> takeDirectory filename
|
|
||||||
-- ghc 6.4.1 fixed a bug in -odir handling
|
|
||||||
@@ -852,6 +856,7 @@
|
|
||||||
-- option to ghc here when compiling C code, so that the PROFILING
|
|
||||||
-- macro gets defined. The macro is used in ghc's Rts.h in the
|
|
||||||
-- definitions of closure layouts (Closures.h).
|
|
||||||
+ ++ ["-dynamic" | dynamic]
|
|
||||||
++ ["-prof" | profiling])
|
|
||||||
|
|
||||||
ghcCcOptions :: LocalBuildInfo -> BuildInfo -> ComponentLocalBuildInfo
|
|
||||||
diff -rN -u old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs
|
|
||||||
--- old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs 2011-01-22 14:49:22.000000000 +1000
|
|
||||||
+++ new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/LocalBuildInfo.hs 2011-01-22 14:49:22.000000000 +1000
|
|
||||||
@@ -118,6 +118,7 @@
|
|
||||||
withVanillaLib:: Bool, -- ^Whether to build normal libs.
|
|
||||||
withProfLib :: Bool, -- ^Whether to build profiling versions of libs.
|
|
||||||
withSharedLib :: Bool, -- ^Whether to build shared versions of libs.
|
|
||||||
+ withDynExe :: Bool, -- ^Whether to link executables dynamically
|
|
||||||
withProfExe :: Bool, -- ^Whether to build executables for profiling.
|
|
||||||
withOptimization :: OptimisationLevel, -- ^Whether to build with optimization (if available).
|
|
||||||
withGHCiLib :: Bool, -- ^Whether to build libs suitable for use with GHCi.
|
|
||||||
diff -rN -u old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Setup.hs new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Setup.hs
|
|
||||||
--- old-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Setup.hs 2011-01-22 14:49:22.000000000 +1000
|
|
||||||
+++ new-ghc-7.0.1/libraries/Cabal/Distribution/Simple/Setup.hs 2011-01-22 14:49:22.000000000 +1000
|
|
||||||
@@ -270,6 +270,7 @@
|
|
||||||
configVanillaLib :: Flag Bool, -- ^Enable vanilla library
|
|
||||||
configProfLib :: Flag Bool, -- ^Enable profiling in the library
|
|
||||||
configSharedLib :: Flag Bool, -- ^Build shared library
|
|
||||||
+ configDynExe :: Flag Bool, -- ^Enable dynamic linking of the executables.
|
|
||||||
configProfExe :: Flag Bool, -- ^Enable profiling in the executables.
|
|
||||||
configConfigureArgs :: [String], -- ^Extra arguments to @configure@
|
|
||||||
configOptimization :: Flag OptimisationLevel, -- ^Enable optimization.
|
|
||||||
@@ -301,6 +302,7 @@
|
|
||||||
configVanillaLib = Flag True,
|
|
||||||
configProfLib = Flag False,
|
|
||||||
configSharedLib = Flag False,
|
|
||||||
+ configDynExe = Flag False,
|
|
||||||
configProfExe = Flag False,
|
|
||||||
configOptimization = Flag NormalOptimisation,
|
|
||||||
configProgPrefix = Flag (toPathTemplate ""),
|
|
||||||
@@ -388,10 +390,16 @@
|
|
||||||
configSharedLib (\v flags -> flags { configSharedLib = v })
|
|
||||||
(boolOpt [] [])
|
|
||||||
|
|
||||||
+ ,option "" ["executable-dynamic"]
|
|
||||||
+ "Executable dynamic linking (fedora patch)"
|
|
||||||
+ configDynExe (\v flags -> flags { configDynExe = v })
|
|
||||||
+ (boolOpt [] [])
|
|
||||||
+
|
|
||||||
,option "" ["executable-profiling"]
|
|
||||||
"Executable profiling"
|
|
||||||
configProfExe (\v flags -> flags { configProfExe = v })
|
|
||||||
(boolOpt [] [])
|
|
||||||
+
|
|
||||||
,multiOption "optimization"
|
|
||||||
configOptimization (\v flags -> flags { configOptimization = v })
|
|
||||||
[optArg' "n" (Flag . flagToOptimisationLevel)
|
|
||||||
@@ -553,6 +561,7 @@
|
|
||||||
configVanillaLib = mempty,
|
|
||||||
configProfLib = mempty,
|
|
||||||
configSharedLib = mempty,
|
|
||||||
+ configDynExe = mempty,
|
|
||||||
configProfExe = mempty,
|
|
||||||
configConfigureArgs = mempty,
|
|
||||||
configOptimization = mempty,
|
|
||||||
@@ -583,6 +592,7 @@
|
|
||||||
configVanillaLib = combine configVanillaLib,
|
|
||||||
configProfLib = combine configProfLib,
|
|
||||||
configSharedLib = combine configSharedLib,
|
|
||||||
+ configDynExe = combine configDynExe,
|
|
||||||
configProfExe = combine configProfExe,
|
|
||||||
configConfigureArgs = combine configConfigureArgs,
|
|
||||||
configOptimization = combine configOptimization,
|
|
@ -1,13 +0,0 @@
|
|||||||
diff -Nuard ghc-7.0.1.orig/compiler/main/DriverPipeline.hs ghc-7.0.1/compiler/main/DriverPipeline.hs
|
|
||||||
--- ghc-7.0.1.orig/compiler/main/DriverPipeline.hs 2010-11-12 19:10:03.000000000 +0100
|
|
||||||
+++ ghc-7.0.1/compiler/main/DriverPipeline.hs 2011-02-22 11:08:26.079686994 +0100
|
|
||||||
@@ -1211,6 +1211,9 @@
|
|
||||||
let ld_r args = SysTools.runLink dflags ([
|
|
||||||
SysTools.Option "-nostdlib",
|
|
||||||
SysTools.Option "-nodefaultlibs",
|
|
||||||
+#ifdef sparc_TARGET_ARCH
|
|
||||||
+ SysTools.Option "-Wl,--no-relax",
|
|
||||||
+#endif
|
|
||||||
SysTools.Option "-Wl,-r",
|
|
||||||
SysTools.Option ld_x_flag,
|
|
||||||
SysTools.Option "-o",
|
|
Loading…
Reference in new issue