petersen pushed to ghc (master). "use ld.gold for aarch64 and "make -j3" for s390"

notifications at fedoraproject.org notifications at fedoraproject.org
Wed Apr 22 10:06:17 UTC 2015


>From 6bb2991c51da42756a452b8e2c97c0181b71f740 Mon Sep 17 00:00:00 2001
From: Jens Petersen <petersen at redhat.com>
Date: Wed, 22 Apr 2015 19:04:55 +0900
Subject: use ld.gold for aarch64 and "make -j3" for s390


diff --git a/ghc-7.8-arm-use-ld-gold.patch b/ghc-7.8-arm-use-ld-gold.patch
new file mode 100644
index 0000000..46d572f
--- /dev/null
+++ b/ghc-7.8-arm-use-ld-gold.patch
@@ -0,0 +1,42 @@
+armv7 by nomeata: https://ghc.haskell.org/trac/ghc/ticket/8976#comment:12
+arm64 backport of https://ghc.haskell.org/trac/ghc/ticket/9673#comment:28 (erikd)
+
+--- ghc-7.8.4/aclocal.m4.24~	2015-04-01 04:48:39.961193022 -0400
++++ ghc-7.8.4/aclocal.m4	2015-04-01 04:50:19.708203082 -0400
+@@ -553,6 +553,14 @@
+         $3="$$3 -D_HPUX_SOURCE"
+         $5="$$5 -D_HPUX_SOURCE"
+         ;;
++    arm*)
++        # On arm, link using gold
++        $3="$$3 -fuse-ld=gold"
++        ;;
++    aarch64)
++        # On arm, link using gold
++        $3="$$3 -fuse-ld=gold"
++        ;;
+     esac
+ 
+     # If gcc knows about the stack protector, turn it off.
+--- ghc-7.8.4/configure.ac~	2014-12-22 14:08:24.000000000 -0500
++++ ghc-7.8.4/configure.ac	2015-04-22 00:08:54.646110535 -0400
+@@ -587,7 +587,18 @@
+ dnl ** Which ld to use?
+ dnl --------------------------------------------------------------
+ FP_ARG_WITH_PATH_GNU_PROG([LD], [ld], [ld])
+-LdCmd="$LD"
++case $target in
++arm*linux* | aarch64*linux*)
++	# Arm requires use of the binutils ld.gold linker.
++	# This case should catch at least arm-unknown-linux-gnueabihf and
++	# arm-linux-androideabi.
++	FP_ARG_WITH_PATH_GNU_PROG([LD_GOLD], [ld.gold], [ld.gold])
++	LdCmd="$LD_GOLD"
++	;;
++*)
++	LdCmd="$LD"
++	;;
++esac
+ AC_SUBST([LdCmd])
+ 
+ dnl ** Which nm to use?
diff --git a/ghc-7.8-arm7-use-ld-gold-8976.patch b/ghc-7.8-arm7-use-ld-gold-8976.patch
deleted file mode 100644
index 6852db5..0000000
--- a/ghc-7.8-arm7-use-ld-gold-8976.patch
+++ /dev/null
@@ -1,17 +0,0 @@
-Patch by nomeata: https://ghc.haskell.org/trac/ghc/ticket/8976#comment:12
-
-Index: ghc-7.8.3.20141119/aclocal.m4
-===================================================================
---- ghc-7.8.3.20141119.orig/aclocal.m4	2014-12-08 18:49:28.207171714 +0100
-+++ ghc-7.8.3.20141119/aclocal.m4	2014-12-08 19:03:06.815522917 +0100
-@@ -553,6 +553,10 @@
-         $3="$$3 -D_HPUX_SOURCE"
-         $5="$$5 -D_HPUX_SOURCE"
-         ;;
-+    arm*)
-+        # On arm, link using gold
-+        $3="$$3 -fuse-ld=gold"
-+        ;;
-     esac
- 
-     # If gcc knows about the stack protector, turn it off.
diff --git a/ghc.spec b/ghc.spec
index cca6a60..705776a 100644
--- a/ghc.spec
+++ b/ghc.spec
@@ -56,7 +56,7 @@ Patch20: ghc-glibc-2.20_BSD_SOURCE.patch
 Patch21: ghc-arm64.patch
 Patch22: ghc-armv7-VFPv3D16--NEON.patch
 Patch23: ghc-7.8.3-Cabal-install-PATH-warning.patch
-Patch24: ghc-7.8-arm7-use-ld-gold-8976.patch
+Patch24: ghc-7.8-arm-use-ld-gold.patch
 Patch25: ghc-7.8-arm7_saner-linker-opt-handling-9873.patch
 Patch26: ghc-config.mk.in-Enable-SMP-and-GHCi-support-for-Aarch64.patch
 
@@ -276,9 +276,12 @@ rm -r libffi-tarballs
 %patch26 -p1 -b .orig
 %endif
 
+%ifarch armv7hl aarch64
+%patch24 -p1 -b .24~
+%endif
+
 %ifarch armv7hl
 %patch22 -p1 -b .orig
-%patch24 -p1 -b .24~
 %patch25 -p1 -b .25~
 %endif
 
@@ -357,6 +360,7 @@ export LANG=en_US.utf8
 
 echo _smp_mflags is \'%{?_smp_mflags}\'
 # NB for future ghc versions maybe should hardcode max -j4 for all builds
+# (s390 seems ABI unstable under -j4)
 # Though apparently this does not affect 7.10
 MAKE_JOBS=$(echo %{?_smp_mflags} | sed -e "s/^-j//")
 %ifarch %{ix86} x86_64
@@ -370,11 +374,18 @@ if [ -z "$MAKE_JOBS" -o "0$MAKE_JOBS" -le "%{build_minimum_smp}" ]; then
     MAKE_JOBS="%{build_minimum_smp}"
 fi
 %else
+%ifarch s390
+# keep < 4 for s390
+if [ "0$MAKE_JOBS" -ge "4" ]; then
+  MAKE_JOBS=3
+fi
+%else
 # keep < 9 for all other archs
 if [ "0$MAKE_JOBS" -gt "8" ]; then
   MAKE_JOBS=8
 fi
 %endif
+%endif
 
 make ${MAKE_JOBS:+-j$MAKE_JOBS}
 
@@ -575,8 +586,10 @@ fi
 
 
 %changelog
-* Fri Apr 10 2015 Jens Petersen <petersen at redhat.com> - 7.8.4-44
-- turn on SMP and ghci for aarch64 (Erik de Castro Lopo, #1210323)
+* Wed Apr 22 2015 Jens Petersen <petersen at redhat.com> - 7.8.4-44
+- use ld.gold on aarch64 like for armv7 (Erik de Castro Lopo, #1195231)
+- turn on SMP and ghci for aarch64 (Erik de Castro Lopo, #1195231)
+- use "make -j3" for s390 (#1212374)
 
 * Mon Mar 30 2015 Jens Petersen <petersen at redhat.com> - 7.8.4-43
 - aarch64 production build
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/ghc.git/commit/?h=master&id=6bb2991c51da42756a452b8e2c97c0181b71f740


More information about the scm-commits mailing list