diff options
Diffstat (limited to 'gnu/packages')
63 files changed, 3515 insertions, 1130 deletions
diff --git a/gnu/packages/aspell.scm b/gnu/packages/aspell.scm index ca9fc8eda5..01133155e1 100644 --- a/gnu/packages/aspell.scm +++ b/gnu/packages/aspell.scm @@ -45,7 +45,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/backup.scm b/gnu/packages/backup.scm index c312f23c1a..45b1be2413 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.3.3") (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")) + (patches (search-patches "libarchive-CVE-2018-1000877.patch" + "libarchive-CVE-2018-1000878.patch" + "libarchive-CVE-2018-1000880.patch")) (sha256 (base32 - "1km0mzfl6in7l5vz9kl09a88ajx562rw93ng9h2jqavrailvsbgd")))) + "0bhfncid058p7n1n8v29l6wxm3mhdqfassscihbsxfwz3iwb2zms")))) (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 67fab7c114..c3db665e98 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.31") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/tar/tar-" version ".tar.xz")) (sha256 (base32 - "1lyjyk8z8hdddsxw0ikchrsfg3i0x3fsh7l63a8jgaz1n7dr5gzi")) + "1h9dxhjhz1jnyhmh6jfhqw1g1sxqbg3cd32vpwg7x2xxxqffzwrp")) (patches (search-patches "tar-skip-unreliable-tests.patch" "tar-remove-wholesparse-check.patch")))) (build-system gnu-build-system) @@ -270,16 +249,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 @@ -460,14 +439,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 +616,9 @@ 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 +693,6 @@ 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 +818,7 @@ store.") ,@(if (hurd-target?) `(("mig" ,mig) - ("perl" ,perl) - ("hurd-magic-pid-patch" - ,(search-patch "glibc-hurd-magic-pid.patch"))) + ("perl" ,perl)) '()))) (native-search-paths @@ -892,7 +859,8 @@ with the Linux kernel.") "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-supported-locales.patch")))))) (define-public glibc-2.26 (package diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index fb4e3f4be3..9fd4b30e62 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,11 @@ (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"))) + )) (define (download-patches store count) "Download COUNT Bash patches into store. Return a list of @@ -119,7 +97,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 +106,8 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." "mirror://gnu/bash/bash-" version ".tar.gz")) (sha256 (base32 - "1jyz6snd63xjn6skk7za6psgidsd53k05cr3lksqybi0q6936syq")) - (patch-flags '("-p0")) - (patches %patch-series-4.4))) - (version (string-append version "." - (number->string (length %patch-series-4.4)))) + "0kgvfwqdcd90waczf4gx39xnrxzijhjrzyzv7s8v4w31qqm0za5l")))) + (version version) (build-system gnu-build-system) (outputs '("out" diff --git a/gnu/packages/bdw-gc.scm b/gnu/packages/bdw-gc.scm index c7491f845f..d816b66615 100644 --- a/gnu/packages/bdw-gc.scm +++ b/gnu/packages/bdw-gc.scm @@ -30,14 +30,14 @@ (define-public libgc (package (name "libgc") - (version "7.6.6") + (version "7.6.8") (source (origin (method url-fetch) (uri (string-append "https://github.com/ivmai/bdwgc/releases" "/download/v" version "/gc-" version ".tar.gz")) (sha256 (base32 - "1p1r015a7jbpvkkbgzv1y8nxrbbp6dg0mq3ksi6ji0qdz3wfss79")))) + "0n720a0i584ghcwmdsjiq6bl9ig0p9mrja29rp4cgsqvpz6wa2h4")))) (build-system gnu-build-system) (arguments `(#:configure-flags @@ -91,7 +91,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.8") (source (origin (method url-fetch) (uri (string-append @@ -99,7 +99,7 @@ C or C++ programs, though that is not its primary goal.") version "/libatomic_ops-" version ".tar.gz")) (sha256 (base32 - "0x7071z707msvyrv9dmgahd1sghbkw8fpbagvcag6xs8yp2spzlr")))) + "0rgni7056gnbn105lln629gwd6s51779yb5ds9s7wxl1vyg2fshx")))) (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..ae37a8f80c 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.3.2") (source (origin (method url-fetch) @@ -38,7 +39,7 @@ version ".tar.xz")) (sha256 (base32 - "0f7kjygrckkx8vas2nm673592jif0a9mw5g8207f6hj6h4pfyp07")))) + "016qp59wxakz3ckxwyrmzxk406q0h286ydz8ww1m0pnrc5dy97h3")))) (build-system gnu-build-system) (native-inputs `(("perl" ,perl) ;; m4 is not present in PATH when cross-building. diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm index a3ecbeb076..16ed15c237 100644 --- a/gnu/packages/bootstrap.scm +++ b/gnu/packages/bootstrap.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018 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. ;;; @@ -43,10 +44,13 @@ %bootstrap-guile %bootstrap-coreutils&co + %bootstrap-linux-libre-headers %bootstrap-binutils %bootstrap-gcc %bootstrap-glibc - %bootstrap-inputs)) + %bootstrap-inputs + %bootstrap-mescc-tools + %bootstrap-mes)) ;;; Commentary: ;;; @@ -97,10 +101,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,22 +113,25 @@ 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))) @@ -392,6 +399,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) @@ -437,28 +460,30 @@ $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))) @@ -508,39 +533,41 @@ $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))) @@ -548,33 +575,33 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \ ("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") @@ -587,12 +614,116 @@ 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" ,(search-bootstrap-binary "tar" (%current-system))) + ("xz" ,(search-bootstrap-binary "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" ,(search-bootstrap-binary "tar" (%current-system))) + ("xz" ,(search-bootstrap-binary "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. - `(("libc" ,%bootstrap-glibc) - ("gcc" ,%bootstrap-gcc) - ("binutils" ,%bootstrap-binutils) + `(,@(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. diff --git a/gnu/packages/bootstrap/x86_64-linux/bash b/gnu/packages/bootstrap/x86_64-linux/bash Binary files differdeleted file mode 100755 index b9c410b7cf..0000000000 --- a/gnu/packages/bootstrap/x86_64-linux/bash +++ /dev/null diff --git a/gnu/packages/bootstrap/x86_64-linux/mkdir b/gnu/packages/bootstrap/x86_64-linux/mkdir Binary files differdeleted file mode 100755 index f8250ae693..0000000000 --- a/gnu/packages/bootstrap/x86_64-linux/mkdir +++ /dev/null diff --git a/gnu/packages/bootstrap/x86_64-linux/tar b/gnu/packages/bootstrap/x86_64-linux/tar Binary files differdeleted file mode 100755 index 90e492f89d..0000000000 --- a/gnu/packages/bootstrap/x86_64-linux/tar +++ /dev/null diff --git a/gnu/packages/bootstrap/x86_64-linux/xz b/gnu/packages/bootstrap/x86_64-linux/xz Binary files differdeleted file mode 100755 index 6bfe3c6d96..0000000000 --- a/gnu/packages/bootstrap/x86_64-linux/xz +++ /dev/null diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm index 7550586c1f..2e9103ab90 100644 --- a/gnu/packages/check.scm +++ b/gnu/packages/check.scm @@ -132,14 +132,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 @@ -154,23 +154,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 @@ -1177,14 +1160,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.2") (source (origin (method url-fetch) (uri (pypi-uri "coverage" version)) (sha256 (base32 - "097l4s3ssxm1vncsn0nw3a1pbzah28773q36c1ab9wz01r04973s")))) + "1d5zlyl3h39d3xlvkpsn4g5gpvdci9arplil2cnz2cs8wsgms8xb")))) (build-system python-build-system) (arguments ;; FIXME: 95 tests failed, 539 passed, 6 skipped, 2 errors. @@ -1447,17 +1430,16 @@ instantly.") (define-public python-hypothesis (package (name "python-hypothesis") - (version "3.70.3") + (version "4.5.3") (source (origin (method url-fetch) (uri (pypi-uri "hypothesis" version)) (sha256 (base32 - "1rshs1japfmwgar98yrkq4hg4z2q76hlnq7w2n3lfbjnscn1jd9b")))) + "0fvq4mfybm129l978war86mcshkn28dkrxw7lr8549zr9ywvik1c")))) (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) @@ -1975,14 +1957,14 @@ create data based on random numbers and yet remain repeatable.") (define-public python-freezegun (package (name "python-freezegun") - (version "0.3.10") + (version "0.3.11") (source (origin (method url-fetch) (uri (pypi-uri "freezegun" version)) (sha256 (base32 - "08m6b42yxb9hk5lv747v9n2qsxyadmkb0k6yg0gxdanwap0slg3h")))) + "1nh0fzqjwg88n57k3qa8mxnmiwrr7lqyd5xvc96qn5g8zcxv8fg8")))) (build-system python-build-system) (native-inputs `(("python-mock" ,python-mock) diff --git a/gnu/packages/cmake.scm b/gnu/packages/cmake.scm index 7186cf98df..5bd91b7bf5 100644 --- a/gnu/packages/cmake.scm +++ b/gnu/packages/cmake.scm @@ -116,7 +116,8 @@ ;; 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))) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 0aa65fe638..a76867f426 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -3,8 +3,10 @@ ;;; 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,1322 @@ ;;; ;;; 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)) + + ("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)) + + ("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") + (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. + (append (match (%current-system) + ((or "i686-linux" "x86_64-linux") + `(("libc" ,glibc-mesboot) + ("binutils" ,binutils-mesboot) + ("gcc-wrapper" ,gcc-mesboot-wrapper) + ("gcc" ,gcc-mesboot))) + (_ + '())) + (%bootstrap-inputs))) + (define gnu-make-boot0 (package-with-bootstrap-guile (package (inherit gnu-make) @@ -100,16 +1420,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 +1440,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 +1451,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 +1475,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 +1511,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 +1529,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 +1579,7 @@ "--disable-libsanitizer" "--disable-libitm" "--disable-libgomp" + "--disable-libmpx" "--disable-libcilkrts" "--disable-libvtv" "--disable-libssp" @@ -261,6 +1588,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 +1623,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 +1661,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 +1673,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 +1763,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 +1782,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 +1791,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 +1800,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 +1816,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 +1827,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 +1841,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 +1874,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 +1908,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 +1916,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 +1975,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 +2075,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 +2096,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 +2116,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 +2136,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 +2168,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 +2180,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 +2229,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 +2249,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 +2257,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 +2292,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 +2333,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 +2463,23 @@ and binaries, plus debugging symbols in the '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 b6f07dfa9a..6314546667 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -197,14 +197,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 @@ -420,6 +420,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 diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index bb3d6d916a..8fe9d5b6d6 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -51,11 +51,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. @@ -454,23 +451,6 @@ XBINUTILS 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")) @@ -494,9 +474,7 @@ XBINUTILS 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/ed.scm b/gnu/packages/ed.scm index d30d7bcfa8..c2198763ef 100644 --- a/gnu/packages/ed.scm +++ b/gnu/packages/ed.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; ;;; This file is part of GNU Guix. ;;; @@ -28,14 +28,14 @@ (define-public ed (package (name "ed") - (version "1.14.2") + (version "1.15") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/ed/ed-" version ".tar.lz")) (sha256 (base32 - "1nqhk3n1s1p77g2bjnj55acicsrlyb2yasqxqwpx0w0djfx64ygm")))) + "0x6ivy5k0d7dy5z9g8q8nipr89m4qbk2ink2898qq43smp08ji5d")))) (build-system gnu-build-system) (native-inputs `(("lzip" ,lzip))) (arguments diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm index 4518c8d3dc..24ed37a9d2 100644 --- a/gnu/packages/file.scm +++ b/gnu/packages/file.scm @@ -31,11 +31,11 @@ (package (name "file") (version "5.33") - (replacement file/fixed) (source (origin (method url-fetch) (uri (string-append "ftp://ftp.astron.com/pub/file/file-" version ".tar.gz")) + (patches (search-patches "file-CVE-2018-10360.patch")) (sha256 (base32 "1iipnwjkag7q04zjkaqic41r9nlw0ml6mhqian6qkkbisb1whlhw")))) @@ -53,10 +53,3 @@ extensions to tell you the type of a file, but looks at the actual contents of the file. This package provides the libmagic library.") (license bsd-2) (home-page "https://www.darwinsys.com/file/"))) - -(define file/fixed - (package - (inherit file) - (source - (origin (inherit (package-source file)) - (patches (search-patches "file-CVE-2018-10360.patch")))))) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 5d7c89a880..f46da6cff4 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -3635,7 +3635,8 @@ throwing people around in pseudo-randomly generated buildings.") (add-after 'set-paths 'set-sdl-paths (lambda* (#:key inputs #:allow-other-keys) (setenv "CPATH" - (string-append (assoc-ref inputs "sdl-union") + (string-append (getenv "CPATH") ":" + (assoc-ref inputs "sdl-union") "/include/SDL")))) (replace 'configure (lambda* (#:key inputs outputs #:allow-other-keys) diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 1f1e80dde8..3b6c540221 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -522,7 +522,7 @@ It also includes runtime support libraries for these languages."))) ;; Note: When changing the default gcc version, update ;; the gcc-toolchain-* definitions and the gfortran definition ;; accordingly. -(define-public gcc gcc-5) +(define-public gcc gcc-7) (define-public (make-libstdc++ gcc) "Return a libstdc++ package based on GCC. The primary use case is when @@ -660,7 +660,7 @@ as the 'native-search-paths' field." ;; (custom-gcc gcc "fortran" …) because that would lead to a package object ;; that is not 'eq?' with GFORTRAN-5, and thus 'fold-packages' would ;; report two gfortran@5 that are in fact identical. - gfortran-5) + gfortran-7) (define-public gccgo-4.9 (custom-gcc gcc-4.9 "gccgo" '("go") @@ -724,7 +724,7 @@ as the 'native-search-paths' field." (variable "LIBRARY_PATH") (files '("lib" "lib64")))))) -(define-public gcc-objc gcc-objc-5) +(define-public gcc-objc gcc-objc-7) (define-public gcc-objc++-4.8 (custom-gcc gcc-4.8 "gcc-objc++" '("obj-c++") @@ -780,7 +780,7 @@ as the 'native-search-paths' field." (variable "LIBRARY_PATH") (files '("lib" "lib64")))))) -(define-public gcc-objc++ gcc-objc++-5) +(define-public gcc-objc++ gcc-objc++-7) (define (make-libstdc++-doc gcc) "Return a package with the libstdc++ documentation for GCC." diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 5148a6aec3..5d2df5442f 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -9,6 +9,7 @@ ;;; Copyright © 2017 Petter <petter@mykolab.ch> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Alex Vong <alexvong1995@gmail.com> +;;; Copyright © 2019 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,8 @@ #:use-module (gnu packages bison) #:use-module (gnu packages check) #:use-module (gnu packages compression) + #:use-module (gnu packages docbook) + #:use-module (gnu packages documentation) #:use-module (gnu packages enlightenment) #:use-module (gnu packages file) #:use-module (gnu packages flex) @@ -118,14 +121,21 @@ "sysconfdir=/tmp/dummy" "install")))))) (native-inputs - `(("pkg-config" ,pkg-config))) + `(("pkg-config" ,pkg-config) + ;; Dependencies to generate the doc. + ("docbook-xml" ,docbook-xml-4.4) + ("docbook-xsl" ,docbook-xsl) + ("doxygen" ,doxygen) + ("xmlto" ,xmlto) + ("libxml2" ,libxml2) ;for XML_CATALOG_FILES + ("libxslt" ,libxslt) + ("yelp-tools" ,yelp-tools))) (inputs `(("expat" ,expat) - ;; Add a dependency on libx11 so that 'dbus-launch' has support for ;; '--autolaunch'. ("libx11" ,libx11))) - + (outputs '("out" "doc")) ;22 MiB of HTML doc (home-page "https://www.freedesktop.org/wiki/Software/dbus/") (synopsis "Message bus for inter-process communication (IPC)") (description diff --git a/gnu/packages/gnupg.scm b/gnu/packages/gnupg.scm index 2b3ee89d35..2ef165946e 100644 --- a/gnu/packages/gnupg.scm +++ b/gnu/packages/gnupg.scm @@ -15,6 +15,7 @@ ;;; Copyright © 2017 Petter <petter@mykolab.ch> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> +;;; Copyright © 2018 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> ;;; ;;; This file is part of GNU Guix. ;;; @@ -100,16 +101,14 @@ Daemon and possibly more in the future.") (define-public libgcrypt (package (name "libgcrypt") - (version "1.8.3") + (version "1.8.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnupg/libgcrypt/libgcrypt-" version ".tar.bz2")) (sha256 (base32 - "0z5gs1khzyknyfjr19k8gk4q148s6q987ya85cpn0iv70fz91v36")) - (patches - (search-patches "libgcrypt-make-yat2m-reproducible.patch")))) + "09r27ywj9zplq6n9qw3mn7zmvf6y2jdmwx5d1kg8yqkj0qx18f7n")))) (build-system gnu-build-system) (propagated-inputs `(("libgpg-error-host" ,libgpg-error))) diff --git a/gnu/packages/groff.scm b/gnu/packages/groff.scm index cf392f5468..dd679f1582 100644 --- a/gnu/packages/groff.scm +++ b/gnu/packages/groff.scm @@ -3,6 +3,8 @@ ;;; Copyright © 2014 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2017 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2019 Eric Bavier <bavier@member.fsf.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,14 +38,13 @@ (define-public groff (package (name "groff") - (version "1.22.3") + (version "1.22.4") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/groff/groff-" version ".tar.gz")) (sha256 (base32 - "1998v2kcs288d3y7kfxpvl369nqi06zbbvjzafyvyl3pr7bajj1s")) - (patches (search-patches "groff-source-date-epoch.patch")))) + "14q2mldnr1vx0l9lqp9v2f6iww24gj28iyh4j2211hyynx67p3p7")))) (build-system gnu-build-system) (outputs '("out" "doc")) ;12MiB of PS, PDF, HTML, and examples @@ -65,7 +66,11 @@ (add-after 'unpack 'setenv (lambda _ (setenv "GS_GENERATE_UUIDS" "0") - #t))))) + #t)) + (add-after 'unpack 'fix-docdir + (lambda _ ;see https://savannah.gnu.org/bugs/index.php?55461 + (substitute* "Makefile.in" + (("^docdir =.*") "docdir = @docdir@\n"))))))) (synopsis "Typesetting from plain text mixed with formatting commands") (description "Groff is a typesetting package that reads plain text and produces @@ -91,7 +96,7 @@ is usually the formatter of \"man\" documentation pages.") (arguments `(#:disallowed-references (,perl) - #:configure-flags '("--docdir=/tmp/trash/doc") + #:configure-flags '("--with-doc=no") ,@(substitute-keyword-arguments (package-arguments groff) ((#:phases phases) diff --git a/gnu/packages/image.scm b/gnu/packages/image.scm index 6457127520..1f1c8433d1 100644 --- a/gnu/packages/image.scm +++ b/gnu/packages/image.scm @@ -86,7 +86,7 @@ (define-public libpng (package (name "libpng") - (version "1.6.34") + (version "1.6.36") (source (origin (method url-fetch) (uri (list (string-append "mirror://sourceforge/libpng/libpng16/" @@ -99,7 +99,7 @@ "/libpng16/libpng-" version ".tar.xz"))) (sha256 (base32 - "1xjr0v34fyjgnhvaa1zixcpx5yvxcg4zwvfh0fyklfyfj86rc7ig")))) + "06d35a3xz2a0kph82r56hqm1fn8fbwrqs07xzmr93dx63x695szc")))) (build-system gnu-build-system) ;; libpng.la says "-lz", so propagate it. diff --git a/gnu/packages/inkscape.scm b/gnu/packages/inkscape.scm index 7b17ebae40..a2c6778b57 100644 --- a/gnu/packages/inkscape.scm +++ b/gnu/packages/inkscape.scm @@ -86,6 +86,13 @@ (lambda _ (substitute* "share/icons/application/CMakeLists.txt" (("gtk-update-icon-cache") "true")) + #t)) + (add-before 'configure 'dont-use-system-includes + (lambda _ + ;; Don't add redundant -isystem includes which confuses GCC7. + (substitute* "CMakeScripts/DefineDependsandFlags.cmake" + (("include_directories\\(SYSTEM") + "include_directories(")) #t))))) (home-page "https://inkscape.org/") (synopsis "Vector graphics editor") diff --git a/gnu/packages/kerberos.scm b/gnu/packages/kerberos.scm index 873f5d8a37..7cf61c8d0f 100644 --- a/gnu/packages/kerberos.scm +++ b/gnu/packages/kerberos.scm @@ -49,7 +49,7 @@ (define-public mit-krb5 (package (name "mit-krb5") - (version "1.16.2") + (version "1.17") (source (origin (method url-fetch) (uri (list @@ -61,7 +61,7 @@ "/krb5-" version ".tar.gz"))) (sha256 (base32 - "09zhhzj19bmjjxsvxdrysabql8n72kjivis08wbikhlkwlgiwwlz")))) + "1xc1ly09697b7g2vngvx76szjqy9769kpgn27lnp1r9xln224vjs")))) (build-system gnu-build-system) (native-inputs `(("bison" ,bison) diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index b047c34a0b..712b25bc24 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -1011,7 +1011,7 @@ converting QuarkXPress file format. It supports versions 3.1 to 4.1.") (build-system glib-or-gtk-build-system) (native-inputs `(("bison" ,bison) - ("cppunit" ,cppunit-1.14) + ("cppunit" ,cppunit) ("flex" ,flex) ("pkg-config" ,pkg-config) ("python" ,python-wrapper) diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index c6002eb63a..86e331b34d 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2017 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; Copyright © 2018 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -37,14 +38,18 @@ #:use-module (gnu packages libunistring) #:use-module (gnu packages linux) #:use-module (gnu packages hurd) + #:use-module (gnu packages mes) #:use-module (gnu packages multiprecision) #:use-module (ice-9 match) #:use-module (srfi srfi-1) #:export (%bootstrap-binaries-tarball + %linux-libre-headers-bootstrap-tarball %binutils-bootstrap-tarball %glibc-bootstrap-tarball %gcc-bootstrap-tarball %guile-bootstrap-tarball + %mescc-tools-bootstrap-tarball + %mes-bootstrap-tarball %bootstrap-tarballs %guile-static-stripped)) @@ -154,6 +159,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." "LDFLAGS = -static")) #t)))))))) (xz (package (inherit xz) + (outputs '("out")) (arguments `(#:strip-flags '("--strip-all") #:phases (modify-phases %standard-phases @@ -300,6 +306,26 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (license gpl3+) (home-page #f))) +(define %linux-libre-headers-stripped + ;; The subset of Linux-Libre-Headers that we need. + (package (inherit linux-libre-headers) + (name (string-append (package-name linux-libre-headers) "-stripped")) + (build-system trivial-build-system) + (outputs '("out")) + (arguments + `(#:modules ((guix build utils) + (guix build make-bootstrap)) + #:builder + (begin + (use-modules (guix build utils) + (guix build make-bootstrap)) + + (let* ((in (assoc-ref %build-inputs "linux-libre-headers")) + (out (assoc-ref %outputs "out"))) + (copy-linux-headers out in) + #t)))) + (inputs `(("linux-libre-headers" ,linux-libre-headers))))) + (define %binutils-static ;; Statically-linked Binutils. (package (inherit binutils) @@ -513,6 +539,43 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." #t)))) (inputs `(("gcc" ,%gcc-static))))) +(define %mescc-tools-static + ;; A statically linked MesCC Tools for bootstrap. + (package + (inherit mescc-tools) + (name "mescc-tools-static") + (arguments + `(#:system "i686-linux" + ,@(substitute-keyword-arguments (package-arguments mescc-tools) + ((#:make-flags flags) + `(cons "CC=gcc -static" ,flags))))))) + +(define-public %mes-minimal-stripped + ;; A minimal Mes without documentation dependencies, for bootstrap. + (let ((triplet "i686-unknown-linux-gnu")) + (package + (inherit mes) + (name "mes-minimal-stripped") + (native-inputs + `(("guile" ,guile-2.2))) + (arguments + `(#:system "i686-linux" + #:strip-binaries? #f + #:configure-flags '("--mes") + #:phases + (modify-phases %standard-phases + (add-after 'install 'strip-install + (lambda _ + (let* ((out (assoc-ref %outputs "out")) + (share (string-append out "/share"))) + (delete-file-recursively (string-append out "/lib/guile")) + (delete-file-recursively (string-append share "/guile")) + (delete-file-recursively (string-append share "/mes/scaffold")) + (for-each + delete-file + (find-files (string-append share "/mes/lib") + "\\.(h|c)"))))))))))) + (define %guile-static ;; A statically-linked Guile that is relocatable--i.e., it can search ;; .scm and .go files relative to its installation directory, rather @@ -660,6 +723,10 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ;; A tarball with the statically-linked bootstrap binaries. (tarball-package %static-binaries)) +(define %linux-libre-headers-bootstrap-tarball + ;; A tarball with the statically-linked Linux-Libre-Headers programs. + (tarball-package %linux-libre-headers-stripped)) + (define %binutils-bootstrap-tarball ;; A tarball with the statically-linked Binutils programs. (tarball-package %binutils-static-stripped)) @@ -676,6 +743,14 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ;; A tarball with the statically-linked, relocatable Guile. (tarball-package %guile-static-stripped)) +(define %mescc-tools-bootstrap-tarball + ;; A tarball with MesCC binary seed. + (tarball-package %mescc-tools-static)) + +(define %mes-bootstrap-tarball + ;; A tarball with Mes ASCII Seed and binary Mes C Library. + (tarball-package %mes-minimal-stripped)) + (define %bootstrap-tarballs ;; A single derivation containing all the bootstrap tarballs, for ;; convenience. @@ -704,9 +779,15 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." %build-inputs) #t))) (inputs `(("guile-tarball" ,%guile-bootstrap-tarball) - ("gcc-tarball" ,%gcc-bootstrap-tarball) - ("binutils-tarball" ,%binutils-bootstrap-tarball) - ("glibc-tarball" ,(%glibc-bootstrap-tarball)) + ,@(match (%current-system) + ((or "i686-linux" "x86_64-linux") + `(("bootstrap-mescc-tools" ,%mescc-tools-bootstrap-tarball) + ("bootstrap-mes" ,%mes-bootstrap-tarball) + ("bootstrap-linux-libre-headers" + ,%linux-libre-headers-bootstrap-tarball))) + (_ `(("gcc-tarball" ,%gcc-bootstrap-tarball) + ("binutils-tarball" ,%binutils-bootstrap-tarball) + ("glibc-tarball" ,(%glibc-bootstrap-tarball))))) ("coreutils&co-tarball" ,%bootstrap-binaries-tarball))) (synopsis "Tarballs containing all the bootstrap binaries") (description synopsis) diff --git a/gnu/packages/mes.scm b/gnu/packages/mes.scm index c45e267875..9aff59ab1d 100644 --- a/gnu/packages/mes.scm +++ b/gnu/packages/mes.scm @@ -21,7 +21,6 @@ (define-module (gnu packages mes) #:use-module (gnu packages) #:use-module (gnu packages base) - #:use-module (gnu packages commencement) #:use-module (gnu packages cross-base) #:use-module (gnu packages gcc) #:use-module (gnu packages graphviz) @@ -102,31 +101,33 @@ Guile.") (license gpl3+)))) (define-public mescc-tools - (package - (name "mescc-tools") - (version "0.5.2") - (source (origin - (method url-fetch) - (uri (string-append - "http://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/" - name "-Release_" version - ".tar.gz")) - (file-name (string-append name "-" version ".tar.gz")) - (sha256 - (base32 - "01x7bhmgwyf6mc2g1hcvibhps98nllacqm4f0j5l51b1mbi18pc2")))) - (build-system gnu-build-system) - (supported-systems '("i686-linux" "x86_64-linux")) - (arguments - `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) - #:test-target "test" - #:phases (modify-phases %standard-phases - (delete 'configure)))) - (synopsis "Tools for the full source bootstrapping process") - (description - "Mescc-tools is a collection of tools for use in a full source + (let ((commit "bb062b0da7bf2724ca40f9002b121579898d4ef7") + (revision "0") + (version "0.5.2")) + (package + (name "mescc-tools") + (version (string-append version "-" revision "." (string-take commit 7))) + (source (origin + (method url-fetch) + (uri (string-append + "https://git.savannah.nongnu.org/cgit/mescc-tools.git/snapshot/" + name "-" commit + ".tar.gz")) + (sha256 + (base32 + "1h6j57wyf91i42b26f8msbv6451cw3nm4nmpl1fckp9c7vi8mwkh")))) + (build-system gnu-build-system) + (supported-systems '("i686-linux" "x86_64-linux")) + (arguments + `(#:make-flags (list (string-append "PREFIX=" (assoc-ref %outputs "out"))) + #:test-target "test" + #:phases (modify-phases %standard-phases + (delete 'configure)))) + (synopsis "Tools for the full source bootstrapping process") + (description + "Mescc-tools is a collection of tools for use in a full source bootstrapping process. It consists of the M1 macro assembler, the hex2 linker, the blood-elf symbol table generator, the kaem shell, exec_enable and get_machine.") (home-page "https://savannah.nongnu.org/projects/mescc-tools") - (license gpl3+))) + (license gpl3+)))) diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index c17321a9b3..9f434dabe3 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -93,13 +93,13 @@ algebra.") (define-public mpfr (package (name "mpfr") - (version "4.0.1") + (version "4.0.2") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/mpfr/mpfr-" version ".tar.xz")) (sha256 (base32 - "0vp1lrc08gcmwdaqck6bpzllkrykvp06vz5gnqpyw0v3h9h4m1v7")))) + "12m3amcavhpqygc499s3fzqlb8f2j2rr7fkqsm10xbjfc04fffqx")))) (build-system gnu-build-system) (outputs '("out" "debug")) (propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h> diff --git a/gnu/packages/patches/aspell-gcc-compat.patch b/gnu/packages/patches/aspell-gcc-compat.patch new file mode 100644 index 0000000000..94c44f8fb6 --- /dev/null +++ b/gnu/packages/patches/aspell-gcc-compat.patch @@ -0,0 +1,31 @@ +Fix GCC7 warnings. + +Taken from upstream: +https://git.savannah.gnu.org/cgit/aspell.git/commit/?id=8089fa02122fed0a6394eba14bbedcb1d18e2384 + +diff --git a/modules/filter/tex.cpp b/modules/filter/tex.cpp +index a979539..19ab63c 100644 +--- a/modules/filter/tex.cpp ++++ b/modules/filter/tex.cpp +@@ -174,7 +174,7 @@ namespace { + + if (c == '{') { + +- if (top.in_what == Parm || top.in_what == Opt || top.do_check == '\0') ++ if (top.in_what == Parm || top.in_what == Opt || *top.do_check == '\0') + push_command(Parm); + + top.in_what = Parm; +diff --git a/prog/check_funs.cpp b/prog/check_funs.cpp +index db54f3d..89ee09d 100644 +--- a/prog/check_funs.cpp ++++ b/prog/check_funs.cpp +@@ -647,7 +647,7 @@ static void print_truncate(FILE * out, const char * word, int width) { + } + } + if (i == width-1) { +- if (word == '\0') ++ if (*word == '\0') + put(out,' '); + else if (word[len] == '\0') + put(out, word, len); diff --git a/gnu/packages/patches/binutils-boot-2.20.1a.patch b/gnu/packages/patches/binutils-boot-2.20.1a.patch new file mode 100644 index 0000000000..7e5762ceb4 --- /dev/null +++ b/gnu/packages/patches/binutils-boot-2.20.1a.patch @@ -0,0 +1,157 @@ +This patch enables building binutils using TCC and Mes C Library + + * disable building DOC + * remove signed int trickery that does not work with TCC + * fixe the malloc prototype to use size_t + * add missing includes + * remove C99'isms to avoid of mixing code and variable declaration + * [MES_BOOTSTRAP]: remove strncmp to avoid duplicat symbol + +Upstream status: Not presented upstream. + +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/bfd/elf32-i386.c binutils-2.20.1a/bfd/elf32-i386.c +--- ../binutils-2.20.1a/bfd/elf32-i386.c 2009-09-10 13:47:12.000000000 +0200 ++++ binutils-2.20.1a/bfd/elf32-i386.c 2018-06-23 19:33:20.068134411 +0200 +@@ -4254,6 +4254,7 @@ elf_i386_finish_dynamic_symbol (bfd *out + if (!h->pointer_equality_needed) + abort (); + ++ { + /* For non-shared object, we can't use .got.plt, which + contains the real function addres if we need pointer + equality. We load the GOT entry with the PLT entry. */ +@@ -4262,6 +4263,7 @@ elf_i386_finish_dynamic_symbol (bfd *out + (plt->output_section->vma + + plt->output_offset + h->plt.offset), + htab->elf.sgot->contents + h->got.offset); ++ } + return TRUE; + } + } +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/bfd/elfcode.h binutils-2.20.1a/bfd/elfcode.h +--- ../binutils-2.20.1a/bfd/elfcode.h 2009-09-10 13:47:12.000000000 +0200 ++++ binutils-2.20.1a/bfd/elfcode.h 2018-06-19 19:07:16.647627075 +0200 +@@ -73,6 +73,7 @@ + #include "bfdlink.h" + #include "libbfd.h" + #include "elf-bfd.h" ++#include <limits.h> + + /* Renaming structures, typedefs, macros and functions to be size-specific. */ + #define Elf_External_Ehdr NAME(Elf,External_Ehdr) +@@ -706,8 +707,8 @@ elf_object_p (bfd *abfd) + if (i_ehdrp->e_shnum != 1) + { + /* Check that we don't have a totally silly number of sections. */ +- if (i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (x_shdr) +- || i_ehdrp->e_shnum > (unsigned int) -1 / sizeof (i_shdr)) ++ if (i_ehdrp->e_shnum > INT_MAX / sizeof (x_shdr) ++ || i_ehdrp->e_shnum > INT_MAX / sizeof (i_shdr)) + goto got_wrong_format_error; + + where += (i_ehdrp->e_shnum - 1) * sizeof (x_shdr); +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/bfd/Makefile.in binutils-2.20.1a/bfd/Makefile.in +--- ../binutils-2.20.1a/bfd/Makefile.in 2010-03-03 14:59:15.000000000 +0100 ++++ binutils-2.20.1a/bfd/Makefile.in 2018-06-16 14:00:46.297724081 +0200 +@@ -320,7 +320,7 @@ ACLOCAL_AMFLAGS = -I . -I .. -I ../confi + # RELEASE=y + INCDIR = $(srcdir)/../include + CSEARCH = -I. -I$(srcdir) -I$(INCDIR) +-SUBDIRS = doc po ++SUBDIRS = # these fail to build: doc po + bfddocdir = doc + libbfd_la_LDFLAGS = $(am__append_1) -release `cat libtool-soversion` \ + @SHARED_LDFLAGS@ $(am__empty) +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/binutils/arparse.c binutils-2.20.1a/binutils/arparse.c +--- ../binutils-2.20.1a/binutils/arparse.c 2009-10-16 13:52:16.000000000 +0200 ++++ binutils-2.20.1a/binutils/arparse.c 2018-06-19 01:30:00.576219981 +0200 +@@ -330,7 +330,7 @@ YYID (i) + # define YYMALLOC malloc + # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ ++void *malloc (size_t); /* INFRINGES ON USER NAME SPACE */ + # endif + # endif + # ifndef YYFREE +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/binutils/dwarf.c binutils-2.20.1a/binutils/dwarf.c +--- ../binutils-2.20.1a/binutils/dwarf.c 2009-09-14 13:43:26.000000000 +0200 ++++ binutils-2.20.1a/binutils/dwarf.c 2018-06-16 14:01:45.162684662 +0200 +@@ -27,6 +27,10 @@ + #include "dwarf2.h" + #include "dwarf.h" + ++#if MES_BOOTSTRAP ++#include "getopt.h" ++#endif ++ + static int have_frame_base; + static int need_base_address; + +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/binutils/sysinfo.c binutils-2.20.1a/binutils/sysinfo.c +--- ../binutils-2.20.1a/binutils/sysinfo.c 2009-10-16 13:52:17.000000000 +0200 ++++ binutils-2.20.1a/binutils/sysinfo.c 2018-06-19 01:29:23.823612807 +0200 +@@ -286,7 +286,7 @@ YYID (i) + # define YYMALLOC malloc + # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ ++void *malloc (size_t); /* INFRINGES ON USER NAME SPACE */ + # endif + # endif + # ifndef YYFREE +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/gas/config/tc-i386.c binutils-2.20.1a/gas/config/tc-i386.c +--- ../binutils-2.20.1a/gas/config/tc-i386.c 2009-09-14 13:43:27.000000000 +0200 ++++ binutils-2.20.1a/gas/config/tc-i386.c 2018-06-23 19:39:37.546254752 +0200 +@@ -4869,6 +4869,7 @@ build_modrm_byte (void) + if (vex_3_sources) + { + unsigned int nds, reg; ++ expressionS *exp; + + if (i.tm.opcode_modifier.veximmext + && i.tm.opcode_modifier.immext) +@@ -4892,7 +4893,7 @@ build_modrm_byte (void) + + /* Generate an 8bit immediate operand to encode the register + operand. */ +- expressionS *exp = &im_expressions[i.imm_operands++]; ++ exp = &im_expressions[i.imm_operands++]; + i.op[i.operands].imms = exp; + i.types[i.operands] = imm8; + i.operands++; +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/ld/ldgram.c binutils-2.20.1a/ld/ldgram.c +--- ../binutils-2.20.1a/ld/ldgram.c 2009-10-16 13:52:15.000000000 +0200 ++++ binutils-2.20.1a/ld/ldgram.c 2018-06-19 01:30:57.809165437 +0200 +@@ -561,7 +561,7 @@ YYID (i) + # define YYMALLOC malloc + # if ! defined malloc && ! defined _STDLIB_H && (defined __STDC__ || defined __C99__FUNC__ \ + || defined __cplusplus || defined _MSC_VER) +-void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ ++void *malloc (size_t); /* INFRINGES ON USER NAME SPACE */ + # endif + # endif + # ifndef YYFREE +diff -purN -x config.status -x config.h -x BOOT ../binutils-2.20.1a/libiberty/strncmp.c binutils-2.20.1a/libiberty/strncmp.c +--- ../binutils-2.20.1a/libiberty/strncmp.c 2005-03-28 04:09:01.000000000 +0200 ++++ binutils-2.20.1a/libiberty/strncmp.c 2018-06-23 19:19:50.038992482 +0200 +@@ -15,6 +15,13 @@ Compares the first @var{n} bytes of two + #include <ansidecl.h> + #include <stddef.h> + ++#if !MES_BOOTSTRAP ++ ++/* ++ libtool: link: /gnu/store/rgwjixk5zl7s2d3xsb2ws2z2q3m0xjm4-tcc-boot-0.9.26-0.97196ce/bin/tcc -D __GLIBC_MINOR__=6 -D MES_BOOTSTRAP=1 -g -o size size.o bucomm.o version.o filemode.o ../bfd/.libs/libbfd.a ../libiberty/libiberty.a ./../intl/libintl.a ++ /gnu/store/rgwjixk5zl7s2d3xsb2ws2z2q3m0xjm4-tcc-boot-0.9.26-0.97196ce/lib/libc.a: error: 'strncmp' defined twice ++*/ ++ + int + strncmp(const char *s1, const char *s2, register size_t n) + { +@@ -31,3 +38,5 @@ strncmp(const char *s1, const char *s2, + } + return 0; + } ++ ++#endif // !MES_BOOTSTRAP diff --git a/gnu/packages/patches/diffutils-getopt.patch b/gnu/packages/patches/diffutils-getopt.patch deleted file mode 100644 index 05c2504adf..0000000000 --- a/gnu/packages/patches/diffutils-getopt.patch +++ /dev/null @@ -1,44 +0,0 @@ -commit e3461d1c21a99bcef1b8826f710434e0ffb5adea -Author: Paul Eggert <eggert@cs.ucla.edu> -Date: Sun Jun 11 15:53:09 2017 -0700 - - getopt-posix: port to glibc 2.25.90 - - Problem reported by Daniel P. Berrange in: - http://lists.gnu.org/archive/html/bug-gnulib/2017-06/msg00003.html - * lib/getopt-pfx-core.h (_GETOPT_CORE_H): - * lib/getopt-pfx-ext.h (_GETOPT_EXT_H): - #undef if __GETOPT_PREFIX is defined. - -diff --git a/lib/getopt-pfx-core.h b/lib/getopt-pfx-core.h -index 155c11612..6ad0da683 100644 ---- a/lib/getopt-pfx-core.h -+++ b/lib/getopt-pfx-core.h -@@ -47,6 +47,11 @@ - # define opterr __GETOPT_ID (opterr) - # define optind __GETOPT_ID (optind) - # define optopt __GETOPT_ID (optopt) -+ -+/* The system's getopt.h may have already included getopt-core.h to -+ declare the unprefixed identifiers. Undef _GETOPT_CORE_H so that -+ getopt-core.h declares them with prefixes. */ -+# undef _GETOPT_CORE_H - #endif - - #include <getopt-core.h> -diff --git a/lib/getopt-pfx-ext.h b/lib/getopt-pfx-ext.h -index d960bb34e..c5ac52202 100644 ---- a/lib/getopt-pfx-ext.h -+++ b/lib/getopt-pfx-ext.h -@@ -45,6 +45,11 @@ - # define getopt_long_only __GETOPT_ID (getopt_long_only) - # define option __GETOPT_ID (option) - # define _getopt_internal __GETOPT_ID (getopt_internal) -+ -+/* The system's getopt.h may have already included getopt-ext.h to -+ declare the unprefixed identifiers. Undef _GETOPT_EXT_H so that -+ getopt-ext.h declares them with prefixes. */ -+# undef _GETOPT_EXT_H - #endif - - /* Standalone applications get correct prototypes for getopt_long and diff --git a/gnu/packages/patches/gcc-boot-2.95.3.patch b/gnu/packages/patches/gcc-boot-2.95.3.patch new file mode 100644 index 0000000000..fd167ae052 --- /dev/null +++ b/gnu/packages/patches/gcc-boot-2.95.3.patch @@ -0,0 +1,137 @@ +This patch enables building gcc-2.95.3 using TCC and Mes C Library. + + * Disable building DOC + * Avoid running `fixproto'. + * Force running `fixinc'. + * Replace Makefile trickery of creating an libgcc1.a archive, then + extracting the .o files later to create a new libgcc2.a archive. + Instead, keep temporary .o files. + +Upstream status: Not presented upstream. + +diff -purN -x foo.c -x BOOT -x BOOT-2 -x BOOT-strict -x .git -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC ../gcc-2.95.3/gcc/Makefile.in gcc-2.95.3/gcc/Makefile.in +--- ../gcc-2.95.3/gcc/Makefile.in 2001-01-25 15:02:58.000000000 +0100 ++++ gcc-2.95.3/gcc/Makefile.in 2018-06-23 11:46:03.525159181 +0200 +@@ -221,7 +221,7 @@ RANLIB_TEST_FOR_TARGET = \ + SYSTEM_HEADER_DIR = /usr/include + + # Control whether to run fixproto. +-STMP_FIXPROTO = stmp-fixproto ++# STMP_FIXPROTO = stmp-fixproto + + # Test to see whether <limits.h> exists in the system header files. + LIMITS_H_TEST = [ -f $(SYSTEM_HEADER_DIR)/limits.h ] +@@ -958,6 +958,7 @@ libgcc1.cross: + # fragments. + libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1FUNCS_EXTRA) config.status + -rm -f tmplibgcc1.a ++ mkdir -p libgcc1-o + # Actually build it in tmplibgcc1.a, then rename at end, + # so that libgcc1.a itself remains nonexistent if compilation is aborted. + # -e causes any failing command to make this rule fail. +@@ -974,6 +975,7 @@ libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1F + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ + mv libgcc1$(objext) $${name}$(objext); \ + $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \ ++ mv $${name}$(objext) libgcc1-o; \ + rm -f $${name}$(objext); \ + done + # Some shells crash when a loop has no items. +@@ -994,6 +996,7 @@ libgcc1.a: libgcc1.c $(CONFIG_H) $(LIB1F + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ + $(OLDAR) $(OLDAR_FLAGS) tmplibgcc1.a $${name}$(objext); \ + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ ++ mv $${name}$(objext) libgcc1-o; \ + rm -f $${name}.s $${name}$(objext); \ + else true; \ + fi; \ +@@ -1024,6 +1027,7 @@ libgcc1-asm.a: libgcc2.ready config.stat + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ + mv libgcc1$(objext) $${name}$(objext); \ + $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc1.a $${name}$(objext); \ ++ mv $${name}$(objext) libgcc1-o; \ + rm -f $${name}$(objext); \ + done + -rm -f libgcc1.S +@@ -1062,6 +1066,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CON + # Actually build it in tmplibgcc2.a, then rename at end, + # so that libgcc2.a itself remains nonexistent if compilation is aborted. + -rm -f tmplibgcc2.a ++ mkdir -p libgcc2-o + # -e causes any failing command to make this rule fail. + # -e doesn't work in certain shells, so we test $$? as well. + # lynx has a broken ar, it always complains when the initial library is +@@ -1139,6 +1144,7 @@ libgcc2.a: libgcc2.c libgcc2.ready $(CON + $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES) -c $${file}; \ + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ + $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) tmplibgcc2.a $${oname}$(objext); \ ++ mv $${oname}$(objext) libgcc2-o;\ + rm -f $${name}.s $${oname}$(objext); \ + fi; \ + done +@@ -1156,7 +1162,7 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2) + -rm -rf tmplibgcc.a libgcc.a tmpcopy + mkdir tmpcopy + -if [ x$(LIBGCC1) != x ]; \ +- then (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC1)); \ ++ then cp -v libgcc1-o/*.o tmpcopy; \ + else true; \ + fi + # Some versions of ar (specifically the one in RISC/os 5.x), create an +@@ -1164,7 +1170,7 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2) + # the second ar command tries to overwrite this file. To avoid the error + # message from ar, we make sure all files are writable. + -(cd tmpcopy; chmod +w * > /dev/null 2>&1) +- (cd tmpcopy; $(AR_FOR_TARGET) x ../$(LIBGCC2)) ++ cp -v libgcc2-o/*.o tmpcopy + (cd tmpcopy; $(AR_FOR_TARGET) $(AR_FLAGS_FOR_TARGET) ../tmplibgcc.a *$(objext)) + rm -rf tmpcopy + -if $(RANLIB_TEST_FOR_TARGET) ; then \ +@@ -2093,14 +2099,18 @@ gcov$(exeext): $(GCOV_OBJS) $(LIBDEPS) + # s-* so that mostlyclean does not force the include directory to + # be rebuilt. + ++# STMP_FIXINC = @STMP_FIXINC@ ++STMP_FIXINC = stmp-fixinc ++ + # Build the include directory including float.h (which no longer depends upon + # enquire). +-stmp-int-hdrs: stmp-fixinc $(USER_H) xlimits.h ++stmp-int-hdrs: $(STMP_FIXINC) $(USER_H) xlimits.h + # Copy in the headers provided with gcc. + # The sed command gets just the last file name component; + # this is necessary because VPATH could add a dirname. + # Using basename would be simpler, but some systems don't have it. + # The touch command is here to workaround an AIX/Linux NFS bug. ++ -if [ -d include ] ; then true; else mkdir include; chmod a+rx include; fi + for file in .. $(USER_H); do \ + if [ X$$file != X.. ]; then \ + realfile=`echo $$file | sed -e 's|.*/\([^/]*\)$$|\1|'`; \ +@@ -2265,16 +2275,17 @@ stmp-fixproto: fixhdr.ready fixproto stm + # + # Remake the info files. + +-doc: info +-info: cpp.info gcc.info lang.info +- +-cpp.info: $(srcdir)/cpp.texi +- $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi +- +-gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \ +- $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \ +- $(srcdir)/tm.texi $(srcdir)/gcov.texi +- $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi ++doc: ++# doc: info ++# info: cpp.info gcc.info lang.info ++ ++# cpp.info: $(srcdir)/cpp.texi ++# $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o cpp.info $(srcdir)/cpp.texi ++ ++# gcc.info: $(srcdir)/gcc.texi $(srcdir)/extend.texi $(srcdir)/install.texi \ ++# $(srcdir)/invoke.texi $(srcdir)/md.texi $(srcdir)/rtl.texi \ ++# $(srcdir)/tm.texi $(srcdir)/gcov.texi ++# $(MAKEINFO) $(MAKEINFOFLAGS) -I$(srcdir) -o gcc.info $(srcdir)/gcc.texi + + dvi: gcc.dvi cpp.dvi lang.dvi + diff --git a/gnu/packages/patches/gcc-boot-4.7.4.patch b/gnu/packages/patches/gcc-boot-4.7.4.patch new file mode 100644 index 0000000000..3e51e31fdf --- /dev/null +++ b/gnu/packages/patches/gcc-boot-4.7.4.patch @@ -0,0 +1,68 @@ +This patch enables building gcc-4.7.4 using gcc-2.95.3 and glibc-2.2.5 + + * Tweak Makefile to allow overriding NATIVE_SYSTEM_HEADER_DIR using #:makeflags + * Add missing limits.h include. + * Add SSIZE_MAX define. The SSIZE_MAX define has been added to Mes + upstream and can be removed with the next Mes release. + * Remove -fbuilding-libgcc flag, it assumes features being present from a + newer gcc or glibc. + * [MES_BOOTSTRAP_GCC]: Disable threads harder. + +Upstream status: not presented upstream. + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index f3cc49fdb18..bc5718fc9a6 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -458,7 +458,7 @@ LINKER_PLUGIN_API_H = $(srcdir)/../include/plugin-api.h + LTO_SYMTAB_H = $(srcdir)/../include/lto-symtab.h + + # Default native SYSTEM_HEADER_DIR, to be overridden by targets. +-NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ ++# NATIVE_SYSTEM_HEADER_DIR = @NATIVE_SYSTEM_HEADER_DIR@ + # Default cross SYSTEM_HEADER_DIR, to be overridden by targets. + CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@ + +diff --git a/gcc/config/host-linux.c b/gcc/config/host-linux.c +index 94b7a0b89a7..ab2baab55ca 100644 +--- a/gcc/config/host-linux.c ++++ b/gcc/config/host-linux.c +@@ -23,6 +23,12 @@ + #include "hosthooks.h" + #include "hosthooks-def.h" + ++// ../.././gcc/config/host-linux.c:213: `SSIZE_MAX' undeclared (first ++// use in this function) ++#include <limits.h> ++#ifndef SSIZE_MAX ++# define SSIZE_MAX LONG_MAX ++#endif + + /* Linux has a feature called exec-shield-randomize that perturbs the + address of non-fixed mapped segments by a (relatively) small amount. +diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in +index c301ff03cae..f86318c3bd5 100644 +--- a/libgcc/Makefile.in ++++ b/libgcc/Makefile.in +@@ -225,7 +225,7 @@ endif + LIBGCC2_DEBUG_CFLAGS = -g + LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \ + $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \ +- -fbuilding-libgcc -fno-stack-protector \ ++ -fno-stack-protector \ + $(INHIBIT_LIBC_CFLAGS) + + # Additional options to use when compiling libgcc2.a. +diff --git a/libgcc/generic-morestack-thread.c b/libgcc/generic-morestack-thread.c +index bbe6dd12b5a..1d1d48223d7 100644 +--- a/libgcc/generic-morestack-thread.c ++++ b/libgcc/generic-morestack-thread.c +@@ -35,7 +35,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see + will want to define inhibit_libc while building a compiler which + can build glibc. */ + +-#ifndef inhibit_libc ++#if 0 //!defined (inhibit_libc) && !MES_BOOTSTRAP_GCC + + #include <errno.h> + #include <pthread.h> diff --git a/gnu/packages/patches/glibc-boot-2.16.0.patch b/gnu/packages/patches/glibc-boot-2.16.0.patch new file mode 100644 index 0000000000..5cb29bc271 --- /dev/null +++ b/gnu/packages/patches/glibc-boot-2.16.0.patch @@ -0,0 +1,352 @@ +This patch enables building glibc-2.2.5 using TCC and GNU Make 4.x and Mes C Library. + + * Makefile: Do not link with (non-existent) libgc_eh. + * Makefile: Add SHELL variable, ready for substitution, export it. + * Makefile: Do not build or assume librpc_compat_pic. + * Makefile: Do not build libmesusage. + * gen-as-const: Always add preamble. + * [BOOTSTRAP_GLIBC]: Really disable rpc. + +Upstream status: Not presented upstream. + +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/elf/Makefile glibc-2.16.0/elf/Makefile +--- /home/janneke/src/glibc-2.16.0/elf/Makefile 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/elf/Makefile 2018-09-02 12:54:44.616962543 +0200 +@@ -17,6 +17,8 @@ + + # Makefile for elf subdirectory of GNU C Library. + ++SHELL := /bin/sh ++ + subdir := elf + + headers = elf.h bits/elfclass.h link.h bits/link.h +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/include/libc-symbols.h glibc-2.16.0/include/libc-symbols.h +--- /home/janneke/src/glibc-2.16.0/include/libc-symbols.h 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/include/libc-symbols.h 2018-09-02 22:41:00.798467803 +0200 +@@ -558,9 +558,9 @@ for linking") + # define libc_hidden_weak(name) hidden_weak (name) + # ifdef LINK_OBSOLETE_RPC + /* libc_hidden_nolink_sunrpc should only get used in sunrpc code. */ +-# define libc_hidden_nolink_sunrpc(name, version) hidden_def (name) ++# define libc_hidden_nolink_sunrpc(name, version) + # else +-# define libc_hidden_nolink_sunrpc(name, version) hidden_nolink (name, libc, version) ++# define libc_hidden_nolink_sunrpc(name, version) + # endif + # define libc_hidden_ver(local, name) hidden_ver (local, name) + # define libc_hidden_data_def(name) hidden_data_def (name) +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/Makeconfig glibc-2.16.0/Makeconfig +--- /home/janneke/src/glibc-2.16.0/Makeconfig 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/Makeconfig 2018-09-03 00:00:25.290357414 +0200 +@@ -23,6 +23,9 @@ ifneq (,) + This makefile requires GNU Make. + endif + ++SHELL := /bin/sh ++export SHELL ++ + all: # Make this the default goal + + ifneq "$(origin +included-Makeconfig)" "file" +@@ -521,9 +524,9 @@ ifneq ($(have-cc-with-libunwind),yes) + else + libunwind = -lunwind + endif +-libgcc_eh := -Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed ++libgcc_eh := #-Wl,--as-needed -lgcc_s $(libunwind) -Wl,--no-as-needed + gnulib := -lgcc $(libgcc_eh) +-static-gnulib := -lgcc -lgcc_eh $(libunwind) ++static-gnulib := -lgcc $(libunwind) + libc.so-gnulib := -lgcc + endif + +preinit = $(addprefix $(csu-objpfx),crti.o) +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/Makefile glibc-2.16.0/Makefile +--- /home/janneke/src/glibc-2.16.0/Makefile 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/Makefile 2018-09-02 23:01:10.485803965 +0200 +@@ -22,6 +22,9 @@ ifneq (,) + This makefile requires GNU Make. + endif + ++SHELL := /bin/sh ++export SHELL ++ + include Makeconfig + + +@@ -135,13 +138,10 @@ $(common-objpfx)linkobj/libc.so: $(elfob + $(shlib-lds) + $(build-shlib) + +-$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a \ +- $(common-objpfx)sunrpc/librpc_compat_pic.a ++$(common-objpfx)linkobj/libc_pic.a: $(common-objpfx)libc_pic.a + $(..)./scripts/mkinstalldirs $(common-objpfx)linkobj + (cd $(common-objpfx)linkobj; \ + $(AR) x ../libc_pic.a; \ +- rm $$($(AR) t ../sunrpc/librpc_compat_pic.a | sed 's/^compat-//'); \ +- $(AR) x ../sunrpc/librpc_compat_pic.a; \ + $(AR) cr libc_pic.a *.os; \ + rm *.os) + endif +@@ -151,7 +151,7 @@ endif + # the current libc build for testing. + $(common-objpfx)testrun.sh: $(common-objpfx)config.make \ + $(..)Makeconfig $(..)Makefile +- (echo '#!/bin/sh'; \ ++ (echo '#! $(SHELL)'; \ + echo 'builddir=`dirname "$$0"`'; \ + echo 'GCONV_PATH="$${builddir}/iconvdata" \'; \ + echo 'exec $(subst $(common-objdir),"$${builddir}",\ +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/Makefile.in glibc-2.16.0/Makefile.in +--- /home/janneke/src/glibc-2.16.0/Makefile.in 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/Makefile.in 2018-09-02 13:03:01.892962551 +0200 +@@ -9,3 +9,6 @@ all .DEFAULT: + install: + LANGUAGE=C LC_ALL=C; export LANGUAGE LC_ALL; \ + $(MAKE) -r PARALLELMFLAGS="$(PARALLELMFLAGS)" -C $(srcdir) objdir=`pwd` $@ ++ ++export SHELL ++export BASH +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/malloc/Makefile glibc-2.16.0/malloc/Makefile +--- /home/janneke/src/glibc-2.16.0/malloc/Makefile 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/malloc/Makefile 2018-09-02 17:11:33.461547394 +0200 +@@ -35,7 +35,7 @@ install-lib := libmcheck.a + non-lib.a := libmcheck.a + + # Additional library. +-extra-libs = libmemusage ++extra-libs = #libmemusage + extra-libs-others = $(extra-libs) + + libmemusage-routines = memusage +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/nscd/cache.c glibc-2.16.0/nscd/cache.c +--- /home/janneke/src/glibc-2.16.0/nscd/cache.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/nscd/cache.c 2018-09-02 23:38:31.757616750 +0200 +@@ -74,7 +74,11 @@ struct datahead * + cache_search (request_type type, const void *key, size_t len, + struct database_dyn *table, uid_t owner) + { ++#if !BOOTSTRAP_GLIBC + unsigned long int hash = __nis_hash (key, len) % table->head->module; ++#else ++ unsigned long int hash = 0; ++#endif + + unsigned long int nsearched = 0; + struct datahead *result = NULL; +@@ -153,7 +153,11 @@ cache_add (int type, const void *key, si + first ? _(" (first)") : ""); + } + ++#if !BOOTSTRAP_GLIBC + unsigned long int hash = __nis_hash (key, len) % table->head->module; ++#else ++ unsigned long int hash = 0; ++#endif + struct hashentry *newp; + + newp = mempool_alloc (table, sizeof (struct hashentry), 0); +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/nscd/Makefile glibc-2.16.0/nscd/Makefile +--- /home/janneke/src/glibc-2.16.0/nscd/Makefile 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/nscd/Makefile 2018-09-02 23:49:29.948031787 +0200 +@@ -126,9 +126,7 @@ include $(patsubst %,$(..)cppflags-itera + $(objpfx)nscd: $(nscd-modules:%=$(objpfx)%.o) + + ifeq ($(build-shared),yes) +-$(objpfx)nscd: $(common-objpfx)rt/librt.so $(shared-thread-library) \ +- $(common-objpfx)nis/libnsl.so ++$(objpfx)nscd: $(common-objpfx)rt/librt.so $(shared-thread-library) + else +-$(objpfx)nscd: $(common-objpfx)rt/librt.a $(static-thread-library) \ +- $(common-objpfx)nis/libnsl.a ++$(objpfx)nscd: $(common-objpfx)rt/librt.a $(static-thread-library) + endif +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/nscd/nscd_helper.c glibc-2.16.0/nscd/nscd_helper.c +--- /home/janneke/src/glibc-2.16.0/nscd/nscd_helper.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/nscd/nscd_helper.c 2018-09-02 23:38:04.941189464 +0200 +@@ -474,7 +474,7 @@ struct datahead * + __nscd_cache_search (request_type type, const char *key, size_t keylen, + const struct mapped_database *mapped, size_t datalen) + { +- unsigned long int hash = __nis_hash (key, keylen) % mapped->head->module; ++ unsigned long int hash = 0; + size_t datasize = mapped->datasize; + + ref_t trail = mapped->head->array[hash]; +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/nss/getent.c glibc-2.16.0/nss/getent.c +--- /home/janneke/src/glibc-2.16.0/nss/function.def 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/nss/function.def 2018-09-18 13:54:49.582060539 +0200 +@@ -63,10 +63,12 @@ + DEFINE_GET (files, pwnam) + DEFINE_GET (files, pwuid) + ++#if !BOOTSTRAP_GLIBC + /* rpc */ + DEFINE_ENT (files, rpc) + DEFINE_GETBY (files, rpc, name) + DEFINE_GETBY (files, rpc, number) ++#endif + + /* services */ + DEFINE_ENT (files, serv) +diff -u ~/src/glibc-2.16.0/nss/getent.c glibc-2.16.0/nss/getent.c +--- /home/janneke/src/glibc-2.16.0/nss/getent.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/nss/getent.c 2018-09-18 13:57:41.856849140 +0200 +@@ -700,6 +700,7 @@ + return result; + } + ++#if !BOOTSTRAP_GLIBC + /* Now is all for rpc */ + static inline void + print_rpc (struct rpcent *rpc) +@@ -745,6 +746,7 @@ + + return result; + } ++#endif //rpc + + /* for services */ + static void +@@ -880,7 +882,9 @@ + D(networks) + D(passwd) + D(protocols) ++#if !BOOTSTRAP_GLIBC + D(rpc) ++#endif + D(services) + D(shadow) + #undef D +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/resolv/netdb.h glibc-2.16.0/resolv/netdb.h +--- /home/janneke/src/glibc-2.16.0/resolv/netdb.h 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/resolv/netdb.h 2018-09-08 08:49:30.537811219 +0200 +@@ -26,11 +26,13 @@ + + #include <netinet/in.h> + #include <stdint.h> ++#if 0 //!BOOTSTRAP_GLIBC + #ifdef __USE_MISC + /* This is necessary to make this include file properly replace the + Sun version. */ + # include <rpc/netdb.h> + #endif ++#endif + + #ifdef __USE_GNU + # define __need_sigevent_t +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/Rules glibc-2.16.0/Rules +--- /home/janneke/src/glibc-2.16.0/Rules 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/Rules 2018-09-02 10:52:06.927362861 +0200 +@@ -24,6 +24,9 @@ ifneq (,) + This makefile requires GNU Make. + endif + ++export SHELL ++export BASH ++ + all: # Don't let the default goal come from Makeconfig. + + include $(firstword $(..) ../)Makeconfig +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/scripts/gen-as-const.awk glibc-2.16.0/scripts/gen-as-const.awk +--- /home/janneke/src/glibc-2.16.0/scripts/gen-as-const.awk 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/scripts/gen-as-const.awk 2018-09-01 18:08:37.266516330 +0200 +@@ -14,6 +14,12 @@ BEGIN { started = 0 } + + NF >= 1 && !started { + if (test) { ++ print "\n#include <stddef.h>"; ++ print "\n#include <stdint.h>"; ++# print "\ntypedef unsigned long size_t;"; ++ print "\n#ifndef offsetof"; ++ print "\n#define offsetof(type, field) ((size_t)&((type *)0)->field)"; ++ print "\n#endif"; + print "\n#include <inttypes.h>"; + print "\n#include <stdio.h>"; + print "\n#include <bits/wordsize.h>"; +@@ -33,8 +39,15 @@ NF >= 1 && !started { + " source, #name, U (asconst_##name), #expr, (c_t) (expr));" \ + " } else ++good;\n"; + } +- else ++ else { ++ print "\n#include <stddef.h>"; ++ print "\n#include <stdint.h>"; ++# print "\ntypedef unsigned long size_t;"; ++ print "\n#ifndef offsetof"; ++ print "\n#define offsetof(type, field) ((size_t)&((type *)0)->field)"; ++ print "\n#endif"; + print "void dummy(void) {"; ++ } + started = 1; + } + +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/sunrpc/auth_none.c glibc-2.16.0/sunrpc/auth_none.c +--- /home/janneke/src/glibc-2.16.0/sunrpc/auth_none.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/auth_none.c 2018-09-02 22:09:21.629007932 +0200 +@@ -95,7 +95,9 @@ authnone_create (void) + __libc_once (authnone_private_guard, authnone_create_once); + return &authnone_private.no_client; + } ++#if !BOOTSTRAP_GLIBC + libc_hidden_nolink_sunrpc (authnone_create, GLIBC_2_0) ++#endif + + static bool_t + authnone_marshal (AUTH *client, XDR *xdrs) +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/sunrpc/authuxprot.c glibc-2.16.0/sunrpc/authuxprot.c +--- /home/janneke/src/glibc-2.16.0/sunrpc/authuxprot.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/authuxprot.c 2018-09-02 22:15:51.927158451 +0200 +@@ -63,4 +63,6 @@ xdr_authunix_parms (XDR * xdrs, struct a + } + return FALSE; + } ++#if !BOOTSTRAP_GLIBC + libc_hidden_nolink_sunrpc (xdr_authunix_parms, GLIBC_2_0) ++#endif +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/sunrpc/bindrsvprt.c glibc-2.16.0/sunrpc/bindrsvprt.c +--- /home/janneke/src/glibc-2.16.0/sunrpc/bindrsvprt.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/bindrsvprt.c 2018-09-02 22:24:32.687187675 +0200 +@@ -96,4 +96,7 @@ bindresvport (int sd, struct sockaddr_in + + return res; + } ++#if !BOOTSTRAP_GLIBC + libc_hidden_def (bindresvport) ++#endif ++ +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/sunrpc/clnt_raw.c glibc-2.16.0/sunrpc/clnt_raw.c +--- /home/janneke/src/glibc-2.16.0/sunrpc/clnt_raw.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/clnt_raw.c 2018-09-02 22:33:21.151343826 +0200 +@@ -40,6 +40,7 @@ + #include <rpc/svc.h> + #include <rpc/xdr.h> + #include <libintl.h> ++#include <stddef.h> + + #define MCALL_MSG_SIZE 24 + +@@ -129,7 +130,9 @@ clntraw_create (u_long prog, u_long vers + client->cl_auth = authnone_create (); + return client; + } ++#if !BOOTSTRAP_GLIBC + libc_hidden_nolink_sunrpc (clntraw_create, GLIBC_2_0) ++#endif + + static enum clnt_stat + clntraw_call (h, proc, xargs, argsp, xresults, resultsp, timeout) +diff '--exclude=*.orig' -purN /home/janneke/src/glibc-2.16.0/sunrpc/clnt_simp.c glibc-2.16.0/sunrpc/clnt_simp.c +--- /home/janneke/src/glibc-2.16.0/sunrpc/clnt_simp.c 2012-06-30 21:12:34.000000000 +0200 ++++ glibc-2.16.0/sunrpc/clnt_simp.c 2018-09-02 22:34:14.884175251 +0200 +@@ -139,7 +139,9 @@ callrpc (const char *host, u_long prognu + crp->valid = 0; + return (int) clnt_stat; + } ++#if !BOOTSTRAP_GLIBC + libc_hidden_nolink_sunrpc (callrpc, GLIBC_2_0) ++#endif + + #ifdef _RPC_THREAD_SAFE_ + void diff --git a/gnu/packages/patches/glibc-boot-2.2.5.patch b/gnu/packages/patches/glibc-boot-2.2.5.patch new file mode 100644 index 0000000000..26bc92a6bb --- /dev/null +++ b/gnu/packages/patches/glibc-boot-2.2.5.patch @@ -0,0 +1,251 @@ +This patch enables building glibc-2.2.5 using TCC and GNU Make 4.x and Mes C Library. + + * Makefile: Do not assemble from stdin, use file indirection. + * Makefile: Add new target: install-lib-all. + * Makefile: Avoid building stub DOC. + * [_LIBC_REENTRANT]: Add missing guarding. + * [MES_BOOTSTRAP]: Disable some GCC extensions. + * [MES_BOOTSTRAP]: Add missing GCC div/mod defines. + +Upstream status: Not presented upstream. + +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/config.h.in glibc-2.2.5/config.h.in +--- ../glibc-2.2.5/config.h.in 2001-11-16 02:02:56.000000000 +0100 ++++ glibc-2.2.5/config.h.in 2018-06-17 21:30:02.313029074 +0200 +@@ -1,3 +1,10 @@ ++#if MES_BOOTSTRAP && BOOTSTRAP_GLIBC ++#undef __umoddi3 ++#define __umoddi3(a,b) ((a)%(b)) ++#undef __udivdi3 ++#define __udivdi3(a,b) ((a)/(b)) ++#endif ++ + #if !defined ASSEMBLER && !defined _ISOMAC && !defined __OPTIMIZE__ + # error "glibc cannot be compiled without optimization" + #endif +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/configure glibc-2.2.5/configure +--- ../glibc-2.2.5/configure 2002-01-08 23:16:44.000000000 +0100 ++++ glibc-2.2.5/configure 2018-06-07 20:47:26.608895319 +0200 +@@ -1530,7 +1530,7 @@ echo "configure:1530: checking version o + ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; +- 3.79* | 3.[89]*) ++ 3.79* | 3.[89]* | 4.*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/Makeconfig glibc-2.2.5/Makeconfig +--- ../glibc-2.2.5/Makeconfig 2001-09-12 20:49:45.000000000 +0200 ++++ glibc-2.2.5/Makeconfig 2018-06-20 16:33:35.472167202 +0200 +@@ -400,7 +400,7 @@ ifndef +link + $(start-installed-name))\ + $(+preinit) $(link-extra-libs) \ + $(common-objpfx)libc% $(+postinit),$^) \ +- $(link-extra-libs) $(link-libc) $(+postctor) $(+postinit) ++ $(link-extra-libs) $(link-libc) $(+postctor) $(+postinit) -lc -lgcc2 + endif + # Command for statically linking programs with the C library. + ifndef +link-static +@@ -412,7 +412,7 @@ ifndef +link-static + $(start-installed-name))\ + $(+preinit) $(link-extra-libs-static) \ + $(common-objpfx)libc% $(+postinit),$^) \ +- $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit) ++ $(link-extra-libs-static) $(link-libc-static) $(+postctor) $(+postinit) -lc -lgcc2 + endif + # Command for statically linking bounded-pointer programs with the C library. + ifndef +link-bounded +@@ -424,7 +424,7 @@ ifndef +link-bounded + $(start-installed-name))\ + $(+preinit) $(link-extra-libs-bounded) \ + $(common-objpfx)libc% $(+postinit),$^) \ +- $(link-extra-libs-bounded) $(link-libc-bounded) $(+postctor) $(+postinit) ++ $(link-extra-libs-bounded) $(link-libc-bounded) $(+postctor) $(+postinit) -lc -lgcc2 + endif + ifndef config-LDFLAGS + ifeq (yesyes,$(build-shared)$(elf)) +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/Makerules glibc-2.2.5/Makerules +--- ../glibc-2.2.5/Makerules 2001-11-16 02:02:19.000000000 +0100 ++++ glibc-2.2.5/Makerules 2018-06-10 15:03:42.390329860 +0200 +@@ -748,6 +748,18 @@ endef + installed-libcs := $(foreach o,$(filter-out .os,$(object-suffixes-for-libc)),\ + $(inst_libdir)/$(patsubst %,$(libtype$o),\ + $(libprefix)$(libc-name))) ++ ++ifeq (yes,$(build-shared)) ++install-lib-all: $(inst_libdir)/libc.a \ ++ $(inst_slibdir)/libc.so$(libc.so-version) \ ++ $(inst_slibdir)/libc-$(version).so \ ++ $(inst_libdir)/libc.so \ ++ install-lib ++else ++install-lib-all: $(inst_libdir)/libc.a \ ++ install-lib ++endif ++ + install: $(installed-libcs) + $(installed-libcs): $(inst_libdir)/lib$(libprefix)%: lib $(+force) + $(make-target-directory) +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/misc/syslog.c glibc-2.2.5/misc/syslog.c +--- ../glibc-2.2.5/misc/syslog.c 2001-08-31 01:13:49.000000000 +0200 ++++ glibc-2.2.5/misc/syslog.c 2018-06-09 09:01:20.008918690 +0200 +@@ -216,9 +216,11 @@ vsyslog(pri, fmt, ap) + + /* Prepare for multiple users. We have to take care: open and + write are cancellation points. */ ++#if _LIBC_REENTRANT + __libc_cleanup_region_start (1, (void (*) (void *)) cancel_handler, + &oldaction_ptr); + __libc_lock_lock (syslog_lock); ++#endif + + /* Prepare for a broken connection. */ + memset (&action, 0, sizeof (action)); +@@ -268,9 +270,11 @@ vsyslog(pri, fmt, ap) + if (sigpipe == 0) + __sigaction (SIGPIPE, &oldaction, (struct sigaction *) NULL); + ++#if _LIBC_REENTRANT + /* End of critical section. */ + __libc_cleanup_region_end (0); + __libc_lock_unlock (syslog_lock); ++#endif + + free (buf); + } +@@ -326,16 +330,20 @@ openlog_internal(const char *ident, int + void + openlog (const char *ident, int logstat, int logfac) + { ++#if _LIBC_REENTRANT + /* Protect against multiple users. */ + __libc_cleanup_region_start (1, + (void (*) __P ((void *))) __libc_mutex_unlock, + &syslog_lock); + __libc_lock_lock (syslog_lock); ++#endif + + openlog_internal (ident, logstat, logfac); + ++#if _LIBC_REENTRANT + /* Free the lock. */ + __libc_cleanup_region_end (1); ++#endif + } + + static void +@@ -358,18 +366,22 @@ closelog_internal() + void + closelog () + { ++#if _LIBC_REENTRANT + /* Protect against multiple users. */ + __libc_cleanup_region_start (1, + (void (*) __P ((void *))) __libc_mutex_unlock, + &syslog_lock); + __libc_lock_lock (syslog_lock); ++#endif + + closelog_internal (); + LogTag = NULL; + LogType = SOCK_DGRAM; /* this is the default */ + ++#if _LIBC_REENTRANT + /* Free the lock. */ + __libc_cleanup_region_end (1); ++#endif + } + + #ifdef _LIBC_REENTRANT +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/Rules glibc-2.2.5/Rules +--- ../glibc-2.2.5/Rules 2001-08-30 00:44:35.000000000 +0200 ++++ glibc-2.2.5/Rules 2018-06-09 08:15:54.880683675 +0200 +@@ -218,7 +218,7 @@ endif + fopen_max=`sed -n 's/^#define OPEN_MAX //1p' $(@:st=hT)`; \ + filename_max=`sed -n 's/^#define PATH_MAX //1p' $(@:st=hT)`; \ + iov_max=`sed -n 's/^#define UIO_MAXIOV //p' $(@:st=hT)`; \ +- fopen_max=$${fopen_max:-16}; \ ++ fopen_max=$${fu_fopen_max:-16}; \ + filename_max=$${filename_max:-1024}; \ + if [ -z $$iov_max ]; then \ + define_iov_max="# undef IOV_MAX"; \ +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/stdio-common/perror.c glibc-2.2.5/stdio-common/perror.c +--- ../glibc-2.2.5/stdio-common/perror.c 2001-09-01 07:33:01.000000000 +0200 ++++ glibc-2.2.5/stdio-common/perror.c 2018-06-09 10:42:25.909899529 +0200 +@@ -48,6 +48,9 @@ perror_internal (FILE *fp, const char *s + } + + ++#if MES_BOOTSTRAP ++#define fileno_unlocked(x) 1 ++#endif + /* Print a line on stderr consisting of the text in S, a colon, a space, + a message describing the meaning of the contents of `errno' and a newline. + If S is NULL or "", the colon and space are omitted. */ +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/sysdeps/i386/fpu/ftestexcept.c glibc-2.2.5/sysdeps/i386/fpu/ftestexcept.c +--- ../glibc-2.2.5/sysdeps/i386/fpu/ftestexcept.c 2001-07-06 06:55:53.000000000 +0200 ++++ glibc-2.2.5/sysdeps/i386/fpu/ftestexcept.c 2018-06-09 09:45:13.363031424 +0200 +@@ -25,8 +25,10 @@ fetestexcept (int excepts) + { + int temp; + ++#if !MES_BOOTSTRAP + /* Get current exceptions. */ + __asm__ ("fnstsw %0" : "=a" (temp)); ++#endif + + return temp & excepts & FE_ALL_EXCEPT; + } +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/sysdeps/unix/make-syscalls.sh glibc-2.2.5/sysdeps/unix/make-syscalls.sh +--- ../glibc-2.2.5/sysdeps/unix/make-syscalls.sh 2001-09-13 00:19:30.000000000 +0200 ++++ glibc-2.2.5/sysdeps/unix/make-syscalls.sh 2018-06-20 15:16:01.813004453 +0200 +@@ -173,7 +173,7 @@ shared-only-routines += $file + done + + # And finally, pipe this all into the compiler. +- echo ' ) | $(COMPILE.S) -x assembler-with-cpp -o $@ -' ++ echo ' ) > stdin.c; $(COMPILE.S) -x assembler-with-cpp -o $@ stdin.c' + + case $weak in + *@*) +@@ -284,7 +284,7 @@ shared-only-routines += $file + echo "\ + echo ''; \\ + echo '#include <bp-thunks.h>'; \\ +- ) | \$(COMPILE.c) -x c -o \$@ -" ++ ) > stdin.c; \$(COMPILE.c) -x c -o \$@ stdin.c" + ### Use this for debugging intermediate output: + ### ) >\$(@:.ob=.c) + ### \$(subst -c,-E,\$(COMPILE.c)) -o \$(@:.ob=.ib) \$(@:.ob=.c) +diff -purN -x .git -x fubar -x fubar.c -x Makefile -x config.status -x config.h -x BOOT -x BOOT-GCC -x texis -x '*.info*' ../glibc-2.2.5/sysdeps/unix/sysv/linux/sys/timex.h glibc-2.2.5/sysdeps/unix/sysv/linux/sys/timex.h +--- ../glibc-2.2.5/sysdeps/unix/sysv/linux/sys/timex.h 2001-07-06 06:56:21.000000000 +0200 ++++ glibc-2.2.5/sysdeps/unix/sysv/linux/sys/timex.h 2018-06-09 20:09:07.713806647 +0200 +@@ -54,10 +54,12 @@ struct timex + long int errcnt; /* calibration errors (ro) */ + long int stbcnt; /* stability limit exceeded (ro) */ + ++#if !MES_BOOTSTRAP + /* ??? */ + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; + int :32; int :32; int :32; int :32; ++#endif + }; + + /* Mode codes (timex.mode) */ +--- ../glibc-2.2.5/manual/Makefile 2001-08-28 10:05:40.000000000 +0200 ++++ glibc-2.2.5/manual/Makefile 2018-06-09 10:13:03.093633660 +0200 +@@ -247,7 +247,11 @@ + .PHONY: stubs + stubs: $(objpfx)stubs + endif +-$(objpfx)stubs ../po/manual.pot $(objpfx)stamp%: ++po/manual.pot $(objpfx)stubs: ++ $(make-target-directory) ++ touch $@ ++ ++$(objpfx)stamp%: + $(make-target-directory) + touch $@ + diff --git a/gnu/packages/patches/glibc-bootstrap-system-2.16.0.patch b/gnu/packages/patches/glibc-bootstrap-system-2.16.0.patch new file mode 100644 index 0000000000..936d592f1a --- /dev/null +++ b/gnu/packages/patches/glibc-bootstrap-system-2.16.0.patch @@ -0,0 +1,30 @@ +We want to allow builds in chroots that lack /bin/sh. Thus, system(3) +and popen(3) need to be tweaked to use the right shell. For the bootstrap +glibc, we just use whatever `sh' can be found in $PATH. The final glibc +instead uses the hard-coded absolute file name of `bash'. + +--- a/sysdeps/posix/system.c ++++ b/sysdeps/posix/system.c +@@ -134,7 +134,7 @@ do_system (const char *line) + INIT_LOCK (); + + /* Exec the shell. */ +- (void) __execve (SHELL_PATH, (char *const *) new_argv, __environ); ++ (void) __execvpe (SHELL_NAME, (char *const *) new_argv, __environ); + _exit (127); + } + else if (pid < (pid_t) 0) + +--- a/libio/iopopen.c ++++ b/libio/iopopen.c +@@ -145,7 +145,7 @@ _IO_new_proc_open (fp, command, mode) + _IO_close (fd); + } + +- _IO_execl ("/bin/sh", "sh", "-c", command, (char *) 0); ++ execlp ("sh", "sh", "-c", command, (char *) 0); + _IO__exit (127); + } + _IO_close (child_end); + + diff --git a/gnu/packages/patches/glibc-supported-locales.patch b/gnu/packages/patches/glibc-supported-locales.patch new file mode 100644 index 0000000000..2888052bb8 --- /dev/null +++ b/gnu/packages/patches/glibc-supported-locales.patch @@ -0,0 +1,33 @@ +This patch is taken from debian's glibc package (generate-supported.mk). +It install the localedata/SUPPORTED file of the glibc. This file lists +all the supported locales of the glibc. + +diff --git a/localedata/Makefile.old b/localedata/Makefile +index 34877c0..a61d9b9 100644 +--- a/localedata/Makefile.old ++++ b/localedata/Makefile +@@ -91,7 +91,8 @@ endif + # Files to install. + install-others := $(addprefix $(inst_i18ndir)/, \ + $(addsuffix .gz, $(charmaps)) \ +- $(locales)) ++ $(locales)) \ ++ $(inst_i18ndir)/SUPPORTED + + tests: $(objdir)/iconvdata/gconv-modules + +@@ -195,6 +196,14 @@ endif + + include SUPPORTED + ++$(inst_i18ndir)/SUPPORTED: SUPPORTED $(+force) ++ for locale in $(SUPPORTED-LOCALES); do \ ++ [ $$locale = true ] && continue; \ ++ echo $$locale | sed 's,/, ,' >> LOCALES; \ ++ done ++ $(make-target-directory) ++ $(INSTALL_DATA) LOCALES $@ ++ + INSTALL-SUPPORTED-LOCALES=$(addprefix install-, $(SUPPORTED-LOCALES)) + + # Sometimes the whole collection of locale files should be installed. diff --git a/gnu/packages/patches/groff-source-date-epoch.patch b/gnu/packages/patches/groff-source-date-epoch.patch deleted file mode 100644 index 53c590b049..0000000000 --- a/gnu/packages/patches/groff-source-date-epoch.patch +++ /dev/null @@ -1,299 +0,0 @@ -Adds support for the environment variable SOURCE_DATE_EPOCH. - -See: https://sources.debian.net/patches/groff/1.22.3-9/source-date-epoch.patch/ - -From abc23bc9245e18468817f2838361c3a08f7521e2 Mon Sep 17 00:00:00 2001 -From: Colin Watson <cjwatson@debian.org> -Date: Thu, 5 Nov 2015 11:47:34 +0000 -Subject: Implement `SOURCE_DATE_EPOCH' for reproducible builds. - -Author: Colin Watson <cjwatson@debian.org> -Forwarded: yes -Last-Update: 2015-11-05 - -Patch-Name: source-date-epoch.patch ---- - doc/groff.texinfo | 6 +++++ - src/devices/grohtml/grohtml.man | 7 ++++++ - src/devices/grohtml/post-html.cpp | 5 ++-- - src/devices/gropdf/gropdf.man | 7 ++++++ - src/devices/gropdf/gropdf.pl | 3 ++- - src/devices/grops/grops.man | 7 ++++++ - src/devices/grops/ps.cpp | 3 ++- - src/include/curtime.h | 23 ++++++++++++++++++ - src/libs/libgroff/Makefile.sub | 2 ++ - src/libs/libgroff/curtime.cpp | 51 +++++++++++++++++++++++++++++++++++++++ - src/roff/troff/input.cpp | 3 ++- - 11 files changed, 112 insertions(+), 5 deletions(-) - create mode 100644 src/include/curtime.h - create mode 100644 src/libs/libgroff/curtime.cpp - -diff --git a/doc/groff.texinfo b/doc/groff.texinfo -index 066b5274..1d3c7a9f 100644 ---- a/doc/groff.texinfo -+++ b/doc/groff.texinfo -@@ -1453,6 +1453,12 @@ default directory (on Unix and GNU/Linux systems, this is usually - @item GROFF_TYPESETTER - @tindex GROFF_TYPESETTER@r{, environment variable} - The default output device. -+ -+@item SOURCE_DATE_EPOCH -+@tindex SOURCE_DATE_EPOCH@r{, environment variable} -+A timestamp (expressed as seconds since the Unix epoch) to use in place of -+the current time when initializing time-based built-in registers such as -+@code{\n[seconds]}. - @end table - - Note that MS-DOS and MS-Windows ports of @code{groff} use semi-colons, -diff --git a/src/devices/grohtml/grohtml.man b/src/devices/grohtml/grohtml.man -index 51eae224..4be4abbc 100644 ---- a/src/devices/grohtml/grohtml.man -+++ b/src/devices/grohtml/grohtml.man -@@ -419,6 +419,13 @@ and - for more details. - . - . -+.TP -+.SM -+.B SOURCE_DATE_EPOCH -+A timestamp (expressed as seconds since the Unix epoch) to use as the -+creation timestamp in place of the current time. -+. -+. - .\" -------------------------------------------------------------------- - .SH BUGS - .\" -------------------------------------------------------------------- -diff --git a/src/devices/grohtml/post-html.cpp b/src/devices/grohtml/post-html.cpp -index fefbf014..b5fc5167 100644 ---- a/src/devices/grohtml/post-html.cpp -+++ b/src/devices/grohtml/post-html.cpp -@@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #include "html.h" - #include "html-text.h" - #include "html-table.h" -+#include "curtime.h" - - #include <time.h> - -@@ -5013,7 +5014,7 @@ void html_printer::do_file_components (void) - .put_string(Version_string) - .end_comment(); - -- t = time(0); -+ t = current_time(); - html.begin_comment("CreationDate: ") - .put_string(ctime(&t), strlen(ctime(&t))-1) - .end_comment(); -@@ -5126,7 +5127,7 @@ html_printer::~html_printer() - .put_string(Version_string) - .end_comment(); - -- t = time(0); -+ t = current_time(); - html.begin_comment("CreationDate: ") - .put_string(ctime(&t), strlen(ctime(&t))-1) - .end_comment(); -diff --git a/src/devices/gropdf/gropdf.man b/src/devices/gropdf/gropdf.man -index 3bbace6a..cc0c82f1 100644 ---- a/src/devices/gropdf/gropdf.man -+++ b/src/devices/gropdf/gropdf.man -@@ -1029,6 +1029,13 @@ and - for more details. - . - . -+.TP -+.SM -+.B SOURCE_DATE_EPOCH -+A timestamp (expressed as seconds since the Unix epoch) to use as the -+creation timestamp in place of the current time. -+. -+. - .\" -------------------------------------------------------------------- - .SH FILES - .\" -------------------------------------------------------------------- -diff --git a/src/devices/gropdf/gropdf.pl b/src/devices/gropdf/gropdf.pl -index 035d1238..c25c4c67 100644 ---- a/src/devices/gropdf/gropdf.pl -+++ b/src/devices/gropdf/gropdf.pl -@@ -239,13 +239,14 @@ elsif (exists($ppsz{$papersz})) - @defaultmb=@mediabox=(0,0,$ppsz{$papersz}->[0],$ppsz{$papersz}->[1]); - } - --my (@dt)=localtime(time); -+my (@dt)=localtime($ENV{SOURCE_DATE_EPOCH} || time); - my $dt=PDFDate(\@dt); - - my %info=('Creator' => "(groff version $cfg{GROFF_VERSION})", - 'Producer' => "(gropdf version $cfg{GROFF_VERSION})", - 'ModDate' => "($dt)", - 'CreationDate' => "($dt)"); -+ - while (<>) - { - chomp; -diff --git a/src/devices/grops/grops.man b/src/devices/grops/grops.man -index 99fb7486..272c2d18 100644 ---- a/src/devices/grops/grops.man -+++ b/src/devices/grops/grops.man -@@ -1419,6 +1419,13 @@ and - for more details. - . - . -+.TP -+.SM -+.B SOURCE_DATE_EPOCH -+A timestamp (expressed as seconds since the Unix epoch) to use as the -+creation timestamp in place of the current time. -+. -+. - .\" -------------------------------------------------------------------- - .SH FILES - .\" -------------------------------------------------------------------- -diff --git a/src/devices/grops/ps.cpp b/src/devices/grops/ps.cpp -index 745a503b..03e65372 100644 ---- a/src/devices/grops/ps.cpp -+++ b/src/devices/grops/ps.cpp -@@ -28,6 +28,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #include "cset.h" - #include "nonposix.h" - #include "paper.h" -+#include "curtime.h" - - #include "ps.h" - #include <time.h> -@@ -1390,7 +1391,7 @@ ps_printer::~ps_printer() - #else - time_t - #endif -- t = time(0); -+ t = current_time(); - fputs(ctime(&t), out.get_file()); - } - for (font_pointer_list *f = font_list; f; f = f->next) { -diff --git a/src/include/curtime.h b/src/include/curtime.h -new file mode 100644 -index 00000000..a4105196 ---- /dev/null -+++ b/src/include/curtime.h -@@ -0,0 +1,23 @@ -+/* Copyright (C) 2015 Free Software Foundation, Inc. -+ -+This file is part of groff. -+ -+groff is free software; you can redistribute it and/or modify it under -+the terms of the GNU General Public License as published by the Free -+Software Foundation, either version 2 of the License, or -+(at your option) any later version. -+ -+groff is distributed in the hope that it will be useful, but WITHOUT ANY -+WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+The GNU General Public License version 2 (GPL2) is available in the -+internet at <http://www.gnu.org/licenses/gpl-2.0.txt>. */ -+ -+#ifdef LONG_FOR_TIME_T -+long -+#else -+time_t -+#endif -+current_time(); -diff --git a/src/libs/libgroff/Makefile.sub b/src/libs/libgroff/Makefile.sub -index 840d9934..4cb4937a 100644 ---- a/src/libs/libgroff/Makefile.sub -+++ b/src/libs/libgroff/Makefile.sub -@@ -32,6 +32,7 @@ OBJS=\ - cmap.$(OBJEXT) \ - color.$(OBJEXT) \ - cset.$(OBJEXT) \ -+ curtime.$(OBJEXT) \ - device.$(OBJEXT) \ - errarg.$(OBJEXT) \ - error.$(OBJEXT) \ -@@ -82,6 +83,7 @@ CCSRCS=\ - $(srcdir)/cmap.cpp \ - $(srcdir)/color.cpp \ - $(srcdir)/cset.cpp \ -+ $(srcdir)/curtime.cpp \ - $(srcdir)/device.cpp \ - $(srcdir)/errarg.cpp \ - $(srcdir)/error.cpp \ -diff --git a/src/libs/libgroff/curtime.cpp b/src/libs/libgroff/curtime.cpp -new file mode 100644 -index 00000000..00821b7f ---- /dev/null -+++ b/src/libs/libgroff/curtime.cpp -@@ -0,0 +1,51 @@ -+/* Copyright (C) 2015 Free Software Foundation, Inc. -+ -+This file is part of groff. -+ -+groff is free software; you can redistribute it and/or modify it under -+the terms of the GNU General Public License as published by the Free -+Software Foundation, either version 2 of the License, or -+(at your option) any later version. -+ -+groff is distributed in the hope that it will be useful, but WITHOUT ANY -+WARRANTY; without even the implied warranty of MERCHANTABILITY or -+FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+for more details. -+ -+The GNU General Public License version 2 (GPL2) is available in the -+internet at <http://www.gnu.org/licenses/gpl-2.0.txt>. */ -+ -+#include <errno.h> -+#include <limits.h> -+#include <stdlib.h> -+#include <string.h> -+#include <time.h> -+ -+#include "errarg.h" -+#include "error.h" -+ -+#ifdef LONG_FOR_TIME_T -+long -+#else -+time_t -+#endif -+current_time() -+{ -+ char *source_date_epoch = getenv("SOURCE_DATE_EPOCH"); -+ -+ if (source_date_epoch) { -+ errno = 0; -+ char *endptr; -+ long epoch = strtol(source_date_epoch, &endptr, 10); -+ -+ if ((errno == ERANGE && (epoch == LONG_MAX || epoch == LONG_MIN)) || -+ (errno != 0 && epoch == 0)) -+ fatal("$SOURCE_DATE_EPOCH: strtol: %1", strerror(errno)); -+ if (endptr == source_date_epoch) -+ fatal("$SOURCE_DATE_EPOCH: no digits found: %1", endptr); -+ if (*endptr != '\0') -+ fatal("$SOURCE_DATE_EPOCH: trailing garbage: %1", endptr); -+ return epoch; -+ } else -+ return time(0); -+} -diff --git a/src/roff/troff/input.cpp b/src/roff/troff/input.cpp -index 9594f074..f7d2c18a 100644 ---- a/src/roff/troff/input.cpp -+++ b/src/roff/troff/input.cpp -@@ -36,6 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ - #include "input.h" - #include "defs.h" - #include "unicode.h" -+#include "curtime.h" - - // Needed for getpid() and isatty() - #include "posix.h" -@@ -8138,7 +8139,7 @@ static void init_registers() - #else /* not LONG_FOR_TIME_T */ - time_t - #endif /* not LONG_FOR_TIME_T */ -- t = time(0); -+ t = current_time(); - // Use struct here to work around misfeature in old versions of g++. - struct tm *tt = localtime(&t); - set_number_reg("seconds", int(tt->tm_sec)); diff --git a/gnu/packages/patches/handbrake-opt-in-nvenc.patch b/gnu/packages/patches/handbrake-opt-in-nvenc.patch new file mode 100644 index 0000000000..2b34aaa427 --- /dev/null +++ b/gnu/packages/patches/handbrake-opt-in-nvenc.patch @@ -0,0 +1,14 @@ +Require opt-in for NVEnc support. Otherwise the default is true with no way +to disable it. + +--- HandBrake-1.2.0/make/configure.py.orig 1969-12-31 18:00:00.000000000 -0600 ++++ HandBrake-1.2.0/make/configure.py 2019-01-22 23:22:46.186959060 -0600 +@@ -1320,7 +1320,7 @@ + grp.add_option( '--disable-ffmpeg-aac', dest="enable_ffmpeg_aac", action='store_false' ) + + h = IfHost( 'enable Nvidia NVEnc video encoder', '*-*-*', none=optparse.SUPPRESS_HELP ).value +- grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=not (host.match( '*-*-darwin*' ) or host.match( '*-*-freebsd*' )), action='store_true', help=h ) ++ grp.add_option( '--enable-nvenc', dest="enable_nvenc", default=False, action='store_true', help=h ) + + + cli.add_option_group( grp ) diff --git a/gnu/packages/patches/libarchive-CVE-2017-14166.patch b/gnu/packages/patches/libarchive-CVE-2017-14166.patch deleted file mode 100644 index a122848440..0000000000 --- a/gnu/packages/patches/libarchive-CVE-2017-14166.patch +++ /dev/null @@ -1,45 +0,0 @@ -Fix CVE-2017-14166: - -https://github.com/libarchive/libarchive/issues/935 -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14166 - -Patch copied from upstream source repository: - -https://github.com/libarchive/libarchive/commit/fa7438a0ff4033e4741c807394a9af6207940d71 - -From fa7438a0ff4033e4741c807394a9af6207940d71 Mon Sep 17 00:00:00 2001 -From: Joerg Sonnenberger <joerg@bec.de> -Date: Tue, 5 Sep 2017 18:12:19 +0200 -Subject: [PATCH] Do something sensible for empty strings to make fuzzers - happy. - ---- - libarchive/archive_read_support_format_xar.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/libarchive/archive_read_support_format_xar.c b/libarchive/archive_read_support_format_xar.c -index 7a22beb9d..93eeacc5e 100644 ---- a/libarchive/archive_read_support_format_xar.c -+++ b/libarchive/archive_read_support_format_xar.c -@@ -1040,6 +1040,9 @@ atol10(const char *p, size_t char_cnt) - uint64_t l; - int digit; - -+ if (char_cnt == 0) -+ return (0); -+ - l = 0; - digit = *p - '0'; - while (digit >= 0 && digit < 10 && char_cnt-- > 0) { -@@ -1054,7 +1057,10 @@ atol8(const char *p, size_t char_cnt) - { - int64_t l; - int digit; -- -+ -+ if (char_cnt == 0) -+ return (0); -+ - l = 0; - while (char_cnt-- > 0) { - if (*p >= '0' && *p <= '7') diff --git a/gnu/packages/patches/libarchive-CVE-2017-14502.patch b/gnu/packages/patches/libarchive-CVE-2017-14502.patch deleted file mode 100644 index 8e0508afb5..0000000000 --- a/gnu/packages/patches/libarchive-CVE-2017-14502.patch +++ /dev/null @@ -1,40 +0,0 @@ -Fix CVE-2017-14502: - -https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-14502 -https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=573 - -Patch copied from upstream source repository: - -https://github.com/libarchive/libarchive/commit/5562545b5562f6d12a4ef991fae158bf4ccf92b6 - -From 5562545b5562f6d12a4ef991fae158bf4ccf92b6 Mon Sep 17 00:00:00 2001 -From: Joerg Sonnenberger <joerg@bec.de> -Date: Sat, 9 Sep 2017 17:47:32 +0200 -Subject: [PATCH] Avoid a read off-by-one error for UTF16 names in RAR - archives. - -Reported-By: OSS-Fuzz issue 573 ---- - libarchive/archive_read_support_format_rar.c | 6 +++++- - 1 file changed, 5 insertions(+), 1 deletion(-) - -diff --git a/libarchive/archive_read_support_format_rar.c b/libarchive/archive_read_support_format_rar.c -index cbb14c32..751de697 100644 ---- a/libarchive/archive_read_support_format_rar.c -+++ b/libarchive/archive_read_support_format_rar.c -@@ -1496,7 +1496,11 @@ read_header(struct archive_read *a, struct archive_entry *entry, - return (ARCHIVE_FATAL); - } - filename[filename_size++] = '\0'; -- filename[filename_size++] = '\0'; -+ /* -+ * Do not increment filename_size here as the computations below -+ * add the space for the terminating NUL explicitly. -+ */ -+ filename[filename_size] = '\0'; - - /* Decoded unicode form is UTF-16BE, so we have to update a string - * conversion object for it. */ --- -2.15.1 - diff --git a/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch b/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch deleted file mode 100644 index 3056f0baad..0000000000 --- a/gnu/packages/patches/libgcrypt-make-yat2m-reproducible.patch +++ /dev/null @@ -1,32 +0,0 @@ -Make yat2m in libgcrypt respect SOURCE_DATE_EPOCH, making -the build reproducible. - -This was already fixed upstream in GnuPG: -https://dev.gnupg.org/rG139de02b93773615bdd95e04a7f0c1ad73b4f6fb - -and in libgpg-error: -https://dev.gnupg.org/rE5494a5728418938d2e42158bb646b07124184e64 - - ---- a/doc/yat2m.c 2017-11-23 19:16:58.000000000 +0100 -+++ b/doc/yat2m.c 2017-08-28 12:22:54.000000000 +0200 -@@ -1475,6 +1484,7 @@ - main (int argc, char **argv) - { - int last_argc = -1; -+ const char *s; - - opt_source = "GNU"; - opt_release = ""; -@@ -1608,6 +1618,11 @@ - if (argc > 1) - die ("usage: " PGM " [OPTION] [FILE] (try --help for more information)\n"); - -+ /* Take care of supplied timestamp for reproducible builds. See -+ * https://reproducible-builds.org/specs/source-date-epoch/ */ -+ if (!opt_date && (s = getenv ("SOURCE_DATE_EPOCH")) && *s) -+ opt_date = s; -+ - /* Start processing. */ - if (argc && strcmp (*argv, "-")) - { diff --git a/gnu/packages/patches/mescc-tools-boot.patch b/gnu/packages/patches/mescc-tools-boot.patch new file mode 100644 index 0000000000..2bce8a49c2 --- /dev/null +++ b/gnu/packages/patches/mescc-tools-boot.patch @@ -0,0 +1,222 @@ +From c184e95096881a13f29ebd7fc507fe305d3d8de5 Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Thu, 4 Oct 2018 22:03:31 +0200 +Subject: [PATCH] build.sh: Update for mes 0.18. + +--- + build.sh | 92 +++++++++++++++++++++++++++++++++++++----------------- + install.sh | 6 ++-- + 2 files changed, 66 insertions(+), 32 deletions(-) + +diff --git a/build.sh b/build.sh +index 335a7bb..19a0029 100755 +--- a/build.sh ++++ b/build.sh +@@ -18,7 +18,8 @@ + # along with mescc-tools. If not, see <http://www.gnu.org/licenses/>. + + set -eux +-MES_SEED=${MES_SEED-../mescc-tools-seed/libs} ++MES_PREFIX=${MES_PREFIX-../mes} ++MES_SEED=${MES_SEED-../mes-seed} + MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed} + + ######################################### +@@ -32,15 +33,23 @@ MESCC_TOOLS_SEED=${MESCC_TOOLS_SEED-../mescc-tools-seed} + # blood-elf + # Create proper debug segment + $MESCC_TOOLS_SEED/blood-elf\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/blood-elf.M1\ + -o blood-elf-blood-elf-footer.M1 + + # Build + # M1-macro phase + $MESCC_TOOLS_SEED/M1 --LittleEndian --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/blood-elf.M1\ + -f blood-elf-blood-elf-footer.M1\ + -o blood-elf.hex2 +@@ -49,7 +58,7 @@ $MESCC_TOOLS_SEED/hex2\ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f blood-elf.hex2\ + --exec_enable\ + -o bin/blood-elf +@@ -65,9 +74,13 @@ $MESCC_TOOLS_SEED/hex2\ + $MESCC_TOOLS_SEED/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/M1.M1\ + -f M1-footer.M1\ + -o M1.hex2 +@@ -76,7 +89,7 @@ $MESCC_TOOLS_SEED/hex2 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f M1.hex2\ + --exec_enable\ + -o bin/M1 +@@ -92,9 +105,13 @@ $MESCC_TOOLS_SEED/hex2 \ + ./bin/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/hex2.M1\ + -f hex2-footer.M1\ + -o hex2.hex2 +@@ -103,10 +120,10 @@ $MESCC_TOOLS_SEED/hex2 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f hex2.hex2\ + --exec_enable\ +- -o bin/hex2 ++ -o bin/hex2-0 + + ######################### + # Phase-1 Self-host # +@@ -123,18 +140,22 @@ $MESCC_TOOLS_SEED/hex2 \ + ./bin/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/blood-elf.M1\ + -f blood-elf-blood-elf-footer.M1\ + -o blood-elf.hex2 + # Hex2-linker phase +-./bin/hex2 \ ++./bin/hex2-0 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f blood-elf.hex2\ + --exec_enable\ + -o blood-elf +@@ -150,18 +171,22 @@ $MESCC_TOOLS_SEED/hex2 \ + ./bin/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/M1.M1\ + -f M1-footer.M1\ + -o M1.hex2 + # Hex2-linker phase +-./bin/hex2 \ ++./bin/hex2-0 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f M1.hex2\ + --exec_enable\ + -o bin/M1 +@@ -177,18 +202,27 @@ $MESCC_TOOLS_SEED/hex2 \ + ./bin/M1 \ + --LittleEndian\ + --Architecture 1\ +- -f $MES_SEED/x86.M1\ +- -f $MES_SEED/crt1.M1\ +- -f $MES_SEED/libc+tcc-mes.M1\ ++ -f $MES_PREFIX/lib/x86-mes/x86.M1\ ++ -f $MES_SEED/x86-mes/crt1.S\ ++ -f $MES_SEED/x86-mes/libc+tcc.S\ ++ -f $MESCC_TOOLS_SEED/file_print.M1\ ++ -f $MESCC_TOOLS_SEED/match.M1\ ++ -f $MESCC_TOOLS_SEED/numerate_number.M1\ ++ -f $MESCC_TOOLS_SEED/string.M1\ + -f $MESCC_TOOLS_SEED/hex2.M1\ + -f hex2-footer.M1\ + -o hex2.hex2 + # Hex2-linker phase +-./bin/hex2 \ ++./bin/hex2-0 \ + --LittleEndian\ + --Architecture 1\ + --BaseAddress 0x1000000\ +- -f $MES_SEED/elf32-header.hex2\ ++ -f $MES_PREFIX/lib/x86-mes/elf32-header.hex2\ + -f hex2.hex2\ + --exec_enable\ + -o bin/hex2 ++ ++# TODO ++touch bin/exec_enable ++touch bin/get_machine ++touch bin/kaem +diff --git a/install.sh b/install.sh +index e4dccff..29e58d6 100644 +--- a/install.sh ++++ b/install.sh +@@ -18,6 +18,6 @@ + PREFIX=${PREFIX-usr} + + mkdir -p "$PREFIX/bin" +-cp blood-elf "$PREFIX/bin/blood-elf" +-cp hex2 "$PREFIX/bin/hex2" +-cp M1 "$PREFIX/bin/M1" ++cp bin/blood-elf "$PREFIX/bin/blood-elf" ++cp bin/hex2 "$PREFIX/bin/hex2" ++cp bin/M1 "$PREFIX/bin/M1" +-- +2.18.0 + diff --git a/gnu/packages/patches/python-2.7-search-paths.patch b/gnu/packages/patches/python-2.7-search-paths.patch index ba7235df27..a012bc8fe0 100644 --- a/gnu/packages/patches/python-2.7-search-paths.patch +++ b/gnu/packages/patches/python-2.7-search-paths.patch @@ -1,4 +1,4 @@ -Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when +Make sure the build system honors CPATH and LIBRARY_PATH when looking for headers and libraries. --- Python-2.7.10/setup.py 2015-10-07 18:33:18.125153186 +0200 @@ -9,7 +9,7 @@ looking for headers and libraries. + # Always honor these variables. + lib_dirs += os.getenv('LIBRARY_PATH', '').split(os.pathsep) -+ inc_dirs += os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) ++ inc_dirs += os.getenv('CPATH', '').split(os.pathsep) + # OSF/1 and Unixware have some stuff in /usr/ccs/lib (like -ldb) if host_platform in ['osf1', 'unixware7', 'openunix8']: diff --git a/gnu/packages/patches/python-3-search-paths.patch b/gnu/packages/patches/python-3-search-paths.patch index 73e3f4ccf5..c824705633 100644 --- a/gnu/packages/patches/python-3-search-paths.patch +++ b/gnu/packages/patches/python-3-search-paths.patch @@ -1,4 +1,4 @@ -Make sure the build system honors C_INCLUDE_PATH and LIBRARY_PATH when +Make sure the build system honors CPATH and LIBRARY_PATH when looking for headers and libraries. --- setup.py 2015-10-07 23:32:58.891329173 +0200 @@ -10,7 +10,7 @@ looking for headers and libraries. - lib_dirs = self.compiler.library_dirs + system_lib_dirs - inc_dirs = self.compiler.include_dirs + system_include_dirs + lib_dirs = os.getenv('LIBRARY_PATH', '').split(os.pathsep) -+ inc_dirs = os.getenv('C_INCLUDE_PATH', '').split(os.pathsep) ++ inc_dirs = os.getenv('CPATH', '').split(os.pathsep) else: # Add the sysroot paths. 'sysroot' is a compiler option used to # set the logical path of the standard system headers and diff --git a/gnu/packages/patches/tcc-boot-0.9.27.patch b/gnu/packages/patches/tcc-boot-0.9.27.patch new file mode 100644 index 0000000000..6f9d365788 --- /dev/null +++ b/gnu/packages/patches/tcc-boot-0.9.27.patch @@ -0,0 +1,26 @@ +From 1431ba3a99582e4c3d2693ac37e57f361858affd Mon Sep 17 00:00:00 2001 +From: Jan Nieuwenhuizen <janneke@gnu.org> +Date: Mon, 11 Jun 2018 18:39:44 +0200 +Subject: [PATCH] bootstrappable: Force static link. + +--- + libtcc.c | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/libtcc.c b/libtcc.c +index 3448f44..02ab850 100644 +--- a/libtcc.c ++++ b/libtcc.c +@@ -735,6 +735,9 @@ LIBTCCAPI TCCState *tcc_new(void) + tcc_state = s; + ++nb_states; + ++#if BOOTSTRAP ++ s->static_link = 1; ++#endif + s->alacarte_link = 1; + s->nocommon = 1; + s->warn_implicit_function_declaration = 1; +-- +2.16.2 + diff --git a/gnu/packages/pcre.scm b/gnu/packages/pcre.scm index 564a23d012..f46f7e3775 100644 --- a/gnu/packages/pcre.scm +++ b/gnu/packages/pcre.scm @@ -89,7 +89,7 @@ POSIX regular expression API.") (define-public pcre2 (package (name "pcre2") - (version "10.31") + (version "10.32") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/pcre/pcre2/" @@ -97,7 +97,7 @@ POSIX regular expression API.") (sha256 (base32 - "1b389pzw91k1hzydsh4smdsxyppwz4pv74m3nrvy8rda0j3m6zg0")))) + "0bkwp2czcckvvbdls7b331cad11rxsm020aqhrbz84z8bp68k7pj")))) (build-system gnu-build-system) (inputs `(("bzip2" ,bzip2) ("readline" ,readline) diff --git a/gnu/packages/perl.scm b/gnu/packages/perl.scm index 073cdbf482..6a51a92ec8 100644 --- a/gnu/packages/perl.scm +++ b/gnu/packages/perl.scm @@ -63,14 +63,14 @@ ;; Yeah, Perl... It is required early in the bootstrap process by Linux. (package (name "perl") - (version "5.28.0") + (version "5.28.1") (source (origin (method url-fetch) (uri (string-append "mirror://cpan/src/5.0/perl-" version ".tar.gz")) (sha256 (base32 - "1a3f822lcl8dr8v0hk80yyhpzqlljg49z9flb48rs3nbsij9z4ky")) + "0iy3as4hnbjfyws4in3j9d6zhhjxgl5m95i5n9jy2bnzcpz8bgry")) (patches (search-patches "perl-no-sys-dirs.patch" "perl-autosplit-default-time.patch" diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 36e8ce0120..9545321461 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -614,14 +614,14 @@ encoded).") (define-public python-setuptools (package (name "python-setuptools") - (version "40.0.0") + (version "40.8.0") (source (origin (method url-fetch) (uri (pypi-uri "setuptools" version ".zip")) (sha256 (base32 - "0pq116lr14gnc62v76nk0npkm6krb2mpp7p9ab369zgv4n7dnah1")) + "0k9hifpgahnw2a26w3cr346iy733k6d3nwh3f7g9m13y6f8fqkkf")) (modules '((guix build utils))) (snippet '(begin @@ -1522,14 +1522,14 @@ server.") (define-public python-py (package (name "python-py") - (version "1.5.4") + (version "1.7.0") (source (origin (method url-fetch) (uri (pypi-uri "py" version)) (sha256 (base32 - "1xxvwfn82457djf55f5n2c94699rfqnk43br8fif2r2q8gvrmm9z")))) + "152nyjvd8phqbm9pwlnfx0xi4c6343hakjzg42sp4qw3k1qn74mz")))) (build-system python-build-system) (arguments ;; FIXME: "ImportError: 'test' module incorrectly imported from @@ -3594,14 +3594,14 @@ as the original project seems to have been abandoned circa 2007.") (define-public python-pycodestyle (package (name "python-pycodestyle") - (version "2.4.0") + (version "2.5.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "pycodestyle" version)) - (sha256 - (base32 - "0fhy4vnlgpjq4qd1wdnl6pvdw7rah0ypmn8c9mkhz8clsndskz6b")))) + (origin + (method url-fetch) + (uri (pypi-uri "pycodestyle" version)) + (sha256 + (base32 + "0v4prb05n21bm8650v0a01k1nyqjdmkrsm3zycfxh2j5k9n962p4")))) (build-system python-build-system) (home-page "https://pycodestyle.readthedocs.io/") (synopsis "Python style guide checker") @@ -4263,13 +4263,13 @@ child application and control it as if a human were typing commands.") (define-public python-setuptools-scm (package (name "python-setuptools-scm") - (version "3.1.0") + (version "3.2.0") (source (origin (method url-fetch) (uri (pypi-uri "setuptools_scm" version)) (sha256 (base32 - "0h4bglwfz8b9prqljv8z3w9rgydfyxzaj05bm1y6zs5m6shz548i")))) + "0n3knn3p1sqlx31k2lahn7z9bacvlv8nhlfidj77vz50bxqlgasj")))) (build-system python-build-system) (home-page "https://github.com/pypa/setuptools_scm/") (synopsis "Manage Python package versions in SCM metadata") @@ -5556,35 +5556,20 @@ complexity of Python source code.") (define-public python2-pyflakes-0.8.1 (package-with-python2 python-pyflakes-0.8.1)) -;; This package is used by hypothesis which has thousands of dependent packages. -;; FIXME: Consolidate this with "python-flake8" below in the next rebuild cycle. -(define-public python-flake8-3.5 +(define-public python-flake8 (package (name "python-flake8") - (version "3.5.0") - (source - (origin - (method url-fetch) - (uri (pypi-uri "flake8" version)) - (sha256 - (base32 - "184b33grvvjmiwlv9kyd7yng9qv5ld24154j70z332xxg9gjclvj")))) + (version "3.6.0") + (source (origin + (method url-fetch) + (uri (pypi-uri "flake8" version)) + (sha256 + (base32 + "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases - ;; Two errors don't seem to have assigned codes. - (add-after 'unpack 'delete-broken-test - (lambda _ (delete-file "tests/unit/test_pyflakes_codes.py") #t)) - (add-after 'unpack 'fix-problem-with-pycodestyle - (lambda _ - ;; See https://gitlab.com/pycqa/flake8/merge_requests/230 - ;; This should no longer be needed with the next release. - (substitute* "setup.py" - (("PEP8_PLUGIN\\('break_around_binary_operator'\\),") - "PEP8_PLUGIN('break_after_binary_operator'),\ -PEP8_PLUGIN('break_before_binary_operator'),")) - #t)) (delete 'check) (add-after 'install 'check (lambda* (#:key inputs outputs #:allow-other-keys) @@ -5604,45 +5589,17 @@ PEP8_PLUGIN('break_before_binary_operator'),")) "The modular source code checker: pep8, pyflakes and co") (description "Flake8 is a wrapper around PyFlakes, pep8 and python-mccabe.") - (properties `((python2-variant . ,(delay python2-flake8-3.5)))) + (properties `((python2-variant . ,(delay python2-flake8)))) (license license:expat))) -(define-public python2-flake8-3.5 - (let ((base (package-with-python2 (strip-python2-variant python-flake8-3.5)))) +(define-public python2-flake8 + (let ((base (package-with-python2 (strip-python2-variant python-flake8)))) (package (inherit base) (propagated-inputs `(("python2-configparser" ,python2-configparser) ("python2-enum34" ,python2-enum34) ,@(package-propagated-inputs base)))))) -;; Version 3.5.0 has compatibility issues with Pyflakes 2.0, so we need -;; this newer version. Keep it as a separate variable for now to avoid -;; rebuilding "python-hypothesis"; this should be removed in the next -;; rebuild cycle. -(define-public python-flake8 - (package - (inherit python-flake8-3.5) - (version "3.6.0") - (source (origin - (method url-fetch) - (uri (pypi-uri "flake8" version)) - (sha256 - (base32 - "0w0nprx22rbvrrkbfx9v5jc5gskbm08g219l7r8wai8zfswgadba")))) - (arguments - (substitute-keyword-arguments (package-arguments python-flake8-3.5) - ((#:phases phases) - `(modify-phases ,phases - (delete 'delete-broken-test) - (delete 'fix-problem-with-pycodestyle))))) - (properties `((python2-variant . ,(delay python2-flake8)))))) - -(define-public python2-flake8 - (let ((base (package-with-python2 (strip-python2-variant python-flake8)))) - (package (inherit base) - (propagated-inputs - (package-propagated-inputs python2-flake8-3.5))))) - ;; python-hacking requires flake8 <2.6.0. (define-public python-flake8-2.5 (package @@ -5870,13 +5827,13 @@ add functionality and customization to your projects with their own plugins.") (define-public python-fonttools (package (name "python-fonttools") - (version "3.28.0") + (version "3.37.3") (source (origin (method url-fetch) (uri (pypi-uri "fonttools" version ".zip")) (sha256 (base32 - "0vsvjhidpb5kywpjgz1j3fywzkddxkb0afqai18qa3h6lqjyxwpb")))) + "0k90g0q1h4var3kq6xn6zs3j1ghff97hwyn1gdqfdywsldas9668")))) (build-system python-build-system) (native-inputs `(("unzip" ,unzip) @@ -7213,13 +7170,13 @@ tables.") (define-public python-atomicwrites (package (name "python-atomicwrites") - (version "1.1.5") + (version "1.3.0") (source (origin (method url-fetch) (uri (pypi-uri "atomicwrites" version)) (sha256 (base32 - "11bm90fwm2avvf4f3ib8g925w7jr4m11vcsinn1bi6ns4bm32214")))) + "19ngcscdf3jsqmpcxn6zl5b6anmsajb6izp1smcd1n02midl9abm")))) (build-system python-build-system) (synopsis "Atomic file writes in Python") (description "Library for atomic file writes using platform dependent tools @@ -7552,11 +7509,14 @@ otherwise matches 3.2’s API.") (base32 "0rdjmmsab550kxsssdq49jcniz77zlkpw4pvi9hvib3lsskjmh4y")))) (build-system python-build-system) - (arguments `(#:python ,python-2 - ;; FIXME: Python 2.7.14 moved the test.support library, - ;; but our package has not yet been adjusted. Enable - ;; tests when the python2 package has been fixed. - #:tests? #f)) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (replace 'check + (lambda _ + (invoke "python" "test_futures.py") + #t))))) (home-page "https://github.com/agronholm/pythonfutures") (synopsis "Backport of the concurrent.futures package from Python 3.2") @@ -7648,14 +7608,14 @@ library as well as on the command line.") (define-public python-pluggy (package (name "python-pluggy") - (version "0.7.1") + (version "0.8.1") (source (origin (method url-fetch) (uri (pypi-uri "pluggy" version)) (sha256 (base32 - "1qbn70mksmr03hac6jgp6fiqc4l7859z8dchx2x950vhlij87swm")))) + "05l6g42p9ilmabw0hlbiyxy6gyzjri41m5l11a8dzgvi77q35p4d")))) (build-system python-build-system) (native-inputs `(("python-setuptools-scm" ,python-setuptools-scm))) @@ -8341,13 +8301,13 @@ anymore.") (define-public python2-pathlib2 (package (name "python2-pathlib2") - (version "2.3.2") + (version "2.3.3") (source (origin (method url-fetch) (uri (pypi-uri "pathlib2" version)) (sha256 (base32 - "10yb0iv5x2hs631rcppkhbddx799d3h8pcwmkbh2a66ns3w71ccf")))) + "0hpp92vqqgcd8h92msm9slv161b1q160igjwnkf2ag6cx0c96695")))) (build-system python-build-system) ;; We only need the the Python 2 variant, since for Python 3 our minimum ;; version is 3.4 which already includes this package as part of the @@ -11389,17 +11349,14 @@ of @code{functools.lru_cache} from python 3.3.") (define-public python-configparser (package (name "python-configparser") - (version "3.5.0") + (version "3.7.1") (source (origin (method url-fetch) - (uri (string-append - "https://bitbucket.org/ambv/configparser/get/" - version ".tar.bz2")) - (file-name (string-append name "-" version ".tar.gz")) + (uri (pypi-uri "configparser" version)) (sha256 (base32 - "0waq40as14abwzbb321hfz4vr1fi363nscy32ga14qvfygrg96wa")))) + "0cnz213il9lhgda6x70fw7mfqr8da43s3wm343lwzhqx94mgmmav")))) (build-system python-build-system) (home-page "https://github.com/jaraco/configparser/") (synopsis "Backport of configparser from python 3.5") @@ -11755,14 +11712,14 @@ several utilities, as well as an API for building localization tools.") (define-public python-packaging (package (name "python-packaging") - (version "18.0") + (version "19.0") (source (origin (method url-fetch) (uri (pypi-uri "packaging" version)) (sha256 (base32 - "01wq9c53ix5rz6qg2c98gy8n4ff768rmanifm8m5jpjiaizj51h8")))) + "1brjhygq9dz6x1kdljivkjfldi3qf5rbkqgck1bpgv9qpv8ab60c")))) (build-system python-build-system) (arguments `(#:phases (modify-phases %standard-phases @@ -13641,29 +13598,15 @@ file system events on Linux.") (define-public python-more-itertools (package (name "python-more-itertools") - (version "4.3.0") + (version "5.0.0") (source (origin (method url-fetch) (uri (pypi-uri "more-itertools" version)) (sha256 (base32 - "17h3na0rdh8xq30w4b9pizgkdxmm51896bxw600x84jflg9vaxn4")))) + "1r12cm6mcdwdzz7d47a6g4l437xsvapdlgyhqay3i2nrlv03da9q")))) (build-system python-build-system) - (arguments - `(,@(if (any (cute string-prefix? <> (or (%current-system) - (%current-target-system))) - '("armhf" "i686")) - '(#:phases - (modify-phases %standard-phases - ;; This is required for 32-bit hardware. - ;; TODO: Try to remove this when upgrading. - (add-after 'unpack 'patch-test - (lambda _ - (substitute* "more_itertools/tests/test_more.py" - (("10 \\*\\* 10") "9 ** 9")) - #t)))) - '()))) (propagated-inputs `(("python-six" ,python-six-bootstrap))) (home-page "https://github.com/erikrose/more-itertools") diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 1c4ea720f1..ce2e344880 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2013, 2014, 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014, 2015, 2016 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2014, 2017 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2014, 2017, 2019 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2014, 2015 Federico Beffa <beffa@fbengineering.ch> ;;; Copyright © 2015 Omar Radwan <toxemicsquire4@gmail.com> ;;; Copyright © 2015 Pierre-Antoine Rault <par@rigelk.eu> @@ -95,7 +95,6 @@ (package (name "python2") (version "2.7.15") - (replacement python-2/fixed) (source (origin (method url-fetch) @@ -108,7 +107,9 @@ "python-2-deterministic-build-info.patch" "python-2.7-site-prefixes.patch" "python-2.7-source-date-epoch.patch" - "python-2.7-adjust-tests.patch")) + "python-2.7-adjust-tests.patch" + "python2-CVE-2018-14647.patch" + "python2-CVE-2018-1000802.patch")) (modules '((guix build utils))) ;; suboptimal to delete failing tests here, but if we delete them in the ;; arguments then we need to make sure to strip out that phase when it @@ -136,6 +137,9 @@ "--enable-unicode=ucs4" (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") "/lib")) + ;; With no -j argument tests use all available cpus, so provide one. + #:make-flags + (list (format #f "TESTOPTS=-j~d" (parallel-job-count))) #:modules ((ice-9 ftw) (ice-9 match) (guix build utils) (guix build gnu-build-system)) @@ -204,16 +208,35 @@ (scandir testdir (match-lambda ((or "." "..") #f) + ("support" #f) (file (not - ;; FIXME: Add the 'support' directory - ;; in the next rebuild cycle, since it - ;; moved in 2.7.14. See also - ;; python2-futures below. (string-prefix? "test_support." file)))))) (call-with-output-file "__init__.py" (const #t)) #t))))))) + (add-after 'remove-tests 'rebuild-bytecode + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + ;; Disable hash randomization to ensure the generated .pycs + ;; are reproducible. + (setenv "PYTHONHASHSEED" "0") + (for-each + (lambda (opt) + (format #t "Compiling with optimization level: ~a\n" + (if (null? opt) "none" (car opt))) + (for-each (lambda (file) + (apply invoke + `(,(string-append out "/bin/python") + ,@opt + "-m" "compileall" + "-f" ; force rebuild + ;; Don't build lib2to3, because it contains Python 3 code. + "-x" "lib2to3/.*" + ,file))) + (find-files out "\\.py$"))) + (list '() '("-O") '("-OO"))) + #t))) (add-after 'install 'move-tk-inter (lambda* (#:key outputs #:allow-other-keys) ;; When Tkinter support is built move it to a separate output so @@ -266,16 +289,6 @@ data types.") ;; Current 2.x version. (define-public python-2 python-2.7) -(define python-2/fixed - (package - (inherit python-2) - (source (origin - (inherit (package-source python-2)) - (patches (append - (origin-patches (package-source python-2)) - (search-patches "python2-CVE-2018-14647.patch" - "python2-CVE-2018-1000802.patch"))))))) - (define-public python2-called-python ;; Both 2.x and 3.x used to be called "python". In commit ;; a7714d42de2c3082f3609d1e63c83d703fb39cf9 (March 2018), we renamed the @@ -288,8 +301,7 @@ data types.") (define-public python-3.7 (package (inherit python-2) (name "python") - (version "3.7.0") - (replacement python-3/fixed) + (version "3.7.2") (source (origin (method url-fetch) (uri (string-append "https://www.python.org/ftp/python/" @@ -302,7 +314,7 @@ data types.") (patch-flags '("-p0")) (sha256 (base32 - "0j9mic5c9lbd2b20wka7hily7szz740wy9ilfrczxap63rnrk0h3")) + "1fzi9d2gibh0wzwidyckzbywsxcsbckgsl05ryxlifxia77fhgyq")) (snippet '(begin (for-each delete-file @@ -326,10 +338,7 @@ data types.") (lambda _ (unsetenv "SOURCE_DATE_EPOCH") #t)) (add-after 'check 'reset-SOURCE_DATE_EPOCH (lambda _ (setenv "SOURCE_DATE_EPOCH" "1") #t)) - ;; FIXME: Without this phase we have close to 400 files that - ;; differ across different builds of this package. With this phase - ;; there are 44 files left that differ. - (add-after 'remove-tests 'rebuild-bytecode + (replace 'rebuild-bytecode (lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) ;; Disable hash randomization to ensure the generated .pycs @@ -361,14 +370,6 @@ data types.") ;; Current 3.x version. (define-public python-3 python-3.7) -(define python-3/fixed - (package - (inherit python-3) - (source (origin - (inherit (package-source python-3)) - (patches (append (origin-patches (package-source python-3)) - (search-patches "python-CVE-2018-14647.patch"))))))) - ;; Current major version. (define-public python python-3) diff --git a/gnu/packages/readline.scm b/gnu/packages/readline.scm index 59fa8af8af..57d550d67f 100644 --- a/gnu/packages/readline.scm +++ b/gnu/packages/readline.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org> -;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2016, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org> ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr> ;;; @@ -55,18 +55,15 @@ (define-public readline (package (name "readline") - (version (string-append "7.0." - (number->string (length %patch-series-7.0)))) + (version "8.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/readline/readline-" (version-major+minor version) ".tar.gz")) (sha256 (base32 - "0d13sg9ksf982rrrmv5mb6a2p4ys9rvg9r71d6il0vr8hmql63bm")) - (patches (append - %patch-series-7.0 - (search-patches "readline-link-ncurses.patch"))) + "0qg4924hf4hg0r0wbx2chswsr08734536fh5iagkd3a7f4czafg3")) + (patches (search-patches "readline-link-ncurses.patch")) (patch-flags '("-p0")))) (build-system gnu-build-system) (propagated-inputs `(("ncurses" ,ncurses))) @@ -101,6 +98,23 @@ comfortable for anyone.") (license gpl3+) (home-page "https://savannah.gnu.org/projects/readline/"))) +(define-public readline-7 + (package (inherit readline) + (name "readline") + (version (string-append "7.0." + (number->string (length %patch-series-7.0)))) + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnu/readline/readline-" + (version-major+minor version) ".tar.gz")) + (sha256 + (base32 + "0d13sg9ksf982rrrmv5mb6a2p4ys9rvg9r71d6il0vr8hmql63bm")) + (patches (append + %patch-series-7.0 + (search-patches "readline-link-ncurses.patch"))) + (patch-flags '("-p0")))))) + (define-public readline-6.2 (package (inherit readline) (version "6.2") diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 501736d898..6e3ea79845 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -406,10 +406,7 @@ test = { path = \"../libtest\" } ;; modules (see <https://bugs.gnu.org/31392>). (native-search-paths (list (search-path-specification - (variable "C_INCLUDE_PATH") - (files '("include"))) - (search-path-specification - (variable "CPLUS_INCLUDE_PATH") + (variable "CPATH") (files '("include"))) (search-path-specification (variable "LIBRARY_PATH") diff --git a/gnu/packages/sqlite.scm b/gnu/packages/sqlite.scm index 05d7ce6b92..caa98c0861 100644 --- a/gnu/packages/sqlite.scm +++ b/gnu/packages/sqlite.scm @@ -46,8 +46,7 @@ (define-public sqlite (package (name "sqlite") - (replacement sqlite-3.26.0) - (version "3.24.0") + (version "3.27.1") (source (origin (method url-fetch) (uri (let ((numeric-version @@ -59,19 +58,21 @@ (map (cut string-pad <> 2 #\0) other-digits)) 6 #\0)))))) - (string-append "https://sqlite.org/2018/sqlite-autoconf-" + (string-append "https://sqlite.org/2019/sqlite-autoconf-" numeric-version ".tar.gz"))) (sha256 (base32 - "0jmprv2vpggzhy7ma4ynmv1jzn3pfiwzkld0kkg6hvgvqs44xlfr")))) + "1y7l225jm18fz6z3vyffrkl9k6qi964w1c5ri4giixizyy7jpaal")))) (build-system gnu-build-system) (inputs `(("readline" ,readline))) (arguments `(#:configure-flags - ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_UNLOCK_NOTIFY and - ;; -DSQLITE_ENABLE_DBSTAT_VTAB to CFLAGS. GNU Icecat will refuse - ;; to use the system SQLite unless these options are enabled. + ;; Add -DSQLITE_SECURE_DELETE, -DSQLITE_ENABLE_FTS3, + ;; -DSQLITE_ENABLE_UNLOCK_NOTIFY and -DSQLITE_ENABLE_DBSTAT_VTAB + ;; to CFLAGS. GNU Icecat will refuse to use the system SQLite + ;; unless these options are enabled. (list (string-append "CFLAGS=-O2 -DSQLITE_SECURE_DELETE " + "-DSQLITE_ENABLE_FTS3 " "-DSQLITE_ENABLE_UNLOCK_NOTIFY " "-DSQLITE_ENABLE_DBSTAT_VTAB")))) (home-page "https://www.sqlite.org/") @@ -83,26 +84,6 @@ widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.") (license license:public-domain))) -(define-public sqlite-3.26.0 - (package (inherit sqlite) - (version "3.26.0") - (source (origin - (method url-fetch) - (uri (let ((numeric-version - (match (string-split version #\.) - ((first-digit other-digits ...) - (string-append first-digit - (string-pad-right - (string-concatenate - (map (cut string-pad <> 2 #\0) - other-digits)) - 6 #\0)))))) - (string-append "https://sqlite.org/2018/sqlite-autoconf-" - numeric-version ".tar.gz"))) - (sha256 - (base32 - "0pdzszb4sp73hl36siiv3p300jvfvbcdxi2rrmkwgs6inwznmajx")))))) - ;; This is used by Qt. (define-public sqlite-with-column-metadata (package/inherit sqlite diff --git a/gnu/packages/swig.scm b/gnu/packages/swig.scm index 61f6a8ccfe..b1b17fc68d 100644 --- a/gnu/packages/swig.scm +++ b/gnu/packages/swig.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2015, 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2018 Marius Bakke <mbakke@fastmail.com> ;;; ;;; This file is part of GNU Guix. ;;; @@ -50,7 +51,14 @@ ;; Required since Perl 5.26.0's removal of the current ;; working directory from @INC. ;; TODO Try removing this for later versions of SWIG. - (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1") #t))))) + (lambda _ (setenv "PERL_USE_UNSAFE_INC" "1") #t)) + (add-before 'configure 'workaround-gcc-bug + (lambda _ + ;; XXX: Don't add the -isystem flag, or GCCs #include_next + ;; won't be able to find <stdlib.h>. + (substitute* "configure" + (("-isystem ") "-I")) + #t))))) (native-inputs `(("boost" ,boost) ("pcre" ,pcre "bin"))) ;for 'pcre-config' (inputs `(;; Provide these to run the corresponding tests. diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm index b8c85eb844..368a80ab57 100644 --- a/gnu/packages/tcl.scm +++ b/gnu/packages/tcl.scm @@ -40,14 +40,14 @@ (define-public tcl (package (name "tcl") - (version "8.6.8") + (version "8.6.9") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/tcl/Tcl/" version "/tcl" version "-src.tar.gz")) (sha256 (base32 - "0sprsg7wnraa4cbwgbcliylm6p0rspfymxn8ww02pr4ca70v0g64")))) + "0kjzj7mkzfnb7ksxanbibibfpciyvsh5ffdlhs0bmfc75kgd435d")))) (build-system gnu-build-system) (arguments '(#:phases (modify-phases %standard-phases @@ -135,14 +135,15 @@ X11 GUIs.") (define-public tk (package (name "tk") - (version "8.6.8") + (version "8.6.9.1") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/tcl/Tcl/" - version "/tk" version "-src.tar.gz")) + (version-prefix version 3) "/tk" + version "-src.tar.gz")) (sha256 (base32 - "0cvvznjwfn0i9vj9cw3wg8svx25ha34gg57m4xd1k5fyinhbrrs9")) + "1d7bfkxpacy33w5nahf73lkwxqpff44w1jplg7i2gmwgiaawvjwg")) (patches (search-patches "tk-find-library.patch")))) (build-system gnu-build-system) (arguments diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm index 948d2b995c..e67960db0d 100644 --- a/gnu/packages/time.scm +++ b/gnu/packages/time.scm @@ -145,17 +145,31 @@ Pendulum instances.") (define-public python-dateutil (package (name "python-dateutil") - (version "2.7.3") + (version "2.8.0") (source (origin (method url-fetch) (uri (pypi-uri "python-dateutil" version)) (sha256 (base32 - "1f7h54lg0w2ckch7592xpjkh8dg87k2br256h0iw49zn6bg02w72")))) + "17nsfhy4xdz1khrfxa61vd7pmvd5z0wa3zb6v4gb4kfnykv0b668")))) (build-system python-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (replace 'check + (lambda _ + ;; Delete tests that depend on "freezegun" to avoid a + ;; circular dependency. + (delete-file "dateutil/test/test_utils.py") + (delete-file "dateutil/test/test_rrule.py") + + ;; XXX: Fails to get timezone from /etc/localtime. + (delete-file "dateutil/test/test_tz.py") + + (invoke "pytest" "-vv")))))) (native-inputs - `(("python-setuptools-scm" ,python-setuptools-scm))) + `(("python-pytest" ,python-pytest) + ("python-setuptools-scm" ,python-setuptools-scm))) (propagated-inputs `(("python-six" ,python-six))) (home-page "https://dateutil.readthedocs.io/en/stable/") diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index fab0e72278..c025bfc56f 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -271,7 +271,7 @@ required structures.") (define-public openssl (package (name "openssl") - (version "1.0.2p") + (version "1.0.2q") (source (origin (method url-fetch) (uri (list (string-append "https://www.openssl.org/source/openssl-" @@ -283,7 +283,7 @@ required structures.") "/" name "-" version ".tar.gz"))) (sha256 (base32 - "003xh9f898i56344vpvpxxxzmikivxig4xwlm7vbi7m8n43qxaah")) + "115nisqy7kazbg6br2wrcra9nphyph1l4dgp563b9cf2rv5wyi2p")) (patches (search-patches "openssl-runpath.patch" "openssl-c-rehash-in.patch")))) (build-system gnu-build-system) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index b8e967bf69..0b5699a894 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2013, 2014 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015, 2016 Mathieu Lirzin <mthl@gnu.org> ;;; Copyright © 2014, 2015, 2016 Mark H Weaver <mhw@netris.org> -;;; Copyright © 2014, 2016 Eric Bavier <bavier@member.fsf.org> +;;; Copyright © 2014, 2016, 2019 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015, 2016, 2017, 2018, 2019 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2015, 2018 Kyle Meyer <kyle@kyleam.com> ;;; Copyright © 2015, 2017, 2018 Ricardo Wurmus <rekado@elephly.net> @@ -1384,6 +1384,15 @@ projects, from individuals to large-scale enterprise operations.") (patches (search-patches "rcs-5.9.4-noreturn.patch")))) (build-system gnu-build-system) (native-inputs `(("ed" ,ed))) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'check 'disable-t810 + ;; See https://savannah.gnu.org/bugs/index.php?52288 + ;; Back-porting the fix is non-trivial, so disable for now. + (lambda _ + (substitute* "tests/Makefile" + ((" t810 \\\\\n") "")) + #t))))) (home-page "https://www.gnu.org/software/rcs/") (synopsis "Per-file local revision control system") (description diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index a5a684c67e..3b3b256e92 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -2461,14 +2461,14 @@ supported players in addition to this package.") (define-public handbrake (package (name "handbrake") - (version "1.1.2") + (version "1.2.0") (source (origin (method url-fetch) (uri (string-append "https://download.handbrake.fr/releases/" version "/HandBrake-" version "-source.tar.bz2")) (sha256 (base32 - "0bny0hwlr55g2c69rsamv0xvwmfh1s4a582b9vq20xv5ly84m6ms")) + "03clkknaq3mz84p85cvr21gsy9b8vv2g4vvyfz44hz8la253jfqi")) (modules '((guix build utils))) (snippet ;; Remove "contrib" and source not necessary for @@ -2482,11 +2482,13 @@ supported players in addition to this package.") ;; which would lead to fetching and building of these ;; libraries. Use our own instead. (("MODULES \\+= contrib") "# MODULES += contrib")) - #t)))) + #t)) + (patches (search-patches "handbrake-opt-in-nvenc.patch")))) (build-system glib-or-gtk-build-system) (native-inputs `(("automake" ,automake) ;gui subpackage must be bootstrapped ("autoconf" ,autoconf) + ("cmake" ,cmake) ;TODO: could probably strip check from make/configure.py ("curl" ,curl) ;not actually used, but tested for ("intltool" ,intltool) ("libtool" ,libtool) @@ -2519,12 +2521,14 @@ supported players in addition to this package.") ("libvpx" ,libvpx) ("libxml2" ,libxml2) ("libx264" ,libx264) + ("speex" ,speex) ("x265" ,x265) ("zlib" ,zlib))) (arguments `(#:tests? #f ;tests require Ruby and claim to be unsupported #:configure-flags - (list (string-append "CPPFLAGS=-I" + (list "--disable-gtk-update-checks" + (string-append "CPPFLAGS=-I" (assoc-ref %build-inputs "libxml2") "/include/libxml2") "LDFLAGS=-lx265") diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm index 52f1533699..3a4cf01c7d 100644 --- a/gnu/packages/xml.scm +++ b/gnu/packages/xml.scm @@ -124,14 +124,14 @@ hierarchical form with variable field lengths.") (define-public libxml2 (package (name "libxml2") - (version "2.9.8") + (version "2.9.9") (source (origin (method url-fetch) (uri (string-append "ftp://xmlsoft.org/libxml2/libxml2-" version ".tar.gz")) (sha256 (base32 - "0ci7is75bwqqw2p32vxvrk6ds51ik7qgx73m920rakv5jlayax0b")))) + "0wd881jzvqayx0ihzba29jl80k06xj9ywp16kxacdqs3064p1ywl")))) (build-system gnu-build-system) (outputs '("out" "static")) (arguments @@ -146,6 +146,12 @@ hierarchical form with variable field lengths.") (rename-file ar (string-append dst "/" (basename ar)))) (find-files src "\\.a$")) + + ;; Remove reference to the static library from the .la + ;; file such that Libtool does the right thing when both + ;; the shared and static variants are available. + (substitute* (string-append src "/libxml2.la") + (("^old_library='libxml2.a'") "old_library=''")) #t)))))) (home-page "http://www.xmlsoft.org/") (synopsis "C parser for XML") @@ -200,14 +206,14 @@ project (but it is usable outside of the Gnome platform).") (define-public libxslt (package (name "libxslt") - (version "1.1.32") + (version "1.1.33") (source (origin (method url-fetch) (uri (string-append "ftp://xmlsoft.org/libxslt/libxslt-" version ".tar.gz")) (sha256 (base32 - "0q2l6m56iv3ysxgm2walhg4c9wp7q183jb328687i9zlp85csvjj")) + "1j1q1swnsy8jgi9x7mclvkrqhfgn09886gdlr9wzk7a08i8n0dlf")) (patches (search-patches "libxslt-generated-ids.patch")))) (build-system gnu-build-system) (home-page "http://xmlsoft.org/XSLT/index.html") diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index bf7a4050a3..15ebd380d4 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -2402,6 +2402,18 @@ XC-APPGROUP, XTEST.") (base32 "0xca343ff12wh6nsq76r0nbsfrm8dypjrzm4fqz9vv9v8i8kfrp1")))) (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases + (add-before 'configure 'pedantry + (lambda _ + ;; XXX: libevdev includes kernel headers, which causes this + ;; compile test to fail with: + ;; ...-headers-4.14.67/include/asm-generic/posix_types.h:88:14: + ;;error: ISO C90 does not support ‘long long’ [-Werror=long-long] + (substitute* "test/Makefile.in" + (("-pedantic -Werror -std=c89") + "-pedantic -Werror -std=c99")) + #t))))) (native-inputs `(("python" ,python))) (home-page "https://www.freedesktop.org/wiki/Software/libevdev/") (synopsis "Wrapper library for evdev devices") |