[Pkg-haskell-commits] darcs: ghc: armhf support (thanks to Jani Monoses):
Iain Lane
laney at debian.org
Sat Mar 10 16:44:45 UTC 2012
Sat Mar 10 16:44:34 UTC 2012 Iain Lane <laney at debian.org>
* armhf support (thanks to Jani Monoses):
Ignore-this: 56cc484cf4bc86adbd9060bbd471b462
- debian/patches/ARM-VFPv3D16: Use vfp3-d16 FPU for ARM builds.
- debian/patches/armhf_llvm_abi: Pass -float-abi=hard to llc on armhf if
__ARM_PCS_VFP is defined (needs to be preprocessed for this)
- debian/rules: Define __ARM_PCS_VFP on armhf for the above patch.
M ./changelog +5
A ./patches/ARM-VFPv3D16
A ./patches/armhf_llvm_abi
M ./patches/series +2
M ./rules +3
Sat Mar 10 16:44:34 UTC 2012 Iain Lane <laney at debian.org>
* armhf support (thanks to Jani Monoses):
Ignore-this: 56cc484cf4bc86adbd9060bbd471b462
- debian/patches/ARM-VFPv3D16: Use vfp3-d16 FPU for ARM builds.
- debian/patches/armhf_llvm_abi: Pass -float-abi=hard to llc on armhf if
__ARM_PCS_VFP is defined (needs to be preprocessed for this)
- debian/rules: Define __ARM_PCS_VFP on armhf for the above patch.
diff -rN -u old-ghc//changelog new-ghc//changelog
--- old-ghc//changelog 2012-03-10 16:44:45.767255144 +0000
+++ new-ghc//changelog 2012-03-10 16:44:45.771326727 +0000
@@ -6,6 +6,11 @@
- fix-ARM-StgCRun-to-not-save-and-restore-r11-fp-regis
* Use dh_autoreconf{,_clean} to autoreconf, mainly so we can have proper
clean support.
+ * armhf support (thanks to Jani Monoses):
+ - debian/patches/ARM-VFPv3D16: Use vfp3-d16 FPU for ARM builds.
+ - debian/patches/armhf_llvm_abi: Pass -float-abi=hard to llc on armhf if
+ __ARM_PCS_VFP is defined (needs to be preprocessed for this)
+ - debian/rules: Define __ARM_PCS_VFP on armhf for the above patch.
-- Iain Lane <laney at debian.org> Sat, 10 Mar 2012 15:55:03 +0000
diff -rN -u old-ghc//patches/armhf_llvm_abi new-ghc//patches/armhf_llvm_abi
--- old-ghc//patches/armhf_llvm_abi 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc//patches/armhf_llvm_abi 2012-03-10 16:44:45.785833430 +0000
@@ -0,0 +1,26 @@
+Description: If we are on armhf, tell llvm to generate code for this ABI. Not
+ forwarded upstream, because they will do a more 'proper' patch. See upstream
+ bug #5914.
+Author: Iain Lane <laney at debian.org>
+
+Index: ghc/compiler/main/DriverPipeline.hs
+===================================================================
+--- ghc.orig/compiler/main/DriverPipeline.hs 2012-03-10 16:41:46.000000000 +0000
++++ ghc/compiler/main/DriverPipeline.hs 2012-03-10 16:42:59.209169474 +0000
+@@ -1,5 +1,5 @@
+ {-# OPTIONS -fno-cse #-}
+-{-# LANGUAGE NamedFieldPuns #-}
++{-# LANGUAGE NamedFieldPuns, CPP #-}
+ -- -fno-cse is needed for GLOBAL_VAR's to behave properly
+
+ -----------------------------------------------------------------------------
+@@ -1379,6 +1379,9 @@
+ then ["-mattr=+v7,+vfp3"]
+ else if (elem VFPv3D16 ext)
+ then ["-mattr=+v7,+vfp3,+d16"]
++#ifdef __ARM_PCS_VFP
++ ++ ["-float-abi=hard"]
++#endif
+ else []
+ _ -> []
+
diff -rN -u old-ghc//patches/ARM-VFPv3D16 new-ghc//patches/ARM-VFPv3D16
--- old-ghc//patches/ARM-VFPv3D16 1970-01-01 00:00:00.000000000 +0000
+++ new-ghc//patches/ARM-VFPv3D16 2012-03-10 16:44:45.785833430 +0000
@@ -0,0 +1,16 @@
+Description: Use VFPv3-D16 FPU for ARM builds
+Author: Jani Monoses <jani at ubuntu.com>
+
+Index: ghc/aclocal.m4
+===================================================================
+--- ghc.orig/aclocal.m4 2012-02-01 18:10:32.000000000 +0000
++++ ghc/aclocal.m4 2012-03-10 16:40:32.415005650 +0000
+@@ -333,7 +333,7 @@
+ ],
+ [changequote(, )dnl
+ ARM_ISA=ARMv7
+- ARM_ISA_EXT="[VFPv3,NEON]"
++ ARM_ISA_EXT="[VFPv3D16,NEON]"
+ changequote([, ])dnl
+ ])
+ ])
diff -rN -u old-ghc//patches/series new-ghc//patches/series
--- old-ghc//patches/series 2012-03-10 16:44:45.763335511 +0000
+++ new-ghc//patches/series 2012-03-10 16:44:45.785833430 +0000
@@ -6,3 +6,5 @@
haddock-no-library
no_ghci_on_powerpc
use-llvm-3.0
+armhf_llvm_abi
+ARM-VFPv3D16
diff -rN -u old-ghc//rules new-ghc//rules
--- old-ghc//rules 2012-03-10 16:44:45.751247811 +0000
+++ new-ghc//rules 2012-03-10 16:44:45.791261925 +0000
@@ -48,6 +48,9 @@
ifneq (,$(findstring $(DEB_HOST_ARCH), arm armel armhf))
echo "SRC_HC_OPTS += -optc-mlong-calls" >> mk/build.mk
endif
+ifeq (armhf,$(DEB_HOST_ARCH))
+ echo "SRC_HC_OPTS += -D__ARM_PCS_VFP" >> mk/build.mk
+endif
# proper fix for #360177
ifeq (ppc64,$(DEB_HOST_ARCH))
echo "SRC_HC_OPTS += -optc-mminimal-toc" >> mk/build.mk
More information about the Pkg-haskell-commits
mailing list