# gcc.diff -rw-r--r-- 894 bytes View raw
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 6f2883042d..fcc12b0387 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -420,6 +420,15 @@ Go.  It also includes runtime support libraries for these languages.")
                    '("aarch64" "alpha" "bfin" "i386" "m68k" "nios2"
                      "pa" "sh" "tilepro" "xtensa"))
                   #t))))
+    (arguments
+     (let ((args (package-arguments gcc-4.8))
+           (libc (assoc-ref %build-inputs "libc")))
+       (if libc
+           (substitute-keyword-arguments args
+             ((#:configure-flags flags)
+              `(,(string-append "--with-glibc-version" (package-version libc))
+                ,@flags)))
+           args)))
     ;; Override inherited texinfo-5 with latest version.
     (native-inputs `(("perl" ,perl)   ;for manpages
                      ("texinfo" ,texinfo)))))