Discussed at
<http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00028.html>.
* gnu/packages/ld-wrapper.scm (switch-arguments, library-path): Remove.
(library-files-linked): Rewrite to include the name of libraries
passed by file names, and to honor the current -L search path instead
of the final one.
(rpath-arguments): Remove 'lib-path' parameter. Expect LIBRARY-FILES
to be a list of absolute file names.
(ld-wrapper): Adjust accordingly.
* gnu/packages/ld-wrapper.scm (%store-directory): Change the default to
/gnu/store.
* guix/build/utils.scm (%store-directory): New procedure.
(remove-store-references): Use it for the default value of 'store'.
* guix/packages.scm (patch-and-repack)[builder]: Change default store to
/gnu/store.
* gnu/packages/ld-wrapper.scm (pure-file-name?): As a last resort, when
%BUILD-DIRECTORY is false, check whether FILE is a symlink, and loop
over it to check whether its target is in the store.