summaryrefslogtreecommitdiffstats
path: root/include/o3tl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-12-11 16:51:07 +0100
committerMichael Stahl <mstahl@redhat.com>2017-12-11 17:47:26 +0100
commit3331aecdf89c0b275fb8234414c6a8281114ae33 (patch)
tree9d98644f175fc05836f74b4beceb3bf06d37d8f6 /include/o3tl
parentexternal: fix host setup for gpgme and libassuan (diff)
downloadcore-3331aecdf89c0b275fb8234414c6a8281114ae33.tar.gz
core-3331aecdf89c0b275fb8234414c6a8281114ae33.zip
o3tl: 32-bit clang 4.0.1 fails with undefined reference to `__mulodi4'
... so prevent it from using __builtin_mul_overflow(). Change-Id: Id716f88abb0385701b6df42353b663479abfd496
Diffstat (limited to 'include/o3tl')
-rw-r--r--include/o3tl/safeint.hxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/o3tl/safeint.hxx b/include/o3tl/safeint.hxx
index 56175edb3bbe..67af99cf810c 100644
--- a/include/o3tl/safeint.hxx
+++ b/include/o3tl/safeint.hxx
@@ -82,7 +82,8 @@ template<typename T> inline bool checked_sub(T a, T b, T& result)
return !msl::utilities::SafeSubtract(a, b, result);
}
-#elif (defined __GNUC__ && __GNUC__ >= 5) || (__has_builtin(__builtin_mul_overflow) && !(defined ANDROID && defined __clang__))
+#elif (defined __GNUC__ && __GNUC__ >= 5) || (__has_builtin(__builtin_mul_overflow) && !(defined ANDROID && defined __clang__) && !(defined(__clang__) && defined(__i386__) && __clang_major__ == 4))
+// 32-bit clang 4.0.1 fails with undefined reference to `__mulodi4'
template<typename T> inline bool checked_multiply(T a, T b, T& result)
{