Re: Bug#1124748: ghc: not binNMU safe on armhf?
Ilias Tsitsimpis <[email protected]>
| Newsgroups | gmane.linux.debian.ports.arm |
|---|---|
| Message-ID | <[email protected]> |
Hi Adrian, On Fri, Jan 09, 2026 at 01:59PM, John Paul Adrian Glaubitz wrote: >The attached patch fixes the problem for me. It's not an ideal solution >as it >hardwires 32-bit ARM targets to armv7, but it should give us a rough idea what >the underlying problem is. Unfortunately this patch results in an unregisterised GHC on armhf. I tried to modify more places to fix this (see attached armv7.patch file) but this resulted in a broken build. I also tried disabling the check that GHC does during configuration (see attached remove-check.patch file) and this succeeded. So at least we have this as a backup plan. -- Ilias
armv7.patch
(text/x-diff, 2.1 KB)
Index: ghc-9.10.3/m4/fptools_set_haskell_platform_vars.m4
===================================================================
--- ghc-9.10.3.orig/m4/fptools_set_haskell_platform_vars.m4
+++ ghc-9.10.3/m4/fptools_set_haskell_platform_vars.m4
@@ -23,7 +23,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_V
s390x)
test -z "[$]2" || eval "[$]2=ArchS390X"
;;
- arm)
+ arm*)
GET_ARM_ISA()
test -z "[$]2" || eval "[$]2=\"ArchARM \$ARM_ISA \$ARM_ISA_EXT \$ARM_ABI\""
;;
@@ -196,7 +196,7 @@ AC_DEFUN([GHC_GNU_NONEXEC_STACK],
CFLAGS2="$CFLAGS"
CFLAGS=
case $TargetArch in
- arm)
+ arm*)
dnl See #13937.
progbits="%progbits"
;;
Index: ghc-9.10.3/m4/ghc_convert_cpu.m4
===================================================================
--- ghc-9.10.3.orig/m4/ghc_convert_cpu.m4
+++ ghc-9.10.3/m4/ghc_convert_cpu.m4
@@ -12,7 +12,7 @@ case "$1" in
$2="alpha"
;;
arm*)
- $2="arm"
+ $2="armv7"
;;
hppa1.1*)
$2="hppa1_1"
Index: ghc-9.10.3/m4/ghc_unregisterised.m4
===================================================================
--- ghc-9.10.3.orig/m4/ghc_unregisterised.m4
+++ ghc-9.10.3/m4/ghc_unregisterised.m4
@@ -5,7 +5,7 @@ AC_DEFUN([GHC_UNREGISTERISED],
[
AC_MSG_CHECKING(whether target supports a registerised ABI)
case "$TargetArch" in
- i386|x86_64|powerpc|powerpc64|powerpc64le|s390x|arm|aarch64|riscv64|wasm32|javascript|loongarch64)
+ i386|x86_64|powerpc|powerpc64|powerpc64le|s390x|arm*|aarch64|riscv64|wasm32|javascript|loongarch64)
UnregisterisedDefault=NO
AC_MSG_RESULT([yes])
;;
Index: ghc-9.10.3/mk/project.mk.in
===================================================================
--- ghc-9.10.3.orig/mk/project.mk.in
+++ ghc-9.10.3/mk/project.mk.in
@@ -154,6 +154,6 @@ endif
# Is the stage0 compiler affected by Bug #9439?
GHC_LLVM_AFFECTED_BY_9439 = @GHC_LLVM_AFFECTED_BY_9439@
-ifeq "$(TargetArch_CPP)" "arm"
+ifeq "$(TargetArch_CPP)" "armv7"
ARM_ISA=@ARM_ISA@
endif
remove-check.patch
(text/x-diff, 676 B)
Index: ghc-9.10.3/configure.ac
===================================================================
--- ghc-9.10.3.orig/configure.ac
+++ ghc-9.10.3/configure.ac
@@ -277,13 +277,6 @@ FP_PROG_SH
# Verify that the installed (bootstrap) GHC is capable of generating
# code for the requested build platform.
-if test "$BuildPlatform" != "$bootstrap_target"
-then
- echo "This GHC (${WithGhc}) does not generate code for the build platform"
- echo " GHC target platform : $bootstrap_target"
- echo " Desired build platform : $BuildPlatform"
- exit 1
-fi
dnl ** Do an unregisterised build?
dnl --------------------------------------------------------------