[Git][ghc/ghc][wip/ghc-9.10] 4 commits: ghc-bignum: remove obsolete ln script

Ben Gamari (@bgamari) gitlab at gitlab.haskell.org
Thu Apr 25 16:54:52 UTC 2024



Ben Gamari pushed to branch wip/ghc-9.10 at Glasgow Haskell Compiler / GHC


Commits:
5f4848c0 by Cheng Shao at 2024-04-25T12:54:20-04:00
ghc-bignum: remove obsolete ln script

This commit removes an obsolete ln script in ghc-bignum/gmp. See
060251c24ad160264ae8553efecbb8bed2f06360 for its original intention,
but it's been obsolete for a long time, especially since the removal
of the make build system. Hence the house cleaning.

(cherry picked from commit c62dc317c21026396a7a5581b90d17ef4c44f9ac)

- - - - -
f845a792 by Cheng Shao at 2024-04-25T12:54:22-04:00
ghc-bignum: update gmp to 6.3.0

This patch bumps the gmp-tarballs submodule and updates gmp to 6.3.0.
The tarball format is now xz, and gmpsrc.patch has been patched into
the tarball so hadrian no longer needs to deal with patching logic
when building in-tree GMP.

(cherry picked from commit 6399d52ba10d510a94c9db6552a4ea8aae8e003b)

- - - - -
92065500 by Cheng Shao at 2024-04-25T12:54:23-04:00
hadrian: remove obsolete Patch logic

This commit removes obsolete Patch logic from hadrian, given we no
longer need to patch the gmp tarball when building in-tree GMP.

(cherry picked from commit 65b4b92fa1e1989d055108a6077cc9119ee28acd)

- - - - -
1e77ded1 by Cheng Shao at 2024-04-25T12:54:24-04:00
autoconf: remove obsolete patch detection

This commit removes obsolete deletection logic of the patch command
from autoconf scripts, given we no longer need to patch anything in
the GHC build process.

(cherry picked from commit 71f28958454872db9c21c7d974dd0f0a7c7e8f3d)

- - - - -


7 changed files:

- configure.ac
- hadrian/cfg/system.config.in
- hadrian/src/Builder.hs
- hadrian/src/Rules/Gmp.hs
- libraries/ghc-bignum/gmp/gmp-tarballs
- − libraries/ghc-bignum/gmp/gmpsrc.patch
- − libraries/ghc-bignum/gmp/ln


Changes:

=====================================
configure.ac
=====================================
@@ -735,10 +735,6 @@ dnl ** check for tar
 dnl   if GNU tar is named gtar, look for it first.
 AC_PATH_PROGS(TarCmd,gnutar gtar tar,tar)
 
-dnl ** check for patch
-dnl if GNU patch is named gpatch, look for it first
-AC_PATH_PROGS(PatchCmd,gpatch patch, patch)
-
 dnl ** check for autoreconf
 AC_PATH_PROG(AutoreconfCmd, autoreconf, autoreconf)
 


=====================================
hadrian/cfg/system.config.in
=====================================
@@ -17,7 +17,6 @@ sphinx-build   = @SPHINXBUILD@
 system-ghc     = @WithGhc@
 system-ghc-pkg = @GhcPkgCmd@
 tar            = @TarCmd@
-patch          = @PatchCmd@
 xelatex        = @XELATEX@
 makeindex      = @MAKEINDEX@
 makeinfo       = @MAKEINFO@


=====================================
hadrian/src/Builder.hs
=====================================
@@ -8,10 +8,7 @@ module Builder (
     -- * Builder properties
     builderProvenance, systemBuilderPath, builderPath, isSpecified, needBuilders,
     runBuilder, runBuilderWith, runBuilderWithCmdOptions, getBuilderPath,
-    builderEnvironment,
-
-    -- * Ad hoc builder invocation
-    applyPatch
+    builderEnvironment
     ) where
 
 import Control.Exception.Extra (Partial)
@@ -182,7 +179,6 @@ data Builder = Alex
              | MergeObjects Stage -- ^ linker to be used to merge object files.
              | Nm
              | Objdump
-             | Patch
              | Python
              | Ranlib
              | Testsuite TestMode
@@ -439,7 +435,6 @@ systemBuilderPath builder = case builder of
     Makeinfo        -> fromKey "makeinfo"
     Nm              -> fromTargetTC "nm" (Toolchain.nmProgram . tgtNm)
     Objdump         -> fromKey "objdump"
-    Patch           -> fromKey "patch"
     Python          -> fromKey "python"
     Ranlib          -> fromTargetTC "ranlib" (maybeProg Toolchain.ranlibProgram . tgtRanlib)
     Testsuite _     -> fromKey "python"
@@ -507,15 +502,6 @@ systemBuilderPath builder = case builder of
 isSpecified :: Builder -> Action Bool
 isSpecified = fmap (not . null) . systemBuilderPath
 
--- | Apply a patch by executing the 'Patch' builder in a given directory.
-applyPatch :: FilePath -> FilePath -> Action ()
-applyPatch dir patch = do
-    let file = dir -/- patch
-    needBuilders [Patch]
-    path <- builderPath Patch
-    putBuild $ "| Apply patch " ++ file
-    quietly $ cmd' [Cwd dir, FileStdin file] [path, "-p0"]
-
 -- Note [cmd wrapper]
 -- ~~~~~~~~~~~~~~~~~~
 -- `cmd'` is a wrapper for Shake's `cmd` that allows us to customize what is


=====================================
hadrian/src/Rules/Gmp.hs
=====================================
@@ -143,23 +143,18 @@ gmpRules = do
                 gmpP      = takeDirectory gmpBuildP
             ctx <- makeGmpPathContext gmpP
             removeDirectory gmpBuildP
