[Git][haskell-team/DHG_packages][experimental] 2 commits: ghc: Drop support for armel

Ilias Tsitsimpis (@iliastsi) gitlab at salsa.debian.org
Mon Sep 29 15:16:07 BST 2025



Ilias Tsitsimpis pushed to branch experimental at Debian Haskell Group / DHG_packages


Commits:
77ae7bc3 by Ilias Tsitsimpis at 2025-09-29T14:34:01+03:00
ghc: Drop support for armel

Remove patch targeted for armel, since armel is not a supported
architecture any more.

Upstream has refused to merge this patch (see
https://gitlab.haskell.org/ghc/ghc/-/issues/20285). Remove it to avoid
causing issues to other architectures.

- - - - -
77ab9c27 by Ilias Tsitsimpis at 2025-09-29T14:37:42+03:00
ghc: Add dependency on clang

GHC now uses clang as an assembler when using the LLVM backend
(see https://gitlab.haskell.org/ghc/ghc/-/commit/ab533e711e).

- - - - -


8 changed files:

- p/ghc/debian/changelog
- p/ghc/debian/control
- p/ghc/debian/patches/allow-setting-llvm-program
- − p/ghc/debian/patches/fix-llvm-armel
- p/ghc/debian/patches/hadrian-bootstrap-plan
- p/ghc/debian/patches/hadrian-unreg-template-haskell
- p/ghc/debian/patches/series
- p/ghc/debian/rules


Changes:

=====================================
p/ghc/debian/changelog
=====================================
@@ -1,3 +1,10 @@
+ghc (9.10.3-1~exp2) experimental; urgency=medium
+
+  * Drop support for armel
+  * Add dependency on clang
+
+ -- Ilias Tsitsimpis <iliastsi at debian.org>  Mon, 29 Sep 2025 13:28:07 +0300
+
 ghc (9.10.3-1~exp1) experimental; urgency=medium
 
   * New upstream release


=====================================
p/ghc/debian/control
=====================================
@@ -18,6 +18,7 @@ Build-Depends:
   hadrian:native (>= 9.10.3~) <!pkg.ghc.nohadrian>,
   hadrian:native (<< 9.10.4~) <!pkg.ghc.nohadrian>,
   llvm-19 [armel armhf s390x riscv64 loong64],
+  clang-19 [armel armhf s390x riscv64 loong64],
   libgmp-dev,
   libffi-dev,
   libncurses-dev,
@@ -36,6 +37,7 @@ Package: ghc
 Architecture: any
 Depends:
   llvm-19 [armel armhf s390x riscv64 loong64],
+  clang-19 [armel armhf s390x riscv64 loong64],
   binutils-gold [armel armhf],
   gcc,
   libgmp-dev,
@@ -60,7 +62,7 @@ Provides:
   ${haddock:Provides}
 Replaces: ${conflicting-devs}
 Breaks: ${conflicting-devs}
-Suggests: perl, ghc-prof, ghc-doc, llvm-19
+Suggests: perl, ghc-prof, ghc-doc, llvm-19, clang-19
 Description: The Glasgow Haskell Compilation system
  The Glorious Glasgow Haskell Compilation system (GHC) is a compiler for
  Haskell.


=====================================
p/ghc/debian/patches/allow-setting-llvm-program
=====================================
@@ -7,7 +7,7 @@ Index: b/configure.ac
 ===================================================================
 --- a/configure.ac
 +++ b/configure.ac
-@@ -523,14 +523,18 @@ AC_SUBST([ConfiguredEmsdkVersion])
+@@ -523,21 +523,27 @@ AC_SUBST([ConfiguredEmsdkVersion])
  dnl ** Which LLVM llc to use?
  dnl --------------------------------------------------------------
  AC_ARG_VAR(LLC,[Use as the path to LLVM's llc [default=autodetect]])
@@ -28,11 +28,21 @@ Index: b/configure.ac
  OptCmd="$OPT"
  AC_SUBST([OptCmd])
  
+ dnl ** Which LLVM assembler to use?
+ dnl --------------------------------------------------------------
+ AC_ARG_VAR(LLVMAS,[Use as the path to LLVM's assembler (typically clang) [default=autodetect]])
+-FIND_LLVM_PROG([LLVMAS], [clang], [$LlvmMinVersion], [$LlvmMaxVersion])
++if test -z "$LLVMAS"; then
++  FIND_LLVM_PROG([LLVMAS], [clang], [$LlvmMinVersion], [$LlvmMaxVersion])
++fi
+ LlvmAsCmd="$LLVMAS"
+ AC_SUBST([LlvmAsCmd])
+ 
 Index: b/distrib/configure.ac.in
 ===================================================================
 --- a/distrib/configure.ac.in
 +++ b/distrib/configure.ac.in
-@@ -184,14 +184,18 @@ LlvmMaxVersion=@LlvmMaxVersion@
+@@ -184,21 +184,27 @@ LlvmMaxVersion=@LlvmMaxVersion@
  dnl ** Which LLVM llc to use?
  dnl --------------------------------------------------------------
  AC_ARG_VAR(LLC,[Use as the path to LLVM's llc [default=autodetect]])
@@ -53,3 +63,13 @@ Index: b/distrib/configure.ac.in
  OptCmd="$OPT"
  AC_SUBST([OptCmd])
  
+ dnl ** Which LLVM assembler to use?
+ dnl --------------------------------------------------------------
+ AC_ARG_VAR(LLVMAS,[Use as the path to LLVM's assembler (typically clang) [default=autodetect]])
+-FIND_LLVM_PROG([LLVMAS], [clang], [$LlvmMinVersion], [$LlvmMaxVersion])
++if test -z "$LLVMAS"; then
++  FIND_LLVM_PROG([LLVMAS], [clang], [$LlvmMinVersion], [$LlvmMaxVersion])
++fi
+ LlvmAsCmd="$LLVMAS"
+ AC_SUBST([LlvmAsCmd])
+ 


=====================================
p/ghc/debian/patches/fix-llvm-armel deleted
=====================================
@@ -1,28 +0,0 @@
-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/hadrian-bootstrap-plan
=====================================
@@ -1,3 +1,5 @@
+Index: b/hadrian/bootstrap/plan-bootstrap-9_6_6.json
+===================================================================
 --- /dev/null
 +++ b/hadrian/bootstrap/plan-bootstrap-9_6_6.json
 @@ -0,0 +1,296 @@


=====================================
p/ghc/debian/patches/hadrian-unreg-template-haskell
=====================================
@@ -6,9 +6,11 @@ Date:   Mon Apr 29 12:13:00 2024 +0100
     
     A potential fix for #24737
 
+Index: b/hadrian/src/Rules/Compile.hs
+===================================================================
 --- a/hadrian/src/Rules/Compile.hs
 +++ b/hadrian/src/Rules/Compile.hs
-@@ -218,6 +218,9 @@
+@@ -218,6 +218,9 @@ compileHsObjectAndHi rs objpath = do
    ctxPath <- contextPath ctx
    (src, deps) <- lookupDependencies (ctxPath -/- ".dependencies") objpath
    need (src:deps)


=====================================
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
-fix-llvm-armel
 use-unbundled-sphinx-rtd-theme
 hadrian-haddock-opts
 hadrian-relpath


=====================================
p/ghc/debian/rules
=====================================
@@ -129,8 +129,8 @@ EXTRA_CONFIGURE_FLAGS += --with-system-libffi
 # If we don't set these, then the default value (llc / opt) will not work
 # on architectures where the default llc/opt version is different than
 # one of the supported versions.
-EXTRA_CONFIGURE_FLAGS += LLC=llc-19 OPT=opt-19
-EXTRA_INSTALL_CONFIGURE_FLAGS += LLC=llc-19 OPT=opt-19
+EXTRA_CONFIGURE_FLAGS += LLC=llc-19 OPT=opt-19 LLVMAS=clang-19
+EXTRA_INSTALL_CONFIGURE_FLAGS += LLC=llc-19 OPT=opt-19 LLVMAS=clang-19
 
 
 %:



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/5141bf78ba342e188f364360f2062165f55eaa91...77ab9c273abb01d77a795c660231a95a11438b5d

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/compare/5141bf78ba342e188f364360f2062165f55eaa91...77ab9c273abb01d77a795c660231a95a11438b5d
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/20250929/6b3c332b/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list