update to new 7.4.1 major release
(still doesn't build: system libffi patch seems incomplete - can't find the libffi headers)
This commit is contained in:
parent
e45f98193a
commit
1998ace9af
2
.gitignore
vendored
2
.gitignore
vendored
@ -5,3 +5,5 @@ testsuite-6.12.3.tar.bz2
|
||||
/ghc-7.0.2-src.tar.bz2
|
||||
/ghc-7.0.4-src.tar.bz2
|
||||
/testsuite-7.0.4.tar.bz2
|
||||
/ghc-7.4.1-testsuite.tar.bz2
|
||||
/ghc-7.4.1-src.tar.bz2
|
||||
|
33
Cabal-fix-dynamic-exec-for-TH.patch
Normal file
33
Cabal-fix-dynamic-exec-for-TH.patch
Normal file
@ -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",
|
@ -1,39 +1,11 @@
|
||||
diff -up ghc-7.0.1/compiler/ghc.cabal.in.libffi ghc-7.0.1/compiler/ghc.cabal.in
|
||||
--- ghc-7.0.1/compiler/ghc.cabal.in.libffi 2010-11-13 04:10:03.000000000 +1000
|
||||
+++ ghc-7.0.1/compiler/ghc.cabal.in 2010-11-16 19:04:28.000000000 +1000
|
||||
@@ -83,7 +83,7 @@ Library
|
||||
if flag(ghci)
|
||||
Build-Depends: template-haskell
|
||||
CPP-Options: -DGHCI
|
||||
- Include-Dirs: ../libffi/build/include
|
||||
+ pkgconfig-depends: libffi
|
||||
|
||||
if !flag(ncg)
|
||||
CPP-Options: -DOMIT_NATIVE_CODEGEN
|
||||
diff -up ghc-7.0.1/ghc.mk.libffi ghc-7.0.1/ghc.mk
|
||||
--- ghc-7.0.1/ghc.mk.libffi 2010-11-13 04:10:05.000000000 +1000
|
||||
+++ ghc-7.0.1/ghc.mk 2010-11-16 19:04:28.000000000 +1000
|
||||
@@ -437,7 +437,6 @@ utils/runghc/dist/package-data.mk: compi
|
||||
# add the final two package.conf dependencies: ghc-prim depends on RTS,
|
||||
# and RTS depends on libffi.
|
||||
libraries/ghc-prim/dist-install/package-data.mk : rts/package.conf.inplace
|
||||
-rts/package.conf.inplace : libffi/package.conf.inplace
|
||||
endif
|
||||
|
||||
# --------------------------------
|
||||
@@ -452,11 +451,6 @@ ALL_STAGE1_LIBS += $(foreach lib,$(PACKA
|
||||
endif
|
||||
BOOT_LIBS = $(foreach lib,$(STAGE0_PACKAGES),$(libraries/$(lib)_dist-boot_v_LIB))
|
||||
|
||||
-OTHER_LIBS = libffi/dist-install/build/libHSffi$(v_libsuf) libffi/dist-install/build/HSffi.o
|
||||
-ifeq "$(BuildSharedLibs)" "YES"
|
||||
-OTHER_LIBS += libffi/dist-install/build/libHSffi$(dyn_libsuf)
|
||||
-endif
|
||||
-
|
||||
# ----------------------------------------
|
||||
# Special magic for the ghc-prim package
|
||||
|
||||
@@ -581,7 +575,6 @@ BUILD_DIRS += \
|
||||
This patch could be replaced by a configure call if
|
||||
http://hackage.haskell.org/trac/ghc/ticket/5743 were fixed.
|
||||
|
||||
Index: ghc-7.4.0.20111219/ghc.mk
|
||||
===================================================================
|
||||
--- ghc-7.4.0.20111219.orig/ghc.mk 2011-12-21 23:21:03.000000000 +0100
|
||||
+++ ghc-7.4.0.20111219/ghc.mk 2011-12-21 23:21:04.000000000 +0100
|
||||
@@ -579,7 +579,6 @@
|
||||
driver/ghci \
|
||||
driver/ghc \
|
||||
driver/haddock \
|
||||
@ -41,80 +13,40 @@ diff -up ghc-7.0.1/ghc.mk.libffi ghc-7.0.1/ghc.mk
|
||||
includes \
|
||||
rts
|
||||
|
||||
@@ -937,11 +930,10 @@ INSTALL_DISTDIR_compiler = stage2
|
||||
Index: ghc-7.4.0.20111219/rts/ghc.mk
|
||||
===================================================================
|
||||
--- ghc-7.4.0.20111219.orig/rts/ghc.mk 2011-12-21 19:56:29.000000000 +0100
|
||||
+++ ghc-7.4.0.20111219/rts/ghc.mk 2011-12-21 23:23:52.000000000 +0100
|
||||
@@ -177,7 +176,7 @@
|
||||
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
|
||||
-no-auto-link-packages -Lrts/dist/build -lffi-5 `cat rts/libs.depend` $$(rts_$1_OBJS) $$(ALL_RTS_DEF_LIBS) -o $$@
|
||||
else
|
||||
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend rts/dist/build/libffi$$(soext)
|
||||
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) rts/libs.depend
|
||||
"$$(RM)" $$(RM_OPTS) $$@
|
||||
"$$(rts_dist_HC)" -package-name rts -shared -dynamic -dynload deploy \
|
||||
-no-auto-link-packages -Lrts/dist/build -lffi `cat rts/libs.depend` $$(rts_$1_OBJS) \
|
||||
@@ -188,9 +187,9 @@
|
||||
endif
|
||||
endif
|
||||
else
|
||||
-$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) $$(rts_ffi_objs_stamp)
|
||||
+$$(rts_$1_LIB) : $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS)
|
||||
"$$(RM)" $$(RM_OPTS) $$@
|
||||
- echo $$(rts_ffi_objs) $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
|
||||
+ echo $$(rts_$1_OBJS) $$(rts_$1_DTRACE_OBJS) | "$$(XARGS)" $$(XARGS_OPTS) "$$(AR_STAGE1)" \
|
||||
$$(AR_OPTS_STAGE1) $$(EXTRA_AR_ARGS_STAGE1) $$@
|
||||
endif
|
||||
|
||||
# Now we can do the installation
|
||||
install_packages: install_libexecs
|
||||
-install_packages: libffi/package.conf.install rts/package.conf.install
|
||||
+install_packages: rts/package.conf.install
|
||||
$(call INSTALL_DIR,"$(DESTDIR)$(topdir)")
|
||||
"$(RM)" $(RM_OPTS_REC) "$(INSTALLED_PACKAGE_CONF)"
|
||||
$(call INSTALL_DIR,"$(INSTALLED_PACKAGE_CONF)")
|
||||
- "$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update libffi/package.conf.install
|
||||
"$(INSTALLED_GHC_PKG_REAL)" --force --global-conf "$(INSTALLED_PACKAGE_CONF)" update rts/package.conf.install
|
||||
$(foreach p, $(INSTALLED_PKG_DIRS), \
|
||||
$(call make-command, \
|
||||
@@ -1024,7 +1016,7 @@ BIN_DIST_MK = $(BIN_DIST_PREP_DIR)/bindi
|
||||
unix-binary-dist-prep:
|
||||
"$(RM)" $(RM_OPTS_REC) bindistprep/
|
||||
"$(MKDIRHIER)" $(BIN_DIST_PREP_DIR)
|
||||
- set -e; for i in packages LICENSE compiler ghc rts libraries utils docs libffi includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
|
||||
+ set -e; for i in packages LICENSE compiler ghc rts libraries utils docs includes driver mk rules Makefile aclocal.m4 config.sub config.guess install-sh extra-gcc-opts.in ghc.mk inplace distrib/configure.ac distrib/README distrib/INSTALL; do ln -s ../../$$i $(BIN_DIST_PREP_DIR)/; done
|
||||
echo "HADDOCK_DOCS = $(HADDOCK_DOCS)" >> $(BIN_DIST_MK)
|
||||
echo "LATEX_DOCS = $(LATEX_DOCS)" >> $(BIN_DIST_MK)
|
||||
echo "BUILD_DOCBOOK_HTML = $(BUILD_DOCBOOK_HTML)" >> $(BIN_DIST_MK)
|
||||
@@ -1102,7 +1094,7 @@ SRC_DIST_DIR=$(shell pwd)/$(SRC_DIST_NAM
|
||||
#
|
||||
# Files to include in source distributions
|
||||
#
|
||||
-SRC_DIST_DIRS = mk rules docs distrib bindisttest libffi includes utils docs rts compiler ghc driver libraries ghc-tarballs
|
||||
+SRC_DIST_DIRS = mk rules docs distrib bindisttest includes utils docs rts compiler ghc driver libraries ghc-tarballs
|
||||
SRC_DIST_FILES += \
|
||||
configure.ac config.guess config.sub configure \
|
||||
aclocal.m4 README ANNOUNCE HACKING LICENSE Makefile install-sh \
|
||||
diff -up ghc-7.0.1/rts/ghc.mk.libffi ghc-7.0.1/rts/ghc.mk
|
||||
--- ghc-7.0.1/rts/ghc.mk.libffi 2010-11-13 04:10:06.000000000 +1000
|
||||
+++ ghc-7.0.1/rts/ghc.mk 2010-11-16 19:06:09.000000000 +1000
|
||||
@@ -430,15 +430,15 @@ endif
|
||||
@@ -504,10 +503,8 @@
|
||||
# installing
|
||||
|
||||
$(eval $(call build-dependencies,rts,dist,1))
|
||||
INSTALL_LIBS += $(ALL_RTS_LIBS)
|
||||
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi$(soext)*)
|
||||
-INSTALL_LIBS += $(wildcard rts/dist/build/libffi-5.dll)
|
||||
|
||||
-$(rts_dist_depfile_c_asm) : libffi/dist-install/build/ffi.h $(DTRACEPROBES_H)
|
||||
+$(rts_dist_depfile_c_asm) : $(DTRACEPROBES_H)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# libffi stuff
|
||||
|
||||
-rts_CC_OPTS += -Ilibffi/build/include
|
||||
-rts_HC_OPTS += -Ilibffi/build/include
|
||||
-rts_HSC2HS_OPTS += -Ilibffi/build/include
|
||||
-rts_LD_OPTS += -Llibffi/build/include
|
||||
+rts_CC_OPTS += $(shell pkg-config --cflags libffi)
|
||||
+rts_HC_OPTS += $(shell pkg-config --cflags libffi)
|
||||
+rts_HSC2HS_OPTS += $(shell pkg-config --cflags libffi)
|
||||
+rts_LD_OPTS += $(shell pkg-config --libs libffi)
|
||||
|
||||
# -----------------------------------------------------------------------------
|
||||
# compile dtrace probes if dtrace is supported
|
||||
diff -up ghc-7.0.1/rts/package.conf.in.libffi ghc-7.0.1/rts/package.conf.in
|
||||
--- ghc-7.0.1/rts/package.conf.in.libffi 2010-11-13 04:10:06.000000000 +1000
|
||||
+++ ghc-7.0.1/rts/package.conf.in 2010-11-16 19:04:28.000000000 +1000
|
||||
@@ -24,8 +24,9 @@ library-dirs: TOP"/rts/dist/build" PAPI
|
||||
hs-libraries: "HSrts"
|
||||
|
||||
extra-libraries:
|
||||
+ "ffi"
|
||||
#ifdef HAVE_LIBM
|
||||
- "m" /* for ldexp() */
|
||||
+ , "m" /* for ldexp() */
|
||||
#endif
|
||||
#ifdef HAVE_LIBRT
|
||||
, "rt"
|
||||
@@ -55,7 +56,6 @@ include-dirs: TOP"/includes"
|
||||
#endif
|
||||
|
||||
includes: Stg.h
|
||||
-depends: builtin_ffi
|
||||
hugs-options:
|
||||
cc-options:
|
||||
-install: install_libffi_headers
|
||||
+install:
|
||||
|
||||
.PHONY: install_libffi_headers
|
||||
install_libffi_headers :
|
||||
|
85
ghc.spec
85
ghc.spec
@ -2,8 +2,8 @@
|
||||
# (disabled for other archs in ghc-rpm-macros)
|
||||
|
||||
# To bootstrap a new version of ghc, uncomment the following:
|
||||
#%%global ghc_bootstrapping 1
|
||||
#%%{?ghc_bootstrap}
|
||||
%global ghc_bootstrapping 1
|
||||
%{?ghc_bootstrap}
|
||||
#%%global without_hscolour 1
|
||||
|
||||
# To do a test build instead with shared libs, uncomment the following:
|
||||
@ -24,12 +24,12 @@
|
||||
Name: ghc
|
||||
# part of haskell-platform
|
||||
# NB make sure to rebuild ghc after a version bump to avoid ABI change problems
|
||||
Version: 7.0.4
|
||||
Version: 7.4.1
|
||||
# Since library subpackages are versioned:
|
||||
# - release can only be reset if all library versions get bumped simultaneously
|
||||
# (eg for a major release)
|
||||
# - minor release numbers should be incremented monotonically
|
||||
Release: 42%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Summary: Glasgow Haskell Compiler
|
||||
# fedora ghc has been bootstrapped on the following archs:
|
||||
#ExclusiveArch: %{ix86} x86_64 ppc alpha sparcv9 ppc64 armv7hl armv5tel
|
||||
@ -38,7 +38,7 @@ License: %BSDHaskellReport
|
||||
Group: Development/Languages
|
||||
Source0: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-src.tar.bz2
|
||||
%if %{undefined without_testsuite}
|
||||
Source2: http://www.haskell.org/ghc/dist/%{version}/testsuite-%{version}.tar.bz2
|
||||
Source2: http://www.haskell.org/ghc/dist/%{version}/ghc-%{version}-testsuite.tar.bz2
|
||||
%endif
|
||||
Source3: ghc-doc-index.cron
|
||||
URL: http://haskell.org/ghc/
|
||||
@ -68,6 +68,9 @@ BuildRequires: python
|
||||
%ifarch ppc64
|
||||
BuildRequires: autoconf
|
||||
%endif
|
||||
%ifarch armv7hl armv5tel
|
||||
BuildRequires: llvm >= 3.0
|
||||
%endif
|
||||
Requires: ghc-compiler = %{version}-%{release}
|
||||
Requires: ghc-libraries = %{version}-%{release}
|
||||
Requires: ghc-ghc-devel = %{version}-%{release}
|
||||
@ -77,11 +80,11 @@ Patch3: ghc-gen_contents_index-cron-batch.patch
|
||||
Patch4: ghc-use-system-libffi.patch
|
||||
# add cabal configure option --enable-executable-dynamic
|
||||
# (see http://hackage.haskell.org/trac/hackage/ticket/600)
|
||||
Patch5: Cabal-option-executable-dynamic.patch
|
||||
Patch6: ghc-fix-linking-on-sparc.patch
|
||||
Patch7: ghc-ppc64-pthread.patch
|
||||
# http://hackage.haskell.org/trac/ghc/ticket/4999
|
||||
Patch8: ghc-powerpc-linker-mmap.patch
|
||||
# fix dynamic linking of executables using Template Haskell
|
||||
Patch9: Cabal-fix-dynamic-exec-for-TH.patch
|
||||
|
||||
%description
|
||||
GHC is a state-of-the-art, open source, compiler and interactive environment
|
||||
@ -132,29 +135,31 @@ To install all of ghc, install the ghc base package.
|
||||
%global ghc_pkg_c_deps ghc-compiler = %{ghc_version_override}-%{release}
|
||||
|
||||
%if %{defined ghclibdir}
|
||||
%ghc_binlib_package Cabal 1.10.2.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport array 0.3.0.2
|
||||
%ghc_binlib_package -l %BSDHaskellReport -c gmp-devel,libffi-devel base 4.3.1.0
|
||||
%ghc_binlib_package bytestring 0.9.1.10
|
||||
%ghc_binlib_package -l %BSDHaskellReport containers 0.4.0.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport directory 1.1.0.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport extensible-exceptions 0.1.1.2
|
||||
%ghc_binlib_package filepath 1.2.0.0
|
||||
%ghc_binlib_package Cabal 1.14.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport array 0.4.0.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport -c gmp-devel,libffi-devel base 4.5.0.0
|
||||
%ghc_binlib_package binary 0.5.1.0
|
||||
%ghc_binlib_package bytestring 0.9.2.1
|
||||
%ghc_binlib_package -l %BSDHaskellReport containers 0.4.2.1
|
||||
%ghc_binlib_package -l %BSDHaskellReport deepseq 1.3.0.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport directory 1.1.0.2
|
||||
%ghc_binlib_package -l %BSDHaskellReport extensible-exceptions 0.1.1.4
|
||||
%ghc_binlib_package filepath 1.3.0.0
|
||||
%define ghc_pkg_obsoletes ghc-bin-package-db-devel < 0.0.0.0-12
|
||||
# in ghc not ghc-libraries:
|
||||
%ghc_binlib_package -x ghc %{ghc_version_override}
|
||||
%undefine ghc_pkg_obsoletes
|
||||
%ghc_binlib_package -l HaskellReport haskell2010 1.0.0.0
|
||||
%ghc_binlib_package -l HaskellReport haskell98 1.1.0.1
|
||||
%ghc_binlib_package hpc 0.5.0.6
|
||||
%ghc_binlib_package -l %BSDHaskellReport old-locale 1.0.0.2
|
||||
%ghc_binlib_package -l %BSDHaskellReport old-time 1.0.0.6
|
||||
%ghc_binlib_package pretty 1.0.1.2
|
||||
%ghc_binlib_package -l %BSDHaskellReport process 1.0.1.5
|
||||
%ghc_binlib_package -l %BSDHaskellReport random 1.0.0.3
|
||||
%ghc_binlib_package template-haskell 2.5.0.0
|
||||
%ghc_binlib_package time 1.2.0.3
|
||||
%ghc_binlib_package unix 2.4.2.0
|
||||
%ghc_binlib_package -l HaskellReport haskell2010 1.1.0.1
|
||||
%ghc_binlib_package -l HaskellReport haskell98 2.0.0.1
|
||||
%ghc_binlib_package hoopl 3.8.7.3
|
||||
%ghc_binlib_package hpc 0.5.1.1
|
||||
%ghc_binlib_package -l %BSDHaskellReport old-locale 1.0.0.4
|
||||
%ghc_binlib_package -l %BSDHaskellReport old-time 1.1.0.0
|
||||
%ghc_binlib_package pretty 1.1.1.0
|
||||
%ghc_binlib_package -l %BSDHaskellReport process 1.1.0.1
|
||||
%ghc_binlib_package template-haskell 2.7.0.0
|
||||
%ghc_binlib_package time 1.4
|
||||
%ghc_binlib_package unix 2.5.1.0
|
||||
%endif
|
||||
|
||||
%global version %{ghc_version_override}
|
||||
@ -191,10 +196,6 @@ rm -r ghc-tarballs/{mingw,perl}
|
||||
%patch4 -p1 -b .libffi
|
||||
rm -r ghc-tarballs/libffi
|
||||
|
||||
%patch5 -p1 -b .orig
|
||||
|
||||
%patch6 -p1 -b .sparclinking
|
||||
|
||||
%ifarch ppc64
|
||||
%patch7 -p1 -b .pthread
|
||||
%endif
|
||||
@ -203,6 +204,8 @@ rm -r ghc-tarballs/libffi
|
||||
%patch8 -p1 -b .mmap
|
||||
%endif
|
||||
|
||||
%patch9 -p1 -b .orig
|
||||
|
||||
|
||||
%build
|
||||
# http://hackage.haskell.org/trac/ghc/wiki/Platforms
|
||||
@ -257,9 +260,8 @@ done
|
||||
|
||||
%ghc_gen_filelists bin-package-db 0.0.0.0
|
||||
%ghc_gen_filelists ghc %{ghc_version_override}
|
||||
%ghc_gen_filelists ghc-binary 0.5.0.2
|
||||
%ghc_gen_filelists ghc-prim 0.2.0.0
|
||||
%ghc_gen_filelists integer-gmp 0.2.0.3
|
||||
%ghc_gen_filelists integer-gmp 0.4.0.0
|
||||
|
||||
%define merge_filelist()\
|
||||
%if %{undefined ghc_without_shared}\
|
||||
@ -271,7 +273,6 @@ echo "%doc libraries/LICENSE.%1" >> ghc-%2.files
|
||||
|
||||
%merge_filelist integer-gmp base
|
||||
%merge_filelist ghc-prim base
|
||||
%merge_filelist ghc-binary ghc
|
||||
%merge_filelist bin-package-db ghc
|
||||
|
||||
%if %{undefined ghc_without_shared}
|
||||
@ -321,7 +322,7 @@ inplace/bin/ghc-stage2 testghc/foo.hs -o testghc/foo -dynamic
|
||||
rm testghc/*
|
||||
%endif
|
||||
%if %{undefined without_testsuite}
|
||||
make -C testsuite/tests/ghc-regress fast
|
||||
make test
|
||||
%endif
|
||||
|
||||
%post compiler
|
||||
@ -366,11 +367,9 @@ fi
|
||||
%ghost %{_bindir}/runhaskell
|
||||
%{_bindir}/runhaskell-ghc
|
||||
%dir %{ghclibdir}
|
||||
%{ghclibdir}/extra-gcc-opts
|
||||
%{ghclibdir}/ghc
|
||||
%{ghclibdir}/ghc-pkg
|
||||
%ifnarch %{unregisterised_archs}
|
||||
%{ghclibdir}/ghc-asm
|
||||
%{ghclibdir}/ghc-split
|
||||
%endif
|
||||
%{ghclibdir}/ghc-usage.txt
|
||||
@ -379,6 +378,7 @@ fi
|
||||
%dir %{ghclibdir}/package.conf.d
|
||||
%ghost %{ghclibdir}/package.conf.d/package.cache
|
||||
%{ghclibdir}/runghc
|
||||
%{ghclibdir}/settings
|
||||
%{ghclibdir}/template-hsc.h
|
||||
%{ghclibdir}/unlit
|
||||
%{_mandir}/man1/ghc.*
|
||||
@ -415,6 +415,19 @@ fi
|
||||
%files libraries
|
||||
|
||||
%changelog
|
||||
* Wed Feb 15 2012 Jens Petersen <petersen@redhat.com> - 7.4.1-1
|
||||
- update to new 7.4.1 major release
|
||||
http://www.haskell.org/ghc/docs/7.4.1/html/users_guide/release-7-4-1.html
|
||||
- all library versions bumped
|
||||
- binary package replaces ghc-binary
|
||||
- random library dropped
|
||||
- new hoopl library
|
||||
- deepseq is now included in ghc
|
||||
- Cabal --enable-executable-dynamic patch is upstream
|
||||
- add Cabal-fix-dynamic-exec-for-TH.patch
|
||||
- sparc linking fix is upstream
|
||||
- setup ghc-deps.sh after ghc_version_override for bootstrapping
|
||||
|
||||
* Thu Jan 19 2012 Jens Petersen <petersen@redhat.com> - 7.0.4-42
|
||||
- move ghc-ghc-devel from ghc-libraries to the ghc metapackage
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user