aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/rust.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2024-05-02 21:37:52 +0200
committerRicardo Wurmus <rekado@elephly.net>2024-05-05 22:38:17 +0200
commit6244177e793b0e48090973875b23b65967f28504 (patch)
tree0cfb6db4a6ddde17a42d04b8b5d66e55361671e1 /gnu/packages/rust.scm
parentee9720b2f012d32252f36b698a687a54f60549c1 (diff)
downloadguix-6244177e793b0e48090973875b23b65967f28504.tar.gz
guix-6244177e793b0e48090973875b23b65967f28504.zip
gnu: snakemake-6: Make compatible with tabulate 0.9.0.
* gnu/packages/python-xyz.scm (snakemake-6)[arguments]: Add phase 'tabulate-compatibility. Change-Id: I0471726e2000af76871e2542ed347cd1727bf0c9
Diffstat (limited to 'gnu/packages/rust.scm')
0 files changed, 0 insertions, 0 deletions
b1ef'>gnu/packages/assembly.scm4
-rw-r--r--gnu/packages/attr.scm19
-rw-r--r--gnu/packages/backup.scm30
-rw-r--r--gnu/packages/base.scm98
-rw-r--r--gnu/packages/bash.scm47
-rw-r--r--gnu/packages/bdw-gc.scm23
-rw-r--r--gnu/packages/bison.scm14
-rw-r--r--gnu/packages/boost.scm4
-rw-r--r--gnu/packages/bootstrap.scm449
-rwxr-xr-xgnu/packages/bootstrap/aarch64-linux/bashbin1162056 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/aarch64-linux/mkdirbin558216 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/aarch64-linux/tarbin1085128 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/aarch64-linux/xzbin738576 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/armhf-linux/bashbin802224 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/armhf-linux/mkdirbin401544 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/armhf-linux/tarbin755356 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/armhf-linux/xzbin502884 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/i686-linux/bashbin1351732 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/i686-linux/mkdirbin714316 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/i686-linux/tarbin1285420 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/i686-linux/xzbin861836 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/mips64el-linux/bashbin1409080 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/mips64el-linux/mkdirbin698500 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/mips64el-linux/tarbin1283708 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/mips64el-linux/xzbin851736 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/x86_64-linux/bashbin1425560 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/x86_64-linux/mkdirbin792448 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/x86_64-linux/tarbin1369912 -> 0 bytes-rwxr-xr-xgnu/packages/bootstrap/x86_64-linux/xzbin927264 -> 0 bytes-rw-r--r--gnu/packages/build-tools.scm4
-rw-r--r--gnu/packages/check.scm61
-rw-r--r--gnu/packages/cmake.scm101
-rw-r--r--gnu/packages/commencement.scm1691
-rw-r--r--gnu/packages/compression.scm40
-rw-r--r--gnu/packages/cross-base.scm53
-rw-r--r--gnu/packages/crypto.scm8
-rw-r--r--gnu/packages/curl.scm34
-rw-r--r--gnu/packages/databases.scm2
-rw-r--r--gnu/packages/dbm.scm4
-rw-r--r--gnu/packages/ed.scm6
-rw-r--r--gnu/packages/emulators.scm6
-rw-r--r--gnu/packages/file.scm9
-rw-r--r--gnu/packages/fontutils.scm19
-rw-r--r--gnu/packages/games.scm16
-rw-r--r--gnu/packages/gawk.scm4
-rw-r--r--gnu/packages/gcc.scm8
-rw-r--r--gnu/packages/gd.scm13
-rw-r--r--gnu/packages/ghostscript.scm22
-rw-r--r--gnu/packages/glib.scm20
-rw-r--r--gnu/packages/gnome.scm9
-rw-r--r--gnu/packages/gnupg.scm20
-rw-r--r--gnu/packages/groff.scm67
-rw-r--r--gnu/packages/gsasl.scm4
-rw-r--r--gnu/packages/gtk.scm6
-rw-r--r--gnu/packages/guile.scm2
-rw-r--r--gnu/packages/icu4c.scm7
-rw-r--r--gnu/packages/image.scm89
-rw-r--r--gnu/packages/inkscape.scm8
-rw-r--r--gnu/packages/jemalloc.scm4
-rw-r--r--gnu/packages/kerberos.scm25
-rw-r--r--gnu/packages/libevent.scm8
-rw-r--r--gnu/packages/libffi.scm30
-rw-r--r--gnu/packages/libidn.scm4
-rw-r--r--gnu/packages/libreoffice.scm8
-rw-r--r--gnu/packages/libusb.scm2
-rw-r--r--gnu/packages/linux.scm33
-rw-r--r--gnu/packages/machine-learning.scm4
-rw-r--r--gnu/packages/make-bootstrap.scm109
-rw-r--r--gnu/packages/man.scm16
-rw-r--r--gnu/packages/maths.scm4
-rw-r--r--gnu/packages/mes.scm51
-rw-r--r--gnu/packages/mpd.scm17
-rw-r--r--gnu/packages/multiprecision.scm4
-rw-r--r--gnu/packages/node.scm2
-rw-r--r--gnu/packages/openldap.scm4
-rw-r--r--gnu/packages/patches/acl-fix-perl-regex.patch22
-rw-r--r--gnu/packages/patches/acl-hurd-path-max.patch80
-rw-r--r--gnu/packages/patches/aspell-gcc-compat.patch31
-rw-r--r--gnu/packages/patches/binutils-boot-2.20.1a.patch157
-rw-r--r--gnu/packages/patches/diffutils-getopt.patch44
-rw-r--r--gnu/packages/patches/gcc-boot-2.95.3.patch137
-rw-r--r--gnu/packages/patches/gcc-boot-4.7.4.patch68
-rw-r--r--gnu/packages/patches/glibc-boot-2.16.0.patch352
-rw-r--r--gnu/packages/patches/glibc-boot-2.2.5.patch251
-rw-r--r--gnu/packages/patches/glibc-bootstrap-system-2.16.0.patch30
-rw-r--r--gnu/packages/patches/glibc-supported-locales.patch33
-rw-r--r--gnu/packages/patches/groff-source-date-epoch.patch299
-rw-r--r--gnu/packages/patches/guile-2.2-skip-oom-test.patch25
-rw-r--r--gnu/packages/patches/handbrake-opt-in-nvenc.patch14
-rw-r--r--gnu/packages/patches/inkscape-poppler-0.76.patch36
-rw-r--r--gnu/packages/patches/libarchive-CVE-2017-14166.patch45
-rw-r--r--gnu/packages/patches/libarchive-CVE-2017-14502.patch40
-rw-r--r--gnu/packages/patches/libarchive-CVE-2018-1000877.patch45
-rw-r--r--gnu/packages/patches/libarchive-CVE-2018-1000878.patch86
-rw-r--r--gnu/packages/patches/libarchive-CVE-2018-1000880.patch51
-rw-r--r--gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch32
-rw-r--r--gnu/packages/patches/libgpg-error-gawk-compat.patch155
-rw-r--r--gnu/packages/patches/mescc-tools-boot.patch222
-rw-r--r--gnu/packages/patches/perl-no-sys-dirs.patch23
-rw-r--r--gnu/packages/patches/python-2.7-search-paths.patch4
-rw-r--r--gnu/packages/patches/python-3-deterministic-build-info.patch4
-rw-r--r--gnu/packages/patches/python-3-fix-tests.patch354
-rw-r--r--gnu/packages/patches/python-3-search-paths.patch8
-rw-r--r--gnu/packages/patches/python-fix-tests.patch147
-rw-r--r--gnu/packages/patches/python2-CVE-2018-1000802.patch47
-rw-r--r--gnu/packages/patches/python2-CVE-2018-14647.patch61
-rw-r--r--gnu/packages/patches/scribus-poppler-0.73.patch36
-rw-r--r--gnu/packages/patches/tcc-boot-0.9.27.patch26
-rw-r--r--gnu/packages/patches/texinfo-perl-compat.patch51
-rw-r--r--gnu/packages/patches/texlive-bin-luatex-poppler-compat.patch341
-rw-r--r--gnu/packages/patches/util-linux-tests.patch13
-rw-r--r--gnu/packages/pcre.scm4
-rw-r--r--gnu/packages/pdf.scm10
-rw-r--r--gnu/packages/perl.scm4
-rw-r--r--gnu/packages/python-web.scm4
-rw-r--r--gnu/packages/python-xyz.scm200
-rw-r--r--gnu/packages/python.scm120
-rw-r--r--gnu/packages/readline.scm28
-rw-r--r--gnu/packages/rust.scm7
-rw-r--r--gnu/packages/scribus.scm29
-rw-r--r--gnu/packages/sqlite.scm35
-rw-r--r--gnu/packages/ssh.scm18
-rw-r--r--gnu/packages/stb.scm10
-rw-r--r--gnu/packages/storage.scm8
-rw-r--r--gnu/packages/swig.scm10
-rw-r--r--gnu/packages/tcl.scm11
-rw-r--r--gnu/packages/tex.scm26
-rw-r--r--gnu/packages/texinfo.scm5
-rw-r--r--gnu/packages/time.scm22
-rw-r--r--gnu/packages/tls.scm253
-rw-r--r--gnu/packages/version-control.scm13
-rw-r--r--gnu/packages/video.scm12
-rw-r--r--gnu/packages/web-browsers.scm10
-rw-r--r--gnu/packages/web.scm8
-rw-r--r--gnu/packages/webkit.scm40
-rw-r--r--gnu/packages/xdisorg.scm4
-rw-r--r--gnu/packages/xml.scm14
-rw-r--r--gnu/packages/xorg.scm52
142 files changed, 5000 insertions, 2734 deletions
diff --git a/gnu/packages/acl.scm b/gnu/packages/acl.scm
index 8d5f0117f5..0131adcac4 100644
--- a/gnu/packages/acl.scm
+++ b/gnu/packages/acl.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -34,21 +35,18 @@
(define-public acl
(package
(name "acl")
- (version "2.2.52")
+ (version "2.2.53")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://savannah/acl/acl-"
- version ".src.tar.gz"))
+ version ".tar.gz"))
(sha256
(base32
- "08qd9s3wfhv0ajswsylnfwr5h0d7j9d4rgip855nrh400nxp940p"))
- (patches (search-patches "acl-fix-perl-regex.patch"
- "acl-hurd-path-max.patch"))))
+ "1ir6my3w74s6nfbgbqgzj6w570sn0qjf3524zx8xh67lqrjrigh6"))))
(build-system gnu-build-system)
(arguments
- `(#:test-target "tests"
- #:modules ((ice-9 ftw)
+ `(#:modules ((ice-9 ftw)
,@%gnu-build-system-modules)
#:phases
(modify-phases %standard-phases
@@ -75,13 +73,11 @@
(("\\| sed.*'") ""))
;; These tests require the existence of a user named "bin", but
;; this user does not exist within Guix's build environment.
- (for-each (lambda (file)
- (delete-file (string-append "test/" file)))
- '("setfacl-X.test" "cp.test" "misc.test"))
- #t))
- (replace 'install
- (lambda _
- (invoke "make" "install" "install-lib" "install-dev"))))))
+ (substitute* "Makefile.in"
+ ((".*test/misc\\.test.*") "")
+ ((".*test/cp\\.test.*") "")
+ ((".*test/setfacl-X\\.test.*") ""))
+ #t)))))
(inputs `(("attr" ,attr)))
(native-inputs
`(("gettext" ,gettext-minimal)
diff --git a/gnu/packages/adns.scm b/gnu/packages/adns.scm
index 28a65667eb..f6df825e7c 100644
--- a/gnu/packages/adns.scm
+++ b/gnu/packages/adns.scm
@@ -61,32 +61,6 @@ scripts.")
(define-public c-ares
(package
(name "c-ares")
- (version "1.14.0")
- (source (origin
- (method url-fetch)
- (uri (string-append
- "https://c-ares.haxx.se/download/" name "-" version
- ".tar.gz"))
- (sha256
- (base32
- "0vnwmbvymw677k780kpb6sb8i3szdp89rzy8mz1fwg1657yw3ls5"))))
- (build-system gnu-build-system)
- (native-inputs
- `(("pkg-config" ,pkg-config)))
- (home-page "https://c-ares.haxx.se/")
- (synopsis "C library for asynchronous DNS requests")
- (description
- "C-ares is a C library that performs DNS requests and name resolution
-asynchronously. It is intended for applications which need to perform DNS
-queries without blocking, or need to perform multiple DNS queries in parallel.
-The primary examples of such applications are servers which communicate with
-multiple clients and programs with graphical user interfaces.")
- (license (x11-style "https://c-ares.haxx.se/license.html"))))
-
-;; XXX: temporary package for tensorflow / grpc
-(define-public c-ares-next
- (package
- (name "c-ares")
(version "1.15.0")
(source (origin
(method url-fetch)
@@ -96,11 +70,7 @@ multiple clients and programs with graphical user interfaces.")
(sha256
(base32
"0lk8knip4xk6qzksdkn7085mmgm4ixfczdyyjw656c193y3rgnvc"))))
- (build-system cmake-build-system)
- (arguments
- `(#:tests? #f ; some tests seem to require Internet connection
- #:configure-flags
- (list "-DCARES_BUILD_TESTS=ON")))
+ (build-system gnu-build-system)
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "https://c-ares.haxx.se/")
diff --git a/gnu/packages/android.scm b/gnu/packages/android.scm
index 7d5de08be9..8ab5377537 100644
--- a/gnu/packages/android.scm
+++ b/gnu/packages/android.scm
@@ -362,7 +362,7 @@ various Android core host applications.")
`(("android-libbase" ,android-libbase)
("android-libcutils" ,android-libcutils)
("android-liblog" ,android-liblog)
- ("openssl" ,openssl)))
+ ("openssl" ,openssl-1.0)))
(home-page "https://developer.android.com/studio/command-line/adb.html")
(synopsis "Android Debug Bridge")
(description
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm
index cbc9baeeb3..4f6f1a1cca 100644
--- a/gnu/packages/aspell.scm
+++ b/gnu/packages/aspell.scm
@@ -47,7 +47,8 @@
(sha256
(base32
"1qgn5psfyhbrnap275xjfrzppf5a83fb67gpql0kfqv37al869gm"))
- (patches (search-patches "aspell-default-dict-dir.patch"))))
+ (patches (search-patches "aspell-default-dict-dir.patch"
+ "aspell-gcc-compat.patch"))))
(build-system gnu-build-system)
(arguments
`(#:phases
diff --git a/gnu/packages/assembly.scm b/gnu/packages/assembly.scm
index 8cf5bcdaf5..527555abfc 100644
--- a/gnu/packages/assembly.scm
+++ b/gnu/packages/assembly.scm
@@ -48,14 +48,14 @@
(define-public nasm
(package
(name "nasm")
- (version "2.13.03")
+ (version "2.14.02")
(source (origin
(method url-fetch)
(uri (string-append "http://www.nasm.us/pub/nasm/releasebuilds/"
version "/" name "-" version ".tar.xz"))
(sha256
(base32
- "0wr58pb2wnyihcl6635hlx98fnscx5yirxm8m84x8nxwvjqcybl1"))))
+ "1xg8dfr49py15vbwk1rzcjc3zpqydmr49ahlijm56wlgj8zdwjp2"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl) ;for doc and test target
("texinfo" ,texinfo)))
diff --git a/gnu/packages/attr.scm b/gnu/packages/attr.scm
index ff0a07aa67..3237376d40 100644
--- a/gnu/packages/attr.scm
+++ b/gnu/packages/attr.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2012, 2013, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,28 +30,18 @@
(define-public attr
(package
(name "attr")
- (version "2.4.47")
+ (version "2.4.48")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/attr/attr-"
- version ".src.tar.gz"))
+ version ".tar.gz"))
(sha256
(base32
- "0nd8y0m6awc9ahv0ciiwf8gy54c8d3j51pw9xg7f7cn579jjyxr5"))))
+ "1rr4adzwax4bzr2c00f06zcsljv5y6p9wymz1g89ww7cb2rp5bay"))))
(build-system gnu-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-after 'configure 'patch-makefile-SHELL
- (lambda _
- (patch-makefile-SHELL "include/buildmacros")
- #t))
- (replace 'install
- (lambda _
- (invoke "make"
- "install"
- "install-lib"
- "install-dev")))
(replace 'check
(lambda* (#:key target #:allow-other-keys)
;; Use the right shell.
@@ -80,4 +71,4 @@
(synopsis "Library and tools for manipulating extended attributes")
(description
"Portable library and tools for manipulating extended attributes.")
- (license (list gpl2+ lgpl2.1+))))
+ (license lgpl2.1+)))
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm
index 0bd894f958..beb3b09077 100644
--- a/gnu/packages/backup.scm
+++ b/gnu/packages/backup.scm
@@ -197,18 +197,18 @@ backups (called chunks) to allow easy burning to CD/DVD.")
(define-public libarchive
(package
(name "libarchive")
- (replacement libarchive-3.3.3)
- (version "3.3.2")
+ (version "3.4.0")
(source
(origin
(method url-fetch)
- (uri (string-append "https://libarchive.org/downloads/libarchive-"
- version ".tar.gz"))
- (patches (search-patches "libarchive-CVE-2017-14166.patch"
- "libarchive-CVE-2017-14502.patch"))
+ (uri (list (string-append "https://libarchive.org/downloads/libarchive-"
+ version ".tar.gz")
+ (string-append "https://github.com/libarchive/libarchive"
+ "/releases/download/v" version "/libarchive-"
+ version ".tar.gz")))
(sha256
(base32
- "1km0mzfl6in7l5vz9kl09a88ajx562rw93ng9h2jqavrailvsbgd"))))
+ "0pl25mmz1b1cnwf35kxmygyy9g7z7hslxbx329a9yx8csh7dahw6"))))
(build-system gnu-build-system)
(inputs
`(("zlib" ,zlib)
@@ -274,22 +274,6 @@ archive. In particular, note that there is currently no built-in support for
random access nor for in-place modification.")
(license license:bsd-2)))
-(define-public libarchive-3.3.3
- (package
- (inherit libarchive)
- (version "3.3.3")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://libarchive.org/downloads/libarchive-"
- version ".tar.gz"))
- (patches (search-patches "libarchive-CVE-2018-1000877.patch"
- "libarchive-CVE-2018-1000878.patch"
- "libarchive-CVE-2018-1000880.patch"))
- (sha256
- (base32
- "0bhfncid058p7n1n8v29l6wxm3mhdqfassscihbsxfwz3iwb2zms"))))))
-
(define-public rdup
(package
(name "rdup")
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 15f35009a9..6585d2eebd 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -91,14 +91,14 @@ command-line arguments, multiple languages, and so on.")
(define-public grep
(package
(name "grep")
- (version "3.1")
+ (version "3.3")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/grep/grep-"
version ".tar.xz"))
(sha256
(base32
- "0zm0ywmyz9g8vn1plw14mn8kj74yipx5qsljndbyfgmvndx5qqnv"))
+ "055mqp6vrd0brkygmygb2673qwz409a7kyp1mzbfy6cn94f58q5r"))
(patches (search-patches "grep-timing-sensitive-test.patch"))))
(build-system gnu-build-system)
(native-inputs `(("perl" ,perl))) ;some of the tests require it
@@ -106,15 +106,6 @@ command-line arguments, multiple languages, and so on.")
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'check 'disable-failing-tests
- (lambda _
- ;; These tests are expected to fail due to a glibc bug which has
- ;; been fixed in 2.28, so they are unexpectedly passing. They
- ;; should be fixed for grep versions > 3.1.
- (substitute* "tests/Makefile.in"
- (("^[[:blank:]]+backref-alt[[:blank:]]+\\\\") "\\")
- (("^[[:blank:]]+triple-backref[[:blank:]]+\\\\") "\\"))
- #t))
(add-after 'install 'fix-egrep-and-fgrep
;; Patch 'egrep' and 'fgrep' to execute 'grep' via its
;; absolute file name instead of searching for it in $PATH.
@@ -141,28 +132,16 @@ including, for example, recursive directory searching.")
(define-public sed
(package
(name "sed")
- (version "4.5")
+ (version "4.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/sed/sed-" version
".tar.xz"))
(sha256
(base32
- "0h3b2jfj57wmz680vkbyavlsrkak556qhvs7m7fdlawwhg477bbs"))))
+ "0smxcx66vx29djzb542nxcynl7qnzxqa5032ibazi7x2s267d198"))))
(build-system gnu-build-system)
(synopsis "Stream editor")
- (arguments
- `(#:phases
- (modify-phases %standard-phases
- (add-after 'unpack 'dont-rebuild-sed.1
- (lambda _
- ;; Make sure we do not attempt to rebuild 'doc/sed.1', which does
- ;; not work when cross-compiling because we cannot run 'sed'.
- ;; This is fixed upstream as commit a0a25e3.
- (substitute* "Makefile.in"
- (("^doc/sed\\.1:.*")
- "doc/sed.1:\n"))
- #t)))))
(native-inputs
`(("perl" ,perl))) ;for tests
(description
@@ -177,14 +156,14 @@ implementation offers several extensions over the standard utility.")
(define-public tar
(package
(name "tar")
- (version "1.30")
+ (version "1.32")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/tar/tar-"
version ".tar.xz"))
(sha256
(base32
- "1lyjyk8z8hdddsxw0ikchrsfg3i0x3fsh7l63a8jgaz1n7dr5gzi"))
+ "1n7xy657ii0sa42zx6944v2m4v9qrh6sqgmw17l3nch3y43sxlyh"))
(patches (search-patches "tar-skip-unreliable-tests.patch"
"tar-remove-wholesparse-check.patch"))))
(build-system gnu-build-system)
@@ -198,27 +177,7 @@ implementation offers several extensions over the standard utility.")
(substitute* "src/system.c"
(("/bin/sh")
(string-append bash "/bin/sh")))
- #t))))
-
- ;; Work around a cross-compilation bug whereby libgnu.a would provide
- ;; '__mktime_internal', which conflicts with the one in libc.a.
- ,@(if (%current-target-system)
- `(#:configure-flags '("gl_cv_func_working_mktime=yes"))
- '())
-
- ;; Test #92 "link mismatch" expects "a/z: Not linked to a/y" but gets
- ;; "a/y: Not linked to a/z" and fails, presumably due to differences in
- ;; the order in which 'diff' traverses directories. That leads to a
- ;; test failure even though conceptually the test passes. Skip it.
- ;; Test 117 and 118 are prone to race conditions too, particularly
- ;; when cross-compiling, so we skip those as well. All issues have
- ;; been fixed upstream in these commits:
- ;; <https://git.savannah.gnu.org/cgit/tar.git/commit/?id=847a36f>
- ;; <https://git.savannah.gnu.org/cgit/tar.git/commit/?id=64b43fd>
- #:make-flags (list (string-append
- "TESTSUITEFLAGS= -k '!link mismatch,"
- "!directory removed before reading,"
- "!explicitly named directory removed before reading'"))))
+ #t))))))
;; When cross-compiling, the 'set-shell-file-name' phase needs to be able
;; to refer to the target Bash.
@@ -270,16 +229,16 @@ differences.")
(define-public diffutils
(package
(name "diffutils")
- (version "3.6")
+ (version "3.7")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/diffutils/diffutils-"
version ".tar.xz"))
(sha256
(base32
- "1mivg0fy3a6fcn535ln8nkgfj6vxh5hsxxs5h6692wxmsjyyh8fn"))
- (patches (search-patches "diffutils-getopt.patch"))))
+ "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk"))))
(build-system gnu-build-system)
+ (native-inputs `(("perl" ,perl)))
(synopsis "Comparing and merging files")
(description
"GNU Diffutils is a package containing tools for finding the
@@ -341,14 +300,14 @@ used to apply commands with arbitrarily long arguments.")
(define-public coreutils
(package
(name "coreutils")
- (version "8.30")
+ (version "8.31")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/coreutils/coreutils-"
version ".tar.xz"))
(sha256
(base32
- "0mxhw43d4wpqmvg0l4znk1vm10fy92biyh90lzdnqjcic2lb6cg8"))))
+ "1zg9m79x1i2nifj4kb0waf9x3i5h6ydkypkjnbsb9rnwis8rqypz"))))
(build-system gnu-build-system)
(inputs `(("acl" ,acl) ; TODO: add SELinux
("gmp" ,gmp) ;bignums in 'expr', yay!
@@ -390,13 +349,7 @@ used to apply commands with arbitrarily long arguments.")
;; environments with long prefixes (/tmp/guix-build-...).
(substitute* "Makefile"
(("^.*tests/misc/env-S.pl.*$") ""))
- #t)))
-
- ;; Work around a cross-compilation bug whereby libcoreutils.a would
- ;; provide '__mktime_internal', which conflicts with the one in libc.a.
- ,@(if (%current-target-system)
- `(#:configure-flags '("gl_cv_func_working_mktime=yes"))
- '())))
+ #t)))))
(synopsis "Core GNU utilities (file, text, shell)")
(description
"GNU Coreutils includes all of the basic command-line tools that are
@@ -460,14 +413,14 @@ change. GNU make offers many powerful extensions over the standard utility.")
(define-public binutils
(package
(name "binutils")
- (version "2.31.1")
+ (version "2.32")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(sha256
(base32
- "1l34hn1zkmhr1wcrgf0d4z7r3najxnw3cx2y2fk7v55zjlk3ik7z"))
+ "0b8767nyal1bc4cyzg5h9iis8kpkln1i3wkamig75cifj1fb2f6y"))
(patches (search-patches "binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
@@ -637,7 +590,9 @@ the store.")
"glibc-hidden-visibility-ldconfig.patch"
"glibc-versioned-locpath.patch"
"glibc-allow-kernel-2.6.32.patch"
- "glibc-reinstate-prlimit64-fallback.patch"))))
+ "glibc-reinstate-prlimit64-fallback.patch"
+ "glibc-hurd-magic-pid.patch"
+ "glibc-supported-locales.patch"))))
(build-system gnu-build-system)
;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc
@@ -712,18 +667,6 @@ the store.")
#:tests? #f ; XXX
#:phases (modify-phases %standard-phases
- ,@(if (hurd-target?)
- `((add-after 'unpack 'apply-hurd-patch
- (lambda* (#:key inputs native-inputs
- #:allow-other-keys)
- ;; TODO: Move this to 'patches' field.
- (let ((patch (or (assoc-ref native-inputs
- "hurd-magic-pid-patch")
- (assoc-ref inputs
- "hurd-magic-pid-patch"))))
- (invoke "patch" "-p1" "--force" "--input"
- patch)))))
- '())
(add-before
'configure 'pre-configure
(lambda* (#:key inputs native-inputs outputs
@@ -849,9 +792,7 @@ the store.")
,@(if (hurd-target?)
`(("mig" ,mig)
- ("perl" ,perl)
- ("hurd-magic-pid-patch"
- ,(search-patch "glibc-hurd-magic-pid.patch")))
+ ("perl" ,perl))
'())))
(native-search-paths
@@ -893,6 +834,7 @@ with the Linux kernel.")
"glibc-versioned-locpath.patch"
"glibc-allow-kernel-2.6.32.patch"
"glibc-reinstate-prlimit64-fallback.patch"
+ "glibc-supported-locales.patch"
"glibc-CVE-2018-11236.patch"
"glibc-CVE-2018-11237.patch"))))
(properties `((lint-hidden-cve . ("CVE-2017-18269")))))) ; glibc-2.27-git-fixes
diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm
index fb4e3f4be3..31c9a8b0cf 100644
--- a/gnu/packages/bash.scm
+++ b/gnu/packages/bash.scm
@@ -2,7 +2,7 @@
;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015, 2017 Leo Famulari <leo@famulari.name>
-;;; Copyright © 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
@@ -44,7 +44,7 @@
(define (patch-url seqno)
"Return the URL of Bash patch number SEQNO."
- (format #f "mirror://gnu/bash/bash-4.4-patches/bash44-~3,'0d" seqno))
+ (format #f "mirror://gnu/bash/bash-5.0-patches/bash50-~3,'0d" seqno))
(define (bash-patch seqno sha256)
"Return the origin of Bash patch SEQNO, with expected hash SHA256"
@@ -57,33 +57,17 @@
(list (bash-patch seqno (base32 hash))
...))
-(define %patch-series-4.4
- ;; This is the current patches series for 4.4, generated using
+(define %patch-series-5.0
+ ;; This is the current patches series for 5.0, generated using
;; 'download-patches' below.
(patch-series
- (1 "03vzy7qwjdd5qvl3ydg99naazas2qmyd0yhnrflgjbbm64axja1y")
- (2 "0lrwq6vyqism3yqv9s7kzaf3dsl4q5w9r5svcqz279qp7qca083h")
- (3 "1chqww2rj6g42b8s60q5zlzy0jzp684jkpsbrbfy1vzxja8mmpsi")
- (4 "1cy8abf96hkrjhw921ndr0shlcnc52bg45rn6xri4v5clhq0l25d")
- (5 "0a8515kyk4zsgmvlqvlganjfr7pq0j6kzpr4d6xx02kpbdr4n7i2")
- (6 "1f24wgqngmj2mrj9yibwvc2zvlmn5xi53mnw777g3l40c4m2x3ka")
- (7 "1bzdsnqaf05gdbqpsixhan8vygjxpcxlz1dd8d9f5jdznw3wq76y") ;CVE-2017-5932
- (8 "1firw915mjm03hbbw9a70ch3cpgrgnvqjpllgdnn6csr8q04f546")
- (9 "0g1l56kvw61rpw7dqa9fcl9llkl693h73g631hrhxlm030ddssqb")
- (10 "01lfhrkdsdkdz8ypzapr614ras23x7ckjnr60aa5bzkaqprccrc4")
- (11 "038p7mhnq9m65g505hi3827jkf9f35nd1cy00w8mwafpyxp44mnx")
- (12 "0gh6lbb1rwpk44pvbamm6vzdfi50xnwkqd9v7s8cjwk3pz973hps")
- (13 "1djkx0w9v62q78gz3jsvamj1jq53i6hbfrfhhsw86ihwpjnfy98v")
- (14 "0z5ikcq9zyxw79d0z36r5p0mspnb5piavbv03jmlan1wnknmrxx7")
- (15 "09n307fi1j257abhm295k6ksmnzw47ka2zhnr0i5lbdnpvn04xnk")
- (16 "1cgi1y6mifm8hsgv4avj5ih76535js3qba1sqwbfvp7si76927sh")
- (17 "0w6jpj2giakji1ir83rpkx1y7n7xqppah3j748m6dm38hywr0gvp")
- (18 "1k58h4wxbsg7r4rwhrvzx5hfbapba2nxjysbhh6qp6ki5ys99i2v")
- (19 "07n1i5610lbs672x1s8g82qn3qfj06s0ip3z80sri0g8vxp0s5r7")
- (20 "0b2jk5n1af1vh590qfc52hv65mafb4vl1xv26s8j5a3byb5y4h0q")
- (21 "1hblcd2xmqqlp0idnavw66570n7m0yv5rbbr873c2gkn982mk3xx")
- (22 "0yfbjzr79vzjs2hyi5m8iy2b38fq7vikdfa4zqdvjsp36q4iycs5")
- (23 "1dlism6qdx60nvzj0v7ndr7lfahl4a8zmzckp13hqgdx7xpj7v2g")))
+ (1 "12bjfdy6bg8nhyw27bdgxn7h4paylx8d927skfmi9pxd1wgrxzpj")
+ (2 "01w7yrzmz10mw06ys0546vhl7isv2v402ziyvfd7k67588spvs47")
+ (3 "0ny81ridp5n0j69hb8ixrc7dmxybby54jbsz5hikly8kgg1wvssf")
+ (4 "021gqqvgydixkrmqss64b6srfdlkvnx88lyfzpxfrn5d6bc7li0l")
+ (5 "0xl2kyzm84nlyklrqzkn73ixabhzfhn9x91lzcmis89cppclvxav")
+ (6 "0844749ixk1z60437nkznzms1f0nzh9an62kj7sny6r0zyk2k1fn")
+ (7 "16xg37gp1b8zlj5969w8mcrparwqlcbj9695vn3qhgb7wdz1xd0p")))
(define (download-patches store count)
"Download COUNT Bash patches into store. Return a list of
@@ -119,7 +103,7 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
" -Wl,-rpath -Wl,"
(assoc-ref %build-inputs "ncurses")
"/lib")))
- (version "4.4"))
+ (version "5.0"))
(package
(name "bash")
(source (origin
@@ -128,11 +112,10 @@ number/base32-hash tuples, directly usable in the 'patch-series' form."
"mirror://gnu/bash/bash-" version ".tar.gz"))
(sha256
(base32
- "1jyz6snd63xjn6skk7za6psgidsd53k05cr3lksqybi0q6936syq"))
+ "0kgvfwqdcd90waczf4gx39xnrxzijhjrzyzv7s8v4w31qqm0za5l"))
(patch-flags '("-p0"))
- (patches %patch-series-4.4)))
- (version (string-append version "."
- (number->string (length %patch-series-4.4))))
+ (patches %patch-series-5.0)))
+ (version (string-append version "." (number->string (length %patch-series-5.0))))
(build-system gnu-build-system)
(outputs '("out"
diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm
index c7491f845f..7196ffcd32 100644
--- a/gnu/packages/bdw-gc.scm
+++ b/gnu/packages/bdw-gc.scm
@@ -3,6 +3,7 @@
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016, 2018 Leo Famulari <leo@famulari.name>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,14 +31,14 @@
(define-public libgc
(package
(name "libgc")
- (version "7.6.6")
+ (version "7.6.12")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/ivmai/bdwgc/releases"
"/download/v" version "/gc-" version ".tar.gz"))
(sha256
(base32
- "1p1r015a7jbpvkkbgzv1y8nxrbbp6dg0mq3ksi6ji0qdz3wfss79"))))
+ "10jhhi79d5brwlsyhwgpnrmc8nhlf7aan2lk9xhgihk5jc6srbvc"))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags
@@ -53,7 +54,19 @@
,@(if (hurd-triplet? (or (%current-system)
(%current-target-system)))
'("--disable-gcj-support")
- '()))))
+ '()))
+ #:phases (modify-phases %standard-phases
+ (add-after 'unpack 'adjust-pc-file
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libatomic-ops (assoc-ref inputs "libatomic-ops")))
+ ;; GC 7.6.10 and later includes -latomic_ops in the
+ ;; pkg-config file. To avoid propagation, insert an
+ ;; absolute reference so dependent programs can find it.
+ (substitute* "bdw-gc.pc.in"
+ (("@ATOMIC_OPS_LIBS@" match)
+ (string-append "-L" libatomic-ops "/lib "
+ match)))
+ #t))))))
(native-inputs `(("pkg-config" ,pkg-config)))
(inputs `(("libatomic-ops" ,libatomic-ops)))
(outputs '("out" "debug"))
@@ -91,7 +104,7 @@ C or C++ programs, though that is not its primary goal.")
(define-public libatomic-ops
(package
(name "libatomic-ops")
- (version "7.6.6")
+ (version "7.6.10")
(source (origin
(method url-fetch)
(uri (string-append
@@ -99,7 +112,7 @@ C or C++ programs, though that is not its primary goal.")
version "/libatomic_ops-" version ".tar.gz"))
(sha256
(base32
- "0x7071z707msvyrv9dmgahd1sghbkw8fpbagvcag6xs8yp2spzlr"))))
+ "1bwry043f62pc4mgdd37zx3fif19qyrs8f5bw7qxlmkzh5hdyzjq"))))
(build-system gnu-build-system)
(outputs '("out" "debug"))
(synopsis "Accessing hardware atomic memory update operations")
diff --git a/gnu/packages/bison.scm b/gnu/packages/bison.scm
index 71de47762d..5ebc883d53 100644
--- a/gnu/packages/bison.scm
+++ b/gnu/packages/bison.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2012, 2013, 2015 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -30,7 +31,7 @@
(define-public bison
(package
(name "bison")
- (version "3.0.5")
+ (version "3.4.1")
(source
(origin
(method url-fetch)
@@ -38,8 +39,17 @@
version ".tar.xz"))
(sha256
(base32
- "0f7kjygrckkx8vas2nm673592jif0a9mw5g8207f6hj6h4pfyp07"))))
+ "03c2pmq3bs0drdislnz6gm1rwz3n4pb2rz9navyxydppxg2rl597"))))
(build-system gnu-build-system)
+ (arguments
+ '(;; Building in parallel on many-core systems may cause an error such as
+ ;; "mv: cannot stat 'examples/c/reccalc/scan.stamp.tmp': No such file or
+ ;; directory". See <https://bugs.gnu.org/36238>.
+ #:parallel-build? #f
+ ;; Similarly, when building tests in parallel, Make may produce this error:
+ ;; "./examples/c/reccalc/scan.l:13:10: fatal error: parse.h: No such file
+ ;; or directory". Full log in <https://bugs.gnu.org/36238>.
+ #:parallel-tests? #f))
(native-inputs `(("perl" ,perl)
;; m4 is not present in PATH when cross-building.
("m4" ,m4)))
diff --git a/gnu/packages/boost.scm b/gnu/packages/boost.scm
index b83bd73a39..73b4cff4c8 100644
--- a/gnu/packages/boost.scm
+++ b/gnu/packages/boost.scm
@@ -44,7 +44,7 @@
(define-public boost
(package
(name "boost")
- (version "1.69.0")
+ (version "1.70.0")
(source (origin
(method url-fetch)
(uri (let ((version-with-underscores
@@ -56,7 +56,7 @@
version-with-underscores ".tar.bz2"))))
(sha256
(base32
- "01j4n142dz20lcgqji8d8hspp04p1nv7m8i6dz8w5lchfdhx8clg"))
+ "0y47nc7w0arwgj4x1phadxbvl7wyfcgknbz5kv8lzpl98wsyh2j3"))
(patches (search-patches "boost-fix-icu-build.patch"))))
(build-system gnu-build-system)
(inputs `(("icu4c" ,icu4c)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index e8b2120551..428a89e927 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -1,7 +1,8 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014, 2015, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,21 +33,30 @@
#:select (derivation derivation->output-path))
#:use-module ((guix utils) #:select (gnu-triplet->nix-system))
#:use-module (guix memoization)
+ #:use-module (guix i18n)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
+ #:use-module (srfi srfi-34)
+ #:use-module (srfi srfi-35)
#:use-module (ice-9 match)
#:export (bootstrap-origin
package-with-bootstrap-guile
glibc-dynamic-linker
+ bootstrap-executable
bootstrap-guile-origin
%bootstrap-guile
%bootstrap-coreutils&co
+ %bootstrap-linux-libre-headers
%bootstrap-binutils
%bootstrap-gcc
%bootstrap-glibc
- %bootstrap-inputs))
+ %bootstrap-inputs
+ %bootstrap-mescc-tools
+ %bootstrap-mes
+
+ %bootstrap-inputs-for-tests))
;;; Commentary:
;;;
@@ -58,6 +68,82 @@
;;;
+;;; The bootstrap executables: 'bash', 'mkdir', 'tar', 'xz'. They allow us to
+;;; extract the very first tarball.
+;;;
+
+(define %bootstrap-executables
+ ;; List of bootstrap executables and their recursive hashes (as per 'guix
+ ;; hash -r'), taking their executable bit into account.
+ `(("aarch64-linux"
+ ("bash"
+ ,(base32 "13aqhqb8nydlwq1ah9974q0iadx1pb95v13wzzyf7vgv6nasrwzr"))
+ ("mkdir"
+ ,(base32 "1pxhdp7ldwavmm71xbh9wc197cb2nr66acjn26yjx3732cixh9ws"))
+ ("tar"
+ ,(base32 "1j51gv08sfg277yxj73xd564wjq3f8xwd6s9rbcg8v9gms47m4cx"))
+ ("xz"
+ ,(base32 "1d779rwsrasphg5g3r37qppcqy3p7ay1jb1y83w7x4i3qsc7zjy2")))
+ ("armhf-linux"
+ ("bash"
+ ,(base32 "0s6f1s26g4dsrrkl39zblvwpxmbzi6n9mgqf6vxsqz42gik6bgyn"))
+ ("mkdir"
+ ,(base32 "1r5rcp35niyxfkrdf00y2ba8ifrq9bi76cr63lwjf2l655j1i5p7"))
+ ("tar"
+ ,(base32 "0dksx5im3fv8ximz7368bsax9f26nn47ds74298flm5lnvpv9xly"))
+ ("xz"
+ ,(base32 "1cqqavghjfr0iwxqf61lrssv27wfigysgq2rs4rm1gkmn04yn1k3")))
+ ("i686-linux"
+ ("bash"
+ ,(base32 "0rjaxyzjdllfkf1abczvgaf3cdcc7mmahyvdbkjmjzhgz92pv23g"))
+ ("mkdir"
+ ,(base32 "133ybmfpkmsnysrzbngwvbysqnsmfi8is8zifs7i7n6n600h4s1w"))
+ ("tar"
+ ,(base32 "07830bx29ad5i0l1ykj0g0b1jayjdblf01sr3ww9wbnwdbzinqms"))
+ ("xz"
+ ,(base32 "0i9kxdi17bm5gxfi2xzm0y73p3ii0cqxli1sbljm6rh2fjgyn90k")))
+ ("mips64el-linux"
+ ("bash"
+ ,(base32 "1aw046dhda240k9pb9iaj5aqkm23gkvxa9j82n4k7fk87nbrixw6"))
+ ("mkdir"
+ ,(base32 "0c9j6qgyw84zxbry3ypifzll13gy8ax71w40kdk1h11jbgla3f5k"))
+ ("tar"
+ ,(base32 "06gmqdjq3rl8lr47b9fyx4ifnm5x56ymc8lyryp1ax1j2s4y5jb4"))
+ ("xz"
+ ,(base32 "09j1d69qr0hhhx4k4ih8wp00dfc9y4rp01hfg3vc15yxd0jxabh5")))))
+
+(define (bootstrap-executable-url program system)
+ "Return the URL where PROGRAM can be found for SYSTEM."
+ (string-append
+ "https://git.savannah.gnu.org/cgit/guix.git/plain/gnu/packages/bootstrap/"
+ system "/" program
+ "?id=44f07d1dc6806e97c4e9ee3e6be883cc59dc666e"))
+
+(define bootstrap-executable
+ (mlambda (program system)
+ "Return an origin for PROGRAM, a statically-linked bootstrap executable
+built for SYSTEM."
+ (let ((system (if (string=? system "x86_64-linux")
+ "i686-linux"
+ system)))
+ (match (assoc-ref (assoc-ref %bootstrap-executables system)
+ program)
+ (#f
+ (raise (condition
+ (&message
+ (message
+ (format #f (G_ "could not find bootstrap binary '~a' \
+for system '~a'")
+ program system))))))
+ ((sha256)
+ (origin
+ (method url-fetch/executable)
+ (uri (bootstrap-executable-url program system))
+ (file-name program)
+ (sha256 sha256)))))))
+
+
+;;;
;;; Helper procedures.
;;;
@@ -97,10 +183,10 @@
(define* (package-from-tarball name source program-to-test description
#:key snippet)
"Return a package that correspond to the extraction of SOURCE.
-PROGRAM-TO-TEST is a program to run after extraction of SOURCE, to check
-whether everything is alright. If SNIPPET is provided, it is evaluated after
-extracting SOURCE. SNIPPET should raise an exception to signal an error; its
-return value is ignored."
+PROGRAM-TO-TEST is #f or a string: the program to run after extraction of
+SOURCE to check whether everything is alright. If SNIPPET is provided, it is
+evaluated after extracting SOURCE. SNIPPET should return true if successful,
+or false to signal an error."
(package
(name name)
(version "0")
@@ -109,25 +195,28 @@ return value is ignored."
`(#:guile ,%bootstrap-guile
#:modules ((guix build utils))
#:builder
- (let ((out (assoc-ref %outputs "out"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (tarball (assoc-ref %build-inputs "tarball")))
+ (begin
(use-modules (guix build utils))
- (mkdir out)
- (copy-file tarball "binaries.tar.xz")
- (invoke xz "-d" "binaries.tar.xz")
- (let ((builddir (getcwd)))
- (with-directory-excursion out
- (invoke tar "xvf"
- (string-append builddir "/binaries.tar"))
- ,@(if snippet (list snippet) '())
- (invoke (string-append "bin/" ,program-to-test)
- "--version"))))))
+ (let ((out (assoc-ref %outputs "out"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (tarball (assoc-ref %build-inputs "tarball")))
+
+ (mkdir out)
+ (copy-file tarball "binaries.tar.xz")
+ (invoke xz "-d" "binaries.tar.xz")
+ (let ((builddir (getcwd)))
+ (with-directory-excursion out
+ (invoke tar "xvf"
+ (string-append builddir "/binaries.tar"))
+ ,@(if snippet (list snippet) '())
+ (or (not ,program-to-test)
+ (invoke (string-append "bin/" ,program-to-test)
+ "--version"))))))))
(inputs
- `(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
- ("xz" ,(search-bootstrap-binary "xz" (%current-system)))
+ `(("tar" ,(bootstrap-executable "tar" (%current-system)))
+ ("xz" ,(bootstrap-executable "xz" (%current-system)))
("tarball" ,(bootstrap-origin (source (%current-system))))))
(source #f)
(synopsis description)
@@ -251,11 +340,9 @@ return value is ignored."
#:key outputs system search-paths
#:allow-other-keys)
(define (->store file)
- (add-to-store store file #t "sha256"
- (or (search-bootstrap-binary file
- system)
- (error "bootstrap binary not found"
- file system))))
+ (run-with-store store
+ (origin->derivation (bootstrap-executable file system)
+ system)))
(let* ((tar (->store "tar"))
(xz (->store "xz"))
@@ -305,14 +392,16 @@ $out/bin/guile -c ~s $out ~a
# Sanity check.
$out/bin/guile --version~%"
- mkdir xz tar
+ (derivation->output-path mkdir)
+ (derivation->output-path xz)
+ (derivation->output-path tar)
(format #f "~s" make-guile-wrapper)
- bash)
- (list mkdir xz tar bash))))
+ (derivation->output-path bash)))))
(derivation store name
- bash `(,builder)
+ (derivation->output-path bash) `(,builder)
#:system system
- #:inputs `((,bash) (,builder) (,guile))
+ #:inputs `((,bash) (,mkdir) (,tar) (,xz)
+ (,builder) (,guile))
#:env-vars `(("GUILE_TARBALL"
. ,(derivation->output-path guile))))))
@@ -393,6 +482,22 @@ $out/bin/guile --version~%"
(("^exec grep") (string-append (getcwd) "/bin/grep"))))
(chmod "bin" #o555))))
+(define-public %bootstrap-linux-libre-headers
+ (package-from-tarball
+ "linux-libre-headers-bootstrap"
+ (lambda (system)
+ (origin
+ (method url-fetch)
+ (uri (map (cute string-append <>
+ "/i686-linux/20181020/"
+ "linux-libre-headers-stripped-4.14.67-i686-linux.tar.xz")
+ %bootstrap-base-urls))
+ (sha256
+ (base32
+ "0sm2z9x4wk45bh6qfs94p0w1d6hsy6dqx9sw38qsqbvxwa1qzk8s"))))
+ #f ; no program to test
+ "Bootstrap linux-libre-headers"))
+
(define %bootstrap-binutils
(package-from-tarball "binutils-bootstrap"
(lambda (system)
@@ -438,31 +543,33 @@ $out/bin/guile --version~%"
`(#:guile ,%bootstrap-guile
#:modules ((guix build utils))
#:builder
- (let ((out (assoc-ref %outputs "out"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (tarball (assoc-ref %build-inputs "tarball")))
+ (begin
(use-modules (guix build utils))
- (mkdir out)
- (copy-file tarball "binaries.tar.xz")
- (invoke xz "-d" "binaries.tar.xz")
- (let ((builddir (getcwd)))
- (with-directory-excursion out
- (invoke tar "xvf"
- (string-append builddir
- "/binaries.tar"))
- (chmod "lib" #o755)
-
- ;; Patch libc.so so it refers to the right path.
- (substitute* "lib/libc.so"
- (("/[^ ]+/lib/(libc|ld)" _ prefix)
- (string-append out "/lib/" prefix)))
-
- #t)))))
+ (let ((out (assoc-ref %outputs "out"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (tarball (assoc-ref %build-inputs "tarball")))
+
+ (mkdir out)
+ (copy-file tarball "binaries.tar.xz")
+ (invoke xz "-d" "binaries.tar.xz")
+ (let ((builddir (getcwd)))
+ (with-directory-excursion out
+ (invoke tar "xvf"
+ (string-append builddir
+ "/binaries.tar"))
+ (chmod "lib" #o755)
+
+ ;; Patch libc.so so it refers to the right path.
+ (substitute* "lib/libc.so"
+ (("/[^ ]+/lib/(libc|ld)" _ prefix)
+ (string-append out "/lib/" prefix)))
+
+ #t))))))
(inputs
- `(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
- ("xz" ,(search-bootstrap-binary "xz" (%current-system)))
+ `(("tar" ,(bootstrap-executable "tar" (%current-system)))
+ ("xz" ,(bootstrap-executable "xz" (%current-system)))
("tarball" ,(bootstrap-origin
(origin
(method url-fetch)
@@ -509,73 +616,75 @@ $out/bin/guile --version~%"
`(#:guile ,%bootstrap-guile
#:modules ((guix build utils))
#:builder
- (let ((out (assoc-ref %outputs "out"))
- (tar (assoc-ref %build-inputs "tar"))
- (xz (assoc-ref %build-inputs "xz"))
- (bash (assoc-ref %build-inputs "bash"))
- (libc (assoc-ref %build-inputs "libc"))
- (tarball (assoc-ref %build-inputs "tarball")))
+ (begin
(use-modules (guix build utils)
(ice-9 popen))
- (mkdir out)
- (copy-file tarball "binaries.tar.xz")
- (invoke xz "-d" "binaries.tar.xz")
- (let ((builddir (getcwd))
- (bindir (string-append out "/bin")))
- (with-directory-excursion out
- (invoke tar "xvf"
- (string-append builddir "/binaries.tar")))
-
- (with-directory-excursion bindir
- (chmod "." #o755)
- (rename-file "gcc" ".gcc-wrapped")
- (call-with-output-file "gcc"
- (lambda (p)
- (format p "#!~a
+ (let ((out (assoc-ref %outputs "out"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (tarball (assoc-ref %build-inputs "tarball")))
+
+ (mkdir out)
+ (copy-file tarball "binaries.tar.xz")
+ (invoke xz "-d" "binaries.tar.xz")
+ (let ((builddir (getcwd))
+ (bindir (string-append out "/bin")))
+ (with-directory-excursion out
+ (invoke tar "xvf"
+ (string-append builddir "/binaries.tar")))
+
+ (with-directory-excursion bindir
+ (chmod "." #o755)
+ (rename-file "gcc" ".gcc-wrapped")
+ (call-with-output-file "gcc"
+ (lambda (p)
+ (format p "#!~a
exec ~a/bin/.gcc-wrapped -B~a/lib \
-Wl,-rpath -Wl,~a/lib \
-Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
- bash
- out libc libc libc
- ,(glibc-dynamic-linker))))
+ bash
+ out libc libc libc
+ ,(glibc-dynamic-linker))))
- (chmod "gcc" #o555)
- #t)))))
+ (chmod "gcc" #o555)
+ #t))))))
(inputs
- `(("tar" ,(search-bootstrap-binary "tar" (%current-system)))
- ("xz" ,(search-bootstrap-binary "xz" (%current-system)))
- ("bash" ,(search-bootstrap-binary "bash" (%current-system)))
+ `(("tar" ,(bootstrap-executable "tar" (%current-system)))
+ ("xz" ,(bootstrap-executable "xz" (%current-system)))
+ ("bash" ,(bootstrap-executable "bash" (%current-system)))
("libc" ,%bootstrap-glibc)
("tarball" ,(bootstrap-origin
(origin
- (method url-fetch)
- (uri (map (cut string-append <> "/" (%current-system)
- (match (%current-system)
- ("armhf-linux"
- "/20150101/gcc-4.8.4.tar.xz")
- ("aarch64-linux"
- "/20170217/gcc-5.4.0.tar.xz")
- (_
- "/20131110/gcc-4.8.2.tar.xz")))
- %bootstrap-base-urls))
- (sha256
- (match (%current-system)
- ("x86_64-linux"
- (base32
- "17ga4m6195n4fnbzdkmik834znkhs53nkypp6557pl1ps7dgqbls"))
- ("i686-linux"
- (base32
- "150c1arrf2k8vfy6dpxh59vcgs4p1bgiz2av5m19dynpks7rjnyw"))
- ("armhf-linux"
- (base32
- "0ghz825yzp43fxw53kd6afm8nkz16f7dxi9xi40bfwc8x3nbbr8v"))
- ("aarch64-linux"
- (base32
- "1ar3vdzyqbfm0z36kmvazvfswxhcihlacl2dzdjgiq25cqnq9ih1"))
- ("mips64el-linux"
- (base32
- "1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
+ (method url-fetch)
+ (uri (map (cut string-append <> "/" (%current-system)
+ (match (%current-system)
+ ("armhf-linux"
+ "/20150101/gcc-4.8.4.tar.xz")
+ ("aarch64-linux"
+ "/20170217/gcc-5.4.0.tar.xz")
+ (_
+ "/20131110/gcc-4.8.2.tar.xz")))
+ %bootstrap-base-urls))
+ (sha256
+ (match (%current-system)
+ ("x86_64-linux"
+ (base32
+ "17ga4m6195n4fnbzdkmik834znkhs53nkypp6557pl1ps7dgqbls"))
+ ("i686-linux"
+ (base32
+ "150c1arrf2k8vfy6dpxh59vcgs4p1bgiz2av5m19dynpks7rjnyw"))
+ ("armhf-linux"
+ (base32
+ "0ghz825yzp43fxw53kd6afm8nkz16f7dxi9xi40bfwc8x3nbbr8v"))
+ ("aarch64-linux"
+ (base32
+ "1ar3vdzyqbfm0z36kmvazvfswxhcihlacl2dzdjgiq25cqnq9ih1"))
+ ("mips64el-linux"
+ (base32
+ "1m5miqkyng45l745n0sfafdpjkqv9225xf44jqkygwsipj2cv9ks")))))))))
(native-search-paths
(list (search-path-specification
(variable "CPATH")
@@ -588,15 +697,129 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
(home-page #f)
(license gpl3+)))
-(define %bootstrap-inputs
+(define %bootstrap-mescc-tools
+ ;; The initial MesCC tools. Uses binaries from a tarball typically built by
+ ;; %MESCC-TOOLS-BOOTSTRAP-TARBALL.
+ (package
+ (name "bootstrap-mescc-tools")
+ (version "0.5.2")
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils)
+ (ice-9 popen))
+ (let ((out (assoc-ref %outputs "out"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (tarball (assoc-ref %build-inputs "tarball")))
+
+ (mkdir out)
+ (copy-file tarball "binaries.tar.xz")
+ (invoke xz "-d" "binaries.tar.xz")
+ (let ((builddir (getcwd))
+ (bindir (string-append out "/bin")))
+ (with-directory-excursion out
+ (invoke tar "xvf"
+ (string-append builddir "/binaries.tar"))))))))
+ (inputs
+ `(("tar" ,(bootstrap-executable "tar" (%current-system)))
+ ("xz" ,(bootstrap-executable "xz" (%current-system)))
+ ("tarball"
+ ,(bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (map
+ (cute string-append <>
+ "/i686-linux/20181020/"
+ "mescc-tools-static-0.5.2-0.bb062b0-i686-linux.tar.xz")
+ %bootstrap-base-urls))
+ (sha256
+ (base32
+ "11lniw0vg61kmyhvnwkmcnkci9ym6hbmiksiqggd0hkipbq7hvlz")))))))
+ (synopsis "Bootstrap binaries of MesCC Tools")
+ (description synopsis)
+ (home-page #f)
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (license gpl3+)))
+
+(define %bootstrap-mes
+ ;; The initial Mes. Uses binaries from a tarball typically built by
+ ;; %MES-BOOTSTRAP-TARBALL.
+ (package
+ (name "bootstrap-mes")
+ (version "0")
+ (source #f)
+ (build-system trivial-build-system)
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:modules ((guix build utils))
+ #:builder
+ (begin
+ (use-modules (guix build utils)
+ (ice-9 popen))
+ (let ((out (assoc-ref %outputs "out"))
+ (tar (assoc-ref %build-inputs "tar"))
+ (xz (assoc-ref %build-inputs "xz"))
+ (tarball (assoc-ref %build-inputs "tarball")))
+
+ (mkdir out)
+ (copy-file tarball "binaries.tar.xz")
+ (invoke xz "-d" "binaries.tar.xz")
+ (let ((builddir (getcwd))
+ (bindir (string-append out "/bin")))
+ (with-directory-excursion out
+ (invoke tar "xvf"
+ (string-append builddir "/binaries.tar"))))))))
+ (inputs
+ `(("tar" ,(bootstrap-executable "tar" (%current-system)))
+ ("xz" ,(bootstrap-executable "xz" (%current-system)))
+ ("tarball"
+ ,(bootstrap-origin
+ (origin
+ (method url-fetch)
+ (uri (map
+ (cute string-append <>
+ "/i686-linux/20181020/"
+ "mes-minimal-stripped-0.19-i686-linux.tar.xz")
+ %bootstrap-base-urls))
+ (sha256
+ (base32
+ "0k7kkl68a6xaadv47ij0nr9jm5ca1ffj38n7f2lg80y72wdkwr9h")))))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (synopsis "Bootstrap binaries of Mes")
+ (description synopsis)
+ (home-page #f)
+ (license gpl3+)))
+
+(define (%bootstrap-inputs)
;; The initial, pre-built inputs. From now on, we can start building our
;; own packages.
+ `(,@(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ `(("linux-libre-headers" ,%bootstrap-linux-libre-headers)
+ ("bootstrap-mescc-tools" ,%bootstrap-mescc-tools)
+ ("mes" ,%bootstrap-mes)))
+ (_
+ `(("libc" ,%bootstrap-glibc)
+ ("gcc" ,%bootstrap-gcc)
+ ("binutils" ,%bootstrap-binutils))))
+ ("coreutils&co" ,%bootstrap-coreutils&co)
+
+ ;; In gnu-build-system.scm, we rely on the availability of Bash.
+ ("bash" ,%bootstrap-coreutils&co)))
+
+(define %bootstrap-inputs-for-tests
+ ;; These are bootstrap inputs that are cheap to produce (no compilation
+ ;; needed) and that are meant to be used for testing. (These are those we
+ ;; used before the Mes-based reduced bootstrap.)
`(("libc" ,%bootstrap-glibc)
("gcc" ,%bootstrap-gcc)
("binutils" ,%bootstrap-binutils)
("coreutils&co" ,%bootstrap-coreutils&co)
-
- ;; In gnu-build-system.scm, we rely on the availability of Bash.
("bash" ,%bootstrap-coreutils&co)))
;;; bootstrap.scm ends here
diff --git a/gnu/packages/bootstrap/aarch64-linux/bash b/gnu/packages/bootstrap/aarch64-linux/bash
deleted file mode 100755
index 0bfb9d1824..0000000000
--- a/gnu/packages/bootstrap/aarch64-linux/bash
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/aarch64-linux/mkdir b/gnu/packages/bootstrap/aarch64-linux/mkdir
deleted file mode 100755
index 35cd1815fd..0000000000
--- a/gnu/packages/bootstrap/aarch64-linux/mkdir
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/aarch64-linux/tar b/gnu/packages/bootstrap/aarch64-linux/tar
deleted file mode 100755
index 7e68edb0be..0000000000
--- a/gnu/packages/bootstrap/aarch64-linux/tar
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/aarch64-linux/xz b/gnu/packages/bootstrap/aarch64-linux/xz
deleted file mode 100755
index 5aa18c9234..0000000000
--- a/gnu/packages/bootstrap/aarch64-linux/xz
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/armhf-linux/bash b/gnu/packages/bootstrap/armhf-linux/bash
deleted file mode 100755
index 212a22c8ce..0000000000
--- a/gnu/packages/bootstrap/armhf-linux/bash
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/armhf-linux/mkdir b/gnu/packages/bootstrap/armhf-linux/mkdir
deleted file mode 100755
index c3e5246e92..0000000000
--- a/gnu/packages/bootstrap/armhf-linux/mkdir
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/armhf-linux/tar b/gnu/packages/bootstrap/armhf-linux/tar
deleted file mode 100755
index 5a6aac8a58..0000000000
--- a/gnu/packages/bootstrap/armhf-linux/tar
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/armhf-linux/xz b/gnu/packages/bootstrap/armhf-linux/xz
deleted file mode 100755
index a77aebc268..0000000000
--- a/gnu/packages/bootstrap/armhf-linux/xz
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/i686-linux/bash b/gnu/packages/bootstrap/i686-linux/bash
deleted file mode 100755
index 4b99d7eb4a..0000000000
--- a/gnu/packages/bootstrap/i686-linux/bash
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/i686-linux/mkdir b/gnu/packages/bootstrap/i686-linux/mkdir
deleted file mode 100755
index 6623a38404..0000000000
--- a/gnu/packages/bootstrap/i686-linux/mkdir
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/i686-linux/tar b/gnu/packages/bootstrap/i686-linux/tar
deleted file mode 100755
index d33cd391f1..0000000000
--- a/gnu/packages/bootstrap/i686-linux/tar
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/i686-linux/xz b/gnu/packages/bootstrap/i686-linux/xz
deleted file mode 100755
index f94dbde77c..0000000000
--- a/gnu/packages/bootstrap/i686-linux/xz
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/mips64el-linux/bash b/gnu/packages/bootstrap/mips64el-linux/bash
deleted file mode 100755
index 403671d2fa..0000000000
--- a/gnu/packages/bootstrap/mips64el-linux/bash
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/mips64el-linux/mkdir b/gnu/packages/bootstrap/mips64el-linux/mkdir
deleted file mode 100755
index c8d3285b38..0000000000
--- a/gnu/packages/bootstrap/mips64el-linux/mkdir
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/mips64el-linux/tar b/gnu/packages/bootstrap/mips64el-linux/tar
deleted file mode 100755
index 0cdf7cce2c..0000000000
--- a/gnu/packages/bootstrap/mips64el-linux/tar
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/mips64el-linux/xz b/gnu/packages/bootstrap/mips64el-linux/xz
deleted file mode 100755
index b0622ba946..0000000000
--- a/gnu/packages/bootstrap/mips64el-linux/xz
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/x86_64-linux/bash b/gnu/packages/bootstrap/x86_64-linux/bash
deleted file mode 100755
index b9c410b7cf..0000000000
--- a/gnu/packages/bootstrap/x86_64-linux/bash
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/x86_64-linux/mkdir b/gnu/packages/bootstrap/x86_64-linux/mkdir
deleted file mode 100755
index f8250ae693..0000000000
--- a/gnu/packages/bootstrap/x86_64-linux/mkdir
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/x86_64-linux/tar b/gnu/packages/bootstrap/x86_64-linux/tar
deleted file mode 100755
index 90e492f89d..0000000000
--- a/gnu/packages/bootstrap/x86_64-linux/tar
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/bootstrap/x86_64-linux/xz b/gnu/packages/bootstrap/x86_64-linux/xz
deleted file mode 100755
index 6bfe3c6d96..0000000000
--- a/gnu/packages/bootstrap/x86_64-linux/xz
+++ /dev/null
Binary files differ
diff --git a/gnu/packages/build-tools.scm b/gnu/packages/build-tools.scm
index f4644d33bd..c435e72824 100644
--- a/gnu/packages/build-tools.scm
+++ b/gnu/packages/build-tools.scm
@@ -162,7 +162,7 @@ files and generates build instructions for the Ninja build system.")
(define-public meson
(package
(name "meson")
- (version "0.50.0")
+ (version "0.50.1")
(source (origin
(method url-fetch)
(uri (string-append "https://github.com/mesonbuild/meson/"
@@ -170,7 +170,7 @@ files and generates build instructions for the Ninja build system.")
version ".tar.gz"))
(sha256
(base32
- "07q2wz23wjfk8z66mli1cc9as0ycjp5f39fd4awny82qv8nw86ra"))))
+ "1k2fw5qk4mqjcb4j5dhp8xfn0caqphb11yh8zkw7v9w01kb5d3zn"))))
(build-system python-build-system)
(arguments
`(;; FIXME: Tests require many additional inputs, a fix for the RUNPATH
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 4bb608bd8f..284670af6b 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -134,14 +134,14 @@ with a flexible variety of user interfaces.")
(define-public cppunit
(package
(name "cppunit")
- (version "1.13.2")
+ (version "1.14.0")
(source (origin
(method url-fetch)
(uri (string-append "http://dev-www.libreoffice.org/src/"
name "-" version ".tar.gz"))
(sha256
(base32
- "17s2kzmkw3kfjhpp72rfppyd7syr7bdq5s69syj2nvrlwd3d4irz"))))
+ "1027cyfx5gsjkdkaf6c2wnjh68882grw8n672018cj3vs9lrhmix"))))
;; Explicitly link with libdl. This is expected to be done by packages
;; relying on cppunit for their tests. However, not all of them do.
;; If we added the linker flag to such packages, we would pollute all
@@ -156,23 +156,6 @@ unit testing. Test output is in XML for automatic testing and GUI based for
supervised tests.")
(license license:lgpl2.1))) ; no copyright notices. LGPL2.1 is in the tarball
-;; Some packages require this newer version of cppunit. However, it needs
-;; C++11 support, which is not enabled by default in our current GCC, and
-;; updating in-place would require adding CXXFLAGS to many dependent packages.
-;; Thus, keep as a separate variable for now.
-;; TODO: Remove this when our default GCC is updated to 6 or higher.
-(define-public cppunit-1.14
- (package
- (inherit cppunit)
- (version "1.14.0")
- (source (origin
- (method url-fetch)
- (uri (string-append "https://dev-www.libreoffice.org/src/"
- "cppunit-" version ".tar.gz"))
- (sha256
- (base32
- "1027cyfx5gsjkdkaf6c2wnjh68882grw8n672018cj3vs9lrhmix"))))))
-
;; When dependent packages upgraded to use newer version of catch, this one should
;; be removed.
(define-public catch-framework
@@ -703,31 +686,28 @@ standard library.")
(define-public python-pytest
(package
(name "python-pytest")
- (version "3.8.0")
+ (version "4.4.1")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest" version))
(sha256
(base32
- "17grcfvd6ggvvqmprwv5y8g319nayam70hr43ssjwj40ws27z858"))))
+ "1xcmic8wzaj00rn1lg4ib4prh2f4lzpiaadk35qlv8hcny1j505p"))))
(build-system python-build-system)
(arguments
`(#:phases
(modify-phases %standard-phases
- (add-before 'check 'disable-invalid-tests
+ (replace 'check
(lambda _
- ;; Some tests involves the /usr directory, and fails.
- (substitute* "testing/test_argcomplete.py"
- (("def test_remove_dir_prefix\\(self\\):")
- "@pytest.mark.xfail\n def test_remove_dir_prefix(self):"))
- (substitute* "testing/test_argcomplete.py"
- (("def test_remove_dir_prefix" line)
- (string-append "@pytest.mark.skip"
- "(reason=\"Assumes that /usr exists.\")\n "
- line)))
- #t))
- (replace 'check (lambda _ (invoke "pytest" "-vv"))))))
+ (invoke "pytest" "-vv" "-k"
+ (string-append
+ ;; These tests involve the /usr directory, and fails.
+ "not test_remove_dir_prefix"
+ " and not test_argcomplete"
+ ;; This test tries to override PYTHONPATH, and
+ ;; subsequently fails to locate the test libraries.
+ " and not test_collection")))))))
(propagated-inputs
`(("python-atomicwrites" ,python-atomicwrites)
("python-attrs" ,python-attrs-bootstrap)
@@ -817,14 +797,14 @@ supports coverage of subprocesses.")
(define-public python-pytest-runner
(package
(name "python-pytest-runner")
- (version "4.2")
+ (version "4.4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "pytest-runner" version))
(sha256
(base32
- "1gkpyphawxz38ni1gdq1fmwyqcg02m7ypzqvv46z06crwdxi2gyj"))))
+ "1x0d9n40lsiphblbs61rdc0d5r31f6vh0vcahqdv0mffakbnrb80"))))
(build-system python-build-system)
(native-inputs
`(("python-pytest" ,python-pytest-bootstrap)
@@ -1268,14 +1248,14 @@ have failed since the last commit or what tests are currently failing.")))
(define-public python-coverage
(package
(name "python-coverage")
- (version "4.4.1")
+ (version "4.5.3")
(source
(origin
(method url-fetch)
(uri (pypi-uri "coverage" version))
(sha256
(base32
- "097l4s3ssxm1vncsn0nw3a1pbzah28773q36c1ab9wz01r04973s"))))
+ "02f6m073qdispn96rc616hg0rnmw1pgqzw3bgxwiwza4zf9hirlx"))))
(build-system python-build-system)
(arguments
;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors.
@@ -1538,17 +1518,16 @@ instantly.")
(define-public python-hypothesis
(package
(name "python-hypothesis")
- (version "3.70.3")
+ (version "4.18.3")
(source (origin
(method url-fetch)
(uri (pypi-uri "hypothesis" version))
(sha256
(base32
- "1rshs1japfmwgar98yrkq4hg4z2q76hlnq7w2n3lfbjnscn1jd9b"))))
+ "0a35nwqyjnm4cphi43xracqpkws0ip61mndvqb1iqq7gkva83lb1"))))
(build-system python-build-system)
(native-inputs
- `(;; FIXME: Change to python-flake8 in the next rebuild cycle.
- ("python-flake8" ,python-flake8-3.5)
+ `(("python-flake8" ,python-flake8)
("python-pytest" ,python-pytest-bootstrap)))
(propagated-inputs
`(("python-attrs" ,python-attrs-bootstrap)
diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm
index 7186cf98df..8a0bba2e8f 100644
--- a/gnu/packages/cmake.scm
+++ b/gnu/packages/cmake.scm
@@ -8,6 +8,8 @@
;;; Copyright © 2017, 2018 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Arun Isaac <arunisaac@systemreboot.net>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+
;;;
;;; This file is part of GNU Guix.
;;;
@@ -39,12 +41,17 @@
#:use-module (gnu packages file)
#:use-module (gnu packages libevent)
#:use-module (gnu packages ncurses)
- #:use-module (gnu packages xml))
+ #:use-module (gnu packages sphinx)
+ #:use-module (gnu packages texinfo)
+ #:use-module (gnu packages xml)
+ #:use-module (srfi srfi-1))
-(define-public cmake
+;;; This minimal variant of CMake does not include the documentation. It is
+;;; used by the cmake-build-system.
+(define-public cmake-minimal
(package
- (name "cmake")
- (version "3.13.1")
+ (name "cmake-minimal")
+ (version "3.14.5")
(source (origin
(method url-fetch)
(uri (string-append "https://www.cmake.org/files/v"
@@ -52,7 +59,7 @@
"/cmake-" version ".tar.gz"))
(sha256
(base32
- "04123d7fgnn1fs5p0nwyq397ss89r0y4wkg9a09qiwkjsvk1rzmy"))
+ "01lcl6ynxfgqn09ncfz1gr24ha5pv1slk0azzaawaqrwpsgf8njh"))
(modules '((guix build utils)))
(snippet
'(begin
@@ -72,6 +79,23 @@
(build-system gnu-build-system)
(arguments
`(#:test-target "test"
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out"))
+ (parallel-job-count (number->string (parallel-job-count))))
+ (list "--verbose"
+ (string-append "--parallel=" parallel-job-count)
+ (string-append "--prefix=" out)
+ "--system-libs"
+ "--no-system-jsoncpp" ; FIXME: Circular dependency.
+ ;; By default, the man pages and other docs land
+ ;; in PREFIX/man and PREFIX/doc, but we want them
+ ;; in share/{man,doc}. Note that unlike
+ ;; autoconf-generated configure scripts, cmake's
+ ;; configure prepends "PREFIX/" to what we pass
+ ;; to --mandir and --docdir.
+ "--mandir=share/man"
+ ,(string-append "--docdir=share/doc/cmake-"
+ (version-major+minor version))))
#:make-flags
(let ((skipped-tests
(list "BundleUtilities" ; This test fails on Guix.
@@ -116,27 +140,13 @@
;; Help cmake's bootstrap process to find system libraries
(begin
(setenv "CMAKE_LIBRARY_PATH" (getenv "LIBRARY_PATH"))
- (setenv "CMAKE_INCLUDE_PATH" (getenv "C_INCLUDE_PATH"))
+ (setenv "CMAKE_INCLUDE_PATH" (or (getenv "CPATH")
+ (getenv "C_INCLUDE_PATH")))
#t)))
+ ;; CMake uses its own configure script.
(replace 'configure
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (invoke
- "./configure" "--verbose"
- (string-append "--parallel=" (number->string (parallel-job-count)))
- (string-append "--prefix=" out)
- "--system-libs"
- "--no-system-jsoncpp" ; FIXME: Circular dependency.
- ;; By default, the man pages and other docs land
- ;; in PREFIX/man and PREFIX/doc, but we want them
- ;; in share/{man,doc}. Note that unlike
- ;; autoconf-generated configure scripts, cmake's
- ;; configure prepends "PREFIX/" to what we pass
- ;; to --mandir and --docdir.
- "--mandir=share/man"
- ,(string-append
- "--docdir=share/doc/cmake-"
- (version-major+minor version)))))))))
+ (lambda* (#:key (configure-flags '()) #:allow-other-keys)
+ (apply invoke "./configure" configure-flags))))))
(inputs
`(("bzip2" ,bzip2)
("curl" ,curl)
@@ -158,12 +168,47 @@
CMake is used to control the software compilation process using simple platform
and compiler independent configuration files. CMake generates native makefiles
and workspaces that can be used in the compiler environment of your choice.")
- (license (list license:bsd-3 ; cmake
- license:bsd-4 ; cmcompress
- license:bsd-2 ; cmlibarchive
- license:expat ; cmjsoncpp is dual MIT/public domain
+ (properties '((hidden? . #t)))
+ (license (list license:bsd-3 ; cmake
+ license:bsd-4 ; cmcompress
+ license:bsd-2 ; cmlibarchive
+ license:expat ; cmjsoncpp is dual MIT/public domain
license:public-domain)))) ; cmlibarchive/archive_getdate.c
+(define-public cmake
+ (package
+ (inherit cmake-minimal)
+ (name "cmake")
+ (arguments
+ (substitute-keyword-arguments (package-arguments cmake-minimal)
+ ((#:configure-flags configure-flags ''())
+ `(append ,configure-flags
+ ;; Extra configure flags used to generate the documentation.
+ '("--sphinx-info"
+ "--sphinx-man"
+ "--sphinx-html")))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'install 'move-html-doc
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (doc (assoc-ref outputs "doc"))
+ (html (string-append "/share/doc/cmake-"
+ ,(version-major+minor
+ (package-version cmake-minimal))
+ "/html")))
+ (copy-recursively (string-append out html)
+ (string-append doc html))
+ (delete-file-recursively (string-append out html))
+ #t)))))))
+ ;; Extra inputs required to build the documentation.
+ (native-inputs
+ `(,@(package-native-inputs cmake-minimal)
+ ("python-sphinx" ,python-sphinx)
+ ("texinfo" ,texinfo)))
+ (outputs '("out" "doc"))
+ (properties (alist-delete 'hidden? (package-properties cmake-minimal)))))
+
(define-public emacs-cmake-mode
(package
(inherit cmake)
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index a8ec677cee..08a34895f5 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -1,10 +1,12 @@
;;; GNU Guix --- Functional package management for GNU
-;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2014 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014, 2015, 2017 Mark H Weaver <mhw@netris.org>
-;;; Copyright © 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -28,6 +30,7 @@
#:use-module (gnu packages bootstrap)
#:use-module (gnu packages base)
#:use-module (gnu packages bash)
+ #:use-module (gnu packages c)
#:use-module (gnu packages gcc)
#:use-module (gnu packages m4)
#:use-module (gnu packages code)
@@ -39,6 +42,7 @@
#:use-module (gnu packages gettext)
#:use-module (gnu packages multiprecision)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages mes)
#:use-module (gnu packages perl)
#:use-module (gnu packages linux)
#:use-module (gnu packages hurd)
@@ -78,6 +82,1324 @@
;;;
;;; Code:
+(define mes-boot
+ (package-with-bootstrap-guile
+ (package
+ (inherit mes)
+ (name "mes-boot")
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs
+ `(("mescc-tools" ,%bootstrap-mescc-tools)
+ ("nyacc-source" ,(package-source nyacc-0.86))
+
+ ("coreutils" , %bootstrap-coreutils&co)
+ ("bootstrap-mes" ,%bootstrap-mes)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-seeds
+ (lambda _
+ (let ((nyacc-source (assoc-ref %build-inputs "nyacc-source"))
+ (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
+ (with-directory-excursion ".."
+ (and
+ (mkdir-p "nyacc-source")
+ (invoke "tar" "--strip=1" "-C" "nyacc-source" "-xvf" nyacc-source)
+ (symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed")
+ #t)))))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref %outputs "out")))
+ (setenv "GUILE" "mes")
+ (setenv "GUILE_EFFECTIVE_VERSION" "2.2")
+ (setenv "GUILE_LOAD_PATH" "nyacc")
+ (symlink (string-append "../nyacc-source/module") "nyacc")
+ (invoke "bash" "configure.sh"
+ (string-append "--prefix=" out)))))
+ (replace 'build
+ (lambda _
+ (let ((mes (assoc-ref %build-inputs "bootstrap-mes")))
+ (setenv "MES_PREFIX" (string-append mes "/share/mes"))
+ (setenv "MES_ARENA" "100000000")
+ (setenv "MES_MAX_ARENA" "100000000")
+ (setenv "MES_STACK" "10000000")
+ (invoke "sh" "bootstrap.sh"))))
+ (replace 'check
+ (lambda _
+ (and
+ (setenv "DIFF" "sh scripts/diff.scm")
+ ;; fail fast tests
+ ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/t")
+ ;; (invoke "sh" "-x" "build-aux/test.sh" "scaffold/tests/63-struct-cell")
+ (invoke "sh" "check.sh"))))
+ (replace 'install
+ (lambda _
+ (invoke "sh" "install.sh"))))))
+ (native-search-paths
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("share/mes/include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("share/mes/lib"))))))))
+
+(define tcc-boot0
+ ;; Pristine tcc cannot be built by MesCC, we are keeping a delta of 11
+ ;; patches. In a very early and rough form they were presented to the
+ ;; TinyCC developers, who at the time showed no interest in supporting the
+ ;; bootstrappable effort; we will try again later. These patches have been
+ ;; ported to 0.9.27, alas the resulting tcc is buggy. Once MesCC is more
+ ;; mature, this package should use the 0.9.27 sources (or later).
+ (let ((version "0.9.26")
+ (revision "6")
+ (commit "c004e9a34fb026bb44d211ab98bb768e79900eef"))
+ (package-with-bootstrap-guile
+ (package
+ (inherit tcc)
+ (name "tcc-boot0")
+ (version (string-append version "-" revision "." (string-take commit 7)))
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://gitlab.com/janneke/tinycc"
+ "/-/archive/" commit
+ "/tinycc-" commit ".tar.gz"))
+ (sha256
+ (base32
+ "1hmzn1pq0x22ppd80hyrn5qzqq94mxd0ychzj6vrr2vnj2frjv5b"))))
+ (build-system gnu-build-system)
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs
+ `(("mes" ,mes-boot)
+ ("mescc-tools" ,%bootstrap-mescc-tools)
+ ("nyacc-source" ,(package-source nyacc-0.86))
+
+ ("coreutils" , %bootstrap-coreutils&co)
+ ("bootstrap-mes" ,%bootstrap-mes)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2 binaries
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'unpack-seeds
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((coreutils (assoc-ref %build-inputs "coreutils"))
+ (nyacc-source (assoc-ref %build-inputs "nyacc-source"))
+ (bootstrap-mes (assoc-ref %build-inputs "bootstrap-mes")))
+ (setenv "PATH" (string-append
+ coreutils "/bin"))
+ (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+ (with-directory-excursion ".."
+ (and
+ (mkdir-p "nyacc-source")
+ (invoke "tar" "--strip=1" "-C" "nyacc-source"
+ "-xvf" nyacc-source)
+ (symlink (string-append bootstrap-mes "/share/mes/lib") "mes-seed")
+ #t)))))
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (dir (with-directory-excursion ".." (getcwd)))
+ (coreutils (assoc-ref %build-inputs "coreutils"))
+ (mes (assoc-ref %build-inputs "mes"))
+ (mescc-tools (assoc-ref %build-inputs "mescc-tools"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (interpreter (if libc
+ ;; also for x86_64-linux, we are still on i686-linux
+ (string-append libc ,(glibc-dynamic-linker "i686-linux"))
+ (string-append mes "/lib/mes-loader"))))
+ (setenv "PATH" (string-append
+ coreutils "/bin"
+ ":" mes "/bin"
+ ":" mescc-tools "/bin"))
+ (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+
+ (setenv "PREFIX" out)
+ (symlink (string-append mes "/share/mes") "mes")
+ (symlink (string-append "../nyacc-source/module") "nyacc")
+ (setenv "MES_PREFIX" "mes")
+ (setenv "MES_ARENA" "100000000")
+ (setenv "MES_MAX_ARENA" "100000000")
+ (setenv "MES_STACK" "10000000")
+ (setenv "MES" "mes")
+ (setenv "GUILE_LOAD_PATH" "nyacc")
+ (invoke "sh" "configure"
+ "--prefix=$PREFIX"
+ (string-append "--elfinterp=" interpreter)
+ "--crtprefix=."
+ "--tccdir=."))))
+ (replace 'build
+ (lambda _
+ (substitute* "bootstrap.sh"
+ (("^ cmp") "# cmp"))
+ (invoke "sh" "bootstrap.sh")))
+ (replace 'check
+ (lambda _
+ (setenv "DIFF" "diff.scm")
+ (setenv "OBJDUMP" "true")
+ ;; fail fast tests
+ ;; (invoke "sh" "test.sh" "mes/scaffold/tests/30-strlen")
+ ;; (invoke "sh" "-x" "test.sh" "mes/scaffold/tinycc/00_assignment")
+ (setenv "TCC" "./tcc")
+ (invoke "sh" "check.sh")))
+ (replace 'install
+ (lambda _
+ (invoke "sh" "install.sh"))))))
+ (native-search-paths
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib")))))))))
+
+(define tcc-boot
+ (package-with-bootstrap-guile
+ (package
+ (inherit tcc-boot0)
+ (name "tcc-boot")
+ (version "0.9.27")
+ (source (origin
+ (inherit (package-source tcc))
+ (patches (search-patches "tcc-boot-0.9.27.patch"))))
+ (build-system gnu-build-system)
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs
+ `(("mes" ,mes-boot)
+ ("tcc" ,tcc-boot0)
+
+ ("coreutils" , %bootstrap-coreutils&co)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:strip-binaries? #f ; binutil's strip b0rkes MesCC/M1/hex2
+ ; binaries, tcc-boot also comes with
+ ; MesCC/M1/hex2-built binaries
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (coreutils (assoc-ref %build-inputs "coreutils"))
+ (mes (assoc-ref %build-inputs "mes"))
+ (tcc (assoc-ref %build-inputs "tcc"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (interpreter (if libc
+ ;; also for x86_64-linux, we are still on i686-linux
+ (string-append libc ,(glibc-dynamic-linker "i686-linux"))
+ (string-append mes "/lib/mes-loader"))))
+ ;; unpack
+ (setenv "PATH" (string-append
+ coreutils "/bin"
+ ":" tcc "/bin"))
+ (format (current-error-port) "PATH=~s\n" (getenv "PATH"))
+ (invoke "sh" "configure"
+ (string-append "--cc=tcc")
+ (string-append "--cpu=i386")
+ (string-append "--prefix=" out)
+ (string-append "--elfinterp=" interpreter)
+ (string-append "--crtprefix=" tcc "/lib")
+ (string-append "--sysincludepaths=" tcc "/include")
+ (string-append "--libpaths=" tcc "/lib")))))
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref %outputs "out"))
+ (mes (assoc-ref %build-inputs "mes"))
+ (tcc (assoc-ref %build-inputs "tcc"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (interpreter (if libc
+ ;; also for x86_64-linux, we are still on i686-linux
+ (string-append libc ,(glibc-dynamic-linker "i686-linux"))
+ (string-append mes "/lib/mes-loader"))))
+ (invoke "tcc"
+ "-vvv"
+ "-D" "BOOTSTRAP=1"
+ "-D" "ONE_SOURCE=1"
+ "-D" "TCC_TARGET_I386=1"
+ "-D" "CONFIG_TCC_STATIC=1"
+ "-D" "CONFIG_USE_LIBGCC=1"
+ "-D" (string-append "CONFIG_TCCDIR=\"" out "/lib/tcc\"")
+ "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
+ "-D" (string-append "CONFIG_TCC_CRTPREFIX=\"" out "/lib:{B}/lib:.\"")
+ "-D" (string-append "CONFIG_TCC_ELFINTERP=\"" interpreter "\"")
+ "-D" (string-append "CONFIG_TCC_LIBPATHS=\"" tcc "/lib:{B}/lib:.\"")
+ "-D" (string-append "CONFIG_TCC_SYSINCLUDEPATHS=\"" tcc "/include" ":/include:{B}/include\"")
+ "-D" (string-append "TCC_LIBGCC=\"" tcc "/lib/libc.a\"")
+ "-o" "tcc"
+ "tcc.c"))))
+ (replace 'check
+ (lambda _
+ ;; FIXME: add sensible check target (without depending on make)
+ ;; ./check.sh ?
+ (= 1 (status:exit-val (system* "./tcc" "--help")))))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref %outputs "out"))
+ (tcc (assoc-ref %build-inputs "tcc")))
+ (and
+ (mkdir-p (string-append out "/bin"))
+ (copy-file "tcc" (string-append out "/bin/tcc"))
+ (mkdir-p (string-append out "/lib/tcc"))
+ (copy-recursively (string-append tcc "/include")
+ (string-append out "/include"))
+ (copy-recursively (string-append tcc "/lib")
+ (string-append out "/lib"))
+ (invoke "tcc" "-D" "TCC_TARGET_I386=1" "-c" "-o" "libtcc1.o" "lib/libtcc1.c")
+ (invoke "tcc" "-ar" "rc" "libtcc1.a" "libtcc1.o")
+ (copy-file "libtcc1.a" (string-append out "/lib/libtcc1.a"))
+ (delete-file (string-append out "/lib/tcc/libtcc1.a"))
+ (copy-file "libtcc1.a" (string-append out "/lib/tcc/libtcc1.a"))
+ #t))))))))))
+
+(define make-mesboot0
+ (package-with-bootstrap-guile
+ (package
+ (inherit gnu-make)
+ (name "make-mesboot0")
+ (version "3.80")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/make/make-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1pb7fb7fqf9wz9najm85qdma1xhxzf1rhj5gwrlzdsz2zm0hpcv4"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("tcc" ,tcc-boot)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:tests? #f ; check depends on perl
+ #:guile ,%bootstrap-guile
+ #:configure-flags `("CC=tcc -DO_RDONLY=0"
+ "LD=tcc"
+ "--disable-nls")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'configure-fixup
+ (lambda _
+ (substitute* "build.sh"
+ (("^REMOTE=.*") "REMOTE=stub\n")
+ (("^extras=.*") "extras=getloadavg.c\n"))
+ (substitute* "make.h"
+ (("^extern long int lseek.*" all) (string-append "// " all)))
+ #t))
+ (delete 'patch-generated-file-shebangs) ; no perl
+ (replace 'build
+ (lambda _
+ (invoke "sh" "./build.sh")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin")))
+ (install-file "make" bin))))))))))
+
+(define diffutils-mesboot
+ (package-with-bootstrap-guile
+ (package
+ (inherit diffutils)
+ (name "diffutils-mesboot")
+ (version "2.7")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/diffutils/diffutils-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1mirn5i825bn5w7rh6mgn0r8aj9xqanav95dwcl1b8sn82f4iwnm"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("mes" ,mes-boot)
+ ("tcc" ,tcc-boot)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("make" ,make-mesboot0)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:parallel-build? #f
+ #:tests? #f ; check is naive, also checks non-built PROGRAMS
+ #:strip-binaries? #f ; no strip yet
+ #:phases
+ (modify-phases %standard-phases
+ ;; diffutils-2.7 needs more traditional configure
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash")))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "CC" "tcc")
+ (setenv "LD" "tcc")
+ (invoke "./configure" (string-append "--prefix=" out)))))
+ (add-before 'configure 'remove-diff3-sdiff
+ (lambda* (#:key outputs #:allow-other-keys)
+ (substitute* "Makefile.in"
+ (("PROGRAMS = .*" all) "PROGRAMS = cmp diff"))))))))))
+
+
+(define binutils-mesboot0
+ (package-with-bootstrap-guile
+ (package
+ (inherit binutils)
+ (name "binutils-mesboot0")
+ (version "2.20.1a")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/binutils/binutils-"
+ version ".tar.bz2"))
+ (patches (search-patches "binutils-boot-2.20.1a.patch"))
+ (sha256
+ (base32
+ "0r7dr0brfpchh5ic0z9r4yxqn4ybzmlh25sbp30cacqk8nb7rlvi"))))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("tcc" ,tcc-boot)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("make" ,make-mesboot0)))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f ; runtest: command not found
+ #:parallel-build? #f
+ #:strip-binaries? #f ; no strip yet
+ #:configure-flags
+ (let ((cppflags (string-append " -D __GLIBC_MINOR__=6"
+ " -D MES_BOOTSTRAP=1"))
+ (bash (assoc-ref %build-inputs "bash")))
+ `(,(string-append "CONFIG_SHELL=" bash "/bin/sh")
+ ,(string-append "CPPFLAGS=" cppflags)
+ "AR=tcc -ar"
+ "CXX=false"
+ "RANLIB=true"
+ ,(string-append "CC=tcc" cppflags)
+ "--disable-nls"
+ "--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ "--with-sysroot=/")))))))
+
+(define gcc-core-mesboot
+ ;; Gcc-2.95.3 is the most recent GCC that is supported by what the Mes C
+ ;; Library v0.16 offers. Gcc-3.x (and 4.x) place higher demands on a C
+ ;; library, such as dir.h/struct DIR/readdir, locales, signals... Also,
+ ;; with gcc-2.95.3, binutils-boot-2.20.1a and glibc-2.2.5 we found a GNU
+ ;; toolchain triplet "that works".
+ (package-with-bootstrap-guile
+ (package
+ (inherit gcc)
+ (name "gcc-core-mesboot")
+ (version "2.95.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gcc/gcc-2.95.3/gcc-core-"
+ version
+ ".tar.gz"))
+ (patches (search-patches "gcc-boot-2.95.3.patch"))
+ (sha256
+ (base32
+ "1xvfy4pqhrd5v2cv8lzf63iqg92k09g6z9n2ah6ndd4h17k1x0an"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("binutils" ,binutils-mesboot0)
+ ("tcc" ,tcc-boot)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("make" ,make-mesboot0)))
+ (outputs '("out"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f
+ #:parallel-build? #f
+ #:strip-binaries? #f
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out")))
+ `("--enable-static"
+ "--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ ,(string-append "--prefix=" out)))
+ #:make-flags (list
+ "CC=tcc -static -D __GLIBC_MINOR__=6"
+ "OLDCC=tcc -static -D __GLIBC_MINOR__=6"
+ "CC_FOR_BUILD=tcc -static -D __GLIBC_MINOR__=6"
+ "AR=ar"
+ "RANLIB=ranlib"
+ (string-append "LIBGCC2_INCLUDES=-I "
+ (assoc-ref %build-inputs "tcc")
+ "/include")
+ "LANGUAGES=c"
+ (string-append "BOOT_LDFLAGS="
+ " -B" (assoc-ref %build-inputs "tcc")
+ "/lib/"))
+ #:modules ((guix build gnu-build-system)
+ (guix build utils)
+ (srfi srfi-1))
+ #:phases
+ (modify-phases %standard-phases
+ ;; gcc-2.95.3 needs more traditional configure
+ (add-before 'configure 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (tcc (assoc-ref %build-inputs "tcc"))
+ (cppflags " -D __GLIBC_MINOR__=6"))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "CPPFLAGS" cppflags)
+ (setenv "CC" (string-append "tcc" cppflags))
+ (setenv "CC_FOR_BUILD" (string-append "tcc" cppflags))
+ (setenv "CPP" (string-append "tcc -E" cppflags))
+ (with-output-to-file "config.cache"
+ (lambda _
+ (display "
+ac_cv_c_float_format='IEEE (little-endian)'
+"))))))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags))
+ (apply invoke "./configure" configure-flags)))
+ (add-after 'configure 'remove-info
+ (lambda _
+ ;; no info at this stage
+ (delete-file-recursively "texinfo")
+ (invoke "touch" "gcc/cpp.info" "gcc/gcc.info")))
+ (add-after 'install 'install2
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((tcc (assoc-ref %build-inputs "tcc"))
+ (tcc-lib (string-append tcc "/lib/x86-mes-gcc"))
+ (out (assoc-ref outputs "out"))
+ (gcc-dir (string-append
+ out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
+ (and
+ (mkdir-p "tmp")
+ (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
+ (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
+ (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))
+ (copy-file (string-append tcc "/lib/libtcc1.a")
+ (string-append out "/lib/libtcc1.a"))
+ (invoke "ar" "r" (string-append gcc-dir "/libc.a")
+ (string-append tcc-lib "/libc+gnu.o")
+ (string-append tcc-lib "/libtcc1.o"))
+ (invoke "ar" "r" (string-append out "/lib/libc.a")
+ (string-append tcc-lib "/libc+gnu.o")
+ (string-append tcc-lib "/libtcc1.o"))
+ (invoke "ls" "-ltrF" gcc-dir)
+ (copy-recursively (string-append tcc "/include")
+ (string-append out "/include"))
+ #t)))))))
+ (native-search-paths
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include" "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib"))))))))
+
+(define mesboot-headers
+ (package-with-bootstrap-guile
+ (package
+ (inherit mes-boot)
+ (name "mesboot-headers")
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("coreutils" ,%bootstrap-coreutils&co)
+ ("headers" ,%bootstrap-linux-libre-headers)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f
+ #:strip-binaries? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (include (string-append out "/include"))
+ (headers (assoc-ref %build-inputs "headers" )))
+ (mkdir-p include)
+ (copy-recursively "include" out)
+ (copy-recursively headers out)
+ #t))))))
+ (native-search-paths
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include"))))))))
+
+(define glibc-mesboot0
+ ;; GNU C Library 2.2.5 is the most recent glibc that we managed to build
+ ;; using gcc-2.95.3. Newer versions (2.3.x, 2.6, 2.1x) seem to need a newer
+ ;; gcc.
+ (package-with-bootstrap-guile
+ (package
+ (inherit glibc)
+ (name "glibc-mesboot0")
+ (version "2.2.5")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/glibc/glibc-"
+ version
+ ".tar.gz"))
+ (patches (search-patches "glibc-boot-2.2.5.patch"))
+ (sha256
+ (base32
+ "1vl48i16gx6h68whjyhgnn1s57vqq32f9ygfa2fls7pdkbsqvp2q"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (inputs '())
+ (propagated-inputs '())
+ (native-inputs `(("binutils" ,binutils-mesboot0)
+ ("gcc" ,gcc-core-mesboot)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("headers" ,mesboot-headers)
+ ("make" ,make-mesboot0)))
+ (outputs '("out"))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:tests? #f
+ #:strip-binaries? #f
+ #:parallel-build? #f ; gcc-2.95.3 ICEs on massively parallel builds
+ #:make-flags (list (string-append
+ "SHELL="
+ (assoc-ref %build-inputs "bash")
+ "/bin/sh"))
+ #:configure-flags
+ (let ((out (assoc-ref %outputs "out"))
+ (headers (assoc-ref %build-inputs "headers")))
+ (list
+ "--disable-shared"
+ "--enable-static"
+ "--disable-sanity-checks"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ (string-append "--with-headers=" headers "/include")
+ "--enable-static-nss"
+ "--without-__thread"
+ "--without-cvs"
+ "--without-gd"
+ "--without-tls"
+ (string-append "--prefix=" out)))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (headers (assoc-ref %build-inputs "headers"))
+ (cppflags (string-append
+ ;;" -D __STDC__=1"
+ " -D MES_BOOTSTRAP=1"
+ " -D BOOTSTRAP_GLIBC=1"))
+ (cflags (string-append " -L " (getcwd))))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "SHELL" (getenv "CONFIG_SHELL"))
+ (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
+ (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
+ #t)))
+ ;; glibc-2.2.5 needs a more classic invocation of configure
+ ;; configure: warning: CONFIG_SHELL=/gnu/store/kpxi8h3669afr9r1bgvaf9ij3y4wdyyn-bash-minimal-4.4.12/bin/bash: invalid host type
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port)
+ "running ./configure ~a\n" (string-join configure-flags))
+ (apply invoke "./configure" configure-flags))))))
+ (native-search-paths
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "CPLUS_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib"))))))))
+
+(define gcc-mesboot0
+ (package-with-bootstrap-guile
+ (package
+ (inherit gcc-core-mesboot)
+ (name "gcc-mesboot0")
+ (native-inputs `(("binutils" ,binutils-mesboot0)
+ ("gcc" ,gcc-core-mesboot)
+ ("libc" ,glibc-mesboot0)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("make" ,make-mesboot0)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments gcc-core-mesboot)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (glibc (assoc-ref %build-inputs "libc"))
+ (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
+ (setenv "C_INCLUDE_PATH" (string-append
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
+ ":" kernel-headers "/include"
+ ":" glibc "/include"))
+ (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
+ (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
+ ;; FIXME: add glibc dirs to paths manually
+ (setenv "LIBRARY_PATH" (string-join
+ (list (string-append glibc "/lib")
+ (getenv "LIBRARY_PATH"))
+ ":"))
+ (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
+ (with-output-to-file "config.cache"
+ (lambda _
+ (display "
+ac_cv_c_float_format='IEEE (little-endian)'
+")))
+ #t)))
+ (replace 'install2
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (gcc-dir (string-append
+ out "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3")))
+ (and
+ (mkdir-p "tmp")
+ (zero? (system (string-append "set -x; cd tmp && ar x ../gcc/libgcc2.a")))
+ (zero? (system (string-append "set -x; cd tmp && ar r " gcc-dir "/libgcc.a *.o")))
+ (copy-file "gcc/libgcc2.a" (string-append out "/lib/libgcc2.a"))))))))
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out")))
+ `("--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ ,(string-append "--prefix=" out))))
+ ((#:make-flags make-flags)
+ `(let ((gcc (assoc-ref %build-inputs "gcc")))
+ `("RANLIB=true"
+ ,(string-append "LIBGCC2_INCLUDES=-I " gcc "/include")
+ "LANGUAGES=c"))))))))
+
+(define binutils-mesboot
+ (package-with-bootstrap-guile
+ (package
+ (inherit binutils-mesboot0)
+ (name "binutils-mesboot")
+ (native-inputs `(("binutils" ,binutils-mesboot0)
+ ("libc" ,glibc-mesboot0)
+ ("gcc" ,gcc-mesboot0)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("make" ,make-mesboot0)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments binutils-mesboot0)
+ ((#:configure-flags configure-flags)
+ '(list "--disable-nls"
+ "--disable-shared"
+ "--disable-werror"
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+ "--with-sysroot=/")))))))
+
+(define make-mesboot
+ (package-with-bootstrap-guile
+ (package
+ (inherit make-mesboot0)
+ (name "make-mesboot")
+ (version "3.82")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/make/make-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1rs2f9hmvy3q6zkl15jnlmnpgffm0bhw5ax0h5c7q604wqrip69x"))))
+ (native-inputs `(("binutils" ,binutils-mesboot0)
+ ("libc" ,glibc-mesboot0)
+ ("gcc" ,gcc-mesboot0)
+ ("make" ,make-mesboot0)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments make-mesboot0)
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out")))
+ `(,(string-append "--prefix=" out))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (delete 'configure-fixup)
+ (add-before 'configure 'setenv
+ (lambda _
+ (setenv "LIBS" "-lc -lnss_files -lnss_dns -lresolv")
+ #t)))))))))
+
+(define gmp-boot
+ (package
+ (inherit gmp)
+ (version "4.3.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/gmp/gmp-" version
+ ".tar.gz"))
+ (sha256 (base32
+ "15rwq54fi3s11izas6g985y9jklm3xprfsmym3v1g6xr84bavqvv"))))))
+
+(define mpfr-boot
+ (package
+ (inherit mpfr)
+ (version "2.4.2")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/mpfr/mpfr-" version
+ ".tar.gz"))
+ (sha256 (base32
+ "0dxn4904dra50xa22hi047lj8kkpr41d6vb9sd4grca880c7wv94"))))))
+
+(define mpc-boot
+ (package
+ (inherit mpc)
+ (version "1.0.3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "mirror://gnu/mpc/mpc-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1hzci2zrrd7v3g1jk35qindq05hbl0bhjcyyisq9z209xb3fqzb1"))))))
+
+(define gcc-mesboot1
+ (package-with-bootstrap-guile
+ (package
+ (inherit gcc-mesboot0)
+ (name "gcc-mesboot1")
+ (version "4.7.4")
+ (source (origin (inherit (package-source gcc-4.7))
+ (patches (search-patches "gcc-boot-4.7.4.patch"))))
+ (inputs `(("gmp-source" ,(package-source gmp-boot))
+ ("mpfr-source" ,(package-source mpfr-boot))
+ ("mpc-source" ,(package-source mpc-boot))))
+ (native-inputs `(("binutils" ,binutils-mesboot)
+ ("gcc" ,gcc-mesboot0)
+ ("libc" ,glibc-mesboot0)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("make" ,make-mesboot)))
+ (arguments
+ (substitute-keyword-arguments (package-arguments gcc-core-mesboot)
+ ((#:make-flags make-flags)
+ `(let* ((libc (assoc-ref %build-inputs "libc"))
+ (ldflags (string-append
+ "-B" libc "/lib "
+ "-Wl,-dynamic-linker "
+ "-Wl," libc
+ ,(glibc-dynamic-linker "i686-linux"))))
+ (list (string-append "LDFLAGS=" ldflags)
+ (string-append "LDFLAGS_FOR_TARGET=" ldflags))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; c&p from commencement.scm:gcc-boot0
+ (add-after 'unpack 'unpack-gmp&co
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gmp (assoc-ref %build-inputs "gmp-source"))
+ (mpfr (assoc-ref %build-inputs "mpfr-source"))
+ (mpc (assoc-ref %build-inputs "mpc-source")))
+
+ ;; To reduce the set of pre-built bootstrap inputs, build
+ ;; GMP & co. from GCC.
+ (for-each (lambda (source)
+ (or (invoke "tar" "xvf" source)
+ (error "failed to unpack tarball"
+ source)))
+ (list gmp mpfr mpc))
+
+ ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
+ ,@(map (lambda (lib)
+ ;; Drop trailing letters, as gmp-6.0.0a unpacks
+ ;; into gmp-6.0.0.
+ `(symlink ,(string-trim-right
+ (package-full-name lib "-")
+ char-set:letter)
+ ,(package-name lib)))
+ (list gmp-boot mpfr-boot mpc-boot))
+ #t)))
+ (delete 'remove-info)
+ (replace 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (binutils (assoc-ref %build-inputs "binutils"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (glibc (assoc-ref %build-inputs "libc"))
+ (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "C_INCLUDE_PATH" (string-append
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/2.95.3/include"
+ ":" kernel-headers "/include"
+ ":" glibc "/include"
+ ":" (getcwd) "/mpfr/src"))
+ (setenv "LIBRARY_PATH" (string-append glibc "/lib"
+ ":" gcc "/lib"))
+ (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
+ (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
+ #t)))
+ (delete 'install2)))
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out"))
+ (glibc (assoc-ref %build-inputs "libc")))
+ (list (string-append "--prefix=" out)
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+
+ (string-append "--with-native-system-header-dir=" glibc "/include")
+ (string-append "--with-build-sysroot=" glibc "/include")
+
+ "--disable-bootstrap"
+ "--disable-decimal-float"
+ "--disable-libatomic"
+ "--disable-libcilkrts"
+ "--disable-libgomp"
+ "--disable-libitm"
+ "--disable-libmudflap"
+ "--disable-libquadmath"
+ "--disable-libsanitizer"
+ "--disable-libssp"
+ "--disable-libvtv"
+ "--disable-lto"
+ "--disable-lto-plugin"
+ "--disable-multilib"
+ "--disable-plugin"
+ "--disable-threads"
+ "--enable-languages=c,c++"
+
+ "--enable-static"
+ ;; libstdc++.so: error: depends on 'libgcc_s.so.1', which cannot be found in RUNPATH ()
+ "--disable-shared"
+ "--enable-threads=single"
+
+ ;; No pre-compiled libstdc++ headers, to save space.
+ "--disable-libstdcxx-pch"
+
+ ;; for libcpp ...
+ "--disable-build-with-cxx"))))))))
+
+(define gcc-mesboot1-wrapper
+ ;; We need this so gcc-mesboot1 can be used to create shared binaries that
+ ;; have the correct interpreter, otherwise configuring gcc-mesboot using
+ ;; --enable-shared will fail.
+ (package-with-bootstrap-guile
+ (package
+ (inherit gcc-mesboot1)
+ (name "gcc-mesboot1-wrapper")
+ (source #f)
+ (inputs '())
+ (native-inputs `(("bash" ,%bootstrap-coreutils&co)
+ ("libc" ,glibc-mesboot)
+ ("gcc" ,gcc-mesboot1)))
+ (arguments
+ `(#:implicit-inputs? #f
+ #:guile ,%bootstrap-guile
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'unpack)
+ (delete 'configure)
+ (delete 'install)
+ (replace 'build
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (bin (string-append out "/bin")))
+ (mkdir-p bin)
+ (for-each
+ (lambda (program)
+ (let ((wrapper (string-append bin "/" program)))
+ (with-output-to-file wrapper
+ (lambda _
+ (display (string-append "#! " bash "/bin/bash
+exec " gcc "/bin/" program
+" -Wl,--dynamic-linker"
+;; also for x86_64-linux, we are still on i686-linux
+" -Wl," libc ,(glibc-dynamic-linker "i686-linux")
+" -Wl,--rpath"
+" -Wl," libc "/lib"
+" \"$@\"
+"))
+ (chmod wrapper #o555)))))
+ '(
+ "gcc"
+ "g++"
+ "i686-unknown-linux-gnu-gcc"
+ "i686-unknown-linux-gnu-g++"
+ ))
+ #t)))
+ (replace 'check
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bin (string-append out "/bin"))
+ (program (string-append bin "/gcc")))
+ (invoke program "--help"))))))))))
+
+(define glibc-headers-mesboot
+ (package-with-bootstrap-guile
+ (package
+ (inherit glibc-mesboot0)
+ (name "glibc-headers-mesboot")
+ (version "2.16.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/glibc/glibc-"
+ version
+ ".tar.gz"))
+ (patches (search-patches "glibc-boot-2.16.0.patch"
+ "glibc-bootstrap-system-2.16.0.patch"))
+ (sha256
+ (base32
+ "0vlz4x6cgz7h54qq4528q526qlhnsjzbsvgc4iizn76cb0bfanx7"))))
+ (native-inputs `(("binutils" ,binutils-mesboot)
+ ("libc" ,glibc-mesboot0)
+ ("gcc" ,gcc-mesboot1)
+ ("headers" ,mesboot-headers)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("make" ,make-mesboot)))
+
+ (arguments
+ (substitute-keyword-arguments (package-arguments glibc-mesboot0)
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out"))
+ (headers (assoc-ref %build-inputs "headers")))
+ (list
+ (string-append "--prefix=" out)
+ "--disable-obsolete-rpc"
+ "--host=i686-unknown-linux-gnu"
+ (string-append "--with-headers=" headers "/include")
+ "--enable-static-nss"
+ "--with-pthread"
+ "--without-cvs"
+ "--without-gd"
+ "--enable-add-ons=nptl")))
+ ((#:make-flags make-flags)
+ `(let ((bash (assoc-ref %build-inputs "bash")))
+ (list (string-append "SHELL=" bash "/bin/sh")
+ "install-bootstrap-headers=yes" "install-headers")))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (headers (assoc-ref %build-inputs "headers"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (coreutils (assoc-ref %build-inputs "coreutils"))
+ (libc (assoc-ref %build-inputs "libc"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (cppflags (string-append
+ " -I " (getcwd) "/nptl/sysdeps/pthread/bits"
+ " -D BOOTSTRAP_GLIBC=1"))
+ (cflags (string-append " -L " (getcwd)
+ " -L " libc "/lib")))
+ (setenv "libc_cv_friendly_stddef" "yes")
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "SHELL" (getenv "CONFIG_SHELL"))
+ (format (current-error-port) "CONFIG_SHELL=~s\n" (getenv "CONFIG_SHELL"))
+
+ (setenv "CPP" (string-append gcc "/bin/gcc -E " cppflags))
+ (setenv "CC" (string-append gcc "/bin/gcc " cppflags cflags))
+
+ ;; avoid -fstack-protector
+ (setenv "libc_cv_ssp" "false")
+ (substitute* "configure"
+ (("/bin/pwd") (string-append coreutils "/bin/pwd")))
+ (setenv "C_INCLUDE_PATH" (string-append libc "/include"
+ headers "/include"))
+ (setenv "LIBRARY_PATH" (string-append libc "/lib")))))
+ (replace 'install
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
+ (out (assoc-ref outputs "out")))
+ (and (apply invoke "make" make-flags)
+ (copy-recursively kernel-headers out)
+ #t))))
+ (replace 'configure
+ (lambda* (#:key configure-flags #:allow-other-keys)
+ (format (current-error-port) "running ../configure ~a\n" (string-join configure-flags))
+ (mkdir-p "build")
+ (chdir "build")
+ (apply invoke "../configure" configure-flags)))
+ (add-after 'configure 'remove-sunrpc
+ (lambda _
+ (invoke "make" (string-append (getcwd) "/sysd-sorted" )
+ (string-append "SHELL=" (getenv "CONFIG_SHELL")))
+ (substitute* "sysd-sorted"
+ ((" sunrpc") " ")
+ ((" nis") " "))
+ ;; 'rpcgen' needs native libc headers to be built.
+ (substitute* "../Makefile"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL"))))
+ (substitute* "../Makeconfig"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL"))))
+ (substitute* "../elf/Makefile"
+ (("^SHELL := /bin/sh") (string-append "SHELL := " (getenv "CONFIG_SHELL")))))))))))))
+
+(define glibc-mesboot
+ (package-with-bootstrap-guile
+ (package
+ (inherit glibc-headers-mesboot)
+ (name "glibc-mesboot")
+ (native-inputs `(("binutils" ,binutils-mesboot)
+ ("libc" ,glibc-mesboot0)
+ ("headers" ,glibc-headers-mesboot)
+ ("gcc" ,gcc-mesboot1)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("make" ,make-mesboot)))
+
+ (arguments
+ `(#:validate-runpath? #f ; fails when using --enable-shared
+ ,@(substitute-keyword-arguments (package-arguments glibc-headers-mesboot)
+ ((#:make-flags make-flags)
+ `(let ((bash (assoc-ref %build-inputs "bash")))
+ (list (string-append "SHELL=" bash "/bin/sh"))))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'install
+ (lambda* (#:key outputs make-flags #:allow-other-keys)
+ (let* ((kernel-headers (assoc-ref %build-inputs "kernel-headers"))
+ (out (assoc-ref outputs "out"))
+ (install-flags (cons "install" make-flags)))
+ (and (apply invoke "make" install-flags)
+ (copy-recursively kernel-headers out)
+ #t)))))))))
+ (native-search-paths ;; FIXME: move to glibc-mesboot0
+ ;; Use the language-specific variables rather than 'CPATH' because they
+ ;; are equivalent to '-isystem' whereas 'CPATH' is equivalent to '-I'.
+ ;; The intent is to allow headers that are in the search path to be
+ ;; treated as "system headers" (headers exempt from warnings) just like
+ ;; the typical /usr/include headers on an FHS system.
+ (list (search-path-specification
+ (variable "C_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "CPLUS_INCLUDE_PATH")
+ (files '("include")))
+ (search-path-specification
+ (variable "LIBRARY_PATH")
+ (files '("lib"))))))))
+
+(define gcc-mesboot
+ (package-with-bootstrap-guile
+ (package
+ (inherit gcc-mesboot1)
+ (name "gcc-mesboot")
+ (version "4.9.4")
+ (source (package-source gcc-4.9))
+ (native-inputs `(("binutils" ,binutils-mesboot)
+ ("gcc-wrapper" ,gcc-mesboot1-wrapper)
+ ("gcc" ,gcc-mesboot1)
+ ("libc" ,glibc-mesboot)
+
+ ("bash" ,%bootstrap-coreutils&co)
+ ("coreutils" ,%bootstrap-coreutils&co)
+ ("diffutils" ,diffutils-mesboot)
+ ("kernel-headers" ,%bootstrap-linux-libre-headers)
+ ("make" ,make-mesboot)))
+ (arguments
+ `(#:validate-runpath? #f
+ ,@(substitute-keyword-arguments (package-arguments gcc-mesboot1)
+ ((#:configure-flags configure-flags)
+ `(let ((out (assoc-ref %outputs "out"))
+ (glibc (assoc-ref %build-inputs "libc")))
+ (list (string-append "--prefix=" out)
+ "--build=i686-unknown-linux-gnu"
+ "--host=i686-unknown-linux-gnu"
+
+ "--with-host-libstdcxx=-lsupc++"
+
+ (string-append "--with-native-system-header-dir=" glibc "/include")
+ (string-append "--with-build-sysroot=" glibc "/include")
+
+ "--disable-bootstrap"
+ "--disable-decimal-float"
+ "--disable-libatomic"
+ "--disable-libcilkrts"
+ "--disable-libgomp"
+ "--disable-libitm"
+ "--disable-libmudflap"
+ "--disable-libquadmath"
+ "--disable-libsanitizer"
+ "--disable-libssp"
+ "--disable-libvtv"
+ "--disable-lto"
+ "--disable-lto-plugin"
+ "--disable-multilib"
+ "--disable-plugin"
+ "--disable-threads"
+ "--enable-languages=c,c++"
+
+ "--enable-static"
+ "--enable-shared"
+ "--enable-threads=single"
+
+ ;; No pre-compiled libstdc++ headers, to save space.
+ "--disable-libstdcxx-pch"
+
+ ;; for libcpp ...
+ "--disable-build-with-cxx")))
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (replace 'setenv
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (binutils (assoc-ref %build-inputs "binutils"))
+ (bash (assoc-ref %build-inputs "bash"))
+ (gcc (assoc-ref %build-inputs "gcc"))
+ (glibc (assoc-ref %build-inputs "libc"))
+ (kernel-headers (assoc-ref %build-inputs "kernel-headers")))
+ (setenv "CONFIG_SHELL" (string-append bash "/bin/sh"))
+ (setenv "C_INCLUDE_PATH" (string-append
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.7.4/include"
+ ":" kernel-headers "/include"
+ ":" glibc "/include"
+ ":" (getcwd) "/mpfr/src"))
+ (setenv "CPLUS_INCLUDE_PATH" (string-append
+ gcc "/lib/gcc-lib/i686-unknown-linux-gnu/4.7.4/include"
+ ":" kernel-headers "/include"
+ ":" glibc "/include"
+ ":" (getcwd) "/mpfr/src"))
+ (setenv "LIBRARY_PATH" (string-append glibc "/lib"
+ ":" gcc "/lib"))
+ (format (current-error-port) "C_INCLUDE_PATH=~a\n" (getenv "C_INCLUDE_PATH"))
+ (format (current-error-port) "CPLUS_INCLUDE_PATH=~a\n" (getenv "CPLUS_INCLUDE_PATH"))
+ (format (current-error-port) "LIBRARY_PATH=~a\n" (getenv "LIBRARY_PATH"))
+ #t)))))))))))
+
+(define gcc-mesboot-wrapper
+ ;; We need this so gcc-mesboot can be used to create shared binaries that
+ ;; have the correct interpreter and runpath to libc.
+ (package-with-bootstrap-guile
+ (package
+ (inherit gcc-mesboot1-wrapper)
+ (name "gcc-mesboot-wrapper")
+ (version (package-version gcc-mesboot))
+ (source #f)
+ (inputs '())
+ (native-inputs `(("bash" ,%bootstrap-coreutils&co)
+ ("libc" ,glibc-mesboot)
+ ("gcc" ,gcc-mesboot))))))
+
+(define m4-mesboot
+ (package-with-bootstrap-guile
+ (package
+ (inherit m4)
+ (name "m4-mesboot")
+ (version "1.4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/m4/m4-"
+ version ".tar.gz"))
+ (sha256
+ (base32
+ "1f9bxj176kf3pvs350w2dfs8jgwhminywri5pyn01b11yc4yhsjw"))))
+ (supported-systems '("i686-linux" "x86_64-linux"))
+ (native-inputs `(("mes" ,mes-boot)
+ ("tcc" ,tcc-boot)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out")))
+ (setenv "CONFIG_SHELL" (string-append
+ (assoc-ref %build-inputs "bash")
+ "/bin/sh"))
+ (setenv "CC" "tcc -static")
+ (setenv "CPP" "tcc -E")
+ (invoke "./configure" (string-append "--prefix=" out)))))))))))
+
+(define (%bootstrap-inputs+toolchain)
+ ;; The traditional bootstrap-inputs. For the i686-linux Reduced Binary Seed
+ ;; the actual reduced set with bootstrapped toolchain.
+ (match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ `(("libc" ,glibc-mesboot)
+ ("binutils" ,binutils-mesboot)
+ ("gcc-wrapper" ,gcc-mesboot-wrapper)
+ ("gcc" ,gcc-mesboot)
+ ,@(fold alist-delete (%bootstrap-inputs)
+ '("bootstrap-mescc-tools" "mes"))))
+ (_
+ (%bootstrap-inputs))))
+
(define gnu-make-boot0
(package-with-bootstrap-guile
(package (inherit gnu-make)
@@ -100,16 +1422,18 @@
(install-file "make" bin)
#t))))))))
(native-inputs '()) ; no need for 'pkg-config'
- (inputs %bootstrap-inputs))))
+ (inputs (%bootstrap-inputs+toolchain)))))
(define diffutils-boot0
(package-with-bootstrap-guile
(let ((p (package-with-explicit-inputs diffutils
- `(("make" ,gnu-make-boot0)
- ,@%bootstrap-inputs)
+ (lambda _
+ `(("make" ,gnu-make-boot0)
+ ,@(%bootstrap-inputs+toolchain)))
#:guile %bootstrap-guile)))
(package (inherit p)
(name "diffutils-boot0")
+ (native-inputs `())
(arguments `(#:tests? #f ; the test suite needs diffutils
,@(package-arguments p)))))))
@@ -118,9 +1442,10 @@
(package-with-explicit-inputs (package
(inherit findutils)
(name "findutils-boot0"))
- `(("make" ,gnu-make-boot0)
- ("diffutils" ,diffutils-boot0) ; for tests
- ,@%bootstrap-inputs)
+ (lambda _
+ `(("make" ,gnu-make-boot0)
+ ("diffutils" ,diffutils-boot0) ; for tests
+ ,@(%bootstrap-inputs+toolchain)))
(current-source-location)
#:guile %bootstrap-guile)))
@@ -128,19 +1453,22 @@
(package-with-bootstrap-guile
(package-with-explicit-inputs (package
(inherit file)
- (name "file-boot0"))
- `(("make" ,gnu-make-boot0)
- ,@%bootstrap-inputs)
+ (name "file-boot0")
+ (arguments
+ '(#:strip-binaries? #f
+ #:validate-runpath? #f)))
+ (lambda _
+ `(("make" ,gnu-make-boot0)
+ ,@(%bootstrap-inputs+toolchain)))
(current-source-location)
#:guile %bootstrap-guile)))
-
-(define %boot0-inputs
+(define (%boot0-inputs)
`(("make" ,gnu-make-boot0)
("diffutils" ,diffutils-boot0)
("findutils" ,findutils-boot0)
("file" ,file-boot0)
- ,@%bootstrap-inputs))
+ ,@(%bootstrap-inputs+toolchain)))
(define* (boot-triplet #:optional (system (%current-system)))
;; Return the triplet used to create the cross toolchain needed in the
@@ -149,8 +1477,9 @@
;; Following Linux From Scratch, build a cross-toolchain in stage 0. That
;; toolchain actually targets the same OS and arch, but it has the advantage
-;; of being independent of the libc and tools in %BOOTSTRAP-INPUTS, since
-;; GCC-BOOT0 (below) is built without any reference to the target libc.
+;; of being independent of the libc and tools in
+;; (%BOOTSTRAP-INPUTS+TOOLCHAIN), since GCC-BOOT0 (below) is built without any
+;; reference to the target libc.
(define binutils-boot0
(package-with-bootstrap-guile
@@ -184,27 +1513,14 @@
((#:configure-flags cf)
`(cons ,(string-append "--target=" (boot-triplet))
,cf)))))
- (inputs %boot0-inputs))))
-
-;; Use a "fixed" package source for this early libstdc++ variant so we can
-;; update GCC 4.9 without triggering a full rebuild.
-(define gcc-for-libstdc++
- (package
- (inherit gcc-4.9)
- (source (origin
- (inherit (package-source gcc-4.9))
- (patches (search-patches "gcc-4.9-libsanitizer-fix.patch"
- "gcc-arm-bug-71399.patch"
- "gcc-asan-missing-include.patch"
- "gcc-libvtv-runpath.patch"
- "gcc-fix-texi2pod.patch"))))))
+ (inputs (%boot0-inputs)))))
(define libstdc++-boot0
;; GCC's libcc1 is always built as a shared library (the top-level
;; 'Makefile.def' forcefully adds --enable-shared) and thus needs to refer
;; to libstdc++.so. We cannot build libstdc++-5.3 because it relies on
;; C++14 features missing in some of our bootstrap compilers.
- (let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc-for-libstdc++))))
+ (let ((lib (package-with-bootstrap-guile (make-libstdc++ gcc-4.9))))
(package
(inherit lib)
(name "libstdc++-boot0")
@@ -215,8 +1531,20 @@
;; XXX: libstdc++.so NEEDs ld.so for some reason.
#:validate-runpath? #f
- ,@(package-arguments lib)))
- (inputs %boot0-inputs)
+ ,@(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ (substitute-keyword-arguments (package-arguments lib)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-after 'unpack 'workaround-wrapper-bug
+ ;; XXX: The crude gcc-cross-wrapper causes "g++ -v" to
+ ;; fail, which in turn confuses the configure script.
+ (lambda _
+ (substitute* "libstdc++-v3/configure"
+ (("g\\+\\+ -v") "true"))
+ #t))))))
+ (_ (package-arguments lib)))))
+ (inputs (%boot0-inputs))
(native-inputs '()))))
(define gcc-boot0
@@ -253,6 +1581,7 @@
"--disable-libsanitizer"
"--disable-libitm"
"--disable-libgomp"
+ "--disable-libmpx"
"--disable-libcilkrts"
"--disable-libvtv"
"--disable-libssp"
@@ -261,6 +1590,17 @@
(remove (cut string-match
"--(with-system-zlib|enable-languages.*)" <>)
,flags)))
+ ((#:make-flags flags)
+ `(let* ((libc (assoc-ref %build-inputs "libc"))
+ (libc-native (or (assoc-ref %build-inputs "libc-native")
+ libc)))
+ `(,(string-append "LDFLAGS="
+ "-Wl,-rpath=" libc-native "/lib "
+ "-Wl,-dynamic-linker "
+ "-Wl," libc-native ,(glibc-dynamic-linker
+ (match (%current-system)
+ ("x86_64-linux" "i686-linux")
+ (_ (%current-system))))))))
((#:phases phases)
`(modify-phases ,phases
(add-after 'unpack 'unpack-gmp&co
@@ -285,6 +1625,22 @@
,(package-name lib)))
(list gmp-6.0 mpfr mpc))
#t)))
+ ,(match (%current-system)
+ ((or "i686-linux" "x86_64-linux")
+ '(add-before 'configure 'fix-libcc1
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; libcc1.so NEEDs libgcc_s.so, so provide one here
+ ;; to placate the 'validate-runpath' phase.
+ (substitute* "libcc1/Makefile.in"
+ (("la_LDFLAGS =")
+ (string-append "la_LDFLAGS = -Wl,-rpath="
+ (assoc-ref inputs "gcc") "/lib")))
+ ;; XXX: "g++ -v" is broken (see also libstdc++ above).
+ (substitute* "libcc1/configure"
+ (("g\\+\\+ -v") "true"))
+ #t)))
+ (_ '(add-before 'configure 'return-true
+ (lambda _ #t))))
(add-after 'install 'symlink-libgcc_eh
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "lib")))
@@ -307,8 +1663,8 @@
;; Call it differently so that the builder can check whether
;; the "libc" input is #f.
- ("libc-native" ,@(assoc-ref %boot0-inputs "libc"))
- ,@(alist-delete "libc" %boot0-inputs)))
+ ("libc-native" ,@(assoc-ref (%boot0-inputs) "libc"))
+ ,@(alist-delete "libc" (%boot0-inputs))))
;; No need for the native-inputs to build the documentation at this stage.
(native-inputs `()))))
@@ -319,47 +1675,62 @@
(name "perl-boot0")
(arguments
;; At the very least, this must not depend on GCC & co.
- (let ((args `(#:disallowed-references
+ (let ((args `(#:validate-runpath? #f
+ #:disallowed-references
,(list %bootstrap-binutils))))
- (substitute-keyword-arguments (package-arguments perl)
- ((#:phases phases)
- `(modify-phases ,phases
- ;; Pthread support is missing in the bootstrap compiler
- ;; (broken spec file), so disable it.
- (add-before 'configure 'disable-pthreads
- (lambda _
- (substitute* "Configure"
- (("^libswanted=(.*)pthread" _ before)
- (string-append "libswanted=" before)))
- #t))))
- ;; Do not configure with '-Dusethreads' since pthread
- ;; support is missing.
- ((#:configure-flags configure-flags)
- `(delete "-Dusethreads" ,configure-flags))))))))
+ `(,@args
+ ,@(substitute-keyword-arguments (package-arguments perl)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ ;; Pthread support is missing in the bootstrap compiler
+ ;; (broken spec file), so disable it.
+ (add-before 'configure 'disable-pthreads
+ (lambda _
+ (substitute* "Configure"
+ (("^libswanted=(.*)pthread" _ before)
+ (string-append "libswanted=" before)))
+ #t))))
+ ;; Do not configure with '-Dusethreads' since pthread
+ ;; support is missing.
+ ((#:configure-flags configure-flags)
+ `(delete "-Dusethreads" ,configure-flags)))))))))
(package-with-bootstrap-guile
(package-with-explicit-inputs perl
%boot0-inputs
(current-source-location)
#:guile %bootstrap-guile))))
+(define m4-boot0
+ (package-with-bootstrap-guile
+ (package
+ (inherit m4)
+ (name "m4-boot0")
+ (inputs (%boot0-inputs))
+ (arguments
+ `(#:guile ,%bootstrap-guile
+ #:implicit-inputs? #f
+ ,@(package-arguments m4))))))
+
(define bison-boot0
;; This Bison is needed to build MiG so we need it early in the process.
;; It is also needed to rebuild Bash's parser, which is modified by
;; its CVE patches. Remove it when it's no longer needed.
- (let* ((m4 (package-with-bootstrap-guile
- (package-with-explicit-inputs m4 %boot0-inputs
- (current-source-location)
- #:guile %bootstrap-guile)))
- (bison (package (inherit bison)
+ (let* ((bison (package (inherit bison)
(propagated-inputs `(("m4" ,m4)))
(inputs '()) ;remove Flex...
(arguments
- '(#:tests? #f ;... and thus disable tests
+ `(#:tests? #f ;... and thus disable tests
;; Zero timestamps in liby.a; this must be done
;; explicitly here because the bootstrap Binutils don't
;; do that (default is "cru".)
- #:make-flags '("ARFLAGS=crD" "RANLIB=ranlib -D"
+ #:make-flags `("ARFLAGS=crD"
+ ,,(match (%current-system)
+ ;; ranlib: '-D': No such file
+ ((or "i686-linux" "x86_64-linux")
+ "RANLIB=ranlib")
+ (_
+ "RANLIB=ranlib -D"))
"V=1"))))))
(package
(inherit (package-with-bootstrap-guile
@@ -394,12 +1765,12 @@
,@(package-arguments linux-libre-headers)))
(native-inputs
`(("perl" ,perl-boot0)
- ,@%boot0-inputs))))))
+ ,@(%boot0-inputs)))))))
(define gnumach-headers-boot0
(package-with-bootstrap-guile
(package-with-explicit-inputs gnumach-headers
- %boot0-inputs
+ (%boot0-inputs)
(current-source-location)
#:guile %bootstrap-guile)))
@@ -413,7 +1784,7 @@
`(,(string-append "LDFLAGS=-Wl,-rpath="
(assoc-ref %build-inputs "flex") "/lib/")))))))
(package-with-bootstrap-guile
- (package-with-explicit-inputs mig %boot0-inputs
+ (package-with-explicit-inputs mig (%boot0-inputs)
(current-source-location)
#:guile %bootstrap-guile))))
@@ -422,7 +1793,7 @@
(native-inputs `(("mig" ,mig-boot0)))
(inputs '()))))
(package-with-bootstrap-guile
- (package-with-explicit-inputs hurd-headers %boot0-inputs
+ (package-with-explicit-inputs hurd-headers (%boot0-inputs)
(current-source-location)
#:guile %bootstrap-guile))))
@@ -431,7 +1802,7 @@
(native-inputs `(("mig" ,mig-boot0)))
(inputs '()))))
(package-with-bootstrap-guile
- (package-with-explicit-inputs hurd-minimal %boot0-inputs
+ (package-with-explicit-inputs hurd-minimal (%boot0-inputs)
(current-source-location)
#:guile %bootstrap-guile))))
@@ -447,7 +1818,7 @@ the bootstrap environment."
`(("gnumach-headers" ,gnumach-headers-boot0)
("hurd-headers" ,hurd-headers-boot0)
("hurd-minimal" ,hurd-minimal-boot0)
- ,@%boot0-inputs))))))
+ ,@(%boot0-inputs)))))))
(define* (kernel-headers-boot0 #:optional (system (%current-system)))
(match system
@@ -458,7 +1829,7 @@ the bootstrap environment."
;; Texinfo used to build libc's manual.
;; We build without ncurses because it fails to build at this stage, and
;; because we don't need the stand-alone Info reader.
- ;; Also, use %BOOT0-INPUTS to avoid building Perl once more.
+ ;; Also, use (%BOOT0-INPUTS) to avoid building Perl once more.
(let ((texinfo (package (inherit texinfo)
(native-inputs '())
(inputs `(("perl" ,perl-boot0)))
@@ -472,21 +1843,22 @@ the bootstrap environment."
(current-source-location)
#:guile %bootstrap-guile))))
-(define ld-wrapper-boot0
+(define (ld-wrapper-boot0)
;; We need this so binaries on Hurd will have libmachuser and libhurduser
;; in their RUNPATH, otherwise validate-runpath will fail.
(make-ld-wrapper "ld-wrapper-boot0"
#:target boot-triplet
#:binutils binutils-boot0
#:guile %bootstrap-guile
- #:bash (car (assoc-ref %boot0-inputs "bash"))))
+ #:bash (car (assoc-ref (%boot0-inputs) "bash"))
+ #:guile-for-build %bootstrap-guile))
-(define %boot1-inputs
+(define (%boot1-inputs)
;; 2nd stage inputs.
`(("gcc" ,gcc-boot0)
- ("ld-wrapper-cross" ,ld-wrapper-boot0)
+ ("ld-wrapper-cross" ,(ld-wrapper-boot0))
("binutils-cross" ,binutils-boot0)
- ,@(alist-delete "binutils" %boot0-inputs)))
+ ,@(alist-delete "binutils" (%boot0-inputs))))
(define glibc-final-with-bootstrap-bash
;; The final libc, "cross-built". If everything went well, the resulting
@@ -504,11 +1876,7 @@ the bootstrap environment."
((#:configure-flags flags)
`(append (list ,(string-append "--host=" (boot-triplet))
,(string-append "--build="
- (nix-system->gnu-triplet))
-
- ;; Build Sun/ONC RPC support. In particular,
- ;; install rpc/*.h.
- "--enable-obsolete-rpc")
+ (nix-system->gnu-triplet)))
,flags))
((#:phases phases)
`(modify-phases ,phases
@@ -542,7 +1910,7 @@ the bootstrap environment."
(inputs
`(;; The boot inputs. That includes the bootstrap libc. We don't want
;; it in $CPATH, hence the 'pre-configure' phase above.
- ,@%boot1-inputs
+ ,@(%boot1-inputs)
;; A native MiG is needed to build Glibc on Hurd.
,@(if (hurd-triplet? (%current-system))
@@ -550,11 +1918,11 @@ the bootstrap environment."
'())
;; A native GCC is needed to build `cross-rpcgen'.
- ("native-gcc" ,@(assoc-ref %boot0-inputs "gcc"))
+ ("native-gcc" ,@(assoc-ref (%boot0-inputs) "gcc"))
;; Here, we use the bootstrap Bash, which is not satisfactory
;; because we don't want to depend on bootstrap tools.
- ("static-bash" ,@(assoc-ref %boot0-inputs "bash")))))))
+ ("static-bash" ,@(assoc-ref (%boot0-inputs) "bash")))))))
(define (cross-gcc-wrapper gcc binutils glibc bash)
"Return a wrapper for the pseudo-cross toolchain GCC/BINUTILS/GLIBC
@@ -609,35 +1977,41 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
("bash" ,bash)))
(inputs '())))
+(define (gcc-boot0-intermediate-wrapped)
+ ;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the
+ ;; non-cross names.
+ (cross-gcc-wrapper gcc-boot0 binutils-boot0
+ glibc-final-with-bootstrap-bash
+ (car (assoc-ref (%boot1-inputs) "bash"))))
+
(define static-bash-for-glibc
;; A statically-linked Bash to be used by GLIBC-FINAL in system(3) & co.
- (let* ((gcc (cross-gcc-wrapper gcc-boot0 binutils-boot0
- glibc-final-with-bootstrap-bash
- (car (assoc-ref %boot1-inputs "bash"))))
- (bash (package
- (inherit static-bash)
- (arguments
- (substitute-keyword-arguments
- (package-arguments static-bash)
- ((#:guile _ #f)
- '%bootstrap-guile)
- ((#:configure-flags flags '())
- ;; Add a '-L' flag so that the pseudo-cross-ld of
- ;; BINUTILS-BOOT0 can find libc.a.
- `(append ,flags
- (list (string-append "LDFLAGS=-static -L"
- (assoc-ref %build-inputs
- "libc:static")
- "/lib"))))))))
- (inputs `(("gcc" ,gcc)
- ("libc" ,glibc-final-with-bootstrap-bash)
- ("libc:static" ,glibc-final-with-bootstrap-bash "static")
- ,@(fold alist-delete %boot1-inputs
- '("gcc" "libc")))))
+ (let ((bash (package
+ (inherit static-bash)
+ (arguments
+ (substitute-keyword-arguments
+ (package-arguments static-bash)
+ ((#:guile _ #f)
+ '%bootstrap-guile)
+ ((#:configure-flags flags '())
+ ;; Add a '-L' flag so that the pseudo-cross-ld of
+ ;; BINUTILS-BOOT0 can find libc.a.
+ `(append ,flags
+ (list (string-append "LDFLAGS=-static -L"
+ (assoc-ref %build-inputs
+ "libc:static")
+ "/lib")))))))))
(package-with-bootstrap-guile
- (package-with-explicit-inputs bash inputs
- (current-source-location)
- #:guile %bootstrap-guile))))
+ (package-with-explicit-inputs
+ bash
+ (lambda _
+ `(("gcc" ,(gcc-boot0-intermediate-wrapped))
+ ("libc" ,glibc-final-with-bootstrap-bash)
+ ("libc:static" ,glibc-final-with-bootstrap-bash "static")
+ ,@(fold alist-delete (%boot1-inputs)
+ '("gcc" "libc"))))
+ (current-source-location)
+ #:guile %bootstrap-guile))))
(define gettext-boot0
;; A minimal gettext used during bootstrap.
@@ -703,18 +2077,18 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
,@(package-arguments glibc-final-with-bootstrap-bash))))))
-(define gcc-boot0-wrapped
+(define (gcc-boot0-wrapped)
;; Make the cross-tools GCC-BOOT0 and BINUTILS-BOOT0 available under the
;; non-cross names.
(cross-gcc-wrapper gcc-boot0 binutils-boot0 glibc-final
- (car (assoc-ref %boot1-inputs "bash"))))
+ (car (assoc-ref (%boot1-inputs) "bash"))))
-(define %boot2-inputs
+(define (%boot2-inputs)
;; 3rd stage inputs.
`(("libc" ,glibc-final)
("libc:static" ,glibc-final "static")
- ("gcc" ,gcc-boot0-wrapped)
- ,@(fold alist-delete %boot1-inputs '("libc" "gcc"))))
+ ("gcc" ,(gcc-boot0-wrapped))
+ ,@(fold alist-delete (%boot1-inputs) '("libc" "gcc" "linux-libre-headers"))))
(define binutils-final
(package-with-bootstrap-guile
@@ -724,7 +2098,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
#:implicit-inputs? #f
#:allowed-references ("out" ,glibc-final)
,@(package-arguments binutils)))
- (inputs %boot2-inputs))))
+ (inputs (%boot2-inputs)))))
(define libstdc++
;; Intermediate libstdc++ that will allow us to build the final GCC
@@ -744,13 +2118,14 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; except for the configure-flags.
,@(package-arguments lib)
#:configure-flags `("--disable-shared"
+ "--disable-libstdcxx-dual-abi"
"--disable-libstdcxx-threads"
"--disable-libstdcxx-pch"
,(string-append "--with-gxx-include-dir="
(assoc-ref %outputs "out")
"/include"))))
(outputs '("out"))
- (inputs %boot2-inputs)
+ (inputs (%boot2-inputs))
(synopsis "GNU C++ standard library (intermediate)"))))
(define zlib-final
@@ -763,14 +2138,15 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
#:implicit-inputs? #f
#:allowed-references ("out" ,glibc-final)
,@(package-arguments zlib)))
- (inputs %boot2-inputs))))
+ (inputs (%boot2-inputs)))))
-(define ld-wrapper-boot3
+(define (ld-wrapper-boot3)
;; A linker wrapper that uses the bootstrap Guile.
(make-ld-wrapper "ld-wrapper-boot3"
#:binutils binutils-final
#:guile %bootstrap-guile
- #:bash (car (assoc-ref %boot2-inputs "bash"))))
+ #:bash (car (assoc-ref (%boot2-inputs) "bash"))
+ #:guile-for-build %bootstrap-guile))
(define gcc-final
;; The final GCC.
@@ -794,17 +2170,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
;; positive, so turn it off.
#:validate-runpath? #f
- ;; Build again GMP & co. within GCC's build process, because it's hard
- ;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus
- ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.)
- ,@(substitute-keyword-arguments (package-arguments gcc-boot0)
- ((#:configure-flags boot-flags)
- (let loop ((args (package-arguments gcc)))
- (match args
- ((#:configure-flags normal-flags _ ...)
- normal-flags)
- ((_ rest ...)
- (loop rest)))))
+ ,@(substitute-keyword-arguments (package-arguments gcc)
((#:make-flags flags)
;; Since $LIBRARY_PATH is not honored, add the relevant flags.
`(let ((zlib (assoc-ref %build-inputs "zlib")))
@@ -816,8 +2182,42 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
zlib "/lib")
flag))
,flags)))
+ ;; Build again GMP & co. within GCC's build process, because it's hard
+ ;; to do outside (because GCC-BOOT0 is a cross-compiler, and thus
+ ;; doesn't honor $LIBRARY_PATH, which breaks `gnu-build-system'.)
((#:phases phases)
- `(alist-delete 'symlink-libgcc_eh ,phases)))))
+ `(modify-phases ,phases
+ (add-after 'unpack 'unpack-gmp&co
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((gmp (assoc-ref %build-inputs "gmp-source"))
+ (mpfr (assoc-ref %build-inputs "mpfr-source"))
+ (mpc (assoc-ref %build-inputs "mpc-source")))
+
+ ;; To reduce the set of pre-built bootstrap inputs, build
+ ;; GMP & co. from GCC.
+ (for-each (lambda (source)
+ (invoke "tar" "xvf" source))
+ (list gmp mpfr mpc))
+
+ ;; Create symlinks like `gmp' -> `gmp-x.y.z'.
+ ,@(map (lambda (lib)
+ ;; Drop trailing letters, as gmp-6.0.0a unpacks
+ ;; into gmp-6.0.0.
+ `(symlink ,(string-trim-right
+ (package-full-name lib "-")
+ char-set:letter)
+ ,(package-name lib)))
+ (list gmp-6.0 mpfr mpc))
+ #t)))
+ (add-before 'configure 'treat-glibc-as-system-header
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libc (assoc-ref inputs "libc")))
+ ;; Make sure Glibc is treated as a "system header" so
+ ;; #include_next does the right thing.
+ (for-each (lambda (var)
+ (setenv var (string-append libc "/include")))
+ '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH"))
+ #t))))))))
;; This time we want Texinfo, so we get the manual. Add
;; STATIC-BASH-FOR-GLIBC so that it's used in the final shebangs of
@@ -831,17 +2231,17 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp-6.0)))
("mpfr-source" ,(package-source mpfr))
("mpc-source" ,(package-source mpc))
- ("ld-wrapper" ,ld-wrapper-boot3)
+ ("ld-wrapper" ,(ld-wrapper-boot3))
("binutils" ,binutils-final)
("libstdc++" ,libstdc++)
("zlib" ,zlib-final)
- ,@%boot2-inputs))))
+ ,@(%boot2-inputs)))))
-(define %boot3-inputs
+(define (%boot3-inputs)
;; 4th stage inputs.
`(("gcc" ,gcc-final)
- ("ld-wrapper" ,ld-wrapper-boot3)
- ,@(alist-delete "gcc" %boot2-inputs)))
+ ("ld-wrapper" ,(ld-wrapper-boot3))
+ ,@(alist-delete "gcc" (%boot2-inputs))))
(define bash-final
;; Link with `-static-libgcc' to make sure we don't retain a reference
@@ -851,7 +2251,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(inherit bash-minimal)
(arguments
`(#:disallowed-references
- ,(assoc-ref %boot3-inputs "coreutils&co")
+ ,(assoc-ref (%boot3-inputs) "coreutils&co")
,@(package-arguments bash-minimal))))))
(package-with-bootstrap-guile
(package-with-explicit-inputs (static-libgcc-package bash)
@@ -859,10 +2259,10 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(current-source-location)
#:guile %bootstrap-guile))))
-(define %boot4-inputs
+(define (%boot4-inputs)
;; Now use the final Bash.
`(("bash" ,bash-final)
- ,@(alist-delete "bash" %boot3-inputs)))
+ ,@(alist-delete "bash" (%boot3-inputs))))
(define-public guile-final
;; This package must be public because other modules refer to it. However,
@@ -894,19 +2294,20 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
#:guile guile-final
#:bash bash-final))
-(define %boot5-inputs
+(define (%boot5-inputs)
;; Now with UTF-8 locales. Remember that the bootstrap binaries were built
;; with an older libc, which cannot load the new locale format. See
;; <https://lists.gnu.org/archive/html/guix-devel/2015-08/msg00737.html>.
`(("locales" ,glibc-utf8-locales-final)
- ,@%boot4-inputs))
+ ,@(%boot4-inputs)))
(define gnu-make-final
;; The final GNU Make, which uses the final Guile.
(package-with-bootstrap-guile
(package-with-explicit-inputs gnu-make
- `(("guile" ,guile-final)
- ,@%boot5-inputs)
+ (lambda _
+ `(("guile" ,guile-final)
+ ,@(%boot5-inputs)))
(current-source-location))))
(define coreutils-final
@@ -934,11 +2335,11 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(inputs (alist-delete "pcre" (package-inputs grep)))
(native-inputs `(("perl" ,perl-boot0))))))
-(define %boot6-inputs
+(define (%boot6-inputs)
;; Now use the final Coreutils.
`(("coreutils" ,coreutils-final)
("grep" ,grep-final)
- ,@%boot5-inputs))
+ ,@(%boot5-inputs)))
(define sed-final
;; The final sed.
@@ -1064,23 +2465,23 @@ and binaries, plus debugging symbols in the @code{debug} output), and Binutils."
("libc-debug" ,glibc-final "debug")
("libc-static" ,glibc-final "static")))))
+(define-public gcc-toolchain
+ (make-gcc-toolchain gcc-final))
+
(define-public gcc-toolchain-4.8
(make-gcc-toolchain gcc-4.8))
(define-public gcc-toolchain-4.9
(make-gcc-toolchain gcc-4.9))
-(define-public gcc-toolchain
- (make-gcc-toolchain gcc-final))
-
(define-public gcc-toolchain-5
- gcc-toolchain)
+ (make-gcc-toolchain gcc-5))
(define-public gcc-toolchain-6
(make-gcc-toolchain gcc-6))
(define-public gcc-toolchain-7
- (make-gcc-toolchain gcc-7))
+ gcc-toolchain)
(define-public gcc-toolchain-8
(make-gcc-toolchain gcc-8))
diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm
index 024025fe52..2b18629cca 100644
--- a/gnu/packages/compression.scm
+++ b/gnu/packages/compression.scm
@@ -206,14 +206,14 @@ adding and extracting files to/from a tar archive.")
(define-public gzip
(package
(name "gzip")
- (version "1.9")
+ (version "1.10")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gzip/gzip-"
version ".tar.xz"))
(sha256
(base32
- "16h8g4acy7fgfxcjacr3wijjsnixwsfd2jhz3zwdi2qrzi262l5f"))))
+ "1h6p374d3j8d4cdfydzls021xa2yby8myc0h8d6m8bc7k6ncq9c4"))))
(build-system gnu-build-system)
(synopsis "General file (de)compression (using lzw)")
(arguments
@@ -429,6 +429,23 @@ compressed with pbzip2 can be decompressed with bzip2).")
(base32
"0ibi2zsfaz6l756spjwc5rayf4ckgc9hwmy8qinppcyk4svz64mm"))))
(build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-after 'install 'move-static-lib
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((out (assoc-ref outputs "out"))
+ (static (assoc-ref outputs "static")))
+ (mkdir-p (string-append static "/lib"))
+ (rename-file (string-append out "/lib/liblzma.a")
+ (string-append static "/lib/liblzma.a"))
+ ;; Remove reference to the static library from the .la file
+ ;; so Libtool does the right thing when both the shared and
+ ;; static library is available.
+ (substitute* (string-append out "/lib/liblzma.la")
+ (("^old_library='liblzma.a'") "old_library=''"))
+ #t))))))
+ (outputs '("out" "static"))
(synopsis "General-purpose data compression")
(description
"XZ Utils is free general-purpose data compression software with high
@@ -528,14 +545,14 @@ some compression ratio).")
(define-public lzip
(package
(name "lzip")
- (version "1.20")
+ (version "1.21")
(source (origin
(method url-fetch)
(uri (string-append "mirror://savannah/lzip/lzip-"
version ".tar.gz"))
(sha256
(base32
- "0319q59kb8g324wnj7xzbr7vvlx5bcs13lr34j0zb3kqlyjq2fy9"))))
+ "12qdcw5k1cx77brv9yxi1h4dzwibhfmdpigrj43nfk8nscwm12z4"))))
(build-system gnu-build-system)
(home-page "https://www.nongnu.org/lzip/lzip.html")
(synopsis "Lossless data compressor based on the LZMA algorithm")
@@ -714,7 +731,7 @@ decompression of some loosely related file formats used by Microsoft.")
(define-public lz4
(package
(name "lz4")
- (version "1.8.1.2")
+ (version "1.9.1")
(source
(origin
(method git-fetch)
@@ -722,16 +739,23 @@ decompression of some loosely related file formats used by Microsoft.")
(commit (string-append "v" version))))
(sha256
(base32
- "1jggv4lvfav53advnj0pwqgxzn868lrj8dc9zp73iwvqlj82mhmx"))
+ "1l1caxrik1hqs40vj3bpv1pikw6b74cfazv5c0v6g48zpcbmshl0"))
(file-name (git-file-name name version))))
(build-system gnu-build-system)
- (native-inputs `(("valgrind" ,valgrind))) ; for tests
+ (native-inputs `(("valgrind" ,valgrind))) ;for tests
(arguments
`(#:test-target "test"
#:make-flags (list "CC=gcc"
(string-append "prefix=" (assoc-ref %outputs "out")))
#:phases (modify-phases %standard-phases
- (delete 'configure)))) ; no configure script
+ (delete 'configure) ;no configure script
+ (add-before 'check 'disable-broken-test
+ (lambda _
+ ;; XXX: test_install.sh fails when prefix is a subdirectory.
+ (substitute* "tests/Makefile"
+ (("^test: (.*) test-install" _ targets)
+ (string-append "test: " targets)))
+ #t)))))
(home-page "https://www.lz4.org")
(synopsis "Compression algorithm focused on speed")
(description "LZ4 is a lossless compression algorithm, providing
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index a0341ebc5d..3fc9ba6540 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2019 Marius Bakke <mbakke@fastmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -52,11 +53,8 @@
(define %gcc-include-paths
;; Environment variables for header search paths.
- ;; Note: See <http://bugs.gnu.org/22186> for why not 'CPATH'.
- '("C_INCLUDE_PATH"
- "CPLUS_INCLUDE_PATH"
- "OBJC_INCLUDE_PATH"
- "OBJCPLUS_INCLUDE_PATH"))
+ ;; Note: See <http://bugs.gnu.org/30756> for why not 'C_INCLUDE_PATH' & co.
+ '("CPATH"))
(define %gcc-cross-include-paths
;; Search path for target headers when cross-compiling.
@@ -123,7 +121,15 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
,@(if libc
`( ;; Disable libcilkrts because it is not
;; ported to GNU/Hurd.
- "--disable-libcilkrts")
+ "--disable-libcilkrts"
+ ;; When building a cross compiler, --with-sysroot is
+ ;; implicitly set to "$gcc_tooldir/sys-root". This does
+ ;; not work for us, because --with-native-system-header-dir
+ ;; is searched for relative to this location. Thus, we set
+ ;; it to "/" so GCC is able to find the target libc headers.
+ ;; This is safe because in practice GCC uses CROSS_CPATH
+ ;; & co to separate target and host libraries.
+ "--with-sysroot=/")
`( ;; Disable features not needed at this stage.
"--disable-shared" "--enable-static"
"--enable-languages=c,c++"
@@ -169,7 +175,19 @@ base compiler and using LIBC (which may be either a libc package or #f.)"
,flags))
flags))
((#:phases phases)
- `(cross-gcc-build-phases ,target ,phases))))))
+ `(cross-gcc-build-phases
+ ,target
+ (modify-phases ,phases
+ (add-before 'configure 'treat-glibc-as-system-header
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((libc (assoc-ref inputs "libc")))
+ (when libc
+ ;; For GCC6 and later, make sure Glibc is treated as a "system
+ ;; header" such that #include_next does the right thing.
+ (for-each (lambda (var)
+ (setenv var (string-append libc "/include")))
+ '("CROSS_C_INCLUDE_PATH" "CROSS_CPLUS_INCLUDE_PATH")))
+ #t))))))))))
(define (cross-gcc-patches target)
"Return GCC patches needed for TARGET."
@@ -458,23 +476,6 @@ and the cross tool chain."
flags)))
((#:phases phases)
`(modify-phases ,phases
- ;; XXX: The hack below allows us to make sure the
- ;; 'apply-hurd-patch' phase gets added in the first
- ;; cross-libc, but does *not* get added twice subsequently
- ;; when cross-building another libc.
- ,@(if (and (hurd-triplet? target)
- (not (hurd-target?)))
- `((add-after 'unpack 'apply-hurd-patch
- (lambda* (#:key inputs native-inputs
- #:allow-other-keys)
- ;; TODO: Move this to 'patches' field.
- (let ((patch (or (assoc-ref native-inputs
- "hurd-magic-pid-patch")
- (assoc-ref inputs
- "hurd-magic-pid-patch"))))
- (invoke "patch" "-p1" "--force" "--input"
- patch)))))
- '())
(add-before 'configure 'set-cross-kernel-headers-path
(lambda* (#:key inputs #:allow-other-keys)
(let* ((kernel (assoc-ref inputs "kernel-headers"))
@@ -498,9 +499,7 @@ and the cross tool chain."
,@(if (hurd-triplet? target)
`(("cross-mig"
,@(assoc-ref (package-native-inputs xheaders)
- "cross-mig"))
- ("hurd-magic-pid-patch"
- ,(search-patch "glibc-hurd-magic-pid.patch")))
+ "cross-mig")))
'())
,@(package-inputs libc) ;FIXME: static-bash
,@(package-native-inputs libc)))))))
diff --git a/gnu/packages/crypto.scm b/gnu/packages/crypto.scm
index 53137e90e9..6bee8cb31a 100644
--- a/gnu/packages/crypto.scm
+++ b/gnu/packages/crypto.scm
@@ -684,7 +684,7 @@ BLAKE.")
(define-public rhash
(package
(name "rhash")
- (version "1.3.6")
+ (version "1.3.8")
(source
(origin
(method url-fetch)
@@ -693,7 +693,7 @@ BLAKE.")
(file-name (string-append name "-" version ".tar.gz"))
(sha256
(base32
- "14ngzfgmd1lfp7m78sn49x8ymf2s37nrr67c6p5vas85nrrgjkcn"))))
+ "0k60ywyhwqwqxa2q2l85vwgf884hcgy31nxir3dqgz7ymib6llxy"))))
(build-system gnu-build-system)
(arguments
`(#:make-flags
@@ -712,7 +712,7 @@ BLAKE.")
(lambda* (#:key make-flags #:allow-other-keys)
(apply invoke
"make" "-C" "librhash"
- "install-headers" "install-so-link"
+ "install-lib-headers" "install-so-link"
make-flags))))))
(home-page "https://sourceforge.net/projects/rhash/")
(synopsis "Utility for computing hash sums")
@@ -817,7 +817,7 @@ security.")
("automake" ,automake)
("libtool" ,libtool)))
(inputs
- `(("openssl" ,openssl-next)))
+ `(("openssl" ,openssl)))
(home-page "https://github.com/vstakhov/asignify")
(synopsis "Cryptographic authentication and encryption tool and library")
(description "Asignify offers public cryptographic signatures and
diff --git a/gnu/packages/curl.scm b/gnu/packages/curl.scm
index 5682a4a107..8605c12124 100644
--- a/gnu/packages/curl.scm
+++ b/gnu/packages/curl.scm
@@ -37,41 +37,34 @@
#:use-module (gnu packages compression)
#:use-module (gnu packages golang)
#:use-module (gnu packages groff)
- #:use-module (gnu packages gsasl)
#:use-module (gnu packages guile)
+ #:use-module (gnu packages kerberos)
#:use-module (gnu packages libidn)
#:use-module (gnu packages openldap)
#:use-module (gnu packages perl)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
- #:use-module (gnu packages ssh)
#:use-module (gnu packages tls)
#:use-module (gnu packages web))
(define-public curl
(package
(name "curl")
- (replacement curl-7.65.0)
- (version "7.63.0")
+ (version "7.65.1")
(source (origin
(method url-fetch)
(uri (string-append "https://curl.haxx.se/download/curl-"
version ".tar.xz"))
(sha256
(base32
- "1i38v49233jirzlfqd8fy6jyf80assa953hk7w6qmysbg562604n"))))
+ "0ym7b741hp4mgrvgp2z5ia7kb0pfqzdmfc65qzmml8vzhxs21hpn"))))
(build-system gnu-build-system)
(outputs '("out"
"doc")) ;1.2 MiB of man3 pages
(inputs `(("gnutls" ,gnutls)
- ("gss" ,gss)
("libidn" ,libidn)
- ;; TODO XXX <https://bugs.gnu.org/34927>
- ;; Curl doesn't actually use or refer to libssh2 because the build
- ;; is not configured with '--with-libssh2'. Remove this input when
- ;; a mass rebuild is appropriate (e.g. core-updates).
- ("libssh2" ,libssh2-1.8.0)
("openldap" ,openldap)
+ ("mit-krb5" ,mit-krb5)
("nghttp2" ,nghttp2 "lib")
("zlib" ,zlib)))
(native-inputs
@@ -90,8 +83,10 @@
(separator #f) ;single entry
(files '("etc/ssl/certs/ca-certificates.crt")))))
(arguments
- `(#:configure-flags '("--with-gnutls" "--with-gssapi"
- "--disable-static")
+ `(#:configure-flags (list "--with-gnutls"
+ (string-append "--with-gssapi="
+ (assoc-ref %build-inputs "mit-krb5"))
+ "--disable-static")
;; Add a phase to patch '/bin/sh' occurances in tests/runtests.pl
#:phases
(modify-phases %standard-phases
@@ -147,19 +142,6 @@ tunneling, and so on.")
"See COPYING in the distribution."))
(home-page "https://curl.haxx.se/")))
-(define-public curl-7.65.0
- (package
- (inherit curl)
- (version "7.65.0")
- (source
- (origin
- (method url-fetch)
- (uri (string-append "https://curl.haxx.se/download/curl-"
- version ".tar.xz"))
- (sha256
- (base32
- "1kb6p510m0n0y1c8fjxbcs6dyaqgm8i54pjvj29zc14lj9ix4rkp"))))))
-
(define-public kurly
(package
(name "kurly")
diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm
index acffc56a27..c38f6d2db7 100644
--- a/gnu/packages/databases.scm
+++ b/gnu/packages/databases.scm
@@ -788,7 +788,7 @@ Language.")
("zlib" ,zlib)))
(propagated-inputs
;; mariadb.pc says -lssl -lcrypto, so propagate it.
- `(("openssl" ,openssl)))
+ `(("openssl" ,openssl-1.0)))
;; The test suite is very resource intensive and can take more than three
;; hours on a x86_64 system. Give slow and busy machines some leeway.
(properties '((timeout . 64800))) ;18 hours
diff --git a/gnu/packages/dbm.scm b/gnu/packages/dbm.scm
index bf548a25f3..2f1c88f112 100644
--- a/gnu/packages/dbm.scm
+++ b/gnu/packages/dbm.scm
@@ -139,14 +139,14 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.")
(define-public gdbm
(package
(name "gdbm")
- (version "1.18")
+ (version "1.18.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/gdbm/gdbm-"
version ".tar.gz"))
(sha256
(base32
- "1kimnv12bzjjhaqk4c8w2j6chdj9c6bg21lchaf7abcyfss2r0mq"))))
+ "1p4ibds6z3ccy65lkmd6lm7js0kwifvl53r0fd759fjxgr917rl6"))))
(arguments `(#:configure-flags '("--enable-libgdbm-compat")))
(build-system gnu-build-system)
(home-page "http://www.gnu.org.ua/software/gdbm")
diff --git a/gnu/packages/ed.scm b/gnu/packages/ed.scm
index d30d7bcfa8..c2198763ef 100644
--- a/gnu/packages/ed.scm
+++ b/gnu/packages/ed.scm