pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/ghc7 Update to GHC 7.10.3
details: https://anonhg.NetBSD.org/pkgsrc/rev/14dbd4e638a5
branches: trunk
changeset: 346177:14dbd4e638a5
user: pho <pho%pkgsrc.org@localhost>
date: Sun Dec 29 16:59:08 2019 +0000
description:
Update to GHC 7.10.3
Changes from 7.6.3 are as follows:
* https://www.haskell.org/ghc/docs/7.8.1/html/users_guide/release-7-8-1.html
* https://www.haskell.org/ghc/docs/7.8.2/html/users_guide/release-7-8-2.html
* https://www.haskell.org/ghc/docs/7.8.3/html/users_guide/release-7-8-3.html
* https://www.haskell.org/ghc/docs/7.8.4/html/users_guide/release-7-8-4.html
* https://www.haskell.org/ghc/docs/7.10.1/html/users_guide/release-7-10-1.html
* https://downloads.haskell.org/~ghc/7.10.2/docs/html/users_guide/release-7-10-2.html
* https://downloads.haskell.org/~ghc/7.10.3/docs/html/users_guide/release-7-10-3.html
diffstat:
lang/ghc7/BOOTSTRAP.txt | 20 +
lang/ghc7/DESCR | 5 +
lang/ghc7/Makefile | 119 +-
lang/ghc7/PLIST | 5384 ----------
lang/ghc7/TODO | 31 -
lang/ghc7/bootstrap.mk | 98 +-
lang/ghc7/buildlink3.mk | 7 +-
lang/ghc7/distinfo | 50 +-
lang/ghc7/files/bootstrap.build.mk | 10 +
lang/ghc7/patches/patch-Makefile | 16 -
lang/ghc7/patches/patch-ghc.mk | 31 +-
lang/ghc7/patches/patch-libffi_ghc.mk | 41 -
lang/ghc7/patches/patch-libraries_base_GHC_Event_KQueue.hsc | 16 +
lang/ghc7/patches/patch-libraries_base_System_Environment.hs | 23 +
lang/ghc7/patches/patch-libraries_integer-gmp_configure.ac | 42 -
lang/ghc7/patches/patch-libraries_integer-simple_GHC_Integer.hs | 15 -
lang/ghc7/patches/patch-libraries_integer-simple_GHC_Integer_Type.hs | 24 -
lang/ghc7/patches/patch-libraries_time_Data_Time_Clock_CTimeval.hs | 33 -
lang/ghc7/patches/patch-libraries_time_lib_Data_Time_Clock_CTimeval.hs | 33 +
lang/ghc7/patches/patch-libraries_unix_System_Posix_Files.hsc | 15 -
lang/ghc7/patches/patch-libraries_unix_System_Posix_Files_Common.hsc | 35 +
lang/ghc7/patches/patch-libraries_unix_System_Posix_Signals.hsc | 9 +-
lang/ghc7/patches/patch-libraries_unix_cbits_execvpe.c | 29 -
lang/ghc7/patches/patch-libraries_unix_include_execvpe.h | 32 +-
lang/ghc7/patches/patch-mk_config.mk.in | 14 -
lang/ghc7/patches/patch-rts_Linker.c | 26 -
lang/ghc7/patches/patch-rts_PosixSource.h | 4 +-
lang/ghc7/patches/patch-rts_StgCRun.c | 33 -
lang/ghc7/patches/patch-rts_ghc.mk | 58 -
29 files changed, 298 insertions(+), 5955 deletions(-)
diffs (truncated from 6657 to 300 lines):
diff -r 73d3c0c7a9c1 -r 14dbd4e638a5 lang/ghc7/BOOTSTRAP.txt
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/ghc7/BOOTSTRAP.txt Sun Dec 29 16:59:08 2019 +0000
@@ -0,0 +1,20 @@
+GHC requires itself to build, and unfortunately the only way to get a
+working GHC for a foreign target is to do a cross-compilation.
+
+In order to build a bootkit for a new platform, you need to manually
+set up a cross-building C compiler and binutils, libc, libterminfo,
+and libiconv for the target. Then you can follow instructions in
+https://gitlab.haskell.org/ghc/ghc/wikis/building/cross-compiling
+
+Once you get a working GHC for the target platform, install it
+somewhere in your PATH, run "cd lang/ghc7; make clean; make bootstrap"
+on the target platform and you'll have a bootkit for the target.
+
+--
+
+GHC in fact has never supported bootstrapping only with a C compiler.
+Prior to GHC 7, it had a thing called "HC source", which was a set of
+C source files compiled from Haskell source, but it wasn't actually
+cross-platform. It was because HC files were generated with many
+assumptions about the platform, such as the layout of libc structs,
+the size of off_t and time_t, byte-order, word size, etc.
diff -r 73d3c0c7a9c1 -r 14dbd4e638a5 lang/ghc7/DESCR
--- a/lang/ghc7/DESCR Sun Dec 29 16:54:52 2019 +0000
+++ b/lang/ghc7/DESCR Sun Dec 29 16:59:08 2019 +0000
@@ -8,3 +8,8 @@
type-system extensions, exceptions, and so on. GHC comes with a
generational garbage collector, a space and time profiler, and a
comprehensive set of libraries.
+
+This package provides the 7.10.x release series, which is the last
+version that can bootstrap with 7.6.x. It will probably be removed
+once we make a separate package for GHC 8.0.x and get enough bootstrap
+kits for it.
diff -r 73d3c0c7a9c1 -r 14dbd4e638a5 lang/ghc7/Makefile
--- a/lang/ghc7/Makefile Sun Dec 29 16:54:52 2019 +0000
+++ b/lang/ghc7/Makefile Sun Dec 29 16:59:08 2019 +0000
@@ -1,32 +1,33 @@
-# $NetBSD: Makefile,v 1.36 2019/11/01 06:10:23 gutteridge Exp $
+# $NetBSD: Makefile,v 1.37 2019/12/29 16:59:08 pho Exp $
# -----------------------------------------------------------------------------
# Package metadata
#
-DISTNAME= ghc-7.6.3-src
+DISTNAME= ghc-7.10.3-src
PKGNAME= ${DISTNAME:S/-src$//}
-PKGREVISION= 14
CATEGORIES= lang
-MASTER_SITES= https://www.haskell.org/ghc/dist/${PKGVERSION_NOREV}/
-EXTRACT_SUFX= .tar.bz2
+MASTER_SITES= https://downloads.haskell.org/~ghc/${PKGVERSION_NOREV}/
+EXTRACT_SUFX= .tar.xz
MAINTAINER= pho%cielonegro.org@localhost
HOMEPAGE= https://www.haskell.org/ghc/
-COMMENT= Compiler for the functional language Haskell
+COMMENT= Compiler for the functional language Haskell - 7.10 Release Series
LICENSE= modified-bsd
+# TODO: We should be using the alternatives framework.
+CONFLICTS+= ghc-[0-9]*
+
# GHC requires GHC to build itself. Formerly we could work around this
# bootstrapping problem by creating a special archive containing C
# sources compiled from Haskell sources, but that's no longer
# possible. So we have to prepare stripped-down binaries sufficient to
# bootstrap compilers for each platforms. If you want to build them
-# yourself, follow an instruction in the ./TODO file.
+# yourself, follow instructions in ./bootstrap.mk
BROKEN_EXCEPT_ON_PLATFORM+= \
Darwin-*-powerpc \
FreeBSD-*-i386 \
- Linux-*-x86_64 \
- NetBSD-*-i386 \
NetBSD-*-x86_64 \
- SunOS-5.11-*
+ SunOS-*-i386 \
+ SunOS-*-x86_64
# -----------------------------------------------------------------------------
@@ -42,31 +43,39 @@
# -----------------------------------------------------------------------------
# Tools
#
+# The runtime dependency on perl is due to the evil splitter
+# (lib/${PKGNAME_NOREV}/ghc-split).
USE_TOOLS+= autoconf gmake gzip perl:run
GNU_CONFIGURE= yes
USE_GNU_CONFIGURE_HOST= no
USE_LIBTOOL= yes
-CONFIGURE_ARGS+= \
+CONFIGURE_ARGS.common= \
--with-gcc=${CC:Q} \
+ --with-curses-includes=${BUILDLINK_PREFIX.curses:Q}/${BUILDLINK_INCDIRS.curses:Q} \
+ --with-curses-libraries=${BUILDLINK_PREFIX.curses:Q}/${BUILDLINK_LIBDIRS.curses:Q} \
--with-gmp-includes=${BUILDLINK_PREFIX.gmp:Q}/${BUILDLINK_INCDIRS.gmp:Q} \
--with-gmp-libraries=${BUILDLINK_PREFIX.gmp:Q}/${BUILDLINK_LIBDIRS.gmp:Q} \
--with-iconv-includes=${BUILDLINK_PREFIX.iconv:Q}/${BUILDLINK_INCDIRS.iconv:Q} \
- --with-iconv-libraries=${BUILDLINK_PREFIX.iconv:Q}/${BUILDLINK_LIBDIRS.iconv:Q}
+ --with-iconv-libraries=${BUILDLINK_PREFIX.iconv:Q}/${BUILDLINK_LIBDIRS.iconv:Q} \
+ --with-system-libffi \
+ --with-ffi-includes=${BUILDLINK_PREFIX.libffi:Q}/${BUILDLINK_INCDIRS.libffi:Q} \
+ --with-ffi-libraries=${BUILDLINK_PREFIX.libffi:Q}/${BUILDLINK_LIBDIRS.libffi:Q}
+
+CONFIGURE_ARGS+= ${CONFIGURE_ARGS.common}
CONFIGURE_ENV+= \
ac_cv_path_fp_prog_ar=${AR:Q} \
PerlCmd=${PERL5:Q}
-# CFLAGS and LDFLAGS are currently not honored by "./configure". Since
-# LDFLAGS contains rpath flags it's very important to force GHC to
-# honor it. Otherwise neither GHC itself nor executables it produces
-# will have any rpaths so users will have to put "${PREFIX}/lib" into
-# their "/etc/ld-elf.so.conf". See
+# LDFLAGS is currently not honored by "./configure". Since LDFLAGS
+# contains rpath flags it's very important to force GHC to honor
+# it. Otherwise neither GHC itself nor executables it produces will
+# have any rpaths so users will have to put "${PREFIX}/lib" into their
+# "/etc/ld-elf.so.conf". See
# http://hackage.haskell.org/trac/ghc/ticket/2933
.for stage in 0 1 2
CONFIGURE_ENV+= \
- CONF_CC_OPTS_STAGE${stage}=${CFLAGS:Q} \
CONF_GCC_LINKER_OPTS_STAGE${stage}=${LDFLAGS:Q}
# Note that CONF_LD_LINKER_OPTS_STAGE{0,1,2} are only used for
# creating static GHCi libraries (HS*.o). Setting them to ${LDFLAGS}
@@ -77,10 +86,19 @@
# the buildlink.
.endfor
-NOT_PAX_MPROTECT_SAFE+= lib/${PKGNAME_NOREV}/ghc
-NOT_PAX_MPROTECT_SAFE+= lib/${PKGNAME_NOREV}/ghc-pkg
-NOT_PAX_ASLR_SAFE+= lib/${PKGNAME_NOREV}/ghc
-NOT_PAX_ASLR_SAFE+= lib/${PKGNAME_NOREV}/ghc-pkg
+# The runtime system of GHC (rts) tends to conflict with PaX MPROTECT
+# because it needs to generate various kinds of code at run time. The
+# RTS linker, whose job is to load *static* objects at run time,
+# doesn't play nice with ASLR either. This means most executables
+# produced by GHC need them to be disabled. Perhaps we should patch
+# rts/sm/Storage.c so that it uses ffi_closure_alloc(3) on every
+# platform, not just Linux, and also drop support for static library
+# loading and switch to dynamic libraries entirely.
+.for f in ghc ghc-pkg haddock hpc hsc2hs runghc
+NOT_PAX_MPROTECT_SAFE+= lib/${PKGNAME_NOREV}/bin/${f}
+NOT_PAX_ASLR_SAFE+= lib/${PKGNAME_NOREV}/bin/${f}
+.endfor
+
# -----------------------------------------------------------------------------
# Build hooks
@@ -92,34 +110,16 @@
${RUN} cd ${WRKSRC:Q}/libraries/base && autoconf
${RUN} cd ${WRKSRC:Q}/libraries/integer-gmp && autoconf
-
# Define the target "pre-configure" and non-standard "bootstrap".
.include "../../lang/ghc7/bootstrap.mk"
# Our pre-configure phase installs a bindist of bootstrapping compiler
# directly into TOOLS_DIR so that ./configure can find it.
-
# Here we generate mk/build.mk dynamically.
post-configure:
${RUN} ${RM} -f ${WRKSRC:Q}/mk/build.mk
-# See https://ghc.haskell.org/trac/ghc/ticket/10096
- ${RUN} ${ECHO} "libraries/terminfo_CONFIGURE_OPTS += \
- --configure-option=--with-curses-includes=${BUILDLINK_PREFIX.curses:Q}/${BUILDLINK_INCDIRS.curses:Q} \
- --configure-option=--with-curses-libraries=${BUILDLINK_PREFIX.curses:Q}/${BUILDLINK_LIBDIRS.curses:Q}" \
- >> ${WRKSRC:Q}/mk/build.mk
-
-# The ghc compiler does normally split the generated asm files into small
-# parts before sending them to gcc, to enable the linker to eliminate
-# unused parts. This does however not play nice with the pkgsrc
-# framework, and the result is that the build takes more than 5 times
-# as long than when the files are not split. See
-# http://mail-index.netbsd.org/tech-pkg/2006/07/30/0005.html
-# for a description of the problem.
-# Disable file splitting until pkgsrc gets improved.
- ${RUN} ${ECHO} "SplitObjs = NO" >> ${WRKSRC:Q}/mk/build.mk
-
# If there is HsColour in the PATH, GHC's build system tries to use it
# without even checking if it really works. That's not what we
# appreciate.
@@ -145,18 +145,13 @@
# -----------------------------------------------------------------------------
# PLIST
#
-# We can't use static PLIST because the package installs some files
-# whose names are randomly generated, namely
-# lib/${PKGNAME}/package.conf.d/*.conf
-#
-PRINT_PLIST_AWK+= /lib\/${PKGNAME_NOREV}\/package\.conf\.d/ { next; }
+# We can't use static PLIST because the package installs files with a
+# hashed name. And "PLIST_TYPE = dynamic" appears to be broken atm
+# [2019-12-27; pho].
+GENERATE_PLIST+= \
+ cd ${DESTDIR:Q}${PREFIX:Q} && \
+ ${FIND} * \( -type f -o -type l \) | ${SORT};
-# If we were lucky we could just use "PLIST_TYPE = dynamic", but the
-# feature has seemingly bitrotted.
-.include "../../mk/bsd.prefs.mk"
-GENERATE_PLIST+= \
- cd ${DESTDIR}${PREFIX} && \
- ${FIND} lib/${PKGNAME_NOREV}/package.conf.d -xdev -newer ${_COOKIE.extract} \! -type d -print | ${SORT} -d;
# -----------------------------------------------------------------------------
# Sanity checks
@@ -165,26 +160,25 @@
# There is an unused script which don't pass the portability test.
CHECK_PORTABILITY_SKIP+= distrib/prep-bin-dist-mingw
-# Dynamic Haskell libraries currently have no rpaths to any dependent
-# Haskell libraries so we must skip shlibs check for them. Note that
-# the situation seems to be changed in GHC 7.8.1 so we should
-# readdress this later. See
-# https://ghc.haskell.org/trac/ghc/ticket/8266 (slightly off-topic but
-# pho@ found no description for the -fuse-rpath flag.)
-.if !empty(PKGNAME:Mghc-7.6.*)
+# Dynamically linked Haskell executables and libraries have rpaths to
+# dependent Haskell libraries, but the problem is that they are
+# specified with $ORIGIN, which isn't currently supported by
+# ../../mk/check/check-shlibs-elf.awk.
CHECK_SHLIBS_SKIP+= */libHS*-ghc${PKGVERSION_NOREV}.*
-.endif
+.for f in ghc ghc-pkg haddock hpc hsc2hs runghc
+CHECK_SHLIBS_SKIP+= lib/${PKGNAME_NOREV}/bin/${f}
+.endfor
# ghc57207_0.s: failed to add inputs for merge: Resource temporarily unavailable
-CTF_FILES_SKIP+= */libHSghc-7.6.3-ghc7.6.3.so
+CTF_FILES_SKIP+= */libHS*-ghc${PKGVERSION_NOREV}.*
# ld: fatal: relocation error ... relocation requires reference symbol
STRIP_FILES_SKIP+= lib/${PKGNAME_NOREV}/libHSrts.a
+
# -----------------------------------------------------------------------------
# Dependencies
#
-
BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
@@ -196,10 +190,11 @@
# In a sandboxed build environment, we have to reach over to the
# installed libraries themselves, since the symlinks compat80 adds
# to the /usr tree can't be applied.
-MAKE_ENV+= LD_LIBRARY_PATH=${LOCALBASE}/emul/netbsd/usr/lib
+MAKE_ENV+= LD_LIBRARY_PATH=${PREFIX:Q}/emul/netbsd/usr/lib
.endif
.include "../../converters/libiconv/buildlink3.mk"
+.include "../../devel/libffi/buildlink3.mk"
.include "../../devel/gmp/buildlink3.mk"
.include "../../mk/curses.buildlink3.mk"
.include "../../mk/pthread.buildlink3.mk"
diff -r 73d3c0c7a9c1 -r 14dbd4e638a5 lang/ghc7/PLIST
--- a/lang/ghc7/PLIST Sun Dec 29 16:54:52 2019 +0000
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,5384 +0,0 @@
-@comment $NetBSD: PLIST,v 1.2 2014/05/21 16:07:59 jperkin Exp $
-bin/ghc
-bin/${PKGNAME}
-bin/ghc-pkg
-bin/ghc-pkg-${PKGVERSION}
-bin/ghci
-bin/ghci-${PKGVERSION}
-bin/haddock
-bin/haddock-${PKGNAME}
-bin/hp2ps
-bin/hpc
-bin/hsc2hs
-bin/runghc
-bin/run${PKGNAME}
-bin/runhaskell
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/CopyFile.dyn_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/CopyFile.hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/CopyFile.p_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/Exception.dyn_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/Exception.hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/Exception.p_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/ReadP.dyn_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/ReadP.hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/ReadP.p_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/TempFile.dyn_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/TempFile.hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compat/TempFile.p_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compiler.dyn_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compiler.hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/Compiler.p_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/GetOpt.dyn_hi
-lib/${PKGNAME}/Cabal-1.16.0/Distribution/GetOpt.hi
Home |
Main Index |
Thread Index |
Old Index