From fcdebadf39a073516df4b3e2c39fda87032d4394 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sat, 3 Jan 2015 23:44:11 -0500 Subject: gnu: gcc-4.9: Fix build on MIPS. * gnu/packages/gcc.scm (gcc-4.9): Add 'join-two-line-dynamic-linker-defns phase. --- gnu/packages/gcc.scm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 6dfdcea131..b28b3e0588 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -280,7 +280,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." -- cgit v1.2.3