summary refs log tree commit diff
path: root/gnu/packages/patches/clang-runtime-esan-build-fixes.patch
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2018-01-18 00:09:11 +0100
committerLudovic Courtès <ludo@gnu.org>2018-01-18 00:09:11 +0100
commit6b26f9152c0c2088b2e891dadea81f5f6dc8b363 (patch)
treed184bc1111738ddd740bbc7bee7c268fdb428c94 /gnu/packages/patches/clang-runtime-esan-build-fixes.patch
parent59377c9e125566fcc6073d5180660d45886062e3 (diff)
downloadguix-6b26f9152c0c2088b2e891dadea81f5f6dc8b363.tar.gz
gnu: clang-runtime: Fix build issues against glibc 2.26.
* gnu/packages/patches/clang-runtime-asan-build-fixes.patch,
gnu/packages/patches/clang-runtime-esan-build-fixes.patch: New files.
* gnu/local.mk (dist_patch_DATA): Add them.
* gnu/packages/llvm.scm (clang-runtime-from-llvm): Add 'patches'
parameter and honor it.
(clang-runtime): Pass patch list.
(clang-runtime-3.9.1, clang-runtime-3.7, clang-runtime-3.6)
(clang-runtime-3.5): Likewise.
Diffstat (limited to 'gnu/packages/patches/clang-runtime-esan-build-fixes.patch')
-rw-r--r--gnu/packages/patches/clang-runtime-esan-build-fixes.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/gnu/packages/patches/clang-runtime-esan-build-fixes.patch b/gnu/packages/patches/clang-runtime-esan-build-fixes.patch
new file mode 100644
index 0000000000..743051ac15
--- /dev/null
+++ b/gnu/packages/patches/clang-runtime-esan-build-fixes.patch
@@ -0,0 +1,19 @@
+Fix esan compilation against glibc 2.26:
+
+  /tmp/guix-build-clang-runtime-3.9.1.drv-0/compiler-rt-3.9.1.src/lib/esan/esan_sideline_linux.cpp: In static member function ‘static int __esan::SidelineThread::runSideline(void*)’:
+  /tmp/guix-build-clang-runtime-3.9.1.drv-0/compiler-rt-3.9.1.src/lib/esan/esan_sideline_linux.cpp:73:22: error: aggregate ‘__esan::SidelineThread::runSideline(void*)::sigaltstack SigAltStack’ has incomplete type and cannot be defined
+
+Patch from <https://github.com/google/sanitizers/issues/822>.
+
+index d04f5909d..bc272dfe4 100644
+--- a/lib/esan/esan_sideline_linux.cpp
++++ b/lib/esan/esan_sideline_linux.cpp
+@@ -70,7 +70,7 @@ int SidelineThread::runSideline(void *Arg) {
+ 
+   // Set up a signal handler on an alternate stack for safety.
+   InternalScopedBuffer<char> StackMap(SigAltStackSize);
+-  struct sigaltstack SigAltStack;
++  stack_t SigAltStack;
+   SigAltStack.ss_sp = StackMap.data();
+   SigAltStack.ss_size = SigAltStackSize;
+   SigAltStack.ss_flags = 0;