Fix build on Ubuntu 12.04 caused by old GCC

Former-commit-id: f32c21cd6377dda04a36f6cf3e8d91db15e54212
This commit is contained in:
Jo Shields 2017-04-03 13:28:00 +01:00
parent eb04ccd2c9
commit 839559e1f9
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,33 @@
diff --git a/external/boringssl/crypto/internal.h b/external/boringssl/crypto/internal.h
index e35fb7b..7bc1bea 100644
--- a/external/boringssl/crypto/internal.h
+++ b/external/boringssl/crypto/internal.h
@@ -117,6 +117,8 @@
#define alignas(x) __declspec(align(x))
#define alignof __alignof
#endif
+#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__ <= 406)
+#define alignas(x) __attribute((aligned(x)))
#else
#include <stdalign.h>
#endif
diff --git a/configure.ac b/configure.ac
index a04424a..e67ce89 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2994,7 +2994,6 @@ case "$host" in
AOT_SUPPORTED="yes"
BTLS_SUPPORTED=yes
BTLS_PLATFORM=i386
- AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no])
;;
darwin*)
AOT_SUPPORTED="yes"
@@ -3017,7 +3016,6 @@ case "$host" in
AOT_SUPPORTED="yes"
BTLS_SUPPORTED=yes
BTLS_PLATFORM=x86_64
- AC_CHECK_HEADER(stdalign.h,[],[BTLS_SUPPORTED=no])
;;
darwin*)
AOT_SUPPORTED="yes"

1
debian/patches/series vendored Normal file
View File

@ -0,0 +1 @@
conditionally_define_alignas_for_precise.patch