Source: ghc
Version: 9.4.6-1
Severity: normal
Tags: patch
User: debian-sp...@lists.debian.org
Usertags: sparc64
X-Debbugs-Cc: debian-sp...@lists.debian.org

Hello!

When upstream dropped NGC support for SPARC, they also accidentally removed 
build support
for unregisterised builds by removing sparc* and sparc64* from 
m4/ghc_convert_cpu.m4 and
m4/fptools_set_haskell_platform_vars.m4 meaning that building on sparc64 is no 
longer
possible.

The attached patch re-adds sparc and sparc64 to re-enable builds. The problem 
has also been
reported upstream [1].

Thanks,
Adrian

> [1] https://gitlab.haskell.org/ghc/ghc/-/issues/23959

--
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer
`. `'   Physicist
  `-    GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913
Index: ghc-9.4.6/m4/ghc_convert_cpu.m4
===================================================================
--- ghc-9.4.6.orig/m4/ghc_convert_cpu.m4
+++ ghc-9.4.6/m4/ghc_convert_cpu.m4
@@ -68,6 +68,12 @@ case "$1" in
   sh4)
     $2="sh4"
     ;;
+  sparc64*)
+    $2="sparc64"
+    ;;
+  sparc*)
+    $2="sparc"
+    ;;
   vax)
     $2="vax"
     ;;
Index: ghc-9.4.6/m4/fptools_set_haskell_platform_vars.m4
===================================================================
--- ghc-9.4.6.orig/m4/fptools_set_haskell_platform_vars.m4
+++ ghc-9.4.6/m4/fptools_set_haskell_platform_vars.m4
@@ -42,7 +42,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_V
         riscv64)
             test -z "[$]2" || eval "[$]2=ArchRISCV64"
             ;;
-        hppa|hppa1_1|ia64|m68k|nios2|riscv32|rs6000|s390|sh4|vax)
+        hppa|hppa1_1|ia64|m68k|nios2|riscv32|rs6000|s390|sh4|sparc|sparc64|vax)
             test -z "[$]2" || eval "[$]2=ArchUnknown"
             ;;
         *)

Reply via email to