linux-packaging-mono/debian/patches/conditionally_define_alignas_for_precise.patch
Jo Shields 771dbbaa0d Don't build tool BTLS subdirectory, it breaks on GCC4.6
Former-commit-id: 83ca3a74d5322d4011180ae4cd42f3a8493143c8
2017-04-03 17:01:03 +01:00

65 lines
2.2 KiB
Diff

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"
diff --git a/external/boringssl/CMakeLists.txt b/external/boringssl/CMakeLists.txt
index 4e63c89..8875b10 100644
--- a/external/boringssl/CMakeLists.txt
+++ b/external/boringssl/CMakeLists.txt
@@ -32,7 +32,11 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
if(ANDROID)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x ${C_CXX_FLAGS}")
elseif(CMAKE_COMPILER_IS_GNUCXX)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${C_CXX_FLAGS}")
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.6.99")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 ${C_CXX_FLAGS}")
+ else()
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x ${C_CXX_FLAGS}")
+ endif()
else()
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++ ${C_CXX_FLAGS}")
endif()
diff --git a/external/boringssl/CMakeLists.txt b/external/boringssl/CMakeLists.txt
index 4e63c89..296d010 100644
--- a/external/boringssl/CMakeLists.txt
+++ b/external/boringssl/CMakeLists.txt
@@ -198,7 +198,9 @@ add_subdirectory(ssl)
if(ENABLE_TESTS)
add_subdirectory(ssl/test)
endif()
+if(ENABLE_TOOL)
add_subdirectory(tool)
+endif()
if(ENABLE_DECREPIT)
add_subdirectory(decrepit)
endif()