diff options
Diffstat (limited to 'modules/gdnative/gdnative/variant.cpp')
-rw-r--r-- | modules/gdnative/gdnative/variant.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/modules/gdnative/gdnative/variant.cpp b/modules/gdnative/gdnative/variant.cpp index fd6babfc3a..8f0d5a2db4 100644 --- a/modules/gdnative/gdnative/variant.cpp +++ b/modules/gdnative/gdnative/variant.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2019 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2019 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -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) { |