Accepting request 198332 from home:ptrommler:ppc
- Patch ghc for llvm 3.3. - explicitly configure gcc location in bootstrap builds too - allow ppc builds (ppc64 build gets stuck) OBS-URL: https://build.opensuse.org/request/show/198332 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=137
This commit is contained in:
parent
d55c4f449d
commit
3f6dc53c3d
11
ghc-7.6.3-LlvmCodeGen-no-3.3-warning.patch
Normal file
11
ghc-7.6.3-LlvmCodeGen-no-3.3-warning.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- ghc-7.6.3/compiler/llvmGen/LlvmCodeGen/Base.hs~ 2013-04-19 06:22:46.000000000 +0900
|
||||||
|
+++ ghc-7.6.3/compiler/llvmGen/LlvmCodeGen/Base.hs 2013-07-24 17:05:06.491900335 +0900
|
||||||
|
@@ -151,7 +151,7 @@
|
||||||
|
minSupportLlvmVersion = 28
|
||||||
|
|
||||||
|
maxSupportLlvmVersion :: LlvmVersion
|
||||||
|
-maxSupportLlvmVersion = 31
|
||||||
|
+maxSupportLlvmVersion = 33
|
||||||
|
|
||||||
|
-- ----------------------------------------------------------------------------
|
||||||
|
-- * Environment Handling
|
45
ghc-avoid-empty-llvm-used-definitions.patch
Normal file
45
ghc-avoid-empty-llvm-used-definitions.patch
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
git-author: Geoffrey Mainland <gmainlan@…> (06/12/13 13:31:49)
|
||||||
|
git-committer: Geoffrey Mainland <gmainlan@…> (06/12/13 13:31:49)
|
||||||
|
Message:
|
||||||
|
Avoid generating empty llvm.used definitions.
|
||||||
|
|
||||||
|
LLVM 3.3rc3 complains when the llvm.used global is an empty array, so don't
|
||||||
|
define llvm.used at all when it would be empty.
|
||||||
|
--
|
||||||
|
|
||||||
|
Index: ghc-7.6.3/compiler/llvmGen/LlvmCodeGen.hs
|
||||||
|
===================================================================
|
||||||
|
--- ghc-7.6.3.orig/compiler/llvmGen/LlvmCodeGen.hs
|
||||||
|
+++ ghc-7.6.3/compiler/llvmGen/LlvmCodeGen.hs
|
||||||
|
@@ -112,19 +112,19 @@ cmmProcLlvmGens :: DynFlags -> BufHandle
|
||||||
|
-> [[LlvmVar]] -- ^ info tables that need to be marked as 'used'
|
||||||
|
-> IO ()
|
||||||
|
|
||||||
|
-cmmProcLlvmGens _ _ _ _ [] _ []
|
||||||
|
- = return ()
|
||||||
|
-
|
||||||
|
cmmProcLlvmGens dflags h _ _ [] _ ivars
|
||||||
|
- = let ivars' = concat ivars
|
||||||
|
- cast x = LMBitc (LMStaticPointer (pVarLift x)) i8Ptr
|
||||||
|
- ty = (LMArray (length ivars') i8Ptr)
|
||||||
|
- usedArray = LMStaticArray (map cast ivars') ty
|
||||||
|
- lmUsed = (LMGlobalVar (fsLit "llvm.used") ty Appending
|
||||||
|
- (Just $ fsLit "llvm.metadata") Nothing False, Just usedArray)
|
||||||
|
- in Prt.bufLeftRender h $ {-# SCC "llvm_used_ppr" #-}
|
||||||
|
- withPprStyleDoc dflags (mkCodeStyle CStyle) $
|
||||||
|
- pprLlvmData ([lmUsed], [])
|
||||||
|
+ | null ivars' = return ()
|
||||||
|
+ | otherwise = Prt.bufLeftRender h $
|
||||||
|
+ {-# SCC "llvm_used_ppr" #-}
|
||||||
|
+ withPprStyleDoc dflags (mkCodeStyle CStyle) $
|
||||||
|
+ pprLlvmData ([lmUsed], [])
|
||||||
|
+ where
|
||||||
|
+ ivars' = concat ivars
|
||||||
|
+ cast x = LMBitc (LMStaticPointer (pVarLift x)) i8Ptr
|
||||||
|
+ ty = (LMArray (length ivars') i8Ptr)
|
||||||
|
+ usedArray = LMStaticArray (map cast ivars') ty
|
||||||
|
+ lmUsed = (LMGlobalVar (fsLit "llvm.used") ty Appending
|
||||||
|
+ (Just $ fsLit "llvm.metadata") Nothing False, Just usedArray)
|
||||||
|
|
||||||
|
cmmProcLlvmGens dflags h us env ((CmmData _ _) : cmms) count ivars
|
||||||
|
= cmmProcLlvmGens dflags h us env cmms count ivars
|
11
ghc.spec
11
ghc.spec
@ -23,7 +23,7 @@ Url: http://haskell.org/ghc/dist/%{version}/%{name}-%{version}-src.ta
|
|||||||
Summary: The Glorious Glasgow Haskell Compiler
|
Summary: The Glorious Glasgow Haskell Compiler
|
||||||
License: BSD-3-Clause
|
License: BSD-3-Clause
|
||||||
Group: Development/Languages/Other
|
Group: Development/Languages/Other
|
||||||
ExclusiveArch: %{ix86} x86_64
|
ExclusiveArch: %{ix86} x86_64 ppc
|
||||||
|
|
||||||
BuildRequires: ghc-bytestring-devel
|
BuildRequires: ghc-bytestring-devel
|
||||||
BuildRequires: ghc-compiler >= 7.0
|
BuildRequires: ghc-compiler >= 7.0
|
||||||
@ -84,6 +84,10 @@ Patch: ghc-use-system-libffi.patch
|
|||||||
Patch1: ghc-suse-as-needed.patch
|
Patch1: ghc-suse-as-needed.patch
|
||||||
# PATCH-FIX-UPSTREAM Cabal-fix-dynamic-exec-for-TH.patch peter.trommler@ohm-hochschule.de - Fedora patch 10
|
# PATCH-FIX-UPSTREAM Cabal-fix-dynamic-exec-for-TH.patch peter.trommler@ohm-hochschule.de - Fedora patch 10
|
||||||
Patch2: Cabal-fix-dynamic-exec-for-TH.patch
|
Patch2: Cabal-fix-dynamic-exec-for-TH.patch
|
||||||
|
# PATCH-FIX-UPSTREAM ghc-7.6.3-LlvmCodeGen-no-3.3-warning.patch peter.trommler@ohm-hochschule.de - Fedora patch 14: Silence warning about llvm 3.3
|
||||||
|
Patch3: ghc-7.6.3-LlvmCodeGen-no-3.3-warning.patch
|
||||||
|
# PATCH-FIX-UPSTREAM ghc-avoid-empty-llvm-used-definitions.patch peter.trommler@ohm-hochschule.de - Backport of commit db9b63105a54, fixes Haskell trac #7996
|
||||||
|
Patch4: ghc-avoid-empty-llvm-used-definitions.patch
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||||
|
|
||||||
@ -180,6 +184,8 @@ rm -r ghc-tarballs/{mingw,mingw64,perl}
|
|||||||
rm -r ghc-tarballs/libffi
|
rm -r ghc-tarballs/libffi
|
||||||
%patch1 -p1 -b .suse
|
%patch1 -p1 -b .suse
|
||||||
%patch2 -p1 -b .TH
|
%patch2 -p1 -b .TH
|
||||||
|
%patch3 -p1 -b .llvm-version
|
||||||
|
%patch4 -p1 -b .llvm-empty
|
||||||
|
|
||||||
%build
|
%build
|
||||||
# required for patch and patch1
|
# required for patch and patch1
|
||||||
@ -195,7 +201,8 @@ HADDOCK_DOCS = NO
|
|||||||
BUILD_DOCBOOK_HTML = NO
|
BUILD_DOCBOOK_HTML = NO
|
||||||
HSCOLOUR_SRCS = NO
|
HSCOLOUR_SRCS = NO
|
||||||
EOF
|
EOF
|
||||||
./configure --prefix=%{_builddir}/ghc-boot --with-system-libffi
|
./configure --prefix=%{_builddir}/ghc-boot --with-system-libffi \
|
||||||
|
--with-gcc=%{_bindir}/gcc
|
||||||
make %{?_smp_mflags}
|
make %{?_smp_mflags}
|
||||||
make install
|
make install
|
||||||
make clean
|
make clean
|
||||||
|
Loading…
x
Reference in New Issue
Block a user