[commit: ghc] master: Use the gold linker for aarch64/linux (#9673) (0bbc2ac)

git at git.haskell.org git at git.haskell.org
Tue Apr 21 23:12:59 UTC 2015


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/0bbc2ac6dae9ce2838f23a75a6a989826c06f3f5/ghc

>---------------------------------------------------------------

commit 0bbc2ac6dae9ce2838f23a75a6a989826c06f3f5
Author: Erik de Castro Lopo <erikd at mega-nerd.com>
Date:   Mon Apr 20 20:22:44 2015 +0000

    Use the gold linker for aarch64/linux (#9673)
    
    Like 32 bit Arm, Aarch64 requires use of the gold linker.
    
    Signed-off-by: Erik de Castro Lopo <erikd at mega-nerd.com>
    
    Test Plan: 'make install' on aarch64, validate elsewhere
    
    Reviewers: rwbarton, bgamari, austin
    
    Subscribers: thomie
    
    Differential Revision: https://phabricator.haskell.org/D858
    
    GHC Trac Issues: #9673


>---------------------------------------------------------------

0bbc2ac6dae9ce2838f23a75a6a989826c06f3f5
 aclocal.m4 | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/aclocal.m4 b/aclocal.m4
index 33a51ba..d6352cf 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -565,9 +565,11 @@ AC_DEFUN([FPTOOLS_SET_C_LD_FLAGS],
         $3="$$3 -D_HPUX_SOURCE"
         $5="$$5 -D_HPUX_SOURCE"
         ;;
-    arm*linux*)
-        # On arm/linux and arm/android, tell gcc to link using the gold linker.
-        # Forcing LD to be ld.gold is done in configre.ac.
+    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
@@ -2093,10 +2095,12 @@ AC_DEFUN([FIND_LLVM_PROG],[
 AC_DEFUN([FIND_LD],[
     FP_ARG_WITH_PATH_GNU_PROG([LD], [ld], [ld])
     case $target in
-        arm*linux*)
-            # Arm requires use of the binutils ld.gold linker.
-            # This case should catch at least arm-unknown-linux-gnueabihf and
-            # arm-linux-androideabi.
+        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"
             ;;



More information about the ghc-commits mailing list