public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Sam James" <sam@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/, dev-lang/ghc/files/
Date: Sun, 21 Aug 2022 02:25:17 +0000 (UTC)	[thread overview]
Message-ID: <1661048705.cf7899db70b1379f1633f88e848a0ca3bcd92f62.sam@gentoo> (raw)

commit:     cf7899db70b1379f1633f88e848a0ca3bcd92f62
Author:     matoro <matoro <AT> users <DOT> noreply <DOT> github <DOT> com>
AuthorDate: Fri Aug 19 00:00:22 2022 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sun Aug 21 02:25:05 2022 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=cf7899db

dev-lang/ghc: add big-endian ppc64 binary

This requires a patch to work correctly on BE systems.  Apply the patch
unconditionally since it is already includes the appropriate checks in
the code.  Delete a few lines of commented-out obsolete patches.

Closes: https://bugs.gentoo.org/865311
Thanks-to: Marcus Comstedt <marcus <AT> mc.pp.se>
Closes: https://github.com/gentoo/gentoo/pull/26921
Signed-off-by: Sam James <sam <AT> gentoo.org>

 dev-lang/ghc/Manifest                              |  1 +
 .../files/ghc-9.0.2-disable-unboxed-arrays.patch   | 39 ++++++++++++++++++++++
 dev-lang/ghc/ghc-9.0.2.ebuild                      | 28 ++++------------
 3 files changed, 46 insertions(+), 22 deletions(-)

diff --git a/dev-lang/ghc/Manifest b/dev-lang/ghc/Manifest
index f6130b71837e..370504e5c02c 100644
--- a/dev-lang/ghc/Manifest
+++ b/dev-lang/ghc/Manifest
@@ -5,5 +5,6 @@ DIST ghc-9.0.2-testsuite.tar.xz 2403564 BLAKE2B 0e7f6fefb9c972f94073aca8b1514791
 DIST ghc-bin-8.10.6-i686-pc-linux-gnu.tbz2 124324289 BLAKE2B afb34984872b35fdedbdedeb8756cc7c33e5b943dba57dd86910b076d483bb643265d0ab0027784dec5dc489eabd65b5ab17474f25fb2ce657925aa0efaa9033 SHA512 4be13e6dba298d12a4d49ae4633eec83cfaaaf22b5f8cfca5f5952aa294ae52fb3601490beed3bda5a7f7b6a5bd81e0ecc9fc39e8df836cc8fd377a0d0b783a0
 DIST ghc-bin-8.10.6-x86_64-pc-linux-gnu.tbz2 122871118 BLAKE2B 527b36abf60390c91f91bc650ee25484d39d377739da87b5b6fd1a752705c1f3bc0ce0c68644657c9a7c1fc9a3b858b9dd7d84b25eab1a89125fccb6eb1f6250 SHA512 42b7fae339e82a6078fae8920efea8d0992e4774ea66b100e22dd9df168be57d8bce52558b8501c3c567c40776389d94bde3f17d26d63535140ce26ac16c27e1
 DIST ghc-bin-9.0.2-i686-pc-linux-gnu.tbz2 123509908 BLAKE2B 45614984803a7bfa266f99d4adb4b5f2ab7b9e5e89c6ecd501296fc99a1d96e798ccb9c832f8dcb15fff9725beb918a7b63e62ff13f59b6506a2ef17930c45d2 SHA512 e0b7f4474c16f0763a2f787027fbdfeb3125b48c987fa1196bc189fefad9f0bfa2806da62af46d61ca911f5275b578076e2b326acf39e0894a8daa9deda0843a
