diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-01-27 10:58:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-27 10:58:44 +0100 |
commit | 4a8dc09eab7960d7cefbb3af449b41730e48e3ce (patch) | |
tree | 0827a43ca5266f476d126c835315b6055f99cb2e | |
parent | e3210040984acc69ddc236e25bd05c6e52a59583 (diff) | |
parent | 2211d73300bf39fe4566b1f6bd2efcbb08ea2b6b (diff) |
Merge pull request #25340 from akien-mga/gdnative-gcc-ice-armv7hl
Workaround GCC 6 & 7 ICE on armv7hl
-rw-r--r-- | modules/gdnative/gdnative/variant.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp index 491abbde9e..8f0d5a2db4 100644 --- a/modules/gdnative/gdnative/variant.cpp +++ b/modules/gdnative/gdnative/variant.cpp @@ -37,8 +37,22 @@ extern "C" { #endif +// Workaround GCC ICE on armv7hl which was affected GCC 6.0 up to 8.0 (GH-16100). +// It was fixed upstream in 8.1, and a fix was backported to 7.4. +// This can be removed once no supported distro ships with versions older than 7.4. +#if defined(__arm__) && defined(__GNUC__) && !defined(__clang__) && \ + (__GNUC__ == 6 || (__GNUC__ == 7 && __GNUC_MINOR__ < 4) || (__GNUC__ == 8 && __GNUC_MINOR__ < 1)) +#pragma GCC push_options +#pragma GCC optimize("-O0") +#endif + #define memnew_placement_custom(m_placement, m_class, m_constr) _post_initialize(new (m_placement, sizeof(m_class), "") m_constr) +#if defined(__arm__) && defined(__GNUC__) && !defined(__clang__) && \ + (__GNUC__ == 6 || (__GNUC__ == 7 && __GNUC_MINOR__ < 4) || (__GNUC__ == 8 && __GNUC_MINOR__ < 1)) +#pragma GCC pop_options +#endif + // Constructors godot_variant_type GDAPI godot_variant_get_type(const godot_variant *p_self) { |