summary refs log tree commit diff
path: root/gnu/packages/gcc.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2018-01-17 22:08:01 +0200
committerEfraim Flashner <efraim@flashner.co.il>2018-01-18 08:59:20 +0200
commit809b0a90446ccae1a7d79165962f4e377f6342fe (patch)
treea3f54ddcf95c81c3b40660e53122e4365f95ce5e /gnu/packages/gcc.scm
parent491f7fc023ed546ca1fd08433fd0589b8b747703 (diff)
downloadguix-809b0a90446ccae1a7d79165962f4e377f6342fe.tar.gz
gnu: gcc@4.9: Fix building with glibc@2.26.
* gnu/packages/gcc.scm (gcc@4.9)[source]: Add snippet to adjust
linux-unwind.h to changes in glibc.
* gnu/packages/commencement.scm (gcc-for-libstdc++): New variable.
(libstdc++-boot0): Inherit from gcc-for-libstdc++, update note.
Diffstat (limited to 'gnu/packages/gcc.scm')
-rw-r--r--gnu/packages/gcc.scm15
1 files changed, 13 insertions, 2 deletions
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 350a9bd3fb..302064f78a 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -3,7 +3,7 @@
 ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org>
 ;;; Copyright © 2014, 2015, 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
-;;; Copyright © 2015, 2016, 2017 Efraim Flashner <efraim@flashner.co.il>
+;;; Copyright © 2015, 2016, 2017, 2018 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Carlos Sánchez de La Lama <csanchezdll@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
@@ -394,7 +394,18 @@ Go.  It also includes runtime support libraries for these languages.")
                 "14l06m7nvcvb0igkbip58x59w3nq6315k6jcz3wr9ch1rn9d44bc"))
               (patches (search-patches "gcc-arm-bug-71399.patch"
                                        "gcc-libvtv-runpath.patch"
-                                       "gcc-fix-texi2pod.patch"))))
+                                       "gcc-fix-texi2pod.patch"))
+              (modules '((guix build utils)))
+              ;; This is required for building with glibc-2.26.
+              ;; https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81712
+              (snippet
+               '(for-each
+                  (lambda (dir)
+                    (substitute* (string-append "libgcc/config/"
+                                                dir "/linux-unwind.h")
+                      (("struct ucontext") "ucontext_t")))
+                  '("aarch64" "alpha" "bfin" "i386" "m68k" "nios2"
+                    "pa" "sh" "tilepro" "xtensa")))))
     ;; Override inherited texinfo-5 with latest version.
     (native-inputs `(("perl" ,perl)   ;for manpages
                      ("texinfo" ,texinfo)))))