Clang was unusable with libstdc++ from gcc 4.9 (Closes: #744792)

This commit is contained in:
Sylvestre Ledru 2014-05-27 16:07:32 +00:00
parent 5a5f4cd188
commit 7d9ccfc4b6
3 changed files with 39 additions and 1 deletions

3
debian/changelog vendored
View File

@ -3,8 +3,9 @@ llvm-toolchain-3.4 (1:3.4.1-4) unstable; urgency=medium
* Be less permissive when installing lldb. Remove duplication of the install
of liblldb.so.1
* Add symlinks lldb-3.4, lldb-platform-3.4 & lldb-gdbserver-3.4 without 3.4
* Clang was unusable with libstdc++ from gcc 4.9 (Closes: #744792)
-- Sylvestre Ledru <sylvestre@debian.org> Sun, 18 May 2014 20:18:19 +0200
-- Sylvestre Ledru <sylvestre@debian.org> Tue, 27 May 2014 15:17:48 +0200
llvm-toolchain-3.4 (1:3.4.1-3) unstable; urgency=medium

36
debian/patches/gcc-4.9-support.diff vendored Normal file
View File

@ -0,0 +1,36 @@
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Headers/stddef.h
===================================================================
--- llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Headers/stddef.h (révision 201728)
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/lib/Headers/stddef.h (révision 201729)
@@ -84,6 +84,16 @@
#endif
#endif
+#if __STDC_VERSION__ >= 201112L || __cplusplus >= 201103L
+typedef struct {
+ long long __clang_max_align_nonce1
+ __attribute__((__aligned__(__alignof__(long long))));
+ long double __clang_max_align_nonce2
+ __attribute__((__aligned__(__alignof__(long double))));
+} max_align_t;
+#define __CLANG_MAX_ALIGN_T_DEFINED
+#endif
+
#define offsetof(t, d) __builtin_offsetof(t, d)
#endif /* __STDDEF_H */
Index: llvm-toolchain-snapshot_3.4~svn192346/clang/test/Headers/c11.c
===================================================================
--- llvm-toolchain-snapshot_3.4~svn192346/clang/test/Headers/c11.c (révision 201728)
+++ llvm-toolchain-snapshot_3.4~svn192346/clang/test/Headers/c11.c (révision 201729)
@@ -22,6 +22,10 @@
#define __STDC_WANT_LIB_EXT1__ 1
#include <stddef.h>
rsize_t x = 0;
+_Static_assert(sizeof(max_align_t) >= sizeof(long long), "");
+_Static_assert(alignof(max_align_t) >= alignof(long long), "");
+_Static_assert(sizeof(max_align_t) >= sizeof(long double), "");
+_Static_assert(alignof(max_align_t) >= alignof(long double), "");
// If we are freestanding, then also check RSIZE_MAX (in a hosted implementation
// we will use the host stdint.h, which may not yet have C11 support).

View File

@ -38,3 +38,4 @@ lldb-link-atomic.diff
fix-llvm-config-obj-src-root.patch
scan-build-fix-clang-detection.diff
compiler-rt-path.diff
gcc-4.9-support.diff