summaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm87
1 files changed, 67 insertions, 20 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 36b27a4e25..5ffa159740 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -5,12 +5,12 @@
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2014 Alex Kost <alezost@gmail.com>
;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2016, 2017, 2019, 2020, 2021, 2022 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;; Copyright © 2016, 2018 Alex Vong <alexvong1995@gmail.com>
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
;;; Copyright © 2017, 2020 Mathieu Othacehe <m.othacehe@gmail.com>
-;;; Copyright © 2017, 2018, 2020 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017, 2018, 2020, 2022 Marius Bakke <marius@gnu.org>
;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;; Copyright © 2018, 2019, 2022 Ricardo Wurmus <rekado@elephly.net>
@@ -20,6 +20,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
;;; Copyright © 2022 John Kehayias <john.kehayias@protonmail.com>
;;;
;;; This file is part of GNU Guix.
@@ -106,14 +107,14 @@ command-line arguments, multiple languages, and so on.")
(define-public grep
(package
(name "grep")
- (version "3.6")
+ (version "3.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/grep/grep-"
version ".tar.xz"))
(sha256
(base32
- "0gipv6bzkm1aihj0ncqpyh164xrzgcxcv9r1kwzyk2g1mzl1azk6"))
+ "10n3mc9n1xmg85hpxyr4wiqzfp27ffxzwhvkv021j27vnk0pr3a9"))
(patches (search-patches "grep-timing-sensitive-test.patch"))))
(build-system gnu-build-system)
(native-inputs (list perl)) ;some of the tests require it
@@ -319,14 +320,14 @@ interactive means to merge two files.")
(define-public findutils
(package
(name "findutils")
- (version "4.8.0")
+ (version "4.9.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/findutils/findutils-"
version ".tar.xz"))
(sha256
(base32
- "0r3i72hnw0a30khlczi9k2c51aamaj6kfmp5mk3844nrjxz7n4jp"))
+ "1zk2sighc26bfdsm97bv7cd1cnvq7r4gll4zqpnp0rs3kp0bigx2"))
(patches (search-patches "findutils-localstatedir.patch"))))
(build-system gnu-build-system)
(arguments
@@ -357,16 +358,14 @@ used to apply commands with arbitrarily long arguments.")
(define-public coreutils
(package
(name "coreutils")
- (version "8.32")
+ (version "9.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/coreutils/coreutils-"
version ".tar.xz"))
(sha256
(base32
- "1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24"))
- (patches (search-patches "coreutils-ls.patch"
- "coreutils-gnulib-tests.patch"))))
+ "08q4b0w7mwfxbqjs712l6wrwl2ijs7k50kssgbryg9wbsw8g98b1"))))
(build-system gnu-build-system)
(inputs `(,acl ;TODO: add SELinux
,attr ;for xattrs in ls, mv, etc
@@ -554,17 +553,15 @@ change. GNU make offers many powerful extensions over the standard utility.")
(define-public binutils
(package
(name "binutils")
- (version "2.37")
+ (version "2.38")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(sha256
- (base32 "1m3b2rdfv1dmdpd0bzg1hy7i8a2qng53szc6livyi3nh6101mz37"))
- (patches (search-patches "binutils-loongson-workaround.patch"
- "binutils-2.37-file-descriptor-leak.patch"
- "binutils-CVE-2021-45078.patch"))))
+ (base32 "1y0fb4qgxaxfyf81x9fqq9w5609mkah0b7wm1f7ab9kpy0fcf3h7"))
+ (patches (search-patches "binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
(arguments
`(#:out-of-source? #t ;recommended in the README
@@ -593,7 +590,16 @@ change. GNU make offers many powerful extensions over the standard utility.")
"--enable-compressed-debug-sections=all"
"--enable-lto"
"--enable-separate-code"
- "--enable-threads")))
+ "--enable-threads")
+ ;; XXX: binutils 2.38 was released without generated manuals:
+ ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=28909>. To avoid
+ ;; a circular dependency on texinfo, prevent the build system from
+ ;; creating the manuals by calling "true" instead of "makeinfo" ...
+ #:make-flags '("MAKEINFO=true")))
+
+ ;; ... and "hide" this package such that users who install binutils get
+ ;; the version with documentation defined below.
+ (properties '((hidden? . #t)))
(synopsis "Binary utilities: bfd gas gprof ld")
(description
@@ -606,6 +612,16 @@ included.")
(license gpl3+)
(home-page "https://www.gnu.org/software/binutils/")))
+(define-public binutils+documentation
+ (package/inherit binutils
+ (native-inputs
+ (list texinfo))
+ (arguments
+ (substitute-keyword-arguments (package-arguments binutils)
+ ((#:make-flags flags ''())
+ ''())))
+ (properties '())))
+
;; FIXME: ath9k-firmware-htc-binutils.patch do not apply on 2.34 because of a
;; big refactoring of xtensa-modules.c (commit 567607c11fbf7105 upstream).
;; Keep this version around until the patch is updated.
@@ -627,7 +643,7 @@ included.")
(properties '())))
(define-public binutils-gold
- (package/inherit binutils
+ (package/inherit binutils+documentation
(name "binutils-gold")
(arguments
(substitute-keyword-arguments (package-arguments binutils)
@@ -735,13 +751,13 @@ the store.")
;; version 2.28, GNU/Hurd used a different glibc branch.
(package
(name "glibc")
- (version "2.33")
+ (version "2.35")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
(sha256
(base32
- "1zvp0qdfbdyqrzydz18d9zg3n5ygy8ps7cmny1bvsp8h1q05c99f"))
+ "0bpm1kfi09dxl4c6aanc5c9951fmf6ckkzay60cx7k37dcpp68si"))
(patches (search-patches "glibc-ldd-powerpc.patch"
"glibc-ldd-x86_64.patch"
"glibc-dl-cache.patch"
@@ -779,10 +795,15 @@ the store.")
#:validate-runpath? #f
#:modules ((ice-9 ftw)
+ (srfi srfi-1)
(srfi srfi-26)
(guix build utils)
(guix build gnu-build-system))
+ ;; Strip binaries but preserve the symbol table needed by Valgrind:
+ ;; <https://lists.gnu.org/archive/html/help-guix/2022-03/msg00036.html>.
+ #:strip-flags '("--strip-debug")
+
#:configure-flags
(list "--sysconfdir=/etc"
@@ -889,13 +910,34 @@ the store.")
(add-after 'install 'move-static-libs
(lambda* (#:key outputs #:allow-other-keys)
;; Move static libraries to the "static" output.
+ ;; Note: As of GNU libc 2.34, the contents of some ".a"
+ ;; files have been moved into "libc.so", and *both* empty
+ ;; ".so" and ".a" files have been introduced to avoid
+ ;; breaking existing executables and existing builds
+ ;; respectively. The intent of the seemingly redundant
+ ;; empty ".a" files is to avoid newly-compiled executables
+ ;; from having dependencies on the empty shared libraries,
+ ;; and as such, it is useful to have these ".a" files in
+ ;; OUT in addition to STATIC.
+
+ ;; XXX: It might be better to determine whether a static
+ ;; library is empty by some criterion (such as their file
+ ;; size equaling eight bytes) rather than hardcoding them
+ ;; by name.
+ (define empty-static-libraries
+ '("libpthread.a" "libdl.a" "libutil.a" "libanl.a"))
+ (define (empty-static-library? file)
+ (any (lambda (s)
+ (string=? file s)) empty-static-libraries))
+
(define (static-library? file)
;; Return true if FILE is a static library. The
;; "_nonshared.a" files are referred to by libc.so,
;; libpthread.so, etc., which are in fact linker
;; scripts.
(and (string-suffix? ".a" file)
- (not (string-contains file "_nonshared"))))
+ (not (string-contains file "_nonshared"))
+ (not (empty-static-library? file))))
(define (linker-script? file)
;; Guess whether FILE, a ".a" file, is actually a
@@ -906,6 +948,7 @@ the store.")
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(files (scandir lib static-library?))
+ (empty (scandir lib empty-static-library?))
(static (assoc-ref outputs "static"))
(slib (string-append static "/lib")))
(mkdir-p slib)
@@ -913,6 +956,10 @@ the store.")
(rename-file (string-append lib "/" base)
(string-append slib "/" base)))
files)
+ (for-each (lambda (base)
+ (copy-file (string-append lib "/" base)
+ (string-append slib "/" base)))
+ empty)
;; Usually libm.a is a linker script so we need to
;; change the file names in there to refer to STATIC