pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/lang/ghc80 Add a bootkit for FreeBSD/amd64



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d563c120b06f
branches:  trunk
changeset: 408951:d563c120b06f
user:      pho <pho%pkgsrc.org@localhost>
date:      Tue Jan 14 08:46:17 2020 +0000

description:
Add a bootkit for FreeBSD/amd64

diffstat:

 lang/ghc80/Makefile                                |   4 +++-
 lang/ghc80/bootstrap.mk                            |   8 +++++++-
 lang/ghc80/distinfo                                |   8 +++++++-
 lang/ghc80/patches/patch-compiler_main_DynFlags.hs |  20 ++++++++++++++++++++
 lang/ghc80/patches/patch-configure.ac              |  18 ++++++++++++++++++
 5 files changed, 55 insertions(+), 3 deletions(-)

diffs (120 lines):

diff -r b39b6e93f93f -r d563c120b06f lang/ghc80/Makefile
--- a/lang/ghc80/Makefile       Tue Jan 14 08:44:03 2020 +0000
+++ b/lang/ghc80/Makefile       Tue Jan 14 08:46:17 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2020/01/13 11:49:36 pho Exp $
+# $NetBSD: Makefile,v 1.3 2020/01/14 08:46:17 pho Exp $
 # -----------------------------------------------------------------------------
 # Package metadata
 #
@@ -24,6 +24,7 @@
 # yourself, follow instructions in BOOTSTRAP.txt and ./bootstrap.mk
 #BROKEN_EXCEPT_ON_PLATFORM+= Darwin-*-powerpc # Not available yet
 BROKEN_EXCEPT_ON_PLATFORM+= FreeBSD-*-i386
+BROKEN_EXCEPT_ON_PLATFORM+= FreeBSD-*-x86_64
 BROKEN_EXCEPT_ON_PLATFORM+= NetBSD-*-x86_64
 #BROKEN_EXCEPT_ON_PLATFORM+= SunOS-*-i386     # Not available yet
 #BROKEN_EXCEPT_ON_PLATFORM+= SunOS-*-x86_64   # Not available yet
@@ -106,6 +107,7 @@
 # We patch configure.ac in some directories.
 post-patch:
        @${PHASE_MSG} "Regenerating configuration scripts for ${PKGNAME}"
+       ${RUN} cd ${WRKSRC:Q}                       && autoconf
        ${RUN} cd ${WRKSRC:Q}/libraries/base        && autoconf
        ${RUN} cd ${WRKSRC:Q}/libraries/integer-gmp && autoconf
 
diff -r b39b6e93f93f -r d563c120b06f lang/ghc80/bootstrap.mk
--- a/lang/ghc80/bootstrap.mk   Tue Jan 14 08:44:03 2020 +0000
+++ b/lang/ghc80/bootstrap.mk   Tue Jan 14 08:46:17 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.2 2020/01/13 11:49:36 pho Exp $
+# $NetBSD: bootstrap.mk,v 1.3 2020/01/14 08:46:17 pho Exp $
 # -----------------------------------------------------------------------------
 # Select a bindist of bootstrapping compiler on a per-platform basis.
 #
@@ -30,6 +30,12 @@
 DISTFILES:=    ${DISTFILES} ${BOOT_ARCHIVE} # Available in LOCAL_PORTS
 .endif
 
+.if !empty(MACHINE_PLATFORM:MFreeBSD-*-x86_64) || make(distinfo) || make(makesum) || make(mdi)
+BOOT_VERSION:= 8.0.2
+BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-unknown-freebsd.tar.xz
+DISTFILES:=    ${DISTFILES} ${BOOT_ARCHIVE} # Available in LOCAL_PORTS
+.endif
+
 .if !empty(MACHINE_PLATFORM:MNetBSD-*-x86_64) || make(distinfo) || make (makesum) || make(mdi)
 BOOT_VERSION:= 8.0.2
 BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-unknown-netbsd.tar.xz
diff -r b39b6e93f93f -r d563c120b06f lang/ghc80/distinfo
--- a/lang/ghc80/distinfo       Tue Jan 14 08:44:03 2020 +0000
+++ b/lang/ghc80/distinfo       Tue Jan 14 08:46:17 2020 +0000
@@ -1,9 +1,13 @@
-$NetBSD: distinfo,v 1.2 2020/01/13 11:49:36 pho Exp $
+$NetBSD: distinfo,v 1.3 2020/01/14 08:46:17 pho Exp $
 
 SHA1 (ghc-8.0.2-boot-i386-unknown-freebsd.tar.xz) = 0d6ffbb87f76aa4bfa243ba590978b993b359bd0
 RMD160 (ghc-8.0.2-boot-i386-unknown-freebsd.tar.xz) = cdcea446b5ae76ca90cac6fb3ae85c13fed04094
 SHA512 (ghc-8.0.2-boot-i386-unknown-freebsd.tar.xz) = 078290c325c8e5b8d861816750d58b4289ad51ac4f39b803b670d7ece5fb46e9fd39c1859ec54770ad9cfc7e423790d0f5a0c58e5881f96b4078763a6b48c0a0
 Size (ghc-8.0.2-boot-i386-unknown-freebsd.tar.xz) = 48217412 bytes
