guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

03/03: gnu: address@hidden: Fix libsanitizer build issue.


From: Ludovic Courtès
Subject: 03/03: gnu: address@hidden: Fix libsanitizer build issue.
Date: Sun, 19 Aug 2018 12:28:27 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit 0b93d04ac537d6413999349ebe7cdcb1e961700e
Author: Ludovic Courtès <address@hidden>
Date:   Sun Aug 19 18:20:05 2018 +0200

    gnu: address@hidden: Fix libsanitizer build issue.
    
    Fixes <https://bugs.gnu.org/32397>.
    Reported by fis trivial <address@hidden>.
    
    * gnu/packages/patches/gcc-4.8-libsanitizer-fix.patch: New file.
    * gnu/packages/gcc.scm (gcc-4.8)[source]: Use it.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                        |  1 +
 gnu/packages/gcc.scm                                |  1 +
 gnu/packages/patches/gcc-4.8-libsanitizer-fix.patch | 15 +++++++++++++++
 3 files changed, 17 insertions(+)

diff --git a/gnu/local.mk b/gnu/local.mk
index 5789a87..4013803 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -695,6 +695,7 @@ dist_patch_DATA =                                           
\
   %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-4.8-libsanitizer-fix.patch          \
   %D%/packages/patches/gcc-4.9-libsanitizer-fix.patch          \
   %D%/packages/patches/gcc-libsanitizer-fix.patch              \
   %D%/packages/patches/gcc-libvtv-runpath.patch                        \
diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm
index 04d0a85..bdff2dd 100644
--- a/gnu/packages/gcc.scm
+++ b/gnu/packages/gcc.scm
@@ -365,6 +365,7 @@ Go.  It also includes runtime support libraries for these 
languages.")
                (base32
                 "08yggr18v373a1ihj0rg2vd6psnic42b518xcgp3r9k81xz1xyr2"))
               (patches (search-patches "gcc-arm-link-spec-fix.patch"
+                                       "gcc-4.8-libsanitizer-fix.patch"
                                        "gcc-asan-missing-include.patch"
                                        "gcc-fix-texi2pod.patch"))
               (modules '((guix build utils)))
diff --git a/gnu/packages/patches/gcc-4.8-libsanitizer-fix.patch 
b/gnu/packages/patches/gcc-4.8-libsanitizer-fix.patch
new file mode 100644
index 0000000..86a3ee9
--- /dev/null
+++ b/gnu/packages/patches/gcc-4.8-libsanitizer-fix.patch
@@ -0,0 +1,15 @@
+This is a backport of part of this patch from 6.5 to 4.8:
+
+  
https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=8937b94d1a643fd9760714642296d034a45254a8
+
+--- a/libsanitizer/tsan/tsan_platform_linux.cc
++++ b/libsanitizer/tsan/tsan_platform_linux.cc
+@@ -351,7 +351,7 @@ bool IsGlobalVar(uptr addr) {
+ // closes within glibc. The code is a pure hack.
+ int ExtractResolvFDs(void *state, int *fds, int nfd) {
+   int cnt = 0;
+-  __res_state *statp = (__res_state*)state;
++  struct __res_state *statp = (struct __res_state*)state;
+   for (int i = 0; i < MAXNS && cnt < nfd; i++) {
+     if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
+       fds[cnt++] = statp->_u._ext.nssocks[i];



reply via email to

[Prev in Thread] Current Thread [Next in Thread]