[Git][haskell-team/DHG_packages][experimental] 4 commits: ghc: Re-introduce 'fix-llvm-armel' patch
Ilias Tsitsimpis (@iliastsi)
gitlab at salsa.debian.org
Fri Jul 7 18:13:34 BST 2023
Ilias Tsitsimpis pushed to branch experimental at Debian Haskell Group / DHG_packages
Commits:
4f82eae3 by Ilias Tsitsimpis at 2023-07-05T18:23:09+03:00
ghc: Re-introduce 'fix-llvm-armel' patch
- - - - -
732de651 by Ilias Tsitsimpis at 2023-07-05T18:24:49+03:00
ghc: Drop 'Disable-unboxed-arrays' patch
- - - - -
5ffa2595 by Ilias Tsitsimpis at 2023-07-07T17:59:25+03:00
ghc: Build unregisterised on riscv64
- - - - -
b2d26315 by Ilias Tsitsimpis at 2023-07-07T19:12:24+03:00
ghc: Use libatomic in ghc-prim library
- - - - -
6 changed files:
- p/ghc/debian/changelog
- − p/ghc/debian/patches/Disable-unboxed-arrays.patch
- + p/ghc/debian/patches/fix-llvm-armel
- + p/ghc/debian/patches/ghc-prim-libatomic
- p/ghc/debian/patches/series
- p/ghc/debian/rules
Changes:
=====================================
p/ghc/debian/changelog
=====================================
@@ -1,3 +1,12 @@
+ghc (9.4.5-1~exp2) experimental; urgency=medium
+
+ * Re-introduce 'fix-llvm-armel' patch
+ * Drop 'Disable-unboxed-arrays' patch, not needed any more
+ * Build unregisterised on riscv64
+ * Use libatomic in ghc-prim library
+
+ -- Ilias Tsitsimpis <iliastsi at debian.org> Fri, 07 Jul 2023 19:12:19 +0300
+
ghc (9.4.5-1~exp1) experimental; urgency=medium
[ Gianfranco Costamagna ]
=====================================
p/ghc/debian/patches/Disable-unboxed-arrays.patch deleted
=====================================
@@ -1,13 +0,0 @@
-Origin: https://gitlab.haskell.org/ghc/ghc/issues/15411#note_215852
-Index: ghc-8.6.1/libraries/containers/include/containers.h
-===================================================================
---- ghc-8.6.1.orig/libraries/containers/containers/include/containers.h
-+++ ghc-8.6.1/libraries/containers/containers/include/containers.h
-@@ -35,7 +35,6 @@
-
- #ifdef __GLASGOW_HASKELL__
- # define USE_ST_MONAD 1
--# define USE_UNBOXED_ARRAYS 1
- #endif
-
- #endif
=====================================
p/ghc/debian/patches/fix-llvm-armel
=====================================
@@ -0,0 +1,28 @@
+Description: Fix LLVM error on armel
+ GHC 8.10 fails to build on armel with the following error:
+
+ LLVM ERROR: unable to allocate function argument #8
+ PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
+ Stack dump:
+ 0. Program arguments: llc-12 -O2 -enable-tbaa -relocation-model=pic -mcpu=arm7tdmi -mattr=+soft-float,-vfp2,-vfp2sp,-vfp3,-vfp3d16,-vfp3d16sp,-vfp3sp,-fp16,-vfp4,-vfp4d16,-vfp4d16sp,-vfp4sp,-fp-armv8,-fp-armv8d16,-fp-armv8d16sp,-fp-armv8sp,-fullfp16,-fp64,-d32,-neon,-crypto,-dotprod,-fp16fml,-bf16,-mve,-mve.fp,-fpregs,+strict-align /tmp/ghc5537_0/ghc_6.bc -o /tmp/ghc5537_0/ghc_7.lm_s
+ 1. Running pass 'Function Pass Manager' on module '/tmp/ghc20177_0/ghc_6.bc'.
+ 2. Running pass 'ARM Instruction Selection' on function '@"stg_gc_f1$def"'
+ `llc-12' failed in phase `LLVM Compiler'. (Exit code: -6)
+ make[3]: *** [rts/ghc.mk:325: rts/dist/build/HeapStackCheck.o] Error 1
+
+ Surprisingly, reverting commit 4540bbe2811e860f35de6e67ab2f0040592fd3a5 fixes
+ thie error.
+Author: Ilias Tsitsimpis <iliastsi at debian.org>
+Bug: https://gitlab.haskell.org/ghc/ghc/-/issues/20285
+Index: b/compiler/CodeGen.Platform.h
+===================================================================
+--- a/compiler/CodeGen.Platform.h
++++ b/compiler/CodeGen.Platform.h
+@@ -6,6 +6,7 @@ import GHC.Utils.Panic.Plain
+ #endif
+ import GHC.Platform.Reg
+
++#include "ghcautoconf.h"
+ #include "MachRegs.h"
+
+ #if defined(MACHREGS_i386) || defined(MACHREGS_x86_64)
=====================================
p/ghc/debian/patches/ghc-prim-libatomic
=====================================
@@ -0,0 +1,217 @@
+Description: Use libatomic in ghc-prim
+ Configure the libraries/ghc-prim/ghc-prim.cabal file to use
+ libatomic if needed, same way as rts/rts.cabal does.
+Author: Ilias Tsitsimpis <iliastsi at debian.org>
+
+Index: b/libraries/ghc-prim/ghc-prim.cabal
+===================================================================
+--- a/libraries/ghc-prim/ghc-prim.cabal
++++ /dev/null
+@@ -1,92 +0,0 @@
+-cabal-version: 2.2
+-name: ghc-prim
+-version: 0.9.0
+--- NOTE: Don't forget to update ./changelog.md
+-license: BSD-3-Clause
+-license-file: LICENSE
+-category: GHC
+-maintainer: libraries at haskell.org
+-bug-reports: https://gitlab.haskell.org/ghc/ghc/issues/new
+-synopsis: GHC primitives
+-build-type: Custom
+-description:
+- This package contains the primitive types and operations supplied by GHC.
+-
+-extra-source-files: changelog.md
+-
+-source-repository head
+- type: git
+- location: https://gitlab.haskell.org/ghc/ghc.git
+- subdir: libraries/ghc-prim
+-
+-custom-setup
+- setup-depends: base >= 4 && < 5, process, filepath, directory, Cabal >= 1.23 && < 3.9
+-
+-Library
+- default-language: Haskell2010
+- other-extensions:
+- BangPatterns
+- CPP
+- DeriveGeneric
+- MagicHash
+- MultiParamTypeClasses
+- NoImplicitPrelude
+- StandaloneDeriving
+- Trustworthy
+- TypeFamilies
+- UnboxedTuples
+- UnliftedFFITypes
+-
+- build-depends: rts == 1.0.*
+-
+- exposed-modules:
+- GHC.CString
+- GHC.Classes
+- GHC.Debug
+- GHC.Magic
+- GHC.Magic.Dict
+- GHC.Prim.Ext
+- GHC.Prim.Panic
+- GHC.Prim.Exception
+- GHC.Prim.PtrEq
+- GHC.PrimopWrappers
+- GHC.Tuple
+- GHC.Types
+-
+- virtual-modules:
+- GHC.Prim
+-
+- -- OS Specific
+- if os(windows)
+- -- Windows requires some extra libraries for linking because the RTS
+- -- is no longer re-exporting them (see #11223)
+- -- ucrt: standard C library. The RTS will automatically include this,
+- -- but is added for completeness.
+- -- mingw32: Unfortunately required because of a resource leak between
+- -- mingwex and mingw32. the __math_err symbol is defined in
+- -- mingw32 which is required by mingwex.
+- -- user32: provides access to apis to modify user components (UI etc)
+- -- on Windows. Required because of mingw32.
+- extra-libraries: user32, mingw32, ucrt
+-
+- if os(linux)
+- -- we need libm, but for musl and other's we might need libc, as libm
+- -- is just an empty shell.
+- extra-libraries: c, m
+-
+- c-sources:
+- cbits/atomic.c
+- cbits/bswap.c
+- cbits/bitrev.c
+- cbits/clz.c
+- cbits/ctz.c
+- cbits/debug.c
+- cbits/longlong.c
+- cbits/pdep.c
+- cbits/pext.c
+- cbits/popcnt.c
+- cbits/word2float.c
+-
+- -- We need to set the unit ID to ghc-prim (without a version number)
+- -- as it's magic.
+- ghc-options: -this-unit-id ghc-prim
+Index: b/libraries/ghc-prim/ghc-prim.cabal.in
+===================================================================
+--- /dev/null
++++ b/libraries/ghc-prim/ghc-prim.cabal.in
+@@ -0,0 +1,98 @@
++cabal-version: 2.2
++name: ghc-prim
++version: 0.9.0
++-- NOTE: Don't forget to update ./changelog.md
++license: BSD-3-Clause
++license-file: LICENSE
++category: GHC
++maintainer: libraries at haskell.org
++bug-reports: https://gitlab.haskell.org/ghc/ghc/issues/new
++synopsis: GHC primitives
++build-type: Custom
++description:
++ This package contains the primitive types and operations supplied by GHC.
++
++extra-source-files: changelog.md
++
++source-repository head
++ type: git
++ location: https://gitlab.haskell.org/ghc/ghc.git
++ subdir: libraries/ghc-prim
++
++flag need-atomic
++ default: @CabalNeedLibatomic@
++
++custom-setup
++ setup-depends: base >= 4 && < 5, process, filepath, directory, Cabal >= 1.23 && < 3.9
++
++Library
++ default-language: Haskell2010
++ other-extensions:
++ BangPatterns
++ CPP
++ DeriveGeneric
++ MagicHash
++ MultiParamTypeClasses
++ NoImplicitPrelude
++ StandaloneDeriving
++ Trustworthy
++ TypeFamilies
++ UnboxedTuples
++ UnliftedFFITypes
++
++ build-depends: rts == 1.0.*
++
++ exposed-modules:
++ GHC.CString
++ GHC.Classes
++ GHC.Debug
++ GHC.Magic
++ GHC.Magic.Dict
++ GHC.Prim.Ext
++ GHC.Prim.Panic
++ GHC.Prim.Exception
++ GHC.Prim.PtrEq
++ GHC.PrimopWrappers
++ GHC.Tuple
++ GHC.Types
++
++ virtual-modules:
++ GHC.Prim
++
++ -- OS Specific
++ if os(windows)
++ -- Windows requires some extra libraries for linking because the RTS
++ -- is no longer re-exporting them (see #11223)
++ -- ucrt: standard C library. The RTS will automatically include this,
++ -- but is added for completeness.
++ -- mingw32: Unfortunately required because of a resource leak between
++ -- mingwex and mingw32. the __math_err symbol is defined in
++ -- mingw32 which is required by mingwex.
++ -- user32: provides access to apis to modify user components (UI etc)
++ -- on Windows. Required because of mingw32.
++ extra-libraries: user32, mingw32, ucrt
++
++ if os(linux)
++ -- we need libm, but for musl and other's we might need libc, as libm
++ -- is just an empty shell.
++ extra-libraries: c, m
++
++ if flag(need-atomic)
++ extra-libraries: atomic
++
++ c-sources:
++ cbits/atomic.c
++ cbits/bswap.c
++ cbits/bitrev.c
++ cbits/clz.c
++ cbits/ctz.c
++ cbits/debug.c
++ cbits/longlong.c
++ cbits/pdep.c
++ cbits/pext.c
++ cbits/popcnt.c
++ cbits/word2float.c
++
++ -- We need to set the unit ID to ghc-prim (without a version number)
++ -- as it's magic.
++ ghc-options: -this-unit-id ghc-prim
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -1236,6 +1236,7 @@ dnl When adding things to this list be s
+ dnl Rules.Configure.configureResults list.
+ AC_CONFIG_FILES(
+ [ rts/rts.cabal
++ libraries/ghc-prim/ghc-prim.cabal
+ compiler/ghc.cabal
+ ghc/ghc-bin.cabal
+ utils/runghc/runghc.cabal
=====================================
p/ghc/debian/patches/series
=====================================
@@ -10,3 +10,5 @@ haddock-remove-googleapis-fonts
separate-docs
build-fix-hs-constants.patch
fix-index-html-removal
+fix-llvm-armel
+ghc-prim-libatomic
=====================================
p/ghc/debian/rules
=====================================
@@ -39,7 +39,7 @@ export GHC=$(firstword $(shell bash -c "type -p ghc"))
DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/
-ifneq (,$(filter i386 powerpcspe x32 s390x, $(DEB_HOST_ARCH)))
+ifneq (,$(filter i386 powerpcspe x32 s390x riscv64, $(DEB_HOST_ARCH)))
# From GHC 8.10 and later, native code generator support for legacy x87
# floating point coprocessor has been removed. GHC now only support floating
# point via SSE2. This causes a baseline violation on Debian for i386 where
@@ -94,10 +94,6 @@ endif
ifeq (armhf,$(DEB_HOST_ARCH))
echo "SRC_HC_OPTS += -D__ARM_PCS_VFP" >> mk/build.mk
endif
-ifeq (big, $(DEB_TARGET_ARCH_ENDIAN))
- # See https://gitlab.haskell.org/ghc/ghc/issues/16998
- patch -p1 < debian/patches/Disable-unboxed-arrays.patch
-endif
ifneq (,$(filter powerpcspe x32 s390x, $(DEB_HOST_ARCH)))
# From Fedora
patch -p1 < debian/patches/ghc-warnings.mk-CC-Wall.patch
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/aab4b16538a7f7f14a50203c533fedced48e39e1...b2d26315ff556c7f2d5c73dbb06c587c5d4c68c6
--
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/aab4b16538a7f7f14a50203c533fedced48e39e1...b2d26315ff556c7f2d5c73dbb06c587c5d4c68c6
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/20230707/866b4c89/attachment-0001.htm>
More information about the Pkg-haskell-commits
mailing list