+SHA1 (ghc-8.0.2-boot-x86_64-unknown-freebsd.tar.xz) = b77b5f5ace82df00bd6f76883c4552157c8b34e3
+RMD160 (ghc-8.0.2-boot-x86_64-unknown-freebsd.tar.xz) = bdb8f77acde50922066b20be98435524eb4a2a2b
+SHA512 (ghc-8.0.2-boot-x86_64-unknown-freebsd.tar.xz) = 48bac6cba21d3d9adb1bb9f2bc41d8b6d19b2f1ab4e113151cc8eba6dfb80f6818ca2bbc84248b126a2dd526a644f1d7695372af0a2bc6538cdb84ad3a45e7d1
+Size (ghc-8.0.2-boot-x86_64-unknown-freebsd.tar.xz) = 48878384 bytes
 SHA1 (ghc-8.0.2-boot-x86_64-unknown-netbsd.tar.xz) = 739ff0e666e5b3bb6e31d5c9b95ad01ab1225105
 RMD160 (ghc-8.0.2-boot-x86_64-unknown-netbsd.tar.xz) = 29f162e0547c686274eb8389c30e8a76b53a51eb
 SHA512 (ghc-8.0.2-boot-x86_64-unknown-netbsd.tar.xz) = 829ac54c9cf5031d93e994424a70093da38a612281ad2e8422a0dbd1e5beb34deecca042ae82706c97c3e4b9ab745140c796e3a6a16903cb04adfac52b8d83da
@@ -12,6 +16,8 @@
 RMD160 (ghc-8.0.2-src.tar.xz) = 56b74f65e17bcab2ff9d5b8dbced3f9694d531cc
 SHA512 (ghc-8.0.2-src.tar.xz) = 58ea3853cd93b556ecdc4abd0be079b2621171b8491f59004ea4e036a4cba4470aaafe6591b942e0a50a64bdc47540e01fe6900212a1ef7087850112d9bfc5ef
 Size (ghc-8.0.2-src.tar.xz) = 10687760 bytes
+SHA1 (patch-compiler_main_DynFlags.hs) = c9671ca255b06dfbb732f3c56e3cbe9bfed1c075
+SHA1 (patch-configure.ac) = 49ee5bb2e1fdb8bd1cb355f2a499d056801964d2
 SHA1 (patch-iserv_ghc.mk) = 6d1d79100b4a7b5d8b0c6f25318eaa8b4e20e43d
 SHA1 (patch-libraries_base_GHC_Event_KQueue.hsc) = 8ee5da667a241a05fde3c580d3dc9bdc05aa5f00
 SHA1 (patch-libraries_base_System_Environment.hs) = ec3dfd916593f600a397e5b594672e6d3564f042
diff -r b39b6e93f93f -r d563c120b06f lang/ghc80/patches/patch-compiler_main_DynFlags.hs
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ghc80/patches/patch-compiler_main_DynFlags.hs        Tue Jan 14 08:46:17 2020 +0000
@@ -0,0 +1,20 @@
+$NetBSD: patch-compiler_main_DynFlags.hs,v 1.1 2020/01/14 08:46:17 pho Exp $
+
+Fix build on FreeBSD:
+https://phabricator.haskell.org/D3773
+
+--- compiler/main/DynFlags.hs.orig     2017-01-03 15:59:18.000000000 +0000
++++ compiler/main/DynFlags.hs
+@@ -1339,11 +1339,7 @@ wayOptl :: Platform -> Way -> [String]
+ wayOptl _ (WayCustom {}) = []
+ wayOptl platform WayThreaded =
+         case platformOS platform of
+-        -- FreeBSD's default threading library is the KSE-based M:N libpthread,
+-        -- which GHC has some problems with.  It's currently not clear whether
+-        -- the problems are our fault or theirs, but it seems that using the
+-        -- alternative 1:1 threading library libthr works around it:
+-        OSFreeBSD  -> ["-lthr"]
++        OSFreeBSD  -> ["-pthread"]
+         OSOpenBSD  -> ["-pthread"]
+         OSNetBSD   -> ["-pthread"]
+         _          -> []
diff -r b39b6e93f93f -r d563c120b06f lang/ghc80/patches/patch-configure.ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ghc80/patches/patch-configure.ac     Tue Jan 14 08:46:17 2020 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-configure.ac,v 1.1 2020/01/14 08:46:17 pho Exp $
+
+Fix build on FreeBSD/amd64.
+
+--- configure.ac.orig  2017-01-04 14:17:17.000000000 +0000
++++ configure.ac
+@@ -1060,6 +1060,11 @@ if test "$ac_cv_sizeof_void_p" -eq 8 ; then
+           # The flag MAP_NORESERVE is supported for source compatibility reasons,
+           # but is completely ignored by OS mmap
+             use_large_address_space=no
++        elif test "$ghc_host_os" = "freebsd" ; then
++            # FreeBSD doesn't support MAP_NORESERVE. The flag
++            # MAP_NORESERVE is supported for source compatibility
++            # reasons, but is completely ignored by OS mmap
++            use_large_address_space=no
+         else
+             AC_CHECK_DECLS([MAP_NORESERVE, MADV_FREE, MADV_DONTNEED],[],[],
+                 [



Home | Main Index | Thread Index | Old Index