diff -Nru ghc-8.0.2/debian/changelog ghc-8.0.2/debian/changelog --- ghc-8.0.2/debian/changelog 2017-06-30 07:00:47.000000000 +0000 +++ ghc-8.0.2/debian/changelog 2017-07-02 20:14:36.000000000 +0000 @@ -1,3 +1,9 @@ +ghc (8.0.2-5ubuntu3) artful; urgency=medium + + * Really try to use BFD on arm64 + + -- Gianfranco Costamagna Sun, 02 Jul 2017 22:14:36 +0200 + ghc (8.0.2-5ubuntu2) artful; urgency=medium * Revert the previous upload, BFD is not really suitable diff -Nru ghc-8.0.2/debian/patches/bfd-linker-arm64.patch ghc-8.0.2/debian/patches/bfd-linker-arm64.patch --- ghc-8.0.2/debian/patches/bfd-linker-arm64.patch 1970-01-01 00:00:00.000000000 +0000 +++ ghc-8.0.2/debian/patches/bfd-linker-arm64.patch 2017-07-02 20:14:36.000000000 +0000 @@ -0,0 +1,26 @@ +Description: Use BFD on arm64, because the new binutils seems to be not able to link it anymore +Author: Gianfranco Costamagna + +Last-Update: 2017-07-02 + +--- ghc-8.0.2.orig/aclocal.m4 ++++ ghc-8.0.2/aclocal.m4 +@@ -594,7 +594,7 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS], + # On aarch64/linux 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 -Wl,-z,noexecstack" ++ $3="$$3 -fuse-ld=bfd -Wl,-z,noexecstack" + $4="$$4 -z noexecstack" + ;; + +@@ -2043,8 +2043,7 @@ AC_DEFUN([FIND_LLVM_PROG],[ + AC_DEFUN([FIND_LD],[ + FP_ARG_WITH_PATH_GNU_PROG([LD], [ld], [ld]) + case $target in +- arm*linux* | \ +- aarch64*linux* ) ++ arm*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 diff -Nru ghc-8.0.2/debian/patches/series ghc-8.0.2/debian/patches/series --- ghc-8.0.2/debian/patches/series 2017-06-25 19:52:22.000000000 +0000 +++ ghc-8.0.2/debian/patches/series 2017-07-02 20:14:36.000000000 +0000 @@ -8,3 +8,4 @@ compiler-cmm-PprC-sparc-alignment.patch x32-use-native-x86_64-insn.patch osdecommitmemory-compat.patch +bfd-linker-arm64.patch diff -Nru ghc-8.0.2/debian/rules ghc-8.0.2/debian/rules --- ghc-8.0.2/debian/rules 2017-06-30 07:00:46.000000000 +0000 +++ ghc-8.0.2/debian/rules 2017-07-02 20:13:40.000000000 +0000 @@ -53,7 +53,7 @@ echo "HADDOCK_DOCS := YES" >> mk/build.mk echo "EXTRA_HADDOCK_OPTS += --mathjax=file:///usr/share/javascript/mathjax/MathJax.js" >> mk/build.mk echo "XSLTPROC_OPTS += --nonet" >> mk/build.mk -ifneq (,$(filter arm64 armel armhf, $(DEB_HOST_ARCH))) +ifneq (,$(filter armel armhf, $(DEB_HOST_ARCH))) echo "SRC_HC_OPTS += -optl-B/usr/bin/ld.gold" >> mk/build.mk endif ifeq (armhf,$(DEB_HOST_ARCH))