efraim pushed a commit to branch core-updates
in repository guix.

commit 8e7ec29df4289a12f56f6f8f997868a048339e4f
Author: Ludovic Courtès <l...@gnu.org>
Date:   Thu Jun 8 00:26:10 2017 +0200

    gnu: gcc@4.8: Fix libsanitizer cross-compilation.
    
    This patch is modified from the original patch targeting gcc@5.
    
    * gnu/packages/patches/gcc-asan-missing-include.patch: New file.
    * gnu/packages/gcc.scm (gcc@4.8)[source](patches): Add it.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                        |  1 +
 gnu/packages/gcc.scm                                |  1 +
 gnu/packages/patches/gcc-asan-missing-include.patch | 20 ++++++++++++++++++++
 3 files changed, 22 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index a9972a3..289bbad 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -647,6 +647,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/gawk-shell.patch                                \
   %D%/packages/patches/gcc-arm-bug-71399.patch                 \
   %D%/packages/patches/gcc-arm-link-spec-fix.patch             \
+  %D%/packages/patches/gcc-asan-missing-include.patch          \
   %D%/packages/patches/gcc-cross-environment-variables.patch   \
   %D%/packages/patches/gcc-fix-texi2pod.patch                  \
   %D%/packages/patches/gcc-libvtv-runpath.patch                        \
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index f7116bc..020d2a7 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -363,6 +363,7 @@ Go.  It also includes runtime support libraries for these 
languages.")
                (base32
                 "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2"))
               (patches (search-patches "gcc-arm-link-spec-fix.patch"
+                                       "gcc-asan-missing-include.patch"
                                        "gcc-fix-texi2pod.patch"))
               (modules '((guix build utils)))
               ;; This is required for building with glibc-2.26.
diff --git a/gnu/packages/patches/gcc-asan-missing-include.patch 
b/gnu/packages/patches/gcc-asan-missing-include.patch
new file mode 100644
index 0000000..74b10c4
--- /dev/null
+++ b/gnu/packages/patches/gcc-asan-missing-include.patch
@@ -0,0 +1,20 @@
+Add missing include that triggers a build failure on PowerPC:
+
+  ../../../../gcc-5.4.0/libsanitizer/asan/asan_linux.cc: In function ‘bool 
__asan::AsanInterceptsSignal(int)’:
+  ../../../../gcc-5.4.0/libsanitizer/asan/asan_linux.cc:222:20: error: 
‘SIGSEGV’ was not declared in this scope
+     return signum == SIGSEGV && common_flags()->handle_segv;
+                     ^
+From <https://patchwork.ozlabs.org/patch/725596/>.
+
+diff --git a/libsanitizer/asan/asan_linux.cc b/libsanitizer/asan/asan_linux.cc
+index c504168..59087b9 100644
+--- a/libsanitizer/asan/asan_linux.cc
++++ b/libsanitizer/asan/asan_linux.cc
+@@ -29,6 +29,7 @@
+ #include <dlfcn.h>
+ #include <fcntl.h>
+ #include <pthread.h>
++#include <signal.h>
+ #include <stdio.h>
+ #include <unistd.h>
+ #include <unwind.h>

Reply via email to