gnu: gcc-toolchain: Add empty librt.a.

* gnu/packages/commencememnt.scm (make-gcc-toolchain): Add empty librt.a.
* gnu/packages/base.scm (gcc): Add a warning regarding the missing librt.a.
This commit is contained in:
Josselin Poiret 2023-05-04 21:50:37 +02:00
parent 106ad23ae4
commit 6c447ababf
No known key found for this signature in database
GPG key ID: 505E40B916171A8A
2 changed files with 11 additions and 0 deletions

View file

@ -967,6 +967,10 @@ (define-public glibc
;; library is empty by some criterion (such as their file ;; library is empty by some criterion (such as their file
;; size equaling eight bytes) rather than hardcoding them ;; size equaling eight bytes) rather than hardcoding them
;; by name. ;; by name.
;; XXX: We forgot librt.a for the current version! In
;; the meantime, gcc-toolchain provides it, but remove
;; that fix once librt.a is added here.
(define empty-static-libraries (define empty-static-libraries
'("libpthread.a" "libdl.a" "libutil.a" "libanl.a")) '("libpthread.a" "libdl.a" "libutil.a" "libanl.a"))
(define (empty-static-library? file) (define (empty-static-library? file)

View file

@ -3561,6 +3561,13 @@ (define* (make-gcc-toolchain gcc
(union-build (assoc-ref %outputs "static") (union-build (assoc-ref %outputs "static")
(list (assoc-ref %build-inputs (list (assoc-ref %build-inputs
"libc-static"))) "libc-static")))
;; XXX Remove once an empty librt.a is added to
;; libc:out.
(copy-file
(string-append (assoc-ref %outputs "out")
"/lib/libpthread.a")
(string-append (assoc-ref %outputs "out")
"/lib/librt.a"))
#t)))) #t))))
(native-search-paths (native-search-paths