~ruther/guix-local

692b93408f9f3ac3e43192fb869de966fa1d1204 — Ludovic Courtès 12 years ago 66018f1
gnu: glibc: Fix 'ldd' on x86_64.

Reported by Cyril Roelandt at
<https://lists.gnu.org/archive/html/guix-devel/2013-09/msg00136.html>.

* gnu/packages/patches/glibc-ldd-x86_64.patch: New file.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/base.scm (glibc): Use it.
3 files changed, 15 insertions(+), 2 deletions(-)

M gnu-system.am
M gnu/packages/base.scm
A gnu/packages/patches/glibc-ldd-x86_64.patch
M gnu-system.am => gnu-system.am +1 -0
@@ 201,6 201,7 @@ dist_patch_DATA =						\
  gnu/packages/patches/glib-tests-homedir.patch			\
  gnu/packages/patches/glib-tests-prlimit.patch			\
  gnu/packages/patches/glibc-bootstrap-system.patch		\
  gnu/packages/patches/glibc-ldd-x86_64.patch			\
  gnu/packages/patches/glibc-no-ld-so-cache.patch		\
  gnu/packages/patches/gnutls-fix-tests-on-32-bits-system.patch	\
  gnu/packages/patches/grub-gets-undeclared.patch		\

M gnu/packages/base.scm => gnu/packages/base.scm +4 -2
@@ 409,7 409,8 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")

   (arguments
    `(#:out-of-source? #t
      #:patches (list (assoc-ref %build-inputs "patch/ld.so.cache"))
      #:patches (list (assoc-ref %build-inputs "patch/ld.so.cache")
                      (assoc-ref %build-inputs "patch/ldd"))
      #:configure-flags
      (list "--enable-add-ons"
            "--sysconfdir=/etc"


@@ 422,7 423,6 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
                           (assoc-ref %outputs "locales")
                           "/share/locale")


            (string-append "--with-headers="
                           (assoc-ref %build-inputs "linux-headers")
                           "/include")


@@ 496,6 496,8 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")

   (inputs `(("patch/ld.so.cache"
              ,(search-patch "glibc-no-ld-so-cache.patch"))
             ("patch/ldd"
              ,(search-patch "glibc-ldd-x86_64.patch"))
             ("static-bash" ,(static-package bash-light))))
   (synopsis "The GNU C Library")
   (description

A gnu/packages/patches/glibc-ldd-x86_64.patch => gnu/packages/patches/glibc-ldd-x86_64.patch +10 -0
@@ 0,0 1,10 @@
By default, 'RTDLLIST' in 'ldd' refers to 'lib64/ld-linux-x86-64.so', whereas
it's in 'lib/' for us.  This patch fixes that.

--- glibc-2.17/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed	2012-12-25 04:02:13.000000000 +0100
+++ glibc-2.17/sysdeps/unix/sysv/linux/x86_64/ldd-rewrite.sed	2013-09-15 23:08:03.000000000 +0200
@@ -1,3 +1,3 @@
 /LD_TRACE_LOADED_OBJECTS=1/a\
 add_env="$add_env LD_LIBRARY_VERSION=\\$verify_out"
-s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ 	]*$_\1"\2\4\6 \264\4-x86-64\6 \2x32\4-x32\6"_
+s_^\(RTLDLIST=\)\(.*lib\)\(\|64\|x32\)\(/[^/]*\)\(-x86-64\|-x32\)\(\.so\.[0-9.]*\)[ 	]*$_\1"\2\4\6 \2\4-x86-64\6 \2x32\4-x32\6"_