From 011c369f2799eb26c453e61edcfbb62157595f0575ec5dff1b1a8029563b0ac7 Mon Sep 17 00:00:00 2001 From: Peter Trommler Date: Tue, 29 Oct 2013 20:59:14 +0000 Subject: [PATCH] Accepting request 205174 from devel:languages:haskell:platform Fix threaded runtime on 64 bit big endian. Haskell trac #8134. OBS-URL: https://build.opensuse.org/request/show/205174 OBS-URL: https://build.opensuse.org/package/show/devel:languages:haskell/ghc?expand=0&rev=144 --- ghc-fix-infinite-loop-big-endian.patch | 25 +++++++++++++++++++++++++ ghc.changes | 7 +++++++ ghc.spec | 21 +++++++-------------- 3 files changed, 39 insertions(+), 14 deletions(-) create mode 100644 ghc-fix-infinite-loop-big-endian.patch diff --git a/ghc-fix-infinite-loop-big-endian.patch b/ghc-fix-infinite-loop-big-endian.patch new file mode 100644 index 0000000..3ec9caf --- /dev/null +++ b/ghc-fix-infinite-loop-big-endian.patch @@ -0,0 +1,25 @@ +From 0a2e25ea54ab549ce0966ffe0ad40c80a2849032 Mon Sep 17 00:00:00 2001 +From: Gustavo Luiz Duarte +Date: Mon, 28 Oct 2013 13:04:12 +0000 +Subject: Fix infinite loop on 64 bits big endian platforms (Trac #8134) + +--- + rts/STM.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/rts/STM.c b/rts/STM.c +index 6bcb7ba..c4dcb9f 100644 +--- a/rts/STM.c ++++ b/rts/STM.c +@@ -927,7 +927,7 @@ void stmPreGCHook (Capability *cap) { + static volatile StgInt64 max_commits = 0; + + #if defined(THREADED_RTS) +-static volatile StgBool token_locked = FALSE; ++static volatile StgWord token_locked = FALSE; + + static void getTokenBatch(Capability *cap) { + while (cas((void *)&token_locked, FALSE, TRUE) == TRUE) { /* nothing */ } +-- +1.8.3.1 + diff --git a/ghc.changes b/ghc.changes index 5bbd40c..63a4a51 100644 --- a/ghc.changes +++ b/ghc.changes @@ -1,3 +1,10 @@ +------------------------------------------------------------------- +Mon Oct 28 18:24:46 UTC 2013 - peter.trommler@ohm-hochschule.de + +- Add ghc-fix-infinite-loop-big-endian.patch: Fix Haskell trac + #8134 on ppc64. +- Enable threaded runtime on ppc64 + ------------------------------------------------------------------- Tue Sep 24 20:56:45 UTC 2013 - peter.trommler@ohm-hochschule.de diff --git a/ghc.spec b/ghc.spec index 2464997..763fabd 100644 --- a/ghc.spec +++ b/ghc.spec @@ -100,6 +100,8 @@ Patch4: ghc-avoid-empty-llvm-used-definitions.patch Patch5: 0001-Fix-detection-of-library-for-shm-on-openSUSE.patch # PATCH-FIX-UPSTREAM 0001-Delete-spurious-comma-in-configure.ac.patch peter.trommler@ohm-hochschule.de - Fix test for setitimer. Backported patch sent upstream 2013-09-24, Haskell trac #8352 Patch6: 0001-Delete-spurious-comma-in-configure.ac.patch +# PATCH-FIX-UPSTREAM peter.trommler@ohm-hochschule.de - Fix Haskell trac #8134. +Patch7: ghc-fix-infinite-loop-big-endian.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -200,6 +202,7 @@ rm -r ghc-tarballs/libffi %patch4 -p1 -b .llvm-empty %patch5 -p1 -b .shm %patch6 -p1 -b .comma +%patch7 -p1 %build # required for patch and patch1 @@ -217,13 +220,6 @@ GhcLibWays = v %ifarch %{unregisterised_archs} GhcUnregisterised=YES %endif -%ifarch ppc64 -GhcWithNativeCodeGen=NO -SplitObjs=NO -GhcRTSWays := debug -GhcNotThreaded=YES -GhcWithInterpreter=NO -%endif HADDOCK_DOCS = NO BUILD_DOCBOOK_HTML = NO HSCOLOUR_SRCS = NO @@ -245,13 +241,6 @@ GhcLibWays = v %{!?ghc_without_shared:dyn} %{!?without_prof:p} %ifarch %{unregisterised_archs} GhcUnregisterised=YES %endif -%ifarch ppc64 -GhcWithNativeCodeGen=NO -SplitObjs=NO -GhcRTSWays := debug -GhcNotThreaded=YES -GhcWithInterpreter=NO -%endif %if %{defined without_haddock} HADDOCK_DOCS = NO %endif @@ -432,6 +421,10 @@ fi %ghost %{ghcdocbasedir}/libraries/minus.gif %ghost %{ghcdocbasedir}/libraries/plus.gif %endif +%if %{suse_version} >= 1230 +%ghost %{_sysconfdir}/alternatives/hsc2hs +%ghost %{_sysconfdir}/alternatives/runhaskell +%endif %files libraries %defattr(-,root,root,-)