pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/lang/ghc98
Module Name: pkgsrc
Committed By: pho
Date: Mon May 6 02:26:40 UTC 2024
Modified Files:
pkgsrc/lang/ghc98: Makefile bootstrap.mk distinfo
pkgsrc/lang/ghc98/files: UserSettings.hs
Added Files:
pkgsrc/lang/ghc98/patches: patch-m4_fp__find__cxx__std__lib.m4
Log Message:
lang/ghc98: Built a bootkit for Darwin/aarch64
I used the official binary distribution from the upstream to build this one. Glad I didn't have to cross-build it...
To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 pkgsrc/lang/ghc98/Makefile \
pkgsrc/lang/ghc98/bootstrap.mk
cvs rdiff -u -r1.3 -r1.4 pkgsrc/lang/ghc98/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/lang/ghc98/files/UserSettings.hs
cvs rdiff -u -r0 -r1.1 \
pkgsrc/lang/ghc98/patches/patch-m4_fp__find__cxx__std__lib.m4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/lang/ghc98/Makefile
diff -u pkgsrc/lang/ghc98/Makefile:1.2 pkgsrc/lang/ghc98/Makefile:1.3
--- pkgsrc/lang/ghc98/Makefile:1.2 Sun Apr 28 16:23:44 2024
+++ pkgsrc/lang/ghc98/Makefile Mon May 6 02:26:39 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2024/04/28 16:23:44 pho Exp $
+# $NetBSD: Makefile,v 1.3 2024/05/06 02:26:39 pho Exp $
# -----------------------------------------------------------------------------
# Package metadata
#
@@ -19,6 +19,7 @@ UNLIMIT_RESOURCES= cputime datasize virt
# GHC requires GHC to build itself. We have to prepare stripped-down
# binaries sufficient to bootstrap compilers for each platform. If you want
# to build them yourself, follow instructions in files/BOOTSTRAP.md.
+BROKEN_EXCEPT_ON_PLATFORM+= Darwin-*-aarch64
BROKEN_EXCEPT_ON_PLATFORM+= Darwin-*-x86_64
BROKEN_EXCEPT_ON_PLATFORM+= FreeBSD-*-i386
BROKEN_EXCEPT_ON_PLATFORM+= FreeBSD-*-x86_64
Index: pkgsrc/lang/ghc98/bootstrap.mk
diff -u pkgsrc/lang/ghc98/bootstrap.mk:1.2 pkgsrc/lang/ghc98/bootstrap.mk:1.3
--- pkgsrc/lang/ghc98/bootstrap.mk:1.2 Wed May 1 03:22:32 2024
+++ pkgsrc/lang/ghc98/bootstrap.mk Mon May 6 02:26:39 2024
@@ -1,4 +1,4 @@
-# $NetBSD: bootstrap.mk,v 1.2 2024/05/01 03:22:32 pho Exp $
+# $NetBSD: bootstrap.mk,v 1.3 2024/05/06 02:26:39 pho Exp $
# -----------------------------------------------------------------------------
# Select a bindist of bootstrapping compiler on a per-platform basis. See
# ./files/BOOTSTRAP.md for details.
@@ -34,6 +34,12 @@ HADRIAN_BOOT_SOURCE= ghc-${BOOT_VERSION}
# version uncomment the first definition and remove the second
# one. [2024-04-27; pho]
+.if ${MACHINE_PLATFORM:MDarwin-*-aarch64} || make(distinfo) || make (makesum) || make(mdi)
+BOOT_VERSION:= 9.4.7
+BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-aarch64-apple-darwin.tar.xz
+DISTFILES:= ${DISTFILES} ${BOOT_ARCHIVE} ${HADRIAN_BOOT_SOURCE} # Available in LOCAL_PORTS
+.endif
+
.if ${MACHINE_PLATFORM:MDarwin-*-x86_64} || make(distinfo) || make (makesum) || make(mdi)
BOOT_VERSION:= 9.4.7
BOOT_ARCHIVE:= ghc-${BOOT_VERSION}-boot-x86_64-apple-darwin.tar.xz
@@ -267,7 +273,7 @@ HADRIAN_ARGS.boot+= --flavour=bootkit+sp
.if make(bootstrap)
BOOT_GHC_VERSION_CMD= ghc --numeric-version
BOOT_GHC_VERSION!= (${BOOT_GHC_VERSION_CMD}) 2>/dev/null || ${ECHO}
-HADRIAN_BOOT_SOURCE:= ghc-${BOOT_GHC_VERSION}-boot-hadrian.tar.gz
+HADRIAN_BOOT_SOURCE:= ${HADRIAN_BOOT_SOURCE:S/${BOOT_VERSION}/${BOOT_GHC_VERSION}/}
.endif
.PHONY: pre-bootstrap
Index: pkgsrc/lang/ghc98/distinfo
diff -u pkgsrc/lang/ghc98/distinfo:1.3 pkgsrc/lang/ghc98/distinfo:1.4
--- pkgsrc/lang/ghc98/distinfo:1.3 Wed May 1 03:22:32 2024
+++ pkgsrc/lang/ghc98/distinfo Mon May 6 02:26:39 2024
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.3 2024/05/01 03:22:32 pho Exp $
+$NetBSD: distinfo,v 1.4 2024/05/06 02:26:39 pho Exp $
+BLAKE2s (ghc-9.4.7-boot-aarch64-apple-darwin.tar.xz) = c771cfa45f5635bdf8175775cf7a67c9541bd5b4d4927ed9b5189e3dcefcd2ba
+SHA512 (ghc-9.4.7-boot-aarch64-apple-darwin.tar.xz) = 3d50e4c6605ebfa7eef018d3e9e11e8115cf2f97e24a5adfc05fd1bab152c726e240f9a213d73e220dc7fc5b9358df74eee0d4cb1b77bd5491f28899c831b1a4
+Size (ghc-9.4.7-boot-aarch64-apple-darwin.tar.xz) = 109805384 bytes
BLAKE2s (ghc-9.4.7-boot-aarch64-unknown-netbsd.tar.xz) = a691117b405b9f7954b954acc382b3357a9ff8c98151514c82d18d83da397940
SHA512 (ghc-9.4.7-boot-aarch64-unknown-netbsd.tar.xz) = 1c917a52a020be3a1878f9d7e8e4c47d31180e54248c127a60706c1053a95b2d8a487f79e7fb5daa725178f271a7cc17e4e7b47ce2119f8546e259c63b9864d8
Size (ghc-9.4.7-boot-aarch64-unknown-netbsd.tar.xz) = 90305900 bytes
@@ -50,6 +53,7 @@ SHA1 (patch-libraries_unix_System_Posix_
SHA1 (patch-libraries_unix_System_Posix_Signals.hsc) = ee59a04571881382bcfd9fc82bf196ff86a40ed5
SHA1 (patch-libraries_unix_System_Posix_User.hsc) = b583f591838fe2d7f42241787e02c5385d336939
SHA1 (patch-libraries_unix_System_Posix_User_ByteString.hsc) = 2a331de2292835ae6904980facd8201705fa63e8
+SHA1 (patch-m4_fp__find__cxx__std__lib.m4) = 35196c70e462df054f6b06c299474937a1b71b58
SHA1 (patch-m4_fptools__set__haskell__platform__vars.m4) = 8c7a7ab965f4df8a68bedb35c32ee32c59ac2c94
SHA1 (patch-utils_haddock_driver_Main.hs) = 26b015d3aef9fdff66e66c8e3d9a370a2dbd7067
SHA1 (patch-utils_haddock_haddock.cabal) = c8a244f2f341b736b65b218590d1a3a8309f55ba
Index: pkgsrc/lang/ghc98/files/UserSettings.hs
diff -u pkgsrc/lang/ghc98/files/UserSettings.hs:1.1 pkgsrc/lang/ghc98/files/UserSettings.hs:1.2
--- pkgsrc/lang/ghc98/files/UserSettings.hs:1.1 Sun Apr 28 05:58:57 2024
+++ pkgsrc/lang/ghc98/files/UserSettings.hs Mon May 6 02:26:39 2024
@@ -1,4 +1,4 @@
--- $NetBSD: UserSettings.hs,v 1.1 2024/04/28 05:58:57 pho Exp $
+-- $NetBSD: UserSettings.hs,v 1.2 2024/05/06 02:26:39 pho Exp $
--
-- This is a Hadrian settings file to override some defaults in a way which
-- isn't possible through command-line options. It is only used during the
@@ -10,6 +10,7 @@ module UserSettings (
verboseCommand, buildProgressColour, successColour, finalStage
) where
+import qualified Data.Set as Set
import Flavour.Type
import Expression
import {-# SOURCE #-} Settings.Default
@@ -33,16 +34,16 @@ bootkitFlavour =
, bignumBackend = "native"
-- We only want vanilla libraries and RTS. No profiling, no shared
-- libraries, no debugging.
- , libraryWays = pure [vanilla]
- , rtsWays = pure [vanilla]
+ , libraryWays = Set.fromList <$> pure [vanilla]
+ , rtsWays = Set.fromList <$> pure [vanilla]
-- Don't build or use dynamic Haskell libraries.
, dynamicGhcPrograms = pure False
-- Build GHC as minimally as possible.
- , ghciWithDebugger = False
- , ghcProfiled = False
- , ghcDebugged = False
- , ghcDebugAssertions = False
- , ghcThreaded = False
+ , ghciWithDebugger = const False
+ , ghcProfiled = const False
+ , ghcDebugged = const False
+ , ghcDebugAssertions = const False
+ , ghcThreaded = const False
-- This is a bootstrap compiler. We don't want any kinds of
-- documentation.
, ghcDocs = pure mempty
Added files:
Index: pkgsrc/lang/ghc98/patches/patch-m4_fp__find__cxx__std__lib.m4
diff -u /dev/null pkgsrc/lang/ghc98/patches/patch-m4_fp__find__cxx__std__lib.m4:1.1
--- /dev/null Mon May 6 02:26:40 2024
+++ pkgsrc/lang/ghc98/patches/patch-m4_fp__find__cxx__std__lib.m4 Mon May 6 02:26:40 2024
@@ -0,0 +1,39 @@
+$NetBSD: patch-m4_fp__find__cxx__std__lib.m4,v 1.1 2024/05/06 02:26:40 pho Exp $
+
+$CXX must not be quoted because it may contain flags. The same goes for
+$CC. This causes a configuration failure on MacOS X 14 where AC_PROG_CXX
+sets $CXX to "clang++ -std=gnu++11".
+
+TODO: Upstream this.
+
+--- m4/fp_find_cxx_std_lib.m4.orig 2024-05-05 18:35:55.965776858 +0000
++++ m4/fp_find_cxx_std_lib.m4
+@@ -26,7 +26,7 @@ unknown
+ #endif
+ EOF
+ AC_MSG_CHECKING([C++ standard library flavour])
+- if ! "$CXX" -E actest.cpp -o actest.out; then
++ if ! $CXX -E actest.cpp -o actest.out; then
+ rm -f actest.cpp actest.out
+ AC_MSG_ERROR([Failed to compile test program])
+ fi
+@@ -54,16 +54,16 @@ int main(int argc, char** argv) {
+ return 0;
+ }
+ EOF
+- if ! "$CXX" -c actest.cpp; then
++ if ! $CXX -c actest.cpp; then
+ AC_MSG_ERROR([Failed to compile test object])
+ fi
+
+ try_libs() {
+ dnl Try to link a plain object with CC manually
+ AC_MSG_CHECKING([for linkage against '${3}'])
+- if "$CC" -o actest actest.o ${1} 2>/dev/null; then
++ if $CC -o actest actest.o ${1} 2>/dev/null; then
+ CXX_STD_LIB_LIBS="${3}"
+- p="`"$CXX" --print-file-name ${2}`"
++ p="`$CXX --print-file-name ${2}`"
+ d="`dirname "$p"`"
+ dnl On some platforms (e.g. Windows) the C++ standard library
+ dnl can be found in the system search path. In this case $CXX
Home |
Main Index |
Thread Index |
Old Index