From f85cc204b81eb27af838d0afea067c25894d54c0de76cd9d9432ec8461ba1c4b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ismail=20D=C3=B6nmez?= Date: Mon, 23 Jun 2014 08:57:29 +0000 Subject: [PATCH] Accepting request 238262 from home:arnaudversini:branches:devel:tools:compiler OBS-URL: https://build.opensuse.org/request/show/238262 OBS-URL: https://build.opensuse.org/package/show/devel:tools:compiler/llvm?expand=0&rev=353 --- clang-max_align_t.patch | 34 ++++++++++++++++++++++++++++++++++ llvm.changes | 5 +++++ llvm.spec | 2 ++ 3 files changed, 41 insertions(+) create mode 100644 clang-max_align_t.patch diff --git a/clang-max_align_t.patch b/clang-max_align_t.patch new file mode 100644 index 0000000..142e5c5 --- /dev/null +++ b/clang-max_align_t.patch @@ -0,0 +1,34 @@ +diff -ru llvm.orig/tools/clang/lib/Headers/stddef.h llvm/tools/clang/lib/Headers/stddef.h +--- llvm.orig/tools/clang/lib/Headers/stddef.h 2014-06-21 14:04:14.578588219 +0200 ++++ llvm/tools/clang/lib/Headers/stddef.h 2014-06-21 14:04:35.729587594 +0200 +@@ -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 */ +diff -ru llvm.orig/tools/clang/test/Headers/c11.c llvm/tools/clang/test/Headers/c11.c +--- llvm.orig/tools/clang/test/Headers/c11.c 2014-06-21 14:04:14.505588221 +0200 ++++ llvm/tools/clang/test/Headers/c11.c 2014-06-21 14:07:30.305582436 +0200 +@@ -22,6 +22,10 @@ + #define __STDC_WANT_LIB_EXT1__ 1 + #include + 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). diff --git a/llvm.changes b/llvm.changes index 75162bc..0e8386f 100644 --- a/llvm.changes +++ b/llvm.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Sat Jun 21 13:40:52 UTC 2014 - arnaud@versini.eu + +- Resolve issue with libstdc++ 4.9 max_align_t missing declaration + ------------------------------------------------------------------- Tue May 13 10:44:33 UTC 2014 - peter.trommler@ohm-hochschule.de diff --git a/llvm.spec b/llvm.spec index 441c080..c32ba0d 100644 --- a/llvm.spec +++ b/llvm.spec @@ -46,6 +46,7 @@ Patch9: arm-remove-xfails.diff # PATCH-FIX-OPENSUSE asan-disable-hugemalloctest.patch -- Disable ASAN HugeMallocTest Patch10: asan-disable-hugemalloctest.patch Patch11: clang-resourcedirs.patch +Patch12: clang-max_align_t.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: autoconf BuildRequires: automake @@ -155,6 +156,7 @@ This package contains the Python bindings to clang (C language) frontend for LLV %patch9 %patch10 -p1 %patch11 -p1 +%patch12 -p1 # We hardcode i586 rm tools/clang/test/Driver/x86_features.c