-            -- Note: We use a tarball like gmp-4.2.4-nodoc.tar.bz2, which is
-            -- gmp-4.2.4.tar.bz2 repacked without the doc/ directory contents.
+            -- Note: We use a tarball like gmp-4.2.4-nodoc.tar.xz, which is
+            -- gmp-4.2.4.tar.xz repacked without the doc/ directory contents.
             -- That's because the doc/ directory contents are under the GFDL,
             -- which causes problems for Debian.
             tarball <- unifyPath . fromSingleton "Exactly one GMP tarball is expected"
-                   <$> getDirectoryFiles top [gmpBase -/- "gmp-tarballs/gmp*.tar.bz2"]
+                   <$> getDirectoryFiles top [gmpBase -/- "gmp-tarballs/gmp*.tar.xz"]
 
             withTempDir $ \dir -> do
                 let tmp = unifyPath dir
                 need [top -/- tarball]
                 build $ target ctx (Tar Extract) [top -/- tarball] [tmp]
 
-                let patch     = gmpBase -/- "gmpsrc.patch"
-                    patchName = takeFileName patch
-                copyFile patch $ tmp -/- patchName
-                applyPatch tmp patchName
-
                 let name    = dropExtension . dropExtension $ takeFileName tarball
                     unpack  = fromMaybe . error $ "gmpRules: expected suffix "
                         ++ "-nodoc (found: " ++ name ++ ")."


=====================================
libraries/ghc-bignum/gmp/gmp-tarballs
=====================================
@@ -1 +1 @@
-Subproject commit 4f26049af40afb380eaf033ab91404cd2e214919
+Subproject commit 01149ce3471128e9fe0feca607579981f4b64395


=====================================
libraries/ghc-bignum/gmp/gmpsrc.patch deleted
=====================================
@@ -1,44 +0,0 @@
-diff -Naur gmp-6.2.1/Makefile.am gmpbuild/Makefile.am
---- gmp-6.2.1/Makefile.am	2020-11-15 02:45:09.000000000 +0800
-+++ gmpbuild/Makefile.am	2021-01-09 22:56:14.571708858 +0800
-@@ -112,7 +112,7 @@
- LIBGMPXX_LT_AGE      = 6
- 
- 
--SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune doc
-+SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune
- 
- EXTRA_DIST = configfsf.guess configfsf.sub .gdbinit INSTALL.autoconf \
- 	     COPYING.LESSERv3 COPYINGv2 COPYINGv3
-diff -Naur gmp-6.2.1/Makefile.in gmpbuild/Makefile.in
---- gmp-6.2.1/Makefile.in	2020-11-15 02:45:16.000000000 +0800
-+++ gmpbuild/Makefile.in	2021-01-10 16:15:37.387670402 +0800
-@@ -572,7 +572,7 @@
- LIBGMPXX_LT_CURRENT = 10
- LIBGMPXX_LT_REVISION = 1
- LIBGMPXX_LT_AGE = 6
--SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune doc
-+SUBDIRS = tests mpn mpz mpq mpf printf scanf rand cxx demos tune
- 
- # Put asl.h here for now.
- 
-diff -Naur gmp-6.2.1/configure gmpbuild/configure
---- gmp-6.2.1/configure	2020-11-15 02:45:15.000000000 +0800
-+++ gmpbuild/configure	2021-01-10 16:13:59.196004951 +0800
-@@ -27985,7 +27985,7 @@
- # FIXME: Upcoming version of autoconf/automake may not like broken lines.
- #        Right now automake isn't accepting the new AC_CONFIG_FILES scheme.
- 
--ac_config_files="$ac_config_files Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile doc/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in gmp.pc:gmp.pc.in gmpxx.pc:gmpxx.pc.in"
-+ac_config_files="$ac_config_files Makefile mpf/Makefile mpn/Makefile mpq/Makefile mpz/Makefile printf/Makefile scanf/Makefile rand/Makefile cxx/Makefile tests/Makefile tests/devel/Makefile tests/mpf/Makefile tests/mpn/Makefile tests/mpq/Makefile tests/mpz/Makefile tests/rand/Makefile tests/misc/Makefile tests/cxx/Makefile tune/Makefile demos/Makefile demos/calc/Makefile demos/expr/Makefile gmp.h:gmp-h.in gmp.pc:gmp.pc.in gmpxx.pc:gmpxx.pc.in"
- 
- cat >confcache <<\_ACEOF
- # This file is a shell script that caches the results of configure
-@@ -29129,7 +29129,6 @@
-     "tests/rand/Makefile") CONFIG_FILES="$CONFIG_FILES tests/rand/Makefile" ;;
-     "tests/misc/Makefile") CONFIG_FILES="$CONFIG_FILES tests/misc/Makefile" ;;
-     "tests/cxx/Makefile") CONFIG_FILES="$CONFIG_FILES tests/cxx/Makefile" ;;
--    "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
-     "tune/Makefile") CONFIG_FILES="$CONFIG_FILES tune/Makefile" ;;
-     "demos/Makefile") CONFIG_FILES="$CONFIG_FILES demos/Makefile" ;;
-     "demos/calc/Makefile") CONFIG_FILES="$CONFIG_FILES demos/calc/Makefile" ;;


=====================================
libraries/ghc-bignum/gmp/ln deleted
=====================================
@@ -1,3 +0,0 @@
-#!/bin/sh
-exit 1
-



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/be59c02ce0035900fe9223a5a2391d53f6f6f68b...1e77ded14cac81998f211d2990b37b9ecded2fa7

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/be59c02ce0035900fe9223a5a2391d53f6f6f68b...1e77ded14cac81998f211d2990b37b9ecded2fa7
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240425/ad0b22b1/attachment-0001.html>


More information about the ghc-commits mailing list