[Git][haskell-team/DHG_packages][hadrian] 4 commits: hadrian: Disable threaded RTS
Ilias Tsitsimpis (@iliastsi)
gitlab at salsa.debian.org
Tue Sep 26 19:43:30 BST 2023
Ilias Tsitsimpis pushed to branch hadrian at Debian Haskell Group / DHG_packages
Commits:
ada0968f by Ilias Tsitsimpis at 2023-09-25T18:41:18+03:00
hadrian: Disable threaded RTS
- - - - -
f8a0f579 by Ilias Tsitsimpis at 2023-09-26T21:40:07+03:00
ghc: Build registerised on s390x and riscv64
- - - - -
f57a3d00 by Ilias Tsitsimpis at 2023-09-26T21:40:42+03:00
ghc: Backport patch to fix hs_cmpxchg64
- - - - -
12c986bd by Ilias Tsitsimpis at 2023-09-26T21:41:59+03:00
ghc: Remove obsolete patch
- - - - -
11 changed files:
- p/ghc/debian/changelog
- p/ghc/debian/control
- − p/ghc/debian/patches/build-fix-hs-constants.patch
- + p/ghc/debian/patches/fix-hs_cmpxchg64
- p/ghc/debian/patches/series
- p/ghc/debian/rules
- p/haskell-hadrian/debian/changelog
- p/haskell-hadrian/debian/patches/hadrian-haddock-opts
- − p/haskell-hadrian/debian/patches/newer-cabal
- p/haskell-hadrian/debian/patches/series
- p/haskell-hadrian/debian/rules
Changes:
=====================================
p/ghc/debian/changelog
=====================================
@@ -6,6 +6,7 @@ ghc (9.4.7-1~exp1) UNRELEASED; urgency=medium
* Pass '-optcggc-min-expand=10' when building for hppa (Closes: #1050879)
* Add patch to restore minimal build support for sparc and
sparc64 (Closes: #1052142)
+ * Build registerised on s390x and riscv64
-- Ilias Tsitsimpis <iliastsi at debian.org> Sun, 27 Aug 2023 12:33:23 +0300
=====================================
p/ghc/debian/control
=====================================
@@ -15,7 +15,7 @@ Build-Depends:
ghc:native (>= 9.0),
hadrian:native (>= 9.4) <!pkg.ghc.nohadrian>,
hadrian:native (<< 9.5) <!pkg.ghc.nohadrian>,
- llvm-15 [armel armhf],
+ llvm-15 [armel armhf s390x riscv64],
libgmp-dev,
libffi-dev,
libncurses-dev,
@@ -32,7 +32,7 @@ Vcs-Browser: https://salsa.debian.org/haskell-team/DHG_packages/tree/master/p/gh
Package: ghc
Architecture: any
Depends:
- llvm-15 [armel armhf],
+ llvm-15 [armel armhf s390x riscv64],
gcc,
libgmp-dev,
libffi-dev,
=====================================
p/ghc/debian/patches/build-fix-hs-constants.patch deleted
=====================================
@@ -1,25 +0,0 @@
-Origin: https://gitlab.haskell.org/ghc/ghc/-/issues/20287#note_422320
-Description: Fix build on all architectures.
- exited with an error:
- ghc: panic! (the 'impossible' happened)
- (GHC version 9.2.0.20210821:
- Couldn't find #define HS_CONSTANTS " in
-Index: b/compiler/GHC/Unit/State.hs
-===================================================================
---- a/compiler/GHC/Unit/State.hs
-+++ b/compiler/GHC/Unit/State.hs
-@@ -661,7 +661,13 @@ initUnits logger dflags cached_dbs home_
- -- really need to use the platform constants but they have not been loaded.
- case lookupUnitId unit_state rtsUnitId of
- Nothing -> return Nothing
-- Just info -> lookupPlatformConstants (fmap ST.unpack (unitIncludeDirs info))
-+ Just info ->
-+ let
-+ p :: String
-+ p = topDir dflags ++ "/include"
-+ ps :: [String]
-+ ps = fmap ST.unpack (unitIncludeDirs info)
-+ in lookupPlatformConstants (p : ps)
-
- return (dbs,unit_state,home_unit,mconstants)
-
=====================================
p/ghc/debian/patches/fix-hs_cmpxchg64
=====================================
@@ -0,0 +1,39 @@
+commit 9fa545722f9151781344446dd5501db38cb90dd1
+Author: Cheng Shao <terrorjack at type.dance>
+Date: Mon Feb 27 19:11:27 2023 +0000
+
+ ghc-prim: fix hs_cmpxchg64 function prototype
+
+ hs_cmpxchg64 must return a StgWord64, otherwise incorrect runtime
+ results of 64-bit MO_Cmpxchg will appear in 32-bit unregisterised
+ builds, which go unnoticed at compile-time due to C implicit casting
+ in .hc files.
+
+Index: b/libraries/ghc-prim/cbits/atomic.c
+===================================================================
+--- a/libraries/ghc-prim/cbits/atomic.c
++++ b/libraries/ghc-prim/cbits/atomic.c
+@@ -308,8 +308,8 @@ hs_cmpxchg32(StgWord x, StgWord old, Stg
+ return __sync_val_compare_and_swap((volatile StgWord32 *) x, (StgWord32) old, (StgWord32) new);
+ }
+
+-extern StgWord hs_cmpxchg64(StgWord x, StgWord64 old, StgWord64 new);
+-StgWord
++extern StgWord64 hs_cmpxchg64(StgWord x, StgWord64 old, StgWord64 new);
++StgWord64
+ hs_cmpxchg64(StgWord x, StgWord64 old, StgWord64 new)
+ {
+ return __sync_val_compare_and_swap((volatile StgWord64 *) x, old, new);
+Index: b/rts/include/stg/Prim.h
+===================================================================
+--- a/rts/include/stg/Prim.h
++++ b/rts/include/stg/Prim.h
+@@ -41,7 +41,7 @@ StgWord64 hs_atomic_xor64(StgWord x, Stg
+ StgWord hs_cmpxchg8(StgWord x, StgWord old, StgWord new_);
+ StgWord hs_cmpxchg16(StgWord x, StgWord old, StgWord new_);
+ StgWord hs_cmpxchg32(StgWord x, StgWord old, StgWord new_);
+-StgWord hs_cmpxchg64(StgWord x, StgWord64 old, StgWord64 new_);
++StgWord64 hs_cmpxchg64(StgWord x, StgWord64 old, StgWord64 new_);
+ StgWord hs_atomicread8(StgWord x);
+ StgWord hs_atomicread16(StgWord x);
+ StgWord hs_atomicread32(StgWord x);
=====================================
p/ghc/debian/patches/series
=====================================
@@ -5,7 +5,6 @@ x32-use-native-x86_64-insn.patch
kfreebsd-aclocal.m4
local-mathjax
haddock-remove-googleapis-fonts
-build-fix-hs-constants.patch
fix-llvm-armel
use-unbundled-sphinx-rtd-theme
newer-llvm
@@ -18,3 +17,4 @@ fix-cross-compilation
hadrian-no-pkg-recache
sparc-support
hadrian-disable-threaded
+fix-hs_cmpxchg64
=====================================
p/ghc/debian/rules
=====================================
@@ -55,7 +55,7 @@ endif
# floating point coprocessor has been removed. GHC now only support floating
# point via SSE2. This causes a baseline violation on Debian for i386 where
# there is no SSE support. Fallback to unregisterised builds on i386.
-ifneq (,$(filter i386 powerpcspe x32 s390x riscv64, $(DEB_HOST_ARCH)))
+ifneq (,$(filter i386 powerpcspe x32, $(DEB_HOST_ARCH)))
EXTRA_CONFIGURE_FLAGS += --enable-unregisterised
endif
@@ -74,7 +74,7 @@ ifneq (,$(filter armhf, $(DEB_HOST_ARCH)))
EXTRA_HADRIAN_FLAGS += "*.*.ghc.hs.opts += -D__ARM_PCS_VFP"
endif
-ifneq (,$(filter i386 mips mipsel s390x hppa, $(DEB_HOST_ARCH)))
+ifneq (,$(filter i386 mips mipsel hppa, $(DEB_HOST_ARCH)))
EXTRA_HADRIAN_FLAGS += "*.*.ghc.hs.opts += -optc--param -optcggc-min-expand=10"
endif
=====================================
p/haskell-hadrian/debian/changelog
=====================================
@@ -1,4 +1,4 @@
-haskell-hadrian (9.4.6-1) UNRELEASED; urgency=low
+haskell-hadrian (9.4.7-1) UNRELEASED; urgency=low
* Initial release
=====================================
p/haskell-hadrian/debian/patches/hadrian-haddock-opts
=====================================
@@ -4,9 +4,11 @@ Description: Pass 'mathjax' to Haddock
Author: Ilias Tsitsimpis <iliastsi at debian.org>
Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/23625
+Index: b/src/Settings/Builders/Haddock.hs
+===================================================================
--- a/src/Settings/Builders/Haddock.hs
+++ b/src/Settings/Builders/Haddock.hs
-@@ -32,6 +32,7 @@
+@@ -32,6 +32,7 @@ haddockBuilderArgs = mconcat
, arg "-o", arg $ takeDirectory output
, arg "-t", arg "Haskell Hierarchical Libraries"
, arg "-p", arg "libraries/prologue.txt"
@@ -14,7 +16,7 @@ Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/23625
, pure [ "--read-interface="
++ (takeFileName . takeDirectory) haddock
++ "," ++ haddock | haddock <- inputs ] ]
-@@ -60,6 +61,7 @@
+@@ -60,6 +61,7 @@ haddockBuilderArgs = mconcat
, arg "--hyperlinked-source"
, arg "--hoogle"
, arg "--quickjump"
=====================================
p/haskell-hadrian/debian/patches/newer-cabal deleted
=====================================
@@ -1,25 +0,0 @@
---- a/hadrian.cabal
-+++ b/hadrian.cabal
-@@ -147,7 +147,7 @@
- , BangPatterns
- other-extensions: MultiParamTypeClasses
- , TypeFamilies
-- build-depends: Cabal >= 3.2 && < 3.7
-+ build-depends: Cabal >= 3.2 && < 3.9
- , base >= 4.8 && < 5
- , bytestring >= 0.10 && < 0.12
- , containers >= 0.5 && < 0.7
---- a/src/Hadrian/Haskell/Cabal/Parse.hs
-+++ b/src/Hadrian/Haskell/Cabal/Parse.hs
-@@ -23,7 +23,11 @@
- import qualified Distribution.Package as C
- import qualified Distribution.PackageDescription as C
- import qualified Distribution.PackageDescription.Configuration as C
-+#if MIN_VERSION_Cabal(3,8,0)
-+import qualified Distribution.Simple.PackageDescription as C
-+#else
- import qualified Distribution.PackageDescription.Parsec as C
-+#endif
- import qualified Distribution.Simple.Compiler as C
- import qualified Distribution.Simple.Program.Db as C
- import qualified Distribution.Simple as C
=====================================
p/haskell-hadrian/debian/patches/series
=====================================
@@ -1,3 +1,2 @@
-newer-cabal
hadrian-haddock-opts
hadrian-iserv
=====================================
p/haskell-hadrian/debian/rules
=====================================
@@ -2,7 +2,7 @@
# Tests require having the full GHC source code
DEB_ENABLE_TESTS = no
-DEB_SETUP_GHC_CONFIGURE_ARGS += -f-selftest
+DEB_SETUP_GHC_CONFIGURE_ARGS += -f-selftest -f-threaded
include /usr/share/cdbs/1/rules/debhelper.mk
include /usr/share/cdbs/1/class/hlibrary.mk
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/cc3df95a78614864f430295b8f2bb6362aa7f0c2...12c986bddd2af50748c4932bdb0a206f867d1deb
--
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/cc3df95a78614864f430295b8f2bb6362aa7f0c2...12c986bddd2af50748c4932bdb0a206f867d1deb
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20230926/855b266c/attachment-0001.htm>
More information about the Pkg-haskell-commits
mailing list