[DHG_packages] 01/01: ghc: powerpcspe support from John Paul Adrian Glaubitz. closes: #861806.

Clint Adams clint at moszumanska.debian.org
Mon Jun 19 15:31:37 UTC 2017


This is an automated email from the git hooks/post-receive script.

clint pushed a commit to branch master
in repository DHG_packages.

commit 58c1811cb7f1bdf3ee9a699b8c050764884bc77d
Author: Clint Adams <clint at debian.org>
Date:   Mon Jun 19 11:30:08 2017 -0400

    ghc: powerpcspe support from John Paul Adrian Glaubitz.  closes: #861806.
---
 p/ghc/debian/changelog                             |  8 +++
 .../patches/powerpcspe-disable-FPU-code.patch      | 66 ++++++++++++++++++++++
 p/ghc/debian/patches/series                        |  1 +
 p/ghc/debian/rules                                 |  2 +-
 4 files changed, 76 insertions(+), 1 deletion(-)

diff --git a/p/ghc/debian/changelog b/p/ghc/debian/changelog
index bb0dd53..e90940d 100644
--- a/p/ghc/debian/changelog
+++ b/p/ghc/debian/changelog
@@ -1,3 +1,11 @@
+ghc (8.0.2-2) UNRELEASED; urgency=medium
+
+  * Add powerpcspe-disable-FPU-code.patch to disable PPC
+    FPU code on powerpcspe.  closes: #861806.
+  * Build with --enable-unregisterised on powerpcspe.
+
+ -- John Paul Adrian Glaubitz <glaubitz at physik.fu-berlin.de>  Thu, 04 May 2017 11:00:20 +0200
+
 ghc (8.0.2-1) unstable; urgency=medium
 
   * Team upload
diff --git a/p/ghc/debian/patches/powerpcspe-disable-FPU-code.patch b/p/ghc/debian/patches/powerpcspe-disable-FPU-code.patch
new file mode 100644
index 0000000..dfe2319
--- /dev/null
+++ b/p/ghc/debian/patches/powerpcspe-disable-FPU-code.patch
@@ -0,0 +1,66 @@
+Description: Disable FPU code on powerpspe
+ powerpcspe CPUs don't have an FPU, so the FPU PPC assembly
+ code has to be disabled on this architecture.
+ See: https://ghc.haskell.org/trac/ghc/ticket/12075
+ .
+
+--- ghc-8.0.1.orig/aclocal.m4
++++ ghc-8.0.1/aclocal.m4
+@@ -185,6 +185,7 @@ AC_DEFUN([FPTOOLS_SET_HASKELL_PLATFORM_V
+             test -z "[$]2" || eval "[$]2=ArchX86_64"
+             ;;
+         powerpc)
++            FP_CHECK_FOR_SOFT_FLOAT_POWERPC()
+             test -z "[$]2" || eval "[$]2=ArchPPC"
+             ;;
+         powerpc64)
+@@ -458,6 +459,25 @@ AC_DEFUN([GET_ARM_ISA],
+         AC_SUBST(ARM_ISA)
+ ])
+ 
++# CHECK_FOR_SOFT_FLOAT_POWERPC
++# ----------------------------------
++# Check whether we have hardware floating point support. See #12075
++AC_DEFUN([FP_CHECK_FOR_SOFT_FLOAT_POWERPC],
++[
++  AC_COMPILE_IFELSE(
++    [AC_LANG_PROGRAM(
++    [],
++    [#if defined(__NO_FPRS__)
++     softfloat
++     #else
++     return 0;
++     #endif
++    ])],
++    [value=NO],
++    [value=YES])
++
++  AC_DEFINE(powerpc_HOST_ARCH_SOFT_FLOAT, $value, [soft-float PowerPC])
++])
+ 
+ # FP_SETTINGS
+ # ----------------------------------
+--- ghc-8.0.1.orig/mk/project.mk.in
++++ ghc-8.0.1/mk/project.mk.in
+@@ -162,3 +162,6 @@ GHC_LLVM_AFFECTED_BY_9439 = @GHC_LLVM_AF
+ ifeq "$(TargetArch_CPP)" "arm"
+ ARM_ISA=@ARM_ISA@
+ endif
++ifeq "$(TargetArch_CPP)" "powerpc"
++POWERPC_SOFT_FLOAT=@powerpc_HOST_ARCH_SOFT_FLOAT@
++endif
+--- ghc-8.0.1.orig/rts/ghc.mk
++++ ghc-8.0.1/rts/ghc.mk
+@@ -55,9 +55,12 @@ rts_S_SRCS += rts/AdjustorAsm.S
+ endif
+ # this matches substrings of powerpc64le, including "powerpc" and "powerpc64"
+ ifneq "$(findstring $(TargetArch_CPP), powerpc64le)" ""
++# and this matches soft-float PPC (#12075)
++ifneq "$(POWERPC_NO_FPRS)" "YES"
+ rts_S_SRCS += rts/StgCRunAsm.S
+ endif
+ endif
++endif
+ 
+ ifeq "$(GhcUnregisterised)" "YES"
+ GENAPPLY_OPTS = -u
diff --git a/p/ghc/debian/patches/series b/p/ghc/debian/patches/series
index 869c987..d305f21 100644
--- a/p/ghc/debian/patches/series
+++ b/p/ghc/debian/patches/series
@@ -8,3 +8,4 @@ do-not-use-SHELL
 compiler-cmm-PprC-sparc-alignment.patch
 x32-use-native-x86_64-insn.patch
 osdecommitmemory-compat.patch
+powerpcspe-disable-FPU-code.patch
diff --git a/p/ghc/debian/rules b/p/ghc/debian/rules
index eb96e94..7de97ba 100755
--- a/p/ghc/debian/rules
+++ b/p/ghc/debian/rules
@@ -38,7 +38,7 @@ EXTRA_CONFIGURE_FLAGS=--with-ghc="$(GHC)"
 BUILD_HADDOCK_DOCS=YES
 DEB_HOOGLE_TXT_DIR = /usr/lib/ghc-doc/hoogle/
 
-ifeq (x32,$(DEB_HOST_ARCH))
+ifneq (,$(findstring $(DEB_HOST_ARCH), powerpcspe x32))
   EXTRA_CONFIGURE_FLAGS += --enable-unregisterised
 endif
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-haskell/DHG_packages.git



More information about the Pkg-haskell-commits mailing list