[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
01/01: gnu: gcc: Fix libgcc_s directory in RUNPATH for cross-compiled bi
From: |
Ludovic Courtès |
Subject: |
01/01: gnu: gcc: Fix libgcc_s directory in RUNPATH for cross-compiled binaries. |
Date: |
Thu, 02 Apr 2015 08:26:30 +0000 |
civodul pushed a commit to branch core-updates
in repository guix.
commit 7e3c9f741b8a5ee3551be6ba5fe1721b4fb30e8a
Author: Ludovic Courtès <address@hidden>
Date: Thu Apr 2 10:26:15 2015 +0200
gnu: gcc: Fix libgcc_s directory in RUNPATH for cross-compiled binaries.
* gnu/packages/gcc.scm (gcc-4.7): Add 'libdir' procedure. Use it to
determine the right libdir, including when cross-compiling. This
fixes a bug whereby the RUNPATH of cross-compiled binaries would be
set to $crossgcc/lib instead of $crossgcc/$triplet/lib.
See <http://hydra.gnu.org/build/354389/nixlog/1/raw> for an example.
---
gnu/packages/gcc.scm | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 27e40f2..68c9e98 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -85,6 +85,14 @@ where the OS part is overloaded to denote a specific
ABI---into GCC
'("CC" "CXX" "LD" "AR" "NM" "RANLIB" "STRIP")
'("gcc" "g++" "ld" "ar" "nm" "ranlib" "strip"))
'()))))
+ (libdir
+ (let ((base '(or (assoc-ref outputs "lib")
+ (assoc-ref outputs "out"))))
+ (lambda ()
+ ;; Return the directory that contains lib/libgcc_s.so et al.
+ (if (%current-target-system)
+ `(string-append ,base "/" ,(%current-target-system))
+ base))))
(configure-flags
(lambda ()
;; This is terrible. Since we have two levels of quasiquotation,
@@ -185,8 +193,7 @@ where the OS part is overloaded to denote a specific
ABI---into GCC
(alist-cons-before
'configure 'pre-configure
(lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((libdir (or (assoc-ref outputs "lib")
- (assoc-ref outputs "out")))
+ (let ((libdir ,(libdir))
(libc (assoc-ref inputs "libc")))
(when libc
;; The following is not performed for `--without-headers'