summary refs log tree commit diff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
authorMark H Weaver <mhw@netris.org>2015-01-06 12:57:15 -0500
committerMark H Weaver <mhw@netris.org>2015-01-06 12:57:15 -0500
commit23800e47361304682914314b99cfd4f3926f28e3 (patch)
treee67d984ab5961a81c8b8c6396c79cb218fecda85 /gnu/packages/gcc.scm
parent9b1bf33081652210502c6ef34506e27a9bc60f06 (diff)
parentaebb05b09502be00fb121f9c6cd74a190fb12a1c (diff)
downloadguix-23800e47361304682914314b99cfd4f3926f28e3.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm24
1 files changed, 23 insertions, 1 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index e795f9749f..4733fc1af6 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -279,7 +279,29 @@ Go.  It also includes runtime support libraries for these languages.")
                                  version "/gcc-" version ".tar.bz2"))
              (sha256
               (base32
-               "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810"))))))
+               "1pbjp4blk2ycaa6r3jmw4ky5f1s9ji3klbqgv8zs2sl5jn1cj810"))))
+
+    ;; TODO: In core-updates, improve the 'pre-configure phase of the main
+    ;; 'gcc' package so that the 'join-two-line-dynamic-linker-defns phase is
+    ;; no longer needed here.  Then the entire 'arguments' override below can
+    ;; be removed.
+    (arguments
+     (substitute-keyword-arguments (package-arguments gcc-4.7)
+       ((#:phases phases)
+        `(alist-cons-before
+          'pre-configure 'join-two-line-dynamic-linker-defns
+          (lambda* (#:key inputs outputs #:allow-other-keys)
+            (let ((libc (assoc-ref inputs "libc")))
+              (when libc
+                ;; Join two-line definitions of GLIBC_DYNAMIC_LINKER* into a
+                ;; single line, to allow the 'pre-configure phase to work
+                ;; properly.
+                (substitute* (find-files "gcc/config"
+                                         "^linux(64|-elf)?\\.h$")
+                  (("(#define GLIBC_DYNAMIC_LINKER[^ ]*.*)\\\\\n$" _ line)
+                   line)))
+              #t))
+          ,phases))))))
 
 (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t))
   "Return a custom version of GCC that supports LANGUAGES."