summaryrefslogtreecommitdiff
path: root/gnu/packages/commencement.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-04-16 23:11:32 +0200
committerLudovic Courtès <ludo@gnu.org>2015-04-16 23:15:06 +0200
commit77db91addc57faa000db05563820f57a9ffdedfc (patch)
treec681e7f620220dee62c7ff502f4f1b7721befd9b /gnu/packages/commencement.scm
parentf0ad3c76973fbf1518eecac76eab0b657722a9ba (diff)
gnu: Add second ld-wrapper to work around readlink dereferencing bug.
Suggested by Mark H Weaver. * gnu/packages/ld-wrapper2.in: New file. * gnu-system.am (MISC_DISTRO_FILES): Add it. * gnu/packages/commencement.scm (fixed-ld-wrapper): New procedure.
Diffstat (limited to 'gnu/packages/commencement.scm')
-rw-r--r--gnu/packages/commencement.scm15
1 files changed, 14 insertions, 1 deletions
diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm
index 4342dc56d1..22da2e0fb3 100644
--- a/gnu/packages/commencement.scm
+++ b/gnu/packages/commencement.scm
@@ -708,6 +708,19 @@ COREUTILS-FINAL vs. COREUTILS, etc."
;;; GCC toolchain.
;;;
+(define (fixed-ld-wrapper)
+ ;; FIXME: In this cycle, a bug was introduced in ld-wrapper: it would
+ ;; incorrectly flag ~/.guix-profile/lib/libfoo.so as "impure", due to a bug
+ ;; in its symlink resolution code. To work around that while avoiding a
+ ;; full rebuild, use an ld-wrapper with the bug-fix for 'gcc-toolchain'.
+ (let ((orig (car (assoc-ref %final-inputs "ld-wrapper"))))
+ (package
+ (inherit orig)
+ (location (source-properties->location (current-source-location)))
+ (inputs `(("wrapper" ,(search-path %load-path
+ "gnu/packages/ld-wrapper2.in"))
+ ,@(package-inputs orig))))))
+
(define (gcc-toolchain gcc)
"Return a complete toolchain for GCC."
(package
@@ -746,7 +759,7 @@ and binaries, plus debugging symbols in the 'debug' output), and Binutils.")
;; install everything that we need, and (2) to make sure ld-wrapper comes
;; before Binutils' ld in the user's profile.
(inputs `(("gcc" ,gcc)
- ("ld-wrapper" ,(car (assoc-ref %final-inputs "ld-wrapper")))
+ ("ld-wrapper" ,(fixed-ld-wrapper))
("binutils" ,binutils-final)
("libc" ,glibc-final)
("libc-debug" ,glibc-final "debug")))))