> great! Can you provide me the precise patches/files that you were using, > or simple the complete source, so I can upload them to unstable?
Here's a simplified patch based on the following two commits: https://git.haskell.org/ghc.git/commit/0bbc2ac6dae9ce2838f23a75a6a989826c06f3f5 https://git.haskell.org/ghc.git/commit/1e8c9b81a819da8eb54405a029fc33a9f5220321 Guessing from the dates in those commits (Apr 2015) a patch similar to this may still be required for 7.10.1, but perhaps not for any release after Apr 2015. The patch seems to work on arm64, applied on top of Debian's 7.8.4-3. Let's hope it doesn't break any other architecture. If it did break armel or armhf I'd try removing the "arm*linux*" pattern from FIND_LD.
diff -ru ghc-7.8.4.orig/aclocal.m4 ghc-7.8.4/aclocal.m4 --- ghc-7.8.4.orig/aclocal.m4 2015-05-01 14:13:33.000000000 +0100 +++ ghc-7.8.4/aclocal.m4 2015-05-03 10:57:44.000000000 +0100 @@ -553,8 +553,11 @@ $3="$$3 -D_HPUX_SOURCE" $5="$$5 -D_HPUX_SOURCE" ;; - arm*) - # On arm, link using gold + arm*linux* | \ + aarch64*linux* ) + # On arm/linux, aarch64/linux, arm/android and aarch64/android, tell + # gcc to link using the gold linker. + # Forcing LD to be ld.gold is done in FIND_LD m4 macro. $3="$$3 -fuse-ld=gold" ;; esac @@ -2071,6 +2074,30 @@ fi ]) +# FIND_LD +# Find the version of `ld` to use. This is used in both in the top level +# configure.ac and in distrib/configure.ac.in. +# +# $1 = the variable to set +# +AC_DEFUN([FIND_LD],[ + FP_ARG_WITH_PATH_GNU_PROG([LD], [ld], [ld]) + case $target in + arm*linux* | \ + aarch64*linux* ) + # Arm and Aarch64 requires use of the binutils ld.gold linker. + # This case should catch at least arm-unknown-linux-gnueabihf, + # arm-linux-androideabi, arm64-unknown-linux and + # aarch64-linux-android + FP_ARG_WITH_PATH_GNU_PROG([LD_GOLD], [ld.gold], [ld.gold]) + $1="$LD_GOLD" + ;; + *) + $1="$LD" + ;; + esac +]) + # FIND_GCC() # -------------------------------- # Finds where gcc is diff -ru ghc-7.8.4.orig/mk/config.mk.in ghc-7.8.4/mk/config.mk.in --- ghc-7.8.4.orig/mk/config.mk.in 2015-05-01 14:13:33.000000000 +0100 +++ ghc-7.8.4/mk/config.mk.in 2015-05-03 10:36:34.000000000 +0100 @@ -176,7 +176,7 @@ # ArchSupportsSMP should be set iff there is support for that arch in # includes/stg/SMP.h -ArchSupportsSMP=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 sparc powerpc arm))) +ArchSupportsSMP=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 sparc powerpc arm aarch64))) GhcWithSMP := $(strip $(if $(filter YESNO, $(ArchSupportsSMP)$(GhcUnregisterised)),YES,NO)) @@ -184,7 +184,7 @@ # has support for this OS/ARCH combination. OsSupportsGHCi=$(strip $(patsubst $(TargetOS_CPP), YES, $(findstring $(TargetOS_CPP), mingw32 cygwin32 linux solaris2 freebsd dragonfly netbsd openbsd darwin kfreebsdgnu))) -ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc sparc sparc64 arm))) +ArchSupportsGHCi=$(strip $(patsubst $(TargetArch_CPP), YES, $(findstring $(TargetArch_CPP), i386 x86_64 powerpc sparc sparc64 arm aarch64))) ifeq "$(OsSupportsGHCi)$(ArchSupportsGHCi)" "YESYES" GhcWithInterpreter=YES