+DIST ghc-bin-9.0.2-powerpc64-unknown-linux-gnu.tar.gz 235636284 BLAKE2B 878ac300cca5d2cbc5cb21dbb347da755b4027cbf63ec77464740854fa8010569de5e03acef67cd877da13665c906b2fd04e24e226e9eb39b57ba979093c732b SHA512 28f096e965abdac9cc370c882639f10285b9073ba5332f7af215eccff948e41c01c3d6bb3bc8e3b4e809e12867a95b49f82dd76e0090b974088f75ab9d1bc199
 DIST ghc-bin-9.0.2-powerpc64le-unknown-linux-gnu.tar.gz 275226316 BLAKE2B 10ade2359432b0ede7431ee543f0ff47f4b203465d81719da579ad63ca467359eb9fcf7336a12feb6ff75a480f349576ff8ea1b4ebe1094fff228ae4fd00d6e0 SHA512 64b4c84d149358b8d3a6cb29a6d3a75af11e7b14e6d910c9789c9949262e4ed2a17f8a0d1e5dd297121957061fe2395d6f43acae6b4ab28851e3cd414cd9c89c
 DIST ghc-bin-9.0.2-x86_64-pc-linux-gnu.tbz2 121536759 BLAKE2B 4433e2d266f065d2b2944b711d622ec26288a2187ac03562257a671744b44da35110ce16ac6d76f7062a563488885326be073e0ff03c7e48250051c3b4763d96 SHA512 2de29a9ddbfd0fac797cdd628f3657ff38e6a153151849508bba75d36f84394ed77750435ff5cc1bdfcd30ef2b6e009bde965bd0a83e0496b5027239642f4b6c

diff --git a/dev-lang/ghc/files/ghc-9.0.2-disable-unboxed-arrays.patch b/dev-lang/ghc/files/ghc-9.0.2-disable-unboxed-arrays.patch
new file mode 100644
index 000000000000..599762b95454
--- /dev/null
+++ b/dev-lang/ghc/files/ghc-9.0.2-disable-unboxed-arrays.patch
@@ -0,0 +1,39 @@
+https://gitlab.haskell.org/ghc/packages/containers/-/commit/f5a511f1ff2cf16e710342948792cb8d7576e27c
+https://bugs.gentoo.org/865311
+
+From f5a511f1ff2cf16e710342948792cb8d7576e27c Mon Sep 17 00:00:00 2001
+From: Peter Trommler <ptrommler@acm.org>
+Date: Fri, 31 Dec 2021 18:20:45 +0100
+Subject: [PATCH] Disable unboxed arrays on big-endian
+
+Unboxed arrays are broken on big-endian architectures, see
+https://gitlab.haskell.org/ghc/ghc/-/issues/16998 for details.
+This patch makes the use of unboxed arrays conditional on
+little-endian architecture.
+
+Fixes #673
+---
+ libraries/containers/containers/include/containers.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+diff --git a/libraries/containers/containers/include/containers.h b/libraries/containers/containers/include/containers.h
+index cd201ca3..fc2a0e84 100644
+--- a/libraries/containers/containers/include/containers.h	2022-08-16 07:50:42.844217960 +0200
++++ b/libraries/containers/containers/include/containers.h	2022-08-16 07:50:49.327446486 +0200
+@@ -35,7 +35,13 @@
+ 
+ #ifdef __GLASGOW_HASKELL__
+ # define USE_ST_MONAD 1
++#ifndef WORDS_BIGENDIAN
++/*
++ * Unboxed arrays are broken on big-endian architectures.
++ * See https://gitlab.haskell.org/ghc/ghc/-/issues/16998
++ */
+ # define USE_UNBOXED_ARRAYS 1
+ #endif
++#endif
+ 
+ #endif
+-- 
+GitLab
+

diff --git a/dev-lang/ghc/ghc-9.0.2.ebuild b/dev-lang/ghc/ghc-9.0.2.ebuild
index 5f55fd44965a..e0cd53611f2c 100644
--- a/dev-lang/ghc/ghc-9.0.2.ebuild
+++ b/dev-lang/ghc/ghc-9.0.2.ebuild
@@ -32,8 +32,10 @@ BIN_PV=${PV}
 arch_binaries="$arch_binaries amd64? ( https://eidetic.codes/ghc-bin-${PV}-x86_64-pc-linux-gnu.tbz2 )"
 #arch_binaries="$arch_binaries ia64?  ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ia64-fixed-fiw.tbz2 )"
 #arch_binaries="$arch_binaries ppc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc.tbz2 )"
