summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2012-09-01 00:35:12 +0200
committerLudovic Courtès <ludo@gnu.org>2012-09-01 00:35:12 +0200
commitf1f100b297fd0bf1fad4a1dc1b2764c6e85901db (patch)
tree49dae04d2544b1182eb02c6f73fcf0047350198c
parent6e0874db3db4c0b74b104be2acd72b5de749d4a4 (diff)
downloadguix-f1f100b297fd0bf1fad4a1dc1b2764c6e85901db.tar.gz
distro: gcc: Allow `libstdc++' to be found.
* distro/base.scm (gcc-4.7): Add `-rpath' arguments to `LIB_SPEC' to
  allow `libstdc++' to be found by users.
-rw-r--r--distro/base.scm11
1 files changed, 6 insertions, 5 deletions
diff --git a/distro/base.scm b/distro/base.scm
index 83aec380ec..44ee059748 100644
--- a/distro/base.scm
+++ b/distro/base.scm
@@ -609,8 +609,9 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
         #:phases
         (alist-cons-before
          'configure 'pre-configure
-         (lambda* (#:key inputs #:allow-other-keys)
-           (let ((libc (assoc-ref inputs "libc")))
+         (lambda* (#:key inputs outputs #:allow-other-keys)
+           (let ((out  (assoc-ref outputs "out"))
+                 (libc (assoc-ref inputs "libc")))
              ;; Fix the dynamic linker's file name.
              (substitute* "gcc/config/i386/linux64.h"
                (("#define GLIBC_DYNAMIC_LINKER([^ ]*).*$" _ suffix)
@@ -618,14 +619,14 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
                         suffix
                         (string-append libc "/lib/ld-linux-x86-64.so.2"))))
 
-             ;; Tell where to find libc and `?crt*.o', except
+             ;; Tell where to find libstdc++, libc, and `?crt*.o', except
              ;; `crt{begin,end}.o', which come with GCC.
              (substitute* ("gcc/config/gnu-user.h"
                            "gcc/config/i386/gnu-user.h"
                            "gcc/config/i386/gnu-user64.h")
                (("#define LIB_SPEC (.*)$" _ suffix)
-                (format #f "#define LIB_SPEC \"-L~a/lib \" ~a~%"
-                        libc suffix))
+                (format #f "#define LIB_SPEC \"-L~a/lib -rpath=~a/lib64 -rpath=~a/lib \" ~a~%"
+                        libc out out suffix))
                (("^.*crt([^\\.])\\.o.*$" line)
                 (regexp-substitute/global #f
                                           "([a-zA-Z]?)crt([^\\.])\\.o"