[ghc] avoid actually running aclocal (for +d16) by using hard float patch closer to Ubuntu

Jens Petersen petersen at fedoraproject.org
Fri Apr 27 01:59:11 UTC 2012


commit deef098bfc07589153ae9115e2a9eb220498853b
Author: Jens Petersen <petersen at redhat.com>
Date:   Fri Apr 27 10:56:12 2012 +0900

    avoid actually running aclocal (for +d16) by using hard float patch closer to Ubuntu
    
    -drop the original debian armhf llvm driver patches

 ghc-7.4.1-armv7hl-llc-hard-float.patch |   15 +++++++++++++++
 ghc-debian-ARM-VFPv3D16.patch          |   16 ----------------
 ghc-debian-armhf_llvm_abi.patch        |   26 --------------------------
 ghc.spec                               |   12 ++++--------
 4 files changed, 19 insertions(+), 50 deletions(-)
---
diff --git a/ghc-7.4.1-armv7hl-llc-hard-float.patch b/ghc-7.4.1-armv7hl-llc-hard-float.patch
new file mode 100644
index 0000000..ad6c323
--- /dev/null
+++ b/ghc-7.4.1-armv7hl-llc-hard-float.patch
@@ -0,0 +1,15 @@
+diff -u ghc-7.4.1/compiler/main/DriverPipeline.hs.orig ghc-7.4.1/compiler/main/DriverPipeline.hs
+--- ghc-7.4.1/compiler/main/DriverPipeline.hs.orig	2012-02-02 03:10:32.000000000 +0900
++++ ghc-7.4.1/compiler/main/DriverPipeline.hs	2012-04-27 10:42:53.142111769 +0900
+@@ -1376,9 +1376,9 @@
+         -- does not enable VFP by default. Let's do this manually here
+         fpOpts = case platformArch (targetPlatform dflags) of 
+                    ArchARM ARMv7 ext -> if (elem VFPv3 ext)
+-                                      then ["-mattr=+v7,+vfp3"]
++                                      then ["-mattr=+v7,+vfp3", "-float-abi=hard"]
+                                       else if (elem VFPv3D16 ext)
+-                                           then ["-mattr=+v7,+vfp3,+d16"]
++                                           then ["-mattr=+v7,+vfp3,+d16", "-float-abi=hard"]
+                                            else []
+                    _               -> []
+ 
diff --git a/ghc.spec b/ghc.spec
index 15a4360..fe02411 100644
--- a/ghc.spec
+++ b/ghc.spec
@@ -98,9 +98,8 @@ Patch9: Cabal-fix-dynamic-exec-for-TH.patch
 # Debian armel fixes
 Patch10: fix-ARM-s-StgCRun-clobbered-register-list-for-both-A.patch
 Patch11: fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis.patch
-# Debian armhf fixes
-Patch12: ghc-debian-ARM-VFPv3D16.patch
-Patch13: ghc-debian-armhf_llvm_abi.patch
+# need to tell llc to use hard float on armv7hl
+Patch12: ghc-7.4.1-armv7hl-llc-hard-float.patch
 
 %description
 GHC is a state-of-the-art, open source, compiler and interactive environment
@@ -220,7 +219,6 @@ ln -s $(pkg-config --variable=includedir libffi)/*.h rts/dist/build
 %patch10 -p1 -b .arm1
 %patch11 -p1 -b .arm2
 %patch12 -p1 -b .arm
-%patch13 -p1 -b .arm
 %endif
 
 %build
@@ -237,9 +235,6 @@ BUILD_DOCBOOK_HTML = NO
 %if %{undefined without_hscolour}
 HSCOLOUR_SRCS = NO
 %endif
-%ifarch armv7hl
-SRC_HC_OPTS += -D__ARM_PCS_VFP
-%endif
 EOF
 
 export CFLAGS="${CFLAGS:-%optflags}"
@@ -426,7 +421,8 @@ fi
 * Tue Apr 10 2012 Jens Petersen <petersen at redhat.com> - 7.4.1-1.1
 - build with llvm-3.0 on ARM
 - remove arm from unregisterised_archs
-- add 4 Debian ARM patches for armel and armhf (Iain Lane)
+- add Debian ARM register patches (Iain Lane)
+- make llc use -float-abi=hard on armv7hl (thanks Debian and Ubuntu)
 - bootstrap build
 
 * Wed Feb 15 2012 Jens Petersen <petersen at redhat.com> - 7.4.1-1


More information about the scm-commits mailing list