-#arch_binaries="$arch_binaries ppc64? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-ppc64.tbz2 )"
-arch_binaries="$arch_binaries ppc64? ( !big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz ) )"
+arch_binaries="$arch_binaries ppc64? (
+	big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64-unknown-linux-gnu.tar.gz )
+	!big-endian? ( https://github.com/matoro/ghc/releases/download/${PV}/ghc-bin-${PV}-powerpc64le-unknown-linux-gnu.tar.gz )
+)"
 #arch_binaries="$arch_binaries sparc? ( https://slyfox.uni.cx/~slyfox/distfiles/ghc-bin-${PV}-sparc.tbz2 )"
 arch_binaries="$arch_binaries x86? ( https://eidetic.codes/ghc-bin-${PV}-i686-pc-linux-gnu.tbz2 )"
 
@@ -49,9 +51,7 @@ yet_binary() {
 		amd64) return 0 ;;
 		#ia64) return 0 ;;
 		#ppc) return 0 ;;
-		ppc64)
-			use big-endian || return 0
-			;;
+		ppc64) return 0 ;;
 		#sparc) return 0 ;;
 		x86) return 0 ;;
 		*) return 1 ;;
@@ -506,30 +506,14 @@ src_prepare() {
 
 		eapply "${FILESDIR}"/${PN}-9.0.2-CHOST-prefix.patch
 		eapply "${FILESDIR}"/${PN}-9.0.2-darwin.patch
-
-		# Incompatible with ghc-9.0.2-modorigin-semigroup.patch
-		# Below patch should not be needed by ghc-9.2
-		#eapply "${FILESDIR}"/${PN}-9.0.2-modorigin.patch
-
-		# ModUnusable pretty-printing should include the reason
-		#eapply "${FILESDIR}/${PN}-9.0.2-verbose-modunusable.patch"
-
 		# Fixes panic when compiling some packages
 		# https://github.com/gentoo-haskell/gentoo-haskell/issues/1250#issuecomment-1044257595
 		# https://gitlab.haskell.org/ghc/ghc/-/issues/21097
 		eapply "${FILESDIR}/${PN}-9.0.2-modorigin-semigroup.patch"
-
 		# Needed for testing with python-3.10
 		use test && eapply "${FILESDIR}/${PN}-9.0.2-fix-tests-python310.patch"
-
-		#needs a port?
-		#eapply "${FILESDIR}"/${PN}-8.8.1-revert-CPP.patch
 		eapply "${FILESDIR}"/${PN}-8.10.1-allow-cross-bootstrap.patch
-		#eapply "${FILESDIR}"/${PN}-8.10.3-C99-typo-ac270.patch
-
-		# a bunch of crosscompiler patches
-		# needs newer version:
-		#eapply "${FILESDIR}"/${PN}-8.2.1_rc1-hp2ps-cross.patch
+		eapply "${FILESDIR}"/${PN}-9.0.2-disable-unboxed-arrays.patch
 
 		# mingw32 target
 		pushd "${S}/libraries/Win32"


             reply	other threads:[~2022-08-21  2:25 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-21  2:25 Sam James [this message]
  -- strict thread matches above, loose matches on Subject: below --
2025-05-21  6:12 [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/, dev-lang/ghc/files/ Mark Wright
2023-02-04 23:11 Sam James
2022-08-14 20:52 Sam James
2022-07-04  0:33 Sam James
2021-12-14 11:46 Sam James
2021-08-27  8:23 Mark Wright
2020-12-18  8:52 Sergei Trofimovich
2020-03-24 23:34 Sergei Trofimovich
2019-10-04  6:46 Sergei Trofimovich
2018-06-09 19:09 Sergei Trofimovich
2017-09-02 20:50 Sergei Trofimovich
2017-05-23 21:16 Sergei Trofimovich
2017-01-29 12:54 Sergei Trofimovich
2017-01-16  9:50 Sergei Trofimovich
2016-03-15 22:01 Sergei Trofimovich

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1661048705.cf7899db70b1379f1633f88e848a0ca3bcd92f62.sam@gentoo \
    --to=sam@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox