summaryrefslogtreecommitdiff
path: root/debian/patches/unwind-chain-inclusion.diff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:41:01 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-10-15 15:41:01 +0300
commit7a2b43796a4c38cf98fe05e8e4ec985318b2721b (patch)
treeb0f5611276e10646b654f7d5ed12c6e6060353be /debian/patches/unwind-chain-inclusion.diff
downloadllvm-toolchain-5.0-debian.tar.gz
Imported llvm-toolchain-5.0 (1:5.0-4)debian/5.0-4debian
Diffstat (limited to 'debian/patches/unwind-chain-inclusion.diff')
-rw-r--r--debian/patches/unwind-chain-inclusion.diff41
1 files changed, 41 insertions, 0 deletions
diff --git a/debian/patches/unwind-chain-inclusion.diff b/debian/patches/unwind-chain-inclusion.diff
new file mode 100644
index 0000000..0a7468e
--- /dev/null
+++ b/debian/patches/unwind-chain-inclusion.diff
@@ -0,0 +1,41 @@
+# Without this patch, the first local include of unwind.h might, with the
+# __has_include_next, try to include the one from the system.
+# It might be /usr/include/clang/3.4/include/unwind.h
+# Because of the #ifndef __CLANG_UNWIND_H, it might never include any declaration
+# from the system.
+
+---
+ clang/lib/Headers/unwind.h | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+--- a/clang/lib/Headers/unwind.h
++++ b/clang/lib/Headers/unwind.h
+@@ -23,9 +23,6 @@
+
+ /* See "Data Definitions for libgcc_s" in the Linux Standard Base.*/
+
+-#ifndef __CLANG_UNWIND_H
+-#define __CLANG_UNWIND_H
+-
+ #if defined(__APPLE__) && __has_include_next(<unwind.h>)
+ /* Darwin (from 11.x on) provide an unwind.h. If that's available,
+ * use it. libunwind wraps some of its definitions in #ifdef _GNU_SOURCE,
+@@ -53,6 +50,9 @@
+ # endif
+ #else
+
++#ifndef __CLANG_UNWIND_H
++#define __CLANG_UNWIND_H
++
+ #include <stdint.h>
+
+ #ifdef __cplusplus
+@@ -294,6 +294,7 @@ _Unwind_Ptr _Unwind_GetTextRelBase(struc
+ }
+ #endif
+
++#endif /* __CLANG_UNWIND_H */
++
+ #endif
+
+-#endif /* __CLANG_UNWIND_H */